shithub: libvpx

Download patch

ref: d8b8d87eb77571abe5c7643f368b6deddec2c837
parent: 751d002f2fd45d2354d8d6419c940c12a6bf9a44
author: Jingning Han <jingning@google.com>
date: Tue Apr 1 11:52:38 EDT 2014

Make frame level quantization change a parameter

Parameterize the frame level quantization index used in non-RD
coding flow with cbr.

Change-Id: I79cfbd9c32c0d0fc33ad720d2180432e910baf7a

--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -986,7 +986,7 @@
     if (q == 0)
       q++;
     if (cpi->sf.force_ref_frame == 1)
-      q -= 15;
+      q -= cpi->sf.max_delta_qindex;
 
     if (q < *bottom_index)
       *bottom_index = q;
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -254,6 +254,7 @@
     sf->force_ref_frame =
         (cm->current_video_frame %
             (sf->last_partitioning_redo_frequency << 1) == 1);
+    sf->max_delta_qindex = 15;
     sf->partition_search_type = REFERENCE_PARTITION;
     sf->use_nonrd_pick_mode = 1;
     sf->search_method = FAST_DIAMOND;
@@ -307,6 +308,7 @@
   sf->disable_split_mask = 0;
   sf->mode_search_skip_flags = 0;
   sf->force_ref_frame = 0;
+  sf->max_delta_qindex = 0;
   sf->disable_split_var_thresh = 0;
   sf->disable_filter_search_var_thresh = 0;
   for (i = 0; i < TX_SIZES; i++) {
--- a/vp9/encoder/vp9_speed_features.h
+++ b/vp9/encoder/vp9_speed_features.h
@@ -256,6 +256,9 @@
   // partition type search.
   int force_ref_frame;
 
+  // Maximally allowed base quantization index fluctuation.
+  int max_delta_qindex;
+
   // Implements various heuristics to skip searching modes
   // The heuristics selected are based on  flags
   // defined in the MODE_SEARCH_SKIP_HEURISTICS enum