From 3b95a46c5538ad4c5b765923d61d8d1b12a4569a Mon Sep 17 00:00:00 2001 From: Yaowu Xu <yaowu@google.com> Date: Tue, 10 Aug 2010 21:12:04 -0700 Subject: [PATCH] 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 --- vp8/encoder/encodeframe.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c index 4e4483edb9..905ef88589 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, -- GitLab