ref: 181aa3d7fd6687f7b80d3a3e83239d11332a2347
parent: 7ec4a4b3eb3b9927ea84e8d3710bfb450cdf5931
author: Jingning Han <jingning@google.com>
date: Mon Dec 17 11:49:09 EST 2018
Localize x->encode_breakout setup to non-rd mode search The breakout speed feature is currently only used by the non-rd mode search path. Localize it to simplify set_offset() logic. Change-Id: I27e7519c987a7caac2e4bd6be0ede1b9c8320e55
--- 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) {