Properly update the intra/inter selection in tpl model Select and retain the best modes between inter and intra to build tpl model. STATS_CHANGED Change-Id: I0166c72db5c6c04fe04926b27d8946ca88247c8f
diff --git a/av1/encoder/tpl_model.c b/av1/encoder/tpl_model.c index 5ddbb97..8e8cf45 100644 --- a/av1/encoder/tpl_model.c +++ b/av1/encoder/tpl_model.c
@@ -281,13 +281,14 @@ uint16_t eob; best_rf_idx = rf_idx; best_inter_cost_weighted = inter_cost_weighted; - best_mode = NEWMV; best_mv.as_int = x->best_mv.as_int; get_quantize_error(x, 0, coeff, qcoeff, dqcoeff, tx_size, &eob, recon_error, sse); int rate_cost = rate_estimator(qcoeff, eob, tx_size); best_rdcost = RDCOST(base_rdmult, rate_cost, *recon_error); tpl_stats->srcrf_rate = rate_cost << TPL_DEP_COST_SCALE_LOG2; + + if (best_inter_cost_weighted < best_intra_cost) best_mode = NEWMV; } } best_intra_cost = AOMMAX(best_intra_cost, 1);