History

bitstream: Properly promote av_reverse values before shifting.

Alex Converse committed 15 years ago

Commit 19d824e1 parent 103278f1 file · +4 −4Browse files

Unified · Split

libavcodec/bitstream.c+4−4
@@ -116,10 +116,10 @@ static int alloc_table(VLC *vlc, int size, int use_static) · 115 unmodified lines
116}116}
117 117
118static av_always_inline uint32_t bitswap_32(uint32_t x) {118static av_always_inline uint32_t bitswap_32(uint32_t x) {
119 return av_reverse[x&0xFF]<<24119 return (uint32_t)av_reverse[x&0xFF]<<24
120 | av_reverse[(x>>8)&0xFF]<<16120 | (uint32_t)av_reverse[(x>>8)&0xFF]<<16
121 | av_reverse[(x>>16)&0xFF]<<8121 | (uint32_t)av_reverse[(x>>16)&0xFF]<<8
122 | av_reverse[x>>24];122 | (uint32_t)av_reverse[x>>24];
123}123}
124 124
125typedef struct {125typedef struct {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t