Commit 09723813 authored by Jingning Han's avatar Jingning Han

Reduce the mfmv stack size in use

Change-Id: I43c3f337e2a648ec4ee17ceab0a8f6892924d3b2
parent 812897db
......@@ -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
......
......@@ -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];
......
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