summaryrefslogtreecommitdiff
path: root/libavcodec/vp8.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-11-17 00:22:27 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-11-18 00:39:23 +0100
commit85dc006b1a829726dd5e3a9b0fcc6a1dbfe6dffa (patch)
treed7b57c5be511f35b59873d487eb807160c4d04bc /libavcodec/vp8.c
parent771656bd85416cd6308b11aed6f2c69a8db9c21b (diff)
lavc: fix bitshifts amount bigger than the type
CC: libav-stable@libav.org Bug-Id: CID 1194387 / CID 1194389 / CID 1194393 / CID 1206638
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r--libavcodec/vp8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index f437feec33..9a12346f98 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -1883,8 +1883,8 @@ void inter_predict(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3],
mb->bmv[2 * y * 4 + 2 * x + 1].y +
mb->bmv[(2 * y + 1) * 4 + 2 * x ].y +
mb->bmv[(2 * y + 1) * 4 + 2 * x + 1].y;
- uvmv.x = (uvmv.x + 2 + (uvmv.x >> (INT_BIT - 1))) >> 2;
- uvmv.y = (uvmv.y + 2 + (uvmv.y >> (INT_BIT - 1))) >> 2;
+ uvmv.x = (uvmv.x + 2 + FF_SIGNBIT(uvmv.x)) >> 2;
+ uvmv.y = (uvmv.y + 2 + FF_SIGNBIT(uvmv.y)) >> 2;
if (s->profile == 3) {
uvmv.x &= ~7;
uvmv.y &= ~7;