Refactor build_prediction_by_left_pred Reduce data dependency in OBMC prediction. Change-Id: I862184366972b8c1323832df4c72818dc84204b8
diff --git a/av1/encoder/reconinter_enc.c b/av1/encoder/reconinter_enc.c index 545d30b..e1d5eb8 100644 --- a/av1/encoder/reconinter_enc.c +++ b/av1/encoder/reconinter_enc.c
@@ -416,6 +416,8 @@ mi_y = left_mi_row << MI_SIZE_LOG2; const BLOCK_SIZE bsize = xd->mi[0]->sb_type; + InterPredParams inter_pred_params; + for (int j = 0; j < num_planes; ++j) { const struct macroblockd_plane *pd = &xd->plane[j]; int bw = clamp(block_size_wide[bsize] >> (pd->subsampling_x + 1), 4, @@ -423,8 +425,19 @@ int bh = (left_mi_height << MI_SIZE_LOG2) >> pd->subsampling_y; if (av1_skip_u4x4_pred_in_obmc(bsize, pd, 1)) continue; - build_inter_predictors(ctxt->cm, xd, j, &backup_mbmi, 1, bw, bh, mi_x, - mi_y); + + const struct buf_2d *const pre_buf = &pd->pre[0]; + const MV mv = backup_mbmi.mv[0].as_mv; + + av1_init_inter_params(&inter_pred_params, bw, bh, mi_y, mi_x, + pd->subsampling_x, pd->subsampling_y, xd->bd, + is_cur_buf_hbd(xd), 0, xd->block_ref_scale_factors[0], + pre_buf, backup_mbmi.interp_filters); + inter_pred_params.conv_params = get_conv_params(0, 0, xd->bd); + + av1_build_inter_predictor(pre_buf->buf, pre_buf->stride, pd->dst.buf, + pd->dst.stride, &mv, mi_x, mi_y, + &inter_pred_params); } }