From 0f9760ab6f2cfbf7802ae5de305b7b94da7a8f02 Mon Sep 17 00:00:00 2001 From: Marco Date: Fri, 13 Jan 2017 15:13:36 -0800 Subject: [PATCH] vp9: Modify usage of force_skip under low temporal variance in non-rd pickmode. For short_circuit set to level 1, skip newmv for 64x64 blocks if the low temporal variance flag is set. Also modify threshold for 64x64 split in variance partitioning. Overall speed-up on noisy clips of 2-4%. Only affect speed >= 7. Change-Id: I384b3772007e84de6f8707e480d2ddf1fe1f907d --- vp9/encoder/vp9_encodeframe.c | 2 +- vp9/encoder/vp9_pickmode.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 73d277313..1247c6d41 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -1193,7 +1193,7 @@ static int choose_partitioning(VP9_COMP *cpi, const TileInfo *const tile, // variance over the sub-32x32 blocks, then force this block to split. // Only checking this for noise level >= medium for now. if (!is_key_frame && noise_level >= kMedium && - vt.part_variances.none.variance > (5 * avg_32x32) >> 4) + vt.part_variances.none.variance > (9 * avg_32x32) >> 5) force_split[0] = 1; // Else if the maximum 32x32 variance minus the miniumum 32x32 variance in // a 64x64 block is greater than threshold and the maximum 32x32 variance is diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index 041d2a59d..d5cace001 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -1577,8 +1577,10 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data, continue; } - if (cpi->sf.short_circuit_low_temp_var >= 2 && force_skip_low_temp_var && - ref_frame == LAST_FRAME && this_mode == NEWMV) { + if ((cpi->sf.short_circuit_low_temp_var >= 2 || + (cpi->sf.short_circuit_low_temp_var == 1 && bsize == BLOCK_64X64)) && + force_skip_low_temp_var && ref_frame == LAST_FRAME && + this_mode == NEWMV) { continue; } -- 2.40.0