From 02f35e7e57b520136484e9198f6370addbb1ace8 Mon Sep 17 00:00:00 2001 From: Marco Paniconi Date: Thu, 31 Jan 2019 10:29:55 -0800 Subject: [PATCH] vp9: Adjust intra check for short_circuit_flat_blocks 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index 2d34100d7..8cd1e6e31 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -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; } -- 2.40.0