From ae62aa2fca3b2cf45a98dc2f9777065bcb452797 Mon Sep 17 00:00:00 2001 From: Alex Converse <aconve...@google.com> Date: Tue, 26 Apr 2011 09:08:26 -0700 Subject: [PATCH 3/4] bitstream: Properly promote av_reverse values before shifting. MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1"
This is a multi-part message in MIME format. --------------1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- libavcodec/bitstream.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) --------------1 Content-Type: text/x-patch; name="0003-bitstream-Properly-promote-av_reverse-values-before-.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0003-bitstream-Properly-promote-av_reverse-values-before-.patch" diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index 329ec95..14c3eaa 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -118,10 +118,10 @@ static int alloc_table(VLC *vlc, int size, int use_static) } static av_always_inline uint32_t bitswap_32(uint32_t x) { - return av_reverse[x&0xFF]<<24 - | av_reverse[(x>>8)&0xFF]<<16 - | av_reverse[(x>>16)&0xFF]<<8 - | av_reverse[x>>24]; + return (uint32_t)av_reverse[x&0xFF]<<24 + | (uint32_t)av_reverse[(x>>8)&0xFF]<<16 + | (uint32_t)av_reverse[(x>>16)&0xFF]<<8 + | (uint32_t)av_reverse[x>>24]; } typedef struct { --------------1--
_______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel