]> granicus.if.org Git - libvpx/commitdiff
Disable adaptive pred filter for non-split mode
authorYunqing Wang <yunqingwang@google.com>
Mon, 24 Feb 2014 22:05:06 +0000 (14:05 -0800)
committerYunqing Wang <yunqingwang@google.com>
Mon, 24 Feb 2014 22:05:06 +0000 (14:05 -0800)
If sf->disable_split_mask is DISABLE_ALL_SPLIT, disable
sf->adaptive_pred_interp_filter to avoid unnecessary operations.

Change-Id: Icb59174b2f4e9a3c3c16a696deb8018e5bd999eb

vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_onyx_if.c

index 400a047167bf281aadd4f98eb5e876df361bca11..871e10db1093c1f24529e0b1e80ebb2ba9356029 100644 (file)
@@ -1935,14 +1935,17 @@ static void encode_sb_row(VP9_COMP *cpi, const TileInfo *const tile,
 
     BLOCK_SIZE i;
     MACROBLOCK *x = &cpi->mb;
-    for (i = BLOCK_4X4; i < BLOCK_8X8; ++i) {
-      const int num_4x4_w = num_4x4_blocks_wide_lookup[i];
-      const int num_4x4_h = num_4x4_blocks_high_lookup[i];
-      const int num_4x4_blk = MAX(4, num_4x4_w * num_4x4_h);
-      for (x->sb_index = 0; x->sb_index < 4; ++x->sb_index)
-        for (x->mb_index = 0; x->mb_index < 4; ++x->mb_index)
-          for (x->b_index = 0; x->b_index < 16 / num_4x4_blk; ++x->b_index)
-            get_block_context(x, i)->pred_interp_filter = SWITCHABLE;
+
+    if (cpi->sf.adaptive_pred_interp_filter) {
+      for (i = BLOCK_4X4; i < BLOCK_8X8; ++i) {
+        const int num_4x4_w = num_4x4_blocks_wide_lookup[i];
+        const int num_4x4_h = num_4x4_blocks_high_lookup[i];
+        const int num_4x4_blk = MAX(4, num_4x4_w * num_4x4_h);
+        for (x->sb_index = 0; x->sb_index < 4; ++x->sb_index)
+          for (x->mb_index = 0; x->mb_index < 4; ++x->mb_index)
+            for (x->b_index = 0; x->b_index < 16 / num_4x4_blk; ++x->b_index)
+              get_block_context(x, i)->pred_interp_filter = SWITCHABLE;
+      }
     }
 
     vp9_zero(cpi->mb.pred_mv);
index dd170143d25b89fb2d7a54ef2189e8378c881884..9d3acfcc4baaa7777dba3dff9ca79e187b5867ba 100644 (file)
@@ -972,6 +972,9 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
   if (cpi->encode_breakout && cpi->oxcf.mode == MODE_REALTIME &&
       sf->encode_breakout_thresh > cpi->encode_breakout)
     cpi->encode_breakout = sf->encode_breakout_thresh;
+
+  if (sf->disable_split_mask == DISABLE_ALL_SPLIT)
+    sf->adaptive_pred_interp_filter = 0;
 }
 
 static void alloc_raw_frame_buffers(VP9_COMP *cpi) {