remove two ubsan warnings

(regarding uint overflow)

Change-Id: I1a76e4b1268370b6b7d6a1aa93b99e57f55fd02e
This commit is contained in:
Pascal Massimino 2016-05-10 11:29:36 +02:00 committed by James Zern
parent 4154a8395d
commit 8fa6ac68f0

View File

@ -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 {