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

Function decode_mv_component

libavcodec/h261dec.c:230–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230static int decode_mv_component(GetBitContext *gb, int v){
231 int mv_diff = get_vlc2(gb, h261_mv_vlc.table, H261_MV_VLC_BITS, 2);
232
233 /* check if mv_diff is valid */
234 if ( mv_diff < 0 )
235 return v;
236
237 mv_diff = mvmap[mv_diff];
238
239 if(mv_diff && !get_bits1(gb))
240 mv_diff= -mv_diff;
241
242 v += mv_diff;
243 if (v <=-16) v+= 32;
244 else if(v >= 16) v-= 32;
245
246 return v;
247}
248
249static int h261_decode_mb(H261Context *h){
250 MpegEncContext * const s = &h->s;

Callers 1

h261_decode_mbFunction · 0.85

Calls 2

get_vlc2Function · 0.85
get_bits1Function · 0.85

Tested by

no test coverage detected