Minor cleanup in av1_setup_motion_field.
1. Remove an unnecessary void cast on the 'dir' parameter in
motion_field_projection(). The function uses the 'dir' parameter.
2. Remove an unnecessary null pointer check for
ref_buf[LAST2_FRAME - LAST_FRAME] at the end of
av1_setup_motion_field(). If ref_buf[LAST2_FRAME - LAST_FRAME] is null,
motion_field_projection(cm, LAST2_FRAME, 2) does nothing and returns 0.
3. Remove the decrement of ref_stamp at the end of
av1_setup_motion_field().
Change-Id: I2954989ab7368fcb330846d8f10691847f69f921
diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c
index e3f9d49..3bdffe4 100644
--- a/av1/common/mvref_common.c
+++ b/av1/common/mvref_common.c
@@ -937,8 +937,6 @@
TPL_MV_REF *tpl_mvs_base = cm->tpl_mvs;
int ref_offset[REF_FRAMES] = { 0 };
- (void)dir;
-
const RefCntBuffer *const start_frame_buf =
get_ref_frame_buf(cm, start_frame);
if (start_frame_buf == NULL) return 0;
@@ -1071,8 +1069,7 @@
ref_stamp >= 0)
if (motion_field_projection(cm, ALTREF_FRAME, 0)) --ref_stamp;
- if (ref_stamp >= 0 && ref_buf[LAST2_FRAME - LAST_FRAME] != NULL)
- if (motion_field_projection(cm, LAST2_FRAME, 2)) --ref_stamp;
+ if (ref_stamp >= 0) motion_field_projection(cm, LAST2_FRAME, 2);
}
static INLINE void record_samples(MB_MODE_INFO *mbmi, int *pts, int *pts_inref,