shithub: libvpx

Download patch

ref: 9bac509ac505910a316bf3879ab57a2283920057
parent: 54f090b11990e19272237a1e9eed95e6cfce4504
author: Paul Wilkins <paulwilkins@google.com>
date: Mon Nov 21 09:18:11 EST 2011

Extended Q range Experiment.

Corrected dc lookup table to maintain ac/dc balance
close to what it was previously.

Firstpass not being passed the adjusted Q index for
the extended range.

Change-Id: Ic0200dabda445fea03bf81067999cb2670e99b77

--- a/vp8/common/quant_common.c
+++ b/vp8/common/quant_common.c
@@ -15,19 +15,19 @@
 #if !CONFIG_EXTEND_QRANGE
 static const int dc_qlookup[QINDEX_RANGE] =
 {
-    4,    5,    6,    7,    8,    9,   10,   10,   11,   12,   13,   14,   15,   16,   17,   17,
+    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,
+    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 const int ac_qlookup[QINDEX_RANGE] =
 {
-    4,    5,    6,    7,    8,    9,   10,   11,   12,   13,   14,   15,   16,   17,   18,   19,
+    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,
@@ -37,19 +37,18 @@
     213,  217,  221,  225,  229,  234,  239,  245,  249,  254,  259,  264,  269,  274,  279,  284,
 };
 #else
-
 static const int dc_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,   30,   32,   34,   36,   38,   40,   42,
-    44,   46,   49,   52,   55,   58,   61,   64,   67,   70,   73,   76,   79,   82,   85,   88,
-    92,    96,  100,  104,  108,  112,  116,  120,  124,  128,  132,  136,  140,  144,  148,  152,
-    156,  160,  164,  168,  172,  176,  180,  184,  188,  192,  196,  200,  205,  210,  215,  220,
-    225,  230,  235,  240,  245,  250,  255,  260,  265,  270,  275,  280,  285,  290,  295,  300,
-    310,  320,  330,  340,  350,  360,  370,  380,  390,  400,  410,  420,  430,  440,  450,  460,
-    472,  484,  496,  508,  520,  532,  544,  556,  572,  588,  608,  628,  648,  668,  692,  720,
-};
+      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,
+     50,   53,   56,   59,   62,   65,   68,   68,   72,   76,   80,   80,   84,   84,   86,   90,
+     91,   96,   98,  102,  107,  112,  118,  124,  130,  136,  142,  148,  150,  156,  162,  168,
+    174,  180,  182,  188,  196,  200,  204,  208,  212,  216,  220,  224,  228,  232,  236,  240,
+    244,  249,  255,  260,  264,  269,  276,  281,  288,  293,  300,  303,  307,  312,  317,  323,
+    328,  331,  338,  344,  347,  354,  366,  378,  386,  398,  401,  411,  422,  432,  441,  451,
+    464,  483,  496,  507,  520,  529,  540,  551,  570,  585,  604,  624,  645,  667,  692,  718,
 
+};
 static const int ac_qlookup[QINDEX_RANGE] =
 {
     4,    5,    6,    7,    8,    9,    10,   11,   12,   13,   14,   15,   16,   17,   18,   19,
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -3337,7 +3337,7 @@
     (void) size;
     (void) dest;
     (void) frame_flags;
-    vp8_set_quantizer(cpi, 26);
+    vp8_set_quantizer(cpi, FIRSTPASS_QINDEX);
 
     scale_and_extend_source(cpi->un_scaled_source, cpi);
     vp8_first_pass(cpi);