ref: de302686b2b3f6bc2e1b0a1e43dd99bb97f5377a
parent: 2c45cd174a9582909ee2a7ba9cdb3feb917840cf
parent: 81cd335bb85164db0e4021bf4cf9198fd79d0990
author: Jingning Han <jingning@google.com>
date: Tue Jul 17 14:10:28 EDT 2018
Merge "Fix 32-bit build for tpl model"
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -3633,8 +3633,6 @@
if (cpi->common.show_frame) return orig_rdmult;
- r0 = cpi->rd.r0;
-
for (row = mi_row; row < mi_row + mi_high; ++row) {
for (col = mi_col; col < mi_col + mi_wide; ++col) {
TplDepStats *this_stats = &tpl_stats[row * tpl_stride + col];
@@ -3648,6 +3646,9 @@
}
}
+ vpx_clear_system_state();
+
+ r0 = cpi->rd.r0;
rk = (double)intra_cost / mc_dep_cost;
beta = r0 / rk;
dr = vp9_get_adaptive_rdmult(cpi, beta);
@@ -3656,6 +3657,7 @@
dr = VPXMAX(dr, orig_rdmult * 1 / 2);
dr = VPXMAX(1, dr);
+
return dr;
}
@@ -5476,6 +5478,8 @@
mc_dep_cost_base += this_stats->mc_dep_cost;
}
}
+
+ vpx_clear_system_state();
if (tpl_frame->is_valid)
cpi->rd.r0 = (double)intra_cost_base / mc_dep_cost_base;