bitreader/writer: Change shift to signed
Silences several legal but suspicious unsigned overflows found with clang -fsanitize=integer. Change-Id: I69399751492a183167932b0a10751c433c32ca7b
This commit is contained in:
parent
42b7c44b2f
commit
6aa2163b69
@ -98,7 +98,7 @@ static INLINE int vpx_read(vpx_reader *r, int prob) {
|
||||
}
|
||||
|
||||
{
|
||||
register unsigned int shift = vpx_norm[range];
|
||||
register int shift = vpx_norm[range];
|
||||
range <<= shift;
|
||||
value <<= shift;
|
||||
count -= shift;
|
||||
|
@ -35,7 +35,7 @@ static INLINE void vpx_write(vpx_writer *br, int bit, int probability) {
|
||||
int count = br->count;
|
||||
unsigned int range = br->range;
|
||||
unsigned int lowvalue = br->lowvalue;
|
||||
register unsigned int shift;
|
||||
register int shift;
|
||||
|
||||
split = 1 + (((range - 1) * probability) >> 8);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user