Commit 1f56b8e3 authored by Sebastien Alaiwan's avatar Sebastien Alaiwan

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
parent e4984ffc
...@@ -377,10 +377,8 @@ typedef struct MB_MODE_INFO { ...@@ -377,10 +377,8 @@ typedef struct MB_MODE_INFO {
int mi_row; int mi_row;
int mi_col; int mi_col;
#endif #endif
#if CONFIG_WARPED_MOTION
int num_proj_ref[2]; int num_proj_ref[2];
WarpedMotionParams wm_params[2]; WarpedMotionParams wm_params[2];
#endif // CONFIG_WARPED_MOTION
#if CONFIG_CFL #if CONFIG_CFL
// Index of the alpha Cb and alpha Cr combination // Index of the alpha Cb and alpha Cr combination
...@@ -1399,10 +1397,7 @@ static INLINE NCOBMC_MODE ncobmc_mode_allowed_bsize(BLOCK_SIZE bsize) { ...@@ -1399,10 +1397,7 @@ static INLINE NCOBMC_MODE ncobmc_mode_allowed_bsize(BLOCK_SIZE bsize) {
static INLINE MOTION_MODE static INLINE MOTION_MODE
motion_mode_allowed(int block, const WarpedMotionParams *gm_params, motion_mode_allowed(int block, const WarpedMotionParams *gm_params,
#if CONFIG_WARPED_MOTION const MACROBLOCKD *xd, const MODE_INFO *mi) {
const MACROBLOCKD *xd,
#endif
const MODE_INFO *mi) {
const MB_MODE_INFO *mbmi = &mi->mbmi; const MB_MODE_INFO *mbmi = &mi->mbmi;
#if CONFIG_AMVR #if CONFIG_AMVR
if (xd->cur_frame_force_integer_mv == 0) { if (xd->cur_frame_force_integer_mv == 0) {
...@@ -1416,7 +1411,6 @@ motion_mode_allowed(int block, const WarpedMotionParams *gm_params, ...@@ -1416,7 +1411,6 @@ motion_mode_allowed(int block, const WarpedMotionParams *gm_params,
is_inter_mode(mbmi->mode) && mbmi->ref_frame[1] != INTRA_FRAME && is_inter_mode(mbmi->mode) && mbmi->ref_frame[1] != INTRA_FRAME &&
is_motion_variation_allowed_compound(mbmi)) { is_motion_variation_allowed_compound(mbmi)) {
if (!check_num_overlappable_neighbors(mbmi)) return SIMPLE_TRANSLATION; if (!check_num_overlappable_neighbors(mbmi)) return SIMPLE_TRANSLATION;
#if CONFIG_WARPED_MOTION
if (!has_second_ref(mbmi) && mbmi->num_proj_ref[0] >= 1 && if (!has_second_ref(mbmi) && mbmi->num_proj_ref[0] >= 1 &&
!av1_is_scaled(&(xd->block_refs[0]->sf))) { !av1_is_scaled(&(xd->block_refs[0]->sf))) {
#if CONFIG_AMVR #if CONFIG_AMVR
...@@ -1427,7 +1421,6 @@ motion_mode_allowed(int block, const WarpedMotionParams *gm_params, ...@@ -1427,7 +1421,6 @@ motion_mode_allowed(int block, const WarpedMotionParams *gm_params,
return WARPED_CAUSAL; return WARPED_CAUSAL;
} }
#endif // CONFIG_WARPED_MOTION
#if CONFIG_NCOBMC_ADAPT_WEIGHT #if CONFIG_NCOBMC_ADAPT_WEIGHT
if (ncobmc_mode_allowed_bsize(mbmi->sb_type) < NO_OVERLAP) if (ncobmc_mode_allowed_bsize(mbmi->sb_type) < NO_OVERLAP)
return NCOBMC_ADAPT_WEIGHT; return NCOBMC_ADAPT_WEIGHT;
...@@ -1441,16 +1434,10 @@ motion_mode_allowed(int block, const WarpedMotionParams *gm_params, ...@@ -1441,16 +1434,10 @@ motion_mode_allowed(int block, const WarpedMotionParams *gm_params,
static INLINE void assert_motion_mode_valid(MOTION_MODE mode, int block, static INLINE void assert_motion_mode_valid(MOTION_MODE mode, int block,
const WarpedMotionParams *gm_params, const WarpedMotionParams *gm_params,
#if CONFIG_WARPED_MOTION
const MACROBLOCKD *xd, const MACROBLOCKD *xd,
#endif
const MODE_INFO *mi) { const MODE_INFO *mi) {
const MOTION_MODE last_motion_mode_allowed = const MOTION_MODE last_motion_mode_allowed =
motion_mode_allowed(block, gm_params, motion_mode_allowed(block, gm_params, xd, mi);
#if CONFIG_WARPED_MOTION
xd,
#endif
mi);
// Check that the input mode is not illegal // Check that the input mode is not illegal
if (last_motion_mode_allowed < mode) if (last_motion_mode_allowed < mode)
......
...@@ -2383,10 +2383,8 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc, ...@@ -2383,10 +2383,8 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc,
#if CONFIG_NEW_MULTISYMBOL #if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(intra_inter_cdf) AVERAGE_TILE_CDFS(intra_inter_cdf)
AVERAGE_TILE_CDFS(motion_mode_cdf) AVERAGE_TILE_CDFS(motion_mode_cdf)
#if CONFIG_WARPED_MOTION
AVERAGE_TILE_CDFS(obmc_cdf) AVERAGE_TILE_CDFS(obmc_cdf)
#endif #endif
#endif
#if CONFIG_MRC_TX #if CONFIG_MRC_TX
AVERAGE_TILE_CDFS(mrc_mask_inter_cdf) AVERAGE_TILE_CDFS(mrc_mask_inter_cdf)
#endif // CONFIG_MRC_TX #endif // CONFIG_MRC_TX
......
...@@ -928,136 +928,6 @@ static const aom_cdf_prob ...@@ -928,136 +928,6 @@ static const aom_cdf_prob
#endif // TWO_MODEE #endif // TWO_MODEE
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT #endif // CONFIG_NCOBMC_ADAPT_WEIGHT
// Change this section appropriately once warped motion is supported // 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 #if CONFIG_NCOBMC_ADAPT_WEIGHT
const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = { const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {
-SIMPLE_TRANSLATION, 2, -OBMC_CAUSAL, 4, -NCOBMC_ADAPT_WEIGHT, -WARPED_CAUSAL -SIMPLE_TRANSLATION, 2, -OBMC_CAUSAL, 4, -NCOBMC_ADAPT_WEIGHT, -WARPED_CAUSAL
...@@ -1257,7 +1127,6 @@ static const aom_cdf_prob default_obmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)] = { ...@@ -1257,7 +1127,6 @@ static const aom_cdf_prob default_obmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)] = {
#endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION
}; };
#endif // CONFIG_NEW_MULTISYMBOL #endif // CONFIG_NEW_MULTISYMBOL
#endif
static const aom_prob default_delta_q_probs[DELTA_Q_PROBS] = { 220, 220, 220 }; 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)] = { static const aom_cdf_prob default_delta_q_cdf[CDF_SIZE(DELTA_Q_PROBS + 1)] = {
...@@ -6111,7 +5980,6 @@ static void init_mode_probs(FRAME_CONTEXT *fc) { ...@@ -6111,7 +5980,6 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
av1_copy(fc->ncobmc_mode_prob, default_ncobmc_mode_prob); av1_copy(fc->ncobmc_mode_prob, default_ncobmc_mode_prob);
av1_copy(fc->ncobmc_mode_cdf, default_ncobmc_mode_cdf); av1_copy(fc->ncobmc_mode_cdf, default_ncobmc_mode_cdf);
#endif #endif
#if CONFIG_WARPED_MOTION
av1_copy(fc->obmc_prob, default_obmc_prob); av1_copy(fc->obmc_prob, default_obmc_prob);
#if CONFIG_NEW_MULTISYMBOL || CONFIG_NCOBMC_ADAPT_WEIGHT #if CONFIG_NEW_MULTISYMBOL || CONFIG_NCOBMC_ADAPT_WEIGHT
av1_copy(fc->obmc_cdf, default_obmc_cdf); av1_copy(fc->obmc_cdf, default_obmc_cdf);
...@@ -6120,7 +5988,6 @@ static void init_mode_probs(FRAME_CONTEXT *fc) { ...@@ -6120,7 +5988,6 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
av1_copy(fc->ncobmc_prob, default_ncobmc_prob); av1_copy(fc->ncobmc_prob, default_ncobmc_prob);
av1_copy(fc->ncobmc_cdf, default_ncobmc_cdf); av1_copy(fc->ncobmc_cdf, default_ncobmc_cdf);
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT #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_probs, default_inter_compound_mode_probs);
av1_copy(fc->inter_compound_mode_cdf, default_inter_compound_mode_cdf); av1_copy(fc->inter_compound_mode_cdf, default_inter_compound_mode_cdf);
#if CONFIG_COMPOUND_SINGLEREF #if CONFIG_COMPOUND_SINGLEREF
...@@ -6266,17 +6133,13 @@ void av1_adapt_inter_frame_probs(AV1_COMMON *cm) { ...@@ -6266,17 +6133,13 @@ void av1_adapt_inter_frame_probs(AV1_COMMON *cm) {
for (i = 0; i < ADAPT_OVERLAP_BLOCKS; ++i) for (i = 0; i < ADAPT_OVERLAP_BLOCKS; ++i)
aom_tree_merge_probs(av1_ncobmc_mode_tree, pre_fc->ncobmc_mode_prob[i], aom_tree_merge_probs(av1_ncobmc_mode_tree, pre_fc->ncobmc_mode_prob[i],
counts->ncobmc_mode[i], 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) for (i = BLOCK_8X8; i < BLOCK_SIZES_ALL; ++i)
aom_tree_merge_probs(av1_ncobmc_tree, pre_fc->ncobmc_prob[i], aom_tree_merge_probs(av1_ncobmc_tree, pre_fc->ncobmc_prob[i],
counts->ncobmc[i], fc->ncobmc_prob[i]); counts->ncobmc[i], fc->ncobmc_prob[i]);
#endif
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT #endif // CONFIG_NCOBMC_ADAPT_WEIGHT
#if CONFIG_WARPED_MOTION
for (i = BLOCK_8X8; i < BLOCK_SIZES_ALL; ++i) for (i = BLOCK_8X8; i < BLOCK_SIZES_ALL; ++i)
fc->obmc_prob[i] = fc->obmc_prob[i] =
av1_mode_mv_merge_probs(pre_fc->obmc_prob[i], counts->obmc[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++) for (i = 0; i < INTER_MODE_CONTEXTS; i++)
aom_tree_merge_probs( aom_tree_merge_probs(
......
...@@ -225,7 +225,6 @@ typedef struct frame_contexts { ...@@ -225,7 +225,6 @@ typedef struct frame_contexts {
aom_cdf_prob ncobmc_mode_cdf[ADAPT_OVERLAP_BLOCKS] aom_cdf_prob ncobmc_mode_cdf[ADAPT_OVERLAP_BLOCKS]
[CDF_SIZE(MAX_NCOBMC_MODES)]; [CDF_SIZE(MAX_NCOBMC_MODES)];
#endif #endif
#if CONFIG_WARPED_MOTION
#if CONFIG_NCOBMC_ADAPT_WEIGHT #if CONFIG_NCOBMC_ADAPT_WEIGHT
aom_prob ncobmc_prob[BLOCK_SIZES_ALL][OBMC_FAMILY_MODES - 1]; aom_prob ncobmc_prob[BLOCK_SIZES_ALL][OBMC_FAMILY_MODES - 1];
aom_cdf_prob ncobmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(OBMC_FAMILY_MODES)]; aom_cdf_prob ncobmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(OBMC_FAMILY_MODES)];
...@@ -234,7 +233,6 @@ typedef struct frame_contexts { ...@@ -234,7 +233,6 @@ typedef struct frame_contexts {
#if CONFIG_NEW_MULTISYMBOL || CONFIG_NCOBMC_ADAPT_WEIGHT #if CONFIG_NEW_MULTISYMBOL || CONFIG_NCOBMC_ADAPT_WEIGHT
aom_cdf_prob obmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)]; aom_cdf_prob obmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)];
#endif // CONFIG_NEW_MULTISYMBOL #endif // CONFIG_NEW_MULTISYMBOL
#endif // CONFIG_WARPED_MOTION
aom_prob intra_inter_prob[INTRA_INTER_CONTEXTS]; aom_prob intra_inter_prob[INTRA_INTER_CONTEXTS];
aom_prob comp_inter_prob[COMP_INTER_CONTEXTS]; aom_prob comp_inter_prob[COMP_INTER_CONTEXTS];
aom_cdf_prob palette_y_size_cdf[PALETTE_BLOCK_SIZES][CDF_SIZE(PALETTE_SIZES)]; aom_cdf_prob palette_y_size_cdf[PALETTE_BLOCK_SIZES][CDF_SIZE(PALETTE_SIZES)];
...@@ -457,12 +455,10 @@ typedef struct FRAME_COUNTS { ...@@ -457,12 +455,10 @@ typedef struct FRAME_COUNTS {
#if CONFIG_NCOBMC_ADAPT_WEIGHT #if CONFIG_NCOBMC_ADAPT_WEIGHT
unsigned int ncobmc_mode[ADAPT_OVERLAP_BLOCKS][MAX_NCOBMC_MODES]; unsigned int ncobmc_mode[ADAPT_OVERLAP_BLOCKS][MAX_NCOBMC_MODES];
#endif #endif
#if CONFIG_WARPED_MOTION
#if CONFIG_NCOBMC_ADAPT_WEIGHT #if CONFIG_NCOBMC_ADAPT_WEIGHT
unsigned int ncobmc[BLOCK_SIZES_ALL][OBMC_FAMILY_MODES]; unsigned int ncobmc[BLOCK_SIZES_ALL][OBMC_FAMILY_MODES];
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT #endif // CONFIG_NCOBMC_ADAPT_WEIGHT
unsigned int obmc[BLOCK_SIZES_ALL][2]; unsigned int obmc[BLOCK_SIZES_ALL][2];
#endif // CONFIG_WARPED_MOTION
unsigned int intra_inter[INTRA_INTER_CONTEXTS][2]; unsigned int intra_inter[INTRA_INTER_CONTEXTS][2];
unsigned int comp_inter[COMP_INTER_CONTEXTS][2]; unsigned int comp_inter[COMP_INTER_CONTEXTS][2];
#if CONFIG_EXT_COMP_REFS #if CONFIG_EXT_COMP_REFS
...@@ -641,9 +637,7 @@ extern const aom_tree_index av1_ext_tx_tree[TREE_SIZE(TX_TYPES)]; ...@@ -641,9 +637,7 @@ extern const aom_tree_index av1_ext_tx_tree[TREE_SIZE(TX_TYPES)];
extern const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)]; extern const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)];
#if CONFIG_NCOBMC_ADAPT_WEIGHT #if CONFIG_NCOBMC_ADAPT_WEIGHT
extern const aom_tree_index av1_ncobmc_mode_tree[TREE_SIZE(MAX_NCOBMC_MODES)]; 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)]; extern const aom_tree_index av1_ncobmc_tree[TREE_SIZE(OBMC_FAMILY_MODES)];
#endif // CONFIG_WARPED_MOTION
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT #endif // CONFIG_NCOBMC_ADAPT_WEIGHT
#if CONFIG_LOOP_RESTORATION #if CONFIG_LOOP_RESTORATION
#define RESTORE_NONE_SGRPROJ_PROB 64 #define RESTORE_NONE_SGRPROJ_PROB 64
......
...@@ -576,12 +576,10 @@ typedef enum ATTRIBUTE_PACKED { ...@@ -576,12 +576,10 @@ typedef enum ATTRIBUTE_PACKED {
OBMC_CAUSAL, // 2-sided OBMC OBMC_CAUSAL, // 2-sided OBMC
#if CONFIG_NCOBMC_ADAPT_WEIGHT #if CONFIG_NCOBMC_ADAPT_WEIGHT
NCOBMC_ADAPT_WEIGHT, NCOBMC_ADAPT_WEIGHT,
#endif // CONFIG_NCOBMC_ADAPT_WEIGHT #endif // CONFIG_NCOBMC_ADAPT_WEIGHT
#if CONFIG_WARPED_MOTION
WARPED_CAUSAL, // 2-sided WARPED WARPED_CAUSAL, // 2-sided WARPED
#endif // CONFIG_WARPED_MOTION
MOTION_MODES MOTION_MODES
#if CONFIG_NCOBMC_ADAPT_WEIGHT && CONFIG_WARPED_MOTION #if CONFIG_NCOBMC_ADAPT_WEIGHT
, ,
OBMC_FAMILY_MODES = NCOBMC_ADAPT_WEIGHT + 1 OBMC_FAMILY_MODES = NCOBMC_ADAPT_WEIGHT + 1
#endif #endif
......
...@@ -91,9 +91,7 @@ typedef enum { ...@@ -91,9 +91,7 @@ typedef enum {
typedef struct { typedef struct {
int global_warp_allowed; int global_warp_allowed;
#if CONFIG_WARPED_MOTION
int local_warp_allowed; int local_warp_allowed;
#endif // CONFIG_WARPED_MOTION
} WarpTypesAllowed; } WarpTypesAllowed;
// number of parameters used by each transformation in TransformationTypes // number of parameters used by each transformation in TransformationTypes
......
...@@ -10,9 +10,7 @@ ...@@ -10,9 +10,7 @@
*/ */
#include "av1/common/mvref_common.h" #include "av1/common/mvref_common.h"
#if CONFIG_WARPED_MOTION
#include "av1/common/warped_motion.h" #include "av1/common/warped_motion.h"
#endif // CONFIG_WARPED_MOTION
#define USE_CUR_GM_REFMV 1 #define USE_CUR_GM_REFMV 1
...@@ -1799,7 +1797,6 @@ void av1_setup_motion_field(AV1_COMMON *cm) { ...@@ -1799,7 +1797,6 @@ void av1_setup_motion_field(AV1_COMMON *cm) {
} }
#endif // CONFIG_MFMV #endif // CONFIG_MFMV
#if CONFIG_WARPED_MOTION
#if CONFIG_EXT_WARPED_MOTION #if CONFIG_EXT_WARPED_MOTION
static INLINE void record_samples(MB_MODE_INFO *mbmi, int *pts, int *pts_inref, static INLINE void record_samples(MB_MODE_INFO *mbmi, int *pts, int *pts_inref,
int *pts_mv, int global_offset_r, int *pts_mv, int global_offset_r,
...@@ -2129,4 +2126,3 @@ int findSamples(const AV1_COMMON *cm, MACROBLOCKD *xd, int mi_row, int mi_col, ...@@ -2129,4 +2126,3 @@ int findSamples(const AV1_COMMON *cm, MACROBLOCKD *xd, int mi_row, int mi_col,
return np; return np;
} }
#endif // CONFIG_EXT_WARPED_MOTION #endif // CONFIG_EXT_WARPED_MOTION
#endif // CONFIG_WARPED_MOTION
...@@ -417,7 +417,6 @@ void av1_update_mv_context(const AV1_COMMON *cm, const MACROBLOCKD *xd, ...@@ -417,7 +417,6 @@ void av1_update_mv_context(const AV1_COMMON *cm, const MACROBLOCKD *xd,
int_mv *mv_ref_list, int block, int mi_row, int_mv *mv_ref_list, int block, int mi_row,
int mi_col, int16_t *mode_context); int mi_col, int16_t *mode_context);
#if CONFIG_WARPED_MOTION
#if CONFIG_EXT_WARPED_MOTION #if CONFIG_EXT_WARPED_MOTION
int sortSamples(int *pts_mv, MV *mv, int *pts, int *pts_inref, int len); 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, 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, ...@@ -426,7 +425,6 @@ int findSamples(const AV1_COMMON *cm, MACROBLOCKD *xd, int mi_row, int mi_col,
int findSamples(const AV1_COMMON *cm, MACROBLOCKD *xd, int mi_row, int mi_col, int findSamples(const AV1_COMMON *cm, MACROBLOCKD *xd, int mi_row, int mi_col,
int *pts, int *pts_inref); int *pts, int *pts_inref);
#endif // CONFIG_EXT_WARPED_MOTION #endif // CONFIG_EXT_WARPED_MOTION
#endif // CONFIG_WARPED_MOTION
#if CONFIG_INTRABC #if CONFIG_INTRABC
static INLINE void av1_find_ref_dv(int_mv *ref_dv, int mi_row, int mi_col) { static INLINE void av1_find_ref_dv(int_mv *ref_dv, int mi_row, int mi_col) {
......
...@@ -38,29 +38,13 @@ static INLINE int allow_warp(const MODE_INFO *const mi, ...@@ -38,29 +38,13 @@ static INLINE int allow_warp(const MODE_INFO *const mi,
const MB_MODE_INFO *const mbmi = &mi->mbmi; const MB_MODE_INFO *const mbmi = &mi->mbmi;
*final_warp_params = default_warp_params; *final_warp_params = default_warp_params;
#if CONFIG_WARPED_MOTION
if (mbmi->wm_params[0].invalid) return 0; if (mbmi->wm_params[0].invalid) return 0;
#endif
// Motion var and global motion configured // 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 warped motion configured // Motion var and warped motion configured
// Motion var, warped motion and global motion all configured // Motion var, warped motion and global motion all configured
#if CONFIG_WARPED_MOTION
if (warp_types->local_warp_allowed) { if (warp_types->local_warp_allowed) {
if ((build_for_obmc && WARP_WM_NEIGHBORS_WITH_OBMC) || (!build_for_obmc)) { if ((build_for_obmc && WARP_WM_NEIGHBORS_WITH_OBMC) || (!build_for_obmc)) {
memcpy(final_warp_params, &mbmi->wm_params[0], memcpy(final_warp_params, &mbmi->wm_params[0],
...@@ -72,7 +56,6 @@ static INLINE int allow_warp(const MODE_INFO *const mi, ...@@ -72,7 +56,6 @@ static INLINE int allow_warp(const MODE_INFO *const mi,
memcpy(final_warp_params, gm_params, sizeof(*final_warp_params)); memcpy(final_warp_params, gm_params, sizeof(*final_warp_params));
return 1; return 1;
} }
#endif // CONFIG_WARPED_MOTION
return 0; return 0;
} }
...@@ -87,11 +70,7 @@ static INLINE void av1_make_inter_predictor( ...@@ -87,11 +70,7 @@ static INLINE void av1_make_inter_predictor(
(void)xd; (void)xd;
// Make sure the selected motion mode is valid for this configuration // Make sure the selected motion mode is valid for this configuration
assert_motion_mode_valid(mi->mbmi.motion_mode, 0, xd->global_motion, assert_motion_mode_valid(mi->mbmi.motion_mode, 0, xd->global_motion, xd, mi);
#if CONFIG_WARPED_MOTION
xd,
#endif
mi);
WarpedMotionParams final_warp_params; WarpedMotionParams final_warp_params;
const int do_warp = const int do_warp =
...@@ -1133,10 +1112,8 @@ static INLINE void build_inter_predictors(const AV1_COMMON *cm, MACROBLOCKD *xd, ...@@ -1133,10 +1112,8 @@ static INLINE void build_inter_predictors(const AV1_COMMON *cm, MACROBLOCKD *xd,
const int is_scaled = av1_is_scaled(sf); const int is_scaled = av1_is_scaled(sf);
WarpTypesAllowed warp_types; WarpTypesAllowed warp_types;
warp_types.global_warp_allowed = is_global[ref]; warp_types.global_warp_allowed = is_global[ref];
#if CONFIG_WARPED_MOTION
warp_types.local_warp_allowed = warp_types.local_warp_allowed =
this_mbmi->motion_mode == WARPED_CAUSAL; this_mbmi->motion_mode == WARPED_CAUSAL;
#endif // CONFIG_WARPED_MOTION
if (is_scaled) { if (is_scaled) {
int ssx = pd->subsampling_x; int ssx = pd->subsampling_x;
...@@ -1334,9 +1311,7 @@ static INLINE void build_inter_predictors(const AV1_COMMON *cm, MACROBLOCKD *xd, ...@@ -1334,9 +1311,7 @@ static INLINE void build_inter_predictors(const AV1_COMMON *cm, MACROBLOCKD *xd,
#endif // CONFIG_INTRABC #endif // CONFIG_INTRABC
WarpTypesAllowed warp_types; WarpTypesAllowed warp_types;
warp_types.global_warp_allowed = is_global[ref]; warp_types.global_warp_allowed = is_global[ref];
#if CONFIG_WARPED_MOTION
warp_types.local_warp_allowed = mi->mbmi.motion_mode == WARPED_CAUSAL; warp_types.local_warp_allowed = mi->mbmi.motion_mode == WARPED_CAUSAL;
#endif // CONFIG_WARPED_MOTION
conv_params.ref = ref; conv_params.ref = ref;
conv_params.do_average = ref; conv_params.do_average = ref;
if (is_masked_compound_type(mi->mbmi.interinter_compound_type)) { if (is_masked_compound_type(mi->mbmi.interinter_compound_type)) {
...@@ -2670,9 +2645,7 @@ static void build_inter_predictors_single_buf(MACROBLOCKD *xd, int plane, ...@@ -2670,9 +2645,7 @@ static void build_inter_predictors_single_buf(MACROBLOCKD *xd, int plane,
WarpedMotionParams *const wm = &xd->global_motion[mi->mbmi.ref_frame[ref]]; WarpedMotionParams *const wm = &xd->global_motion[mi->mbmi.ref_frame[ref]];
#endif // CONFIG_COMPOUND_SINGLEREF #endif // CONFIG_COMPOUND_SINGLEREF
warp_types.global_warp_allowed = is_global_mv_block(mi, block, wm->wmtype); 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; warp_types.local_warp_allowed = mi->mbmi.motion_mode == WARPED_CAUSAL;
#endif // CONFIG_WARPED_MOTION
if (is_scaled) { if (is_scaled) {
int ssx = pd->subsampling_x; int ssx = pd->subsampling_x;
......
...@@ -18,9 +18,7 @@ ...@@ -18,9 +18,7 @@
#include "av1/common/warped_motion.h" #include "av1/common/warped_motion.h"
#include "aom/aom_integer.h" #include "aom/aom_integer.h"
#if CONFIG_WARPED_MOTION
#define WARP_WM_NEIGHBORS_WITH_OBMC 0 #define WARP_WM_NEIGHBORS_WITH_OBMC 0
#endif // CONFIG_WARPED_MOTION
#define WARP_GM_NEIGHBORS_WITH_OBMC 0 #define WARP_GM_NEIGHBORS_WITH_OBMC 0
...@@ -449,10 +447,8 @@ static INLINE void set_default_interp_filters( ...@@ -449,10 +447,8 @@ static INLINE void set_default_interp_filters(
static INLINE int av1_is_interp_needed(const MACROBLOCKD *const xd) { static INLINE int av1_is_interp_needed(const MACROBLOCKD *const xd) {
(void)xd; (void)xd;
#if CONFIG_WARPED_MOTION
const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi; const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
if (mbmi->motion_mode == WARPED_CAUSAL) return 0; if (mbmi->motion_mode == WARPED_CAUSAL) return 0;
#endif // CONFIG_WARPED_MOTION
if (is_nontrans_global_motion(xd)) return 0; if (is_nontrans_global_motion(xd)) return 0;
return 1; return 1;
} }
......
...@@ -322,7 +322,6 @@ static const uint16_t div_lut[DIV_LUT_NUM + 1] = { ...@@ -322,7 +322,6 @@ static const uint16_t div_lut[DIV_LUT_NUM + 1] = {
8240, 8224, 8208, 8192, 8240, 8224, 8208, 8192,
}; };