Skip scaled reference frame for motion vector projection
When the reference frame size differs from the current coding
frame, skip the use of its motion information for motion field
estimation.
BUG=aomedia:1194
Change-Id: I1a32395367228f4ac86a21099b6b7b2c25e60270
diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c
index 1c7a407..129b6e8 100644
--- a/av1/common/mvref_common.c
+++ b/av1/common/mvref_common.c
@@ -1455,6 +1455,10 @@
int ref_frame_idx = cm->frame_refs[FWD_RF_OFFSET(ref_frame)].idx;
if (ref_frame_idx < 0) return 0;
+ if (cm->buffer_pool->frame_bufs[ref_frame_idx].mi_rows != cm->mi_rows ||
+ cm->buffer_pool->frame_bufs[ref_frame_idx].mi_cols != cm->mi_cols)
+ return 0;
+
int ref_frame_index =
cm->buffer_pool->frame_bufs[ref_frame_idx].cur_frame_offset;
int cur_frame_index = cm->cur_frame->cur_frame_offset;