| 228 | } |
| 229 | |
| 230 | static 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 | |
| 249 | static int h261_decode_mb(H261Context *h){ |
| 250 | MpegEncContext * const s = &h->s; |
no test coverage detected