Remove SEPARATE_GLOBAL_MOTION macro
Global_motion, obmc and warped_motion are now permanently
mutually exclusive.
Change-Id: Ib1a1207cc7caa6459a2027c6c4a50fcf4c451e76
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 4e25762..7444bc0 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -1345,15 +1345,15 @@
#endif
static INLINE MOTION_MODE motion_mode_allowed(
-#if CONFIG_GLOBAL_MOTION && SEPARATE_GLOBAL_MOTION
+#if CONFIG_GLOBAL_MOTION
int block, const WarpedMotionParams *gm_params,
-#endif // CONFIG_GLOBAL_MOTION && SEPARATE_GLOBAL_MOTION
+#endif // CONFIG_GLOBAL_MOTION
const MODE_INFO *mi) {
const MB_MODE_INFO *mbmi = &mi->mbmi;
-#if CONFIG_GLOBAL_MOTION && SEPARATE_GLOBAL_MOTION
+#if CONFIG_GLOBAL_MOTION
const TransformationType gm_type = gm_params[mbmi->ref_frame[0]].wmtype;
if (is_global_mv_block(mi, block, gm_type)) return SIMPLE_TRANSLATION;
-#endif // CONFIG_GLOBAL_MOTION && SEPARATE_GLOBAL_MOTION
+#endif // CONFIG_GLOBAL_MOTION
#if CONFIG_EXT_INTER
if (is_motion_variation_allowed_bsize(mbmi->sb_type) &&
is_inter_mode(mbmi->mode) && mbmi->ref_frame[1] != INTRA_FRAME &&
@@ -1390,13 +1390,13 @@
static INLINE MOTION_MODE
motion_mode_allowed_wrapper(int for_mv_search,
-#if CONFIG_GLOBAL_MOTION && SEPARATE_GLOBAL_MOTION
+#if CONFIG_GLOBAL_MOTION
int block, const WarpedMotionParams *gm_params,
-#endif // CONFIG_GLOBAL_MOTION && SEPARATE_GLOBAL_MOTION
+#endif // CONFIG_GLOBAL_MOTION
const MODE_INFO *mi) {
const MB_MODE_INFO *mbmi = &mi->mbmi;
MOTION_MODE motion_mode_for_mv_search = motion_mode_allowed(
-#if CONFIG_GLOBAL_MOTION && SEPARATE_GLOBAL_MOTION
+#if CONFIG_GLOBAL_MOTION
int block, const WarpedMotionParams *gm_params,
#endif
mi);
@@ -1411,23 +1411,23 @@
#endif
static INLINE void assert_motion_mode_valid(MOTION_MODE mode,
-#if CONFIG_GLOBAL_MOTION && SEPARATE_GLOBAL_MOTION
+#if CONFIG_GLOBAL_MOTION
int block,
const WarpedMotionParams *gm_params,
-#endif // CONFIG_GLOBAL_MOTION && SEPARATE_GLOBAL_MOTION
+#endif // CONFIG_GLOBAL_MOTION
const MODE_INFO *mi) {
#if CONFIG_NCOBMC_ADAPT_WEIGHT
const MOTION_MODE last_motion_mode_allowed =
motion_mode_allowed_wrapper(0,
-#if CONFIG_GLOBAL_MOTION && SEPARATE_GLOBAL_MOTION
+#if CONFIG_GLOBAL_MOTION
block, gm_params,
-#endif // CONFIG_GLOBAL_MOTION && SEPARATE_GLOBAL_MOTION
+#endif // CONFIG_GLOBAL_MOTION
mi);
#else
const MOTION_MODE last_motion_mode_allowed = motion_mode_allowed(
-#if CONFIG_GLOBAL_MOTION && SEPARATE_GLOBAL_MOTION
+#if CONFIG_GLOBAL_MOTION
block, gm_params,
-#endif // CONFIG_GLOBAL_MOTION && SEPARATE_GLOBAL_MOTION
+#endif // CONFIG_GLOBAL_MOTION
mi);
#endif
// Check that the input mode is not illegal
diff --git a/av1/common/mv.h b/av1/common/mv.h
index 9598319..a6bb6b8 100644
--- a/av1/common/mv.h
+++ b/av1/common/mv.h
@@ -35,9 +35,6 @@
int32_t col;
} MV32;
-#if (CONFIG_WARPED_MOTION || CONFIG_MOTION_VAR) && CONFIG_GLOBAL_MOTION
-#define SEPARATE_GLOBAL_MOTION 1
-#endif // (CONFIG_WARPED_MOTION || CONFIG_MOTION_VAR) && CONFIG_GLOBAL_MOTION
#if CONFIG_GLOBAL_MOTION || CONFIG_WARPED_MOTION
// Bits of precision used for the model
#define WARPEDMODEL_PREC_BITS 16
diff --git a/av1/common/reconinter.h b/av1/common/reconinter.h
index 5f33df8..d7cd44f 100644
--- a/av1/common/reconinter.h
+++ b/av1/common/reconinter.h
@@ -341,8 +341,8 @@
#if CONFIG_GLOBAL_MOTION && CONFIG_WARPED_MOTION && !CONFIG_MOTION_VAR
// When both are enabled, warped will take priority. The global parameters
// will only be used to compute projection samples to find the warped model.
- // Note that, if SEPARATE_GLOBAL_MOTION is enabled and a block chooses
- // global, it will not be possible to select WARPED_CAUSAL.
+ // Note that when a block chooses global, it will not be possible to
+ // select WARPED_CAUSAL.
if (warp_types->local_warp_allowed) {
memcpy(final_warp_params, &mbmi->wm_params[0], sizeof(*final_warp_params));
return 1;
@@ -434,9 +434,9 @@
// Make sure the selected motion mode is valid for this configuration
#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
assert_motion_mode_valid(mi->mbmi.motion_mode,
-#if CONFIG_GLOBAL_MOTION && SEPARATE_GLOBAL_MOTION
+#if CONFIG_GLOBAL_MOTION
0, xd->global_motion,
-#endif // CONFIG_GLOBAL_MOTION && SEPARATE_GLOBAL_MOTION
+#endif // CONFIG_GLOBAL_MOTION
mi);
#endif // CONFIG MOTION_VAR || CONFIG_WARPED_MOTION