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
This commit is contained in:
David Barker 2016-11-24 15:10:15 +00:00 коммит произвёл Debargha Mukherjee
Родитель 5bfbfdf483
Коммит 68e6e8679c
1 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -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