]> granicus.if.org Git - libvpx/commitdiff
vp9: Avoid early breakout on slide change
authorMarco Paniconi <marpan@google.com>
Thu, 26 Jul 2018 00:27:24 +0000 (17:27 -0700)
committerMarco Paniconi <marpan@google.com>
Thu, 26 Jul 2018 00:30:38 +0000 (17:30 -0700)
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

index 8a837a5ab5dae91449a4fec049b3cf586937f3a9..ebed5645d580f6c5b141174023211f0b538630d3 100644 (file)
@@ -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;
     }