MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / decode_mb

Function decode_mb

libavcodec/eamad.c:186–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186static void decode_mb(MadContext *t, int inter)
187{
188 MpegEncContext *s = &t->s;
189 int mv_map = 0;
190 int mv_x, mv_y;
191 int j;
192
193 if (inter) {
194 int v = decode210(&s->gb);
195 if (v < 2) {
196 mv_map = v ? get_bits(&s->gb, 6) : 63;
197 mv_x = decode_motion(&s->gb);
198 mv_y = decode_motion(&s->gb);
199 } else {
200 mv_map = 0;
201 }
202 }
203
204 for (j=0; j<6; j++) {
205 if (mv_map & (1<<j)) { // mv_x and mv_y are guarded by mv_map
206 int add = 2*decode_motion(&s->gb);
207 comp_block(t, s->mb_x, s->mb_y, j, mv_x, mv_y, add);
208 } else {
209 s->dsp.clear_block(t->block);
210 decode_block_intra(t, t->block);
211 idct_put(t, t->block, s->mb_x, s->mb_y, j);
212 }
213 }
214}
215
216static void calc_intra_matrix(MadContext *t, int qscale)
217{

Callers 1

decode_frameFunction · 0.70

Calls 6

decode210Function · 0.85
get_bitsFunction · 0.85
decode_motionFunction · 0.85
comp_blockFunction · 0.85
decode_block_intraFunction · 0.85
idct_putFunction · 0.70

Tested by

no test coverage detected