]> granicus.if.org Git - libvpx/commitdiff
Make frame level quantization change a parameter
authorJingning Han <jingning@google.com>
Tue, 1 Apr 2014 22:52:38 +0000 (15:52 -0700)
committerJingning Han <jingning@google.com>
Wed, 2 Apr 2014 16:51:22 +0000 (09:51 -0700)
Parameterize the frame level quantization index used in non-RD
coding flow with cbr.

Change-Id: I79cfbd9c32c0d0fc33ad720d2180432e910baf7a

vp9/encoder/vp9_ratectrl.c
vp9/encoder/vp9_speed_features.c
vp9/encoder/vp9_speed_features.h

index e39c18cd6f3eb0c511cc657332e00a30d3ec0471..768f3682f0ea6f0c64cb09f21c628bd925839831 100644 (file)
@@ -986,7 +986,7 @@ int vp9_rc_pick_q_and_bounds(const VP9_COMP *cpi,
     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;
index 6a5c4e998333182dda0056b087aa5e9b4c5a7c21..3629f76ce94df18e362ea4451657c5414293937b 100644 (file)
@@ -254,6 +254,7 @@ static void set_rt_speed_feature(VP9_COMMON *cm,
     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 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
   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++) {
index 78bf40f45cad1745f8856ee0fe52948e271fe9b3..ed0eb3d4662e5ca3da7a3f05072f28521ae48471 100644 (file)
@@ -256,6 +256,9 @@ typedef struct {
   // 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