Remove dual filter code.
Remove dual filter code.
For issue #39
diff --git a/aom/aom_encoder.h b/aom/aom_encoder.h
index e7bf8d9..cda756a 100644
--- a/aom/aom_encoder.h
+++ b/aom/aom_encoder.h
@@ -359,12 +359,6 @@
*
*/
unsigned int enable_filter_intra;
-#if !CONFIG_REMOVE_DUAL_FILTER
- /*!\brief enable dual filter
- *
- */
- unsigned int enable_dual_filter;
-#endif // !CONFIG_REMOVE_DUAL_FILTER
/*!\brief enable intra angle delta
*
*/
diff --git a/aom/aomcx.h b/aom/aomcx.h
index 396463f..e0f9487 100644
--- a/aom/aomcx.h
+++ b/aom/aomcx.h
@@ -874,17 +874,7 @@
*/
AV1E_SET_ALLOW_REF_FRAME_MVS = 85,
-#if !CONFIG_REMOVE_DUAL_FILTER
- /*!\brief Codec control function to turn on / off dual interpolation filter
- * for a sequence, int parameter
- *
- * - 0 = disable
- * - 1 = enable
- */
- AV1E_SET_ENABLE_DUAL_FILTER = 86,
-#else
-/* Note: enum value 86 unused */
-#endif // !CONFIG_REMOVE_DUAL_FILTER
+ /* Note: enum value 86 unused */
/*!\brief Codec control function to turn on / off delta quantization in chroma
* planes usage for a sequence, int parameter
@@ -1595,11 +1585,6 @@
AOM_CTRL_USE_TYPE(AV1E_SET_ALLOW_REF_FRAME_MVS, int)
#define AOM_CTRL_AV1E_SET_ALLOW_REF_FRAME_MVS
-#if !CONFIG_REMOVE_DUAL_FILTER
-AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_DUAL_FILTER, int)
-#define AOM_CTRL_AV1E_SET_ENABLE_DUAL_FILTER
-#endif // !CONFIG_REMOVE_DUAL_FILTER
-
AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_CHROMA_DELTAQ, int)
#define AOM_CTRL_AV1E_SET_ENABLE_CHROMA_DELTAQ
diff --git a/aom_dsp/variance.c b/aom_dsp/variance.c
index 0d54c40..9cb5345 100644
--- a/aom_dsp/variance.c
+++ b/aom_dsp/variance.c
@@ -311,12 +311,7 @@
InterPredParams inter_pred_params;
inter_pred_params.conv_params = get_conv_params(0, plane, xd->bd);
-#if CONFIG_REMOVE_DUAL_FILTER
const InterpFilter filters = EIGHTTAP_REGULAR;
-#else
- const int_interpfilters filters =
- av1_broadcast_interp_filter(EIGHTTAP_REGULAR);
-#endif // CONFIG_REMOVE_DUAL_FILTER
av1_init_inter_params(
&inter_pred_params, width, height, mi_y >> pd->subsampling_y,
mi_x >> pd->subsampling_x, pd->subsampling_x, pd->subsampling_y,
@@ -862,12 +857,7 @@
InterPredParams inter_pred_params;
inter_pred_params.conv_params = get_conv_params(0, plane, xd->bd);
-#if CONFIG_REMOVE_DUAL_FILTER
const InterpFilter filters = EIGHTTAP_REGULAR;
-#else
- const int_interpfilters filters =
- av1_broadcast_interp_filter(EIGHTTAP_REGULAR);
-#endif // CONFIG_REMOVE_DUAL_FILTER
av1_init_inter_params(
&inter_pred_params, width, height, mi_y >> pd->subsampling_y,
mi_x >> pd->subsampling_x, pd->subsampling_x, pd->subsampling_y,
diff --git a/aom_dsp/x86/highbd_variance_sse2.c b/aom_dsp/x86/highbd_variance_sse2.c
index 21b4c7b..b237849 100644
--- a/aom_dsp/x86/highbd_variance_sse2.c
+++ b/aom_dsp/x86/highbd_variance_sse2.c
@@ -645,12 +645,7 @@
InterPredParams inter_pred_params;
inter_pred_params.conv_params = get_conv_params(0, plane, xd->bd);
-#if CONFIG_REMOVE_DUAL_FILTER
const InterpFilter filters = EIGHTTAP_REGULAR;
-#else
- const int_interpfilters filters =
- av1_broadcast_interp_filter(EIGHTTAP_REGULAR);
-#endif // CONFIG_REMOVE_DUAL_FILTER
av1_init_inter_params(
&inter_pred_params, width, height, mi_y >> pd->subsampling_y,
mi_x >> pd->subsampling_x, pd->subsampling_x, pd->subsampling_y,
diff --git a/aom_dsp/x86/variance_sse2.c b/aom_dsp/x86/variance_sse2.c
index 7c4511f..5ae89e9 100644
--- a/aom_dsp/x86/variance_sse2.c
+++ b/aom_dsp/x86/variance_sse2.c
@@ -524,12 +524,7 @@
InterPredParams inter_pred_params;
inter_pred_params.conv_params = get_conv_params(0, plane, xd->bd);
-#if CONFIG_REMOVE_DUAL_FILTER
const InterpFilter filters = EIGHTTAP_REGULAR;
-#else
- const int_interpfilters filters =
- av1_broadcast_interp_filter(EIGHTTAP_REGULAR);
-#endif // CONFIG_REMOVE_DUAL_FILTER
av1_init_inter_params(
&inter_pred_params, width, height, mi_y >> pd->subsampling_y,
mi_x >> pd->subsampling_x, pd->subsampling_x, pd->subsampling_y,
diff --git a/apps/aomenc.c b/apps/aomenc.c
index 740ca03..3b36033 100644
--- a/apps/aomenc.c
+++ b/apps/aomenc.c
@@ -144,9 +144,6 @@
AV1E_SET_ENABLE_1TO4_PARTITIONS,
AV1E_SET_MIN_PARTITION_SIZE,
AV1E_SET_MAX_PARTITION_SIZE,
-#if !CONFIG_REMOVE_DUAL_FILTER
- AV1E_SET_ENABLE_DUAL_FILTER,
-#endif // !CONFIG_REMOVE_DUAL_FILTER
AV1E_SET_ENABLE_CHROMA_DELTAQ,
AV1E_SET_ENABLE_INTRA_EDGE_FILTER,
AV1E_SET_ENABLE_ORDER_HINT,
@@ -341,9 +338,6 @@
&g_av1_codec_arg_defs.enable_1to4_partitions,
&g_av1_codec_arg_defs.min_partition_size,
&g_av1_codec_arg_defs.max_partition_size,
-#if !CONFIG_REMOVE_DUAL_FILTER
- &g_av1_codec_arg_defs.enable_dual_filter,
-#endif // !CONFIG_REMOVE_DUAL_FILTER
&g_av1_codec_arg_defs.enable_chroma_deltaq,
&g_av1_codec_arg_defs.enable_intra_edge_filter,
&g_av1_codec_arg_defs.enable_order_hint,
@@ -620,9 +614,6 @@
config->enable_cfl_intra = 1;
config->enable_smooth_intra = 1;
config->enable_filter_intra = 1;
-#if !CONFIG_REMOVE_DUAL_FILTER
- config->enable_dual_filter = 1;
-#endif // !CONFIG_REMOVE_DUAL_FILTER
config->enable_angle_delta = 1;
#if CONFIG_OPTFLOW_REFINEMENT
config->enable_opfl_refine = 1;
@@ -1417,15 +1408,8 @@
"FilterIntra (%d)\n",
encoder_cfg->enable_smooth_intra, encoder_cfg->enable_cfl_intra,
encoder_cfg->enable_filter_intra);
-#if CONFIG_REMOVE_DUAL_FILTER
fprintf(stdout, " : IntraDeltaAngle (%d)\n",
encoder_cfg->enable_angle_delta);
-#else
- fprintf(stdout,
- " : DualFilter (%d), IntraDeltaAngle "
- "(%d)\n",
- encoder_cfg->enable_dual_filter, encoder_cfg->enable_angle_delta);
-#endif // CONFIG_REMOVE_DUAL_FILTER
fprintf(stdout,
" : "
diff --git a/av1/arg_defs.c b/av1/arg_defs.c
index b935993..7c35eb1 100644
--- a/av1/arg_defs.c
+++ b/av1/arg_defs.c
@@ -387,13 +387,6 @@
ARG_DEF(NULL, "max-partition-size", 1,
"Set max partition size "
"(4:4x4, 8:8x8, 16:16x16, 32:32x32, 64:64x64, 128:128x128)"),
-
-#if !CONFIG_REMOVE_DUAL_FILTER
- .enable_dual_filter = ARG_DEF(NULL, "enable-dual-filter", 1,
- "Enable dual filter "
- "(0: false, 1: true (default))"),
-#endif // !CONFIG_REMOVE_DUAL_FILTER
-
.enable_chroma_deltaq = ARG_DEF(NULL, "enable-chroma-deltaq", 1,
"Enable chroma delta quant "
"(0: false (default), 1: true)"),
diff --git a/av1/arg_defs.h b/av1/arg_defs.h
index d9d6c2d..ca0f643 100644
--- a/av1/arg_defs.h
+++ b/av1/arg_defs.h
@@ -157,9 +157,6 @@
#endif
arg_def_t min_partition_size;
arg_def_t max_partition_size;
-#if !CONFIG_REMOVE_DUAL_FILTER
- arg_def_t enable_dual_filter;
-#endif // !CONFIG_REMOVE_DUAL_FILTER
arg_def_t enable_chroma_deltaq;
arg_def_t enable_intra_edge_filter;
arg_def_t enable_order_hint;
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index cbdc147..5d6ef46 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -84,9 +84,6 @@
aom_timing_info_type_t timing_info_type;
unsigned int frame_parallel_decoding_mode;
-#if !CONFIG_REMOVE_DUAL_FILTER
- int enable_dual_filter;
-#endif // !CONFIG_REMOVE_DUAL_FILTER
unsigned int enable_chroma_deltaq;
AQ_MODE aq_mode;
DELTAQ_MODE deltaq_mode;
@@ -356,22 +353,19 @@
#if CONFIG_CCSO
1, // enable_ccso
#endif
- 0, // force_video_mode
- 1, // enable_obmc
- 3, // enable_trellis_quant
- 0, // enable_qm
- DEFAULT_QM_Y, // qm_y
- DEFAULT_QM_U, // qm_u
- DEFAULT_QM_V, // qm_v
- DEFAULT_QM_FIRST, // qm_min
- DEFAULT_QM_LAST, // qm_max
- 1, // max number of tile groups
- 0, // mtu_size
- AOM_TIMING_UNSPECIFIED, // No picture timing signaling in bitstream
- 0, // frame_parallel_decoding_mode
-#if !CONFIG_REMOVE_DUAL_FILTER
- 1, // enable dual filter
-#endif // !CONFIG_REMOVE_DUAL_FILTER
+ 0, // force_video_mode
+ 1, // enable_obmc
+ 3, // enable_trellis_quant
+ 0, // enable_qm
+ DEFAULT_QM_Y, // qm_y
+ DEFAULT_QM_U, // qm_u
+ DEFAULT_QM_V, // qm_v
+ DEFAULT_QM_FIRST, // qm_min
+ DEFAULT_QM_LAST, // qm_max
+ 1, // max number of tile groups
+ 0, // mtu_size
+ AOM_TIMING_UNSPECIFIED, // No picture timing signaling in bitstream
+ 0, // frame_parallel_decoding_mode
0, // enable delta quant in chroma planes
NO_AQ, // aq_mode
DELTA_Q_OBJECTIVE, // deltaq_mode
@@ -844,9 +838,6 @@
: 0;
cfg->enable_warped_motion = extra_cfg->enable_warped_motion;
cfg->enable_diff_wtd_comp = extra_cfg->enable_diff_wtd_comp;
-#if !CONFIG_REMOVE_DUAL_FILTER
- cfg->enable_dual_filter = extra_cfg->enable_dual_filter;
-#endif // !CONFIG_REMOVE_DUAL_FILTER
#if CONFIG_OPTFLOW_REFINEMENT
cfg->enable_opfl_refine = extra_cfg->enable_opfl_refine;
#endif // CONFIG_OPTFLOW_REFINEMENT
@@ -919,9 +910,6 @@
: AOM_SUPERBLOCK_SIZE_DYNAMIC;
extra_cfg->enable_warped_motion = cfg->enable_warped_motion;
extra_cfg->enable_diff_wtd_comp = cfg->enable_diff_wtd_comp;
-#if !CONFIG_REMOVE_DUAL_FILTER
- extra_cfg->enable_dual_filter = cfg->enable_dual_filter;
-#endif // !CONFIG_REMOVE_DUAL_FILTER
#if CONFIG_OPTFLOW_REFINEMENT
extra_cfg->enable_opfl_refine = cfg->enable_opfl_refine;
#endif // CONFIG_OPTFLOW_REFINEMENT
@@ -1191,9 +1179,6 @@
tool_cfg->superblock_size = extra_cfg->superblock_size;
tool_cfg->enable_monochrome = cfg->monochrome;
tool_cfg->full_still_picture_hdr = cfg->full_still_picture_hdr;
-#if !CONFIG_REMOVE_DUAL_FILTER
- tool_cfg->enable_dual_filter = extra_cfg->enable_dual_filter;
-#endif // !CONFIG_REMOVE_DUAL_FILTER
tool_cfg->enable_order_hint = extra_cfg->enable_order_hint;
tool_cfg->enable_interintra_comp = extra_cfg->enable_interintra_comp;
tool_cfg->ref_frame_mvs_present =
@@ -1906,15 +1891,6 @@
return update_extra_cfg(ctx, &extra_cfg);
}
-#if !CONFIG_REMOVE_DUAL_FILTER
-static aom_codec_err_t ctrl_set_enable_dual_filter(aom_codec_alg_priv_t *ctx,
- va_list args) {
- struct av1_extracfg extra_cfg = ctx->extra_cfg;
- extra_cfg.enable_dual_filter = CAST(AV1E_SET_ENABLE_DUAL_FILTER, args);
- return update_extra_cfg(ctx, &extra_cfg);
-}
-#endif // !CONFIG_REMOVE_DUAL_FILTER
-
static aom_codec_err_t ctrl_set_enable_chroma_deltaq(aom_codec_alg_priv_t *ctx,
va_list args) {
struct av1_extracfg extra_cfg = ctx->extra_cfg;
@@ -3504,11 +3480,6 @@
argv, err_string)) {
extra_cfg.frame_parallel_decoding_mode =
arg_parse_uint_helper(&arg, err_string);
-#if !CONFIG_REMOVE_DUAL_FILTER
- } else if (arg_match_helper(&arg, &g_av1_codec_arg_defs.enable_dual_filter,
- argv, err_string)) {
- extra_cfg.enable_dual_filter = arg_parse_uint_helper(&arg, err_string);
-#endif // !CONFIG_REMOVE_DUAL_FILTER
} else if (arg_match_helper(&arg, &g_av1_codec_arg_defs.enable_chroma_deltaq,
argv, err_string)) {
extra_cfg.enable_chroma_deltaq = arg_parse_uint_helper(&arg, err_string);
@@ -3855,9 +3826,6 @@
{ AV1E_SET_ENABLE_1TO4_PARTITIONS, ctrl_set_enable_1to4_partitions },
{ AV1E_SET_MIN_PARTITION_SIZE, ctrl_set_min_partition_size },
{ AV1E_SET_MAX_PARTITION_SIZE, ctrl_set_max_partition_size },
-#if !CONFIG_REMOVE_DUAL_FILTER
- { AV1E_SET_ENABLE_DUAL_FILTER, ctrl_set_enable_dual_filter },
-#endif // !CONFIG_REMOVE_DUAL_FILTER
{ AV1E_SET_ENABLE_CHROMA_DELTAQ, ctrl_set_enable_chroma_deltaq },
{ AV1E_SET_ENABLE_INTRA_EDGE_FILTER, ctrl_set_enable_intra_edge_filter },
{ AV1E_SET_ENABLE_ORDER_HINT, ctrl_set_enable_order_hint },
@@ -4036,11 +4004,7 @@
#if CONFIG_CCSO
1,
#endif
- 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1,
-#if !CONFIG_REMOVE_DUAL_FILTER
- 1,
-#endif // !CONFIG_REMOVE_DUAL_FILTER
- 1,
+ 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1,
#if CONFIG_OPTFLOW_REFINEMENT
1,
#endif // CONFIG_OPTFLOW_REFINEMENT
diff --git a/av1/common/av1_common_int.h b/av1/common/av1_common_int.h
index dcd8faf..5d1d613 100644
--- a/av1/common/av1_common_int.h
+++ b/av1/common/av1_common_int.h
@@ -328,11 +328,7 @@
#if CONFIG_OPTFLOW_REFINEMENT
aom_opfl_refine_type enable_opfl_refine; // optical flow refinement type for
// this frame
-#endif
-#if !CONFIG_REMOVE_DUAL_FILTER
- uint8_t enable_dual_filter; // 0 - disable dual interpolation filter
-#endif // !CONFIG_REMOVE_DUAL_FILTER
- // 1 - enable vert/horz filter selection
+#endif // 1 - enable vert/horz filter selection
uint8_t enable_warped_motion; // 0 - disable warp for the sequence
// 1 - enable warp for the sequence
uint8_t enable_superres; // 0 - Disable superres for the sequence
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 6389666..6279301 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -322,11 +322,7 @@
TX_PARTITION_TYPE partition_type[INTER_TX_SIZE_BUF_LEN];
#endif // CONFIG_NEW_TX_PARTITION
/*! \brief Filter used in subpel interpolation. */
-#if CONFIG_REMOVE_DUAL_FILTER
int interp_fltr;
-#else
- int_interpfilters interp_filters;
-#endif // CONFIG_REMOVE_DUAL_FILTER
/*! \brief The motion mode used by the inter prediction. */
MOTION_MODE motion_mode;
/*! \brief Number of samples used by warp causal */
diff --git a/av1/common/filter.h b/av1/common/filter.h
index 9e8aba6..4c459ed 100644
--- a/av1/common/filter.h
+++ b/av1/common/filter.h
@@ -57,53 +57,6 @@
INTERP_SKIP_LUMA_SKIP_CHROMA,
} UENUM1BYTE(INTERP_EVAL_PLANE);
-#if !CONFIG_REMOVE_DUAL_FILTER
-enum {
- INTERP_HORZ_NEQ_VERT_NEQ = 0,
- INTERP_HORZ_EQ_VERT_NEQ,
- INTERP_HORZ_NEQ_VERT_EQ,
- INTERP_HORZ_EQ_VERT_EQ,
- INTERP_PRED_TYPE_ALL,
-} UENUM1BYTE(INTERP_PRED_TYPE);
-
-static const uint16_t
- av1_interp_dual_filt_mask[INTERP_PRED_TYPE_ALL - 2][SWITCHABLE_FILTERS] = {
- { (1 << REG_REG) | (1 << SMOOTH_REG) | (1 << SHARP_REG),
- (1 << REG_SMOOTH) | (1 << SMOOTH_SMOOTH) | (1 << SHARP_SMOOTH),
- (1 << REG_SHARP) | (1 << SMOOTH_SHARP) | (1 << SHARP_SHARP) },
- { (1 << REG_REG) | (1 << REG_SMOOTH) | (1 << REG_SHARP),
- (1 << SMOOTH_REG) | (1 << SMOOTH_SMOOTH) | (1 << SMOOTH_SHARP),
- (1 << SHARP_REG) | (1 << SHARP_SMOOTH) | (1 << SHARP_SHARP) }
- };
-
-// Pack two InterpFilter's into a uint32_t: since there are at most 10 filters,
-// we can use 16 bits for each and have more than enough space. This reduces
-// argument passing and unifies the operation of setting a (pair of) filters.
-typedef struct InterpFilters {
- uint16_t y_filter;
- uint16_t x_filter;
-} InterpFilters;
-
-typedef union int_interpfilters {
- uint32_t as_int;
- InterpFilters as_filters;
-} int_interpfilters;
-
-static INLINE InterpFilter av1_extract_interp_filter(int_interpfilters filters,
- int dir) {
- return (InterpFilter)((dir) ? filters.as_filters.x_filter
- : filters.as_filters.y_filter);
-}
-
-static INLINE int_interpfilters
-av1_broadcast_interp_filter(InterpFilter filter) {
- int_interpfilters filters;
- filters.as_filters.x_filter = filter;
- filters.as_filters.y_filter = filter;
- return filters;
-}
-#endif // !CONFIG_REMOVE_DUAL_FILTER
-
static INLINE InterpFilter av1_unswitchable_filter(InterpFilter filter) {
return filter == SWITCHABLE ? EIGHTTAP_REGULAR : filter;
}
@@ -281,24 +234,6 @@
}
}
-#if !CONFIG_REMOVE_DUAL_FILTER
-static INLINE void reset_interp_filter_allowed_mask(
- uint16_t *allow_interp_mask, DUAL_FILTER_TYPE filt_type) {
- uint16_t tmp = (~(1 << filt_type)) & 0xffff;
- *allow_interp_mask &= (tmp & ALLOW_ALL_INTERP_FILT_MASK);
-}
-
-static INLINE void set_interp_filter_allowed_mask(uint16_t *allow_interp_mask,
- DUAL_FILTER_TYPE filt_type) {
- *allow_interp_mask |= (1 << filt_type);
-}
-
-static INLINE uint8_t get_interp_filter_allowed_mask(
- uint16_t allow_interp_mask, DUAL_FILTER_TYPE filt_type) {
- return (allow_interp_mask >> filt_type) & 1;
-}
-#endif // !CONFIG_REMOVE_DUAL_FILTER
-
#ifdef __cplusplus
} // extern "C"
#endif
diff --git a/av1/common/pred_common.c b/av1/common/pred_common.c
index b6c858d..f00ba44 100644
--- a/av1/common/pred_common.c
+++ b/av1/common/pred_common.c
@@ -26,12 +26,8 @@
ref_mbmi->ref_frame[1] != ref_frame) {
return SWITCHABLE_FILTERS;
}
-#if CONFIG_REMOVE_DUAL_FILTER
(void)dir;
return ref_mbmi->interp_fltr;
-#else
- return av1_extract_interp_filter(ref_mbmi->interp_filters, dir & 0x01);
-#endif // CONFIG_REMOVE_DUAL_FILTER
}
int av1_get_pred_context_switchable_interp(const MACROBLOCKD *xd, int dir) {
diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c
index 5edfa82..a88f1ca 100644
--- a/av1/common/reconinter.c
+++ b/av1/common/reconinter.c
@@ -63,12 +63,7 @@
int use_hbd_buf, int is_intrabc,
const struct scale_factors *sf,
const struct buf_2d *ref_buf,
-#if CONFIG_REMOVE_DUAL_FILTER
- InterpFilter interp_filter
-#else
- int_interpfilters interp_filters
-#endif // CONFIG_REMOVE_DUAL_FILTER
-) {
+ InterpFilter interp_filter) {
inter_pred_params->block_width = block_width;
inter_pred_params->block_height = block_height;
#if CONFIG_OPTFLOW_REFINEMENT
@@ -92,21 +87,11 @@
inter_pred_params->interp_filter_params[1] = &av1_intrabc_filter_params;
} else {
inter_pred_params->interp_filter_params[0] =
- av1_get_interp_filter_params_with_block_size(
-#if CONFIG_REMOVE_DUAL_FILTER
- interp_filter,
-#else
- interp_filters.as_filters.x_filter,
-#endif // CONFIG_REMOVE_DUAL_FILTER
- block_width);
+ av1_get_interp_filter_params_with_block_size(interp_filter,
+ block_width);
inter_pred_params->interp_filter_params[1] =
- av1_get_interp_filter_params_with_block_size(
-#if CONFIG_REMOVE_DUAL_FILTER
- interp_filter,
-#else
- interp_filters.as_filters.y_filter,
-#endif // CONFIG_REMOVE_DUAL_FILTER
- block_height);
+ av1_get_interp_filter_params_with_block_size(interp_filter,
+ block_height);
}
}
@@ -683,11 +668,7 @@
#else
is_cur_buf_hbd(xd), mi->use_intrabc, sf, pre_buf,
#endif // CONFIG_SDP
-#if CONFIG_REMOVE_DUAL_FILTER
mi->interp_fltr);
-#else
- mi->interp_filters);
-#endif // CONFIG_REMOVE_DUAL_FILTER
inter_pred_params->conv_params = get_conv_params_no_round(
0, plane, xd->tmp_conv_dst, MAX_SB_SIZE, is_compound, xd->bd);
@@ -1788,13 +1769,7 @@
#else
xd->bd, is_cur_buf_hbd(xd), mi->use_intrabc, sf,
#endif
- &pre_buf,
-#if CONFIG_REMOVE_DUAL_FILTER
- this_mbmi->interp_fltr
-#else
- this_mbmi->interp_filters
-#endif // CONFIG_REMOVE_DUAL_FILTER
- );
+ &pre_buf, this_mbmi->interp_fltr);
inter_pred_params.conv_params =
get_conv_params_no_round(ref, plane, NULL, 0, is_compound, xd->bd);
@@ -1860,16 +1835,8 @@
assert(IMPLIES(
use_optflow_refinement && mi->interinter_comp.type != COMPOUND_AVERAGE,
cm->features.opfl_refine_type == REFINE_ALL));
-#if CONFIG_REMOVE_DUAL_FILTER
assert(IMPLIES(use_optflow_refinement && mi->interp_fltr != MULTITAP_SHARP,
cm->features.opfl_refine_type == REFINE_ALL));
-#else
- assert(
- IMPLIES(use_optflow_refinement &&
- (mi->interp_filters.as_filters.x_filter != MULTITAP_SHARP ||
- mi->interp_filters.as_filters.y_filter != MULTITAP_SHARP),
- cm->features.opfl_refine_type == REFINE_ALL));
-#endif
// Arrays to hold optical flow offsets.
int vx0[N_OF_OFFSETS] = { 0 };
@@ -1940,12 +1907,7 @@
#else
is_cur_buf_hbd(xd), mi->use_intrabc, sf, pre_buf,
#endif
-#if CONFIG_REMOVE_DUAL_FILTER
- mi->interp_fltr
-#else
- mi->interp_filters
-#endif // CONFIG_REMOVE_DUAL_FILTER
- );
+ mi->interp_fltr);
if (is_compound) av1_init_comp_mode(&inter_pred_params);
inter_pred_params.conv_params = get_conv_params_no_round(
ref, plane, xd->tmp_conv_dst, MAX_SB_SIZE, is_compound, xd->bd);
@@ -1972,21 +1934,9 @@
if (use_optflow_refinement && plane == 0) {
int n = opfl_get_subblock_size(bw, bh, plane);
inter_pred_params.interp_filter_params[0] =
- av1_get_interp_filter_params_with_block_size(
-#if CONFIG_REMOVE_DUAL_FILTER
- mi->interp_fltr,
-#else
- mi->interp_filters.as_filters.x_filter,
-#endif // CONFIG_REMOVE_DUAL_FILTER
- n);
+ av1_get_interp_filter_params_with_block_size(mi->interp_fltr, n);
inter_pred_params.interp_filter_params[1] =
- av1_get_interp_filter_params_with_block_size(
-#if CONFIG_REMOVE_DUAL_FILTER
- mi->interp_fltr,
-#else
- mi->interp_filters.as_filters.y_filter,
-#endif // CONFIG_REMOVE_DUAL_FILTER
- n);
+ av1_get_interp_filter_params_with_block_size(mi->interp_fltr, n);
av1_opfl_rebuild_inter_predictor(dst, dst_buf->stride, plane, mv_refined,
&inter_pred_params, xd, mi_x, mi_y, ref,
mc_buf, calc_subpel_params_func);
diff --git a/av1/common/reconinter.h b/av1/common/reconinter.h
index 5bac718..54d68ac 100644
--- a/av1/common/reconinter.h
+++ b/av1/common/reconinter.h
@@ -201,12 +201,7 @@
int use_hbd_buf, int is_intrabc,
const struct scale_factors *sf,
const struct buf_2d *ref_buf,
-#if CONFIG_REMOVE_DUAL_FILTER
- InterpFilter interp_filter
-#else
- int_interpfilters interp_filters
-#endif // CONFIG_REMOVE_DUAL_FILTER
-);
+ InterpFilter interp_filter);
void av1_init_comp_mode(InterPredParams *inter_pred_params);
@@ -536,24 +531,11 @@
#endif // CONFIG_OPTFLOW_REFINEMENT
InterpFilter frame_interp_filter) {
#if CONFIG_OPTFLOW_REFINEMENT
-#if CONFIG_REMOVE_DUAL_FILTER
mbmi->interp_fltr = (mbmi->mode > NEW_NEWMV || use_opfl_refine_all(cm, mbmi))
? MULTITAP_SHARP
: av1_unswitchable_filter(frame_interp_filter);
#else
- mbmi->interp_filters =
- (mbmi->mode > NEW_NEWMV || use_opfl_refine_all(cm, mbmi))
- ? av1_broadcast_interp_filter(av1_unswitchable_filter(MULTITAP_SHARP))
- : av1_broadcast_interp_filter(
- av1_unswitchable_filter(frame_interp_filter));
-#endif // CONFIG_REMOVE_DUAL_FILTER
-#else
-#if CONFIG_REMOVE_DUAL_FILTER
mbmi->interp_fltr = av1_unswitchable_filter(frame_interp_filter);
-#else
- mbmi->interp_filters =
- av1_broadcast_interp_filter(av1_unswitchable_filter(frame_interp_filter));
-#endif // CONFIG_REMOVE_DUAL_FILTER
#endif // CONFIG_OPTFLOW_REFINEMENT
}
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 121bd49..208acd8 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -4817,9 +4817,6 @@
seq_params->enable_interintra_compound = 0;
seq_params->enable_masked_compound = 0;
seq_params->enable_warped_motion = 0;
-#if !CONFIG_REMOVE_DUAL_FILTER
- seq_params->enable_dual_filter = 0;
-#endif // !CONFIG_REMOVE_DUAL_FILTER
seq_params->order_hint_info.enable_order_hint = 0;
seq_params->order_hint_info.enable_ref_frame_mvs = 0;
seq_params->force_screen_content_tools = 2; // SELECT_SCREEN_CONTENT_TOOLS
@@ -4832,10 +4829,6 @@
seq_params->enable_interintra_compound = aom_rb_read_bit(rb);
seq_params->enable_masked_compound = aom_rb_read_bit(rb);
seq_params->enable_warped_motion = aom_rb_read_bit(rb);
-#if !CONFIG_REMOVE_DUAL_FILTER
- seq_params->enable_dual_filter = aom_rb_read_bit(rb);
-#endif // !CONFIG_REMOVE_DUAL_FILTER
-
seq_params->order_hint_info.enable_order_hint = aom_rb_read_bit(rb);
seq_params->order_hint_info.enable_ref_frame_mvs =
seq_params->order_hint_info.enable_order_hint ? aom_rb_read_bit(rb) : 0;
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index b03d23a..8aed1e1 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -937,11 +937,7 @@
#endif
mbmi->mode = DC_PRED;
mbmi->uv_mode = UV_DC_PRED;
-#if CONFIG_REMOVE_DUAL_FILTER
mbmi->interp_fltr = BILINEAR;
-#else
- mbmi->interp_filters = av1_broadcast_interp_filter(BILINEAR);
-#endif // CONFIG_REMOVE_DUAL_FILTER
mbmi->motion_mode = SIMPLE_TRANSLATION;
int16_t inter_mode_ctx[MODE_CTX_REF_FRAMES];
@@ -1447,9 +1443,6 @@
static INLINE void read_mb_interp_filter(const MACROBLOCKD *const xd,
InterpFilter interp_filter,
const AV1_COMMON *cm,
-#if !CONFIG_REMOVE_DUAL_FILTER
- bool enable_dual_filter,
-#endif // !CONFIG_REMOVE_DUAL_FILTER
MB_MODE_INFO *const mbmi,
aom_reader *r) {
FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
@@ -1464,33 +1457,12 @@
}
if (interp_filter != SWITCHABLE) {
-#if CONFIG_REMOVE_DUAL_FILTER
mbmi->interp_fltr = interp_filter;
-#else
- mbmi->interp_filters = av1_broadcast_interp_filter(interp_filter);
-#endif // CONFIG_REMOVE_DUAL_FILTER
} else {
-#if CONFIG_REMOVE_DUAL_FILTER
const int ctx = av1_get_pred_context_switchable_interp(xd, 0);
const InterpFilter filter = (InterpFilter)aom_read_symbol(
r, ec_ctx->switchable_interp_cdf[ctx], SWITCHABLE_FILTERS, ACCT_STR);
mbmi->interp_fltr = filter;
-#else
- InterpFilter ref0_filter[2] = { EIGHTTAP_REGULAR, EIGHTTAP_REGULAR };
- for (int dir = 0; dir < 2; ++dir) {
- const int ctx = av1_get_pred_context_switchable_interp(xd, dir);
- ref0_filter[dir] = (InterpFilter)aom_read_symbol(
- r, ec_ctx->switchable_interp_cdf[ctx], SWITCHABLE_FILTERS, ACCT_STR);
- if (!enable_dual_filter) {
- ref0_filter[1] = ref0_filter[0];
- break;
- }
- }
- // The index system works as: (0, 1) -> (vertical, horizontal) filter
- // types
- mbmi->interp_filters.as_filters.x_filter = ref0_filter[1];
- mbmi->interp_filters.as_filters.y_filter = ref0_filter[0];
-#endif // CONFIG_REMOVE_DUAL_FILTER
}
}
@@ -2039,11 +2011,7 @@
}
}
- read_mb_interp_filter(xd, features->interp_filter, cm,
-#if !CONFIG_REMOVE_DUAL_FILTER
- cm->seq_params.enable_dual_filter,
-#endif // !CONFIG_REMOVE_DUAL_FILTER
- mbmi, r);
+ read_mb_interp_filter(xd, features->interp_filter, cm, mbmi, r);
const int mi_row = xd->mi_row;
const int mi_col = xd->mi_col;
diff --git a/av1/decoder/inspection.c b/av1/decoder/inspection.c
index 5bdb723..c88ac99 100644
--- a/av1/decoder/inspection.c
+++ b/av1/decoder/inspection.c
@@ -115,13 +115,8 @@
#else
mi->skip = mbmi->skip_txfm;
#endif
-#if CONFIG_REMOVE_DUAL_FILTER
mi->filter[0] = mbmi->interp_fltr;
mi->filter[1] = mbmi->interp_fltr;
-#else
- mi->filter[0] = av1_extract_interp_filter(mbmi->interp_filters, 0);
- mi->filter[1] = av1_extract_interp_filter(mbmi->interp_filters, 1);
-#endif // CONFIG_REMOVE_DUAL_FILTER
mi->dual_filter_type = mi->filter[0] * 3 + mi->filter[1];
// Transform
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index f95acac..17fc38e 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -876,14 +876,7 @@
#else
int mb_interp_filter = cm->features.interp_filter;
#endif // CONFIG_OPTFLOW_REFINEMENT
-#if CONFIG_REMOVE_DUAL_FILTER
assert(mbmi->interp_fltr == av1_unswitchable_filter(mb_interp_filter));
-#else
- int_interpfilters filters =
- av1_broadcast_interp_filter(av1_unswitchable_filter(mb_interp_filter));
- assert(mbmi->interp_filters.as_int == filters.as_int);
- (void)filters;
-#endif // CONFIG_REMOVE_DUAL_FILTER
(void)mb_interp_filter;
#endif // CONFIG_DEBUG
return;
@@ -891,36 +884,16 @@
if (cm->features.interp_filter == SWITCHABLE) {
#if CONFIG_OPTFLOW_REFINEMENT
if (mbmi->mode > NEW_NEWMV || use_opfl_refine_all(cm, mbmi)) {
-#if CONFIG_REMOVE_DUAL_FILTER
assert(IMPLIES(mbmi->mode > NEW_NEWMV || use_opfl_refine_all(cm, mbmi),
mbmi->interp_fltr == MULTITAP_SHARP));
-#else
- assert(IMPLIES(
- mbmi->mode > NEW_NEWMV || use_opfl_refine_all(cm, mbmi),
- mbmi->interp_filters.as_filters.x_filter == MULTITAP_SHARP &&
- mbmi->interp_filters.as_filters.y_filter == MULTITAP_SHARP));
-#endif
return;
}
#endif // CONFIG_OPTFLOW_REFINEMENT
-#if CONFIG_REMOVE_DUAL_FILTER
const int ctx = av1_get_pred_context_switchable_interp(xd, 0);
const InterpFilter filter = mbmi->interp_fltr;
aom_write_symbol(w, filter, ec_ctx->switchable_interp_cdf[ctx],
SWITCHABLE_FILTERS);
++cm->cur_frame->interp_filter_selected[filter];
-#else
- int dir;
- for (dir = 0; dir < 2; ++dir) {
- const int ctx = av1_get_pred_context_switchable_interp(xd, dir);
- InterpFilter filter =
- av1_extract_interp_filter(mbmi->interp_filters, dir);
- aom_write_symbol(w, filter, ec_ctx->switchable_interp_cdf[ctx],
- SWITCHABLE_FILTERS);
- ++cm->cur_frame->interp_filter_selected[filter];
- if (cm->seq_params.enable_dual_filter == 0) return;
- }
-#endif // CONFIG_REMOVE_DUAL_FILTER
}
}
@@ -3412,10 +3385,6 @@
aom_wb_write_bit(wb, seq_params->enable_interintra_compound);
aom_wb_write_bit(wb, seq_params->enable_masked_compound);
aom_wb_write_bit(wb, seq_params->enable_warped_motion);
-#if !CONFIG_REMOVE_DUAL_FILTER
- aom_wb_write_bit(wb, seq_params->enable_dual_filter);
-#endif // !CONFIG_REMOVE_DUAL_FILTER
-
aom_wb_write_bit(wb, seq_params->order_hint_info.enable_order_hint);
if (seq_params->order_hint_info.enable_order_hint) {
diff --git a/av1/encoder/block.h b/av1/encoder/block.h
index be5b8ba..1564ad9 100644
--- a/av1/encoder/block.h
+++ b/av1/encoder/block.h
@@ -356,11 +356,7 @@
//! Current prediction mode.
PREDICTION_MODE mode;
//! Current interpolation filter.
-#if CONFIG_REMOVE_DUAL_FILTER
InterpFilter interp_fltr;
-#else
- int_interpfilters filter;
-#endif // CONFIG_REMOVE_DUAL_FILTER
//! Refmv index in the drl.
int ref_mv_idx;
//! Whether the predictors are GLOBALMV.
diff --git a/av1/encoder/compound_type.c b/av1/encoder/compound_type.c
index f78fd6a..ed0f791 100644
--- a/av1/encoder/compound_type.c
+++ b/av1/encoder/compound_type.c
@@ -36,11 +36,7 @@
// TODO(ranjit): Ensure that compound type search use regular filter always
// and check if following check can be removed
// Check if interp filter matches with previous case
-#if CONFIG_REMOVE_DUAL_FILTER
if (st->interp_fltr != mi->interp_fltr) return 0;
-#else
- if (st->filter.as_int != mi->interp_filters.as_int) return 0;
-#endif // CONFIG_REMOVE_DUAL_FILTER
const MACROBLOCKD *const xd = &x->e_mbd;
// Match MV and reference indices
@@ -985,11 +981,7 @@
memcpy(rd_stats->mv, cur_mv, sizeof(rd_stats->mv));
memcpy(rd_stats->ref_frames, mbmi->ref_frame, sizeof(rd_stats->ref_frames));
rd_stats->mode = mbmi->mode;
-#if CONFIG_REMOVE_DUAL_FILTER
rd_stats->interp_fltr = mbmi->interp_fltr;
-#else
- rd_stats->filter = mbmi->interp_filters;
-#endif // CONFIG_REMOVE_DUAL_FILTER
rd_stats->ref_mv_idx = mbmi->ref_mv_idx;
const MACROBLOCKD *const xd = &x->e_mbd;
for (int i = 0; i < 2; ++i) {
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 437901a..2731d46 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -1432,36 +1432,6 @@
(frame_probs->warped_probs[update_type] + new_prob) >> 1;
}
-#if !CONFIG_REMOVE_DUAL_FILTER
- if (cm->current_frame.frame_type != KEY_FRAME &&
- cpi->sf.interp_sf.adaptive_interp_filter_search == 2 &&
- features->interp_filter == SWITCHABLE) {
- const FRAME_UPDATE_TYPE update_type = get_frame_update_type(&cpi->gf_group);
-
- for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; i++) {
- int sum = 0;
- int j;
- int left = 1536;
-
- for (j = 0; j < SWITCHABLE_FILTERS; j++) {
- sum += cpi->td.counts->switchable_interp[i][j];
- }
-
- for (j = SWITCHABLE_FILTERS - 1; j >= 0; j--) {
- const int new_prob =
- sum ? 1536 * cpi->td.counts->switchable_interp[i][j] / sum
- : (j ? 0 : 1536);
- int prob = (frame_probs->switchable_interp_probs[update_type][i][j] +
- new_prob) >>
- 1;
- left -= prob;
- if (j == 0) prob += left;
- frame_probs->switchable_interp_probs[update_type][i][j] = prob;
- }
- }
- }
-#endif // !CONFIG_REMOVE_DUAL_FILTER
-
if ((!is_stat_generation_stage(cpi) && av1_use_hash_me(cpi)) ||
hash_table_created) {
av1_hash_table_destroy(&intrabc_hash_info->intrabc_hash_table);
diff --git a/av1/encoder/encodeframe_utils.c b/av1/encoder/encodeframe_utils.c
index 30ee5e9..509b2c5 100644
--- a/av1/encoder/encodeframe_utils.c
+++ b/av1/encoder/encodeframe_utils.c
@@ -145,16 +145,8 @@
static AOM_INLINE void update_filter_type_count(FRAME_COUNTS *counts,
const MACROBLOCKD *xd,
const MB_MODE_INFO *mbmi) {
-#if CONFIG_REMOVE_DUAL_FILTER
const int ctx = av1_get_pred_context_switchable_interp(xd, 0);
++counts->switchable_interp[ctx][mbmi->interp_fltr];
-#else
- for (int dir = 0; dir < 2; ++dir) {
- const int ctx = av1_get_pred_context_switchable_interp(xd, dir);
- InterpFilter filter = av1_extract_interp_filter(mbmi->interp_filters, dir);
- ++counts->switchable_interp[ctx][filter];
- }
-#endif // CONFIG_REMOVE_DUAL_FILTER
}
static void reset_tx_size(MACROBLOCK *x, MB_MODE_INFO *mbmi,
diff --git a/av1/encoder/encodeframe_utils.h b/av1/encoder/encodeframe_utils.h
index 53672d0..aa1bff8 100644
--- a/av1/encoder/encodeframe_utils.h
+++ b/av1/encoder/encodeframe_utils.h
@@ -169,23 +169,10 @@
}
static AOM_INLINE void update_filter_type_cdf(const MACROBLOCKD *xd,
-#if !CONFIG_REMOVE_DUAL_FILTER
- int dual_filter,
-#endif // CONFIG_REMOVE_DUAL_FILTER
const MB_MODE_INFO *mbmi) {
-#if CONFIG_REMOVE_DUAL_FILTER
const int ctx = av1_get_pred_context_switchable_interp(xd, 0);
update_cdf(xd->tile_ctx->switchable_interp_cdf[ctx], mbmi->interp_fltr,
SWITCHABLE_FILTERS);
-#else
- for (int dir = 0; dir < 2; ++dir) {
- if (dir && !dual_filter) break;
- const int ctx = av1_get_pred_context_switchable_interp(xd, dir);
- InterpFilter filter = av1_extract_interp_filter(mbmi->interp_filters, dir);
- update_cdf(xd->tile_ctx->switchable_interp_cdf[ctx], filter,
- SWITCHABLE_FILTERS);
- }
-#endif // CONFIG_REMOVE_DUAL_FILTER
}
static AOM_INLINE int set_segment_rdmult(const AV1_COMP *const cpi,
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 69e6db0..2f4cc00 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -441,9 +441,6 @@
seq->frame_id_length = FRAME_ID_LENGTH;
seq->delta_frame_id_length = DELTA_FRAME_ID_LENGTH;
-#if !CONFIG_REMOVE_DUAL_FILTER
- seq->enable_dual_filter = tool_cfg->enable_dual_filter;
-#endif // !CONFIG_REMOVE_DUAL_FILTER
seq->order_hint_info.enable_ref_frame_mvs = tool_cfg->ref_frame_mvs_present;
seq->order_hint_info.enable_ref_frame_mvs &=
seq->order_hint_info.enable_order_hint;
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index ec476e9..bb811d1 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -817,10 +817,6 @@
// When enabled, the encoder will use a full header even for still pictures.
// When disabled, a reduced header is used for still pictures.
bool full_still_picture_hdr;
-#if !CONFIG_REMOVE_DUAL_FILTER
- // Indicates if dual interpolation filters should be enabled.
- bool enable_dual_filter;
-#endif // !CONFIG_REMOVE_DUAL_FILTER
// Indicates if frame order hint should be enabled or not.
bool enable_order_hint;
// Indicates if ref_frame_mvs should be enabled at the sequence level.
@@ -1132,17 +1128,6 @@
* type is pruned.
*/
int tx_type_probs[FRAME_UPDATE_TYPES][TX_SIZES_ALL][TX_TYPES];
-
-#if !CONFIG_REMOVE_DUAL_FILTER
- /*!
- * switchable_interp_probs[i][j][k] is the probability of kth interpolation
- * filter being the best for jth filter context and ith frame update type,
- * averaged over past frames. If switchable_interp_probs[i][j][k] < thresh,
- * then interpolation filter search is pruned for that case.
- */
- int switchable_interp_probs[FRAME_UPDATE_TYPES][SWITCHABLE_FILTER_CONTEXTS]
- [SWITCHABLE_FILTERS];
-#endif // !CONFIG_REMOVE_DUAL_FILTER
} FrameProbInfo;
/*!\cond */
diff --git a/av1/encoder/encoder_utils.c b/av1/encoder/encoder_utils.c
index 5552329..37d470b 100644
--- a/av1/encoder/encoder_utils.c
+++ b/av1/encoder/encoder_utils.c
@@ -643,54 +643,6 @@
cpi->vaq_refresh = 0;
}
-#if !CONFIG_REMOVE_DUAL_FILTER
-static int get_interp_filter_selected(const AV1_COMMON *const cm,
- MV_REFERENCE_FRAME ref,
- InterpFilter ifilter) {
- const RefCntBuffer *const buf = get_ref_frame_buf(cm, ref);
- if (buf == NULL) return 0;
- return buf->interp_filter_selected[ifilter];
-}
-
-uint16_t av1_setup_interp_filter_search_mask(AV1_COMP *cpi) {
- const AV1_COMMON *const cm = &cpi->common;
- int ref_total[REF_FRAMES] = { 0 };
- uint16_t mask = ALLOW_ALL_INTERP_FILT_MASK;
-
- if (cpi->last_frame_type == KEY_FRAME || cpi->refresh_frame.alt_ref_frame)
- return mask;
-
- for (MV_REFERENCE_FRAME ref = LAST_FRAME; ref <= ALTREF_FRAME; ++ref) {
- for (InterpFilter ifilter = EIGHTTAP_REGULAR; ifilter <= MULTITAP_SHARP;
- ++ifilter) {
- ref_total[ref] += get_interp_filter_selected(cm, ref, ifilter);
- }
- }
- int ref_total_total = (ref_total[LAST2_FRAME] + ref_total[LAST3_FRAME] +
- ref_total[GOLDEN_FRAME] + ref_total[BWDREF_FRAME] +
- ref_total[ALTREF2_FRAME] + ref_total[ALTREF_FRAME]);
-
- for (InterpFilter ifilter = EIGHTTAP_REGULAR; ifilter <= MULTITAP_SHARP;
- ++ifilter) {
- int last_score = get_interp_filter_selected(cm, LAST_FRAME, ifilter) * 30;
- if (ref_total[LAST_FRAME] && last_score <= ref_total[LAST_FRAME]) {
- int filter_score =
- get_interp_filter_selected(cm, LAST2_FRAME, ifilter) * 20 +
- get_interp_filter_selected(cm, LAST3_FRAME, ifilter) * 20 +
- get_interp_filter_selected(cm, GOLDEN_FRAME, ifilter) * 20 +
- get_interp_filter_selected(cm, BWDREF_FRAME, ifilter) * 10 +
- get_interp_filter_selected(cm, ALTREF2_FRAME, ifilter) * 10 +
- get_interp_filter_selected(cm, ALTREF_FRAME, ifilter) * 10;
- if (filter_score < ref_total_total) {
- DUAL_FILTER_TYPE filt_type = ifilter + SWITCHABLE_FILTERS * ifilter;
- reset_interp_filter_allowed_mask(&mask, filt_type);
- }
- }
- }
- return mask;
-}
-#endif // !CONFIG_REMOVE_DUAL_FILTER
-
#define STRICT_PSNR_DIFF_THRESH 0.9
// Encode key frame with/without screen content tools to determine whether
// screen content tools should be enabled for this key frame group or not.
diff --git a/av1/encoder/encoder_utils.h b/av1/encoder/encoder_utils.h
index d8bbf99..a34bf61 100644
--- a/av1/encoder/encoder_utils.h
+++ b/av1/encoder/encoder_utils.h
@@ -813,12 +813,6 @@
if (cpi->sf.inter_sf.prune_warped_prob_thresh > 0) {
av1_copy(frame_probs->warped_probs, default_warped_probs);
}
-#if !CONFIG_REMOVE_DUAL_FILTER
- if (cpi->sf.interp_sf.adaptive_interp_filter_search == 2) {
- av1_copy(frame_probs->switchable_interp_probs,
- default_switchable_interp_probs);
- }
-#endif // !CONFIG_REMOVE_DUAL_FILTER
}
// Coding context that only needs to be restored when recode loop includes
diff --git a/av1/encoder/interp_search.c b/av1/encoder/interp_search.c
index 999b511..11494b6 100644
--- a/av1/encoder/interp_search.c
+++ b/av1/encoder/interp_search.c
@@ -44,18 +44,13 @@
INTERPOLATION_FILTER_STATS *interp_filter_stats,
int interp_filter_stats_idx) {
if (interp_filter_stats_idx < MAX_INTERP_FILTER_STATS) {
- INTERPOLATION_FILTER_STATS stat = {
-#if CONFIG_REMOVE_DUAL_FILTER
- mbmi->interp_fltr,
-#else
- mbmi->interp_filters,
-#endif // CONFIG_REMOVE_DUAL_FILTER
- { mbmi->mv[0], mbmi->mv[1] },
- { mbmi->ref_frame[0], mbmi->ref_frame[1] },
- mbmi->interinter_comp.type,
- rd,
- pred_sse
- };
+ INTERPOLATION_FILTER_STATS stat = { mbmi->interp_fltr,
+ { mbmi->mv[0], mbmi->mv[1] },
+ { mbmi->ref_frame[0],
+ mbmi->ref_frame[1] },
+ mbmi->interinter_comp.type,
+ rd,
+ pred_sse };
interp_filter_stats[interp_filter_stats_idx] = stat;
interp_filter_stats_idx++;
}
@@ -88,11 +83,7 @@
}
if (match != -1) {
-#if CONFIG_REMOVE_DUAL_FILTER
mbmi->interp_fltr = interp_filter_stats[match].interp_fltr;
-#else
- mbmi->interp_filters = interp_filter_stats[match].filters;
-#endif // CONFIG_REMOVE_DUAL_FILTER
return match;
}
return -1; // no match result found
@@ -126,7 +117,6 @@
restore_dst_buf(xd, *dst_bufs[0], num_planes);
}
-#if CONFIG_REMOVE_DUAL_FILTER
static INLINE int get_switchable_rate(MACROBLOCK *const x,
const InterpFilter interp_fltr,
const int ctx[2]) {
@@ -137,23 +127,6 @@
x->mode_costs.switchable_interp_costs[ctx[0]][interp_fltr];
return SWITCHABLE_INTERP_RATE_FACTOR * inter_filter_cost;
}
-#else
-static INLINE int get_switchable_rate(MACROBLOCK *const x,
- const int_interpfilters filters,
- int dual_filter, const int ctx[2]) {
-#if CONFIG_OPTFLOW_REFINEMENT
- if (x->e_mbd.mi[0]->mode > NEW_NEWMV) return 0;
-#endif // CONFIG_OPTFLOW_REFINEMENT
- const InterpFilter filter0 = filters.as_filters.y_filter;
- int inter_filter_cost =
- x->mode_costs.switchable_interp_costs[ctx[0]][filter0];
- if (dual_filter) {
- const InterpFilter filter1 = filters.as_filters.x_filter;
- inter_filter_cost += x->mode_costs.switchable_interp_costs[ctx[1]][filter1];
- }
- return SWITCHABLE_INTERP_RATE_FACTOR * inter_filter_cost;
-}
-#endif // CONFIG_REMOVE_DUAL_FILTER
// Build inter predictor and calculate model rd
// for a given plane.
@@ -200,29 +173,13 @@
// Initialize rd_stats structures to default values.
av1_init_rd_stats(&this_rd_stats_luma);
this_rd_stats = *rd_stats_luma;
-#if CONFIG_REMOVE_DUAL_FILTER
const InterpFilter last_best = mbmi->interp_fltr;
mbmi->interp_fltr = filter_idx;
-#else
- const int_interpfilters last_best = mbmi->interp_filters;
- mbmi->interp_filters = filter_sets[filter_idx];
-#endif // CONFIG_REMOVE_DUAL_FILTER
- const int tmp_rs = get_switchable_rate(x,
-#if CONFIG_REMOVE_DUAL_FILTER
- mbmi->interp_fltr,
-#else
- mbmi->interp_filters,
- cm->seq_params.enable_dual_filter,
-#endif // CONFIG_REMOVE_DUAL_FILTER
- switchable_ctx);
+ const int tmp_rs = get_switchable_rate(x, mbmi->interp_fltr, switchable_ctx);
int64_t min_rd = RDCOST(x->rdmult, tmp_rs, 0);
if (min_rd > *rd) {
-#if CONFIG_REMOVE_DUAL_FILTER
mbmi->interp_fltr = last_best;
-#else
- mbmi->interp_filters = last_best;
-#endif // CONFIG_REMOVE_DUAL_FILTER
return 0;
}
@@ -270,11 +227,7 @@
int64_t tmp_rd =
RDCOST(x->rdmult, tmp_rs + this_rd_stats.rate, this_rd_stats.dist);
if (tmp_rd >= *rd) {
-#if CONFIG_REMOVE_DUAL_FILTER
mbmi->interp_fltr = last_best;
-#else
- mbmi->interp_filters = last_best;
-#endif // CONFIG_REMOVE_DUAL_FILTER
return 0;
}
interp_model_rd_eval(x, cpi, bsize, orig_dst, plane, plane,
@@ -314,182 +267,10 @@
}
return 1;
}
-#if CONFIG_REMOVE_DUAL_FILTER
mbmi->interp_fltr = last_best;
-#else
- mbmi->interp_filters = last_best;
-#endif // CONFIG_REMOVE_DUAL_FILTER
return 0;
}
-#if !CONFIG_REMOVE_DUAL_FILTER
-static INLINE INTERP_PRED_TYPE is_pred_filter_search_allowed(
- const AV1_COMP *const cpi, MACROBLOCKD *xd, BLOCK_SIZE bsize,
- int_interpfilters *af, int_interpfilters *lf) {
- const AV1_COMMON *cm = &cpi->common;
- const MB_MODE_INFO *const above_mbmi = xd->above_mbmi;
- const MB_MODE_INFO *const left_mbmi = xd->left_mbmi;
- const int bsl = mi_size_wide_log2[bsize];
- int is_horiz_eq = 0, is_vert_eq = 0;
-#if CONFIG_SDP
- if (above_mbmi && is_inter_block(above_mbmi, xd->tree_type))
-#else
- if (above_mbmi && is_inter_block(above_mbmi))
-#endif
- *af = above_mbmi->interp_filters;
-#if CONFIG_SDP
- if (left_mbmi && is_inter_block(left_mbmi, xd->tree_type))
- *lf = left_mbmi->interp_filters;
-#else
- if (left_mbmi && is_inter_block(left_mbmi)) *lf = left_mbmi->interp_filters;
-#endif
-
- if (af->as_filters.x_filter != INTERP_INVALID)
- is_horiz_eq = af->as_filters.x_filter == lf->as_filters.x_filter;
- if (af->as_filters.y_filter != INTERP_INVALID)
- is_vert_eq = af->as_filters.y_filter == lf->as_filters.y_filter;
-
- INTERP_PRED_TYPE pred_filter_type = (is_vert_eq << 1) + is_horiz_eq;
- const int mi_row = xd->mi_row;
- const int mi_col = xd->mi_col;
- int pred_filter_enable =
- cpi->sf.interp_sf.cb_pred_filter_search
- ? (((mi_row + mi_col) >> bsl) +
- get_chessboard_index(cm->current_frame.frame_number)) &
- 0x1
- : 0;
- pred_filter_enable &= is_horiz_eq || is_vert_eq;
- // pred_filter_search = 0: pred_filter is disabled
- // pred_filter_search = 1: pred_filter is enabled and only horz pred matching
- // pred_filter_search = 2: pred_filter is enabled and only vert pred matching
- // pred_filter_search = 3: pred_filter is enabled and
- // both vert, horz pred matching
- return pred_filter_enable * pred_filter_type;
-}
-
-static DUAL_FILTER_TYPE find_best_interp_rd_facade(
- MACROBLOCK *const x, const AV1_COMP *const cpi,
- const TileDataEnc *tile_data, BLOCK_SIZE bsize,
- const BUFFER_SET *const orig_dst, int64_t *const rd, RD_STATS *rd_stats_y,
- RD_STATS *rd_stats, int *const switchable_rate,
- const BUFFER_SET *dst_bufs[2], const int switchable_ctx[2],
- const int skip_pred, uint16_t allow_interp_mask, int is_w4_or_h4) {
- int tmp_skip_pred = skip_pred;
- DUAL_FILTER_TYPE best_filt_type = REG_REG;
-
- // If no filter are set to be evaluated, return from function
- if (allow_interp_mask == 0x0) return best_filt_type;
- // For block width or height is 4, skip the pred evaluation of SHARP_SHARP
- tmp_skip_pred = is_w4_or_h4
- ? cpi->interp_search_flags.default_interp_skip_flags
- : skip_pred;
-
- // Loop over the all filter types and evaluate for only allowed filter types
- for (int filt_type = SHARP_SHARP; filt_type >= REG_REG; --filt_type) {
- const int is_filter_allowed =
- get_interp_filter_allowed_mask(allow_interp_mask, filt_type);
- if (is_filter_allowed)
- if (interpolation_filter_rd(x, cpi, tile_data, bsize, orig_dst, rd,
- rd_stats_y, rd_stats, switchable_rate,
- dst_bufs, filt_type, switchable_ctx,
- tmp_skip_pred))
- best_filt_type = filt_type;
- tmp_skip_pred = skip_pred;
- }
- return best_filt_type;
-}
-
-static INLINE void pred_dual_interp_filter_rd(
- MACROBLOCK *const x, const AV1_COMP *const cpi,
- const TileDataEnc *tile_data, BLOCK_SIZE bsize,
- const BUFFER_SET *const orig_dst, int64_t *const rd, RD_STATS *rd_stats_y,
- RD_STATS *rd_stats, int *const switchable_rate,
- const BUFFER_SET *dst_bufs[2], const int switchable_ctx[2],
- const int skip_pred, INTERP_PRED_TYPE pred_filt_type, int_interpfilters *af,
- int_interpfilters *lf) {
- (void)lf;
- assert(pred_filt_type > INTERP_HORZ_NEQ_VERT_NEQ);
- assert(pred_filt_type < INTERP_PRED_TYPE_ALL);
- uint16_t allowed_interp_mask = 0;
-
- if (pred_filt_type == INTERP_HORZ_EQ_VERT_NEQ) {
- // pred_filter_search = 1: Only horizontal filter is matching
- allowed_interp_mask =
- av1_interp_dual_filt_mask[pred_filt_type - 1][af->as_filters.x_filter];
- } else if (pred_filt_type == INTERP_HORZ_NEQ_VERT_EQ) {
- // pred_filter_search = 2: Only vertical filter is matching
- allowed_interp_mask =
- av1_interp_dual_filt_mask[pred_filt_type - 1][af->as_filters.y_filter];
- } else {
- // pred_filter_search = 3: Both horizontal and vertical filter are matching
- int filt_type =
- af->as_filters.x_filter + af->as_filters.y_filter * SWITCHABLE_FILTERS;
- set_interp_filter_allowed_mask(&allowed_interp_mask, filt_type);
- }
- // REG_REG is already been evaluated in the beginning
- reset_interp_filter_allowed_mask(&allowed_interp_mask, REG_REG);
- find_best_interp_rd_facade(x, cpi, tile_data, bsize, orig_dst, rd, rd_stats_y,
- rd_stats, switchable_rate, dst_bufs,
- switchable_ctx, skip_pred, allowed_interp_mask, 0);
-}
-
-// Evaluate dual filter type
-// a) Using above, left block interp filter
-// b) Find the best horizontal filter and
-// then evaluate corresponding vertical filters.
-static INLINE void fast_dual_interp_filter_rd(
- MACROBLOCK *const x, const AV1_COMP *const cpi,
- const TileDataEnc *tile_data, BLOCK_SIZE bsize,
- const BUFFER_SET *const orig_dst, int64_t *const rd, RD_STATS *rd_stats_y,
- RD_STATS *rd_stats, int *const switchable_rate,
- const BUFFER_SET *dst_bufs[2], const int switchable_ctx[2],
- const int skip_hor, const int skip_ver) {
- const InterpSearchFlags *interp_search_flags = &cpi->interp_search_flags;
- MACROBLOCKD *const xd = &x->e_mbd;
- MB_MODE_INFO *const mbmi = xd->mi[0];
- INTERP_PRED_TYPE pred_filter_type = INTERP_HORZ_NEQ_VERT_NEQ;
- int_interpfilters af = av1_broadcast_interp_filter(INTERP_INVALID);
- int_interpfilters lf = af;
-
- if (!have_newmv_in_inter_mode(mbmi->mode)) {
- pred_filter_type = is_pred_filter_search_allowed(cpi, xd, bsize, &af, &lf);
- }
-
- if (pred_filter_type) {
- pred_dual_interp_filter_rd(x, cpi, tile_data, bsize, orig_dst, rd,
- rd_stats_y, rd_stats, switchable_rate, dst_bufs,
- switchable_ctx, (skip_hor & skip_ver),
- pred_filter_type, &af, &lf);
- } else {
- const int bw = block_size_wide[bsize];
- const int bh = block_size_high[bsize];
- int best_dual_mode = 0;
- int skip_pred =
- bw <= 4 ? interp_search_flags->default_interp_skip_flags : skip_hor;
- // TODO(any): Make use of find_best_interp_rd_facade()
- // if speed impact is negligible
- for (int i = (SWITCHABLE_FILTERS - 1); i >= 1; --i) {
- if (interpolation_filter_rd(x, cpi, tile_data, bsize, orig_dst, rd,
- rd_stats_y, rd_stats, switchable_rate,
- dst_bufs, i, switchable_ctx, skip_pred)) {
- best_dual_mode = i;
- }
- skip_pred = skip_hor;
- }
- // From best of horizontal EIGHTTAP_REGULAR modes, check vertical modes
- skip_pred =
- bh <= 4 ? interp_search_flags->default_interp_skip_flags : skip_ver;
- for (int i = (best_dual_mode + (SWITCHABLE_FILTERS * 2));
- i >= (best_dual_mode + SWITCHABLE_FILTERS); i -= SWITCHABLE_FILTERS) {
- interpolation_filter_rd(x, cpi, tile_data, bsize, orig_dst, rd,
- rd_stats_y, rd_stats, switchable_rate, dst_bufs,
- i, switchable_ctx, skip_pred);
- skip_pred = skip_ver;
- }
- }
-}
-#endif // !CONFIG_REMOVE_DUAL_FILTER
-
// Find the best interp filter if dual_interp_filter = 0
static INLINE void find_best_non_dual_interp_filter(
MACROBLOCK *const x, const AV1_COMP *const cpi,
@@ -498,128 +279,12 @@
RD_STATS *rd_stats, int *const switchable_rate,
const BUFFER_SET *dst_bufs[2], const int switchable_ctx[2],
const int skip_ver, const int skip_hor) {
-#if CONFIG_REMOVE_DUAL_FILTER
const int skip_pred = (skip_hor & skip_ver);
for (int i = EIGHTTAP_REGULAR + 1; i < SWITCHABLE_FILTERS; ++i) {
interpolation_filter_rd(x, cpi, tile_data, bsize, orig_dst, rd, rd_stats_y,
rd_stats, switchable_rate, dst_bufs, i,
switchable_ctx, skip_pred);
}
-#else
- const InterpSearchFlags *interp_search_flags = &cpi->interp_search_flags;
- int8_t i;
- MACROBLOCKD *const xd = &x->e_mbd;
- MB_MODE_INFO *const mbmi = xd->mi[0];
- uint16_t interp_filter_search_mask =
- interp_search_flags->interp_filter_search_mask;
-
- if (cpi->sf.interp_sf.adaptive_interp_filter_search == 2) {
- const FRAME_UPDATE_TYPE update_type = get_frame_update_type(&cpi->gf_group);
- const int ctx0 = av1_get_pred_context_switchable_interp(xd, 0);
- const int ctx1 = av1_get_pred_context_switchable_interp(xd, 1);
- const int *switchable_interp_p0 =
- cpi->frame_probs.switchable_interp_probs[update_type][ctx0];
- const int *switchable_interp_p1 =
- cpi->frame_probs.switchable_interp_probs[update_type][ctx1];
-
- static const int thr[7] = { 0, 8, 8, 8, 8, 0, 8 };
- const int thresh = thr[update_type];
- for (i = 0; i < SWITCHABLE_FILTERS; i++) {
- // For non-dual case, the 2 dir's prob should be identical.
- assert(switchable_interp_p0[i] == switchable_interp_p1[i]);
- if (switchable_interp_p0[i] < thresh &&
- switchable_interp_p1[i] < thresh) {
- DUAL_FILTER_TYPE filt_type = i + SWITCHABLE_FILTERS * i;
- reset_interp_filter_allowed_mask(&interp_filter_search_mask, filt_type);
- }
- }
- }
-
- // Regular filter evaluation should have been done and hence the same should
- // be the winner
- assert(x->e_mbd.mi[0]->interp_filters.as_int == filter_sets[0].as_int);
- if ((skip_hor & skip_ver) != interp_search_flags->default_interp_skip_flags) {
- INTERP_PRED_TYPE pred_filter_type = INTERP_HORZ_NEQ_VERT_NEQ;
- int_interpfilters af = av1_broadcast_interp_filter(INTERP_INVALID);
- int_interpfilters lf = af;
-
- pred_filter_type = is_pred_filter_search_allowed(cpi, xd, bsize, &af, &lf);
- if (pred_filter_type) {
- assert(af.as_filters.x_filter != INTERP_INVALID);
- int filter_idx = SWITCHABLE * af.as_filters.x_filter;
- // This assert tells that (filter_x == filter_y) for non-dual filter case
- assert(filter_sets[filter_idx].as_filters.x_filter ==
- filter_sets[filter_idx].as_filters.y_filter);
- if (cpi->sf.interp_sf.adaptive_interp_filter_search &&
- !(get_interp_filter_allowed_mask(interp_filter_search_mask,
- filter_idx))) {
- return;
- }
- if (filter_idx) {
- interpolation_filter_rd(x, cpi, tile_data, bsize, orig_dst, rd,
- rd_stats_y, rd_stats, switchable_rate, dst_bufs,
- filter_idx, switchable_ctx,
- (skip_hor & skip_ver));
- }
- return;
- }
- }
-
- // Reuse regular filter's modeled rd data for sharp filter for following
- // cases
- // 1) When bsize is 4x4
- // 2) When block width is 4 (i.e. 4x8/4x16 blocks) and MV in vertical
- // direction is full-pel
- // 3) When block height is 4 (i.e. 8x4/16x4 blocks) and MV in horizontal
- // direction is full-pel
- // TODO(any): Optimize cases 2 and 3 further if luma MV in relavant direction
- // alone is full-pel
-
- if ((bsize == BLOCK_4X4) ||
- (block_size_wide[bsize] == 4 &&
- skip_ver == interp_search_flags->default_interp_skip_flags) ||
- (block_size_high[bsize] == 4 &&
- skip_hor == interp_search_flags->default_interp_skip_flags)) {
- int skip_pred = skip_hor & skip_ver;
- uint16_t allowed_interp_mask = 0;
-
- // REG_REG filter type is evaluated beforehand, hence skip it
- set_interp_filter_allowed_mask(&allowed_interp_mask, SHARP_SHARP);
- set_interp_filter_allowed_mask(&allowed_interp_mask, SMOOTH_SMOOTH);
- if (cpi->sf.interp_sf.adaptive_interp_filter_search)
- allowed_interp_mask &= interp_filter_search_mask;
-
- find_best_interp_rd_facade(x, cpi, tile_data, bsize, orig_dst, rd,
- rd_stats_y, rd_stats, switchable_rate, dst_bufs,
- switchable_ctx, skip_pred, allowed_interp_mask,
- 1);
- } else {
- int skip_pred = (skip_hor & skip_ver);
- for (i = (SWITCHABLE_FILTERS + 1); i < DUAL_FILTER_SET_SIZE;
- i += (SWITCHABLE_FILTERS + 1)) {
- // This assert tells that (filter_x == filter_y) for non-dual filter case
- assert(filter_sets[i].as_filters.x_filter ==
- filter_sets[i].as_filters.y_filter);
- if (cpi->sf.interp_sf.adaptive_interp_filter_search &&
- !(get_interp_filter_allowed_mask(interp_filter_search_mask, i))) {
- continue;
- }
- interpolation_filter_rd(x, cpi, tile_data, bsize, orig_dst, rd,
- rd_stats_y, rd_stats, switchable_rate, dst_bufs,
- i, switchable_ctx, skip_pred);
- // In first iteration, smooth filter is evaluated. If smooth filter
- // (which is less sharper) is the winner among regular and smooth filters,
- // sharp filter evaluation is skipped
- // TODO(any): Refine this gating based on modelled rd only (i.e., by not
- // accounting switchable filter rate)
- if (cpi->sf.interp_sf.skip_sharp_interp_filter_search &&
- skip_pred != interp_search_flags->default_interp_skip_flags) {
- if (mbmi->interp_filters.as_int == filter_sets[SMOOTH_SMOOTH].as_int)
- break;
- }
- }
- }
-#endif // CONFIG_REMOVE_DUAL_FILTER
}
static INLINE void calc_interp_skip_pred_flag(MACROBLOCK *const x,
@@ -754,14 +419,7 @@
int switchable_ctx[2];
switchable_ctx[0] = av1_get_pred_context_switchable_interp(xd, 0);
switchable_ctx[1] = av1_get_pred_context_switchable_interp(xd, 1);
- *switchable_rate = get_switchable_rate(x,
-#if CONFIG_REMOVE_DUAL_FILTER
- mbmi->interp_fltr,
-#else
- mbmi->interp_filters,
- cm->seq_params.enable_dual_filter,
-#endif // CONFIG_REMOVE_DUAL_FILTER
- switchable_ctx);
+ *switchable_rate = get_switchable_rate(x, mbmi->interp_fltr, switchable_ctx);
// Do MC evaluation for default filter_type.
// Luma MC
@@ -791,7 +449,6 @@
return 0;
}
if (!need_search) {
-#if CONFIG_REMOVE_DUAL_FILTER
#if CONFIG_OPTFLOW_REFINEMENT
assert(mbmi->interp_fltr ==
((mbmi->mode > NEW_NEWMV || use_opfl_refine_all(cm, mbmi))
@@ -800,17 +457,6 @@
#else
assert(mbmi->interp_fltr == EIGHTTAP_REGULAR);
#endif // CONFIG_OPTFLOW_REFINEMENT
-#else
- const int_interpfilters filters =
-#if CONFIG_OPTFLOW_REFINEMENT
- (mbmi->mode > NEW_NEWMV || use_opfl_refine_all(cm, mbmi))
- ? av1_broadcast_interp_filter(MULTITAP_SHARP)
- :
-#endif // CONFIG_OPTFLOW_REFINEMENT
- av1_broadcast_interp_filter(EIGHTTAP_REGULAR);
- assert(mbmi->interp_filters.as_int == filters.as_int);
- (void)filters;
-#endif // CONFIG_REMOVE_DUAL_FILTER
return 0;
}
if (args->modelled_rd != NULL) {
@@ -846,35 +492,9 @@
// do interp_filter search
restore_dst_buf(xd, *tmp_dst, num_planes);
const BUFFER_SET *dst_bufs[2] = { tmp_dst, orig_dst };
-#if CONFIG_REMOVE_DUAL_FILTER
find_best_non_dual_interp_filter(
x, cpi, tile_data, bsize, orig_dst, rd, &rd_stats_luma, &rd_stats,
switchable_rate, dst_bufs, switchable_ctx, skip_ver, skip_hor);
-#else
- // Evaluate dual interp filters
- if (cm->seq_params.enable_dual_filter) {
- if (cpi->sf.interp_sf.use_fast_interpolation_filter_search) {
- fast_dual_interp_filter_rd(x, cpi, tile_data, bsize, orig_dst, rd,
- &rd_stats_luma, &rd_stats, switchable_rate,
- dst_bufs, switchable_ctx, skip_hor, skip_ver);
- } else {
- // Use full interpolation filter search
- uint16_t allowed_interp_mask = ALLOW_ALL_INTERP_FILT_MASK;
- // REG_REG filter type is evaluated beforehand, so loop is repeated over
- // REG_SMOOTH to SHARP_SHARP for full interpolation filter search
- reset_interp_filter_allowed_mask(&allowed_interp_mask, REG_REG);
- find_best_interp_rd_facade(x, cpi, tile_data, bsize, orig_dst, rd,
- &rd_stats_luma, &rd_stats, switchable_rate,
- dst_bufs, switchable_ctx,
- (skip_hor & skip_ver), allowed_interp_mask, 0);
- }
- } else {
- // Evaluate non-dual interp filters
- find_best_non_dual_interp_filter(
- x, cpi, tile_data, bsize, orig_dst, rd, &rd_stats_luma, &rd_stats,
- switchable_rate, dst_bufs, switchable_ctx, skip_ver, skip_hor);
- }
-#endif // CONFIG_REMOVE_DUAL_FILTER
swap_dst_buf(xd, dst_bufs, num_planes);
// Recompute final MC data if required
if (x->recalc_luma_mc_data == 1) {
diff --git a/av1/encoder/interp_search.h b/av1/encoder/interp_search.h
index b4c1ebc..ed5fcfc 100644
--- a/av1/encoder/interp_search.h
+++ b/av1/encoder/interp_search.h
@@ -26,11 +26,7 @@
#define DUAL_FILTER_SET_SIZE (SWITCHABLE_FILTERS * SWITCHABLE_FILTERS)
typedef struct {
-#if CONFIG_REMOVE_DUAL_FILTER
InterpFilter interp_fltr;
-#else
- int_interpfilters filters;
-#endif // CONFIG_REMOVE_DUAL_FILTER
int_mv mv[2];
int8_t ref_frames[2];
COMPOUND_TYPE comp_type;
@@ -130,13 +126,6 @@
} HandleInterModeArgs;
/*!\cond */
-#if !CONFIG_REMOVE_DUAL_FILTER
-static const int_interpfilters filter_sets[DUAL_FILTER_SET_SIZE] = {
- { 0x00000000 }, { 0x00010000 }, { 0x00020000 }, // y = 0
- { 0x00000001 }, { 0x00010001 }, { 0x00020001 }, // y = 1
- { 0x00000002 }, { 0x00010002 }, { 0x00020002 }, // y = 2
-};
-#endif // !CONFIG_REMOVE_DUAL_FILTER
int av1_find_interp_filter_match(
MB_MODE_INFO *const mbmi, const AV1_COMP *const cpi,
diff --git a/av1/encoder/motion_search_facade.c b/av1/encoder/motion_search_facade.c
index 58ffb19..bfc63f2 100644
--- a/av1/encoder/motion_search_facade.c
+++ b/av1/encoder/motion_search_facade.c
@@ -402,12 +402,7 @@
ref_yv12[1] = xd->plane[plane].pre[1];
InterPredParams inter_pred_params;
-#if CONFIG_REMOVE_DUAL_FILTER
const InterpFilter interp_filters = EIGHTTAP_REGULAR;
-#else
- const int_interpfilters interp_filters =
- av1_broadcast_interp_filter(EIGHTTAP_REGULAR);
-#endif // CONFIG_REMOVE_DUAL_FILTER
av1_init_inter_params(&inter_pred_params, pw, ph, mi_row * MI_SIZE,
mi_col * MI_SIZE, 0, 0, xd->bd, is_cur_buf_hbd(xd), 0,
&cm->sf_identity, &ref_yv12[!id], interp_filters);
@@ -622,12 +617,7 @@
av1_init_inter_params(&inter_pred_params, pw, ph, p_row, p_col,
pd->subsampling_x, pd->subsampling_y, xd->bd,
is_cur_buf_hbd(xd), 0, &sf, &ref_yv12,
-#if CONFIG_REMOVE_DUAL_FILTER
- mbmi->interp_fltr
-#else
- mbmi->interp_filters
-#endif // CONFIG_REMOVE_DUAL_FILTER
- );
+ mbmi->interp_fltr);
inter_pred_params.conv_params = get_conv_params(0, plane, xd->bd);
// Get the prediction block from the 'other' reference frame.
@@ -745,11 +735,7 @@
mbmi->ref_frame[0] = ref;
mbmi->ref_frame[1] = NONE_FRAME;
mbmi->motion_mode = SIMPLE_TRANSLATION;
-#if CONFIG_REMOVE_DUAL_FILTER
mbmi->interp_fltr = EIGHTTAP_REGULAR;
-#else
- mbmi->interp_filters = av1_broadcast_interp_filter(EIGHTTAP_REGULAR);
-#endif // CONFIG_REMOVE_DUAL_FILTER
const YV12_BUFFER_CONFIG *yv12 = get_ref_frame_yv12_buf(cm, ref);
const YV12_BUFFER_CONFIG *scaled_ref_frame =
diff --git a/av1/encoder/partition_search.c b/av1/encoder/partition_search.c
index e229218..dccebca 100644
--- a/av1/encoder/partition_search.c
+++ b/av1/encoder/partition_search.c
@@ -1333,11 +1333,7 @@
if (inter_block && cm->features.interp_filter == SWITCHABLE &&
mbmi->motion_mode != WARPED_CAUSAL &&
!is_nontrans_global_motion(xd, mbmi)) {
- update_filter_type_cdf(xd,
-#if !CONFIG_REMOVE_DUAL_FILTER
- cm->seq_params.enable_dual_filter,
-#endif // CONFIG_REMOVE_DUAL_FILTER
- mbmi);
+ update_filter_type_cdf(xd, mbmi);
}
if (inter_block &&
!segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) {
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c
index fce7fd1..5ad2c44 100644
--- a/av1/encoder/rd.c
+++ b/av1/encoder/rd.c
@@ -1321,29 +1321,15 @@
}
int av1_get_switchable_rate(const MACROBLOCK *x, const MACROBLOCKD *xd,
-#if !CONFIG_REMOVE_DUAL_FILTER
- int dual_filter,
-#endif // !CONFIG_REMOVE_DUAL_FILTER
InterpFilter interp_filter) {
if (interp_filter == SWITCHABLE) {
const MB_MODE_INFO *const mbmi = xd->mi[0];
#if CONFIG_OPTFLOW_REFINEMENT
if (mbmi->mode > NEW_NEWMV) return 0;
#endif // CONFIG_OPTFLOW_REFINEMENT
-#if CONFIG_REMOVE_DUAL_FILTER
const int ctx = av1_get_pred_context_switchable_interp(xd, 0);
const int inter_filter_cost =
x->mode_costs.switchable_interp_costs[ctx][mbmi->interp_fltr];
-#else
- int inter_filter_cost = 0;
- for (int dir = 0; dir < 2; ++dir) {
- if (dir && !dual_filter) break;
- const int ctx = av1_get_pred_context_switchable_interp(xd, dir);
- const InterpFilter filter =
- av1_extract_interp_filter(mbmi->interp_filters, dir);
- inter_filter_cost += x->mode_costs.switchable_interp_costs[ctx][filter];
- }
-#endif // CONFIG_REMOVE_DUAL_FILTER
return SWITCHABLE_INTERP_RATE_FACTOR * inter_filter_cost;
} else {
return 0;
diff --git a/av1/encoder/rd.h b/av1/encoder/rd.h
index 30e9688..8a1bccd 100644
--- a/av1/encoder/rd.h
+++ b/av1/encoder/rd.h
@@ -244,9 +244,6 @@
double yl, double *rate_f, double *distbysse_f);
int av1_get_switchable_rate(const MACROBLOCK *x, const MACROBLOCKD *xd,
-#if !CONFIG_REMOVE_DUAL_FILTER
- int dual_filter,
-#endif // !CONFIG_REMOVE_DUAL_FILTER
InterpFilter interp_filter);
YV12_BUFFER_CONFIG *av1_get_scaled_ref_frame(const struct AV1_COMP *cpi,
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 77b6bbb..6c3ad23 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -1667,11 +1667,7 @@
const int interp_filter = features->interp_filter;
const int switchable_rate =
av1_is_interp_needed(cm, xd)
- ? av1_get_switchable_rate(x, xd,
-#if !CONFIG_REMOVE_DUAL_FILTER
- cm->seq_params.enable_dual_filter,
-#endif // !CONFIG_REMOVE_DUAL_FILTER
- interp_filter)
+ ? av1_get_switchable_rate(x, xd, interp_filter)
: 0;
int64_t best_rd = INT64_MAX;
int best_rate_mv = rate_mv0;
@@ -1743,12 +1739,7 @@
int pts[SAMPLES_ARRAY_SIZE], pts_inref[SAMPLES_ARRAY_SIZE];
mbmi->motion_mode = WARPED_CAUSAL;
mbmi->wm_params.wmtype = DEFAULT_WMTYPE;
-#if CONFIG_REMOVE_DUAL_FILTER
mbmi->interp_fltr = av1_unswitchable_filter(interp_filter);
-#else
- mbmi->interp_filters =
- av1_broadcast_interp_filter(av1_unswitchable_filter(interp_filter));
-#endif // CONFIG_REMOVE_DUAL_FILTER
memcpy(pts, pts0, total_samples * 2 * sizeof(*pts0));
memcpy(pts_inref, pts_inref0, total_samples * 2 * sizeof(*pts_inref0));
@@ -1943,12 +1934,7 @@
if (this_mode == GLOBALMV || this_mode == GLOBAL_GLOBALMV) {
if (is_nontrans_global_motion(xd, xd->mi[0])) {
-#if CONFIG_REMOVE_DUAL_FILTER
mbmi->interp_fltr = av1_unswitchable_filter(interp_filter);
-#else
- mbmi->interp_filters =
- av1_broadcast_interp_filter(av1_unswitchable_filter(interp_filter));
-#endif // CONFIG_REMOVE_DUAL_FILTER
}
}
@@ -3663,11 +3649,7 @@
mbmi->uv_mode = UV_DC_PRED;
mbmi->motion_mode = SIMPLE_TRANSLATION;
mbmi->mv[0].as_mv = dv;
-#if CONFIG_REMOVE_DUAL_FILTER
mbmi->interp_fltr = BILINEAR;
-#else
- mbmi->interp_filters = av1_broadcast_interp_filter(BILINEAR);
-#endif // CONFIG_REMOVE_DUAL_FILTER
#if CONFIG_SDP
mbmi->skip_txfm[xd->tree_type == CHROMA_PART] = 0;
#else
@@ -5577,27 +5559,22 @@
INTERINTRA_MODES, INTERINTRA_MODES, INTERINTRA_MODES, INTERINTRA_MODES,
INTERINTRA_MODES, INTERINTRA_MODES, INTERINTRA_MODES, INTERINTRA_MODES
};
- HandleInterModeArgs args = {
- { NULL },
- { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE },
- { NULL },
- { MAX_SB_SIZE >> 1, MAX_SB_SIZE >> 1, MAX_SB_SIZE >> 1 },
- NULL,
- NULL,
- NULL,
- search_state.modelled_rd,
- INT_MAX,
- INT_MAX,
- search_state.simple_rd,
- 0,
- interintra_modes,
-#if CONFIG_REMOVE_DUAL_FILTER
- { { 0, { { 0 } }, { 0 }, 0, 0, 0 } },
-#else
- { { { 0 }, { { 0 } }, { 0 }, 0, 0, 0 } },
-#endif // CONFIG_REMOVE_DUAL_FILTER
- 0
- };
+ HandleInterModeArgs args = { { NULL },
+ { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE },
+ { NULL },
+ { MAX_SB_SIZE >> 1, MAX_SB_SIZE >> 1,
+ MAX_SB_SIZE >> 1 },
+ NULL,
+ NULL,
+ NULL,
+ search_state.modelled_rd,
+ INT_MAX,
+ INT_MAX,
+ search_state.simple_rd,
+ 0,
+ interintra_modes,
+ { { 0, { { 0 } }, { 0 }, 0, 0, 0 } },
+ 0 };
// Indicates the appropriate number of simple translation winner modes for
// exhaustive motion mode evaluation
const int max_winner_motion_mode_cand =
@@ -6125,7 +6102,6 @@
}
const InterpFilter interp_filter = features->interp_filter;
-#if CONFIG_REMOVE_DUAL_FILTER
(void)interp_filter;
#if CONFIG_SDP
assert((interp_filter == SWITCHABLE) ||
@@ -6136,27 +6112,6 @@
(interp_filter == search_state.best_mbmode.interp_fltr) ||
!is_inter_block(&search_state.best_mbmode));
#endif
-#else
-#if CONFIG_SDP
- assert((interp_filter == SWITCHABLE) ||
- (interp_filter ==
- search_state.best_mbmode.interp_filters.as_filters.y_filter) ||
- !is_inter_block(&search_state.best_mbmode, xd->tree_type));
- assert((interp_filter == SWITCHABLE) ||
- (interp_filter ==
- search_state.best_mbmode.interp_filters.as_filters.x_filter) ||
- !is_inter_block(&search_state.best_mbmode, xd->tree_type));
-#else
- assert((interp_filter == SWITCHABLE) ||
- (interp_filter ==
- search_state.best_mbmode.interp_filters.as_filters.y_filter) ||
- !is_inter_block(&search_state.best_mbmode));
- assert((interp_filter == SWITCHABLE) ||
- (interp_filter ==
- search_state.best_mbmode.interp_filters.as_filters.x_filter) ||
- !is_inter_block(&search_state.best_mbmode));
-#endif
-#endif // CONFIG_REMOVE_DUAL_FILTER
if (!cpi->rc.is_src_frame_alt_ref && cpi->sf.inter_sf.adaptive_rd_thresh) {
av1_update_rd_thresh_fact(cm, x->thresh_freq_fact,
@@ -6174,14 +6129,7 @@
if (mbmi->mode == GLOBALMV || mbmi->mode == GLOBAL_GLOBALMV) {
// Correct the interp filters for GLOBALMV
if (is_nontrans_global_motion(xd, xd->mi[0])) {
-#if CONFIG_REMOVE_DUAL_FILTER
assert(mbmi->interp_fltr == av1_unswitchable_filter(interp_filter));
-#else
- int_interpfilters filters =
- av1_broadcast_interp_filter(av1_unswitchable_filter(interp_filter));
- assert(mbmi->interp_filters.as_int == filters.as_int);
- (void)filters;
-#endif // CONFIG_REMOVE_DUAL_FILTER
}
}
@@ -6300,16 +6248,8 @@
int rs;
int best_rs = INT_MAX;
for (i = 0; i < SWITCHABLE_FILTERS; ++i) {
-#if CONFIG_REMOVE_DUAL_FILTER
mbmi->interp_fltr = i;
-#else
- mbmi->interp_filters = av1_broadcast_interp_filter(i);
-#endif // CONFIG_REMOVE_DUAL_FILTER
- rs = av1_get_switchable_rate(x, xd,
-#if !CONFIG_REMOVE_DUAL_FILTER
- cm->seq_params.enable_dual_filter,
-#endif // !CONFIG_REMOVE_DUAL_FILTER
- interp_filter);
+ rs = av1_get_switchable_rate(x, xd, interp_filter);
if (rs < best_rs) {
best_rs = rs;
best_filter = i;
@@ -6318,16 +6258,8 @@
}
}
// Set the appropriate filter
-#if CONFIG_REMOVE_DUAL_FILTER
mbmi->interp_fltr = best_filter;
-#else
- mbmi->interp_filters = av1_broadcast_interp_filter(best_filter);
-#endif // CONFIG_REMOVE_DUAL_FILTER
- rate2 += av1_get_switchable_rate(x, xd,
-#if !CONFIG_REMOVE_DUAL_FILTER
- cm->seq_params.enable_dual_filter,
-#endif // !CONFIG_REMOVE_DUAL_FILTER
- interp_filter);
+ rate2 += av1_get_switchable_rate(x, xd, interp_filter);
if (cm->current_frame.reference_mode == REFERENCE_MODE_SELECT)
rate2 += comp_inter_cost[comp_pred];
@@ -6347,12 +6279,7 @@
return;
}
-#if CONFIG_REMOVE_DUAL_FILTER
assert((interp_filter == SWITCHABLE) || (interp_filter == mbmi->interp_fltr));
-#else
- assert((interp_filter == SWITCHABLE) ||
- (interp_filter == mbmi->interp_filters.as_filters.y_filter));
-#endif // CONFIG_REMOVE_DUAL_FILTER
if (cpi->sf.inter_sf.adaptive_rd_thresh) {
av1_update_rd_thresh_fact(cm, x->thresh_freq_fact,
diff --git a/av1/encoder/reconinter_enc.c b/av1/encoder/reconinter_enc.c
index ae01865..6a2dbe7 100644
--- a/av1/encoder/reconinter_enc.c
+++ b/av1/encoder/reconinter_enc.c
@@ -142,12 +142,7 @@
av1_init_inter_params(&inter_pred_params, pd->width, pd->height, mi_y, mi_x,
pd->subsampling_x, pd->subsampling_y, xd->bd,
is_cur_buf_hbd(xd), false, sf, pd->pre,
-#if CONFIG_REMOVE_DUAL_FILTER
- xd->mi[0]->interp_fltr
-#else
- xd->mi[0]->interp_filters
-#endif // CONFIG_REMOVE_DUAL_FILTER
- );
+ xd->mi[0]->interp_fltr);
inter_pred_params.conv_params = get_conv_params_no_round(
0, AOM_PLANE_Y, xd->tmp_conv_dst, MAX_SB_SIZE, false, xd->bd);
@@ -262,12 +257,7 @@
mi_x >> pd->subsampling_x, pd->subsampling_x,
pd->subsampling_y, xd->bd, is_cur_buf_hbd(xd), 0,
xd->block_ref_scale_factors[0], pre_buf,
-#if CONFIG_REMOVE_DUAL_FILTER
- above_mbmi->interp_fltr
-#else
- above_mbmi->interp_filters
-#endif // CONFIG_REMOVE_DUAL_FILTER
- );
+ above_mbmi->interp_fltr);
inter_pred_params.conv_params = get_conv_params(0, j, xd->bd);
av1_enc_build_one_inter_predictor(pd->dst.buf, pd->dst.stride, &mv,
@@ -369,12 +359,7 @@
mi_x >> pd->subsampling_x, pd->subsampling_x,
pd->subsampling_y, xd->bd, is_cur_buf_hbd(xd), 0,
xd->block_ref_scale_factors[ref], &pd->pre[ref],
-#if CONFIG_REMOVE_DUAL_FILTER
- mi->interp_fltr
-#else
- mi->interp_filters
-#endif // CONFIG_REMOVE_DUAL_FILTER
- );
+ mi->interp_fltr);
inter_pred_params.conv_params = get_conv_params(0, plane, xd->bd);
av1_init_warp_params(&inter_pred_params, &warp_types, ref, xd, mi);
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index 1b5a9da..45b8510 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -331,10 +331,6 @@
sf->inter_sf.reduce_inter_modes = 1;
sf->inter_sf.selective_ref_frame = 1;
-#if !CONFIG_REMOVE_DUAL_FILTER
- sf->interp_sf.use_fast_interpolation_filter_search = 1;
-#endif // !CONFIG_REMOVE_DUAL_FILTER
-
sf->intra_sf.intra_pruning_with_hog = 1;
sf->intra_sf.intra_pruning_with_hog_thresh = -1.2f;
@@ -434,10 +430,6 @@
sf->inter_sf.selective_ref_frame = 3;
// TODO(Sachin): Enable/Enhance this speed feature for speed 2 & 3
-#if !CONFIG_REMOVE_DUAL_FILTER
- sf->interp_sf.adaptive_interp_filter_search = 1;
- sf->interp_sf.disable_dual_filter = 1;
-#endif // !CONFIG_REMOVE_DUAL_FILTER
#if CONFIG_IST
sf->tx_sf.tx_type_search.skip_stx_search = 1;
#endif
@@ -541,10 +533,6 @@
sf->interp_sf.cb_pred_filter_search = 1;
sf->interp_sf.use_interp_filter = 2;
-#if !CONFIG_REMOVE_DUAL_FILTER
- sf->interp_sf.skip_sharp_interp_filter_search = 1;
- sf->interp_sf.adaptive_interp_filter_search = 2;
-#endif // !CONFIG_REMOVE_DUAL_FILTER
sf->intra_sf.intra_uv_mode_mask[TX_16X16] = UV_INTRA_DC_H_V_CFL;
sf->intra_sf.intra_uv_mode_mask[TX_32X32] = UV_INTRA_DC_H_V_CFL;
@@ -766,12 +754,6 @@
static AOM_INLINE void init_interp_sf(INTERP_FILTER_SPEED_FEATURES *interp_sf) {
interp_sf->cb_pred_filter_search = 0;
-#if !CONFIG_REMOVE_DUAL_FILTER
- interp_sf->adaptive_interp_filter_search = 0;
- interp_sf->disable_dual_filter = 0;
- interp_sf->use_fast_interpolation_filter_search = 0;
- interp_sf->skip_sharp_interp_filter_search = 0;
-#endif // !CONFIG_REMOVE_DUAL_FILTER
interp_sf->use_interp_filter = 0;
}
@@ -943,10 +925,6 @@
set_good_speed_features_framesize_independent(cpi, sf, speed);
if (!cpi->seq_params_locked) {
-#if !CONFIG_REMOVE_DUAL_FILTER
- cpi->common.seq_params.enable_dual_filter &=
- !sf->interp_sf.disable_dual_filter;
-#endif // CONFIG_REMOVE_DUAL_FILTER
cpi->common.seq_params.enable_restoration &= !sf->lpf_sf.disable_lr_filter;
cpi->common.seq_params.enable_masked_compound &=
diff --git a/av1/encoder/speed_features.h b/av1/encoder/speed_features.h
index 625c01f..3879220 100644
--- a/av1/encoder/speed_features.h
+++ b/av1/encoder/speed_features.h
@@ -749,22 +749,6 @@
} INTER_MODE_SPEED_FEATURES;
typedef struct INTERP_FILTER_SPEED_FEATURES {
-#if !CONFIG_REMOVE_DUAL_FILTER
- // Do limited interpolation filter search for dual filters, since best choice
- // usually includes EIGHTTAP_REGULAR.
- int use_fast_interpolation_filter_search;
-
- // Disable dual filter
- int disable_dual_filter;
-
- // skip sharp_filter evaluation based on regular and smooth filter rd for
- // dual_filter=0 case
- int skip_sharp_interp_filter_search;
-
- // adaptive interp_filter search to allow skip of certain filter types.
- int adaptive_interp_filter_search;
-#endif // !CONFIG_REMOVE_DUAL_FILTER
-
// Save results of av1_interpolation_filter_search for a block
// Check mv and ref_frames before search, if they are very close with previous
// saved results, filter search can be skipped.
diff --git a/av1/encoder/temporal_filter.c b/av1/encoder/temporal_filter.c
index 3105c00..e357b8d 100644
--- a/av1/encoder/temporal_filter.c
+++ b/av1/encoder/temporal_filter.c
@@ -325,12 +325,7 @@
const int is_high_bitdepth = is_frame_high_bitdepth(ref_frame);
// Default interpolation filters.
-#if CONFIG_REMOVE_DUAL_FILTER
const InterpFilter interp_filters = MULTITAP_SHARP2;
-#else
- const int_interpfilters interp_filters =
- av1_broadcast_interp_filter(MULTITAP_SHARP2);
-#endif // !CONFIG_REMOVE_DUAL_FILTER
// Handle Y-plane, U-plane and V-plane (if needed) in sequence.
int plane_offset = 0;
diff --git a/av1/encoder/tpl_model.c b/av1/encoder/tpl_model.c
index 9c4b1ee..71ee997 100644
--- a/av1/encoder/tpl_model.c
+++ b/av1/encoder/tpl_model.c
@@ -235,12 +235,7 @@
const int bw = 4 << mi_size_wide_log2[bsize];
const int bh = 4 << mi_size_high_log2[bsize];
-#if CONFIG_REMOVE_DUAL_FILTER
const InterpFilter kernel = EIGHTTAP_REGULAR;
-#else
- const int_interpfilters kernel =
- av1_broadcast_interp_filter(EIGHTTAP_REGULAR);
-#endif // !CONFIG_REMOVE_DUAL_FILTER
int64_t best_intra_cost = INT64_MAX;
int64_t intra_cost;
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake
index 7de650c..660fb5a 100644
--- a/build/cmake/aom_config_defaults.cmake
+++ b/build/cmake/aom_config_defaults.cmake
@@ -138,9 +138,6 @@
"Use zero offset for non-normative bit upshift")
# AV2 experiment flags.
-set_aom_config_var(CONFIG_REMOVE_DUAL_FILTER 1
- "AV2 experiment flag to remove dual filter.")
-
set_aom_config_var(CONFIG_SDP 1 NUMBER "AV2 Semi-Decoupled Partitioning.")
set_aom_config_var(CONFIG_EXTQUANT 1
"AV2 extended quantization experiment flag")
diff --git a/common/args.c b/common/args.c
index cf5a22f..bf681c7 100644
--- a/common/args.c
+++ b/common/args.c
@@ -117,9 +117,6 @@
GET_PARAMS(enable_cfl_intra);
GET_PARAMS(enable_smooth_intra);
GET_PARAMS(enable_filter_intra);
-#if !CONFIG_REMOVE_DUAL_FILTER
- GET_PARAMS(enable_dual_filter);
-#endif // !CONFIG_REMOVE_DUAL_FILTER
GET_PARAMS(enable_angle_delta);
#if CONFIG_OPTFLOW_REFINEMENT
GET_PARAMS(enable_opfl_refine);
diff --git a/common/av1_config.c b/common/av1_config.c
index f92149f..2cae5e0 100644
--- a/common/av1_config.c
+++ b/common/av1_config.c
@@ -369,10 +369,6 @@
AV1C_READ_BIT_OR_RETURN_ERROR(enable_interintra_compound);
AV1C_READ_BIT_OR_RETURN_ERROR(enable_masked_compound);
AV1C_READ_BIT_OR_RETURN_ERROR(enable_warped_motion);
-#if !CONFIG_REMOVE_DUAL_FILTER
- AV1C_READ_BIT_OR_RETURN_ERROR(enable_dual_filter);
-#endif // !CONFIG_REMOVE_DUAL_FILTER
-
AV1C_READ_BIT_OR_RETURN_ERROR(enable_order_hint);
if (enable_order_hint) {
AV1C_READ_BIT_OR_RETURN_ERROR(enable_ref_frame_mvs);