Add speed feature to disable splitmv
authorYunqing Wang <yunqingwang@google.com>
Sun, 30 Jun 2013 00:34:51 +0000 (17:34 -0700)
committerYunqing Wang <yunqingwang@google.com>
Tue, 2 Jul 2013 17:02:34 +0000 (10:02 -0700)
Added a speed feature in speed 1 to disable splitmv for HD (>=720)
clips. Test result on stdhd set: 0.3% psnr loss and 0.07% ssim
loss. Encoding speedup is 36%.

(For reference: The test result on derf set showed 2% psnr loss
and 1.6% ssim loss. Encoding speedup is 34%. SPLITMV should be
enabled for small resolution videos.)

Change-Id: I54f72b94f506c6d404b47c42e71acaa5374d6ee6

vp9/encoder/vp9_onyx_if.c
vp9/encoder/vp9_onyx_int.h

index 96207af..03d8ea3 100644 (file)
@@ -652,6 +652,15 @@ static void set_rd_speed_thresholds(VP9_COMP *cpi, int mode, int speed) {
     sf->thresh_mult[THR_COMP_NEWGA    ] = INT_MAX;
     sf->thresh_mult[THR_COMP_SPLITGA  ] = INT_MAX;
   }
+
+  if (sf->disable_splitmv == 1) {
+    sf->thresh_mult[THR_SPLITMV  ] = INT_MAX;
+    sf->thresh_mult[THR_SPLITG   ] = INT_MAX;
+    sf->thresh_mult[THR_SPLITA   ] = INT_MAX;
+
+    sf->thresh_mult[THR_COMP_SPLITLA  ] = INT_MAX;
+    sf->thresh_mult[THR_COMP_SPLITGA  ] = INT_MAX;
+  }
 }
 
 void vp9_set_speed_features(VP9_COMP *cpi) {
@@ -706,6 +715,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
   sf->greater_than_block_size = BLOCK_SIZE_SB8X8;
   sf->adjust_partitioning_from_last_frame = 0;
   sf->last_partitioning_redo_frequency = 4;
+  sf->disable_splitmv = 0;
 
 #if CONFIG_MULTIPLE_ARF
   // Switch segmentation off.
@@ -737,6 +747,9 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
         sf->use_largest_txform        = !(cpi->common.frame_type == KEY_FRAME ||
                                           cpi->common.intra_only ||
                                           cpi->common.show_frame == 0);
+
+        sf->disable_splitmv =
+            (MIN(cpi->common.width, cpi->common.height) >= 720)? 1 : 0;
       }
       if (speed == 2) {
         sf->use_largest_txform        = !(cpi->common.frame_type == KEY_FRAME ||
index 8dd088d..153abbb 100644 (file)
@@ -234,6 +234,7 @@ typedef struct {
   BLOCK_SIZE_TYPE less_than_block_size;
   int adjust_partitioning_from_last_frame;
   int last_partitioning_redo_frequency;
+  int disable_splitmv;
 } SPEED_FEATURES;
 
 enum BlockSize {