Remove experimental flag of WARPED_MOTION
This experiment has been adopted, we can simplify the code
by dropping the associated preprocessor conditionals.
Change-Id: I54fee8a18afaec5333ae852eb6bd9ac0e2550db1
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 4bbd828..4ae3a9e 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -377,10 +377,8 @@
int mi_row;
int mi_col;
#endif
-#if CONFIG_WARPED_MOTION
int num_proj_ref[2];
WarpedMotionParams wm_params[2];
-#endif // CONFIG_WARPED_MOTION
#if CONFIG_CFL
// Index of the alpha Cb and alpha Cr combination
@@ -1399,10 +1397,7 @@
static INLINE MOTION_MODE
motion_mode_allowed(int block, const WarpedMotionParams *gm_params,
-#if CONFIG_WARPED_MOTION
- const MACROBLOCKD *xd,
-#endif
- const MODE_INFO *mi) {
+ const MACROBLOCKD *xd, const MODE_INFO *mi) {
const MB_MODE_INFO *mbmi = &mi->mbmi;
#if CONFIG_AMVR
if (xd->cur_frame_force_integer_mv == 0) {
@@ -1416,7 +1411,6 @@
is_inter_mode(mbmi->mode) && mbmi->ref_frame[1] != INTRA_FRAME &&
is_motion_variation_allowed_compound(mbmi)) {
if (!check_num_overlappable_neighbors(mbmi)) return SIMPLE_TRANSLATION;
-#if CONFIG_WARPED_MOTION
if (!has_second_ref(mbmi) && mbmi->num_proj_ref[0] >= 1 &&
!av1_is_scaled(&(xd->block_refs[0]->sf))) {
#if CONFIG_AMVR
@@ -1427,7 +1421,6 @@
return WARPED_CAUSAL;
}
-#endif // CONFIG_WARPED_MOTION
#if CONFIG_NCOBMC_ADAPT_WEIGHT
if (ncobmc_mode_allowed_bsize(mbmi->sb_type) < NO_OVERLAP)
return NCOBMC_ADAPT_WEIGHT;
@@ -1441,16 +1434,10 @@
static INLINE void assert_motion_mode_valid(MOTION_MODE mode, int block,
const WarpedMotionParams *gm_params,
-#if CONFIG_WARPED_MOTION
const MACROBLOCKD *xd,
-#endif
const MODE_INFO *mi) {
const MOTION_MODE last_motion_mode_allowed =
- motion_mode_allowed(block, gm_params,
-#if CONFIG_WARPED_MOTION
- xd,
-#endif
- mi);
+ motion_mode_allowed(block, gm_params, xd, mi);
// Check that the input mode is not illegal
if (last_motion_mode_allowed < mode)
diff --git a/av1/common/entropy.c b/av1/common/entropy.c
index 5e8e259..da6f18d 100644
--- a/av1/common/entropy.c
+++ b/av1/common/entropy.c
@@ -2383,10 +2383,8 @@
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(intra_inter_cdf)
AVERAGE_TILE_CDFS(motion_mode_cdf)
-#if CONFIG_WARPED_MOTION
AVERAGE_TILE_CDFS(obmc_cdf)
#endif
-#endif
#if CONFIG_MRC_TX
AVERAGE_TILE_CDFS(mrc_mask_inter_cdf)
#endif // CONFIG_MRC_TX
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index e0e7e8d..2d539ed 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -928,136 +928,6 @@
#endif // TWO_MODEE
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT
// Change this section appropriately once warped motion is supported
-#if !CONFIG_WARPED_MOTION
-#if CONFIG_NCOBMC_ADAPT_WEIGHT
-const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {
- -SIMPLE_TRANSLATION, 2, -OBMC_CAUSAL, -NCOBMC_ADAPT_WEIGHT,
-};
-static const aom_prob
- default_motion_mode_prob[BLOCK_SIZES_ALL][MOTION_MODES - 1] = {
- { 255, 255 },
- { 255, 255 },
- { 255, 255 },
- { 255, 255 },
- { 255, 255 },
- { 255, 255 },
- /** Only these nine block sizes allow ncobmc_adapt_weight **/
- { 45, 207 },
- { 42, 211 },
- { 34, 207 },
- { 181, 123 },
- { 129, 141 },
- { 15, 209 },
- { 231, 122 },
- { 195, 190 },
- { 168, 190 },
- /** ----------------------------------------------------- **/
- { 244, 255 },
-#if CONFIG_EXT_PARTITION
- { 252, 255 },
- { 252, 255 },
- { 252, 255 },
-#endif // CONFIG_EXT_PARTITION
- { 255, 200 },
- { 255, 200 },
- { 255, 200 },
- { 255, 200 },
-#if CONFIG_EXT_PARTITION
- { 252, 255 },
- { 252, 200 },
- { 252, 200 },
-#endif // CONFIG_EXT_PARTITION
- };
-static const aom_cdf_prob
- default_motion_mode_cdf[BLOCK_SIZES_ALL][CDF_SIZE(MOTION_MODES)] = {
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0, 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0, 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0, 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0, 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0, 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0, 0 },
- /** Only these seven block sizes allow ncobmc_adapt_weight **/
- { AOM_ICDF(5702), AOM_ICDF(27555), AOM_ICDF(32768), 0 },
- { AOM_ICDF(5408), AOM_ICDF(27964), AOM_ICDF(32768), 0 },
- { AOM_ICDF(4330), AOM_ICDF(27298), AOM_ICDF(32768), 0 },
- { AOM_ICDF(23107), AOM_ICDF(27760), AOM_ICDF(32768), 0 },
- { AOM_ICDF(16490), AOM_ICDF(25461), AOM_ICDF(32768), 0 },
- { AOM_ICDF(1959), AOM_ICDF(27153), AOM_ICDF(32768), 0 },
- { AOM_ICDF(29530), AOM_ICDF(31073), AOM_ICDF(32768), 0 },
- { AOM_ICDF(25057), AOM_ICDF(30840), AOM_ICDF(32768), 0 },
- { AOM_ICDF(21588), AOM_ICDF(29940), AOM_ICDF(32768), 0 },
- /** ----------------------------------------------------- **/
- { AOM_ICDF(244 * 128), AOM_ICDF(32768), AOM_ICDF(32768), 0 },
-#if CONFIG_EXT_PARTITION
- { AOM_ICDF(32256), AOM_ICDF(32768), AOM_ICDF(32768), 0 },
- { AOM_ICDF(32256), AOM_ICDF(32768), AOM_ICDF(32768), 0 },
- { AOM_ICDF(32256), AOM_ICDF(32768), AOM_ICDF(32768), 0 },
-#endif
- { AOM_ICDF(32640), AOM_ICDF(32740), AOM_ICDF(32768), 0 },
- { AOM_ICDF(32640), AOM_ICDF(32740), AOM_ICDF(32768), 0 },
- { AOM_ICDF(32640), AOM_ICDF(32740), AOM_ICDF(32768), 0 },
- { AOM_ICDF(32640), AOM_ICDF(32740), AOM_ICDF(32768), 0 },
- { AOM_ICDF(32640), AOM_ICDF(32740), AOM_ICDF(32768), 0 },
- { AOM_ICDF(32640), AOM_ICDF(32740), AOM_ICDF(32768), 0 }
-#if CONFIG_EXT_PARTITION
- { AOM_ICDF(32640), AOM_ICDF(32740), AOM_ICDF(32768), 0 },
- { AOM_ICDF(32640), AOM_ICDF(32740), AOM_ICDF(32768), 0 },
-#endif
- };
-#else // CONFIG_NCOBMC_ADAPT_WEIGHT
-const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {
- -SIMPLE_TRANSLATION, -OBMC_CAUSAL
-};
-
-static const aom_prob
- default_motion_mode_prob[BLOCK_SIZES_ALL][MOTION_MODES - 1] = {
- { 255 }, { 255 }, { 255 }, { 255 }, { 255 }, { 255 }, { 151 }, { 153 },
- { 144 }, { 178 }, { 165 }, { 160 }, { 207 }, { 195 }, { 168 }, { 244 },
-#if CONFIG_EXT_PARTITION
- { 252 }, { 252 }, { 252 },
-#endif // CONFIG_EXT_PARTITION
- { 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 },
-#if CONFIG_EXT_PARTITION
- { 208 }, { 208 }
-#endif // CONFIG_EXT_PARTITION
- };
-
-static const aom_cdf_prob
- default_motion_mode_cdf[BLOCK_SIZES_ALL][CDF_SIZE(MOTION_MODES)] = {
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(151 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(153 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(144 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(178 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(165 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(160 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(207 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(195 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(168 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(244 * 128), AOM_ICDF(32768), 0 },
-#if CONFIG_EXT_PARTITION
- { AOM_ICDF(252 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(252 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(252 * 128), AOM_ICDF(32768), 0 },
-#endif // CONFIG_EXT_PARTITION
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0 },
-#if CONFIG_EXT_PARTITION
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0 },
- { AOM_ICDF(255 * 128), AOM_ICDF(32768), 0 },
-#endif // CONFIG_EXT_PARTITION
- };
-#endif // CONFIG_NCOBMC_ADAPT_WEIGHT
-#elif CONFIG_WARPED_MOTION
#if CONFIG_NCOBMC_ADAPT_WEIGHT
const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {
-SIMPLE_TRANSLATION, 2, -OBMC_CAUSAL, 4, -NCOBMC_ADAPT_WEIGHT, -WARPED_CAUSAL
@@ -1257,7 +1127,6 @@
#endif // CONFIG_EXT_PARTITION
};
#endif // CONFIG_NEW_MULTISYMBOL
-#endif
static const aom_prob default_delta_q_probs[DELTA_Q_PROBS] = { 220, 220, 220 };
static const aom_cdf_prob default_delta_q_cdf[CDF_SIZE(DELTA_Q_PROBS + 1)] = {
@@ -6111,7 +5980,6 @@
av1_copy(fc->ncobmc_mode_prob, default_ncobmc_mode_prob);
av1_copy(fc->ncobmc_mode_cdf, default_ncobmc_mode_cdf);
#endif
-#if CONFIG_WARPED_MOTION
av1_copy(fc->obmc_prob, default_obmc_prob);
#if CONFIG_NEW_MULTISYMBOL || CONFIG_NCOBMC_ADAPT_WEIGHT
av1_copy(fc->obmc_cdf, default_obmc_cdf);
@@ -6120,7 +5988,6 @@
av1_copy(fc->ncobmc_prob, default_ncobmc_prob);
av1_copy(fc->ncobmc_cdf, default_ncobmc_cdf);
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT
-#endif // CONFIG_WARPED_MOTION
av1_copy(fc->inter_compound_mode_probs, default_inter_compound_mode_probs);
av1_copy(fc->inter_compound_mode_cdf, default_inter_compound_mode_cdf);
#if CONFIG_COMPOUND_SINGLEREF
@@ -6266,17 +6133,13 @@
for (i = 0; i < ADAPT_OVERLAP_BLOCKS; ++i)
aom_tree_merge_probs(av1_ncobmc_mode_tree, pre_fc->ncobmc_mode_prob[i],
counts->ncobmc_mode[i], fc->ncobmc_mode_prob[i]);
-#if CONFIG_WARPED_MOTION
for (i = BLOCK_8X8; i < BLOCK_SIZES_ALL; ++i)
aom_tree_merge_probs(av1_ncobmc_tree, pre_fc->ncobmc_prob[i],
counts->ncobmc[i], fc->ncobmc_prob[i]);
-#endif
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT
-#if CONFIG_WARPED_MOTION
for (i = BLOCK_8X8; i < BLOCK_SIZES_ALL; ++i)
fc->obmc_prob[i] =
av1_mode_mv_merge_probs(pre_fc->obmc_prob[i], counts->obmc[i]);
-#endif // CONFIG_WARPED_MOTION
for (i = 0; i < INTER_MODE_CONTEXTS; i++)
aom_tree_merge_probs(
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index 97a336c..73a099f 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -225,7 +225,6 @@
aom_cdf_prob ncobmc_mode_cdf[ADAPT_OVERLAP_BLOCKS]
[CDF_SIZE(MAX_NCOBMC_MODES)];
#endif
-#if CONFIG_WARPED_MOTION
#if CONFIG_NCOBMC_ADAPT_WEIGHT
aom_prob ncobmc_prob[BLOCK_SIZES_ALL][OBMC_FAMILY_MODES - 1];
aom_cdf_prob ncobmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(OBMC_FAMILY_MODES)];
@@ -234,7 +233,6 @@
#if CONFIG_NEW_MULTISYMBOL || CONFIG_NCOBMC_ADAPT_WEIGHT
aom_cdf_prob obmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)];
#endif // CONFIG_NEW_MULTISYMBOL
-#endif // CONFIG_WARPED_MOTION
aom_prob intra_inter_prob[INTRA_INTER_CONTEXTS];
aom_prob comp_inter_prob[COMP_INTER_CONTEXTS];
aom_cdf_prob palette_y_size_cdf[PALETTE_BLOCK_SIZES][CDF_SIZE(PALETTE_SIZES)];
@@ -457,12 +455,10 @@
#if CONFIG_NCOBMC_ADAPT_WEIGHT
unsigned int ncobmc_mode[ADAPT_OVERLAP_BLOCKS][MAX_NCOBMC_MODES];
#endif
-#if CONFIG_WARPED_MOTION
#if CONFIG_NCOBMC_ADAPT_WEIGHT
unsigned int ncobmc[BLOCK_SIZES_ALL][OBMC_FAMILY_MODES];
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT
unsigned int obmc[BLOCK_SIZES_ALL][2];
-#endif // CONFIG_WARPED_MOTION
unsigned int intra_inter[INTRA_INTER_CONTEXTS][2];
unsigned int comp_inter[COMP_INTER_CONTEXTS][2];
#if CONFIG_EXT_COMP_REFS
@@ -641,9 +637,7 @@
extern const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)];
#if CONFIG_NCOBMC_ADAPT_WEIGHT
extern const aom_tree_index av1_ncobmc_mode_tree[TREE_SIZE(MAX_NCOBMC_MODES)];
-#if CONFIG_WARPED_MOTION
extern const aom_tree_index av1_ncobmc_tree[TREE_SIZE(OBMC_FAMILY_MODES)];
-#endif // CONFIG_WARPED_MOTION
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT
#if CONFIG_LOOP_RESTORATION
#define RESTORE_NONE_SGRPROJ_PROB 64
diff --git a/av1/common/enums.h b/av1/common/enums.h
index b2a0881..b70c2c0 100644
--- a/av1/common/enums.h
+++ b/av1/common/enums.h
@@ -576,12 +576,10 @@
OBMC_CAUSAL, // 2-sided OBMC
#if CONFIG_NCOBMC_ADAPT_WEIGHT
NCOBMC_ADAPT_WEIGHT,
-#endif // CONFIG_NCOBMC_ADAPT_WEIGHT
-#if CONFIG_WARPED_MOTION
+#endif // CONFIG_NCOBMC_ADAPT_WEIGHT
WARPED_CAUSAL, // 2-sided WARPED
-#endif // CONFIG_WARPED_MOTION
MOTION_MODES
-#if CONFIG_NCOBMC_ADAPT_WEIGHT && CONFIG_WARPED_MOTION
+#if CONFIG_NCOBMC_ADAPT_WEIGHT
,
OBMC_FAMILY_MODES = NCOBMC_ADAPT_WEIGHT + 1
#endif
diff --git a/av1/common/mv.h b/av1/common/mv.h
index 2cecdea..212d9fe 100644
--- a/av1/common/mv.h
+++ b/av1/common/mv.h
@@ -91,9 +91,7 @@
typedef struct {
int global_warp_allowed;
-#if CONFIG_WARPED_MOTION
int local_warp_allowed;
-#endif // CONFIG_WARPED_MOTION
} WarpTypesAllowed;
// number of parameters used by each transformation in TransformationTypes
diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c
index 463a84a..aac9f30 100644
--- a/av1/common/mvref_common.c
+++ b/av1/common/mvref_common.c
@@ -10,9 +10,7 @@
*/
#include "av1/common/mvref_common.h"
-#if CONFIG_WARPED_MOTION
#include "av1/common/warped_motion.h"
-#endif // CONFIG_WARPED_MOTION
#define USE_CUR_GM_REFMV 1
@@ -1799,7 +1797,6 @@
}
#endif // CONFIG_MFMV
-#if CONFIG_WARPED_MOTION
#if CONFIG_EXT_WARPED_MOTION
static INLINE void record_samples(MB_MODE_INFO *mbmi, int *pts, int *pts_inref,
int *pts_mv, int global_offset_r,
@@ -2129,4 +2126,3 @@
return np;
}
#endif // CONFIG_EXT_WARPED_MOTION
-#endif // CONFIG_WARPED_MOTION
diff --git a/av1/common/mvref_common.h b/av1/common/mvref_common.h
index e16f65a..8af6567 100644
--- a/av1/common/mvref_common.h
+++ b/av1/common/mvref_common.h
@@ -417,7 +417,6 @@
int_mv *mv_ref_list, int block, int mi_row,
int mi_col, int16_t *mode_context);
-#if CONFIG_WARPED_MOTION
#if CONFIG_EXT_WARPED_MOTION
int sortSamples(int *pts_mv, MV *mv, int *pts, int *pts_inref, int len);
int findSamples(const AV1_COMMON *cm, MACROBLOCKD *xd, int mi_row, int mi_col,
@@ -426,7 +425,6 @@
int findSamples(const AV1_COMMON *cm, MACROBLOCKD *xd, int mi_row, int mi_col,
int *pts, int *pts_inref);
#endif // CONFIG_EXT_WARPED_MOTION
-#endif // CONFIG_WARPED_MOTION
#if CONFIG_INTRABC
static INLINE void av1_find_ref_dv(int_mv *ref_dv, int mi_row, int mi_col) {
diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c
index da7caf6..3231ed7 100644
--- a/av1/common/reconinter.c
+++ b/av1/common/reconinter.c
@@ -38,29 +38,13 @@
const MB_MODE_INFO *const mbmi = &mi->mbmi;
*final_warp_params = default_warp_params;
-#if CONFIG_WARPED_MOTION
if (mbmi->wm_params[0].invalid) return 0;
-#endif
-// Motion var and global motion configured
-#if !CONFIG_WARPED_MOTION
- // We warp if either case is true:
- // 1.) We are predicting a block which uses global motion
- // 2.) We are predicting a neighboring block of a block using OBMC,
- // the neighboring block uses global motion, and we have enabled
- // WARP_GM_NEIGHBORS_WITH_OBMC
- (void)mbmi;
- if (warp_types->global_warp_allowed &&
- (WARP_GM_NEIGHBORS_WITH_OBMC || !build_for_obmc)) {
- memcpy(final_warp_params, gm_params, sizeof(*final_warp_params));
- return 1;
- }
-#endif // !CONFIG_WARPED_MOTION
+ // Motion var and global motion configured
-// Motion var and warped motion configured
+ // Motion var and warped motion configured
-// Motion var, warped motion and global motion all configured
-#if CONFIG_WARPED_MOTION
+ // Motion var, warped motion and global motion all configured
if (warp_types->local_warp_allowed) {
if ((build_for_obmc && WARP_WM_NEIGHBORS_WITH_OBMC) || (!build_for_obmc)) {
memcpy(final_warp_params, &mbmi->wm_params[0],
@@ -72,7 +56,6 @@
memcpy(final_warp_params, gm_params, sizeof(*final_warp_params));
return 1;
}
-#endif // CONFIG_WARPED_MOTION
return 0;
}
@@ -87,11 +70,7 @@
(void)xd;
// Make sure the selected motion mode is valid for this configuration
- assert_motion_mode_valid(mi->mbmi.motion_mode, 0, xd->global_motion,
-#if CONFIG_WARPED_MOTION
- xd,
-#endif
- mi);
+ assert_motion_mode_valid(mi->mbmi.motion_mode, 0, xd->global_motion, xd, mi);
WarpedMotionParams final_warp_params;
const int do_warp =
@@ -1133,10 +1112,8 @@
const int is_scaled = av1_is_scaled(sf);
WarpTypesAllowed warp_types;
warp_types.global_warp_allowed = is_global[ref];
-#if CONFIG_WARPED_MOTION
warp_types.local_warp_allowed =
this_mbmi->motion_mode == WARPED_CAUSAL;
-#endif // CONFIG_WARPED_MOTION
if (is_scaled) {
int ssx = pd->subsampling_x;
@@ -1334,9 +1311,7 @@
#endif // CONFIG_INTRABC
WarpTypesAllowed warp_types;
warp_types.global_warp_allowed = is_global[ref];
-#if CONFIG_WARPED_MOTION
warp_types.local_warp_allowed = mi->mbmi.motion_mode == WARPED_CAUSAL;
-#endif // CONFIG_WARPED_MOTION
conv_params.ref = ref;
conv_params.do_average = ref;
if (is_masked_compound_type(mi->mbmi.interinter_compound_type)) {
@@ -2670,9 +2645,7 @@
WarpedMotionParams *const wm = &xd->global_motion[mi->mbmi.ref_frame[ref]];
#endif // CONFIG_COMPOUND_SINGLEREF
warp_types.global_warp_allowed = is_global_mv_block(mi, block, wm->wmtype);
-#if CONFIG_WARPED_MOTION
warp_types.local_warp_allowed = mi->mbmi.motion_mode == WARPED_CAUSAL;
-#endif // CONFIG_WARPED_MOTION
if (is_scaled) {
int ssx = pd->subsampling_x;
diff --git a/av1/common/reconinter.h b/av1/common/reconinter.h
index 8df5123..af5ede1 100644
--- a/av1/common/reconinter.h
+++ b/av1/common/reconinter.h
@@ -18,9 +18,7 @@
#include "av1/common/warped_motion.h"
#include "aom/aom_integer.h"
-#if CONFIG_WARPED_MOTION
#define WARP_WM_NEIGHBORS_WITH_OBMC 0
-#endif // CONFIG_WARPED_MOTION
#define WARP_GM_NEIGHBORS_WITH_OBMC 0
@@ -449,10 +447,8 @@
static INLINE int av1_is_interp_needed(const MACROBLOCKD *const xd) {
(void)xd;
-#if CONFIG_WARPED_MOTION
const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
if (mbmi->motion_mode == WARPED_CAUSAL) return 0;
-#endif // CONFIG_WARPED_MOTION
if (is_nontrans_global_motion(xd)) return 0;
return 1;
}
diff --git a/av1/common/warped_motion.c b/av1/common/warped_motion.c
index f9679e4..15fc6ed 100644
--- a/av1/common/warped_motion.c
+++ b/av1/common/warped_motion.c
@@ -322,7 +322,6 @@
8240, 8224, 8208, 8192,
};
-#if CONFIG_WARPED_MOTION
// Decomposes a divisor D such that 1/D = y/2^shift, where y is returned
// at precision of DIV_LUT_PREC_BITS along with the shift.
static int16_t resolve_divisor_64(uint64_t D, int16_t *shift) {
@@ -341,7 +340,6 @@
// Use f as lookup into the precomputed table of multipliers
return div_lut[f];
}
-#endif // CONFIG_WARPED_MOTION
static int16_t resolve_divisor_32(uint32_t D, int16_t *shift) {
int32_t e, f;
@@ -1002,7 +1000,6 @@
y_scale, conv_params);
}
-#if CONFIG_WARPED_MOTION
#define LEAST_SQUARES_ORDER 2
#define LS_MV_MAX 256 // max mv in 1/8-pel
@@ -1250,4 +1247,3 @@
return 0;
}
-#endif // CONFIG_WARPED_MOTION
diff --git a/av1/common/warped_motion.h b/av1/common/warped_motion.h
index cdc5f31..136cedb 100644
--- a/av1/common/warped_motion.h
+++ b/av1/common/warped_motion.h
@@ -25,7 +25,6 @@
#include "av1/common/convolve.h"
#define MAX_PARAMDIM 9
-#if CONFIG_WARPED_MOTION
#define LEAST_SQUARES_SAMPLES_MAX_BITS 3
#define LEAST_SQUARES_SAMPLES_MAX (1 << LEAST_SQUARES_SAMPLES_MAX_BITS)
@@ -42,7 +41,6 @@
#endif // CONFIG_EXT_WARPED_MOTION
#define DEFAULT_WMTYPE AFFINE
-#endif // CONFIG_WARPED_MOTION
extern const int16_t warped_filter[WARPEDPIXEL_PREC_SHIFTS * 3 + 1][8];
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index d500c43..b8ca101 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -22,9 +22,7 @@
#include "av1/common/reconintra.h"
#endif // CONFIG_EXT_INTRA
#include "av1/common/seg_common.h"
-#if CONFIG_WARPED_MOTION
#include "av1/common/warped_motion.h"
-#endif // CONFIG_WARPED_MOTION
#include "av1/decoder/decodeframe.h"
#include "av1/decoder/decodemv.h"
@@ -283,22 +281,16 @@
static MOTION_MODE read_motion_mode(AV1_COMMON *cm, MACROBLOCKD *xd,
MODE_INFO *mi, aom_reader *r) {
MB_MODE_INFO *mbmi = &mi->mbmi;
-#if !CONFIG_WARPED_MOTION || CONFIG_NEW_MULTISYMBOL || \
- CONFIG_NCOBMC_ADAPT_WEIGHT
+#if CONFIG_NEW_MULTISYMBOL || CONFIG_NCOBMC_ADAPT_WEIGHT
(void)cm;
#endif
const MOTION_MODE last_motion_mode_allowed =
- motion_mode_allowed(0, xd->global_motion,
-#if CONFIG_WARPED_MOTION
- xd,
-#endif
- mi);
+ motion_mode_allowed(0, xd->global_motion, xd, mi);
int motion_mode;
FRAME_COUNTS *counts = xd->counts;
if (last_motion_mode_allowed == SIMPLE_TRANSLATION) return SIMPLE_TRANSLATION;
-#if CONFIG_WARPED_MOTION
#if CONFIG_NCOBMC_ADAPT_WEIGHT
if (last_motion_mode_allowed == NCOBMC_ADAPT_WEIGHT) {
motion_mode = aom_read_symbol(r, xd->tile_ctx->ncobmc_cdf[mbmi->sb_type],
@@ -323,15 +315,12 @@
return (MOTION_MODE)(SIMPLE_TRANSLATION + motion_mode);
} else {
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT
-#endif // CONFIG_WARPED_MOTION
motion_mode =
aom_read_symbol(r, xd->tile_ctx->motion_mode_cdf[mbmi->sb_type],
MOTION_MODES, ACCT_STR);
if (counts) ++counts->motion_mode[mbmi->sb_type][motion_mode];
return (MOTION_MODE)(SIMPLE_TRANSLATION + motion_mode);
-#if CONFIG_WARPED_MOTION
}
-#endif // CONFIG_WARPED_MOTION
}
#if CONFIG_NCOBMC_ADAPT_WEIGHT
@@ -2203,12 +2192,10 @@
int16_t inter_mode_ctx[MODE_CTX_REF_FRAMES];
int16_t compound_inter_mode_ctx[MODE_CTX_REF_FRAMES];
int mode_ctx = 0;
-#if CONFIG_WARPED_MOTION
int pts[SAMPLES_ARRAY_SIZE], pts_inref[SAMPLES_ARRAY_SIZE];
#if CONFIG_EXT_WARPED_MOTION
int pts_mv[SAMPLES_ARRAY_SIZE];
#endif // CONFIG_EXT_WARPED_MOTION
-#endif // CONFIG_WARPED_MOTION
FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
assert(NELEMENTS(mode_2_counter) == MB_MODE_COUNT);
@@ -2560,17 +2547,14 @@
}
#endif // CONFIG_INTERINTRA
-#if CONFIG_WARPED_MOTION
for (ref = 0; ref < 1 + has_second_ref(mbmi); ++ref) {
const MV_REFERENCE_FRAME frame = mbmi->ref_frame[ref];
RefBuffer *ref_buf = &cm->frame_refs[frame - LAST_FRAME];
xd->block_refs[ref] = ref_buf;
}
-#endif
mbmi->motion_mode = SIMPLE_TRANSLATION;
-#if CONFIG_WARPED_MOTION
if (mbmi->sb_type >= BLOCK_8X8 && !has_second_ref(mbmi))
#if CONFIG_EXT_WARPED_MOTION
mbmi->num_proj_ref[0] =
@@ -2578,7 +2562,6 @@
#else
mbmi->num_proj_ref[0] = findSamples(cm, xd, mi_row, mi_col, pts, pts_inref);
#endif // CONFIG_EXT_WARPED_MOTION
-#endif // CONFIG_WARPED_MOTION
av1_count_overlappable_neighbors(cm, xd, mi_row, mi_col);
if (mbmi->ref_frame[1] != INTRA_FRAME)
@@ -2633,7 +2616,6 @@
read_mb_interp_filter(cm, xd, mbmi, r);
-#if CONFIG_WARPED_MOTION
if (mbmi->motion_mode == WARPED_CAUSAL) {
mbmi->wm_params[0].wmtype = DEFAULT_WMTYPE;
@@ -2652,7 +2634,6 @@
mbmi->wm_params[0].invalid = 1;
}
}
-#endif // CONFIG_WARPED_MOTION
#if DEC_MISMATCH_DEBUG
dec_dump_logs(cm, mi, mi_row, mi_col, inter_mode_ctx, mode_ctx);
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 0f623a8..4423696 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -405,13 +405,8 @@
const MB_MODE_INFO *mbmi = &mi->mbmi;
MOTION_MODE last_motion_mode_allowed =
- motion_mode_allowed(0, cm->global_motion,
-#if CONFIG_WARPED_MOTION
- xd,
-#endif
- mi);
+ motion_mode_allowed(0, cm->global_motion, xd, mi);
if (last_motion_mode_allowed == SIMPLE_TRANSLATION) return;
-#if CONFIG_WARPED_MOTION
#if CONFIG_NCOBMC_ADAPT_WEIGHT
if (last_motion_mode_allowed == NCOBMC_ADAPT_WEIGHT) {
aom_write_symbol(w, mbmi->motion_mode,
@@ -432,13 +427,10 @@
#endif
} else {
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT
-#endif // CONFIG_WARPED_MOTION
aom_write_symbol(w, mbmi->motion_mode,
xd->tile_ctx->motion_mode_cdf[mbmi->sb_type],
MOTION_MODES);
-#if CONFIG_WARPED_MOTION
}
-#endif // CONFIG_WARPED_MOTION
}
#if CONFIG_NCOBMC_ADAPT_WEIGHT
@@ -2068,7 +2060,6 @@
cm->above_txfm_context + (mi_col << TX_UNIT_WIDE_LOG2);
xd->left_txfm_context = xd->left_txfm_context_buffer +
((mi_row & MAX_MIB_MASK) << TX_UNIT_HIGH_LOG2);
-#if CONFIG_DUAL_FILTER || CONFIG_WARPED_MOTION
// has_subpel_mv_component needs the ref frame buffers set up to look
// up if they are scaled. has_subpel_mv_component is in turn needed by
// write_switchable_interp_filter, which is called by pack_inter_mode_mvs.
@@ -2077,7 +2068,6 @@
if (!has_second_ref(&m->mbmi) && is_inter_singleref_comp_mode(m->mbmi.mode))
xd->block_refs[1] = xd->block_refs[0];
#endif // CONFIG_COMPOUND_SINGLEREF
-#endif // CONFIG_DUAL_FILTER || CONFIG_WARPED_MOTION
#if ENC_MISMATCH_DEBUG
enc_dump_logs(cpi, mi_row, mi_col);
@@ -3067,11 +3057,7 @@
// Only one filter is used. So set the filter at frame level
for (i = 0; i < SWITCHABLE_FILTERS; ++i) {
if (count[i]) {
-#if CONFIG_WARPED_MOTION
if (i == EIGHTTAP_REGULAR || WARP_WM_NEIGHBORS_WITH_OBMC)
-#else
- if (i == EIGHTTAP_REGULAR || WARP_GM_NEIGHBORS_WITH_OBMC)
-#endif // CONFIG_WARPED_MOTION
cm->interp_filter = i;
break;
}
diff --git a/av1/encoder/block.h b/av1/encoder/block.h
index a35f5c2..c2b6ab4 100644
--- a/av1/encoder/block.h
+++ b/av1/encoder/block.h
@@ -223,12 +223,10 @@
int interintra_mode_cost[BLOCK_SIZE_GROUPS][INTERINTRA_MODES];
#endif // CONFIG_INTERINTRA
int motion_mode_cost[BLOCK_SIZES_ALL][MOTION_MODES];
-#if CONFIG_WARPED_MOTION
int motion_mode_cost1[BLOCK_SIZES_ALL][2];
#if CONFIG_NCOBMC_ADAPT_WEIGHT
int motion_mode_cost2[BLOCK_SIZES_ALL][OBMC_FAMILY_MODES];
#endif
-#endif // CONFIG_WARPED_MOTION
#if CONFIG_NCOBMC_ADAPT_WEIGHT
int ncobmc_mode_cost[ADAPT_OVERLAP_BLOCKS][MAX_NCOBMC_MODES];
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index fabd747..ea45834 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -555,11 +555,9 @@
}
}
}
- if (cm->interp_filter == SWITCHABLE
-#if CONFIG_WARPED_MOTION
- && mbmi->motion_mode != WARPED_CAUSAL
-#endif // CONFIG_WARPED_MOTION
- && !is_nontrans_global_motion(xd)) {
+ if (cm->interp_filter == SWITCHABLE &&
+ mbmi->motion_mode != WARPED_CAUSAL &&
+ !is_nontrans_global_motion(xd)) {
#if CONFIG_DUAL_FILTER
update_filter_type_count(td->counts, xd, mbmi);
#else
@@ -1189,18 +1187,10 @@
}
#endif // CONFIG_INTERINTRA
-#if CONFIG_WARPED_MOTION
set_ref_ptrs(cm, xd, mbmi->ref_frame[0], mbmi->ref_frame[1]);
-#endif
const MOTION_MODE motion_allowed =
- motion_mode_allowed(0, xd->global_motion,
-#if CONFIG_WARPED_MOTION
- xd,
-#endif
- mi);
- if (mbmi->ref_frame[1] != INTRA_FRAME)
-#if CONFIG_WARPED_MOTION
- {
+ motion_mode_allowed(0, xd->global_motion, xd, mi);
+ if (mbmi->ref_frame[1] != INTRA_FRAME) {
if (motion_allowed == WARPED_CAUSAL) {
counts->motion_mode[mbmi->sb_type][mbmi->motion_mode]++;
update_cdf(fc->motion_mode_cdf[mbmi->sb_type], mbmi->motion_mode,
@@ -1224,13 +1214,6 @@
}
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT
}
-#else
- if (motion_allowed > SIMPLE_TRANSLATION) {
- counts->motion_mode[mbmi->sb_type][mbmi->motion_mode]++;
- update_cdf(fc->motion_mode_cdf[mbmi->sb_type], mbmi->motion_mode,
- MOTION_MODES);
- }
-#endif // CONFIG_WARPED_MOTION
#if CONFIG_NCOBMC_ADAPT_WEIGHT
if (mbmi->motion_mode == NCOBMC_ADAPT_WEIGHT) {
@@ -1442,17 +1425,12 @@
update_state(cpi, td, ctx, mi_row, mi_col, bsize, dry_run);
#if (CONFIG_NCOBMC || CONFIG_NCOBMC_ADAPT_WEIGHT)
mbmi = &xd->mi[0]->mbmi;
-#if CONFIG_WARPED_MOTION
set_ref_ptrs(&cpi->common, xd, mbmi->ref_frame[0], mbmi->ref_frame[1]);
#endif
-#endif
#if (CONFIG_NCOBMC || CONFIG_NCOBMC_ADAPT_WEIGHT)
- const MOTION_MODE motion_allowed = motion_mode_allowed(0, xd->global_motion,
-#if CONFIG_WARPED_MOTION
- xd,
-#endif
- xd->mi[0]);
+ const MOTION_MODE motion_allowed =
+ motion_mode_allowed(0, xd->global_motion, xd, xd->mi[0]);
#endif // (CONFIG_NCOBMC || CONFIG_NCOBMC_ADAPT_WEIGHT)
#if CONFIG_NCOBMC
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c
index 3b7eb6a..f4d132e 100644
--- a/av1/encoder/mcomp.c
+++ b/av1/encoder/mcomp.c
@@ -874,7 +874,6 @@
#undef PRE
#undef CHECK_BETTER
-#if CONFIG_WARPED_MOTION
unsigned int av1_compute_motion_cost(const AV1_COMP *cpi, MACROBLOCK *const x,
BLOCK_SIZE bsize, int mi_row, int mi_col,
const MV *this_mv) {
@@ -993,7 +992,6 @@
#endif // CONFIG_EXT_WARPED_MOTION
return bestmse;
}
-#endif // CONFIG_WARPED_MOTION
static INLINE int check_bounds(const MvLimits *mv_limits, int row, int col,
int range) {
diff --git a/av1/encoder/mcomp.h b/av1/encoder/mcomp.h
index 8ca42be..87760c9 100644
--- a/av1/encoder/mcomp.h
+++ b/av1/encoder/mcomp.h
@@ -151,7 +151,6 @@
} // extern "C"
#endif
-#if CONFIG_WARPED_MOTION
unsigned int av1_compute_motion_cost(const struct AV1_COMP *cpi,
MACROBLOCK *const x, BLOCK_SIZE bsize,
int mi_row, int mi_col, const MV *this_mv);
@@ -167,6 +166,5 @@
int mi_row, int mi_col, int *pts,
int *pts_inref);
#endif // CONFIG_EXT_WARPED_MOTION
-#endif // CONFIG_WARPED_MOTION
#endif // AV1_ENCODER_MCOMP_H_
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c
index e05f406..57138c7 100644
--- a/av1/encoder/rd.c
+++ b/av1/encoder/rd.c
@@ -403,7 +403,6 @@
av1_cost_tokens_from_cdf(x->motion_mode_cost[i], fc->motion_mode_cdf[i],
NULL);
}
-#if CONFIG_WARPED_MOTION
for (i = BLOCK_8X8; i < BLOCK_SIZES_ALL; i++) {
#if CONFIG_NCOBMC_ADAPT_WEIGHT
av1_cost_tokens_from_cdf(x->motion_mode_cost2[i], fc->ncobmc_cdf[i],
@@ -416,7 +415,6 @@
x->motion_mode_cost1[i][1] = av1_cost_bit(fc->obmc_prob[i], 1);
#endif
}
-#endif // CONFIG_WARPED_MOTION
#if CONFIG_NCOBMC_ADAPT_WEIGHT
for (i = ADAPT_OVERLAP_BLOCK_8X8; i < ADAPT_OVERLAP_BLOCKS; ++i) {
av1_cost_tokens_from_cdf(x->ncobmc_mode_cost[i], fc->ncobmc_mode_cdf[i],
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 87de695..af75134 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -40,9 +40,7 @@
#if CONFIG_LV_MAP
#include "av1/common/txb_common.h"
#endif
-#if CONFIG_WARPED_MOTION
#include "av1/common/warped_motion.h"
-#endif // CONFIG_WARPED_MOTION
#include "av1/encoder/aq_variance.h"
#include "av1/encoder/av1_quantize.h"
@@ -6194,9 +6192,7 @@
#endif
WarpTypesAllowed warp_types;
warp_types.global_warp_allowed = is_global[!id];
-#if CONFIG_WARPED_MOTION
warp_types.local_warp_allowed = mbmi->motion_mode == WARPED_CAUSAL;
-#endif // CONFIG_WARPED_MOTION
// Initialized here because of compiler problem in Visual Studio.
ref_yv12[0] = xd->plane[plane].pre[0];
@@ -6948,9 +6944,7 @@
ConvolveParams conv_params = get_conv_params(!ref_idx, 0, plane);
WarpTypesAllowed warp_types;
warp_types.global_warp_allowed = is_global;
-#if CONFIG_WARPED_MOTION
warp_types.local_warp_allowed = mbmi->motion_mode == WARPED_CAUSAL;
-#endif // CONFIG_WARPED_MOTION
// Initialized here because of compiler problem in Visual Studio.
ref_yv12 = xd->plane[plane].pre[!ref_idx];
@@ -8074,9 +8068,6 @@
(void)rate_mv;
(void)is_comp_pred;
(void)this_mode;
-#if !CONFIG_WARPED_MOTION
- (void)single_newmv;
-#endif
MOTION_MODE motion_mode, last_motion_mode_allowed;
int rate2_nocoeff = 0, best_xskip, best_disable_skip = 0;
@@ -8084,7 +8075,6 @@
MB_MODE_INFO base_mbmi, best_mbmi;
uint8_t best_blk_skip[MAX_MB_PLANE][MAX_MIB_SIZE * MAX_MIB_SIZE * 4];
-#if CONFIG_WARPED_MOTION
#if CONFIG_EXT_WARPED_MOTION
int pts0[SAMPLES_ARRAY_SIZE], pts_inref0[SAMPLES_ARRAY_SIZE];
int pts_mv0[SAMPLES_ARRAY_SIZE];
@@ -8092,12 +8082,10 @@
#else
int pts[SAMPLES_ARRAY_SIZE], pts_inref[SAMPLES_ARRAY_SIZE];
#endif // CONFIG_EXT_WARPED_MOTION
-#endif // CONFIG_WARPED_MOTION
av1_invalid_rd_stats(&best_rd_stats);
if (cm->interp_filter == SWITCHABLE) rd_stats->rate += rs;
-#if CONFIG_WARPED_MOTION
aom_clear_system_state();
#if CONFIG_EXT_WARPED_MOTION
mbmi->num_proj_ref[0] =
@@ -8107,13 +8095,8 @@
mbmi->num_proj_ref[0] = findSamples(cm, xd, mi_row, mi_col, pts, pts_inref);
#endif // CONFIG_EXT_WARPED_MOTION
best_bmc_mbmi->num_proj_ref[0] = mbmi->num_proj_ref[0];
-#endif // CONFIG_WARPED_MOTION
rate2_nocoeff = rd_stats->rate;
- last_motion_mode_allowed = motion_mode_allowed(0, xd->global_motion,
-#if CONFIG_WARPED_MOTION
- xd,
-#endif
- mi);
+ last_motion_mode_allowed = motion_mode_allowed(0, xd->global_motion, xd, mi);
base_mbmi = *mbmi;
int64_t best_rd = INT64_MAX;
@@ -8167,7 +8150,6 @@
&tmp_dist, skip_txfm_sb, skip_sse_sb);
}
-#if CONFIG_WARPED_MOTION
if (mbmi->motion_mode == WARPED_CAUSAL) {
#if CONFIG_EXT_WARPED_MOTION
int pts[SAMPLES_ARRAY_SIZE], pts_inref[SAMPLES_ARRAY_SIZE];
@@ -8251,7 +8233,6 @@
continue;
}
}
-#endif // CONFIG_WARPED_MOTION
x->skip = 0;
rd_stats->dist = 0;
@@ -8259,20 +8240,14 @@
rd_stats->skip = 1;
rd_stats->rate = tmp_rate2;
if (last_motion_mode_allowed > SIMPLE_TRANSLATION) {
-#if CONFIG_WARPED_MOTION
if (last_motion_mode_allowed == WARPED_CAUSAL)
-#endif // CONFIG_WARPED_MOTION
rd_stats->rate += x->motion_mode_cost[bsize][mbmi->motion_mode];
-#if CONFIG_WARPED_MOTION
else
rd_stats->rate += x->motion_mode_cost1[bsize][mbmi->motion_mode];
-#endif // CONFIG_WARPED_MOTION
}
-#if CONFIG_WARPED_MOTION
if (mbmi->motion_mode == WARPED_CAUSAL) {
rd_stats->rate -= rs;
}
-#endif // CONFIG_WARPED_MOTION
if (!*skip_txfm_sb) {
int64_t rdcosty = INT64_MAX;
int is_cost_valid_uv = 0;
@@ -8511,10 +8486,8 @@
// to tmp_buf at the end of the last iteration
assert(xd->plane[0].dst.buf != tmp_buf);
-#if CONFIG_WARPED_MOTION
mbmi->num_proj_ref[0] = 0;
mbmi->num_proj_ref[1] = 0;
-#endif // CONFIG_WARPED_MOTION
if (is_comp_pred) {
if (frame_mv[refs[0]].as_int == INVALID_MV ||
@@ -11176,11 +11149,7 @@
if (mbmi->mode == ZEROMV || mbmi->mode == ZERO_ZEROMV) {
// Correct the motion mode for ZEROMV
const MOTION_MODE last_motion_mode_allowed =
- motion_mode_allowed(0, xd->global_motion,
-#if CONFIG_WARPED_MOTION
- xd,
-#endif
- xd->mi[0]);
+ motion_mode_allowed(0, xd->global_motion, xd, xd->mi[0]);
if (mbmi->motion_mode > last_motion_mode_allowed)
mbmi->motion_mode = last_motion_mode_allowed;
@@ -11291,7 +11260,6 @@
mbmi->motion_mode = SIMPLE_TRANSLATION;
av1_count_overlappable_neighbors(cm, xd, mi_row, mi_col);
-#if CONFIG_WARPED_MOTION
if (is_motion_variation_allowed_bsize(bsize) && !has_second_ref(mbmi)) {
int pts[SAMPLES_ARRAY_SIZE], pts_inref[SAMPLES_ARRAY_SIZE];
#if CONFIG_EXT_WARPED_MOTION
@@ -11306,7 +11274,6 @@
mbmi->num_proj_ref[0] = findSamples(cm, xd, mi_row, mi_col, pts, pts_inref);
#endif // CONFIG_EXT_WARPED_MOTION
}
-#endif
set_default_interp_filters(mbmi, cm->interp_filter);
@@ -11726,13 +11693,10 @@
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
BLOCK_SIZE bsize = mbmi->sb_type;
-#if CONFIG_NCOBMC_ADAPT_WEIGHT && CONFIG_WARPED_MOTION
- const MOTION_MODE motion_allowed = motion_mode_allowed(0, xd->global_motion,
-#if CONFIG_WARPED_MOTION
- xd,
-#endif
- xd->mi[0]);
-#endif // CONFIG_NCOBMC_ADAPT_WEIGHT && CONFIG_WARPED_MOTION
+#if CONFIG_NCOBMC_ADAPT_WEIGHT
+ const MOTION_MODE motion_allowed =
+ motion_mode_allowed(0, xd->global_motion, xd, xd->mi[0]);
+#endif // CONFIG_NCOBMC_ADAPT_WEIGHT
RD_STATS rd_stats_y, rd_stats_uv;
const int skip_ctx = av1_get_skip_context(xd);
int rate_skip0 = x->skip_cost[skip_ctx][0];
@@ -11810,7 +11774,6 @@
this_rd = RDCOST(x->rdmult, (rd_stats_y.rate + rd_stats_uv.rate),
(rd_stats_y.dist + rd_stats_uv.dist));
-#if CONFIG_WARPED_MOTION
if (motion_allowed == NCOBMC_ADAPT_WEIGHT) {
assert(mbmi->motion_mode <= NCOBMC_ADAPT_WEIGHT);
this_rd +=
@@ -11820,12 +11783,9 @@
this_rd +=
RDCOST(x->rdmult, x->motion_mode_cost1[bsize][mbmi->motion_mode], 0);
} else {
-#endif // CONFIG_WARPED_MOTION
this_rd +=
RDCOST(x->rdmult, x->motion_mode_cost[bsize][mbmi->motion_mode], 0);
-#if CONFIG_WARPED_MOTION
}
-#endif // CONFIG_WARPED_MOTION
return this_rd;
}
@@ -11842,38 +11802,30 @@
MB_MODE_INFO st_mbmi, obmc_mbmi, ncobmc_mbmi;
int st_skip, obmc_skip, ncobmc_skip;
int64_t st_rd, obmc_rd, ncobmc_rd;
-#if CONFIG_WARPED_MOTION
const AV1_COMMON *const cm = &cpi->common;
const int is_warp_motion = mbmi->motion_mode == WARPED_CAUSAL;
const int rs = RDCOST(x->rdmult, av1_get_switchable_rate(cm, x, xd), 0);
MB_MODE_INFO warp_mbmi;
int64_t warp_rd;
int warp_skip;
-#endif
// Recompute the rd for the motion mode decided in rd loop
mbmi->motion_mode = SIMPLE_TRANSLATION;
st_rd = get_prediction_rd_cost(cpi, x, mi_row, mi_col, &st_skip, &st_mbmi);
-#if CONFIG_WARPED_MOTION
st_rd += rs;
-#endif
memcpy(st_blk_skip, x->blk_skip[0], sizeof(st_blk_skip[0]) * n4);
mbmi->motion_mode = OBMC_CAUSAL;
obmc_rd =
get_prediction_rd_cost(cpi, x, mi_row, mi_col, &obmc_skip, &obmc_mbmi);
-#if CONFIG_WARPED_MOTION
obmc_rd += rs;
-#endif
memcpy(obmc_blk_skip, x->blk_skip[0], sizeof(obmc_blk_skip[0]) * n4);
// Compute the rd cost for ncobmc adaptive weight
mbmi->motion_mode = NCOBMC_ADAPT_WEIGHT;
ncobmc_rd = get_prediction_rd_cost(cpi, x, mi_row, mi_col, &ncobmc_skip,
&ncobmc_mbmi);
-#if CONFIG_WARPED_MOTION
ncobmc_rd += rs;
-#endif
// Calculate the ncobmc mode costs
{
ADAPT_OVERLAP_BLOCK aob = adapt_overlap_block_lookup[bsize];
@@ -11885,7 +11837,6 @@
}
memcpy(ncobmc_blk_skip, x->blk_skip[0], sizeof(ncobmc_blk_skip[0]) * n4);
-#if CONFIG_WARPED_MOTION
if (is_warp_motion) {
mbmi->motion_mode = WARPED_CAUSAL;
warp_rd =
@@ -11893,9 +11844,7 @@
} else {
warp_rd = INT64_MAX;
}
-#endif
-#if CONFIG_WARPED_MOTION
if (AOMMIN(ncobmc_rd, warp_rd) < AOMMIN(st_rd, obmc_rd)) {
if (ncobmc_rd < warp_rd) {
x->skip = ncobmc_skip;
@@ -11905,12 +11854,6 @@
x->skip = warp_skip;
*mbmi = warp_mbmi;
}
-#else
- if (ncobmc_rd < AOMMIN(st_rd, obmc_rd)) {
- x->skip = ncobmc_skip;
- *mbmi = ncobmc_mbmi;
- memcpy(x->blk_skip[0], ncobmc_blk_skip, sizeof(ncobmc_blk_skip[0]) * n4);
-#endif // CONFIG_WARPED_MOTION
} else {
if (obmc_rd < st_rd) {
*mbmi = obmc_mbmi;
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake
index 9c8728f..9f019d9 100644
--- a/build/cmake/aom_config_defaults.cmake
+++ b/build/cmake/aom_config_defaults.cmake
@@ -201,5 +201,4 @@
set(CONFIG_UNPOISON_PARTITION_CTX 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_VAR_REFS 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_VAR_TX_NO_TX_MODE 0 CACHE NUMBER "AV1 experiment flag.")
-set(CONFIG_WARPED_MOTION 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_XIPHRC 0 CACHE NUMBER "AV1 experiment flag.")
diff --git a/configure b/configure
index d6edbb6..3ea2034 100755
--- a/configure
+++ b/configure
@@ -273,7 +273,6 @@
unpoison_partition_ctx
ext_tile
ncobmc
- warped_motion
q_adapt_probs
inter_stats_only
palette_delta_encoding
@@ -505,7 +504,6 @@
soft_enable intra_edge
soft_enable mv_compress
soft_enable dual_filter
- soft_enable warped_motion
soft_enable interintra
soft_enable one_sided_compound
soft_enable convolve_round
@@ -562,7 +560,6 @@
enabled txmg && enable_feature highbitdepth
enabled ext_skip && enable_feature frame_marker
enabled horzonly_frame_superres && enable_feature frame_superres
- enabled ext_warped_motion && enable_feature warped_motion
enabled loopfilter_level && enable_feature parallel_deblocking
enabled loopfilter_level && enable_feature ext_delta_q
diff --git a/tools/aom_entropy_optimizer.c b/tools/aom_entropy_optimizer.c
index c15fa1e..9f9e0a1 100644
--- a/tools/aom_entropy_optimizer.c
+++ b/tools/aom_entropy_optimizer.c
@@ -516,7 +516,6 @@
&fc.motion_mode[0][0], probsfile, 2, cts_each_dim,
"static const aom_cdf_prob\n"
"default_motion_mode_cdf[BLOCK_SIZES_ALL][CDF_SIZE(MOTION_MODES)]");
-#if CONFIG_WARPED_MOTION
cts_each_dim[0] = BLOCK_SIZES_ALL;
cts_each_dim[1] = 2;
optimize_entropy_table(
@@ -525,7 +524,6 @@
optimize_cdf_table(&fc.obmc[0][0], probsfile, 2, cts_each_dim,
"static const aom_cdf_prob "
"default_obmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)]");
-#endif // CONFIG_WARPED_MOTION
#if CONFIG_NCOBMC_ADAPT_WEIGHT
cts_each_dim[0] = ADAPT_OVERLAP_BLOCKS;
cts_each_dim[1] = MAX_NCOBMC_MODES;
@@ -538,7 +536,6 @@
"static const aom_cdf_prob\n"
"default_ncobmc_mode_cdf[ADAPT_OVERLAP_BLOCKS]"
"[CDF_SIZE(MAX_NCOBMC_MODES)]");
-#if CONFIG_WARPED_MOTION
cts_each_dim[0] = BLOCK_SIZES_ALL;
cts_each_dim[1] = OBMC_FAMILY_MODES;
optimize_entropy_table(
@@ -549,7 +546,6 @@
"static const aom_cdf_prob\n"
"default_ncobmc_cdf[BLOCK_SIZES_ALL]"
"[CDF_SIZE(OBMC_FAMILY_MODES)]");
-#endif
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT
/* Intra/inter flag */