mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 05:38:22 +01:00
remove two ubsan warnings
(regarding uint overflow) Change-Id: I1a76e4b1268370b6b7d6a1aa93b99e57f55fd02e
This commit is contained in:
parent
4154a8395d
commit
8fa6ac68f0
@ -637,7 +637,7 @@ static int QuantizeBlock(int16_t in[16], int16_t out[16],
|
||||
int level = QUANTDIV(coeff, iQ, B);
|
||||
if (level > MAX_LEVEL) level = MAX_LEVEL;
|
||||
if (sign) level = -level;
|
||||
in[j] = level * Q;
|
||||
in[j] = level * (int)Q;
|
||||
out[n] = level;
|
||||
if (level) last = n;
|
||||
} else {
|
||||
@ -671,7 +671,7 @@ static int QuantizeBlockWHT(int16_t in[16], int16_t out[16],
|
||||
int level = QUANTDIV(coeff, iQ, B);
|
||||
if (level > MAX_LEVEL) level = MAX_LEVEL;
|
||||
if (sign) level = -level;
|
||||
in[j] = level * Q;
|
||||
in[j] = level * (int)Q;
|
||||
out[n] = level;
|
||||
if (level) last = n;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user