summaryrefslogtreecommitdiff
path: root/libavcodec/dnxhdenc.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/dnxhdenc.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/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 c49ad7eb39..71eee9fefb 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;