vp9-rtc: Speed feature changes for speed 9.
authorMarco Paniconi <marpan@google.com>
Fri, 29 Mar 2019 22:18:14 +0000 (15:18 -0700)
committerMarco Paniconi <marpan@google.com>
Tue, 2 Apr 2019 16:13:23 +0000 (09:13 -0700)
Add threshold multipler for variance partitioning
as speed feature, and increase it by 2x for speed >= 9
for resoln >= VGA. Also only allow simple_interpol
filter when avg_low_motion is below threshold.

Better tradeoff of speed/quality comparing to speed 8.

Change-Id: I6bd29ad3cced470b32d04f60771120531112a5d9

vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_speed_features.c
vp9/encoder/vp9_speed_features.h

index db59b6b..933cd3c 100644 (file)
@@ -555,7 +555,8 @@ static void set_vbp_thresholds(VP9_COMP *cpi, int64_t thresholds[], int q,
                                int content_state) {
   VP9_COMMON *const cm = &cpi->common;
   const int is_key_frame = frame_is_intra_only(cm);
-  const int threshold_multiplier = is_key_frame ? 20 : 1;
+  const int threshold_multiplier =
+      is_key_frame ? 20 : cpi->sf.variance_part_thresh_mult;
   int64_t threshold_base =
       (int64_t)(threshold_multiplier * cpi->y_dequant[q][1]);
 
index 55bd106..0a04340 100644 (file)
@@ -451,6 +451,7 @@ static void set_rt_speed_feature_framesize_independent(
   sf->enhanced_full_pixel_motion_search = 0;
   sf->use_accurate_subpel_search = USE_2_TAPS;
   sf->nonrd_use_ml_partition = 0;
+  sf->variance_part_thresh_mult = 1;
 
   if (speed >= 1) {
     sf->allow_txfm_domain_distortion = 1;
@@ -760,7 +761,8 @@ static void set_rt_speed_feature_framesize_independent(
       sf->disable_16x16part_nonkey = 1;
     // Allow for disabling GOLDEN reference, for CBR mode.
     if (cpi->oxcf.rc_mode == VPX_CBR) sf->disable_golden_ref = 1;
-    sf->default_interp_filter = BILINEAR;
+    if (cpi->rc.avg_frame_low_motion < 70) sf->default_interp_filter = BILINEAR;
+    if (cm->width * cm->height >= 640 * 360) sf->variance_part_thresh_mult = 2;
   }
 
   if (sf->nonrd_use_ml_partition)
index 22c1c3f..b1d5c8d 100644 (file)
@@ -605,6 +605,9 @@ typedef struct SPEED_FEATURES {
 
   // Use machine learning based partition search.
   int nonrd_use_ml_partition;
+
+  // Multiplier for base thresold for variance partitioning.
+  int variance_part_thresh_mult;
 } SPEED_FEATURES;
 
 struct VP9_COMP;