summaryrefslogtreecommitdiff
path: root/libavcodec/ituh263dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-10 03:41:49 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-10 03:50:58 +0200
commit0a23067ab41326dfa1da41d18923ea8547a51ff5 (patch)
treec3a964ea639441d00fafffcba296b5ae79a0bd2c /libavcodec/ituh263dec.c
parent028a79c1f142f9903c238846cc565edcef2d3802 (diff)
parent581810f5024dbb9df8e794dc0f5beac30d3a5fd4 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: mpeg4dec: use unsigned type for startcode in ff_mpeg4_decode_picture_header mpeg124: use sign_extend() function ac3dec: use get_sbits() instead of manually sign-extending 4xm: fix signed overflow wmavoice: fix a signed overflow mpegvideo_enc: fix a signed overflow crc: fix signed overflow fate: run avconv with -nostats flag avtools: add -v as alias for -loglevel avconv: always print stats with AV_LOG_INFO doc/avconv: add forgotten output/per-stream info to -filter avconv: add -stats option to enable/disable printing encoding progress avconv: in output_packet() don't set decoded_data_size for video. avconv: remove pointless always true condition avconv: factorize common code in transcode_init() zmbv: remove memcpy() of decoded frame mpeg12enc: use sign_extend() function h264pred: use unsigned types for pixel values, fix signed overflows h264: fix signed overflows in x*0x01010101 expressions h264pred: remove unused variables Conflicts: avconv.c tests/fate-run.sh Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ituh263dec.c')
-rw-r--r--libavcodec/ituh263dec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index b0976801ed..69e7ab9c99 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -271,7 +271,7 @@ int ff_h263_resync(MpegEncContext *s){
int h263_decode_motion(MpegEncContext * s, int pred, int f_code)
{
- int code, val, sign, shift, l;
+ int code, val, sign, shift;
code = get_vlc2(&s->gb, mv_vlc.table, MV_VLC_BITS, 2);
if (code == 0)
@@ -293,8 +293,7 @@ int h263_decode_motion(MpegEncContext * s, int pred, int f_code)
/* modulo decoding */
if (!s->h263_long_vectors) {
- l = INT_BIT - 5 - f_code;
- val = (val<<l)>>l;
+ val = sign_extend(val, 5 + f_code);
} else {
/* horrible h263 long vector mode */
if (pred < -31 && val < -63)