]> granicus.if.org Git - libvpx/commitdiff
vp9: Adjust intra check for short_circuit_flat_blocks
authorMarco Paniconi <marpan@google.com>
Thu, 31 Jan 2019 18:29:55 +0000 (10:29 -0800)
committerMarco Paniconi <marpan@google.com>
Thu, 31 Jan 2019 19:46:29 +0000 (11:46 -0800)
For non-rd pickmode: include H and V intra mode check for
spatially flat blocks when the sf->short_circuit_flat_blocks
speed feature is set.
Small improvement on screen content tests.

Change-Id: I3391d02cce6a46160be6ccc8a1e33fd8547eb467

vp9/encoder/vp9_pickmode.c

index 2d34100d7284ab1a13ab7030a07b2ba41e1a63e1..8cd1e6e31c67c98456eb0dbcc5dc1a1d10c78b91 100644 (file)
@@ -2452,8 +2452,11 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
       const PREDICTION_MODE this_mode = intra_mode_list[i];
       THR_MODES mode_index = mode_idx[INTRA_FRAME][mode_offset(this_mode)];
       int mode_rd_thresh = rd_threshes[mode_index];
+      // For spatially flat blocks, under short_circuit_flat_blocks flag:
+      // only check DC mode for stationary blocks, otherwise also check
+      // H and V mode.
       if (sf->short_circuit_flat_blocks && x->source_variance == 0 &&
-          this_mode != DC_PRED) {
+          ((x->zero_temp_sad_source && this_mode != DC_PRED) || i > 2)) {
         continue;
       }