shithub: libvpx

Download patch

ref: 7748d833e8dc61c6169529dc105aacea006ee455
parent: ebcc6605c1bd224fcb26494d74a1db81e981f3ab
author: Paul Wilkins <paulwilkins@google.com>
date: Thu Dec 8 09:46:27 EST 2011

Experiment with old Q range:

Experiment with old Q range but new higher precision quantizer
and transform code.

Change-Id: Id1ff4cb433e5775d709d0133e2aec0322975c292

--- a/vp8/common/quant_common.c
+++ b/vp8/common/quant_common.c
@@ -37,7 +37,7 @@
     213,  217,  221,  225,  229,  234,  239,  245,  249,  254,  259,  264,  269,  274,  279,  284,
 };
 #else
-static int dc_qlookup[QINDEX_RANGE] =
+/*static int dc_qlookup[QINDEX_RANGE] =
 {
       4,    5,    6,    7,    8,    9,   10,   11,   12,   13,   14,   15,   16,   17,   18,   19,
      20,   22,   24,   26,   28,   30,   32,   34,   36,   38,   40,   38,   40,   42,   44,   47,
@@ -59,7 +59,31 @@
     330,  340,  350,  360,  370,  380,  392,  404,  416,  428,  440,  454,  468,  482,  496,  510,
     524,  540,  556,  572,  588,  604,  622,  640,  658,  676,  696,  716,  736,  756,  776,  796,
     820,  844,  868,  892,  916,  944,  972,  1000, 1032, 1064, 1096, 1128, 1168, 1208, 1252, 1300
+};*/
+
+static int dc_qlookup[QINDEX_RANGE] =
+{
+    4,    5,    6,    7,    8,    9,    10,   10,   11,   12,   13,   14,   15,   16,   17,   17,
+    18,   19,   20,   20,   21,   21,   22,   22,   23,   23,   24,   25,   25,   26,   27,   28,
+    29,   30,   31,   32,   33,   34,   35,   36,   37,   37,   38,   39,   40,   41,   42,   43,
+    44,   45,   46,   46,   47,   48,   49,   50,   51,   52,   53,   54,   55,   56,   57,   58,
+    59,   60,   61,   62,   63,   64,   65,   66,   67,   68,   69,   70,   71,   72,   73,   74,
+    75,   76,   76,   77,   78,   79,   80,   81,   82,   83,   84,   85,   86,   87,   88,   89,
+    91,   93,   95,   96,   98,   100,  101,  102,  104,  106,  108,  110,  112,  114,  116,  118,
+    122,  124,  126,  128,  130,  132,  134,  136,  138,  140,  143,  145,  148,  151,  154,  157,
 };
+
+static int ac_qlookup[QINDEX_RANGE] =
+{
+    4,    5,    6,    7,    8,    9,    10,   11,   12,   13,   14,   15,   16,   17,   18,   19,
+    20,   21,   22,   23,   24,   25,   26,   27,   28,   29,   30,   31,   32,   33,   34,   35,
+    36,   37,   38,   39,   40,   41,   42,   43,   44,   45,   46,   47,   48,   49,   50,   51,
+    52,   53,   54,   55,   56,   57,   58,   60,   62,   64,   66,   68,   70,   72,   74,   76,
+    78,   80,   82,   84,   86,   88,   90,   92,   94,   96,   98,  100,  102,  104,  106,  108,
+    110,  112,  114,  116,  119,  122,  125,  128,  131,  134,  137,  140,  143,  146,  149,  152,
+    155,  158,  161,  164,  167,  170,  173,  177,  181,  185,  189,  193,  197,  201,  205,  209,
+    213,  217,  221,  225,  229,  234,  239,  245,  249,  254,  259,  264,  269,  274,  279,  284,
+};
 #endif
 
 #if CONFIG_EXTEND_QRANGE
@@ -71,6 +95,12 @@
     int last_val = 4;
     int ac_val;
     int dc_max;
+
+    for ( i = 0; i < QINDEX_RANGE; i++ )
+    {
+        ac_qlookup[i] = ac_qlookup[i] << 2;
+        dc_qlookup[i] = dc_qlookup[i] << 2;
+    }
 
     // Not active by default for now.
     return;