Lower the reference rdcost in wedge mode search
Use the lowest known rdcost as the reference rdcost for wedge mode
search.
Change-Id: Ica0f9cedc8fce3aef56df0f688db5bef9154857a
diff --git a/av1/encoder/compound_type.c b/av1/encoder/compound_type.c
index b45fcff..b6e268a 100644
--- a/av1/encoder/compound_type.c
+++ b/av1/encoder/compound_type.c
@@ -1386,8 +1386,8 @@
}
RD_STATS est_rd_stats;
- int64_t this_rd_cur =
- estimate_yrd_for_sb(cpi, bsize, x, best_rd_cur, &est_rd_stats);
+ int64_t this_rd_cur = estimate_yrd_for_sb(
+ cpi, bsize, x, AOMMIN(best_rd_cur, ref_best_rd), &est_rd_stats);
if (this_rd_cur < INT64_MAX) {
this_rd_cur =
RDCOST(x->rdmult, rs2 + tmp_rate_mv + est_rd_stats.rate,