shithub: libvpx

Download patch

ref: 3756a3b65877be82fe497539f42bb2c11ddb373d
parent: 98fc585cba5f058a9c746e987df3689ae531a0e3
parent: 181aa3d7fd6687f7b80d3a3e83239d11332a2347
author: Jingning Han <jingning@google.com>
date: Tue Dec 18 12:46:05 EST 2018

Merge "Localize x->encode_breakout setup to non-rd mode search"

--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -240,11 +240,8 @@
       mi->segment_id = get_segment_id(cm, map, bsize, mi_row, mi_col);
     }
     vp9_init_plane_quantizers(cpi, x);
-
-    x->encode_breakout = cpi->segment_encode_breakout[mi->segment_id];
   } else {
     mi->segment_id = 0;
-    x->encode_breakout = cpi->encode_breakout;
   }
 
   // required by vp9_append_sub8x8_mvs_for_idx() and vp9_find_best_ref_mvs()
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -898,6 +898,7 @@
   // Skipping threshold for dc.
   unsigned int thresh_dc;
   int motion_low = 1;
+
   if (cpi->use_svc && ref_frame == GOLDEN_FRAME) return;
   if (mi->mv[0].as_mv.row > 64 || mi->mv[0].as_mv.row < -64 ||
       mi->mv[0].as_mv.col > 64 || mi->mv[0].as_mv.col < -64)
@@ -1702,6 +1703,10 @@
       (cpi->use_svc && cpi->svc.high_source_sad_superframe);
 
   init_best_pickmode(&best_pickmode);
+
+  x->encode_breakout = seg->enabled
+                           ? cpi->segment_encode_breakout[mi->segment_id]
+                           : cpi->encode_breakout;
 
   x->source_variance = UINT_MAX;
   if (cpi->sf.default_interp_filter == BILINEAR) {