|
|
@ -54,7 +54,7 @@ static VLC mv_vlc; |
|
|
|
/* as H.263, but only 17 codes */ |
|
|
|
/* as H.263, but only 17 codes */ |
|
|
|
static int mpeg_decode_motion(MpegEncContext *s, int fcode, int pred) |
|
|
|
static int mpeg_decode_motion(MpegEncContext *s, int fcode, int pred) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int code, sign, val, l, shift; |
|
|
|
int code, sign, val, shift; |
|
|
|
|
|
|
|
|
|
|
|
code = get_vlc2(&s->gb, mv_vlc.table, MV_VLC_BITS, 2); |
|
|
|
code = get_vlc2(&s->gb, mv_vlc.table, MV_VLC_BITS, 2); |
|
|
|
if (code == 0) { |
|
|
|
if (code == 0) { |
|
|
@ -77,9 +77,7 @@ static int mpeg_decode_motion(MpegEncContext *s, int fcode, int pred) |
|
|
|
val += pred; |
|
|
|
val += pred; |
|
|
|
|
|
|
|
|
|
|
|
/* modulo decoding */ |
|
|
|
/* modulo decoding */ |
|
|
|
l = INT_BIT - 5 - shift; |
|
|
|
return sign_extend(val, 5 + shift); |
|
|
|
val = (val << l) >> l; |
|
|
|
|
|
|
|
return val; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static inline int mpeg1_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n) |
|
|
|
static inline int mpeg1_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n) |
|
|
|