[FFmpeg-cvslog] dpxenc: dont shift into the sign bit.

Michael Niedermayer git at videolan.org
Wed May 15 12:21:39 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed May 15 12:15:21 2013 +0200| [a9cadacdd982c8a8a008d208455a20a8a19431bc] | committer: Michael Niedermayer

dpxenc: dont shift into the sign bit.

Fixes IOC warnings

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a9cadacdd982c8a8a008d208455a20a8a19431bc
---

 libavcodec/dpxenc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c
index aaaa15b..0a4662d 100644
--- a/libavcodec/dpxenc.c
+++ b/libavcodec/dpxenc.c
@@ -114,11 +114,11 @@ static void encode_gbrp10(AVCodecContext *avctx, const AVPicture *pic, uint8_t *
             if (s->big_endian) {
                 value = (AV_RB16(src[0] + 2*x) << 12)
                       | (AV_RB16(src[1] + 2*x) << 2)
-                      | (AV_RB16(src[2] + 2*x) << 22);
+                      | ((unsigned)AV_RB16(src[2] + 2*x) << 22);
             } else {
                 value = (AV_RL16(src[0] + 2*x) << 12)
                       | (AV_RL16(src[1] + 2*x) << 2)
-                      | (AV_RL16(src[2] + 2*x) << 22);
+                      | ((unsigned)AV_RL16(src[2] + 2*x) << 22);
             }
             write32(dst, value);
             dst += 4;



More information about the ffmpeg-cvslog mailing list