small optimization in av1_handle_inter_intra_mode()
When refining new motion vector for interintra modes, there is no need
to re-calculate the intra predictor.
Change-Id: Ifa5d13cc764e848509eca4bac0b5b2a7e5768847
diff --git a/av1/encoder/compound_type.c b/av1/encoder/compound_type.c
index fd0f61c..1469a10 100644
--- a/av1/encoder/compound_type.c
+++ b/av1/encoder/compound_type.c
@@ -714,8 +714,15 @@
mask, bw, &tmp_rate_mv, 0);
if (mbmi->mv[0].as_int != tmp_mv.as_int) {
mbmi->mv[0].as_int = tmp_mv.as_int;
+ // Set ref_frame[1] to NONE_FRAME temporarily so that the intra
+ // predictor is not calculated again in av1_enc_build_inter_predictor().
+ mbmi->ref_frame[1] = NONE_FRAME;
av1_enc_build_inter_predictor(cm, xd, mi_row, mi_col, orig_dst, bsize,
AOM_PLANE_Y, AOM_PLANE_Y);
+ mbmi->ref_frame[1] = INTRA_FRAME;
+ av1_combine_interintra(xd, bsize, 0, xd->plane[AOM_PLANE_Y].dst.buf,
+ xd->plane[AOM_PLANE_Y].dst.stride, intrapred,
+ bw);
model_rd_sb_fn[MODELRD_TYPE_MASKED_COMPOUND](
cpi, bsize, x, xd, 0, 0, &rate_sum, &dist_sum, &skip_txfm_sb,
&skip_sse_sb, NULL, NULL, NULL);