diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c index 6eedb6f97fb1ff318a5a869860883dfeb6336e5e..ef51e8868690f696036dcdb73b6104bdde045654 100644 --- a/av1/common/mvref_common.c +++ b/av1/common/mvref_common.c @@ -1602,7 +1602,8 @@ static uint32_t mv_sign_reverse(int_mv ref) { } static void motion_field_projection(AV1_COMMON *cm, - MV_REFERENCE_FRAME ref_frame) { + MV_REFERENCE_FRAME ref_frame, + int ref_stamp) { TPL_MV_REF *tpl_mvs_base = cm->tpl_mvs; int cur_frame_index = cm->cur_frame->cur_frame_offset; @@ -1678,7 +1679,6 @@ static void motion_field_projection(AV1_COMMON *cm, int cur_to_lst3 = cur_frame_index - lst3_frame_index; int cur_to_bwd = bwd_frame_index - cur_frame_index; int cur_to_alt2 = alt2_frame_index - cur_frame_index; - const int ref_stamp = FWD_RF_OFFSET(ref_frame); // clang-format off const int ref_frame_offset_buffer[TOTAL_REFS_PER_FRAME] = { 0, lst_offset, lst2_offset, lst3_offset, gld_offset, @@ -1934,12 +1934,10 @@ void av1_setup_motion_field(AV1_COMMON *cm) { } } - motion_field_projection(cm, ALTREF_FRAME); - + motion_field_projection(cm, BWDREF_FRAME, 1); if (alt2_frame_index > cur_frame_index) - motion_field_projection(cm, ALTREF2_FRAME); - - motion_field_projection(cm, BWDREF_FRAME); + motion_field_projection(cm, ALTREF2_FRAME, 2); + motion_field_projection(cm, ALTREF_FRAME, 3); } #endif // CONFIG_MFMV diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h index 9b3bb99d69db640cf7da366cea649e2648fe8c9a..b3664872b44e55c2a769fe2847dd61e0eda20d57 100644 --- a/av1/common/onyxc_int.h +++ b/av1/common/onyxc_int.h @@ -108,7 +108,7 @@ typedef enum { } REFRESH_FRAME_CONTEXT_MODE; #if CONFIG_MFMV -#define MFMV_STACK_SIZE INTER_REFS_PER_FRAME +#define MFMV_STACK_SIZE 4 typedef struct { int_mv mfmv[INTER_REFS_PER_FRAME][MFMV_STACK_SIZE];