Commit 19d824e4 authored by Alex Converse's avatar Alex Converse Committed by Alex Converse

bitstream: Properly promote av_reverse values before shifting.

parent 103278f7
...@@ -116,10 +116,10 @@ static int alloc_table(VLC *vlc, int size, int use_static) ...@@ -116,10 +116,10 @@ static int alloc_table(VLC *vlc, int size, int use_static)
} }
static av_always_inline uint32_t bitswap_32(uint32_t x) { static av_always_inline uint32_t bitswap_32(uint32_t x) {
return av_reverse[x&0xFF]<<24 return (uint32_t)av_reverse[x&0xFF]<<24
| av_reverse[(x>>8)&0xFF]<<16 | (uint32_t)av_reverse[(x>>8)&0xFF]<<16
| av_reverse[(x>>16)&0xFF]<<8 | (uint32_t)av_reverse[(x>>16)&0xFF]<<8
| av_reverse[x>>24]; | (uint32_t)av_reverse[x>>24];
} }
typedef struct { typedef struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment