From 23fc20e363f883a15ca0824d16fae0164e0d5f77 Mon Sep 17 00:00:00 2001 From: Marco Paniconi Date: Wed, 25 Jul 2018 17:27:24 -0700 Subject: [PATCH] vp9: Avoid early breakout on slide change For real-time screen content: don't allow early breakout in nonrd-pickmode on slide change. Avoid artifacts. Change-Id: I09c6927a5d85b46ce059ea5954a3719a7362fb99 --- vp9/encoder/vp9_pickmode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index 8a837a5ab..ebed5645d 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -2244,7 +2244,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data, // Skipping checking: test to see if this block can be reconstructed by // prediction only. - if (cpi->allow_encode_breakout && !xd->lossless) { + if (cpi->allow_encode_breakout && !xd->lossless && !scene_change_detected) { encode_breakout_test(cpi, x, bsize, mi_row, mi_col, ref_frame, this_mode, var_y, sse_y, yv12_mb, &this_rdc.rate, &this_rdc.dist, flag_preduv_computed); @@ -2291,7 +2291,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data, // If early termination flag is 1 and at least 2 modes are checked, // the mode search is terminated. - if (best_early_term && idx > 0) { + if (best_early_term && idx > 0 && !scene_change_detected) { x->skip = 1; break; } -- 2.40.0