[NORMATIVE] Fix ref_frame_side setup
Patch 1609b94f disabled the ref_frame_side setup code when in
error-resilient mode, as at that point we did not explicitly
signal order hints, and so could not determine the correct value
of ref_frame_side for any dropped frames.
However, we now explicitly send the order hints for each reference
of an error-resilient frame, so this is no longer an issue.
Further, we *must* set up ref_frame_side properly, since it is used to
decide where we store the motion vectors for use by future frames.
These future frames are allowed to have error_resilient_mode == 0,
and so are allowed to use MFMV. Skipping this setup for error-resilient
frames will lead to those later frames getting bad motion vector
predictions.
Note: We can keep the code which disables ref_frame_side setup when
!use_order_hint. That is purely an optimization - when !use_order_hint,
MFMV is disabled at a sequence level and so we won't use ref_frame_side
anyway.
BUG=aomedia:1634
Change-Id: I09b4993e95ee1e1d627f90856a14f6138a9d39ad
diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c
index f9f95f6..a99b09c 100644
--- a/av1/common/mvref_common.c
+++ b/av1/common/mvref_common.c
@@ -1205,7 +1205,7 @@
void av1_setup_motion_field(AV1_COMMON *cm) {
memset(cm->ref_frame_side, 0, sizeof(cm->ref_frame_side));
- if (!cm->seq_params.enable_order_hint || cm->error_resilient_mode) return;
+ if (!cm->seq_params.enable_order_hint) return;
TPL_MV_REF *tpl_mvs_base = cm->tpl_mvs;
int size = ((cm->mi_rows + MAX_MIB_SIZE) >> 1) * (cm->mi_stride >> 1);