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
This commit is contained in:
Yaowu Xu 2010-08-10 21:12:04 -07:00
parent 8fa38096a3
commit 3b95a46c55

View File

@ -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,