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
116116 }
117117
118118 static av_always_inline uint32_t bitswap_32(uint32_t x) {
119− return av_reverse[x&0xFF]<<24
120− | av_reverse[(x>>8)&0xFF]<<16
121− | av_reverse[(x>>16)&0xFF]<<8
122− | av_reverse[x>>24];
119+ return (uint32_t)av_reverse[x&0xFF]<<24
120+ | (uint32_t)av_reverse[(x>>8)&0xFF]<<16
121+ | (uint32_t)av_reverse[(x>>16)&0xFF]<<8
122+ | (uint32_t)av_reverse[x>>24];
123123 }
124124
125125 typedef 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