Commit e0b71511 authored by David Barker's avatar David Barker Committed by Yue Chen
Browse files

Fix compile error for global-motion without ref-mv

The reference frame handling in av1_find_mv_refs introduced
in https://aomedia-review.googlesource.com/c/6067/ broke the
compile when global-motion is enabled but ref-mv is not.
This patch adds the missing logic, allowing this case to compile
again.

Change-Id: I914887eb56d28a700b2917d086447bdbb314f35d
parent a7ed143a
......@@ -874,10 +874,10 @@ void av1_find_mv_refs(const AV1_COMMON *cm, const MACROBLOCKD *xd,
int_mv zeromv[2];
#if CONFIG_REF_MV
int idx, all_zero = 1;
#endif
#if CONFIG_GLOBAL_MOTION
MV_REFERENCE_FRAME rf[2];
#endif
#endif
#if CONFIG_EXT_INTER
av1_update_mv_context(xd, mi, ref_frame, mv_ref_list, -1, mi_row, mi_col,
#if CONFIG_REF_MV
......@@ -888,6 +888,7 @@ void av1_find_mv_refs(const AV1_COMMON *cm, const MACROBLOCKD *xd,
#endif // CONFIG_EXT_INTER
#if CONFIG_GLOBAL_MOTION
#if CONFIG_REF_MV
av1_set_ref_frame(rf, ref_frame);
zeromv[0].as_int = gm_get_motion_vector(&cm->global_motion[rf[0]],
cm->allow_high_precision_mv)
......@@ -897,9 +898,15 @@ void av1_find_mv_refs(const AV1_COMMON *cm, const MACROBLOCKD *xd,
cm->allow_high_precision_mv)
.as_int
: 0;
#else
zeromv[0].as_int = gm_get_motion_vector(&cm->global_motion[ref_frame],
cm->allow_high_precision_mv)
.as_int;
zeromv[1].as_int = 0;
#endif // CONFIG_REF_MV
#else
zeromv[0].as_int = zeromv[1].as_int = 0;
#endif
#endif // CONFIG_GLOBAL_MOTION
#if CONFIG_REF_MV
if (ref_frame <= ALTREF_FRAME)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment