Commit 71da481d authored by Jingning Han's avatar Jingning Han
Browse files

Re-arrange the tpl_mvs stack order

Check the availability of motion field from the ARF frame first.

Change-Id: I8adce9e604344ee860b5015ff6c755f173886678
parent 406591c2
...@@ -1659,7 +1659,7 @@ void av1_setup_motion_field(AV1_COMMON *cm) { ...@@ -1659,7 +1659,7 @@ void av1_setup_motion_field(AV1_COMMON *cm) {
if (alt_frame_index < cur_frame_index) return; if (alt_frame_index < cur_frame_index) return;
int ref_stamp = 0; int ref_stamp = 2;
// ====================== // ======================
// Process last frame // Process last frame
...@@ -1789,20 +1789,20 @@ void av1_setup_motion_field(AV1_COMMON *cm) { ...@@ -1789,20 +1789,20 @@ void av1_setup_motion_field(AV1_COMMON *cm) {
} }
} }
++ref_stamp; --ref_stamp;
} }
if (bwd_frame_index > cur_frame_index) { if (bwd_frame_index > cur_frame_index) {
motion_field_projection(cm, BWDREF_FRAME, ref_stamp); motion_field_projection(cm, BWDREF_FRAME, ref_stamp);
++ref_stamp; --ref_stamp;
} }
if (alt2_frame_index > cur_frame_index) { if (alt2_frame_index > cur_frame_index) {
motion_field_projection(cm, ALTREF2_FRAME, ref_stamp); motion_field_projection(cm, ALTREF2_FRAME, ref_stamp);
++ref_stamp; --ref_stamp;
} }
if (alt_frame_index > cur_frame_index && ref_stamp <= 2) if (alt_frame_index > cur_frame_index && ref_stamp >= 0)
motion_field_projection(cm, ALTREF_FRAME, 2); motion_field_projection(cm, ALTREF_FRAME, 2);
} }
#endif // CONFIG_MFMV #endif // CONFIG_MFMV
......
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