From b97a4003c03bfe08afeeb7ba11c67a1b16fbaed8 Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Sun, 27 Feb 2011 10:46:28 -0800 Subject: [PATCH] simplify QuantizeBlock code a bit Change-Id: I1130859756fa88e88957781f60a3701be354e2a3 --- src/enc/quant.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/enc/quant.c b/src/enc/quant.c index 59364a27..f3b99a08 100644 --- a/src/enc/quant.c +++ b/src/enc/quant.c @@ -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;