diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-14 05:48:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-14 05:48:02 +0200 |
commit | 2217a2249dd78c3719f865569b661b8adcda4962 (patch) | |
tree | 04012e03c7778136fb0584e98a78fb0c103bbf94 /libavcodec/dpxenc.c | |
parent | 7a32ab5ed0b0523d1868da8232ff15831712a18f (diff) | |
download | ffmpeg-2217a2249dd78c3719f865569b661b8adcda4962.tar.gz |
dpxenc: fix signed c99 overflows
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dpxenc.c')
-rw-r--r-- | libavcodec/dpxenc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c index 9b2cc6f94e..bd44b16ffc 100644 --- a/libavcodec/dpxenc.c +++ b/libavcodec/dpxenc.c @@ -105,13 +105,13 @@ static void encode_rgb48_10bit(AVCodecContext *avctx, const AVPicture *pic, uint for (x = 0; x < avctx->width; x++) { int value; if (s->big_endian) { - value = ((AV_RB16(src + 6*x + 4) & 0xFFC0) >> 4) - | ((AV_RB16(src + 6*x + 2) & 0xFFC0) << 6) - | ((AV_RB16(src + 6*x + 0) & 0xFFC0) << 16); + value = ((AV_RB16(src + 6*x + 4) & 0xFFC0U) >> 4) + | ((AV_RB16(src + 6*x + 2) & 0xFFC0U) << 6) + | ((AV_RB16(src + 6*x + 0) & 0xFFC0U) << 16); } else { - value = ((AV_RL16(src + 6*x + 4) & 0xFFC0) >> 4) - | ((AV_RL16(src + 6*x + 2) & 0xFFC0) << 6) - | ((AV_RL16(src + 6*x + 0) & 0xFFC0) << 16); + value = ((AV_RL16(src + 6*x + 4) & 0xFFC0U) >> 4) + | ((AV_RL16(src + 6*x + 2) & 0xFFC0U) << 6) + | ((AV_RL16(src + 6*x + 0) & 0xFFC0U) << 16); } write32(dst, value); dst += 4; |