diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-11-17 00:22:27 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-11-18 00:39:23 +0100 |
commit | 85dc006b1a829726dd5e3a9b0fcc6a1dbfe6dffa (patch) | |
tree | d7b57c5be511f35b59873d487eb807160c4d04bc /libavcodec/cavs.c | |
parent | 771656bd85416cd6308b11aed6f2c69a8db9c21b (diff) | |
download | ffmpeg-85dc006b1a829726dd5e3a9b0fcc6a1dbfe6dffa.tar.gz |
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/cavs.c')
-rw-r--r-- | libavcodec/cavs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/cavs.c b/libavcodec/cavs.c index 2be50a7c4a..788fcada21 100644 --- a/libavcodec/cavs.c +++ b/libavcodec/cavs.c @@ -30,6 +30,7 @@ #include "golomb.h" #include "h264chroma.h" #include "idctdsp.h" +#include "internal.h" #include "mathops.h" #include "qpeldsp.h" #include "cavs.h" @@ -529,8 +530,8 @@ static inline void scale_mv(AVSContext *h, int *d_x, int *d_y, { int den = h->scale_den[src->ref]; - *d_x = (src->x * distp * den + 256 + (src->x >> 31)) >> 9; - *d_y = (src->y * distp * den + 256 + (src->y >> 31)) >> 9; + *d_x = (src->x * distp * den + 256 + FF_SIGNBIT(src->x)) >> 9; + *d_y = (src->y * distp * den + 256 + FF_SIGNBIT(src->y)) >> 9; } static inline void mv_pred_median(AVSContext *h, |