Remove the intra-interp experiment
This experiment uses switchable interpolation filter for intra
prediction. Current gain is too small to be useful for AV1.
May explore more for AV2 in the future.
Change-Id: I24ae8c75dc71adf6271eabdb68a81b68a0869fa2
diff --git a/av1/common/blockd.c b/av1/common/blockd.c
index 7bada8b..236aeb2 100644
--- a/av1/common/blockd.c
+++ b/av1/common/blockd.c
@@ -286,18 +286,4 @@
119, 113, 108, 103, 98, 93, 88, 83, 78, 73, 68, 63, 59,
54, 49, 45, 40, 35, 31, 26, 22, 17, 13, 8, 4,
};
-
-#if CONFIG_INTRA_INTERP
-int av1_is_intra_filter_switchable(int angle) {
- assert(angle > 0 && angle < 270);
- if (angle % 45 == 0) return 0;
- if (angle > 90 && angle < 180) {
- return 1;
- } else {
- return ((angle < 90 ? dr_intra_derivative[angle]
- : dr_intra_derivative[270 - angle]) &
- 0xFF) > 0;
- }
-}
-#endif // CONFIG_INTRA_INTERP
#endif // CONFIG_EXT_INTRA
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index b1ea9ad..6d24b4f 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -395,10 +395,6 @@
#if CONFIG_EXT_INTRA
// The actual prediction angle is the base angle + (angle_delta * step).
int8_t angle_delta[2];
-#if CONFIG_INTRA_INTERP
- // To-Do (huisu): this may be replaced by interp_filter
- INTRA_FILTER intra_filter;
-#endif // CONFIG_INTRA_INTERP
#endif // CONFIG_EXT_INTRA
#if CONFIG_INTERINTRA
@@ -1226,11 +1222,6 @@
0, 0,
#endif // CONFIG_SMOOTH_HV
};
-#if CONFIG_INTRA_INTERP
-// Returns whether filter selection is needed for a given
-// intra prediction angle.
-int av1_is_intra_filter_switchable(int angle);
-#endif // CONFIG_INTRA_INTERP
#endif // CONFIG_EXT_INTRA
#if CONFIG_DCT_ONLY
diff --git a/av1/common/entropy.c b/av1/common/entropy.c
index 7ce5b42..e64e7be 100644
--- a/av1/common/entropy.c
+++ b/av1/common/entropy.c
@@ -2299,9 +2299,6 @@
#if CONFIG_EXT_DELTA_Q
AVERAGE_TILE_CDFS(delta_lf_cdf)
#endif
-#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
- AVERAGE_TILE_CDFS(intra_filter_cdf)
-#endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(skip_cdfs)
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index e2db714..ac7fa04 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -2675,20 +2675,6 @@
static const aom_prob default_inter_lgt_prob[LGT_SIZES] = { 230, 230 };
#endif // CONFIG_LGT_FROM_PRED
-#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
-static const aom_prob
- default_intra_filter_probs[INTRA_FILTERS + 1][INTRA_FILTERS - 1] = {
- { 98, 63, 60 }, { 98, 82, 80 }, { 94, 65, 103 },
- { 49, 25, 24 }, { 72, 38, 50 },
- };
-const aom_tree_index av1_intra_filter_tree[TREE_SIZE(INTRA_FILTERS)] = {
- -INTRA_FILTER_LINEAR, 2, -INTRA_FILTER_8TAP, 4, -INTRA_FILTER_8TAP_SHARP,
- -INTRA_FILTER_8TAP_SMOOTH,
-};
-int av1_intra_filter_ind[INTRA_FILTERS];
-int av1_intra_filter_inv[INTRA_FILTERS];
-#endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
-
#if CONFIG_FILTER_INTRA
static const aom_prob default_filter_intra_probs[2] = { 97, 236 };
@@ -3754,17 +3740,6 @@
#endif // CONFIG_MRC_TX
#endif // !CONFIG_EXT_TX
-#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
-static const aom_cdf_prob
- default_intra_filter_cdf[INTRA_FILTERS + 1][CDF_SIZE(INTRA_FILTERS)] = {
- { AOM_ICDF(12544), AOM_ICDF(17521), AOM_ICDF(21095), AOM_ICDF(32768), 0 },
- { AOM_ICDF(12544), AOM_ICDF(19022), AOM_ICDF(23318), AOM_ICDF(32768), 0 },
- { AOM_ICDF(12032), AOM_ICDF(17297), AOM_ICDF(23522), AOM_ICDF(32768), 0 },
- { AOM_ICDF(6272), AOM_ICDF(8860), AOM_ICDF(11101), AOM_ICDF(32768), 0 },
- { AOM_ICDF(9216), AOM_ICDF(12712), AOM_ICDF(16629), AOM_ICDF(32768), 0 },
- };
-#endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
-
#if CONFIG_CFL
static const aom_cdf_prob default_cfl_sign_cdf[CDF_SIZE(CFL_JOINT_SIGNS)] = {
AOM_ICDF(1892), AOM_ICDF(2229), AOM_ICDF(11464),
@@ -6635,11 +6610,6 @@
#if CONFIG_NEW_MULTISYMBOL
av1_copy(fc->seg.pred_cdf, default_segment_pred_cdf);
#endif
-#if CONFIG_EXT_INTRA
-#if CONFIG_INTRA_INTERP
- av1_copy(fc->intra_filter_probs, default_intra_filter_probs);
-#endif // CONFIG_INTRA_INTERP
-#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
av1_copy(fc->filter_intra_probs, default_filter_intra_probs);
av1_copy(fc->filter_intra_mode_cdf, default_filter_intra_mode_cdf);
@@ -6665,9 +6635,6 @@
av1_copy(fc->skip_cdfs, default_skip_cdfs);
av1_copy(fc->intra_inter_cdf, default_intra_inter_cdf);
#endif
-#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
- av1_copy(fc->intra_filter_cdf, default_intra_filter_cdf);
-#endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
av1_copy(fc->seg.tree_cdf, default_seg_tree_cdf);
av1_copy(fc->tx_size_cdf, default_tx_size_cdf);
av1_copy(fc->delta_q_prob, default_delta_q_probs);
@@ -6939,14 +6906,6 @@
fc->delta_lf_prob[i] =
mode_mv_merge_probs(pre_fc->delta_lf_prob[i], counts->delta_lf[i]);
#endif // CONFIG_EXT_DELTA_Q
-#if CONFIG_EXT_INTRA
-#if CONFIG_INTRA_INTERP
- for (i = 0; i < INTRA_FILTERS + 1; ++i) {
- aom_tree_merge_probs(av1_intra_filter_tree, pre_fc->intra_filter_probs[i],
- counts->intra_filter[i], fc->intra_filter_probs[i]);
- }
-#endif // CONFIG_INTRA_INTERP
-#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
for (i = 0; i < PLANE_TYPES; ++i) {
fc->filter_intra_probs[i] = av1_mode_mv_merge_probs(
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index fd655cd..8a5730f 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -338,11 +338,6 @@
aom_prob supertx_prob[PARTITION_SUPERTX_CONTEXTS][TX_SIZES];
#endif // CONFIG_SUPERTX
struct segmentation_probs seg;
-#if CONFIG_EXT_INTRA
-#if CONFIG_INTRA_INTERP
- aom_prob intra_filter_probs[INTRA_FILTERS + 1][INTRA_FILTERS - 1];
-#endif // CONFIG_INTRA_INTERP
-#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
aom_prob filter_intra_probs[PLANE_TYPES];
aom_cdf_prob filter_intra_mode_cdf[PLANE_TYPES][CDF_SIZE(FILTER_INTRA_MODES)];
@@ -395,9 +390,6 @@
aom_prob intra_lgt_prob[LGT_SIZES][INTRA_MODES];
aom_prob inter_lgt_prob[LGT_SIZES];
#endif // CONFIG_LGT_FROM_PRED
-#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
- aom_cdf_prob intra_filter_cdf[INTRA_FILTERS + 1][CDF_SIZE(INTRA_FILTERS)];
-#endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
aom_prob delta_q_prob[DELTA_Q_PROBS];
#if CONFIG_EXT_DELTA_Q
#if CONFIG_LOOPFILTER_LEVEL
@@ -566,11 +558,6 @@
unsigned int supertx_size[TX_SIZES];
#endif // CONFIG_SUPERTX
struct seg_counts seg;
-#if CONFIG_EXT_INTRA
-#if CONFIG_INTRA_INTERP
- unsigned int intra_filter[INTRA_FILTERS + 1][INTRA_FILTERS];
-#endif // CONFIG_INTRA_INTERP
-#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
unsigned int filter_intra[PLANE_TYPES][2];
unsigned int filter_intra_mode[PLANE_TYPES][FILTER_INTRA_MODES];
@@ -690,9 +677,6 @@
#endif
extern const aom_tree_index
av1_palette_color_index_tree[PALETTE_SIZES][TREE_SIZE(PALETTE_COLORS)];
-#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
-extern const aom_tree_index av1_intra_filter_tree[TREE_SIZE(INTRA_FILTERS)];
-#endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
#if CONFIG_EXT_TX
extern const aom_tree_index av1_ext_tx_tree[EXT_TX_SET_TYPES]
[TREE_SIZE(TX_TYPES)];
diff --git a/av1/common/filter.c b/av1/common/filter.c
index 1351323..d766f65 100644
--- a/av1/common/filter.c
+++ b/av1/common/filter.c
@@ -209,17 +209,6 @@
};
#endif // USE_EXTRA_FILTER
-#if CONFIG_EXT_INTRA
-#if CONFIG_INTRA_INTERP
-const InterpKernel *av1_intra_filter_kernels[INTRA_FILTERS] = {
- bilinear_filters, // INTRA_FILTER_LINEAR
- sub_pel_filters_8, // INTRA_FILTER_8TAP
- sub_pel_filters_8sharp, // INTRA_FILTER_8TAP_SHARP
- sub_pel_filters_8smooth, // INTRA_FILTER_8TAP_SMOOTH
-};
-#endif // CONFIG_INTRA_INTERP
-#endif // CONFIG_EXT_INTRA
-
#if USE_EXTRA_FILTER
static const InterpFilterParams
av1_interp_filter_params_list[SWITCHABLE_FILTERS + EXTRA_FILTERS] = {
diff --git a/av1/common/filter.h b/av1/common/filter.h
index 343e875..c955aa7 100644
--- a/av1/common/filter.h
+++ b/av1/common/filter.h
@@ -113,20 +113,6 @@
#define SWITCHABLE_FILTER_CONTEXTS (SWITCHABLE_FILTERS + 1)
#endif // CONFIG_DUAL_FILTER
-#if CONFIG_EXT_INTRA
-#if CONFIG_INTRA_INTERP
-typedef enum {
- INTRA_FILTER_LINEAR,
- INTRA_FILTER_8TAP,
- INTRA_FILTER_8TAP_SHARP,
- INTRA_FILTER_8TAP_SMOOTH,
- INTRA_FILTERS,
-} INTRA_FILTER;
-
-extern const InterpKernel *av1_intra_filter_kernels[INTRA_FILTERS];
-#endif // CONFIG_INTRA_INTERP
-#endif // CONFIG_EXT_INTRA
-
typedef struct InterpFilterParams {
const int16_t *filter_ptr;
uint16_t taps;
diff --git a/av1/common/pred_common.c b/av1/common/pred_common.c
index 51fd038..8e045a5 100644
--- a/av1/common/pred_common.c
+++ b/av1/common/pred_common.c
@@ -100,54 +100,6 @@
}
#endif
-#if CONFIG_EXT_INTRA
-#if CONFIG_INTRA_INTERP
-// Obtain the reference filter type from the above/left neighbor blocks.
-static INTRA_FILTER get_ref_intra_filter(const MB_MODE_INFO *ref_mbmi) {
- INTRA_FILTER ref_type = INTRA_FILTERS;
-
- if (ref_mbmi->sb_type >= BLOCK_8X8) {
- const PREDICTION_MODE mode = ref_mbmi->mode;
- if (is_inter_block(ref_mbmi)) {
- switch (av1_extract_interp_filter(ref_mbmi->interp_filters, 0)) {
- case EIGHTTAP_REGULAR: ref_type = INTRA_FILTER_8TAP; break;
- case EIGHTTAP_SMOOTH: ref_type = INTRA_FILTER_8TAP_SMOOTH; break;
- case MULTITAP_SHARP: ref_type = INTRA_FILTER_8TAP_SHARP; break;
- case BILINEAR: ref_type = INTRA_FILTERS; break;
- default: break;
- }
- } else {
- if (av1_is_directional_mode(mode, ref_mbmi->sb_type)) {
- const int p_angle =
- mode_to_angle_map[mode] + ref_mbmi->angle_delta[0] * ANGLE_STEP;
- if (av1_is_intra_filter_switchable(p_angle)) {
- ref_type = ref_mbmi->intra_filter;
- }
- }
- }
- }
- return ref_type;
-}
-
-int av1_get_pred_context_intra_interp(const MACROBLOCKD *xd) {
- int left_type = INTRA_FILTERS, above_type = INTRA_FILTERS;
-
- if (xd->left_available) left_type = get_ref_intra_filter(xd->left_mbmi);
-
- if (xd->up_available) above_type = get_ref_intra_filter(xd->above_mbmi);
-
- if (left_type == above_type)
- return left_type;
- else if (left_type == INTRA_FILTERS && above_type != INTRA_FILTERS)
- return above_type;
- else if (left_type != INTRA_FILTERS && above_type == INTRA_FILTERS)
- return left_type;
- else
- return INTRA_FILTERS;
-}
-#endif // CONFIG_INTRA_INTERP
-#endif // CONFIG_EXT_INTRA
-
#if CONFIG_PALETTE_DELTA_ENCODING
int av1_get_palette_cache(const MACROBLOCKD *const xd, int plane,
uint16_t *cache) {
diff --git a/av1/common/pred_common.h b/av1/common/pred_common.h
index db4618a..8a2d1fb 100644
--- a/av1/common/pred_common.h
+++ b/av1/common/pred_common.h
@@ -80,12 +80,6 @@
int av1_get_pred_context_switchable_interp(const MACROBLOCKD *xd);
#endif
-#if CONFIG_EXT_INTRA
-#if CONFIG_INTRA_INTERP
-int av1_get_pred_context_intra_interp(const MACROBLOCKD *xd);
-#endif // CONFIG_INTRA_INTERP
-#endif // CONFIG_EXT_INTRA
-
#if CONFIG_PALETTE_DELTA_ENCODING
// Get a list of palette base colors that are used in the above and left blocks,
// referred to as "color cache". The return value is the number of colors in the
diff --git a/av1/common/reconintra.c b/av1/common/reconintra.c
index 382d8de..0c398f3 100644
--- a/av1/common/reconintra.c
+++ b/av1/common/reconintra.c
@@ -766,43 +766,9 @@
}
#if CONFIG_EXT_INTRA
-#if CONFIG_INTRA_INTERP
-static int intra_subpel_interp(int base, int shift, const uint8_t *ref,
- int ref_start_idx, int ref_end_idx,
- INTRA_FILTER filter_type) {
- int val, k, idx, filter_idx = 0;
- const int16_t *filter = NULL;
-
- if (filter_type == INTRA_FILTER_LINEAR) {
- val = ref[base] * (256 - shift) + ref[base + 1] * shift;
- val = ROUND_POWER_OF_TWO(val, 8);
- } else {
- filter_idx = ROUND_POWER_OF_TWO(shift, 8 - SUBPEL_BITS);
- filter = av1_intra_filter_kernels[filter_type][filter_idx];
-
- if (filter_idx < (1 << SUBPEL_BITS)) {
- val = 0;
- for (k = 0; k < SUBPEL_TAPS; ++k) {
- idx = base + 1 - (SUBPEL_TAPS / 2) + k;
- idx = AOMMAX(AOMMIN(idx, ref_end_idx), ref_start_idx);
- val += ref[idx] * filter[k];
- }
- val = ROUND_POWER_OF_TWO(val, FILTER_BITS);
- } else {
- val = ref[base + 1];
- }
- }
-
- return val;
-}
-#endif // CONFIG_INTRA_INTERP
-
// Directional prediction, zone 1: 0 < angle < 90
static void dr_prediction_z1(uint8_t *dst, ptrdiff_t stride, int bw, int bh,
const uint8_t *above, const uint8_t *left,
-#if CONFIG_INTRA_INTERP
- INTRA_FILTER filter_type,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
int upsample_above,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
@@ -835,13 +801,8 @@
for (c = 0; c < bw; ++c, base += base_inc) {
if (base < max_base_x) {
-#if CONFIG_INTRA_INTERP
- val = intra_subpel_interp(base, shift, above, 0, bw + bh - 1,
- filter_type);
-#else // CONFIG_INTRA_INTERP
val = above[base] * (256 - shift) + above[base + 1] * shift;
val = ROUND_POWER_OF_TWO(val, 8);
-#endif // CONFIG_INTRA_INTERP
dst[c] = clip_pixel(val);
} else {
dst[c] = above[max_base_x];
@@ -853,9 +814,6 @@
// Directional prediction, zone 2: 90 < angle < 180
static void dr_prediction_z2(uint8_t *dst, ptrdiff_t stride, int bw, int bh,
const uint8_t *above, const uint8_t *left,
-#if CONFIG_INTRA_INTERP
- INTRA_FILTER filter_type,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
int upsample_above, int upsample_left,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
@@ -880,23 +838,14 @@
for (c = 0; c < bw; ++c, base1 += base_inc_x, y -= dy) {
if (base1 >= min_base_x) {
shift1 = (x * (1 << upsample_above)) & 0xFF;
-#if CONFIG_INTRA_INTERP
- val =
- intra_subpel_interp(base1, shift1, above, -1, bw - 1, filter_type);
-#else
val = above[base1] * (256 - shift1) + above[base1 + 1] * shift1;
val = ROUND_POWER_OF_TWO(val, 8);
-#endif // CONFIG_INTRA_INTERP
} else {
base2 = y >> frac_bits_y;
assert(base2 >= -(1 << upsample_left));
shift2 = (y * (1 << upsample_left)) & 0xFF;
-#if CONFIG_INTRA_INTERP
- val = intra_subpel_interp(base2, shift2, left, -1, bh - 1, filter_type);
-#else
val = left[base2] * (256 - shift2) + left[base2 + 1] * shift2;
val = ROUND_POWER_OF_TWO(val, 8);
-#endif // CONFIG_INTRA_INTERP
}
dst[c] = clip_pixel(val);
}
@@ -906,9 +855,6 @@
// Directional prediction, zone 3: 180 < angle < 270
static void dr_prediction_z3(uint8_t *dst, ptrdiff_t stride, int bw, int bh,
const uint8_t *above, const uint8_t *left,
-#if CONFIG_INTRA_INTERP
- INTRA_FILTER filter_type,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
int upsample_left,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
@@ -934,13 +880,8 @@
for (r = 0; r < bh; ++r, base += base_inc) {
if (base < max_base_y) {
-#if CONFIG_INTRA_INTERP
- val =
- intra_subpel_interp(base, shift, left, 0, bw + bh - 1, filter_type);
-#else // CONFIG_INTRA_INTERP
val = left[base] * (256 - shift) + left[base + 1] * shift;
val = ROUND_POWER_OF_TWO(val, 8);
-#endif // CONFIG_INTRA_INTERP
dst[r * stride + c] = clip_pixel(val);
} else {
for (; r < bh; ++r) dst[r * stride + c] = left[max_base_y];
@@ -982,9 +923,6 @@
static void dr_predictor(uint8_t *dst, ptrdiff_t stride, TX_SIZE tx_size,
const uint8_t *above, const uint8_t *left,
-#if CONFIG_INTRA_INTERP
- INTRA_FILTER filter_type,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
int upsample_above, int upsample_left,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
@@ -997,27 +935,18 @@
if (angle > 0 && angle < 90) {
dr_prediction_z1(dst, stride, bw, bh, above, left,
-#if CONFIG_INTRA_INTERP
- filter_type,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
upsample_above,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
dx, dy);
} else if (angle > 90 && angle < 180) {
dr_prediction_z2(dst, stride, bw, bh, above, left,
-#if CONFIG_INTRA_INTERP
- filter_type,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
upsample_above, upsample_left,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
dx, dy);
} else if (angle > 180 && angle < 270) {
dr_prediction_z3(dst, stride, bw, bh, above, left,
-#if CONFIG_INTRA_INTERP
- filter_type,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
upsample_left,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
@@ -1030,44 +959,10 @@
}
#if CONFIG_HIGHBITDEPTH
-#if CONFIG_INTRA_INTERP
-static int highbd_intra_subpel_interp(int base, int shift, const uint16_t *ref,
- int ref_start_idx, int ref_end_idx,
- INTRA_FILTER filter_type) {
- int val, k, idx, filter_idx = 0;
- const int16_t *filter = NULL;
-
- if (filter_type == INTRA_FILTER_LINEAR) {
- val = ref[base] * (256 - shift) + ref[base + 1] * shift;
- val = ROUND_POWER_OF_TWO(val, 8);
- } else {
- filter_idx = ROUND_POWER_OF_TWO(shift, 8 - SUBPEL_BITS);
- filter = av1_intra_filter_kernels[filter_type][filter_idx];
-
- if (filter_idx < (1 << SUBPEL_BITS)) {
- val = 0;
- for (k = 0; k < SUBPEL_TAPS; ++k) {
- idx = base + 1 - (SUBPEL_TAPS / 2) + k;
- idx = AOMMAX(AOMMIN(idx, ref_end_idx), ref_start_idx);
- val += ref[idx] * filter[k];
- }
- val = ROUND_POWER_OF_TWO(val, FILTER_BITS);
- } else {
- val = ref[base + 1];
- }
- }
-
- return val;
-}
-#endif // CONFIG_INTRA_INTERP
-
// Directional prediction, zone 1: 0 < angle < 90
static void highbd_dr_prediction_z1(uint16_t *dst, ptrdiff_t stride, int bw,
int bh, const uint16_t *above,
const uint16_t *left,
-#if CONFIG_INTRA_INTERP
- INTRA_FILTER filter_type,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
int upsample_above,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
@@ -1100,13 +995,8 @@
for (c = 0; c < bw; ++c, base += base_inc) {
if (base < max_base_x) {
-#if CONFIG_INTRA_INTERP
- val = highbd_intra_subpel_interp(base, shift, above, 0, bw + bh - 1,
- filter_type);
-#else
val = above[base] * (256 - shift) + above[base + 1] * shift;
val = ROUND_POWER_OF_TWO(val, 8);
-#endif // CONFIG_INTRA_INTERP
dst[c] = clip_pixel_highbd(val, bd);
} else {
dst[c] = above[max_base_x];
@@ -1119,9 +1009,6 @@
static void highbd_dr_prediction_z2(uint16_t *dst, ptrdiff_t stride, int bw,
int bh, const uint16_t *above,
const uint16_t *left,
-#if CONFIG_INTRA_INTERP
- INTRA_FILTER filter_type,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
int upsample_above, int upsample_left,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
@@ -1145,25 +1032,15 @@
base = x >> frac_bits_x;
if (base >= min_base_x) {
shift = (x * (1 << upsample_above)) & 0xFF;
-#if CONFIG_INTRA_INTERP
- val = highbd_intra_subpel_interp(base, shift, above, -1, bw - 1,
- filter_type);
-#else
val = above[base] * (256 - shift) + above[base + 1] * shift;
val = ROUND_POWER_OF_TWO(val, 8);
-#endif // CONFIG_INTRA_INTERP
} else {
x = c + 1;
y = (r << 8) - x * dy;
base = y >> frac_bits_y;
shift = (y * (1 << upsample_left)) & 0xFF;
-#if CONFIG_INTRA_INTERP
- val = highbd_intra_subpel_interp(base, shift, left, -1, bh - 1,
- filter_type);
-#else
val = left[base] * (256 - shift) + left[base + 1] * shift;
val = ROUND_POWER_OF_TWO(val, 8);
-#endif // CONFIG_INTRA_INTERP
}
dst[c] = clip_pixel_highbd(val, bd);
}
@@ -1175,9 +1052,6 @@
static void highbd_dr_prediction_z3(uint16_t *dst, ptrdiff_t stride, int bw,
int bh, const uint16_t *above,
const uint16_t *left,
-#if CONFIG_INTRA_INTERP
- INTRA_FILTER filter_type,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
int upsample_left,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
@@ -1202,13 +1076,8 @@
for (r = 0; r < bh; ++r, base += base_inc) {
if (base < max_base_y) {
-#if CONFIG_INTRA_INTERP
- val = highbd_intra_subpel_interp(base, shift, left, 0, bw + bh - 1,
- filter_type);
-#else
val = left[base] * (256 - shift) + left[base + 1] * shift;
val = ROUND_POWER_OF_TWO(val, 8);
-#endif // CONFIG_INTRA_INTERP
dst[r * stride + c] = clip_pixel_highbd(val, bd);
} else {
for (; r < bh; ++r) dst[r * stride + c] = left[max_base_y];
@@ -1221,9 +1090,6 @@
static void highbd_dr_predictor(uint16_t *dst, ptrdiff_t stride,
TX_SIZE tx_size, const uint16_t *above,
const uint16_t *left,
-#if CONFIG_INTRA_INTERP
- INTRA_FILTER filter,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
int upsample_above, int upsample_left,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
@@ -1236,27 +1102,18 @@
if (angle > 0 && angle < 90) {
highbd_dr_prediction_z1(dst, stride, bw, bh, above, left,
-#if CONFIG_INTRA_INTERP
- filter,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
upsample_above,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
dx, dy, bd);
} else if (angle > 90 && angle < 180) {
highbd_dr_prediction_z2(dst, stride, bw, bh, above, left,
-#if CONFIG_INTRA_INTERP
- filter,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
upsample_above, upsample_left,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
dx, dy, bd);
} else if (angle > 180 && angle < 270) {
highbd_dr_prediction_z3(dst, stride, bw, bh, above, left,
-#if CONFIG_INTRA_INTERP
- filter,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
upsample_left,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
@@ -2513,11 +2370,6 @@
#if CONFIG_EXT_INTRA
if (is_dr_mode) {
-#if CONFIG_INTRA_INTERP
- INTRA_FILTER filter = INTRA_FILTER_LINEAR;
- if (plane == 0 && av1_is_intra_filter_switchable(p_angle))
- filter = xd->mi[0]->mbmi.intra_filter;
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE
const int need_right = p_angle < 90;
const int need_bottom = p_angle > 180;
@@ -2549,9 +2401,6 @@
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
#endif // CONFIG_INTRA_EDGE
highbd_dr_predictor(dst, dst_stride, tx_size, above_row, left_col,
-#if CONFIG_INTRA_INTERP
- filter,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
upsample_above, upsample_left,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
@@ -2755,11 +2604,6 @@
#if CONFIG_EXT_INTRA
if (is_dr_mode) {
-#if CONFIG_INTRA_INTERP
- INTRA_FILTER filter = INTRA_FILTER_LINEAR;
- if (plane == 0 && av1_is_intra_filter_switchable(p_angle))
- filter = xd->mi[0]->mbmi.intra_filter;
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE
const int need_right = p_angle < 90;
const int need_bottom = p_angle > 180;
@@ -2791,9 +2635,6 @@
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
#endif // CONFIG_INTRA_EDGE
dr_predictor(dst, dst_stride, tx_size, above_row, left_col,
-#if CONFIG_INTRA_INTERP
- filter,
-#endif // CONFIG_INTRA_INTERP
#if CONFIG_INTRA_EDGE_UPSAMPLE
upsample_above, upsample_left,
#endif // CONFIG_INTRA_EDGE_UPSAMPLE
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 5b28e52..0a754fd 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -927,38 +927,16 @@
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
-static void read_intra_angle_info(AV1_COMMON *const cm, MACROBLOCKD *const xd,
- aom_reader *r) {
+static void read_intra_angle_info(MACROBLOCKD *const xd, aom_reader *r) {
MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
const BLOCK_SIZE bsize = mbmi->sb_type;
-#if CONFIG_INTRA_INTERP
- FRAME_CONTEXT *const ec_ctx = xd->tile_ctx;
- const int ctx = av1_get_pred_context_intra_interp(xd);
- int p_angle;
-#endif // CONFIG_INTRA_INTERP
-
- (void)cm;
-
mbmi->angle_delta[0] = 0;
mbmi->angle_delta[1] = 0;
-#if CONFIG_INTRA_INTERP
- mbmi->intra_filter = INTRA_FILTER_LINEAR;
-#endif // CONFIG_INTRA_INTERP
-
if (!av1_use_angle_delta(bsize)) return;
if (av1_is_directional_mode(mbmi->mode, bsize)) {
mbmi->angle_delta[0] =
av1_read_uniform(r, 2 * MAX_ANGLE_DELTA + 1) - MAX_ANGLE_DELTA;
-#if CONFIG_INTRA_INTERP
- p_angle = mode_to_angle_map[mbmi->mode] + mbmi->angle_delta[0] * ANGLE_STEP;
- if (av1_is_intra_filter_switchable(p_angle)) {
- FRAME_COUNTS *counts = xd->counts;
- mbmi->intra_filter = aom_read_symbol(r, ec_ctx->intra_filter_cdf[ctx],
- INTRA_FILTERS, ACCT_STR);
- if (counts) ++counts->intra_filter[ctx][mbmi->intra_filter];
- }
-#endif // CONFIG_INTRA_INTERP
}
if (av1_is_directional_mode(get_uv_mode(mbmi->uv_mode), bsize)) {
@@ -1335,7 +1313,7 @@
#endif
#if CONFIG_EXT_INTRA
- read_intra_angle_info(cm, xd, r);
+ read_intra_angle_info(xd, r);
#endif // CONFIG_EXT_INTRA
mbmi->palette_mode_info.palette_size[0] = 0;
mbmi->palette_mode_info.palette_size[1] = 0;
@@ -1933,7 +1911,7 @@
(void)cm;
#if CONFIG_EXT_INTRA
- read_intra_angle_info(cm, xd, r);
+ read_intra_angle_info(xd, r);
#endif // CONFIG_EXT_INTRA
mbmi->palette_mode_info.palette_size[0] = 0;
mbmi->palette_mode_info.palette_size[1] = 0;
@@ -2773,9 +2751,6 @@
#if CONFIG_EXT_INTRA
mbmi->angle_delta[0] = 0;
mbmi->angle_delta[1] = 0;
-#if CONFIG_INTRA_INTERP
- mbmi->intra_filter = INTRA_FILTER_LINEAR;
-#endif // CONFIG_INTRA_INTERP
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
mbmi->filter_intra_mode_info.use_filter_intra_mode[0] = 0;
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 4fddc0e..fecddcb 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -79,11 +79,6 @@
}
#endif // !CONFIG_PVQ || CONFIG_EXT_INTRA
-#if CONFIG_EXT_INTRA
-#if CONFIG_INTRA_INTERP
-static struct av1_token intra_filter_encodings[INTRA_FILTERS];
-#endif // CONFIG_INTRA_INTERP
-#endif // CONFIG_EXT_INTRA
#if CONFIG_INTERINTRA
static struct av1_token interintra_mode_encodings[INTERINTRA_MODES];
#endif
@@ -114,9 +109,6 @@
int *const tile_col_size_bytes);
#endif
void av1_encode_token_init(void) {
-#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
- av1_tokens_from_tree(intra_filter_encodings, av1_intra_filter_tree);
-#endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
#if CONFIG_INTERINTRA
av1_tokens_from_tree(interintra_mode_encodings, av1_interintra_mode_tree);
#endif // CONFIG_INTERINTRA
@@ -1261,29 +1253,14 @@
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
-static void write_intra_angle_info(const MACROBLOCKD *xd,
- FRAME_CONTEXT *const ec_ctx, aom_writer *w) {
+static void write_intra_angle_info(const MACROBLOCKD *xd, aom_writer *w) {
const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
const BLOCK_SIZE bsize = mbmi->sb_type;
-#if CONFIG_INTRA_INTERP
- const int intra_filter_ctx = av1_get_pred_context_intra_interp(xd);
- int p_angle;
-#endif // CONFIG_INTRA_INTERP
-
- (void)ec_ctx;
if (!av1_use_angle_delta(bsize)) return;
if (av1_is_directional_mode(mbmi->mode, bsize)) {
write_uniform(w, 2 * MAX_ANGLE_DELTA + 1,
MAX_ANGLE_DELTA + mbmi->angle_delta[0]);
-#if CONFIG_INTRA_INTERP
- p_angle = mode_to_angle_map[mbmi->mode] + mbmi->angle_delta[0] * ANGLE_STEP;
- if (av1_is_intra_filter_switchable(p_angle)) {
- aom_write_symbol(w, mbmi->intra_filter,
- ec_ctx->intra_filter_cdf[intra_filter_ctx],
- INTRA_FILTERS);
- }
-#endif // CONFIG_INTRA_INTERP
}
if (av1_is_directional_mode(get_uv_mode(mbmi->uv_mode), bsize)) {
@@ -1871,7 +1848,7 @@
#endif
#if CONFIG_EXT_INTRA
- write_intra_angle_info(xd, ec_ctx, w);
+ write_intra_angle_info(xd, w);
#endif // CONFIG_EXT_INTRA
if (av1_allow_palette(cm->allow_screen_content_tools, bsize))
write_palette_mode_info(cm, xd, mi, w);
@@ -2262,7 +2239,7 @@
}
#endif
#if CONFIG_EXT_INTRA
- write_intra_angle_info(xd, ec_ctx, w);
+ write_intra_angle_info(xd, w);
#endif // CONFIG_EXT_INTRA
if (av1_allow_palette(cm->allow_screen_content_tools, bsize))
write_palette_mode_info(cm, xd, mi, w);
diff --git a/av1/encoder/block.h b/av1/encoder/block.h
index f3af5bb..afab1c3 100644
--- a/av1/encoder/block.h
+++ b/av1/encoder/block.h
@@ -297,11 +297,6 @@
int intra_tx_type_costs[EXT_TX_SIZES][TX_TYPES][TX_TYPES];
int inter_tx_type_costs[EXT_TX_SIZES][TX_TYPES];
#endif // CONFIG_EXT_TX
-#if CONFIG_EXT_INTRA
-#if CONFIG_INTRA_INTERP
- int intra_filter_cost[INTRA_FILTERS + 1][INTRA_FILTERS];
-#endif // CONFIG_INTRA_INTERP
-#endif // CONFIG_EXT_INTRA
#if CONFIG_LOOP_RESTORATION
int switchable_restore_cost[RESTORE_SWITCHABLE_TYPES];
int wiener_restore_cost[2];
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 666794a..06261d1 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -5999,15 +5999,6 @@
FILTER_INTRA_MODES);
}
#endif // CONFIG_FILTER_INTRA
-#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
- if (av1_is_directional_mode(mbmi->mode, bsize)) {
- const int intra_filter_ctx = av1_get_pred_context_intra_interp(xd);
- const int p_angle =
- mode_to_angle_map[mbmi->mode] + mbmi->angle_delta[0] * ANGLE_STEP;
- if (av1_is_intra_filter_switchable(p_angle))
- ++counts->intra_filter[intra_filter_ctx][mbmi->intra_filter];
- }
-#endif // CONFIG_INTRA_INTERP && CONFIG_INTRA_INTERP
}
#if CONFIG_CB4X4
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c
index 0ed3518..cac0105 100644
--- a/av1/encoder/rd.c
+++ b/av1/encoder/rd.c
@@ -263,13 +263,6 @@
av1_ext_tx_inv);
}
#endif // CONFIG_EXT_TX
-#if CONFIG_EXT_INTRA
-#if CONFIG_INTRA_INTERP
- for (i = 0; i < INTRA_FILTERS + 1; ++i)
- av1_cost_tokens_from_cdf(x->intra_filter_cost[i], fc->intra_filter_cdf[i],
- NULL);
-#endif // CONFIG_INTRA_INTERP
-#endif // CONFIG_EXT_INTRA
#if CONFIG_LOOP_RESTORATION
av1_cost_tokens_from_cdf(x->switchable_restore_cost,
fc->switchable_restore_cdf, NULL);
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 6cd07e5..f1e3f16 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -3728,11 +3728,6 @@
const TX_SIZE tx_size = TX_4X4;
#endif // CONFIG_EXT_TX && CONFIG_RECT_TX
-#if CONFIG_EXT_INTRA
-#if CONFIG_INTRA_INTERP
- mbmi->intra_filter = INTRA_FILTER_LINEAR;
-#endif // CONFIG_INTRA_INTERP
-#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
mbmi->filter_intra_mode_info.use_filter_intra_mode[0] = 0;
#endif // CONFIG_FILTER_INTRA
@@ -3933,9 +3928,6 @@
#if CONFIG_LGT_FROM_PRED
int *use_lgt_when_selected,
#endif
-#if CONFIG_INTRA_INTERP
- INTRA_FILTER *best_filter,
-#endif // CONFIG_INTRA_INTERP
int64_t *best_rd, int64_t *best_model_rd) {
int this_rate;
RD_STATS tokenonly_rd_stats;
@@ -3961,9 +3953,6 @@
*best_rd = this_rd;
*best_angle_delta = mbmi->angle_delta[0];
*best_tx_size = mbmi->tx_size;
-#if CONFIG_INTRA_INTERP
- *best_filter = mbmi->intra_filter;
-#endif // CONFIG_INTRA_INTERP
*best_tx_type = mbmi->tx_type;
#if CONFIG_LGT_FROM_PRED
*use_lgt_when_selected = mbmi->use_lgt;
@@ -3989,11 +3978,6 @@
assert(!is_inter_block(mbmi));
int i, angle_delta, best_angle_delta = 0;
int first_try = 1;
-#if CONFIG_INTRA_INTERP
- int p_angle;
- const int intra_filter_ctx = av1_get_pred_context_intra_interp(xd);
- INTRA_FILTER filter, best_filter = INTRA_FILTER_LINEAR;
-#endif // CONFIG_INTRA_INTERP
int64_t this_rd, best_rd_in, rd_cost[2 * (MAX_ANGLE_DELTA + 2)];
TX_SIZE best_tx_size = mic->mbmi.tx_size;
TX_TYPE best_tx_type = mbmi->tx_type;
@@ -4004,107 +3988,52 @@
for (i = 0; i < 2 * (MAX_ANGLE_DELTA + 2); ++i) rd_cost[i] = INT64_MAX;
for (angle_delta = 0; angle_delta <= MAX_ANGLE_DELTA; angle_delta += 2) {
-#if CONFIG_INTRA_INTERP
- for (filter = INTRA_FILTER_LINEAR; filter < INTRA_FILTERS; ++filter) {
- if (FILTER_FAST_SEARCH && filter != INTRA_FILTER_LINEAR) continue;
- mic->mbmi.intra_filter = filter;
-#endif // CONFIG_INTRA_INTERP
- for (i = 0; i < 2; ++i) {
- best_rd_in = (best_rd == INT64_MAX)
- ? INT64_MAX
- : (best_rd + (best_rd >> (first_try ? 3 : 5)));
- this_rd = calc_rd_given_intra_angle(
- cpi, x, bsize,
-#if CONFIG_INTRA_INTERP
- mode_cost + x->intra_filter_cost[intra_filter_ctx][filter],
-#else
- mode_cost,
-#endif // CONFIG_INTRA_INTERP
- best_rd_in, (1 - 2 * i) * angle_delta, MAX_ANGLE_DELTA, rate,
- rd_stats, &best_angle_delta, &best_tx_size, &best_tx_type,
+ for (i = 0; i < 2; ++i) {
+ best_rd_in = (best_rd == INT64_MAX)
+ ? INT64_MAX
+ : (best_rd + (best_rd >> (first_try ? 3 : 5)));
+ this_rd = calc_rd_given_intra_angle(
+ cpi, x, bsize, mode_cost, best_rd_in, (1 - 2 * i) * angle_delta,
+ MAX_ANGLE_DELTA, rate, rd_stats, &best_angle_delta, &best_tx_size,
+ &best_tx_type,
#if CONFIG_LGT_FROM_PRED
- &use_lgt_when_selected,
+ &use_lgt_when_selected,
#endif
-#if CONFIG_INTRA_INTERP
- &best_filter,
-#endif // CONFIG_INTRA_INTERP
- &best_rd, best_model_rd);
- rd_cost[2 * angle_delta + i] = this_rd;
- if (first_try && this_rd == INT64_MAX) return best_rd;
- first_try = 0;
- if (angle_delta == 0) {
- rd_cost[1] = this_rd;
- break;
- }
+ &best_rd, best_model_rd);
+ rd_cost[2 * angle_delta + i] = this_rd;
+ if (first_try && this_rd == INT64_MAX) return best_rd;
+ first_try = 0;
+ if (angle_delta == 0) {
+ rd_cost[1] = this_rd;
+ break;
}
-#if CONFIG_INTRA_INTERP
}
-#endif // CONFIG_INTRA_INTERP
}
assert(best_rd != INT64_MAX);
for (angle_delta = 1; angle_delta <= MAX_ANGLE_DELTA; angle_delta += 2) {
int64_t rd_thresh;
-#if CONFIG_INTRA_INTERP
- for (filter = INTRA_FILTER_LINEAR; filter < INTRA_FILTERS; ++filter) {
- if (FILTER_FAST_SEARCH && filter != INTRA_FILTER_LINEAR) continue;
- mic->mbmi.intra_filter = filter;
-#endif // CONFIG_INTRA_INTERP
- for (i = 0; i < 2; ++i) {
- int skip_search = 0;
- rd_thresh = best_rd + (best_rd >> 5);
- if (rd_cost[2 * (angle_delta + 1) + i] > rd_thresh &&
- rd_cost[2 * (angle_delta - 1) + i] > rd_thresh)
- skip_search = 1;
- if (!skip_search) {
- calc_rd_given_intra_angle(
- cpi, x, bsize,
-#if CONFIG_INTRA_INTERP
- mode_cost + x->intra_filter_cost[intra_filter_ctx][filter],
-#else
- mode_cost,
-#endif // CONFIG_INTRA_INTERP
- best_rd, (1 - 2 * i) * angle_delta, MAX_ANGLE_DELTA, rate,
- rd_stats, &best_angle_delta, &best_tx_size, &best_tx_type,
+ for (i = 0; i < 2; ++i) {
+ int skip_search = 0;
+ rd_thresh = best_rd + (best_rd >> 5);
+ if (rd_cost[2 * (angle_delta + 1) + i] > rd_thresh &&
+ rd_cost[2 * (angle_delta - 1) + i] > rd_thresh)
+ skip_search = 1;
+ if (!skip_search) {
+ calc_rd_given_intra_angle(cpi, x, bsize, mode_cost, best_rd,
+ (1 - 2 * i) * angle_delta, MAX_ANGLE_DELTA,
+ rate, rd_stats, &best_angle_delta,
+ &best_tx_size, &best_tx_type,
#if CONFIG_LGT_FROM_PRED
- &use_lgt_when_selected,
+ &use_lgt_when_selected,
#endif
-#if CONFIG_INTRA_INTERP
- &best_filter,
-#endif // CONFIG_INTRA_INTERP
- &best_rd, best_model_rd);
- }
- }
-#if CONFIG_INTRA_INTERP
- }
-#endif // CONFIG_INTRA_INTERP
- }
-
-#if CONFIG_INTRA_INTERP
- if (FILTER_FAST_SEARCH && rd_stats->rate < INT_MAX) {
- p_angle = mode_to_angle_map[mbmi->mode] + best_angle_delta * ANGLE_STEP;
- if (av1_is_intra_filter_switchable(p_angle)) {
- for (filter = INTRA_FILTER_LINEAR + 1; filter < INTRA_FILTERS; ++filter) {
- mic->mbmi.intra_filter = filter;
- this_rd = calc_rd_given_intra_angle(
- cpi, x, bsize,
- mode_cost + x->intra_filter_cost[intra_filter_ctx][filter], best_rd,
- best_angle_delta, MAX_ANGLE_DELTA, rate, rd_stats,
- &best_angle_delta, &best_tx_size, &best_tx_type,
-#if CONFIG_LGT_FROM_PRED
- &use_lgt_when_selected,
-#endif
- &best_filter, &best_rd, best_model_rd);
+ &best_rd, best_model_rd);
}
}
}
-#endif // CONFIG_INTRA_INTERP
mbmi->tx_size = best_tx_size;
mbmi->angle_delta[0] = best_angle_delta;
-#if CONFIG_INTRA_INTERP
- mic->mbmi.intra_filter = best_filter;
-#endif // CONFIG_INTRA_INTERP
mbmi->tx_type = best_tx_type;
#if CONFIG_LGT_FROM_PRED
mbmi->use_lgt = use_lgt_when_selected;
@@ -4267,9 +4196,6 @@
#if CONFIG_EXT_INTRA
const int rows = block_size_high[bsize];
const int cols = block_size_wide[bsize];
-#if CONFIG_INTRA_INTERP
- const int intra_filter_ctx = av1_get_pred_context_intra_interp(xd);
-#endif // CONFIG_INTRA_INTERP
int is_directional_mode;
uint8_t directional_mode_skip_mask[INTRA_MODES];
const int src_stride = x->plane[0].src.stride;
@@ -4402,12 +4328,6 @@
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
if (is_directional_mode) {
-#if CONFIG_INTRA_INTERP
- const int p_angle =
- mode_to_angle_map[mbmi->mode] + mbmi->angle_delta[0] * ANGLE_STEP;
- if (av1_is_intra_filter_switchable(p_angle))
- this_rate += x->intra_filter_cost[intra_filter_ctx][mbmi->intra_filter];
-#endif // CONFIG_INTRA_INTERP
if (av1_use_angle_delta(bsize)) {
this_rate += write_uniform_cost(2 * MAX_ANGLE_DELTA + 1,
MAX_ANGLE_DELTA + mbmi->angle_delta[0]);
@@ -11123,13 +11043,6 @@
}
#if CONFIG_EXT_INTRA
if (is_directional_mode) {
-#if CONFIG_INTRA_INTERP
- const int intra_filter_ctx = av1_get_pred_context_intra_interp(xd);
- const int p_angle =
- mode_to_angle_map[mbmi->mode] + mbmi->angle_delta[0] * ANGLE_STEP;
- if (av1_is_intra_filter_switchable(p_angle))
- rate2 += x->intra_filter_cost[intra_filter_ctx][mbmi->intra_filter];
-#endif // CONFIG_INTRA_INTERP
if (av1_use_angle_delta(bsize)) {
rate2 += write_uniform_cost(2 * MAX_ANGLE_DELTA + 1,
MAX_ANGLE_DELTA + mbmi->angle_delta[0]);
@@ -11182,9 +11095,6 @@
#if CONFIG_EXT_INTRA
mbmi->angle_delta[0] = 0;
mbmi->angle_delta[1] = 0;
-#if CONFIG_INTRA_INTERP
- mbmi->intra_filter = INTRA_FILTER_LINEAR;
-#endif // CONFIG_INTRA_INTERP
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
mbmi->filter_intra_mode_info.use_filter_intra_mode[0] = 0;
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake
index 5721ae9..a241004 100644
--- a/build/cmake/aom_config_defaults.cmake
+++ b/build/cmake/aom_config_defaults.cmake
@@ -159,7 +159,6 @@
set(CONFIG_INTER_STATS_ONLY 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_INTRABC 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_INTRA_EDGE 1 CACHE NUMBER "AV1 experiment flag.")
-set(CONFIG_INTRA_INTERP 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_JNT_COMP 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_KF_CTX 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_LGT 0 CACHE NUMBER "AV1 experiment flag.")
diff --git a/configure b/configure
index 45bffc5..e747484 100755
--- a/configure
+++ b/configure
@@ -259,7 +259,6 @@
ext_tx
tx64x64
ext_intra
- intra_interp
filter_intra
intra_edge
intrabc
diff --git a/tools/aom_entropy_optimizer.c b/tools/aom_entropy_optimizer.c
index 6f457e6..798f519 100644
--- a/tools/aom_entropy_optimizer.c
+++ b/tools/aom_entropy_optimizer.c
@@ -751,23 +751,6 @@
"[CDF_SIZE(2)]");
#endif
-/* ext_intra experiment */
-#if CONFIG_EXT_INTRA
-#if CONFIG_INTRA_INTERP
- cts_each_dim[0] = INTRA_FILTERS + 1;
- cts_each_dim[1] = INTRA_FILTERS;
- optimize_entropy_table(
- &fc.intra_filter[0][0], probsfile, 2, cts_each_dim, av1_intra_filter_tree,
- 0,
- "static const aom_prob\n"
- "default_intra_filter_probs[INTRA_FILTERS + 1][INTRA_FILTERS - 1]");
- optimize_cdf_table(&fc.intra_filter[0][0], probsfile, 2, cts_each_dim,
- "static const aom_cdf_prob "
- "default_intra_filter_cdf[INTRA_FILTERS + "
- "1][CDF_SIZE(INTRA_FILTERS)]");
-#endif
-#endif
-
/* filter_intra experiment */
#if CONFIG_FILTER_INTRA
cts_each_dim[0] = PLANE_TYPES;