Commit 203b1d30 authored by Jingning Han's avatar Jingning Han

Clean up redundant #if statements

Change-Id: Ia4779ffb47de333d670ae110cbdfb6cc567da910
parent 64550b6a
......@@ -205,9 +205,7 @@ void av1_convolve(const uint8_t *src, int src_stride, uint8_t *dst,
// This will reduce hardware implementation cost.
filter_params_y = av1_get_interp_filter_params(EIGHTTAP_SHARP);
}
#endif
#if CONFIG_DUAL_FILTER
// we do filter with fewer taps first to reduce hardware implementation
// complexity
if (filter_params_y.taps < filter_params_x.taps) {
......
......@@ -1072,17 +1072,15 @@ static void write_mb_interp_filter(AV1_COMP *cpi, const MACROBLOCKD *xd,
aom_writer *w) {
AV1_COMMON *const cm = &cpi->common;
const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
#if CONFIG_DUAL_FILTER
int dir;
#endif
if (cm->interp_filter == SWITCHABLE) {
#if CONFIG_DUAL_FILTER
int dir;
if (!av1_is_interp_needed(xd)) {
assert(mbmi->interp_filter[0] == EIGHTTAP_REGULAR);
return;
}
#endif // CONFIG_DUAL_FILTER
#if CONFIG_DUAL_FILTER
for (dir = 0; dir < 2; ++dir) {
if (has_subpel_mv_component(xd->mi[0], xd, dir) ||
(mbmi->ref_frame[1] > INTRA_FRAME &&
......@@ -1107,7 +1105,7 @@ static void write_mb_interp_filter(AV1_COMP *cpi, const MACROBLOCKD *xd,
#endif
++cpi->interp_filter_selected[0][mbmi->interp_filter];
}
#endif
#endif // CONFIG_DUAL_FILTER
}
}
......
......@@ -7448,12 +7448,11 @@ static int64_t handle_inter_mode(
return INT64_MAX;
if (cm->interp_filter == SWITCHABLE) {
#if !CONFIG_DUAL_FILTER
assign_filter =
predict_interp_filter(cpi, x, bsize, mi_row, mi_col, single_filter);
#endif
#if CONFIG_DUAL_FILTER
if (!av1_is_interp_needed(xd)) assign_filter = EIGHTTAP_REGULAR;
#else
assign_filter =
predict_interp_filter(cpi, x, bsize, mi_row, mi_col, single_filter);
#endif
} else {
assign_filter = cm->interp_filter;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment