]> granicus.if.org Git - libvpx/commitdiff
Chessboard pattern prediction filter type search in non-RD coding
authorJingning Han <jingning@google.com>
Wed, 23 Apr 2014 17:33:41 +0000 (10:33 -0700)
committerJingning Han <jingning@google.com>
Wed, 23 Apr 2014 17:41:07 +0000 (10:41 -0700)
This commit introduces a chessboard pattern search for the prediction
filter type search. It runs extensive search in alternate blocks and
allows the rest blocks to refer coding decisions of their nearby
neighbors.

For pedestrian 1080p at 4000 kbps, the runtime of speed -5 goes down
from 43990 ms to 42200 ms. The overall compression performance for
RTC set is changed by -1.37%.

Change-Id: Icfe220c49451cda796f0ca91d935c9ed01e56c9d

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

index 3d398edc91ef97233b54542cc45a6f15cdde9357..699e70784c57a744617c1efb13befe65dc0e0b7a 100644 (file)
@@ -238,6 +238,9 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
   // Mode index conversion form THR_MODES to MB_PREDICTION_MODE for a ref frame.
   int mode_idx[MB_MODE_COUNT] = {0};
   INTERP_FILTER filter_ref = SWITCHABLE;
+  int bsl = mi_width_log2_lookup[bsize];
+  int pred_filter_search = (((mi_row + mi_col) >> bsl) +
+                            cpi->sf.chessboard_index) & 0x01;
 
   x->skip_encode = cpi->sf.skip_encode_frame && x->q_index < QIDX_SKIP_THRESH;
 
@@ -338,6 +341,7 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
       // motion vector is at sub-pixel accuracy level for luma component, i.e.,
       // the last three bits are all zeros.
       if ((this_mode == NEWMV || filter_ref == SWITCHABLE) &&
+          pred_filter_search &&
           ((mbmi->mv[0].as_mv.row & 0x07) != 0 ||
            (mbmi->mv[0].as_mv.col & 0x07) != 0)) {
         int64_t tmp_rdcost1 = INT64_MAX;
index 86ab7dcad50cb0e6f05c47a8e0501f44b0a4caf7..96916c2e1876d9be99e3e78d5376d0eb973d69dc 100644 (file)
@@ -269,6 +269,7 @@ static void set_rt_speed_feature(VP9_COMMON *cm, SPEED_FEATURES *sf,
     sf->use_nonrd_pick_mode = 1;
     sf->search_method = FAST_DIAMOND;
     sf->allow_skip_recode = 0;
+    sf->chessboard_index = cm->current_video_frame & 0x01;
   }
 
   if (speed >= 6) {
index 55422979a4e73b0ef77565e0b6fab52fe30e4b39..cff99a6dc131dd24633e6f2f5c0c86d36308dfc2 100644 (file)
@@ -274,6 +274,9 @@ typedef struct {
   // encoding process for RTC.
   int partition_check;
 
+  // Chessboard pattern index
+  int chessboard_index;
+
   // Use finer quantizer in every other few frames that run variable block
   // partition type search.
   int force_frame_boost;