]> granicus.if.org Git - libvpx/commitdiff
vp9: Use more aggressive skip when short_circuit_low_temp_var = 1.
authorMarco <marpan@google.com>
Tue, 22 Nov 2016 18:10:06 +0000 (10:10 -0800)
committerMarco <marpan@google.com>
Tue, 22 Nov 2016 22:54:28 +0000 (14:54 -0800)
Use the same feature as https://chromium-review.googlesource.com/#/c/411327/,
but allow it to be used for speed  = 6 and 7, where
short_circuit_low_temp_var = 1.

Speed up of ~2-3% for speed 7, with little/no loss in compression.

Change-Id: I263a0f261ad9929034392d68f0153dc6376fdb5f

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

index 7e872741156b1368c13983519de3bcaccb5b6314..ac1fd8f6d546ebb174951b2352bebdf978a1b02f 100644 (file)
@@ -742,7 +742,8 @@ static void set_low_temp_var_flag(VP9_COMP *cpi, MACROBLOCK *x, MACROBLOCKD *xd,
           continue;
 
         if ((*this_mi)->sb_type == BLOCK_32X32) {
-          int64_t threshold_32x32 = cpi->sf.short_circuit_low_temp_var == 3
+          int64_t threshold_32x32 = (cpi->sf.short_circuit_low_temp_var == 1 ||
+                                     cpi->sf.short_circuit_low_temp_var == 3)
                                         ? ((3 * thresholds[1]) >> 2)
                                         : (thresholds[1] >> 1);
           if (vt->split[i].part_variances.none.variance < threshold_32x32)
index 8b84c3825e7fd4730f66b40073592356b6070c77..be8c5732fb58b1194d32c33e629e02ec496893d8 100644 (file)
@@ -1490,8 +1490,11 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
   if (cpi->sf.short_circuit_low_temp_var) {
     force_skip_low_temp_var =
         get_force_skip_low_temp_var(&x->variance_low[0], mi_row, mi_col, bsize);
-    // In the most aggresive short circuit, skip golden in any mode
-    if (cpi->sf.short_circuit_low_temp_var == 3 && force_skip_low_temp_var) {
+    // If force_skip_low_temp_var is set, and for short circuit mode = 1 and 3,
+    // skip golden reference.
+    if ((cpi->sf.short_circuit_low_temp_var == 1 ||
+         cpi->sf.short_circuit_low_temp_var == 3) &&
+        force_skip_low_temp_var) {
       usable_ref_frame = LAST_FRAME;
     }
   }
index b63ca6cbb6395a277a5739b5492ba1d63d51f31e..a306f7aeaf0d5eb2074155205ce9d804ef47997b 100644 (file)
@@ -457,11 +457,11 @@ typedef struct SPEED_FEATURES {
 
   // Skip a number of expensive mode evaluations for blocks with very low
   // temporal variance.
-  // 1: Skip golden non-zeromv and ALL INTRA for bsize >= 32x32.
+  // 1: Skip all golden modes and ALL INTRA for bsize >= 32x32.
   // 2: Skip golden non-zeromv and newmv-last for bsize >= 16x16, skip ALL
   // INTRA for bsize >= 32x32 and vert/horz INTRA for bsize 16x16, 16x32 and
   // 32x16.
-  // 3: Same as (2), also skip golden in any mode for low res
+  // 3: Same as (2), but also skip golden zeromv for low res.
   int short_circuit_low_temp_var;
 
   // Limits the rd-threshold update for early exit for the newmv-last mode,