shithub: libvpx

Download patch

ref: 23fc20e363f883a15ca0824d16fae0164e0d5f77
parent: a365f3fc2b73b185bb1ad04c172472763efb027a
author: Marco Paniconi <marpan@google.com>
date: Wed Jul 25 13:27:24 EDT 2018

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

--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -2244,7 +2244,7 @@
 
     // 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 @@
 
     // 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;
     }