Commit 79c763bf authored by Hui Su's avatar Hui Su

Remove ext_intra experimental flag

Change-Id: I69e07309b708caa59c313ae2156828d8c089cf4d
parent 4ef06b5d
......@@ -173,7 +173,6 @@ void av1_setup_block_planes(MACROBLOCKD *xd, int ss_x, int ss_y) {
}
}
#if CONFIG_EXT_INTRA
#if CONFIG_EXT_INTRA_MOD2
const int16_t dr_intra_derivative[90] = {
// More evenly spread out angles and limited to 10-bit
......@@ -219,4 +218,3 @@ const int16_t dr_intra_derivative[90] = {
54, 49, 45, 40, 35, 31, 26, 22, 17, 13, 8, 4,
};
#endif // CONFIG_EXT_INTRA_MOD2
#endif // CONFIG_EXT_INTRA
......@@ -267,10 +267,8 @@ typedef struct MB_MODE_INFO {
#if CONFIG_FILTER_INTRA
FILTER_INTRA_MODE_INFO filter_intra_mode_info;
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
// The actual prediction angle is the base angle + (angle_delta * step).
int8_t angle_delta[2];
#endif // CONFIG_EXT_INTRA
// interintra members
INTERINTRA_MODE interintra_mode;
......@@ -855,12 +853,10 @@ static INLINE TX_SIZE tx_size_from_tx_mode(BLOCK_SIZE bsize, TX_MODE tx_mode,
return largest_tx_size;
}
#if CONFIG_EXT_INTRA
extern const int16_t dr_intra_derivative[90];
static const uint8_t mode_to_angle_map[] = {
0, 90, 180, 45, 135, 113, 157, 203, 67, 0, 0, 0, 0,
};
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
static INLINE int av1_filter_intra_allowed_txsize(TX_SIZE tx) {
......
......@@ -550,11 +550,9 @@ typedef enum ATTRIBUTE_PACKED {
#define COEFF_LEVELS 18
#endif
#if CONFIG_EXT_INTRA
#define DIRECTIONAL_MODES 8
#define MAX_ANGLE_DELTA 3
#define ANGLE_STEP 3
#endif // CONFIG_EXT_INTRA
#define INTER_MODES (1 + NEWMV - NEARESTMV)
......
......@@ -12,9 +12,7 @@
#include "av1/common/common.h"
#include "av1/common/pred_common.h"
#include "av1/common/reconinter.h"
#if CONFIG_EXT_INTRA
#include "av1/common/reconintra.h"
#endif // CONFIG_EXT_INTRA
#include "av1/common/seg_common.h"
// Returns a context number for the given MB prediction signal
......
......@@ -1909,10 +1909,8 @@ void av1_build_intra_predictors_for_interintra(const AV1_COMMON *cm,
BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, &xd->plane[plane]);
PREDICTION_MODE mode =
interintra_to_intra_mode[xd->mi[0]->mbmi.interintra_mode];
#if CONFIG_EXT_INTRA
xd->mi[0]->mbmi.angle_delta[0] = 0;
xd->mi[0]->mbmi.angle_delta[1] = 0;
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
xd->mi[0]->mbmi.filter_intra_mode_info.use_filter_intra = 0;
#endif // CONFIG_FILTER_INTRA
......
......@@ -573,9 +573,7 @@ static intra_high_pred_fn pred_high[INTRA_MODES][TX_SIZES_ALL];
static intra_high_pred_fn dc_pred_high[2][2][TX_SIZES_ALL];
static void av1_init_intra_predictors_internal(void) {
#if CONFIG_EXT_INTRA
assert(NELEMENTS(mode_to_angle_map) == INTRA_MODES);
#endif // CONFIG_EXT_INTRA
#if CONFIG_TX64X64
#define INIT_RECTANGULAR(p, type) \
......@@ -666,7 +664,6 @@ static void av1_init_intra_predictors_internal(void) {
#undef intra_pred_allsizes
}
#if CONFIG_EXT_INTRA
// 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,
......@@ -1122,7 +1119,6 @@ static void highbd_dr_predictor(uint16_t *dst, ptrdiff_t stride,
pred_high[H_PRED][tx_size](dst, stride, above, left, bd);
}
}
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
static int filter_intra_taps_4x2procunit[FILTER_INTRA_MODES][8][7] = {
......@@ -1641,10 +1637,8 @@ static void build_intra_predictors_high(
int need_above_left = extend_modes[mode] & NEED_ABOVELEFT;
const uint16_t *above_ref = ref - ref_stride;
const uint16_t *left_ref = ref - 1;
#if CONFIG_EXT_INTRA
int p_angle = 0;
const int is_dr_mode = av1_is_directional_mode(mode, xd->mi[0]->mbmi.sb_type);
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
const int use_filter_intra =
plane > 0 ? 0 : xd->mi[0]->mbmi.filter_intra_mode_info.use_filter_intra;
......@@ -1653,14 +1647,13 @@ static void build_intra_predictors_high(
#endif // CONFIG_FILTER_INTRA
int base = 128 << (xd->bd - 8);
// The default values if ref pixels are not available:
// base-1 base-1 base-1 .. base-1 base-1 base-1 base-1 base-1 base-1
// base+1 A B .. Y Z
// base+1 C D .. W X
// base+1 E F .. U V
// base+1 G H .. S T T T T T
// The default values if ref pixels are not available:
// base-1 base-1 base-1 .. base-1 base-1 base-1 base-1 base-1 base-1
// base+1 A B .. Y Z
// base+1 C D .. W X
// base+1 E F .. U V
// base+1 G H .. S T T T T T
#if CONFIG_EXT_INTRA
if (is_dr_mode) {
p_angle = mode_to_angle_map[mode] +
xd->mi[0]->mbmi.angle_delta[plane != 0] * ANGLE_STEP;
......@@ -1671,7 +1664,6 @@ static void build_intra_predictors_high(
else
need_above = 0, need_left = 1, need_above_left = 1;
}
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
if (use_filter_intra) need_left = need_above = need_above_left = 1;
#endif // CONFIG_FILTER_INTRA
......@@ -1702,17 +1694,11 @@ static void build_intra_predictors_high(
// NEED_LEFT
if (need_left) {
#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
int need_bottom = !!(extend_modes[mode] & NEED_BOTTOMLEFT);
#if CONFIG_FILTER_INTRA
if (use_filter_intra) need_bottom = 0;
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
if (is_dr_mode) need_bottom = p_angle > 180;
#endif // CONFIG_EXT_INTRA
#else
const int need_bottom = !!(extend_modes[mode] & NEED_BOTTOMLEFT);
#endif // CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
const int num_left_pixels_needed = txhpx + (need_bottom ? txwpx : 0);
i = 0;
if (n_left_px > 0) {
......@@ -1739,17 +1725,11 @@ static void build_intra_predictors_high(
// NEED_ABOVE
if (need_above) {
#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
int need_right = !!(extend_modes[mode] & NEED_ABOVERIGHT);
#if CONFIG_FILTER_INTRA
if (use_filter_intra) need_right = 0;
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
if (is_dr_mode) need_right = p_angle < 90;
#endif // CONFIG_EXT_INTRA
#else
const int need_right = !!(extend_modes[mode] & NEED_ABOVERIGHT);
#endif // CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
const int num_top_pixels_needed = txwpx + (need_right ? txhpx : 0);
if (n_top_px > 0) {
memcpy(above_row, above_ref, n_top_px * sizeof(above_ref[0]));
......@@ -1802,7 +1782,6 @@ static void build_intra_predictors_high(
}
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
if (is_dr_mode) {
#if CONFIG_INTRA_EDGE
const int need_right = p_angle < 90;
......@@ -1849,7 +1828,6 @@ static void build_intra_predictors_high(
p_angle, xd->bd);
return;
}
#endif // CONFIG_EXT_INTRA
// predict
if (mode == DC_PRED) {
......@@ -1878,11 +1856,9 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
int need_left = extend_modes[mode] & NEED_LEFT;
int need_above = extend_modes[mode] & NEED_ABOVE;
int need_above_left = extend_modes[mode] & NEED_ABOVELEFT;
#if CONFIG_EXT_INTRA
int p_angle = 0;
const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
const int is_dr_mode = av1_is_directional_mode(mode, mbmi->sb_type);
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
const int use_filter_intra =
plane > 0 ? 0 : xd->mi[0]->mbmi.filter_intra_mode_info.use_filter_intra;
......@@ -1890,15 +1866,14 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
xd->mi[0]->mbmi.filter_intra_mode_info.filter_intra_mode;
#endif // CONFIG_FILTER_INTRA
// The default values if ref pixels are not available:
// 127 127 127 .. 127 127 127 127 127 127
// 129 A B .. Y Z
// 129 C D .. W X
// 129 E F .. U V
// 129 G H .. S T T T T T
// ..
// The default values if ref pixels are not available:
// 127 127 127 .. 127 127 127 127 127 127
// 129 A B .. Y Z
// 129 C D .. W X
// 129 E F .. U V
// 129 G H .. S T T T T T
// ..
#if CONFIG_EXT_INTRA
if (is_dr_mode) {
p_angle = mode_to_angle_map[mode] +
xd->mi[0]->mbmi.angle_delta[plane != 0] * ANGLE_STEP;
......@@ -1909,7 +1884,6 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
else
need_above = 0, need_left = 1, need_above_left = 1;
}
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
if (use_filter_intra) need_left = need_above = need_above_left = 1;
#endif // CONFIG_FILTER_INTRA
......@@ -1941,17 +1915,11 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
// NEED_LEFT
if (need_left) {
#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
int need_bottom = !!(extend_modes[mode] & NEED_BOTTOMLEFT);
#if CONFIG_FILTER_INTRA
if (use_filter_intra) need_bottom = 0;
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
if (is_dr_mode) need_bottom = p_angle > 180;
#endif // CONFIG_EXT_INTRA
#else
const int need_bottom = !!(extend_modes[mode] & NEED_BOTTOMLEFT);
#endif // CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
const int num_left_pixels_needed = txhpx + (need_bottom ? txwpx : 0);
i = 0;
if (n_left_px > 0) {
......@@ -1978,17 +1946,11 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
// NEED_ABOVE
if (need_above) {
#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
int need_right = !!(extend_modes[mode] & NEED_ABOVERIGHT);
#if CONFIG_FILTER_INTRA
if (use_filter_intra) need_right = 0;
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
if (is_dr_mode) need_right = p_angle < 90;
#endif // CONFIG_EXT_INTRA
#else
const int need_right = !!(extend_modes[mode] & NEED_ABOVERIGHT);
#endif // CONFIG_EXT_INTRA || CONFIG_FITLER_INTRA
const int num_top_pixels_needed = txwpx + (need_right ? txhpx : 0);
if (n_top_px > 0) {
memcpy(above_row, above_ref, n_top_px);
......@@ -2038,7 +2000,6 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
}
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
if (is_dr_mode) {
#if CONFIG_INTRA_EDGE
const int need_right = p_angle < 90;
......@@ -2085,7 +2046,6 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
p_angle);
return;
}
#endif // CONFIG_EXT_INTRA
// predict
if (mode == DC_PRED) {
......
......@@ -47,7 +47,6 @@ static const INTERINTRA_MODE intra_to_interintra_mode[INTRA_MODES] = {
#define CONFIG_USE_ANGLE_DELTA_SUB8X8 0
#if CONFIG_EXT_INTRA
static INLINE int av1_is_directional_mode(PREDICTION_MODE mode,
BLOCK_SIZE bsize) {
#if CONFIG_INTRA_EDGE
......@@ -66,7 +65,6 @@ static INLINE int av1_use_angle_delta(BLOCK_SIZE bsize) {
return bsize >= BLOCK_8X8;
#endif
}
#endif // CONFIG_EXT_INTRA
#if CONFIG_INTRABC
static INLINE int av1_allow_intrabc(const AV1_COMMON *const cm) {
......
......@@ -18,9 +18,7 @@
#include "av1/common/mvref_common.h"
#include "av1/common/pred_common.h"
#include "av1/common/reconinter.h"
#if CONFIG_EXT_INTRA
#include "av1/common/reconintra.h"
#endif // CONFIG_EXT_INTRA
#include "av1/common/seg_common.h"
#include "av1/common/warped_motion.h"
......@@ -840,7 +838,6 @@ static void read_filter_intra_mode_info(MACROBLOCKD *const xd, aom_reader *r) {
}
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA
#if CONFIG_EXT_INTRA_MOD
static int read_angle_delta(aom_reader *r, aom_cdf_prob *cdf) {
const int sym = aom_read_symbol(r, cdf, 2 * MAX_ANGLE_DELTA + 1, ACCT_STR);
......@@ -879,7 +876,6 @@ static void read_intra_angle_info(MACROBLOCKD *const xd, aom_reader *r) {
#endif // CONFIG_EXT_INTRA_MOD
}
}
#endif // CONFIG_EXT_INTRA
void av1_read_tx_type(const AV1_COMMON *const cm, MACROBLOCKD *xd,
#if CONFIG_TXK_SEL
......@@ -1152,9 +1148,7 @@ static void read_intra_frame_mode_info(AV1_COMMON *const cm,
#endif
}
#if CONFIG_EXT_INTRA
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;
if (av1_allow_palette(cm->allow_screen_content_tools, bsize))
......@@ -1468,9 +1462,7 @@ static void read_intra_block_mode_info(AV1_COMMON *const cm, const int mi_row,
// ext-intra, palette and filter-intra are enabled.
(void)cm;
#if CONFIG_EXT_INTRA
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;
if (av1_allow_palette(cm->allow_screen_content_tools, bsize))
......@@ -2006,10 +1998,8 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
read_interintra_mode(xd, r, bsize_group);
mbmi->ref_frame[1] = INTRA_FRAME;
mbmi->interintra_mode = interintra_mode;
#if CONFIG_EXT_INTRA
mbmi->angle_delta[0] = 0;
mbmi->angle_delta[1] = 0;
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
mbmi->filter_intra_mode_info.use_filter_intra = 0;
#endif // CONFIG_FILTER_INTRA
......
......@@ -35,9 +35,7 @@
#include "av1/common/odintrin.h"
#include "av1/common/pred_common.h"
#include "av1/common/reconinter.h"
#if CONFIG_EXT_INTRA
#include "av1/common/reconintra.h"
#endif // CONFIG_EXT_INTRA
#include "av1/common/seg_common.h"
#include "av1/common/tile_common.h"
......@@ -779,7 +777,6 @@ static void write_filter_intra_mode_info(const MACROBLOCKD *xd,
}
#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) {
const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
......@@ -809,7 +806,6 @@ static void write_intra_angle_info(const MACROBLOCKD *xd,
#endif
}
}
#endif // CONFIG_EXT_INTRA
static void write_mb_interp_filter(AV1_COMP *cpi, const MACROBLOCKD *xd,
aom_writer *w) {
......@@ -1335,9 +1331,7 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const int mi_row,
#endif
}
#if CONFIG_EXT_INTRA
write_intra_angle_info(xd, ec_ctx, w);
#endif // CONFIG_EXT_INTRA
if (av1_allow_palette(cm->allow_screen_content_tools, bsize))
write_palette_mode_info(cm, xd, mi, mi_row, mi_col, w);
#if CONFIG_FILTER_INTRA
......@@ -1641,9 +1635,7 @@ static void write_mb_modes_kf(AV1_COMP *cpi, MACROBLOCKD *xd,
#endif
}
#if CONFIG_EXT_INTRA
write_intra_angle_info(xd, ec_ctx, w);
#endif // CONFIG_EXT_INTRA
if (av1_allow_palette(cm->allow_screen_content_tools, bsize))
write_palette_mode_info(cm, xd, mi, mi_row, mi_col, w);
#if CONFIG_FILTER_INTRA
......
......@@ -326,9 +326,9 @@ struct macroblock {
int inter_tx_type_costs[EXT_TX_SETS_INTER][EXT_TX_SIZES][TX_TYPES];
int intra_tx_type_costs[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES]
[TX_TYPES];
#if CONFIG_EXT_INTRA && CONFIG_EXT_INTRA_MOD
#if CONFIG_EXT_INTRA_MOD
int angle_delta_cost[DIRECTIONAL_MODES][2 * MAX_ANGLE_DELTA + 1];
#endif // CONFIG_EXT_INTRA && CONFIG_EXT_INTRA_MOD
#endif // CONFIG_EXT_INTRA_MOD
#if CONFIG_LOOP_RESTORATION
int switchable_restore_cost[RESTORE_SWITCHABLE_TYPES];
int wiener_restore_cost[2];
......
......@@ -827,7 +827,7 @@ static void sum_intra_stats(FRAME_COUNTS *counts, MACROBLOCKD *xd,
}
}
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA && CONFIG_EXT_INTRA_MOD
#if CONFIG_EXT_INTRA_MOD
if (av1_is_directional_mode(mbmi->mode, bsize) &&
av1_use_angle_delta(bsize)) {
#if CONFIG_ENTROPY_STATS
......@@ -839,12 +839,12 @@ static void sum_intra_stats(FRAME_COUNTS *counts, MACROBLOCKD *xd,
mbmi->angle_delta[0] + MAX_ANGLE_DELTA,
2 * MAX_ANGLE_DELTA + 1);
}
#endif // CONFIG_EXT_INTRA && CONFIG_EXT_INTRA_MOD
#endif // CONFIG_EXT_INTRA_MOD
if (!is_chroma_reference(mi_row, mi_col, bsize, xd->plane[1].subsampling_x,
xd->plane[1].subsampling_y))
return;
#if CONFIG_EXT_INTRA && CONFIG_EXT_INTRA_MOD
#if CONFIG_EXT_INTRA_MOD
if (av1_is_directional_mode(get_uv_mode(mbmi->uv_mode), bsize) &&
av1_use_angle_delta(bsize)) {
#if CONFIG_ENTROPY_STATS
......@@ -856,7 +856,7 @@ static void sum_intra_stats(FRAME_COUNTS *counts, MACROBLOCKD *xd,
mbmi->angle_delta[1] + MAX_ANGLE_DELTA,
2 * MAX_ANGLE_DELTA + 1);
}
#endif // CONFIG_EXT_INTRA && CONFIG_EXT_INTRA_MOD
#endif // CONFIG_EXT_INTRA_MOD
#if CONFIG_ENTROPY_STATS
#if CONFIG_CFL
++counts->uv_mode[is_cfl_allowed(mbmi)][y_mode][uv_mode];
......
......@@ -239,12 +239,12 @@ void av1_fill_mode_rates(AV1_COMMON *const cm, MACROBLOCK *x,
}
}
}
#if CONFIG_EXT_INTRA && CONFIG_EXT_INTRA_MOD
#if CONFIG_EXT_INTRA_MOD
for (i = 0; i < DIRECTIONAL_MODES; ++i) {
av1_cost_tokens_from_cdf(x->angle_delta_cost[i], fc->angle_delta_cdf[i],
NULL);
}
#endif // CONFIG_EXT_INTRA && CONFIG_EXT_INTRA_MOD
#endif // CONFIG_EXT_INTRA_MOD
#if CONFIG_LOOP_RESTORATION
av1_cost_tokens_from_cdf(x->switchable_restore_cost,
fc->switchable_restore_cdf, NULL);
......
This diff is collapsed.
......@@ -130,7 +130,6 @@ set(CONFIG_ENTROPY_STATS 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EOB_FIRST 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXT_COMP_REFS 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXT_DELTA_Q 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXT_INTRA 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXT_INTRA_MOD 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXT_INTRA_MOD2 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXT_PARTITION 1 CACHE NUMBER "AV1 experiment flag.")
......
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