Remove experimental flag of MOTION_VAR This experiment has been adopted, we can simplify the code by dropping the associated preprocessor conditionals. Change-Id: I2dce80e1e1b2116708b6ba9feeacaacc12af8fc4
diff --git a/aom_dsp/aom_dsp.cmake b/aom_dsp/aom_dsp.cmake index 11b55ca..845667d 100644 --- a/aom_dsp/aom_dsp.cmake +++ b/aom_dsp/aom_dsp.cmake
@@ -460,12 +460,10 @@ endif () endif () -if (CONFIG_MOTION_VAR) - set(AOM_DSP_ENCODER_INTRIN_SSE4_1 - ${AOM_DSP_ENCODER_INTRIN_SSE4_1} - "${AOM_ROOT}/aom_dsp/x86/obmc_sad_sse4.c" - "${AOM_ROOT}/aom_dsp/x86/obmc_variance_sse4.c") -endif () +set(AOM_DSP_ENCODER_INTRIN_SSE4_1 + ${AOM_DSP_ENCODER_INTRIN_SSE4_1} + "${AOM_ROOT}/aom_dsp/x86/obmc_sad_sse4.c" + "${AOM_ROOT}/aom_dsp/x86/obmc_variance_sse4.c") # Creates aom_dsp build targets. Must not be called until after libaom target # has been created.
diff --git a/aom_dsp/aom_dsp.mk b/aom_dsp/aom_dsp.mk index 13dc5e5..6d7d48e 100644 --- a/aom_dsp/aom_dsp.mk +++ b/aom_dsp/aom_dsp.mk
@@ -361,10 +361,8 @@ ifeq ($(CONFIG_AV1_ENCODER),yes) DSP_SRCS-$(HAVE_SSSE3) += x86/masked_sad_intrin_ssse3.c DSP_SRCS-$(HAVE_SSSE3) += x86/masked_variance_intrin_ssse3.c -ifeq ($(CONFIG_MOTION_VAR),yes) DSP_SRCS-$(HAVE_SSE4_1) += x86/obmc_sad_sse4.c DSP_SRCS-$(HAVE_SSE4_1) += x86/obmc_variance_sse4.c -endif #CONFIG_MOTION_VAR ifeq ($(CONFIG_EXT_PARTITION),yes) DSP_SRCS-$(HAVE_AVX2) += x86/sad_impl_avx2.c endif
diff --git a/aom_dsp/aom_dsp_rtcd_defs.pl b/aom_dsp/aom_dsp_rtcd_defs.pl index 841707b..0e78eea 100755 --- a/aom_dsp/aom_dsp_rtcd_defs.pl +++ b/aom_dsp/aom_dsp_rtcd_defs.pl
@@ -920,22 +920,20 @@ # # OBMC SAD # - if (aom_config("CONFIG_MOTION_VAR") eq "yes") { + foreach (@block_sizes) { + ($w, $h) = @$_; + add_proto qw/unsigned int/, "aom_obmc_sad${w}x${h}", "const uint8_t *pre, int pre_stride, const int32_t *wsrc, const int32_t *mask"; + if (! (($w == 128 && $h == 32) || ($w == 32 && $h == 128))) { + specialize "aom_obmc_sad${w}x${h}", qw/sse4_1/; + } + } + + if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { foreach (@block_sizes) { ($w, $h) = @$_; - add_proto qw/unsigned int/, "aom_obmc_sad${w}x${h}", "const uint8_t *pre, int pre_stride, const int32_t *wsrc, const int32_t *mask"; + add_proto qw/unsigned int/, "aom_highbd_obmc_sad${w}x${h}", "const uint8_t *pre, int pre_stride, const int32_t *wsrc, const int32_t *mask"; if (! (($w == 128 && $h == 32) || ($w == 32 && $h == 128))) { - specialize "aom_obmc_sad${w}x${h}", qw/sse4_1/; - } - } - - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { - foreach (@block_sizes) { - ($w, $h) = @$_; - add_proto qw/unsigned int/, "aom_highbd_obmc_sad${w}x${h}", "const uint8_t *pre, int pre_stride, const int32_t *wsrc, const int32_t *mask"; - if (! (($w == 128 && $h == 32) || ($w == 32 && $h == 128))) { - specialize "aom_highbd_obmc_sad${w}x${h}", qw/sse4_1/; - } + specialize "aom_highbd_obmc_sad${w}x${h}", qw/sse4_1/; } } } @@ -1255,22 +1253,20 @@ # # OBMC Variance / OBMC Subpixel Variance # - if (aom_config("CONFIG_MOTION_VAR") eq "yes") { - foreach (@block_sizes) { - ($w, $h) = @$_; - add_proto qw/unsigned int/, "aom_obmc_variance${w}x${h}", "const uint8_t *pre, int pre_stride, const int32_t *wsrc, const int32_t *mask, unsigned int *sse"; - add_proto qw/unsigned int/, "aom_obmc_sub_pixel_variance${w}x${h}", "const uint8_t *pre, int pre_stride, int xoffset, int yoffset, const int32_t *wsrc, const int32_t *mask, unsigned int *sse"; - specialize "aom_obmc_variance${w}x${h}", q/sse4_1/; - } + foreach (@block_sizes) { + ($w, $h) = @$_; + add_proto qw/unsigned int/, "aom_obmc_variance${w}x${h}", "const uint8_t *pre, int pre_stride, const int32_t *wsrc, const int32_t *mask, unsigned int *sse"; + add_proto qw/unsigned int/, "aom_obmc_sub_pixel_variance${w}x${h}", "const uint8_t *pre, int pre_stride, int xoffset, int yoffset, const int32_t *wsrc, const int32_t *mask, unsigned int *sse"; + specialize "aom_obmc_variance${w}x${h}", q/sse4_1/; + } - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { - foreach $bd ("_", "_10_", "_12_") { - foreach (@block_sizes) { - ($w, $h) = @$_; - add_proto qw/unsigned int/, "aom_highbd${bd}obmc_variance${w}x${h}", "const uint8_t *pre, int pre_stride, const int32_t *wsrc, const int32_t *mask, unsigned int *sse"; - add_proto qw/unsigned int/, "aom_highbd${bd}obmc_sub_pixel_variance${w}x${h}", "const uint8_t *pre, int pre_stride, int xoffset, int yoffset, const int32_t *wsrc, const int32_t *mask, unsigned int *sse"; - specialize "aom_highbd${bd}obmc_variance${w}x${h}", qw/sse4_1/; - } + if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { + foreach $bd ("_", "_10_", "_12_") { + foreach (@block_sizes) { + ($w, $h) = @$_; + add_proto qw/unsigned int/, "aom_highbd${bd}obmc_variance${w}x${h}", "const uint8_t *pre, int pre_stride, const int32_t *wsrc, const int32_t *mask, unsigned int *sse"; + add_proto qw/unsigned int/, "aom_highbd${bd}obmc_sub_pixel_variance${w}x${h}", "const uint8_t *pre, int pre_stride, int xoffset, int yoffset, const int32_t *wsrc, const int32_t *mask, unsigned int *sse"; + specialize "aom_highbd${bd}obmc_variance${w}x${h}", qw/sse4_1/; } } }
diff --git a/aom_dsp/sad.c b/aom_dsp/sad.c index 6b8ca66..e713ae0 100644 --- a/aom_dsp/sad.c +++ b/aom_dsp/sad.c
@@ -492,7 +492,7 @@ #endif // CONFIG_HIGHBITDEPTH #endif // CONFIG_AV1 -#if CONFIG_AV1 && CONFIG_MOTION_VAR +#if CONFIG_AV1 // pre: predictor being evaluated // wsrc: target weighted prediction (has been *4096 to keep precision) // mask: 2d weights (scaled by 4096) @@ -613,4 +613,4 @@ #endif /* clang-format on */ #endif // CONFIG_HIGHBITDEPTH -#endif // CONFIG_AV1 && CONFIG_MOTION_VAR +#endif // CONFIG_AV1
diff --git a/aom_dsp/variance.c b/aom_dsp/variance.c index e7ce732..c07f46d 100644 --- a/aom_dsp/variance.c +++ b/aom_dsp/variance.c
@@ -1043,7 +1043,7 @@ #endif // CONFIG_HIGHBITDEPTH #endif // CONFIG_AV1 -#if CONFIG_AV1 && CONFIG_MOTION_VAR +#if CONFIG_AV1 static INLINE void obmc_variance(const uint8_t *pre, int pre_stride, const int32_t *wsrc, const int32_t *mask, int w, int h, unsigned int *sse, int *sum) { @@ -1363,4 +1363,4 @@ #endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION_TYPES #endif // CONFIG_HIGHBITDEPTH -#endif // CONFIG_AV1 && CONFIG_MOTION_VAR +#endif // CONFIG_AV1
diff --git a/aom_dsp/variance.h b/aom_dsp/variance.h index a193df4..d12cd91 100644 --- a/aom_dsp/variance.h +++ b/aom_dsp/variance.h
@@ -66,7 +66,7 @@ const uint8_t *msk, int msk_stride, int invert_mask, unsigned int *sse); #endif // CONFIG_AV1 -#if CONFIG_AV1 && CONFIG_MOTION_VAR +#if CONFIG_AV1 typedef unsigned int (*aom_obmc_sad_fn_t)(const uint8_t *pred, int pred_stride, const int32_t *wsrc, const int32_t *msk); @@ -78,7 +78,7 @@ typedef unsigned int (*aom_obmc_subpixvariance_fn_t)( const uint8_t *pred, int pred_stride, int xoffset, int yoffset, const int32_t *wsrc, const int32_t *msk, unsigned int *sse); -#endif // CONFIG_AV1 && CONFIG_MOTION_VAR +#endif // CONFIG_AV1 #if CONFIG_AV1 typedef struct aom_variance_vtable { @@ -92,11 +92,9 @@ aom_sad_multi_d_fn_t sdx4df; aom_masked_sad_fn_t msdf; aom_masked_subpixvariance_fn_t msvf; -#if CONFIG_MOTION_VAR aom_obmc_sad_fn_t osdf; aom_obmc_variance_fn_t ovf; aom_obmc_subpixvariance_fn_t osvf; -#endif // CONFIG_MOTION_VAR } aom_variance_fn_ptr_t; #endif // CONFIG_AV1
diff --git a/av1/av1_common.mk b/av1/av1_common.mk index be70a0c..fdb50ed 100644 --- a/av1/av1_common.mk +++ b/av1/av1_common.mk
@@ -122,9 +122,7 @@ AV1_COMMON_SRCS-yes += common/cfl.c endif -ifeq ($(CONFIG_MOTION_VAR),yes) AV1_COMMON_SRCS-yes += common/obmc.h -endif # common (msa) AV1_COMMON_SRCS-$(HAVE_MSA) += common/mips/msa/av1_idct4x4_msa.c
diff --git a/av1/common/blockd.h b/av1/common/blockd.h index b32d904..ddbcdae 100644 --- a/av1/common/blockd.h +++ b/av1/common/blockd.h
@@ -345,7 +345,6 @@ int wedge_sign; SEG_MASK_TYPE mask_type; MOTION_MODE motion_mode; -#if CONFIG_MOTION_VAR int overlappable_neighbors[2]; #if CONFIG_NCOBMC_ADAPT_WEIGHT // Applying different weighting kernels in ncobmc @@ -354,7 +353,6 @@ // squared block has an interpolation mode. NCOBMC_MODE ncobmc_mode[2]; #endif // CONFIG_NCOBMC_ADAPT_WEIGHT -#endif // CONFIG_MOTION_VAR int_mv mv[2]; int_mv pred_mv[2]; uint8_t ref_mv_idx; @@ -1368,7 +1366,6 @@ return max_txsize; } -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION static INLINE int is_motion_variation_allowed_bsize(BLOCK_SIZE bsize) { return AOMMIN(block_size_wide[bsize], block_size_high[bsize]) >= 8; } @@ -1385,7 +1382,6 @@ return 0; } -#if CONFIG_MOTION_VAR // input: log2 of length, 0(4), 1(8), ... static const int max_neighbor_obmc[6] = { 0, 1, 2, 3, 4, 4 }; @@ -1401,7 +1397,6 @@ return MAX_NCOBMC_MODES; } #endif // CONFIG_NCOBMC_ADAPT_WEIGHT -#endif // CONFIG_MOTION_VAR static INLINE MOTION_MODE motion_mode_allowed(int block, const WarpedMotionParams *gm_params, @@ -1421,9 +1416,7 @@ if (is_motion_variation_allowed_bsize(mbmi->sb_type) && is_inter_mode(mbmi->mode) && mbmi->ref_frame[1] != INTRA_FRAME && is_motion_variation_allowed_compound(mbmi)) { -#if CONFIG_MOTION_VAR if (!check_num_overlappable_neighbors(mbmi)) return SIMPLE_TRANSLATION; -#endif #if CONFIG_WARPED_MOTION if (!has_second_ref(mbmi) && mbmi->num_proj_ref[0] >= 1 && !av1_is_scaled(&(xd->block_refs[0]->sf))) { @@ -1436,16 +1429,12 @@ } #endif // CONFIG_WARPED_MOTION -#if CONFIG_MOTION_VAR #if CONFIG_NCOBMC_ADAPT_WEIGHT if (ncobmc_mode_allowed_bsize(mbmi->sb_type) < NO_OVERLAP) return NCOBMC_ADAPT_WEIGHT; else #endif return OBMC_CAUSAL; -#else - return SIMPLE_TRANSLATION; -#endif // CONFIG_MOTION_VAR } else { return SIMPLE_TRANSLATION; } @@ -1469,12 +1458,9 @@ assert(0 && "Illegal motion mode selected"); } -#if CONFIG_MOTION_VAR static INLINE int is_neighbor_overlappable(const MB_MODE_INFO *mbmi) { return (is_inter_block(mbmi)); } -#endif // CONFIG_MOTION_VAR -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION static INLINE int av1_allow_palette(int allow_screen_content_tools, BLOCK_SIZE sb_type) {
diff --git a/av1/common/entropy.c b/av1/common/entropy.c index aa2b416..5e8e259 100644 --- a/av1/common/entropy.c +++ b/av1/common/entropy.c
@@ -2382,13 +2382,11 @@ } #if CONFIG_NEW_MULTISYMBOL AVERAGE_TILE_CDFS(intra_inter_cdf) -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION AVERAGE_TILE_CDFS(motion_mode_cdf) -#if CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#if CONFIG_WARPED_MOTION AVERAGE_TILE_CDFS(obmc_cdf) #endif #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 5218aa2..e0e7e8d 100644 --- a/av1/common/entropymode.c +++ b/av1/common/entropymode.c
@@ -928,7 +928,7 @@ #endif // TWO_MODEE #endif // CONFIG_NCOBMC_ADAPT_WEIGHT // Change this section appropriately once warped motion is supported -#if CONFIG_MOTION_VAR && !CONFIG_WARPED_MOTION +#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, @@ -1057,61 +1057,7 @@ #endif // CONFIG_EXT_PARTITION }; #endif // CONFIG_NCOBMC_ADAPT_WEIGHT -#elif !CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION - -const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = { - -SIMPLE_TRANSLATION, -WARPED_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 - { 252 }, { 252 } -#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 - }; - -#elif CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#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 @@ -6159,14 +6105,13 @@ av1_copy(fc->refmv_cdf, default_refmv_cdf); av1_copy(fc->drl_cdf, default_drl_cdf); #endif -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION av1_copy(fc->motion_mode_prob, default_motion_mode_prob); av1_copy(fc->motion_mode_cdf, default_motion_mode_cdf); -#if CONFIG_NCOBMC_ADAPT_WEIGHT && CONFIG_MOTION_VAR +#if CONFIG_NCOBMC_ADAPT_WEIGHT av1_copy(fc->ncobmc_mode_prob, default_ncobmc_mode_prob); av1_copy(fc->ncobmc_mode_cdf, default_ncobmc_mode_cdf); #endif -#if CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#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); @@ -6175,8 +6120,7 @@ av1_copy(fc->ncobmc_prob, default_ncobmc_prob); av1_copy(fc->ncobmc_cdf, default_ncobmc_cdf); #endif // CONFIG_NCOBMC_ADAPT_WEIGHT -#endif // CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION +#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 @@ -6315,7 +6259,6 @@ fc->drl_prob[i] = av1_mode_mv_merge_probs(pre_fc->drl_prob[i], counts->drl_mode[i]); -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION for (i = BLOCK_8X8; i < BLOCK_SIZES_ALL; ++i) aom_tree_merge_probs(av1_motion_mode_tree, pre_fc->motion_mode_prob[i], counts->motion_mode[i], fc->motion_mode_prob[i]); @@ -6329,12 +6272,11 @@ counts->ncobmc[i], fc->ncobmc_prob[i]); #endif #endif // CONFIG_NCOBMC_ADAPT_WEIGHT -#if CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#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_MOTION_VAR && CONFIG_WARPED_MOTION -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION +#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 6046492..97a336c 100644 --- a/av1/common/entropymode.h +++ b/av1/common/entropymode.h
@@ -218,15 +218,14 @@ aom_cdf_prob interintra_mode_cdf[BLOCK_SIZE_GROUPS] [CDF_SIZE(INTERINTRA_MODES)]; #endif // CONFIG_INTERINTRA -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION aom_prob motion_mode_prob[BLOCK_SIZES_ALL][MOTION_MODES - 1]; aom_cdf_prob motion_mode_cdf[BLOCK_SIZES_ALL][CDF_SIZE(MOTION_MODES)]; -#if CONFIG_NCOBMC_ADAPT_WEIGHT && CONFIG_MOTION_VAR +#if CONFIG_NCOBMC_ADAPT_WEIGHT aom_prob ncobmc_mode_prob[ADAPT_OVERLAP_BLOCKS][MAX_NCOBMC_MODES - 1]; aom_cdf_prob ncobmc_mode_cdf[ADAPT_OVERLAP_BLOCKS] [CDF_SIZE(MAX_NCOBMC_MODES)]; #endif -#if CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#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)]; @@ -235,8 +234,7 @@ #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_MOTION_VAR && CONFIG_WARPED_MOTION -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION +#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)]; @@ -455,18 +453,16 @@ unsigned int wedge_interintra[BLOCK_SIZES_ALL][2]; #endif // CONFIG_INTERINTRA unsigned int compound_interinter[BLOCK_SIZES_ALL][COMPOUND_TYPES]; -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION unsigned int motion_mode[BLOCK_SIZES_ALL][MOTION_MODES]; -#if CONFIG_NCOBMC_ADAPT_WEIGHT && CONFIG_MOTION_VAR +#if CONFIG_NCOBMC_ADAPT_WEIGHT unsigned int ncobmc_mode[ADAPT_OVERLAP_BLOCKS][MAX_NCOBMC_MODES]; #endif -#if CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#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_MOTION_VAR && CONFIG_WARPED_MOTION -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION +#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 @@ -642,9 +638,7 @@ #else extern const aom_tree_index av1_ext_tx_tree[TREE_SIZE(TX_TYPES)]; #endif // CONFIG_EXT_TX -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION extern const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)]; -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION #if CONFIG_NCOBMC_ADAPT_WEIGHT extern const aom_tree_index av1_ncobmc_mode_tree[TREE_SIZE(MAX_NCOBMC_MODES)]; #if CONFIG_WARPED_MOTION
diff --git a/av1/common/enums.h b/av1/common/enums.h index 9353acc..b2a0881 100644 --- a/av1/common/enums.h +++ b/av1/common/enums.h
@@ -573,12 +573,10 @@ typedef enum ATTRIBUTE_PACKED { SIMPLE_TRANSLATION, -#if CONFIG_MOTION_VAR OBMC_CAUSAL, // 2-sided OBMC #if CONFIG_NCOBMC_ADAPT_WEIGHT NCOBMC_ADAPT_WEIGHT, #endif // CONFIG_NCOBMC_ADAPT_WEIGHT -#endif // CONFIG_MOTION_VAR #if CONFIG_WARPED_MOTION WARPED_CAUSAL, // 2-sided WARPED #endif // CONFIG_WARPED_MOTION
diff --git a/av1/common/obmc.h b/av1/common/obmc.h index dbab733..5ad4d29 100644 --- a/av1/common/obmc.h +++ b/av1/common/obmc.h
@@ -12,7 +12,6 @@ #ifndef AV1_COMMON_OBMC_H_ #define AV1_COMMON_OBMC_H_ -#if CONFIG_MOTION_VAR typedef void (*overlappable_nb_visitor_t)(MACROBLOCKD *xd, int rel_mi_pos, uint8_t nb_mi_size, MODE_INFO *nb_mi, void *fun_ctxt); @@ -88,5 +87,4 @@ } } -#endif // CONFIG_MOTION_VAR #endif // AV1_COMMON_OBMC_H_
diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c index 7c260eb..da7caf6 100644 --- a/av1/common/reconinter.c +++ b/av1/common/reconinter.c
@@ -23,10 +23,8 @@ #include "av1/common/blockd.h" #include "av1/common/reconinter.h" #include "av1/common/reconintra.h" -#if CONFIG_MOTION_VAR #include "av1/common/onyxc_int.h" #include "av1/common/obmc.h" -#endif // CONFIG_MOTION_VAR // This function will determine whether or not to create a warped // prediction and return the appropriate motion model depending @@ -35,9 +33,7 @@ static INLINE int allow_warp(const MODE_INFO *const mi, const WarpTypesAllowed *const warp_types, const WarpedMotionParams *const gm_params, -#if CONFIG_MOTION_VAR int build_for_obmc, -#endif // CONFIG_MOTION_VAR WarpedMotionParams *final_warp_params) { const MB_MODE_INFO *const mbmi = &mi->mbmi; *final_warp_params = default_warp_params; @@ -46,34 +42,8 @@ if (mbmi->wm_params[0].invalid) return 0; #endif -// Only global motion configured -#if !CONFIG_WARPED_MOTION && !CONFIG_MOTION_VAR - (void)mbmi; - if (warp_types->global_warp_allowed) { - memcpy(final_warp_params, gm_params, sizeof(*final_warp_params)); - return 1; - } -#endif // !CONFIG_WARPED_MOTION && !CONFIG_MOTION_VAR - -// Only warped motion configured - -// Warped and global motion configured -#if 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 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; - } else if (warp_types->global_warp_allowed) { - memcpy(final_warp_params, gm_params, sizeof(*final_warp_params)); - return 1; - } -#endif // CONFIG_WARPED_MOTION && !CONFIG_MOTION_VAR - // Motion var and global motion configured -#if CONFIG_MOTION_VAR && !CONFIG_WARPED_MOTION +#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, @@ -85,12 +55,12 @@ memcpy(final_warp_params, gm_params, sizeof(*final_warp_params)); return 1; } -#endif // CONFIG_MOTION_VAR && !CONFIG_WARPED_MOTION +#endif // !CONFIG_WARPED_MOTION // Motion var and warped motion configured // Motion var, warped motion and global motion all configured -#if CONFIG_WARPED_MOTION && CONFIG_MOTION_VAR +#if CONFIG_WARPED_MOTION 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], @@ -102,7 +72,7 @@ memcpy(final_warp_params, gm_params, sizeof(*final_warp_params)); return 1; } -#endif // CONFIG_WARPED_MOTION && CONFIG_MOTION_VAR +#endif // CONFIG_WARPED_MOTION return 0; } @@ -112,25 +82,16 @@ const int subpel_x, const int subpel_y, const struct scale_factors *sf, int w, int h, ConvolveParams *conv_params, InterpFilters interp_filters, const WarpTypesAllowed *warp_types, int p_col, int p_row, int plane, - int ref, -#if CONFIG_MOTION_VAR - const MODE_INFO *mi, int build_for_obmc, -#endif - int xs, int ys, const MACROBLOCKD *xd) { + int ref, const MODE_INFO *mi, int build_for_obmc, int xs, int ys, + const MACROBLOCKD *xd) { (void)xd; -#if !CONFIG_MOTION_VAR - const MODE_INFO *mi = xd->mi[0]; - (void)mi; -#endif // CONFIG_MOTION_VAR -// Make sure the selected motion mode is valid for this configuration -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION + // 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); -#endif // CONFIG MOTION_VAR || CONFIG_WARPED_MOTION WarpedMotionParams final_warp_params; const int do_warp = @@ -146,10 +107,7 @@ #else // !(CONFIG_COMPOUND_SINGLEREF) &xd->global_motion[mi->mbmi.ref_frame[ref]], #endif // CONFIG_COMPOUND_SINGLEREF -#if CONFIG_MOTION_VAR - build_for_obmc, -#endif // CONFIG_MOTION_VAR - &final_warp_params)); + build_for_obmc, &final_warp_params)); if (do_warp #if CONFIG_AMVR && xd->cur_frame_force_integer_mv == 0 @@ -865,11 +823,8 @@ // This will generate a prediction in tmp_buf for the second reference av1_make_inter_predictor(pre, pre_stride, tmp_dst, MAX_SB_SIZE, subpel_x, subpel_y, sf, w, h, conv_params, interp_filters, - warp_types, p_col, p_row, plane, ref, -#if CONFIG_MOTION_VAR - mi, 0, -#endif - xs, ys, xd); + warp_types, p_col, p_row, plane, ref, mi, 0, xs, ys, + xd); if (!plane && comp_data.interinter_compound_type == COMPOUND_SEG) { #if CONFIG_CONVOLVE_ROUND @@ -958,10 +913,7 @@ av1_make_inter_predictor(src, src_stride, dst, dst_stride, subpel_x, subpel_y, sf, w, h, &conv_params, interp_filters, warp_types, - p_col, p_row, plane, ref, -#if CONFIG_MOTION_VAR - xd->mi[0], 0, -#endif + p_col, p_row, plane, ref, xd->mi[0], 0, sf->x_step_q4, sf->y_step_q4, xd); } #endif // CONFIG_HIGHBITDEPTH @@ -986,10 +938,7 @@ av1_make_inter_predictor(src, src_stride, dst, dst_stride, subpel_x, subpel_y, sf, w, h, conv_params, interp_filters, warp_types, - p_col, p_row, plane, ref, -#if CONFIG_MOTION_VAR - xd->mi[0], 0, -#endif + p_col, p_row, plane, ref, xd->mi[0], 0, sf->x_step_q4, sf->y_step_q4, xd); } @@ -1059,16 +1008,12 @@ } #endif // CONFIG_JNT_COMP -static INLINE void build_inter_predictors( - const AV1_COMMON *cm, MACROBLOCKD *xd, int plane, -#if CONFIG_MOTION_VAR - const MODE_INFO *mi, int build_for_obmc, -#endif // CONFIG_MOTION_VAR - int block, int bw, int bh, int x, int y, int w, int h, int mi_x, int mi_y) { +static INLINE void build_inter_predictors(const AV1_COMMON *cm, MACROBLOCKD *xd, + int plane, const MODE_INFO *mi, + int build_for_obmc, int block, int bw, + int bh, int x, int y, int w, int h, + int mi_x, int mi_y) { struct macroblockd_plane *const pd = &xd->plane[plane]; -#if !CONFIG_MOTION_VAR - const MODE_INFO *mi = xd->mi[0]; -#endif // CONFIG_MOTION_VAR int is_compound = has_second_ref(&mi->mbmi); #if CONFIG_COMPOUND_SINGLEREF int is_comp_mode_pred = @@ -1103,9 +1048,7 @@ } #endif -#if CONFIG_MOTION_VAR sub8x8_inter = sub8x8_inter && !build_for_obmc; -#endif // CONFIG_MOTION_VAR const int row_start = (block_size_high[bsize] == 4) && ss_y ? -1 : 0; const int col_start = (block_size_wide[bsize] == 4) && ss_x ? -1 : 0; @@ -1251,10 +1194,7 @@ pre, pre_buf->stride, dst, dst_buf->stride, subpel_x, subpel_y, sf, b4_w, b4_h, &conv_params, this_mbmi->interp_filters, &warp_types, (mi_x >> pd->subsampling_x) + x, - (mi_y >> pd->subsampling_y) + y, plane, ref, -#if CONFIG_MOTION_VAR - mi, build_for_obmc, -#endif // CONFIG_MOTION_VAR + (mi_y >> pd->subsampling_y) + y, plane, ref, mi, build_for_obmc, xs, ys, xd); } // for (ref = 0; ref < 1 + is_compound; ++ref) #if CONFIG_CONVOLVE_ROUND @@ -1418,11 +1358,8 @@ subpel_params[ref].subpel_x, subpel_params[ref].subpel_y, sf, w, h, &conv_params, mi->mbmi.interp_filters, &warp_types, (mi_x >> pd->subsampling_x) + x, (mi_y >> pd->subsampling_y) + y, - plane, ref, -#if CONFIG_MOTION_VAR - mi, build_for_obmc, -#endif // CONFIG_MOTION_VAR - subpel_params[ref].xs, subpel_params[ref].ys, xd); + plane, ref, mi, build_for_obmc, subpel_params[ref].xs, + subpel_params[ref].ys, xd); } #if CONFIG_CONVOLVE_ROUND @@ -1467,11 +1404,8 @@ pd->subsampling_y)) continue; - build_inter_predictors(cm, xd, plane, -#if CONFIG_MOTION_VAR - xd->mi[0], 0, -#endif // CONFIG_MOTION_VAR - 0, bw, bh, 0, 0, bw, bh, mi_x, mi_y); + build_inter_predictors(cm, xd, plane, xd->mi[0], 0, 0, bw, bh, 0, 0, bw, bh, + mi_x, mi_y); } } @@ -1561,7 +1495,6 @@ } } -#if CONFIG_MOTION_VAR // obmc_mask_N[overlap_position] static const uint8_t obmc_mask_1[1] = { 64 }; @@ -2417,8 +2350,6 @@ } #endif -#endif // CONFIG_MOTION_VAR - /* clang-format off */ #if CONFIG_INTERINTRA #if CONFIG_EXT_PARTITION @@ -2779,15 +2710,11 @@ (x + (mv_q4.col >> SUBPEL_BITS)); } - av1_make_inter_predictor(pre, pre_buf->stride, dst, ext_dst_stride, subpel_x, - subpel_y, sf, w, h, &conv_params, - mi->mbmi.interp_filters, &warp_types, - (mi_x >> pd->subsampling_x) + x, - (mi_y >> pd->subsampling_y) + y, plane, ref, -#if CONFIG_MOTION_VAR - mi, 0, -#endif - xs, ys, xd); + av1_make_inter_predictor( + pre, pre_buf->stride, dst, ext_dst_stride, subpel_x, subpel_y, sf, w, h, + &conv_params, mi->mbmi.interp_filters, &warp_types, + (mi_x >> pd->subsampling_x) + x, (mi_y >> pd->subsampling_y) + y, plane, + ref, mi, 0, xs, ys, xd); } void av1_build_inter_predictors_for_planes_single_buf(
diff --git a/av1/common/reconinter.h b/av1/common/reconinter.h index bda783a..8df5123 100644 --- a/av1/common/reconinter.h +++ b/av1/common/reconinter.h
@@ -18,13 +18,11 @@ #include "av1/common/warped_motion.h" #include "aom/aom_integer.h" -#if CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#if CONFIG_WARPED_MOTION #define WARP_WM_NEIGHBORS_WITH_OBMC 0 -#endif // CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#endif // CONFIG_WARPED_MOTION -#if CONFIG_MOTION_VAR #define WARP_GM_NEIGHBORS_WITH_OBMC 0 -#endif // CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION #define AOM_LEFT_TOP_MARGIN_SCALED \ ((AOM_BORDER_IN_PIXELS - AOM_INTERP_EXTEND) << SCALE_SUBPEL_BITS) @@ -475,7 +473,6 @@ return 0; } -#if CONFIG_MOTION_VAR const uint8_t *av1_get_obmc_mask(int length); void av1_count_overlappable_neighbors(const AV1_COMMON *cm, MACROBLOCKD *xd, int mi_row, int mi_col); @@ -503,7 +500,6 @@ void av1_build_ncobmc_inter_predictors_sb(const AV1_COMMON *cm, MACROBLOCKD *xd, int mi_row, int mi_col); #endif -#endif // CONFIG_MOTION_VAR #define MASK_MASTER_SIZE ((MAX_WEDGE_SIZE) << 1) #define MASK_MASTER_STRIDE (MASK_MASTER_SIZE)
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c index 5515be7..4ccb983 100644 --- a/av1/decoder/decodeframe.c +++ b/av1/decoder/decodeframe.c
@@ -835,7 +835,6 @@ av1_build_inter_predictors_sb(cm, xd, mi_row, mi_col, NULL, bsize); -#if CONFIG_MOTION_VAR if (mbmi->motion_mode == OBMC_CAUSAL) { #if CONFIG_NCOBMC av1_build_ncobmc_inter_predictors_sb(cm, xd, mi_row, mi_col); @@ -843,7 +842,6 @@ av1_build_obmc_inter_predictors_sb(cm, xd, mi_row, mi_col); #endif } -#endif // CONFIG_MOTION_VAR #if CONFIG_NCOBMC_ADAPT_WEIGHT if (mbmi->motion_mode == NCOBMC_ADAPT_WEIGHT) { int plane; @@ -920,7 +918,7 @@ aom_merge_corrupted_flag(&xd->corrupted, reader_corrupted_flag); } -#if NC_MODE_INFO && CONFIG_MOTION_VAR +#if NC_MODE_INFO static void detoken_and_recon_sb(AV1Decoder *const pbi, MACROBLOCKD *const xd, int mi_row, int mi_col, aom_reader *r, BLOCK_SIZE bsize) { @@ -1003,7 +1001,7 @@ #endif bsize); -#if !(CONFIG_MOTION_VAR && NC_MODE_INFO) +#if !(NC_MODE_INFO) decode_token_and_recon_block(pbi, xd, mi_row, mi_col, r, bsize); #endif } @@ -2554,7 +2552,7 @@ #endif decode_partition(pbi, &td->xd, mi_row, mi_col, &td->bit_reader, cm->sb_size); -#if NC_MODE_INFO && CONFIG_MOTION_VAR +#if NC_MODE_INFO detoken_and_recon_sb(pbi, &td->xd, mi_row, mi_col, &td->bit_reader, cm->sb_size); #endif @@ -3618,11 +3616,9 @@ assert(!memcmp(cm->counts.compound_interinter, zero_counts.compound_interinter, sizeof(cm->counts.compound_interinter))); -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION assert(!memcmp(cm->counts.motion_mode, zero_counts.motion_mode, sizeof(cm->counts.motion_mode))); -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION -#if CONFIG_NCOBMC_ADAPT_WEIGHT && CONFIG_MOTION_VAR +#if CONFIG_NCOBMC_ADAPT_WEIGHT assert(!memcmp(cm->counts.ncobmc_mode, zero_counts.ncobmc_mode, sizeof(cm->counts.ncobmc_mode))); #endif
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c index b244031..d500c43 100644 --- a/av1/decoder/decodemv.c +++ b/av1/decoder/decodemv.c
@@ -280,11 +280,10 @@ } } -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION 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_MOTION_VAR || !CONFIG_WARPED_MOTION || CONFIG_NEW_MULTISYMBOL || \ +#if !CONFIG_WARPED_MOTION || CONFIG_NEW_MULTISYMBOL || \ CONFIG_NCOBMC_ADAPT_WEIGHT (void)cm; #endif @@ -299,7 +298,7 @@ FRAME_COUNTS *counts = xd->counts; if (last_motion_mode_allowed == SIMPLE_TRANSLATION) return SIMPLE_TRANSLATION; -#if CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#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], @@ -324,15 +323,15 @@ return (MOTION_MODE)(SIMPLE_TRANSLATION + motion_mode); } else { #endif // CONFIG_NCOBMC_ADAPT_WEIGHT -#endif // CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#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_MOTION_VAR && CONFIG_WARPED_MOTION +#if CONFIG_WARPED_MOTION } -#endif // CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#endif // CONFIG_WARPED_MOTION } #if CONFIG_NCOBMC_ADAPT_WEIGHT @@ -354,7 +353,6 @@ } } #endif // CONFIG_NCOBMC_ADAPT_WEIGHT -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION static PREDICTION_MODE read_inter_compound_mode(AV1_COMMON *cm, MACROBLOCKD *xd, aom_reader *r, int16_t ctx) { @@ -2571,7 +2569,6 @@ } #endif -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION mbmi->motion_mode = SIMPLE_TRANSLATION; #if CONFIG_WARPED_MOTION if (mbmi->sb_type >= BLOCK_8X8 && !has_second_ref(mbmi)) @@ -2582,9 +2579,7 @@ mbmi->num_proj_ref[0] = findSamples(cm, xd, mi_row, mi_col, pts, pts_inref); #endif // CONFIG_EXT_WARPED_MOTION #endif // CONFIG_WARPED_MOTION -#if CONFIG_MOTION_VAR av1_count_overlappable_neighbors(cm, xd, mi_row, mi_col); -#endif if (mbmi->ref_frame[1] != INTRA_FRAME) mbmi->motion_mode = read_motion_mode(cm, xd, mi, r); @@ -2596,7 +2591,6 @@ #if CONFIG_COMPOUND_SINGLEREF if (is_singleref_comp_mode) assert(mbmi->motion_mode == SIMPLE_TRANSLATION); #endif // CONFIG_COMPOUND_SINGLEREF -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION mbmi->interinter_compound_type = COMPOUND_AVERAGE; if ( @@ -2606,10 +2600,7 @@ cm->reference_mode != SINGLE_REFERENCE && is_inter_compound_mode(mbmi->mode) #endif // CONFIG_COMPOUND_SINGLEREF -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION - && mbmi->motion_mode == SIMPLE_TRANSLATION -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION - ) { + && mbmi->motion_mode == SIMPLE_TRANSLATION) { if (is_any_masked_compound_used(bsize)) { #if CONFIG_JNT_COMP if (cm->allow_masked_compound && mbmi->compound_idx)
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c index f2ef095..7e1e1dd 100644 --- a/av1/encoder/bitstream.c +++ b/av1/encoder/bitstream.c
@@ -400,7 +400,6 @@ } } -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION static void write_motion_mode(const AV1_COMMON *cm, MACROBLOCKD *xd, const MODE_INFO *mi, aom_writer *w) { const MB_MODE_INFO *mbmi = &mi->mbmi; @@ -412,7 +411,7 @@ #endif mi); if (last_motion_mode_allowed == SIMPLE_TRANSLATION) return; -#if CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#if CONFIG_WARPED_MOTION #if CONFIG_NCOBMC_ADAPT_WEIGHT if (last_motion_mode_allowed == NCOBMC_ADAPT_WEIGHT) { aom_write_symbol(w, mbmi->motion_mode, @@ -433,13 +432,13 @@ #endif } else { #endif // CONFIG_NCOBMC_ADAPT_WEIGHT -#endif // CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#endif // CONFIG_WARPED_MOTION aom_write_symbol(w, mbmi->motion_mode, xd->tile_ctx->motion_mode_cdf[mbmi->sb_type], MOTION_MODES); -#if CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#if CONFIG_WARPED_MOTION } -#endif // CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#endif // CONFIG_WARPED_MOTION } #if CONFIG_NCOBMC_ADAPT_WEIGHT @@ -457,7 +456,6 @@ } } #endif -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION static void write_delta_qindex(const AV1_COMMON *cm, const MACROBLOCKD *xd, int delta_qindex, aom_writer *w) { @@ -1735,12 +1733,10 @@ } #endif // CONFIG_INTERINTRA -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION if (mbmi->ref_frame[1] != INTRA_FRAME) write_motion_mode(cm, xd, mi, w); #if CONFIG_NCOBMC_ADAPT_WEIGHT write_ncobmc_mode(xd, mi, w); #endif -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION if ( #if CONFIG_COMPOUND_SINGLEREF @@ -1749,9 +1745,7 @@ cpi->common.reference_mode != SINGLE_REFERENCE && is_inter_compound_mode(mbmi->mode) && #endif // CONFIG_COMPOUND_SINGLEREF -#if CONFIG_MOTION_VAR mbmi->motion_mode == SIMPLE_TRANSLATION && -#endif // CONFIG_MOTION_VAR is_any_masked_compound_used(bsize)) { #if CONFIG_JNT_COMP if (cm->allow_masked_compound && mbmi->compound_idx) @@ -2332,7 +2326,7 @@ #endif // CONFIG_COEF_INTERLEAVE } -#if CONFIG_MOTION_VAR && NC_MODE_INFO +#if NC_MODE_INFO static void write_tokens_sb(AV1_COMP *cpi, const TileInfo *const tile, aom_writer *w, const TOKENEXTRA **tok, const TOKENEXTRA *const tok_end, int mi_row, @@ -2406,7 +2400,7 @@ int mi_col) { write_mbmi_b(cpi, tile, w, mi_row, mi_col); -#if CONFIG_MOTION_VAR && NC_MODE_INFO +#if NC_MODE_INFO (void)tok; (void)tok_end; #else @@ -2713,7 +2707,7 @@ for (mi_col = mi_col_start; mi_col < mi_col_end; mi_col += cm->mib_size) { write_modes_sb(cpi, tile, w, tok, tok_end, mi_row, mi_col, cm->sb_size); -#if CONFIG_MOTION_VAR && NC_MODE_INFO +#if NC_MODE_INFO write_tokens_sb(cpi, tile, w, tok, tok_end, mi_row, mi_col, cm->sb_size); #endif } @@ -3073,13 +3067,11 @@ // Only one filter is used. So set the filter at frame level for (i = 0; i < SWITCHABLE_FILTERS; ++i) { if (count[i]) { -#if CONFIG_MOTION_VAR #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 -#endif // CONFIG_MOTION_VAR cm->interp_filter = i; break; }
diff --git a/av1/encoder/block.h b/av1/encoder/block.h index fd0e58e..a35f5c2 100644 --- a/av1/encoder/block.h +++ b/av1/encoder/block.h
@@ -176,12 +176,10 @@ int **mv_cost_stack[NMV_CONTEXTS]; int **mvcost; -#if CONFIG_MOTION_VAR int32_t *wsrc_buf; int32_t *mask_buf; uint8_t *above_pred_buf; uint8_t *left_pred_buf; -#endif // CONFIG_MOTION_VAR PALETTE_BUFFER *palette_buffer; @@ -224,18 +222,16 @@ int wedge_interintra_cost[BLOCK_SIZES_ALL][2]; int interintra_mode_cost[BLOCK_SIZE_GROUPS][INTERINTRA_MODES]; #endif // CONFIG_INTERINTRA -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION int motion_mode_cost[BLOCK_SIZES_ALL][MOTION_MODES]; -#if CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#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_MOTION_VAR && CONFIG_WARPED_MOTION -#if CONFIG_MOTION_VAR && CONFIG_NCOBMC_ADAPT_WEIGHT +#endif // CONFIG_WARPED_MOTION +#if CONFIG_NCOBMC_ADAPT_WEIGHT int ncobmc_mode_cost[ADAPT_OVERLAP_BLOCKS][MAX_NCOBMC_MODES]; -#endif // CONFIG_MOTION_VAR && CONFIG_NCOBMC_ADAPT_WEIGHT -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION +#endif // CONFIG_NCOBMC_ADAPT_WEIGHT int intra_uv_mode_cost[INTRA_MODES][UV_INTRA_MODES]; int y_mode_costs[INTRA_MODES][INTRA_MODES][INTRA_MODES]; #if CONFIG_FILTER_INTRA
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c index defdff8..fabd747 100644 --- a/av1/encoder/encodeframe.c +++ b/av1/encoder/encodeframe.c
@@ -588,7 +588,7 @@ #endif // CONFIG_JNT_COMP } -#if CONFIG_MOTION_VAR && NC_MODE_INFO +#if NC_MODE_INFO static void set_mode_info_b(const AV1_COMP *const cpi, const TileInfo *const tile, ThreadData *td, int mi_row, int mi_col, BLOCK_SIZE bsize, @@ -754,7 +754,7 @@ set_mode_info_offsets(cpi, x, xd, mi_row, mi_col); } #endif // CONFIG_NCOBMC_ADAPT_WEIGHT -#endif // CONFIG_MOTION_VAR && (CONFIG_NCOBMC || CONFIG_NCOBMC_ADAPT_WEIGHT) +#endif // (CONFIG_NCOBMC || CONFIG_NCOBMC_ADAPT_WEIGHT) void av1_setup_src_planes(MACROBLOCK *x, const YV12_BUFFER_CONFIG *src, int mi_row, int mi_col) { @@ -1189,7 +1189,6 @@ } #endif // CONFIG_INTERINTRA -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION #if CONFIG_WARPED_MOTION set_ref_ptrs(cm, xd, mbmi->ref_frame[0], mbmi->ref_frame[1]); #endif @@ -1200,7 +1199,7 @@ #endif mi); if (mbmi->ref_frame[1] != INTRA_FRAME) -#if CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#if CONFIG_WARPED_MOTION { if (motion_allowed == WARPED_CAUSAL) { counts->motion_mode[mbmi->sb_type][mbmi->motion_mode]++; @@ -1231,7 +1230,7 @@ update_cdf(fc->motion_mode_cdf[mbmi->sb_type], mbmi->motion_mode, MOTION_MODES); } -#endif // CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#endif // CONFIG_WARPED_MOTION #if CONFIG_NCOBMC_ADAPT_WEIGHT if (mbmi->motion_mode == NCOBMC_ADAPT_WEIGHT) { @@ -1248,8 +1247,6 @@ } #endif -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION - if ( #if CONFIG_COMPOUND_SINGLEREF is_inter_anyref_comp_mode(mbmi->mode) @@ -1257,10 +1254,7 @@ cm->reference_mode != SINGLE_REFERENCE && is_inter_compound_mode(mbmi->mode) #endif // CONFIG_COMPOUND_SINGLEREF -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION - && mbmi->motion_mode == SIMPLE_TRANSLATION -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION - ) { + && mbmi->motion_mode == SIMPLE_TRANSLATION) { if (is_interinter_compound_used(COMPOUND_WEDGE, bsize)) { counts ->compound_interinter[bsize][mbmi->interinter_compound_type]++; @@ -1433,11 +1427,10 @@ #endif PICK_MODE_CONTEXT *ctx, int *rate) { MACROBLOCK *const x = &td->mb; -#if (CONFIG_MOTION_VAR && CONFIG_NCOBMC) | CONFIG_EXT_DELTA_Q | \ - CONFIG_NCOBMC_ADAPT_WEIGHT +#if (CONFIG_NCOBMC) | CONFIG_EXT_DELTA_Q | CONFIG_NCOBMC_ADAPT_WEIGHT MACROBLOCKD *xd = &x->e_mbd; MB_MODE_INFO *mbmi; -#if CONFIG_MOTION_VAR && CONFIG_NCOBMC +#if CONFIG_NCOBMC int check_ncobmc; #endif #endif @@ -1447,22 +1440,22 @@ x->e_mbd.mi[0]->mbmi.partition = partition; #endif update_state(cpi, td, ctx, mi_row, mi_col, bsize, dry_run); -#if CONFIG_MOTION_VAR && (CONFIG_NCOBMC || CONFIG_NCOBMC_ADAPT_WEIGHT) +#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_MOTION_VAR && (CONFIG_NCOBMC || CONFIG_NCOBMC_ADAPT_WEIGHT) +#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]); -#endif // CONFIG_MOTION_VAR && (CONFIG_NCOBMC || CONFIG_NCOBMC_ADAPT_WEIGHT) +#endif // (CONFIG_NCOBMC || CONFIG_NCOBMC_ADAPT_WEIGHT) -#if CONFIG_MOTION_VAR && CONFIG_NCOBMC +#if CONFIG_NCOBMC check_ncobmc = is_inter_block(mbmi) && motion_allowed >= OBMC_CAUSAL; if (!dry_run && check_ncobmc) { av1_check_ncobmc_rd(cpi, x, mi_row, mi_col); @@ -3194,7 +3187,7 @@ if (best_rdc.rate < INT_MAX && best_rdc.dist < INT64_MAX && pc_tree->index != 3) { if (bsize == cm->sb_size) { -#if CONFIG_MOTION_VAR && NC_MODE_INFO +#if NC_MODE_INFO set_mode_info_sb(cpi, td, tile_info, tp, mi_row, mi_col, bsize, pc_tree); #endif @@ -4665,7 +4658,6 @@ av1_build_inter_predictors_sb(cm, xd, mi_row, mi_col, NULL, block_size); #if !CONFIG_NCOBMC_ADAPT_WEIGHT -#if CONFIG_MOTION_VAR if (mbmi->motion_mode == OBMC_CAUSAL) { #if CONFIG_NCOBMC if (dry_run == OUTPUT_ENABLED) @@ -4674,7 +4666,6 @@ #endif av1_build_obmc_inter_predictors_sb(cm, xd, mi_row, mi_col); } -#endif // CONFIG_MOTION_VAR #else if (mbmi->motion_mode == OBMC_CAUSAL) { av1_build_obmc_inter_predictors_sb(cm, xd, mi_row, mi_col);
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c index 5b4611c..2f897bd 100644 --- a/av1/encoder/encoder.c +++ b/av1/encoder/encoder.c
@@ -515,7 +515,6 @@ aom_free(cpi->active_map.map); cpi->active_map.map = NULL; -#if CONFIG_MOTION_VAR aom_free(cpi->td.mb.above_pred_buf); cpi->td.mb.above_pred_buf = NULL; @@ -527,7 +526,6 @@ aom_free(cpi->td.mb.mask_buf); cpi->td.mb.mask_buf = NULL; -#endif #if CONFIG_MFMV aom_free(cm->tpl_mvs); @@ -1390,7 +1388,6 @@ #endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION_TYPES -#if CONFIG_MOTION_VAR #define HIGHBD_OBFP(BT, OSDF, OVF, OSVF) \ cpi->fn_ptr[BT].osdf = OSDF; \ cpi->fn_ptr[BT].ovf = OVF; \ @@ -1444,7 +1441,6 @@ MAKE_OBFP_SAD_WRAPPER(aom_highbd_obmc_sad128x32) #endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION_TYPES -#endif // CONFIG_MOTION_VAR static void highbd_set_var_fns(AV1_COMP *const cpi) { AV1_COMMON *const cm = &cpi->common; @@ -1674,7 +1670,6 @@ HIGHBD_MBFP(BLOCK_4X16, aom_highbd_masked_sad4x16_bits8, aom_highbd_8_masked_sub_pixel_variance4x16) #endif -#if CONFIG_MOTION_VAR #if CONFIG_EXT_PARTITION HIGHBD_OBFP(BLOCK_128X128, aom_highbd_obmc_sad128x128_bits8, aom_highbd_obmc_variance128x128, @@ -1760,7 +1755,6 @@ aom_highbd_obmc_variance4x16, aom_highbd_obmc_sub_pixel_variance4x16) #endif -#endif // CONFIG_MOTION_VAR break; case AOM_BITS_10: @@ -1993,7 +1987,6 @@ HIGHBD_MBFP(BLOCK_4X16, aom_highbd_masked_sad4x16_bits10, aom_highbd_10_masked_sub_pixel_variance4x16) #endif -#if CONFIG_MOTION_VAR #if CONFIG_EXT_PARTITION HIGHBD_OBFP(BLOCK_128X128, aom_highbd_obmc_sad128x128_bits10, aom_highbd_10_obmc_variance128x128, @@ -2079,7 +2072,6 @@ aom_highbd_10_obmc_variance4x16, aom_highbd_10_obmc_sub_pixel_variance4x16) #endif -#endif // CONFIG_MOTION_VAR break; case AOM_BITS_12: @@ -2313,7 +2305,6 @@ aom_highbd_12_masked_sub_pixel_variance4x16) #endif -#if CONFIG_MOTION_VAR #if CONFIG_EXT_PARTITION HIGHBD_OBFP(BLOCK_128X128, aom_highbd_obmc_sad128x128_bits12, aom_highbd_12_obmc_variance128x128, @@ -2399,7 +2390,6 @@ aom_highbd_12_obmc_variance4x16, aom_highbd_12_obmc_sub_pixel_variance4x16) #endif -#endif // CONFIG_MOTION_VAR break; default: @@ -2750,7 +2740,6 @@ } #endif -#if CONFIG_MOTION_VAR #if CONFIG_HIGHBITDEPTH int buf_scaler = 2; #else @@ -2775,8 +2764,6 @@ (int32_t *)aom_memalign( 16, MAX_SB_SQUARE * sizeof(*cpi->td.mb.mask_buf))); -#endif - av1_set_speed_features_framesize_independent(cpi); av1_set_speed_features_framesize_dependent(cpi); @@ -2950,7 +2937,6 @@ BFP(BLOCK_2X4, NULL, NULL, aom_variance2x4, NULL, NULL, NULL, NULL, NULL) BFP(BLOCK_4X2, NULL, NULL, aom_variance4x2, NULL, NULL, NULL, NULL, NULL) -#if CONFIG_MOTION_VAR #define OBFP(BT, OSDF, OVF, OSVF) \ cpi->fn_ptr[BT].osdf = OSDF; \ cpi->fn_ptr[BT].ovf = OVF; \ @@ -3018,7 +3004,6 @@ aom_obmc_sub_pixel_variance128x32) #endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION_TYPES -#endif // CONFIG_MOTION_VAR #define MBFP(BT, MCSDF, MCSVF) \ cpi->fn_ptr[BT].msdf = MCSDF; \ @@ -3201,12 +3186,10 @@ // Deallocate allocated thread data. if (t < cpi->num_workers - 1) { aom_free(thread_data->td->palette_buffer); -#if CONFIG_MOTION_VAR aom_free(thread_data->td->above_pred_buf); aom_free(thread_data->td->left_pred_buf); aom_free(thread_data->td->wsrc_buf); aom_free(thread_data->td->mask_buf); -#endif // CONFIG_MOTION_VAR aom_free(thread_data->td->counts); av1_free_pc_tree(thread_data->td); aom_free(thread_data->td);
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h index b79eaad..9328f0d 100644 --- a/av1/encoder/encoder.h +++ b/av1/encoder/encoder.h
@@ -336,12 +336,10 @@ FRAME_COUNTS *counts; PC_TREE *pc_tree; PC_TREE *pc_root[MAX_MIB_SIZE_LOG2 - MIN_MIB_SIZE_LOG2 + 1]; -#if CONFIG_MOTION_VAR int32_t *wsrc_buf; int32_t *mask_buf; uint8_t *above_pred_buf; uint8_t *left_pred_buf; -#endif PALETTE_BUFFER *palette_buffer; } ThreadData;
diff --git a/av1/encoder/ethread.c b/av1/encoder/ethread.c index 253deb0..0c823c7 100644 --- a/av1/encoder/ethread.c +++ b/av1/encoder/ethread.c
@@ -83,7 +83,6 @@ thread_data->td->pc_tree = NULL; av1_setup_pc_tree(cm, thread_data->td); -#if CONFIG_MOTION_VAR #if CONFIG_HIGHBITDEPTH int buf_scaler = 2; #else @@ -107,7 +106,6 @@ cm, thread_data->td->mask_buf, (int32_t *)aom_memalign( 16, MAX_SB_SQUARE * sizeof(*thread_data->td->mask_buf))); -#endif // Allocate frame counters in thread data. CHECK_MEM_ERROR(cm, thread_data->td->counts, aom_calloc(1, sizeof(*thread_data->td->counts))); @@ -143,12 +141,10 @@ if (thread_data->td != &cpi->td) { thread_data->td->mb = cpi->td.mb; thread_data->td->rd_counts = cpi->td.rd_counts; -#if CONFIG_MOTION_VAR thread_data->td->mb.above_pred_buf = thread_data->td->above_pred_buf; thread_data->td->mb.left_pred_buf = thread_data->td->left_pred_buf; thread_data->td->mb.wsrc_buf = thread_data->td->wsrc_buf; thread_data->td->mb.mask_buf = thread_data->td->mask_buf; -#endif } if (thread_data->td->counts != &cpi->common.counts) { memcpy(thread_data->td->counts, &cpi->common.counts,
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c index 6fb0312..3b7eb6a 100644 --- a/av1/encoder/mcomp.c +++ b/av1/encoder/mcomp.c
@@ -2667,7 +2667,6 @@ return var; } -#if CONFIG_MOTION_VAR /* returns subpixel variance error function */ #define DIST(r, c) \ vfp->osvf(pre(y, y_stride, r, c), y_stride, sp(c), sp(r), z, mask, &sse) @@ -3136,7 +3135,6 @@ } return bestsme; } -#endif // CONFIG_MOTION_VAR // Note(yunqingwang): The following 2 functions are only used in the motion // vector unit test, which return extreme motion vectors allowed by the MV
diff --git a/av1/encoder/mcomp.h b/av1/encoder/mcomp.h index 37cd2d2..8ca42be 100644 --- a/av1/encoder/mcomp.h +++ b/av1/encoder/mcomp.h
@@ -137,7 +137,6 @@ int var_max, int rd); #endif -#if CONFIG_MOTION_VAR int av1_obmc_full_pixel_diamond(const struct AV1_COMP *cpi, MACROBLOCK *x, MV *mvp_full, int step_param, int sadpb, int further_steps, int do_refine, @@ -148,7 +147,6 @@ int error_per_bit, const aom_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step, int *mvjcost, int *mvcost[2], int *distortion, unsigned int *sse1, int is_second, int use_upsampled_ref); -#endif // CONFIG_MOTION_VAR #ifdef __cplusplus } // extern "C" #endif
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c index 8dcaa88..e05f406 100644 --- a/av1/encoder/rd.c +++ b/av1/encoder/rd.c
@@ -399,12 +399,11 @@ #endif } #endif // CONFIG_INTERINTRA -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION for (i = BLOCK_8X8; i < BLOCK_SIZES_ALL; i++) { av1_cost_tokens_from_cdf(x->motion_mode_cost[i], fc->motion_mode_cdf[i], NULL); } -#if CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION +#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], @@ -417,14 +416,13 @@ x->motion_mode_cost1[i][1] = av1_cost_bit(fc->obmc_prob[i], 1); #endif } -#endif // CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION -#if CONFIG_MOTION_VAR && CONFIG_NCOBMC_ADAPT_WEIGHT +#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], NULL); } -#endif // CONFIG_MOTION_VAR && CONFIG_NCOBMC_ADAPT_WEIGHT -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION +#endif // CONFIG_NCOBMC_ADAPT_WEIGHT } }
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c index 5e9d24c..87de695 100644 --- a/av1/encoder/rdopt.c +++ b/av1/encoder/rdopt.c
@@ -30,9 +30,7 @@ #include "av1/common/entropymode.h" #include "av1/common/idct.h" #include "av1/common/mvref_common.h" -#if CONFIG_MOTION_VAR #include "av1/common/obmc.h" -#endif #include "av1/common/pred_common.h" #include "av1/common/quant_common.h" #include "av1/common/reconinter.h" @@ -6761,11 +6759,9 @@ av1_set_mv_search_range(&x->mv_limits, &ref_mv); -#if CONFIG_MOTION_VAR if (mbmi->motion_mode != SIMPLE_TRANSLATION) mvp_full = mbmi->mv[0].as_mv; else -#endif // CONFIG_MOTION_VAR mvp_full = pred_mv[x->mv_best_ref_index[ref]]; mvp_full.col >>= 3; @@ -6773,21 +6769,18 @@ x->best_mv.as_int = x->second_best_mv.as_int = INVALID_MV; -#if CONFIG_MOTION_VAR switch (mbmi->motion_mode) { case SIMPLE_TRANSLATION: -#endif // CONFIG_MOTION_VAR #if CONFIG_HASH_ME bestsme = av1_full_pixel_search(cpi, x, bsize, &mvp_full, step_param, sadpb, cond_cost_list(cpi, cost_list), &ref_mv, INT_MAX, 1, (MI_SIZE * mi_col), (MI_SIZE * mi_row), 0); #else - bestsme = av1_full_pixel_search(cpi, x, bsize, &mvp_full, step_param, sadpb, - cond_cost_list(cpi, cost_list), &ref_mv, - INT_MAX, 1); + bestsme = av1_full_pixel_search(cpi, x, bsize, &mvp_full, step_param, + sadpb, cond_cost_list(cpi, cost_list), + &ref_mv, INT_MAX, 1); #endif -#if CONFIG_MOTION_VAR break; case OBMC_CAUSAL: bestsme = av1_obmc_full_pixel_diamond( @@ -6797,7 +6790,6 @@ break; default: assert(0 && "Invalid motion mode!\n"); } -#endif // CONFIG_MOTION_VAR x->mv_limits = tmp_mv_limits; @@ -6811,10 +6803,8 @@ if (bestsme < INT_MAX) { #endif int dis; /* TODO: use dis in distortion calculation later. */ -#if CONFIG_MOTION_VAR switch (mbmi->motion_mode) { case SIMPLE_TRANSLATION: -#endif // CONFIG_MOTION_VAR if (cpi->sf.use_upsampled_references) { int best_mv_var; const int try_second = x->second_best_mv.as_int != INVALID_MV && @@ -6864,7 +6854,6 @@ x->nmvjointcost, x->mvcost, &dis, &x->pred_sse[ref], NULL, NULL, 0, 0, 0, 0, 0); } -#if CONFIG_MOTION_VAR break; case OBMC_CAUSAL: av1_find_best_obmc_sub_pixel_tree_up( @@ -6875,16 +6864,11 @@ break; default: assert(0 && "Invalid motion mode!\n"); } -#endif // CONFIG_MOTION_VAR } *rate_mv = av1_mv_bit_cost(&x->best_mv.as_mv, &ref_mv, x->nmvjointcost, x->mvcost, MV_COST_WEIGHT); -#if CONFIG_MOTION_VAR if (cpi->sf.adaptive_motion_search && mbmi->motion_mode == SIMPLE_TRANSLATION) -#else - if (cpi->sf.adaptive_motion_search) -#endif // CONFIG_MOTION_VAR x->pred_mv[ref] = x->best_mv.as_mv; if (scaled_ref_frame) { @@ -7793,13 +7777,11 @@ } typedef struct { -#if CONFIG_MOTION_VAR // Inter prediction buffers and respective strides uint8_t *above_pred_buf[MAX_MB_PLANE]; int above_pred_stride[MAX_MB_PLANE]; uint8_t *left_pred_buf[MAX_MB_PLANE]; int left_pred_stride[MAX_MB_PLANE]; -#endif // CONFIG_MOTION_VAR int_mv *single_newmv; // Pointer to array of motion vectors to use for each ref and their rates // Should point to first of 2 arrays in 2D array @@ -8052,7 +8034,6 @@ return 0; } -#if CONFIG_WARPED_MOTION || CONFIG_MOTION_VAR #if CONFIG_DUAL_FILTER static InterpFilters condition_interp_filters_on_mv( InterpFilters interp_filters, const MACROBLOCKD *xd) { @@ -8065,7 +8046,6 @@ return av1_make_interp_filters(filters[0], filters[1]); } #endif -#endif // CONFIG_WARPED_MOTION || CONFIG_MOTION_VAR // TODO(afergs): Refactor the MBMI references in here - there's four // TODO(afergs): Refactor optional args - add them to a struct or remove @@ -8075,12 +8055,10 @@ int *disable_skip, int_mv (*mode_mv)[TOTAL_REFS_PER_FRAME], int mi_row, int mi_col, HandleInterModeArgs *const args, const int64_t ref_best_rd, const int *refs, int rate_mv, -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION // only used when WARPED_MOTION is on? int_mv *const single_newmv, int rate2_bmc_nocoeff, - MB_MODE_INFO *best_bmc_mbmi, int rate_mv_bmc, -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION - int rs, int *skip_txfm_sb, int64_t *skip_sse_sb, BUFFER_SET *orig_dst) { + MB_MODE_INFO *best_bmc_mbmi, int rate_mv_bmc, int rs, int *skip_txfm_sb, + int64_t *skip_sse_sb, BUFFER_SET *orig_dst) { const AV1_COMMON *const cm = &cpi->common; MACROBLOCKD *xd = &x->e_mbd; MODE_INFO *mi = xd->mi[0]; @@ -8096,17 +8074,15 @@ (void)rate_mv; (void)is_comp_pred; (void)this_mode; -#if !CONFIG_WARPED_MOTION && CONFIG_MOTION_VAR +#if !CONFIG_WARPED_MOTION (void)single_newmv; #endif -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION MOTION_MODE motion_mode, last_motion_mode_allowed; int rate2_nocoeff = 0, best_xskip, best_disable_skip = 0; RD_STATS best_rd_stats, best_rd_stats_y, best_rd_stats_uv; MB_MODE_INFO base_mbmi, best_mbmi; uint8_t best_blk_skip[MAX_MB_PLANE][MAX_MIB_SIZE * MAX_MIB_SIZE * 4]; -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION #if CONFIG_WARPED_MOTION #if CONFIG_EXT_WARPED_MOTION @@ -8118,9 +8094,7 @@ #endif // CONFIG_EXT_WARPED_MOTION #endif // CONFIG_WARPED_MOTION -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION av1_invalid_rd_stats(&best_rd_stats); -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION if (cm->interp_filter == SWITCHABLE) rd_stats->rate += rs; #if CONFIG_WARPED_MOTION @@ -8134,7 +8108,6 @@ #endif // CONFIG_EXT_WARPED_MOTION best_bmc_mbmi->num_proj_ref[0] = mbmi->num_proj_ref[0]; #endif // CONFIG_WARPED_MOTION -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION rate2_nocoeff = rd_stats->rate; last_motion_mode_allowed = motion_mode_allowed(0, xd->global_motion, #if CONFIG_WARPED_MOTION @@ -8142,9 +8115,7 @@ #endif mi); base_mbmi = *mbmi; -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION int64_t best_rd = INT64_MAX; for (motion_mode = SIMPLE_TRANSLATION; motion_mode <= last_motion_mode_allowed; motion_mode++) { @@ -8164,7 +8135,6 @@ *mbmi = base_mbmi; mbmi->motion_mode = motion_mode; -#if CONFIG_MOTION_VAR if (mbmi->motion_mode == OBMC_CAUSAL) { *mbmi = *best_bmc_mbmi; mbmi->motion_mode = OBMC_CAUSAL; @@ -8196,7 +8166,6 @@ model_rd_for_sb(cpi, bsize, x, xd, 0, MAX_MB_PLANE - 1, &tmp_rate, &tmp_dist, skip_txfm_sb, skip_sse_sb); } -#endif // CONFIG_MOTION_VAR #if CONFIG_WARPED_MOTION if (mbmi->motion_mode == WARPED_CAUSAL) { @@ -8290,21 +8259,20 @@ rd_stats->skip = 1; rd_stats->rate = tmp_rate2; if (last_motion_mode_allowed > SIMPLE_TRANSLATION) { -#if CONFIG_WARPED_MOTION && CONFIG_MOTION_VAR +#if CONFIG_WARPED_MOTION if (last_motion_mode_allowed == WARPED_CAUSAL) -#endif // CONFIG_WARPED_MOTION && CONFIG_MOTION_VAR +#endif // CONFIG_WARPED_MOTION rd_stats->rate += x->motion_mode_cost[bsize][mbmi->motion_mode]; -#if CONFIG_WARPED_MOTION && CONFIG_MOTION_VAR +#if CONFIG_WARPED_MOTION else rd_stats->rate += x->motion_mode_cost1[bsize][mbmi->motion_mode]; -#endif // CONFIG_WARPED_MOTION && CONFIG_MOTION_VAR +#endif // CONFIG_WARPED_MOTION } #if CONFIG_WARPED_MOTION if (mbmi->motion_mode == WARPED_CAUSAL) { rd_stats->rate -= rs; } #endif // CONFIG_WARPED_MOTION -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION if (!*skip_txfm_sb) { int64_t rdcosty = INT64_MAX; int is_cost_valid_uv = 0; @@ -8327,16 +8295,12 @@ if (rd_stats_y->rate == INT_MAX) { av1_invalid_rd_stats(rd_stats); -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION if (mbmi->motion_mode != SIMPLE_TRANSLATION) { continue; } else { -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION restore_dst_buf(xd, *orig_dst); return INT64_MAX; -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION } -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION } av1_merge_rd_stats(rd_stats, rd_stats_y); @@ -8348,12 +8312,7 @@ inter_block_uvrd(cpi, x, rd_stats_uv, bsize, ref_best_rd - rdcosty, 0); if (!is_cost_valid_uv) { -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION continue; -#else - restore_dst_buf(xd, *orig_dst); - return INT64_MAX; -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION } /* clang-format on */ av1_merge_rd_stats(rd_stats, rd_stats_uv); @@ -8365,7 +8324,6 @@ // other place when we need to compare non-coefficient cost. mbmi->rd_stats = *rd_stats; #endif // CONFIG_RD_DEBUG -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION const int skip_ctx = av1_get_skip_context(xd); if (rd_stats->skip) { rd_stats->rate -= rd_stats_uv->rate + rd_stats_y->rate; @@ -8392,16 +8350,13 @@ mbmi->skip = 0; } *disable_skip = 0; -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION } else { x->skip = 1; *disable_skip = 1; mbmi->tx_size = tx_size_from_tx_mode(bsize, cm->tx_mode, 1); -// The cost of skip bit needs to be added. -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION + // The cost of skip bit needs to be added. mbmi->skip = 0; -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION rd_stats->rate += x->skip_cost[av1_get_skip_context(xd)][1]; rd_stats->dist = *skip_sse_sb; @@ -8419,7 +8374,6 @@ } } -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION tmp_rd = RDCOST(x->rdmult, rd_stats->rate, rd_stats->dist); if (mbmi->motion_mode == SIMPLE_TRANSLATION || (tmp_rd < best_rd)) { best_mbmi = *mbmi; @@ -8449,7 +8403,6 @@ sizeof(uint8_t) * xd->n8_h * xd->n8_w * 4); x->skip = best_xskip; *disable_skip = best_disable_skip; -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION restore_dst_buf(xd, *orig_dst); return 0; @@ -8502,11 +8455,9 @@ #endif // CONFIG_HIGHBITDEPTH uint8_t *tmp_buf; -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION int rate2_bmc_nocoeff; MB_MODE_INFO best_bmc_mbmi; int rate_mv_bmc; -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION int64_t rd = INT64_MAX; BUFFER_SET orig_dst, tmp_dst; int rs = 0; @@ -8514,7 +8465,7 @@ int skip_txfm_sb = 0; int64_t skip_sse_sb = INT64_MAX; int16_t mode_ctx; -#if CONFIG_NCOBMC_ADAPT_WEIGHT && CONFIG_MOTION_VAR +#if CONFIG_NCOBMC_ADAPT_WEIGHT // dummy fillers mbmi->ncobmc_mode[0] = NO_OVERLAP; mbmi->ncobmc_mode[1] = NO_OVERLAP; @@ -8748,12 +8699,10 @@ &rd, &rs, &skip_txfm_sb, &skip_sse_sb); if (ret_val != 0) return ret_val; -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION best_bmc_mbmi = *mbmi; rate2_bmc_nocoeff = rd_stats->rate; if (cm->interp_filter == SWITCHABLE) rate2_bmc_nocoeff += rs; rate_mv_bmc = rate_mv; -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION #if CONFIG_COMPOUND_SINGLEREF if (is_comp_pred || is_singleref_comp_mode) @@ -9095,19 +9044,15 @@ #if CONFIG_INTERINTRA rd_stats->rate += compmode_interintra_cost; -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION rate2_bmc_nocoeff += compmode_interintra_cost; #endif -#endif rd_stats->rate += compmode_interinter_cost; - ret_val = motion_mode_rd( - cpi, x, bsize, rd_stats, rd_stats_y, rd_stats_uv, disable_skip, mode_mv, - mi_row, mi_col, args, ref_best_rd, refs, rate_mv, -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION - single_newmv, rate2_bmc_nocoeff, &best_bmc_mbmi, rate_mv_bmc, -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION - rs, &skip_txfm_sb, &skip_sse_sb, &orig_dst); + ret_val = motion_mode_rd(cpi, x, bsize, rd_stats, rd_stats_y, rd_stats_uv, + disable_skip, mode_mv, mi_row, mi_col, args, + ref_best_rd, refs, rate_mv, single_newmv, + rate2_bmc_nocoeff, &best_bmc_mbmi, rate_mv_bmc, rs, + &skip_txfm_sb, &skip_sse_sb, &orig_dst); if (ret_val != 0) return ret_val; return 0; // The rate-distortion cost will be re-calculated by caller. @@ -9493,13 +9438,11 @@ plane_block_height); } -#if CONFIG_MOTION_VAR static void calc_target_weighted_pred(const AV1_COMMON *cm, const MACROBLOCK *x, const MACROBLOCKD *xd, int mi_row, int mi_col, const uint8_t *above, int above_stride, const uint8_t *left, int left_stride); -#endif // CONFIG_MOTION_VAR void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data, MACROBLOCK *x, int mi_row, int mi_col, @@ -9583,16 +9526,10 @@ const int mode_search_skip_flags = sf->mode_search_skip_flags; HandleInterModeArgs args = { -#if CONFIG_MOTION_VAR - { NULL }, - { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE }, - { NULL }, - { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE }, -#endif // CONFIG_MOTION_VAR - NULL, - NULL, - NULL, - { { 0 } }, + { NULL }, { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE }, + { NULL }, { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE }, + NULL, NULL, + NULL, { { 0 } }, }; const int rows = block_size_high[bsize]; @@ -9600,7 +9537,6 @@ int palette_ctx = 0; const MODE_INFO *above_mi = xd->above_mi; const MODE_INFO *left_mi = xd->left_mi; -#if CONFIG_MOTION_VAR int dst_width1[MAX_MB_PLANE] = { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE }; int dst_width2[MAX_MB_PLANE] = { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE }; int dst_height1[MAX_MB_PLANE] = { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE }; @@ -9630,7 +9566,6 @@ #if CONFIG_HIGHBITDEPTH } #endif // CONFIG_HIGHBITDEPTH -#endif // CONFIG_MOTION_VAR av1_zero(best_mbmode); @@ -9715,7 +9650,6 @@ } } -#if CONFIG_MOTION_VAR av1_count_overlappable_neighbors(cm, xd, mi_row, mi_col); if (check_num_overlappable_neighbors(mbmi) && @@ -9732,7 +9666,6 @@ args.above_pred_stride[0], args.left_pred_buf[0], args.left_pred_stride[0]); } -#endif // CONFIG_MOTION_VAR for (ref_frame = LAST_FRAME; ref_frame <= ALTREF_FRAME; ++ref_frame) { if (!(cpi->ref_frame_flags & flag_list[ref_frame])) { @@ -10720,25 +10653,8 @@ } if (tmp_alt_rd < INT64_MAX) { -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION tmp_alt_rd = RDCOST(x->rdmult, tmp_rd_stats.rate, tmp_rd_stats.dist); -#else - if (RDCOST(x->rdmult, tmp_rd_stats_y.rate + tmp_rd_stats_uv.rate, - tmp_rd_stats.dist) < - RDCOST(x->rdmult, 0, tmp_rd_stats.sse)) - tmp_alt_rd = RDCOST( - x->rdmult, - tmp_rd_stats.rate + x->skip_cost[av1_get_skip_context(xd)][0], - tmp_rd_stats.dist); - else - tmp_alt_rd = - RDCOST(x->rdmult, - tmp_rd_stats.rate + - x->skip_cost[av1_get_skip_context(xd)][1] - - tmp_rd_stats_y.rate - tmp_rd_stats_uv.rate, - tmp_rd_stats.sse); -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION } if (tmp_ref_rd > tmp_alt_rd) { @@ -10805,12 +10721,7 @@ } #endif // CONFIG_COMPOUND_SINGLEREF -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION - if (ref_frame == INTRA_FRAME) -#else - if (!disable_skip) -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION - { + if (ref_frame == INTRA_FRAME) { if (skippable) { // Back out the coefficient coding costs rate2 -= (rate_y + rate_uv); @@ -10840,7 +10751,6 @@ // Calculate the final RD estimate for this mode. this_rd = RDCOST(x->rdmult, rate2, distortion2); -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION } else { this_skip2 = mbmi->skip; this_rd = RDCOST(x->rdmult, rate2, distortion2); @@ -10848,7 +10758,6 @@ rate_y = 0; rate_uv = 0; } -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION } if (ref_frame == INTRA_FRAME) { @@ -10963,13 +10872,11 @@ if (is_inter_mode(mbmi->mode)) { av1_build_inter_predictors_sb(cm, xd, mi_row, mi_col, NULL, bsize); -#if CONFIG_MOTION_VAR if (mbmi->motion_mode == OBMC_CAUSAL) { av1_build_obmc_inter_prediction( cm, xd, mi_row, mi_col, args.above_pred_buf, args.above_pred_stride, args.left_pred_buf, args.left_pred_stride); } -#endif // CONFIG_MOTION_VAR av1_subtract_plane(x, bsize, 0); if (cm->tx_mode == TX_MODE_SELECT || xd->lossless[mbmi->segment_id]) { // av1_rd_pick_inter_mode_sb @@ -11267,7 +11174,6 @@ // Note: this section is needed since the mode may have been forced to // ZEROMV by the all-zero mode handling of ref-mv. if (mbmi->mode == ZEROMV || mbmi->mode == ZERO_ZEROMV) { -#if CONFIG_WARPED_MOTION || CONFIG_MOTION_VAR // Correct the motion mode for ZEROMV const MOTION_MODE last_motion_mode_allowed = motion_mode_allowed(0, xd->global_motion, @@ -11277,7 +11183,6 @@ xd->mi[0]); if (mbmi->motion_mode > last_motion_mode_allowed) mbmi->motion_mode = last_motion_mode_allowed; -#endif // CONFIG_WARPED_MOTION || CONFIG_MOTION_VAR // Correct the interpolation filter for ZEROMV if (is_nontrans_global_motion(xd)) { @@ -11385,9 +11290,7 @@ #endif mbmi->motion_mode = SIMPLE_TRANSLATION; -#if CONFIG_MOTION_VAR av1_count_overlappable_neighbors(cm, xd, mi_row, mi_col); -#endif #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]; @@ -11459,8 +11362,6 @@ store_coding_context(x, ctx, THR_ZEROMV, best_pred_diff, 0); } -#if CONFIG_MOTION_VAR - struct calc_target_weighted_pred_ctxt { const MACROBLOCK *x; const uint8_t *tmp; @@ -11856,7 +11757,6 @@ if (mbmi->motion_mode != NCOBMC_ADAPT_WEIGHT) av1_build_inter_predictors_sb(cm, xd, mi_row, mi_col, NULL, bsize); -#if CONFIG_MOTION_VAR if (mbmi->motion_mode == OBMC_CAUSAL) { #if CONFIG_NCOBMC av1_build_ncobmc_inter_predictors_sb(cm, xd, mi_row, mi_col); @@ -11864,7 +11764,6 @@ av1_build_obmc_inter_predictors_sb(cm, xd, mi_row, mi_col); #endif } -#endif // CONFIG_MOTION_VAR if (mbmi->motion_mode == NCOBMC_ADAPT_WEIGHT) for (int plane = 0; plane < MAX_MB_PLANE; ++plane) @@ -12112,4 +12011,3 @@ } #endif // CONFIG_NCOBMC_ADAPT_WEIGHT -#endif // CONFIG_MOTION_VAR
diff --git a/av1/encoder/rdopt.h b/av1/encoder/rdopt.h index 23127e3..57dff32 100644 --- a/av1/encoder/rdopt.h +++ b/av1/encoder/rdopt.h
@@ -109,10 +109,10 @@ int av1_active_v_edge(const struct AV1_COMP *cpi, int mi_col, int mi_step); int av1_active_edge_sb(const struct AV1_COMP *cpi, int mi_row, int mi_col); -#if CONFIG_MOTION_VAR && CONFIG_NCOBMC +#if CONFIG_NCOBMC void av1_check_ncobmc_rd(const struct AV1_COMP *cpi, struct macroblock *x, int mi_row, int mi_col); -#endif // CONFIG_MOTION_VAR && CONFIG_NCOBMC +#endif // CONFIG_NCOBMC #ifdef __cplusplus } // extern "C"
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake index 51c0421..9c8728f 100644 --- a/build/cmake/aom_config_defaults.cmake +++ b/build/cmake/aom_config_defaults.cmake
@@ -168,7 +168,6 @@ set(CONFIG_MASKED_TX 0 CACHE NUMBER "AV1 experiment flag.") set(CONFIG_MAX_TILE 0 CACHE NUMBER "AV1 experiment flag.") set(CONFIG_MFMV 0 CACHE NUMBER "AV1 experiment flag.") -set(CONFIG_MOTION_VAR 1 CACHE NUMBER "AV1 experiment flag.") set(CONFIG_MRC_TX 0 CACHE NUMBER "AV1 experiment flag.") set(CONFIG_MV_COMPRESS 1 CACHE NUMBER "AV1 experiment flag.") set(CONFIG_NCOBMC 0 CACHE NUMBER "AV1 experiment flag.")
diff --git a/configure b/configure index e928d4c..d6edbb6 100755 --- a/configure +++ b/configure
@@ -272,7 +272,6 @@ ext_partition_types_ab unpoison_partition_ctx ext_tile - motion_var ncobmc warped_motion q_adapt_probs @@ -506,7 +505,6 @@ soft_enable intra_edge soft_enable mv_compress soft_enable dual_filter - soft_enable motion_var soft_enable warped_motion soft_enable interintra soft_enable one_sided_compound @@ -553,7 +551,6 @@ enabled compound_round && soft_enable convolve_round enabled ext_intra_mod && enable_feature intra_edge enabled intra_edge && enable_feature ext_intra - enabled ncobmc_adapt_weight && enable_feature motion_var enabled ext_comp_refs && enable_feature one_sided_compound enabled lgt_from_pred && enable_feature ext_tx enabled lgt_from_pred && disable_feature mrc_tx
diff --git a/test/obmc_sad_test.cc b/test/obmc_sad_test.cc index 219c5d8..d74b590 100644 --- a/test/obmc_sad_test.cc +++ b/test/obmc_sad_test.cc
@@ -84,7 +84,6 @@ } #if HAVE_SSE4_1 -#if CONFIG_MOTION_VAR const ObmcSadTest::ParamType sse4_functions[] = { #if CONFIG_EXT_PARTITION TestFuncs(aom_obmc_sad128x128_c, aom_obmc_sad128x128_sse4_1), @@ -108,7 +107,6 @@ INSTANTIATE_TEST_CASE_P(SSE4_1, ObmcSadTest, ::testing::ValuesIn(sse4_functions)); -#endif // CONFIG_MOTION_VAR #endif // HAVE_SSE4_1 //////////////////////////////////////////////////////////////////////////////// @@ -169,7 +167,6 @@ } #if HAVE_SSE4_1 -#if CONFIG_MOTION_VAR ObmcSadHBDTest::ParamType sse4_functions_hbd[] = { #if CONFIG_EXT_PARTITION TestFuncs(aom_highbd_obmc_sad128x128_c, aom_highbd_obmc_sad128x128_sse4_1), @@ -193,7 +190,6 @@ INSTANTIATE_TEST_CASE_P(SSE4_1, ObmcSadHBDTest, ::testing::ValuesIn(sse4_functions_hbd)); -#endif // CONFIG_MOTION_VAR #endif // HAVE_SSE4_1 #endif // CONFIG_HIGHBITDEPTH } // namespace
diff --git a/test/obmc_variance_test.cc b/test/obmc_variance_test.cc index 1b30645..a41ba7d 100644 --- a/test/obmc_variance_test.cc +++ b/test/obmc_variance_test.cc
@@ -93,7 +93,6 @@ } #if HAVE_SSE4_1 -#if CONFIG_MOTION_VAR const ObmcVarianceTest::ParamType sse4_functions[] = { #if CONFIG_EXT_PARTITION TestFuncs(aom_obmc_variance128x128_c, aom_obmc_variance128x128_sse4_1), @@ -117,7 +116,6 @@ INSTANTIATE_TEST_CASE_P(SSE4_1, ObmcVarianceTest, ::testing::ValuesIn(sse4_functions)); -#endif // CONFIG_MOTION_VAR #endif // HAVE_SSE4_1 //////////////////////////////////////////////////////////////////////////////// @@ -183,7 +181,6 @@ } #if HAVE_SSE4_1 -#if CONFIG_MOTION_VAR ObmcVarianceHBDTest::ParamType sse4_functions_hbd[] = { #if CONFIG_EXT_PARTITION TestFuncs(aom_highbd_obmc_variance128x128_c, @@ -291,7 +288,6 @@ INSTANTIATE_TEST_CASE_P(SSE4_1, ObmcVarianceHBDTest, ::testing::ValuesIn(sse4_functions_hbd)); -#endif // CONFIG_MOTION_VAR #endif // HAVE_SSE4_1 #endif // CONFIG_HIGHBITDEPTH } // namespace
diff --git a/test/test.cmake b/test/test.cmake index ab2f613..437e46f 100644 --- a/test/test.cmake +++ b/test/test.cmake
@@ -279,12 +279,10 @@ ${AOM_UNIT_TEST_ENCODER_INTRIN_SSE4_1} "${AOM_ROOT}/test/corner_match_test.cc") - if (CONFIG_MOTION_VAR) - set(AOM_UNIT_TEST_ENCODER_SOURCES - ${AOM_UNIT_TEST_ENCODER_SOURCES} - "${AOM_ROOT}/test/obmc_sad_test.cc" - "${AOM_ROOT}/test/obmc_variance_test.cc") - endif () + set(AOM_UNIT_TEST_ENCODER_SOURCES + ${AOM_UNIT_TEST_ENCODER_SOURCES} + "${AOM_ROOT}/test/obmc_sad_test.cc" + "${AOM_ROOT}/test/obmc_variance_test.cc") if (CONFIG_TX64X64) set(AOM_UNIT_TEST_ENCODER_SOURCES
diff --git a/test/test.mk b/test/test.mk index 85c7618..8acb5f7 100644 --- a/test/test.mk +++ b/test/test.mk
@@ -205,10 +205,8 @@ ## LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += filterintra_predictors_test.cc ## endif -ifeq ($(CONFIG_MOTION_VAR),yes) LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += obmc_sad_test.cc LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += obmc_variance_test.cc -endif ifeq ($(CONFIG_HIGHBITDEPTH),yes) ifeq ($(CONFIG_AV1_ENCODER),yes)
diff --git a/tools/aom_entropy_optimizer.c b/tools/aom_entropy_optimizer.c index 750b71c..c15fa1e 100644 --- a/tools/aom_entropy_optimizer.c +++ b/tools/aom_entropy_optimizer.c
@@ -504,8 +504,7 @@ "static const aom_cdf_prob\n" "default_compound_type_cdf[BLOCK_SIZES_ALL][CDF_SIZE(COMPOUND_TYPES)]"); -/* motion_var and warped_motion experiments */ -#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION + /* motion_var and warped_motion experiments */ cts_each_dim[0] = BLOCK_SIZES_ALL; cts_each_dim[1] = MOTION_MODES; optimize_entropy_table( @@ -517,7 +516,7 @@ &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_MOTION_VAR && CONFIG_WARPED_MOTION +#if CONFIG_WARPED_MOTION cts_each_dim[0] = BLOCK_SIZES_ALL; cts_each_dim[1] = 2; optimize_entropy_table( @@ -526,7 +525,7 @@ 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_MOTION_VAR && CONFIG_WARPED_MOTION +#endif // CONFIG_WARPED_MOTION #if CONFIG_NCOBMC_ADAPT_WEIGHT cts_each_dim[0] = ADAPT_OVERLAP_BLOCKS; cts_each_dim[1] = MAX_NCOBMC_MODES; @@ -552,7 +551,6 @@ "[CDF_SIZE(OBMC_FAMILY_MODES)]"); #endif #endif // CONFIG_NCOBMC_ADAPT_WEIGHT -#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION /* Intra/inter flag */ cts_each_dim[0] = INTRA_INTER_CONTEXTS;