]> granicus.if.org Git - libvpx/commitdiff
vp9: Non-rd pickmode: use simple block_yrd under some conditons.
authorMarco <marpan@google.com>
Fri, 17 Feb 2017 16:44:50 +0000 (08:44 -0800)
committerJerome Jiang <jianj@google.com>
Wed, 22 Feb 2017 21:22:53 +0000 (13:22 -0800)
For speed 8 only.
3% speed up for QVGA and 6.3% for VGA on Nexus 6.
~3% avgPSNR decrease on rtc_derf and 2.9% on rtc.

Disabled for now.

Change-Id: I70133f1f6c804d663d594df437bfe7fdb0030d6a

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

index b48ec9e24733d69c31076c92743825b6b6057f6a..08f3f3801e6642b675ebb1b153f4b30a20ae861a 100644 (file)
@@ -651,6 +651,17 @@ static void block_yrd(VP9_COMP *cpi, MACROBLOCK *x, RD_COST *this_rdc,
   }
 #endif
 
+  if (cpi->sf.use_simple_block_yrd && cpi->common.frame_type != KEY_FRAME &&
+      !cyclic_refresh_segment_id_boosted(xd->mi[0]->segment_id)) {
+    unsigned int var_y, sse_y;
+    (void)tx_size;
+    model_rd_for_sb_y(cpi, bsize, x, xd, &this_rdc->rate, &this_rdc->dist,
+                      &var_y, &sse_y);
+    *sse = INT_MAX;
+    *skippable = 0;
+    return;
+  }
+
   (void)cpi;
 
   // The max tx_size passed in is TX_16X16.
index d63f8db7d31cdf3c8283ed79932031cb0dcc5d8f..3d22fecc828a9170dd32b67f171a6c009c74ee8b 100644 (file)
@@ -313,6 +313,7 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf, int speed,
   sf->allow_acl = 0;
   sf->copy_partition_flag = 0;
   sf->use_source_sad = 0;
+  sf->use_simple_block_yrd = 0;
 
   if (speed >= 1) {
     sf->allow_txfm_domain_distortion = 1;
@@ -555,6 +556,7 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf, int speed,
       }
     }
     sf->limit_newmv_early_exit = 0;
+    sf->use_simple_block_yrd = 0;
   }
 }
 
index df93b14c8b2c523709750aba266573e802c216f9..a7cc778727355b4bae3f44460dd9409f77907cf3 100644 (file)
@@ -482,6 +482,8 @@ typedef struct SPEED_FEATURES {
   // Compute the source sad for every superblock of the frame,
   // prior to encoding the frame, to be used to bypass some encoder decisions.
   int use_source_sad;
+
+  int use_simple_block_yrd;
 } SPEED_FEATURES;
 
 struct VP9_COMP;