From: Yaowu Xu Date: Wed, 11 Aug 2010 04:12:04 +0000 (-0700) Subject: Normalize quantizer's zero bin and rounding factors X-Git-Tag: 1.0_branch~947 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b95a46c5538ad4c5b765923d61d8d1b12a4569a;p=profile%2Fivi%2Flibvpx.git Normalize quantizer's zero bin and rounding factors This patch changes a few numbers in the two constant arrays for quantizer's zerobin and rounding factors, in general to make the sum of the two factors for any Q to be 128. While it might be beneficial to calibrate the two arrays for best quantizer performance, it is not the purpose of this patch. Normalizing the two arrays will enable quick optimization of the current faster quantizer, i.e .zerobin check can be removed. Change-Id: If9abfd7929bf4b8e9ecd64a79d817c6728c820bd --- diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c index 4e4483e..905ef88 100644 --- a/vp8/encoder/encodeframe.c +++ b/vp8/encoder/encodeframe.c @@ -60,10 +60,9 @@ unsigned int uv_modes[4] = {0, 0, 0, 0}; unsigned int b_modes[14] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; #endif -// The first four entries are dummy values static const int qrounding_factors[129] = { - 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 48, 48, 56, 56, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, @@ -84,7 +83,7 @@ static const int qrounding_factors[129] = static const int qzbin_factors[129] = { - 64, 64, 64, 64, 80, 80, 80, 80, + 72, 72, 72, 72, 80, 80, 72, 72, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,