mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-19 20:08:28 +01:00
simplify QuantizeBlock code a bit
Change-Id: I1130859756fa88e88957781f60a3701be354e2a3
This commit is contained in:
parent
84b58ebba3
commit
b97a4003c0
@ -409,13 +409,9 @@ static int QuantizeBlock(int16_t in[16], int16_t out[16],
|
||||
const int iQ = mtx->iq_[j];
|
||||
const int B = mtx->bias_[j];
|
||||
out[n] = DIV(coeff, iQ, B);
|
||||
if (out[n]) {
|
||||
if (sign) out[n] = -out[n];
|
||||
in[j] = out[n] * Q;
|
||||
last = n;
|
||||
} else {
|
||||
in[j] = 0;
|
||||
}
|
||||
if (sign) out[n] = -out[n];
|
||||
in[j] = out[n] * Q;
|
||||
if (out[n]) last = n;
|
||||
} else {
|
||||
out[n] = 0;
|
||||
in[j] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user