mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +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 iQ = mtx->iq_[j];
|
||||||
const int B = mtx->bias_[j];
|
const int B = mtx->bias_[j];
|
||||||
out[n] = DIV(coeff, iQ, B);
|
out[n] = DIV(coeff, iQ, B);
|
||||||
if (out[n]) {
|
|
||||||
if (sign) out[n] = -out[n];
|
if (sign) out[n] = -out[n];
|
||||||
in[j] = out[n] * Q;
|
in[j] = out[n] * Q;
|
||||||
last = n;
|
if (out[n]) last = n;
|
||||||
} else {
|
|
||||||
in[j] = 0;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
out[n] = 0;
|
out[n] = 0;
|
||||||
in[j] = 0;
|
in[j] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user