intrabc: consider mode cost in RD selection
Should take the overhead into consideration when intrabc is not
being used. Did not see much coding gain with this patch though.
Change-Id: Ie997c1a7284159252d5f663171957c044d3e0a03
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index d6ef343..258eb4a 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -4299,6 +4299,10 @@
}
}
#endif // CONFIG_EXT_INTRA
+#if CONFIG_INTRABC
+ if (bsize >= BLOCK_8X8 && cpi->common.allow_screen_content_tools)
+ this_rate += x->intrabc_cost[0];
+#endif // CONFIG_INTRABC
this_rd = RDCOST(x->rdmult, this_rate, this_distortion);
#if CONFIG_FILTER_INTRA
if (best_rd == INT64_MAX || this_rd - best_rd < (best_rd >> 4)) {