aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dnxhdenc.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-11-17 00:22:27 +0100
committerLuca Barbato <lu_zero@gentoo.org>2015-01-13 00:16:41 +0100
commit61fdbf7ff64c0ae1bdd6a8d573092dc6924c1dba (patch)
treeba5ca6d52a040b8452a498bd658d4a4ce32f24b1 /libavcodec/dnxhdenc.c
parent93bf4a74de99300fdc0deb83f672bf12e6f1c262 (diff)
downloadffmpeg-61fdbf7ff64c0ae1bdd6a8d573092dc6924c1dba.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 (cherry picked from commit 85dc006b1a829726dd5e3a9b0fcc6a1dbfe6dffa) Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/dnxhdenc.c')
-rw-r--r--libavcodec/dnxhdenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index 42945107dd..6896fc1843 100644
--- a/libavcodec/dnxhdenc.c
+++ b/libavcodec/dnxhdenc.c
@@ -108,7 +108,7 @@ static int dnxhd_10bit_dct_quantize(MpegEncContext *ctx, int16_t *block,
for (i = 1; i < 64; ++i) {
int j = scantable[i];
- int sign = block[j] >> 31;
+ int sign = FF_SIGNBIT(block[j]);
int level = (block[j] ^ sign) - sign;
level = level * qmat[j] >> DNX10BIT_QMAT_SHIFT;
block[j] = (level ^ sign) - sign;