Commit 68e6e867 authored by David Barker's avatar David Barker Committed by Debargha Mukherjee

Fix a bug in global-motion + ref-mv

Fix a case in rdopt where a block's mode would be set to ZEROMV but
its motion vector would not be set to the global motion vector.
This caused future inter frames' lists of candidate mvs to become
desynchronized between the encoder and the decoder.

Change-Id: I1bdc619f155c70ca8a1a3fe6eea1baee15dc2c33
parent 5bfbfdf4
......@@ -9900,7 +9900,18 @@ PALETTE_EXIT:
mode_ctx &= (mbmi_ext->mode_context[best_mbmode.ref_frame[1]] | 0x00ff);
#endif // !CONFIG_EXT_INTER
if (mode_ctx & (1 << ALL_ZERO_FLAG_OFFSET)) best_mbmode.mode = ZEROMV;
if (mode_ctx & (1 << ALL_ZERO_FLAG_OFFSET)) {
best_mbmode.mode = ZEROMV;
#if CONFIG_GLOBAL_MOTION
best_mbmode.mv[0].as_int =
gm_get_motion_vector(&cm->global_motion[best_mbmode.ref_frame[0]])
.as_int;
if (best_mbmode.ref_frame[1] != NONE)
best_mbmode.mv[1].as_int =
gm_get_motion_vector(&cm->global_motion[best_mbmode.ref_frame[1]])
.as_int;
#endif
}
}
#endif
......
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