From 3ca0e672988a30a6abf7537754ccaf9f9e8e1b64 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Fri, 14 Apr 2017 19:48:05 -0700 Subject: [PATCH] Fix enc/dec mismatch in global motion Resolve an enc/dec mismatch issue when global motion is turned on. BUG=aomedia:424 Change-Id: Ifad02fab4412588527ec7e8b24ab9b8c6327e5ba --- av1/common/blockd.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/av1/common/blockd.h b/av1/common/blockd.h index a6bf669b8..90f6562ee 100644 --- a/av1/common/blockd.h +++ b/av1/common/blockd.h @@ -1248,9 +1248,6 @@ static INLINE int is_nontrans_global_motion(const MACROBLOCKD *xd) { if (mbmi->mode != ZEROMV) return 0; #endif // CONFIG_EXT_INTER } else { -#if !GLOBAL_SUB8X8_USED - return 0; -#endif // !GLOBAL_SUB8X8_USED #if CONFIG_EXT_INTER if (mi->bmi[0].as_mode != ZEROMV || mi->bmi[1].as_mode != ZEROMV || mi->bmi[2].as_mode != ZEROMV || mi->bmi[3].as_mode != ZEROMV || @@ -1264,6 +1261,11 @@ static INLINE int is_nontrans_global_motion(const MACROBLOCKD *xd) { return 0; #endif // CONFIG_EXT_INTER } + +#if !GLOBAL_SUB8X8_USED + if (mbmi->sb_type < BLOCK_8X8) return 0; +#endif + // Now check if all global motion is non translational for (ref = 0; ref < 1 + has_second_ref(mbmi); ++ref) { if (xd->global_motion[mbmi->ref_frame[ref]].wmtype <= TRANSLATION) return 0;