IST Macro removal
This commit removes the following IST related macros:
CONFIG_IST
CONFIG_IST_FIX_B076
CONFIG_IST_FIX_B098
diff --git a/aom/aom_encoder.h b/aom/aom_encoder.h
index 0364bf2..32b82a4 100644
--- a/aom/aom_encoder.h
+++ b/aom/aom_encoder.h
@@ -319,12 +319,10 @@
*/
unsigned int enable_orip;
#endif // CONFIG_ORIP
-#if CONFIG_IST
/*!\brief enable Intra secondary transform
*
*/
unsigned int enable_ist;
-#endif // CONFIG_IST
#if CONFIG_CROSS_CHROMA_TX
/*!\brief enable cross-chroma component transform
*
diff --git a/aom_dsp/txfm_common.h b/aom_dsp/txfm_common.h
index 42b12e6..9963bb5 100644
--- a/aom_dsp/txfm_common.h
+++ b/aom_dsp/txfm_common.h
@@ -27,12 +27,10 @@
// for both forward and inverse transforms
TX_TYPE tx_type;
// for both forward and inverse secondary transforms
-#if CONFIG_IST
// Secondary transform type used for the current tx block.
TX_TYPE sec_tx_type;
// intra prediction mode used for the current tx block
PREDICTION_MODE intra_mode;
-#endif
#if CONFIG_CROSS_CHROMA_TX
CctxType cctx_type;
#endif // CONFIG_CROSS_CHROMA_TX
diff --git a/apps/aomenc.c b/apps/aomenc.c
index 5ce133a..cc80bff 100644
--- a/apps/aomenc.c
+++ b/apps/aomenc.c
@@ -447,9 +447,7 @@
#if CONFIG_ORIP
&g_av1_codec_arg_defs.enable_orip,
#endif
-#if CONFIG_IST
&g_av1_codec_arg_defs.enable_ist,
-#endif
#if CONFIG_CROSS_CHROMA_TX
&g_av1_codec_arg_defs.enable_cctx,
#endif // CONFIG_CROSS_CHROMA_TX
@@ -647,9 +645,7 @@
#if CONFIG_ORIP
config->enable_orip = 1;
#endif
-#if CONFIG_IST
config->enable_ist = 1;
-#endif
#if CONFIG_CROSS_CHROMA_TX
config->enable_cctx = 1;
#endif // CONFIG_CROSS_CHROMA_TX
@@ -1494,10 +1490,8 @@
encoder_cfg->disable_ml_transform_speed_features);
fprintf(stdout, " : SDP (%d)\n",
encoder_cfg->enable_sdp);
-#if CONFIG_IST
fprintf(stdout, " : IST (%d)\n",
encoder_cfg->enable_ist);
-#endif
fprintf(stdout,
"Tool setting (Intra) : SmoothIntra (%d), CfL (%d), "
"FilterIntra (%d)\n",
diff --git a/av1/arg_defs.c b/av1/arg_defs.c
index 079c539..dbaa451 100644
--- a/av1/arg_defs.c
+++ b/av1/arg_defs.c
@@ -419,11 +419,9 @@
"Enable Offset Based refinement of intra prediction"
"(0: false, 1: true (default))"),
#endif
-#if CONFIG_IST
.enable_ist = ARG_DEF(NULL, "enable-ist", 1,
"Enable intra secondary transform"
"(0: false, 1: true (default))"),
-#endif
#if CONFIG_CROSS_CHROMA_TX
.enable_cctx = ARG_DEF(NULL, "enable-cctx", 1,
"Enable cross-chroma component transform "
diff --git a/av1/arg_defs.h b/av1/arg_defs.h
index bd4e389..ecc6d6b 100644
--- a/av1/arg_defs.h
+++ b/av1/arg_defs.h
@@ -167,9 +167,7 @@
#if CONFIG_ORIP
arg_def_t enable_orip;
#endif
-#if CONFIG_IST
arg_def_t enable_ist;
-#endif
#if CONFIG_CROSS_CHROMA_TX
arg_def_t enable_cctx;
#endif // CONFIG_CROSS_CHROMA_TX
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index 5a33fa3..7999ef1 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -141,9 +141,7 @@
#if CONFIG_ORIP
int enable_orip; // enable ORIP
#endif // CONFIG_ORIP
-#if CONFIG_IST
- int enable_ist; // enable intra secondary transform
-#endif // CONFIG_IST
+ int enable_ist; // enable intra secondary transform
#if CONFIG_CROSS_CHROMA_TX
int enable_cctx; // enable cross-chroma component transform
#endif // CONFIG_CROSS_CHROMA_TX
@@ -474,9 +472,7 @@
#if CONFIG_ORIP
1, // enable ORIP
#endif // CONFIG_ORIP
-#if CONFIG_IST
1, // enable intra secondary transform
-#endif // CONFIG_IST
#if CONFIG_CROSS_CHROMA_TX
1, // enable cross-chroma component transform
#endif // CONFIG_CROSS_CHROMA_TX
@@ -968,9 +964,7 @@
#if CONFIG_ORIP
cfg->enable_orip = extra_cfg->enable_orip;
#endif
-#if CONFIG_IST
cfg->enable_ist = extra_cfg->enable_ist;
-#endif
#if CONFIG_CROSS_CHROMA_TX
cfg->enable_cctx = extra_cfg->enable_cctx;
#endif // CONFIG_CROSS_CHROMA_TX
@@ -1084,9 +1078,7 @@
#if CONFIG_ORIP
extra_cfg->enable_orip = cfg->enable_orip;
#endif
-#if CONFIG_IST
extra_cfg->enable_ist = cfg->enable_ist;
-#endif
#if CONFIG_CROSS_CHROMA_TX
extra_cfg->enable_cctx = cfg->enable_cctx;
#endif // CONFIG_CROSS_CHROMA_TX
@@ -1667,9 +1659,7 @@
txfm_cfg->use_intra_default_tx_only = extra_cfg->use_intra_default_tx_only;
txfm_cfg->disable_ml_transform_speed_features =
extra_cfg->disable_ml_transform_speed_features;
-#if CONFIG_IST
txfm_cfg->enable_ist = extra_cfg->enable_ist;
-#endif
#if CONFIG_CROSS_CHROMA_TX
txfm_cfg->enable_cctx =
tool_cfg->enable_monochrome ? 0 : extra_cfg->enable_cctx;
@@ -3822,11 +3812,9 @@
err_string)) {
extra_cfg.enable_orip = arg_parse_int_helper(&arg, err_string);
#endif
-#if CONFIG_IST
} else if (arg_match_helper(&arg, &g_av1_codec_arg_defs.enable_ist, argv,
err_string)) {
extra_cfg.enable_ist = arg_parse_int_helper(&arg, err_string);
-#endif
#if CONFIG_CROSS_CHROMA_TX
} else if (arg_match_helper(&arg, &g_av1_codec_arg_defs.enable_cctx, argv,
err_string)) {
@@ -4305,9 +4293,7 @@
#if CONFIG_ORIP
1,
#endif
-#if CONFIG_IST
- 1,
-#endif // CONFIG_IST
+ 1, // IST
#if CONFIG_CROSS_CHROMA_TX
1,
#endif // CONFIG_CROSS_CHROMA_TX
diff --git a/av1/common/av1_common_int.h b/av1/common/av1_common_int.h
index 99e325b..08fa280 100644
--- a/av1/common/av1_common_int.h
+++ b/av1/common/av1_common_int.h
@@ -442,9 +442,7 @@
#if CONFIG_ORIP
uint8_t enable_orip; // To turn on/off sub-block based ORIP
#endif
-#if CONFIG_IST
uint8_t enable_ist; // enables/disables intra secondary transform
-#endif
#if CONFIG_CROSS_CHROMA_TX
uint8_t enable_cctx; // enables/disables cross-chroma component transform
#endif // CONFIG_CROSS_CHROMA_TX
@@ -920,7 +918,7 @@
* Number of allocated elements is same as 'mi_grid_size', and stride is
* same as 'mi_grid_size'. So, indexing into 'tx_type_map' is same as that of
* 'mi_grid_base'.
- * If secondary transform in enabled (CONFIG_IST) each element of the array
+ * If secondary transform in enabled (IST) each element of the array
* stores both primary and secondary transform types as shown below: Bits 4~5
* of each element stores secondary tx_type Bits 0~3 of each element stores
* primary tx_type
diff --git a/av1/common/av1_rtcd_defs.pl b/av1/common/av1_rtcd_defs.pl
index 16c257a..4d53661 100644
--- a/av1/common/av1_rtcd_defs.pl
+++ b/av1/common/av1_rtcd_defs.pl
@@ -134,10 +134,8 @@
# High bitdepth functions
#inv txfm
-if (aom_config("CONFIG_IST") eq "yes") {
- add_proto qw/void inv_stxfm/ , "tran_low_t *src, tran_low_t *dst, const PREDICTION_MODE mode, const uint8_t stx_idx, const int size";
- specialize qw/inv_stxfm sse4_1/;
-}
+add_proto qw/void inv_stxfm/ , "tran_low_t *src, tran_low_t *dst, const PREDICTION_MODE mode, const uint8_t stx_idx, const int size";
+specialize qw/inv_stxfm sse4_1/;
add_proto qw/void av1_highbd_inv_txfm_add/, "const tran_low_t *input, uint16_t *dest, int stride, const TxfmParam *txfm_param";
specialize qw/av1_highbd_inv_txfm_add sse4_1 avx2 neon/;
@@ -268,10 +266,8 @@
specialize qw/av1_fwht4x4 neon/;
#fwd txfm
- if (aom_config("CONFIG_IST") eq "yes") {
- add_proto qw/void fwd_stxfm/ , "tran_low_t *src, tran_low_t *dst, const PREDICTION_MODE mode, const uint8_t stx_idx, const int size";
- specialize qw/fwd_stxfm sse4_1/;
- }
+ add_proto qw/void fwd_stxfm/ , "tran_low_t *src, tran_low_t *dst, const PREDICTION_MODE mode, const uint8_t stx_idx, const int size";
+ specialize qw/fwd_stxfm sse4_1/;
add_proto qw/void av1_lowbd_fwd_txfm/, "const int16_t *src_diff, tran_low_t *coeff, int diff_stride, TxfmParam *txfm_param";
specialize qw/av1_lowbd_fwd_txfm sse2 sse4_1 avx2 neon/;
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 4a7e9bb..092c8d5 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -2174,12 +2174,10 @@
* 'cpi->tile_thr_data[t].td->mb.tmp_pred_bufs'.
*/
uint16_t *tmp_obmc_bufs[2];
-#if CONFIG_IST
/*!
* Enable IST for current coding block.
*/
uint8_t enable_ist;
-#endif
#if CONFIG_CCSO
#if CONFIG_CCSO_EXT
/** ccso blk y */
@@ -2839,7 +2837,6 @@
}
#endif // CONFIG_CROSS_CHROMA_TX
-#if CONFIG_IST
static INLINE int tx_size_is_depth0(TX_SIZE tx_size, BLOCK_SIZE bsize) {
TX_SIZE ctx_size = max_txsize_rect_lookup[bsize];
return ctx_size == tx_size;
@@ -2858,7 +2855,7 @@
#endif
/*
- * If secondary transform is enabled (CONFIG_IST) :
+ * If secondary transform is enabled (IST) :
* Bits 4~5 of tx_type stores secondary tx_type
* Bits 0~3 of tx_type stores primary tx_type
*
@@ -2907,14 +2904,9 @@
const int height = tx_size_high[tx_size];
const int sb_size = (width >= 8 && height >= 8) ? 8 : 4;
bool ist_eob = 1;
-#if CONFIG_IST_FIX_B076
// Updated EOB condition
if (((sb_size == 4) && (eob > IST_4x4_HEIGHT)) ||
((sb_size == 8) && (eob > IST_8x8_HEIGHT))) {
-#else
- if (((sb_size == 4) && (eob > IST_4x4_HEIGHT - 1)) ||
- ((sb_size == 8) && (eob > IST_8x8_HEIGHT - 1))) {
-#endif // CONFIG_IST_FIX_B076
ist_eob = 0;
}
const int is_depth0 = tx_size_is_depth0(tx_size, bs);
@@ -2924,12 +2916,11 @@
!(mbmi->filter_intra_mode_info.use_filter_intra) && is_depth0 && ist_eob;
return code_stx;
}
-#endif
/*
* This function returns the tx_type used by the transform block
*
- * If secondary transform is enabled (CONFIG_IST) :
+ * If secondary transform is enabled (IST) :
* Bits 4~5 of tx_type stores secondary tx_type
* Bits 0~3 of tx_type stores primary tx_type
*/
@@ -2938,11 +2929,7 @@
int blk_col, TX_SIZE tx_size,
int reduced_tx_set) {
const MB_MODE_INFO *const mbmi = xd->mi[0];
-#if CONFIG_IST
if (xd->lossless[mbmi->segment_id]) {
-#else
- if (xd->lossless[mbmi->segment_id] || txsize_sqr_up_map[tx_size] > TX_32X32) {
-#endif // CONFIG_IST
return DCT_DCT;
}
if (xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART] &&
@@ -2959,10 +2946,8 @@
blk_row <<= pd->subsampling_y;
blk_col <<= pd->subsampling_x;
tx_type = xd->tx_type_map[blk_row * xd->tx_type_map_stride + blk_col];
-#if CONFIG_IST
// Secondary transforms are disabled for chroma
disable_secondary_tx_type(&tx_type);
-#endif // CONFIG_IST
} else {
// In intra mode, uv planes don't share the same prediction mode as y
// plane, so the tx_type should not be shared
@@ -2972,7 +2957,6 @@
tx_size, is_inter_block(mbmi, xd->tree_type), reduced_tx_set);
if (!av1_ext_tx_used[tx_set_type][tx_type]) tx_type = DCT_DCT;
}
-#if CONFIG_IST
assert(av1_ext_tx_used[av1_get_ext_tx_set_type(
tx_size, is_inter_block(mbmi, xd->tree_type), reduced_tx_set)]
[get_primary_tx_type(tx_type)]);
@@ -2981,11 +2965,6 @@
// TX_32X32 while tx_type is by default DCT_DCT.
disable_primary_tx_type(&tx_type);
}
-#else
- assert(tx_type < TX_TYPES);
- assert(av1_ext_tx_used[av1_get_ext_tx_set_type(
- tx_size, is_inter_block(mbmi, xd->tree_type), reduced_tx_set)][tx_type]);
-#endif // CONFIG_IST
return tx_type;
}
diff --git a/av1/common/common_data.h b/av1/common/common_data.h
index 3b8e73d..225040e 100644
--- a/av1/common/common_data.h
+++ b/av1/common/common_data.h
@@ -641,7 +641,6 @@
block_size_high[bsize1] > block_size_high[bsize2];
}
-#if CONFIG_IST
// Mapping of intra modes to IST kernel set
// Secondary transforms are enabled only intra modes < PAETH_PRED.
// Thus, the array size is kept as INTRA_MODES - 1
@@ -10280,7 +10279,6 @@
},
};
-#endif
#if CONFIG_FLEX_MVRES
static const int min_class_with_offset[7] = { 4, 3, 2, 0, 0, 0, 0 };
#endif
diff --git a/av1/common/entropy.c b/av1/common/entropy.c
index b8567d8..3474c2e 100644
--- a/av1/common/entropy.c
+++ b/av1/common/entropy.c
@@ -366,9 +366,7 @@
RESET_CDF_COUNTER_STRIDE(fc->inter_ext_tx_cdf[3], 2, CDF_SIZE(TX_TYPES));
RESET_CDF_COUNTER(fc->cfl_sign_cdf, CFL_JOINT_SIGNS);
RESET_CDF_COUNTER(fc->cfl_alpha_cdf, CFL_ALPHABET_SIZE);
-#if CONFIG_IST
RESET_CDF_COUNTER_STRIDE(fc->stx_cdf, STX_TYPES, CDF_SIZE(STX_TYPES));
-#endif
#if CONFIG_FLEX_MVRES
for (int p = 0; p < NUM_MV_PREC_MPP_CONTEXT; ++p) {
RESET_CDF_COUNTER(fc->pb_mv_mpp_flag_cdf[p], 2);
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index 81e8d7b..abb1988 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -2651,14 +2651,12 @@
#endif // CONFIG_NEW_CONTEXT_MODELING
#endif // CONFIG_NEW_TX_PARTITION
-#if CONFIG_IST
// Updated CDF initialization values
static const aom_cdf_prob default_stx_cdf[TX_SIZES][CDF_SIZE(STX_TYPES)] = {
{ AOM_CDF4(1542, 11565, 24287) }, { AOM_CDF4(4776, 13664, 21624) },
{ AOM_CDF4(7447, 17278, 24725) }, { AOM_CDF4(5783, 17348, 21203) },
{ AOM_CDF4(17873, 20852, 23831) },
};
-#endif
#if CONFIG_FLEX_MVRES
static const aom_cdf_prob
@@ -3078,9 +3076,7 @@
av1_copy(fc->intrabc_mode_cdf, default_intrabc_mode_cdf);
av1_copy(fc->intrabc_drl_idx_cdf, default_intrabc_drl_idx_cdf);
#endif // CONFIG_BVP_IMPROVEMENT
-#if CONFIG_IST
av1_copy(fc->stx_cdf, default_stx_cdf);
-#endif
#if CONFIG_FLEX_MVRES
av1_copy(fc->pb_mv_precision_cdf, default_pb_mv_precision_cdf);
av1_copy(fc->pb_mv_mpp_flag_cdf, default_pb_mv_most_probable_precision_cdf);
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index b2ed81f..a24c99d 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -390,9 +390,7 @@
[CDF_SIZE(TX_TYPES)];
aom_cdf_prob cfl_sign_cdf[CDF_SIZE(CFL_JOINT_SIGNS)];
aom_cdf_prob cfl_alpha_cdf[CFL_ALPHA_CONTEXTS][CDF_SIZE(CFL_ALPHABET_SIZE)];
-#if CONFIG_IST
aom_cdf_prob stx_cdf[TX_SIZES][CDF_SIZE(STX_TYPES)];
-#endif
#if CONFIG_FLEX_MVRES
aom_cdf_prob pb_mv_mpp_flag_cdf[NUM_MV_PREC_MPP_CONTEXT][CDF_SIZE(2)];
diff --git a/av1/common/enums.h b/av1/common/enums.h
index fab7fd8..b0353c4 100644
--- a/av1/common/enums.h
+++ b/av1/common/enums.h
@@ -170,14 +170,12 @@
#endif // CONFIG_AIMC
// Intra Secondary Transform
-#if CONFIG_IST
#define IST_SET_SIZE 14 // IST kernel set size
#define STX_TYPES 4 // 4 sec_tx_types including no IST
#define IST_4x4_WIDTH 16
#define IST_4x4_HEIGHT 8
#define IST_8x8_WIDTH 64
#define IST_8x8_HEIGHT 32
-#endif // CONFIG_IST
#if CONFIG_ATC_NEWTXSETS
// TX sizes used for mode dependent TX sets
diff --git a/av1/common/idct.c b/av1/common/idct.c
index 8c9cd55..a9a3f1f 100644
--- a/av1/common/idct.c
+++ b/av1/common/idct.c
@@ -21,9 +21,7 @@
#include "av1/common/blockd.h"
#include "av1/common/enums.h"
#include "av1/common/idct.h"
-#if CONFIG_IST
#include "av1/common/scan.h"
-#endif
int av1_get_tx_scale(const TX_SIZE tx_size) {
const int pels = tx_size_2d[tx_size];
@@ -200,7 +198,6 @@
TX_TYPE tx_type, int eob, int reduced_tx_set,
TxfmParam *txfm_param) {
(void)plane;
-#if CONFIG_IST
MB_MODE_INFO *const mbmi = xd->mi[0];
txfm_param->tx_type = get_primary_tx_type(tx_type);
txfm_param->sec_tx_type = 0;
@@ -209,27 +206,11 @@
if ((txfm_param->intra_mode < PAETH_PRED) &&
!xd->lossless[mbmi->segment_id] &&
!(mbmi->filter_intra_mode_info.use_filter_intra)) {
-#if CONFIG_IST_FIX_B076
// updated EOB condition
txfm_param->sec_tx_type = get_secondary_tx_type(tx_type);
-#else
- const int width = tx_size_wide[tx_size];
- const int height = tx_size_high[tx_size];
- const int sb_size = (width >= 8 && height >= 8) ? 8 : 4;
- bool ist_eob = 1;
- if ((sb_size == 4) && (eob > (IST_4x4_HEIGHT - 1)))
- ist_eob = 0;
- else if ((sb_size == 8) && (eob > (IST_8x8_HEIGHT - 1)))
- ist_eob = 0;
- if (ist_eob) txfm_param->sec_tx_type = get_secondary_tx_type(tx_type);
-#endif // CONFIG_IST_FIX_B076
}
-#else
- txfm_param->tx_type = tx_type;
-#endif
txfm_param->tx_size = tx_size;
// EOB needs to adjusted after inverse IST
-#if CONFIG_IST_FIX_B098
if (txfm_param->sec_tx_type) {
// txfm_param->eob = av1_get_max_eob(tx_size);
const int sb_size =
@@ -238,9 +219,6 @@
} else {
txfm_param->eob = eob;
}
-#else
- txfm_param->eob = eob;
-#endif // CONFIG_IST_FIX_B098
txfm_param->lossless = xd->lossless[xd->mi[0]->segment_id];
txfm_param->bd = xd->bd;
txfm_param->tx_set_type = av1_get_ext_tx_set_type(
@@ -340,12 +318,7 @@
}
#endif // CONFIG_CROSS_CHROMA_TX
-void av1_inverse_transform_block(const MACROBLOCKD *xd,
-#if CONFIG_IST
- tran_low_t *dqcoeff,
-#else
- const tran_low_t *dqcoeff,
-#endif
+void av1_inverse_transform_block(const MACROBLOCKD *xd, tran_low_t *dqcoeff,
int plane, TX_TYPE tx_type, TX_SIZE tx_size,
uint16_t *dst, int stride, int eob,
int reduced_tx_set) {
@@ -358,7 +331,6 @@
&txfm_param);
assert(av1_ext_tx_used[txfm_param.tx_set_type][txfm_param.tx_type]);
-#if CONFIG_IST
MB_MODE_INFO *const mbmi = xd->mi[0];
PREDICTION_MODE intra_mode =
(plane == AOM_PLANE_Y) ? mbmi->mode : get_uv_mode(mbmi->uv_mode);
@@ -367,13 +339,11 @@
(void)intra_mode;
(void)filter;
av1_inv_stxfm(dqcoeff, &txfm_param);
-#endif
av1_highbd_inv_txfm_add(dqcoeff, dst, stride, &txfm_param);
}
// Inverse secondary transform
-#if CONFIG_IST
void inv_stxfm_c(tran_low_t *src, tran_low_t *dst, const PREDICTION_MODE mode,
const uint8_t stx_idx, const int size) {
const int16_t *kernel = (size == 4) ? ist_4x4_kernel[mode][stx_idx][0]
@@ -421,27 +391,17 @@
const int sb_size = (width >= 8 && height >= 8) ? 8 : 4;
const int16_t *scan_order_out;
-#if CONFIG_IST_FIX_B076
// Align scan order of IST with primary transform scan order
const SCAN_ORDER *scan_order_in =
get_scan(txfm_param->tx_size, txfm_param->tx_type);
const int16_t *const scan = scan_order_in->scan;
-#else
- const int16_t *scan_order_in = (sb_size == 4)
- ? stx_scan_orders_4x4[log2width - 2]
- : stx_scan_orders_8x8[log2width - 2];
-#endif // CONFIG_IST_FIX_B076
tran_low_t buf0[64] = { 0 }, buf1[64] = { 0 };
tran_low_t *tmp = buf0;
tran_low_t *src = coeff;
for (int r = 0; r < sb_size * sb_size; r++) {
-#if CONFIG_IST_FIX_B076
// Align scan order of IST with primary transform scan order
*tmp = src[scan[r]];
-#else
- *tmp = src[scan_order_in[r]];
-#endif // CONFIG_IST_FIX_B076
tmp++;
}
int8_t transpose = 0;
@@ -469,4 +429,3 @@
}
}
}
-#endif
diff --git a/av1/common/idct.h b/av1/common/idct.h
index 2f5dcb4..b50d972 100644
--- a/av1/common/idct.h
+++ b/av1/common/idct.h
@@ -39,12 +39,7 @@
CctxType cctx_type);
#endif // CONFIG_CROSS_CHROMA_TX
-void av1_inverse_transform_block(const MACROBLOCKD *xd,
-#if CONFIG_IST
- tran_low_t *dqcoeff,
-#else
- const tran_low_t *dqcoeff,
-#endif
+void av1_inverse_transform_block(const MACROBLOCKD *xd, tran_low_t *dqcoeff,
int plane, TX_TYPE tx_type, TX_SIZE tx_size,
uint16_t *dst, int stride, int eob,
int reduced_tx_set);
@@ -56,9 +51,7 @@
return (const int32_t *)input;
}
-#if CONFIG_IST
void av1_inv_stxfm(tran_low_t *coeff, TxfmParam *txfm_param);
-#endif
#ifdef __cplusplus
} // extern "C"
diff --git a/av1/common/quant_common.c b/av1/common/quant_common.c
index 8a961c2..5dab594 100644
--- a/av1/common/quant_common.c
+++ b/av1/common/quant_common.c
@@ -244,13 +244,9 @@
// Returns true if the tx_type corresponds to non-identity transform in both
// horizontal and vertical directions.
-#if CONFIG_IST
static INLINE bool is_2d_transform(TX_TYPE tx_type) {
return (get_primary_tx_type(tx_type) < IDTX);
}
-#else
-static INLINE bool is_2d_transform(TX_TYPE tx_type) { return (tx_type < IDTX); }
-#endif
const qm_val_t *av1_get_iqmatrix(const CommonQuantParams *quant_params,
const MACROBLOCKD *xd, int plane,
diff --git a/av1/common/scan.h b/av1/common/scan.h
index 3955a28..ef797ee 100644
--- a/av1/common/scan.h
+++ b/av1/common/scan.h
@@ -42,11 +42,7 @@
static INLINE const SCAN_ORDER *get_default_scan(TX_SIZE tx_size,
TX_TYPE tx_type) {
-#if CONFIG_IST
return &av1_scan_orders[tx_size][get_primary_tx_type(tx_type)];
-#else
- return &av1_scan_orders[tx_size][tx_type];
-#endif
}
static INLINE const SCAN_ORDER *get_scan(TX_SIZE tx_size, TX_TYPE tx_type) {
diff --git a/av1/common/x86/highbd_inv_txfm_sse4.c b/av1/common/x86/highbd_inv_txfm_sse4.c
index c42a74e..2096832 100644
--- a/av1/common/x86/highbd_inv_txfm_sse4.c
+++ b/av1/common/x86/highbd_inv_txfm_sse4.c
@@ -5817,7 +5817,6 @@
}
// Inverse secondary transform
-#if CONFIG_IST
void inv_stxfm_sse4_1(tran_low_t *src, tran_low_t *dst,
const PREDICTION_MODE mode, const uint8_t stx_idx,
const int size) {
@@ -5859,4 +5858,3 @@
_mm_storeu_si128(tmpBlock, tmp);
}
}
-#endif
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index deaf30c..d9c62cb 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -156,11 +156,7 @@
const TX_SIZE tx_size,
uint16_t *dst, int stride,
int reduced_tx_set) {
-#if CONFIG_IST
tran_low_t *dqcoeff = dcb->dqcoeff_block[plane] + dcb->cb_offset[plane];
-#else
- tran_low_t *const dqcoeff = dcb->dqcoeff_block[plane] + dcb->cb_offset[plane];
-#endif
eob_info *eob_data = dcb->eob_data[plane] + dcb->txb_offset[plane];
uint16_t scan_line = eob_data->max_scan_line;
uint16_t eob = eob_data->eob;
@@ -177,16 +173,12 @@
#endif // CONFIG_CROSS_CHROMA_TX
av1_inverse_transform_block(&dcb->xd, dqcoeff, plane, tx_type, tx_size, dst,
stride, eob, reduced_tx_set);
-#if CONFIG_IST
const int width = tx_size_wide[tx_size] <= 32 ? tx_size_wide[tx_size] : 32;
const int height = tx_size_high[tx_size] <= 32 ? tx_size_high[tx_size] : 32;
const int sbSize = (width >= 8 && height >= 8) ? 8 : 4;
int32_t nz0 = (sbSize - 1) * tx_size_wide[tx_size] + sbSize;
int32_t nz1 = (scan_line + 1);
memset(dqcoeff, 0, AOMMAX(nz0, nz1) * sizeof(dqcoeff[0]));
-#else
- memset(dqcoeff, 0, (scan_line + 1) * sizeof(dqcoeff[0]));
-#endif
}
static AOM_INLINE void read_coeffs_tx_intra_block(
@@ -6005,9 +5997,7 @@
seq_params->num_same_ref_compound = aom_rb_read_literal(rb, 2);
#endif // CONFIG_ALLOW_SAME_REF_COMPOUND
seq_params->enable_sdp = aom_rb_read_bit(rb);
-#if CONFIG_IST
seq_params->enable_ist = aom_rb_read_bit(rb);
-#endif
#if CONFIG_CROSS_CHROMA_TX
seq_params->enable_cctx = seq_params->monochrome ? 0 : aom_rb_read_bit(rb);
#endif // CONFIG_CROSS_CHROMA_TX
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 45b85e3..ba905f9 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -1253,7 +1253,6 @@
}
#endif // CONFIG_CROSS_CHROMA_TX
-#if CONFIG_IST
void av1_read_sec_tx_type(const AV1_COMMON *const cm, MACROBLOCKD *xd,
int blk_row, int blk_col, TX_SIZE tx_size,
uint16_t *eob, aom_reader *r) {
@@ -1291,7 +1290,6 @@
}
}
}
-#endif
#if CONFIG_FLEX_MVRES
static INLINE void read_mv(aom_reader *r, MV *mv, MV ref,
diff --git a/av1/decoder/decodemv.h b/av1/decoder/decodemv.h
index 08382fb..ac2e813 100644
--- a/av1/decoder/decodemv.h
+++ b/av1/decoder/decodemv.h
@@ -29,11 +29,9 @@
} // extern "C"
#endif
-#if CONFIG_IST
void av1_read_sec_tx_type(const AV1_COMMON *const cm, MACROBLOCKD *xd,
int blk_row, int blk_col, TX_SIZE tx_size,
uint16_t *eob, aom_reader *r);
-#endif
void av1_read_tx_type(const AV1_COMMON *const cm, MACROBLOCKD *xd, int blk_row,
int blk_col, TX_SIZE tx_size, aom_reader *r);
diff --git a/av1/decoder/decodetxb.c b/av1/decoder/decodetxb.c
index 6e227e1..91046a3 100644
--- a/av1/decoder/decodetxb.c
+++ b/av1/decoder/decodetxb.c
@@ -456,11 +456,7 @@
const TX_TYPE tx_type =
av1_get_tx_type(xd, plane_type, blk_row, blk_col, tx_size,
cm->features.reduced_tx_set_used);
-#if CONFIG_IST
const TX_CLASS tx_class = tx_type_to_class[get_primary_tx_type(tx_type)];
-#else
- const TX_CLASS tx_class = tx_type_to_class[tx_type];
-#endif
const qm_val_t *iqmatrix =
av1_get_iqmatrix(&cm->quant_params, xd, plane, tx_size, tx_type);
const SCAN_ORDER *const scan_order = get_scan(tx_size, tx_type);
@@ -544,13 +540,11 @@
}
#endif // CONFIG_CONTEXT_DERIVATION
-#if CONFIG_IST
// read sec_tx_type here
// Only y plane's sec_tx_type is transmitted
if ((plane == AOM_PLANE_Y) && (cm->seq_params.enable_ist)) {
av1_read_sec_tx_type(cm, xd, blk_row, blk_col, tx_size, eob, r);
}
-#endif
//
if (*eob > 1) {
memset(levels_buf, 0, sizeof(*levels_buf) * TX_PAD_2D);
@@ -916,11 +910,7 @@
uint8_t cul_level = 0;
if (decode_rest) {
if ((mbmi->fsc_mode[xd->tree_type == CHROMA_PART] &&
-#if CONFIG_IST
get_primary_tx_type(tx_type) == IDTX && plane == PLANE_TYPE_Y) ||
-#else
- tx_type == IDTX && plane == PLANE_TYPE_Y) ||
-#endif // CONFIG_IST
use_inter_fsc(cm, plane, tx_type, is_inter)) {
cul_level =
av1_read_coeffs_txb_skip(cm, dcb, r, row, col, plane, tx_size);
diff --git a/av1/encoder/av1_fwd_txfm2d.c b/av1/encoder/av1_fwd_txfm2d.c
index 6ba66c2..bbbdc9a 100644
--- a/av1/encoder/av1_fwd_txfm2d.c
+++ b/av1/encoder/av1_fwd_txfm2d.c
@@ -429,7 +429,6 @@
set_fwd_txfm_non_scale_range(cfg);
}
-#if CONFIG_IST
void fwd_stxfm_c(tran_low_t *src, tran_low_t *dst, const PREDICTION_MODE mode,
const uint8_t stx_idx, const int size) {
const int16_t *kernel = (size == 4) ? ist_4x4_kernel[mode][stx_idx][0]
@@ -459,4 +458,3 @@
kernel += (size * size);
}
}
-#endif
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index bac2dbd..9149446 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -706,11 +706,7 @@
const int is_inter = is_inter_block(mbmi, xd->tree_type);
if (code_rest) {
if ((mbmi->fsc_mode[xd->tree_type == CHROMA_PART] &&
-#if CONFIG_IST
get_primary_tx_type(tx_type) == IDTX && plane == PLANE_TYPE_Y) ||
-#else
- tx_type == IDTX && plane == PLANE_TYPE_Y) ||
-#endif // CONFIG_IST
use_inter_fsc(cm, plane, tx_type, is_inter)) {
av1_write_coeffs_txb_skip(cm, x, w, blk_row, blk_col, plane, block,
tx_size);
@@ -1230,7 +1226,6 @@
// eset == 0 should correspond to a set with only DCT_DCT and there
// is no need to send the tx_type
assert(eset > 0);
-#if CONFIG_IST
#if CONFIG_ATC_NEWTXSETS
const int size_info = av1_size_class[tx_size];
if (!is_inter) {
@@ -1244,9 +1239,6 @@
#else
assert(av1_ext_tx_used[tx_set_type][get_primary_tx_type(tx_type)]);
#endif // CONFIG_ATC_NEWTXSETS
-#else
- assert(av1_ext_tx_used[tx_set_type][tx_type]);
-#endif
if (is_inter) {
aom_write_symbol(w, av1_ext_tx_ind[tx_set_type][tx_type],
ec_ctx->inter_ext_tx_cdf[eset][square_tx_size],
@@ -1263,8 +1255,6 @@
else
intra_dir = mbmi->mode;
#endif // !CONFIG_ATC_NEWTXSETS
-
-#if CONFIG_IST
aom_write_symbol(
#if CONFIG_ATC_NEWTXSETS
w,
@@ -1285,12 +1275,6 @@
ec_ctx->intra_ext_tx_cdf[eset][square_tx_size][intra_dir],
av1_num_ext_tx_set_intra[tx_set_type]);
#endif // CONFIG_ATC_NEWTXSETS
-#else
- aom_write_symbol(
- w, av1_ext_tx_ind_intra[tx_set_type][tx_type],
- ec_ctx->intra_ext_tx_cdf[eset][square_tx_size][intra_dir],
- av1_num_ext_tx_set_intra[tx_set_type]);
-#endif
}
}
}
@@ -1320,7 +1304,6 @@
}
#endif // CONFIG_CROSS_CHROMA_TX
-#if CONFIG_IST
void av1_write_sec_tx_type(const AV1_COMMON *const cm, const MACROBLOCKD *xd,
TX_TYPE tx_type, TX_SIZE tx_size, uint16_t eob,
aom_writer *w) {
@@ -1352,7 +1335,7 @@
}
}
}
-#endif
+
#if !CONFIG_AIMC
static AOM_INLINE void write_intra_y_mode_nonkf(FRAME_CONTEXT *frame_ctx,
BLOCK_SIZE bsize,
@@ -4482,9 +4465,7 @@
aom_wb_write_literal(wb, seq_params->num_same_ref_compound, 2);
#endif // CONFIG_ALLOW_SAME_REF_COMPOUND
aom_wb_write_bit(wb, seq_params->enable_sdp);
-#if CONFIG_IST
aom_wb_write_bit(wb, seq_params->enable_ist);
-#endif
#if CONFIG_CROSS_CHROMA_TX
if (!seq_params->monochrome) aom_wb_write_bit(wb, seq_params->enable_cctx);
#endif // CONFIG_CROSS_CHROMA_TX
diff --git a/av1/encoder/bitstream.h b/av1/encoder/bitstream.h
index 8a7cd65..7257870 100644
--- a/av1/encoder/bitstream.h
+++ b/av1/encoder/bitstream.h
@@ -44,11 +44,9 @@
int av1_pack_bitstream(AV1_COMP *const cpi, uint8_t *dst, size_t *size,
int *const largest_tile_id);
-#if CONFIG_IST
void av1_write_sec_tx_type(const AV1_COMMON *const cm, const MACROBLOCKD *xd,
TX_TYPE tx_type, TX_SIZE tx_size, uint16_t eob,
aom_writer *w);
-#endif
void av1_write_tx_type(const AV1_COMMON *const cm, const MACROBLOCKD *xd,
TX_TYPE tx_type, TX_SIZE tx_size, aom_writer *w);
diff --git a/av1/encoder/block.h b/av1/encoder/block.h
index 371d359..c9f7d49 100644
--- a/av1/encoder/block.h
+++ b/av1/encoder/block.h
@@ -104,9 +104,7 @@
//! Stores source - pred so the txfm can be computed later
DECLARE_ALIGNED(32, int16_t, src_diff[MAX_SB_SQUARE]);
//! Temporary buffer for primary transform coeffs
-#if CONFIG_IST
DECLARE_ALIGNED(32, int32_t, temp_coeff[4096]);
-#endif
//! Dequantized coefficients
tran_low_t *dqcoeff;
//! Quantized coefficients
@@ -672,7 +670,7 @@
* allocates the memory for MACROBLOCKD::tx_type_map during rdopt on the
* partition block. So if we need to save memory, we could move the allocation
* to pick_sb_mode instead.
- * If secondary transform in enabled (CONFIG_IST) each element of the array
+ * If secondary transform in enabled (IST) each element of the array
* stores both primary and secondary transform types as shown below: Bits 4~5
* of each element stores secondary tx_type Bits 0~3 of each element stores
* primary tx_type
@@ -809,10 +807,8 @@
int intra_uv_mode_cost[CFL_ALLOWED_TYPES][UV_MODE_CONTEXTS][UV_INTRA_MODES];
#endif // CONFIG_AIMC
-#if CONFIG_IST
//! Cost of signaling secondary transform index
int stx_flag_cost[TX_SIZES][STX_TYPES];
-#endif
//! Rate rate associated with each alpha codeword
int cfl_cost[CFL_JOINT_SIGNS][CFL_PRED_PLANES][CFL_ALPHABET_SIZE];
@@ -1673,7 +1669,7 @@
!xd->lossless[mbmi->segment_id];
}
-#if !CONFIG_IST && !CONFIG_NEW_TX_PARTITION
+#if !CONFIG_NEW_TX_PARTITION
static INLINE int tx_size_to_depth(TX_SIZE tx_size, BLOCK_SIZE bsize) {
TX_SIZE ctx_size = max_txsize_rect_lookup[bsize];
int depth = 0;
diff --git a/av1/encoder/encodeframe_utils.c b/av1/encoder/encodeframe_utils.c
index 4fb239e..8cbded4 100644
--- a/av1/encoder/encodeframe_utils.c
+++ b/av1/encoder/encodeframe_utils.c
@@ -1485,10 +1485,8 @@
AVERAGE_CDF(ctx_left->cfl_sign_cdf, ctx_tr->cfl_sign_cdf, CFL_JOINT_SIGNS);
AVERAGE_CDF(ctx_left->cfl_alpha_cdf, ctx_tr->cfl_alpha_cdf,
CFL_ALPHABET_SIZE);
-#if CONFIG_IST
AVG_CDF_STRIDE(ctx_left->stx_cdf, ctx_tr->stx_cdf, STX_TYPES,
CDF_SIZE(STX_TYPES));
-#endif
#if CONFIG_FLEX_MVRES
for (int p = 0; p < NUM_MV_PREC_MPP_CONTEXT; ++p) {
diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c
index 16fe6cc..b43fa78 100644
--- a/av1/encoder/encodemb.c
+++ b/av1/encoder/encodemb.c
@@ -383,30 +383,17 @@
// transform, in order to obtain the quantized coefficients of the second
// channel.
if (plane != AOM_PLANE_V) {
-#if CONFIG_IST
av1_xform(x, plane, block, blk_row, blk_col, plane_bsize, txfm_param, 0);
-#else
- av1_xform(x, plane, block, blk_row, blk_col, plane_bsize, txfm_param);
-#endif
}
if (plane == AOM_PLANE_U) {
-#if CONFIG_IST
av1_xform(x, AOM_PLANE_V, block, blk_row, blk_col, plane_bsize,
txfm_param, 0);
-#else
- av1_xform(x, AOM_PLANE_V, block, blk_row, blk_col, plane_bsize,
- txfm_param);
-#endif
forward_cross_chroma_transform(x, block, txfm_param->tx_size,
txfm_param->cctx_type);
}
} else {
#endif // CONFIG_CROSS_CHROMA_TX
-#if CONFIG_IST
av1_xform(x, plane, block, blk_row, blk_col, plane_bsize, txfm_param, 0);
-#else
- av1_xform(x, plane, block, blk_row, blk_col, plane_bsize, txfm_param);
-#endif
#if CONFIG_CROSS_CHROMA_TX
}
#endif // CONFIG_CROSS_CHROMA_TX
@@ -416,11 +403,7 @@
if (fsc_mode) qparam->use_optimize_b = false;
av1_quant(x, plane, block, txfm_param, qparam);
if (fsc_mode) {
-#if CONFIG_IST
if (get_primary_tx_type(txfm_param->tx_type) == IDTX) {
-#else
- if (txfm_param->tx_type == IDTX) {
-#endif // CONFIG_IST
uint16_t *const eob = &p->eobs[block];
if (*eob != 0) *eob = av1_get_max_eob(txfm_param->tx_size);
}
@@ -428,17 +411,8 @@
}
void av1_xform(MACROBLOCK *x, int plane, int block, int blk_row, int blk_col,
- BLOCK_SIZE plane_bsize, TxfmParam *txfm_param
-#if CONFIG_IST
- ,
- const int reuse
-#endif
-) {
-#if CONFIG_IST
+ BLOCK_SIZE plane_bsize, TxfmParam *txfm_param, const int reuse) {
struct macroblock_plane *const p = &x->plane[plane];
-#else
- const struct macroblock_plane *const p = &x->plane[plane];
-#endif
const int block_offset = BLOCK_OFFSET(block);
tran_low_t *const coeff = p->coeff + block_offset;
const int diff_stride = block_size_wide[plane_bsize];
@@ -446,7 +420,6 @@
const int src_offset = (blk_row * diff_stride + blk_col);
const int16_t *src_diff = &p->src_diff[src_offset << MI_SIZE_LOG2];
-#if CONFIG_IST
if (reuse == 0) {
av1_fwd_txfm(src_diff, coeff, diff_stride, txfm_param);
} else {
@@ -478,9 +451,6 @@
(void)filter;
(void)is_depth0;
av1_fwd_stxfm(coeff, txfm_param);
-#else
- av1_fwd_txfm(src_diff, coeff, diff_stride, txfm_param);
-#endif
}
#if CONFIG_CROSS_CHROMA_TX
@@ -544,10 +514,7 @@
}
}
-void av1_setup_xform(const AV1_COMMON *cm, MACROBLOCK *x,
-#if CONFIG_IST
- int plane,
-#endif
+void av1_setup_xform(const AV1_COMMON *cm, MACROBLOCK *x, int plane,
TX_SIZE tx_size, TX_TYPE tx_type,
#if CONFIG_CROSS_CHROMA_TX
CctxType cctx_type,
@@ -556,7 +523,6 @@
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = xd->mi[0];
-#if CONFIG_IST
txfm_param->tx_type = get_primary_tx_type(tx_type);
txfm_param->sec_tx_type = 0;
txfm_param->intra_mode =
@@ -568,9 +534,6 @@
cm->seq_params.enable_ist) {
txfm_param->sec_tx_type = get_secondary_tx_type(tx_type);
}
-#else
- txfm_param->tx_type = tx_type;
-#endif
#if CONFIG_CROSS_CHROMA_TX
txfm_param->cctx_type = cctx_type;
#endif // CONFIG_CROSS_CHROMA_TX
@@ -627,11 +590,7 @@
MB_MODE_INFO *mbmi = xd->mi[0];
struct macroblock_plane *const p = &x->plane[plane];
struct macroblockd_plane *const pd = &xd->plane[plane];
-#if CONFIG_IST || CONFIG_CROSS_CHROMA_TX
tran_low_t *dqcoeff = p->dqcoeff + BLOCK_OFFSET(block);
-#else
- tran_low_t *const dqcoeff = p->dqcoeff + BLOCK_OFFSET(block);
-#endif
uint16_t *dst;
ENTROPY_CONTEXT *a, *l;
int dummy_rate_cost = 0;
@@ -685,11 +644,7 @@
else
quant_idx =
USE_B_QUANT_NO_TRELLIS ? AV1_XFORM_QUANT_B : AV1_XFORM_QUANT_FP;
- av1_setup_xform(cm, x,
-#if CONFIG_IST
- plane,
-#endif
- tx_size, tx_type,
+ av1_setup_xform(cm, x, plane, tx_size, tx_type,
#if CONFIG_CROSS_CHROMA_TX
cctx_type,
#endif // CONFIG_CROSS_CHROMA_TX
@@ -1019,11 +974,7 @@
TxfmParam txfm_param;
QUANT_PARAM quant_param;
- av1_setup_xform(cm, x,
-#if CONFIG_IST
- plane,
-#endif
- tx_size, DCT_DCT,
+ av1_setup_xform(cm, x, plane, tx_size, DCT_DCT,
#if CONFIG_CROSS_CHROMA_TX
CCTX_NONE,
#endif // CONFIG_CROSS_CHROMA_TX
@@ -1238,11 +1189,7 @@
quant_idx =
USE_B_QUANT_NO_TRELLIS ? AV1_XFORM_QUANT_B : AV1_XFORM_QUANT_FP;
- av1_setup_xform(cm, x,
-#if CONFIG_IST
- plane,
-#endif
- tx_size, tx_type,
+ av1_setup_xform(cm, x, plane, tx_size, tx_type,
#if CONFIG_CROSS_CHROMA_TX
CCTX_NONE,
#endif // CONFIG_CROSS_CHROMA_TX
@@ -1426,11 +1373,7 @@
else
quant_idx = USE_B_QUANT_NO_TRELLIS ? AV1_XFORM_QUANT_B : AV1_XFORM_QUANT_FP;
- av1_setup_xform(cm, x,
-#if CONFIG_IST
- AOM_PLANE_U,
-#endif
- tx_size, tx_type, cctx_type, &txfm_param);
+ av1_setup_xform(cm, x, AOM_PLANE_U, tx_size, tx_type, cctx_type, &txfm_param);
av1_setup_quant(tx_size, use_trellis, quant_idx,
cpi->oxcf.q_cfg.quant_b_adapt, &quant_param);
// Whether trellis or dropout optimization is required for key frames and
diff --git a/av1/encoder/encodemb.h b/av1/encoder/encodemb.h
index 989e0ea..3d0a27c 100644
--- a/av1/encoder/encodemb.h
+++ b/av1/encoder/encodemb.h
@@ -74,10 +74,7 @@
void av1_encode_sby_pass1(struct AV1_COMP *cpi, MACROBLOCK *x,
BLOCK_SIZE bsize);
-void av1_setup_xform(const AV1_COMMON *cm, MACROBLOCK *x,
-#if CONFIG_IST
- int plane,
-#endif
+void av1_setup_xform(const AV1_COMMON *cm, MACROBLOCK *x, int plane,
TX_SIZE tx_size, TX_TYPE tx_type,
#if CONFIG_CROSS_CHROMA_TX
CctxType cctx_Type,
@@ -101,12 +98,7 @@
TxfmParam *txfm_param, QUANT_PARAM *qparam);
void av1_xform(MACROBLOCK *x, int plane, int block, int blk_row, int blk_col,
- BLOCK_SIZE plane_bsize, TxfmParam *txfm_param
-#if CONFIG_IST
- ,
- const int reuse
-#endif
-);
+ BLOCK_SIZE plane_bsize, TxfmParam *txfm_param, const int reuse);
#if CONFIG_CROSS_CHROMA_TX
void forward_cross_chroma_transform(MACROBLOCK *x, int block, TX_SIZE tx_size,
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index e45c2dd..a0f81a5 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -481,9 +481,7 @@
#if CONFIG_ORIP
seq->enable_orip = oxcf->intra_mode_cfg.enable_orip;
#endif
-#if CONFIG_IST
seq->enable_ist = oxcf->txfm_cfg.enable_ist;
-#endif
#if CONFIG_CROSS_CHROMA_TX
seq->enable_cctx = oxcf->txfm_cfg.enable_cctx;
#endif // CONFIG_CROSS_CHROMA_TX
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 3f256c7..da7347c 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -330,12 +330,10 @@
* (mode-dependent) only.
*/
bool use_intra_default_tx_only;
-#if CONFIG_IST
/*!
* Flag to indicate if intra secondary transform should be enabled.
*/
bool enable_ist;
-#endif
#if CONFIG_CROSS_CHROMA_TX
/*!
* Flag to indicate if cross chroma component transform is enabled.
diff --git a/av1/encoder/encodetxb.c b/av1/encoder/encodetxb.c
index 0ca1100..b35db0e 100644
--- a/av1/encoder/encodetxb.c
+++ b/av1/encoder/encodetxb.c
@@ -720,11 +720,7 @@
int eob_extra;
const int eob_pt = get_eob_pos_token(eob, &eob_extra);
const int eob_multi_size = txsize_log2_minus4[tx_size];
-#if CONFIG_IST
const TX_CLASS tx_class = tx_type_to_class[get_primary_tx_type(tx_type)];
-#else
- const TX_CLASS tx_class = tx_type_to_class[tx_type];
-#endif
const int eob_multi_ctx = (tx_class == TX_CLASS_2D) ? 0 : 1;
switch (eob_multi_size) {
case 0:
@@ -777,14 +773,12 @@
#endif
}
-#if CONFIG_IST
// write sec_tx_type here
// Only y plane's sec_tx_type is transmitted
if ((plane == AOM_PLANE_Y) && (cm->seq_params.enable_ist)) {
av1_write_sec_tx_type(cm, xd, tx_type, tx_size, eob, w);
}
-#endif
-//
+
#if DEBUG_EXTQUANT
fprintf(cm->fEncCoeffLog, "tx_type=%d, eob=%d\n", tx_type, eob);
#endif
@@ -1183,11 +1177,7 @@
tx_size, cm->features.reduced_tx_set_used);
if (code_rest) {
if ((mbmi->fsc_mode[xd->tree_type == CHROMA_PART] &&
-#if CONFIG_IST
get_primary_tx_type(tx_type) == IDTX &&
-#else
- tx_type == IDTX &&
-#endif // CONFIG_IST
plane == PLANE_TYPE_Y) ||
use_inter_fsc(cm, plane, tx_type, is_inter)) {
av1_write_coeffs_txb_skip(cm, x, w, blk_row, blk_col, plane,
@@ -1229,12 +1219,7 @@
// TODO(angiebird): use this function whenever it's possible
static int get_tx_type_cost(const MACROBLOCK *x, const MACROBLOCKD *xd,
int plane, TX_SIZE tx_size, TX_TYPE tx_type,
- int reduced_tx_set_used
-#if CONFIG_IST
- ,
- int eob
-#endif
-) {
+ int reduced_tx_set_used, int eob) {
if (plane > 0) return 0;
const TX_SIZE square_tx_size = txsize_sqr_map[tx_size];
@@ -1261,7 +1246,6 @@
.filter_intra_mode];
else
intra_dir = mbmi->mode;
-#if CONFIG_IST
TX_TYPE primary_tx_type = get_primary_tx_type(tx_type);
int tx_type_cost =
x->mode_costs.intra_tx_type_costs[ext_tx_set][square_tx_size]
@@ -1273,22 +1257,15 @@
[get_secondary_tx_type(tx_type)];
}
return tx_type_cost;
-#else
- return x->mode_costs.intra_tx_type_costs[ext_tx_set][square_tx_size]
- [intra_dir][tx_type];
-#endif
}
}
- }
-#if CONFIG_IST
- else if (!is_inter && !xd->lossless[xd->mi[0]->segment_id]) {
+ } else if (!is_inter && !xd->lossless[xd->mi[0]->segment_id]) {
if (block_signals_sec_tx_type(xd, tx_size, tx_type, eob) &&
xd->enable_ist) {
return x->mode_costs
.stx_flag_cost[square_tx_size][get_secondary_tx_type(tx_type)];
}
}
-#endif
return 0;
}
@@ -1349,12 +1326,8 @@
int8_t signs_buf[TX_PAD_2D];
int8_t *const signs = set_signs(signs_buf, width);
av1_txb_init_levels_signs(qcoeff, width, height, levels_buf, signs_buf);
- cost += get_tx_type_cost(x, xd, plane, tx_size, tx_type, reduced_tx_set_used
-#if CONFIG_IST
- ,
- eob
-#endif // CONFIG_IST
- );
+ cost += get_tx_type_cost(x, xd, plane, tx_size, tx_type, reduced_tx_set_used,
+ eob);
#if CONFIG_CROSS_CHROMA_TX
cost += get_cctx_type_cost(cm, x, xd, plane, tx_size, block, cctx_type);
#endif // CONFIG_CROSS_CHROMA_TX
@@ -1441,12 +1414,8 @@
av1_txb_init_levels(qcoeff, width, height, levels);
- cost += get_tx_type_cost(x, xd, plane, tx_size, tx_type, reduced_tx_set_used
-#if CONFIG_IST
- ,
- eob
-#endif
- );
+ cost += get_tx_type_cost(x, xd, plane, tx_size, tx_type, reduced_tx_set_used,
+ eob);
#if CONFIG_CROSS_CHROMA_TX
cost += get_cctx_type_cost(cm, x, xd, plane, tx_size, block, cctx_type);
#endif // CONFIG_CROSS_CHROMA_TX
@@ -1706,23 +1675,15 @@
int cost = coeff_costs->txb_skip_cost[txb_skip_ctx][0];
#endif // CONFIG_CONTEXT_DERIVATION
- cost += get_tx_type_cost(x, xd, plane, tx_size, tx_type, reduced_tx_set_used
-#if CONFIG_IST
- ,
- eob
-#endif // CONFIG_IST
- );
+ cost += get_tx_type_cost(x, xd, plane, tx_size, tx_type, reduced_tx_set_used,
+ eob);
#if CONFIG_CROSS_CHROMA_TX
cost += get_cctx_type_cost(cm, x, xd, plane, tx_size, block, cctx_type);
#endif // CONFIG_CROSS_CHROMA_TX
const MB_MODE_INFO *mbmi = xd->mi[0];
if ((mbmi->fsc_mode[xd->tree_type == CHROMA_PART] &&
-#if CONFIG_IST
get_primary_tx_type(tx_type) == IDTX && plane == PLANE_TYPE_Y) ||
-#else
- tx_type == IDTX && plane == PLANE_TYPE_Y) ||
-#endif // CONFIG_IST
use_inter_fsc(cm, plane, tx_type, is_inter_block(mbmi, xd->tree_type))) {
cost +=
av1_cost_coeffs_txb_skip_estimate(x, plane, block, tx_size, tx_type);
@@ -1839,11 +1800,7 @@
return skip_cost;
}
-#if CONFIG_IST
const TX_CLASS tx_class = tx_type_to_class[get_primary_tx_type(tx_type)];
-#else
- const TX_CLASS tx_class = tx_type_to_class[tx_type];
-#endif
#if CONFIG_PAR_HIDING
bool enable_parity_hiding = cm->features.allow_parity_hiding &&
!xd->lossless[xd->mi[0]->segment_id] &&
@@ -1853,11 +1810,7 @@
const MB_MODE_INFO *mbmi = xd->mi[0];
if ((mbmi->fsc_mode[xd->tree_type == CHROMA_PART] &&
-#if CONFIG_IST
get_primary_tx_type(tx_type) == IDTX && plane == PLANE_TYPE_Y) ||
-#else
- tx_type == IDTX && plane == PLANE_TYPE_Y) ||
-#endif // CONFIG_IST
use_inter_fsc(cm, plane, tx_type, is_inter_block(mbmi, xd->tree_type))) {
return warehouse_efficients_txb_skip(
#if CONFIG_CROSS_CHROMA_TX
@@ -1936,11 +1889,7 @@
return skip_cost;
}
-#if CONFIG_IST
const TX_CLASS tx_class = tx_type_to_class[get_primary_tx_type(tx_type)];
-#else
- const TX_CLASS tx_class = tx_type_to_class[tx_type];
-#endif
return warehouse_efficients_txb_laplacian(cm, x, plane, block, tx_size,
txb_ctx, eob, plane_type,
@@ -2986,12 +2935,8 @@
int sharpness) {
MACROBLOCKD *xd = &x->e_mbd;
const struct macroblock_plane *p = &x->plane[plane];
-#if CONFIG_IST
const SCAN_ORDER *scan_order =
get_scan(tx_size, get_primary_tx_type(tx_type));
-#else
- const SCAN_ORDER *scan_order = get_scan(tx_size, tx_type);
-#endif
const int16_t *scan = scan_order->scan;
const int shift = av1_get_tx_scale(tx_size);
int eob = p->eobs[block];
@@ -3010,11 +2955,7 @@
const AV1_COMMON *cm = &cpi->common;
const PLANE_TYPE plane_type = get_plane_type(plane);
const TX_SIZE txs_ctx = get_txsize_entropy_ctx(tx_size);
-#if CONFIG_IST
const TX_CLASS tx_class = tx_type_to_class[get_primary_tx_type(tx_type)];
-#else
- const TX_CLASS tx_class = tx_type_to_class[tx_type];
-#endif
const MB_MODE_INFO *mbmi = xd->mi[0];
const int bwl = get_txb_bwl(tx_size);
const int width = get_txb_wide(tx_size);
@@ -3282,13 +3223,8 @@
aom_free(coef_info);
#endif // CONFIG_PAR_HIDING
- const int tx_type_cost = get_tx_type_cost(x, xd, plane, tx_size, tx_type,
- cm->features.reduced_tx_set_used
-#if CONFIG_IST
- ,
- eob
-#endif
- );
+ const int tx_type_cost = get_tx_type_cost(
+ x, xd, plane, tx_size, tx_type, cm->features.reduced_tx_set_used, eob);
if (eob == 0)
accu_rate += skip_cost;
@@ -3360,12 +3296,8 @@
static void update_tx_type_count(const AV1_COMP *cpi, const AV1_COMMON *cm,
MACROBLOCKD *xd, int blk_row, int blk_col,
int plane, TX_SIZE tx_size,
- FRAME_COUNTS *counts, uint8_t allow_update_cdf
-#if CONFIG_IST_FIX_B098
- ,
- int eob
-#endif // CONFIG_IST_FIX_B098
-) {
+ FRAME_COUNTS *counts, uint8_t allow_update_cdf,
+ int eob) {
MB_MODE_INFO *mbmi = xd->mi[0];
int is_inter = is_inter_block(mbmi, xd->tree_type);
const int reduced_tx_set_used = cm->features.reduced_tx_set_used;
@@ -3384,20 +3316,12 @@
}
} else {
if (cpi->oxcf.txfm_cfg.use_intra_dct_only) {
-#if CONFIG_IST
assert(get_primary_tx_type(tx_type) == DCT_DCT);
-#else
- assert(tx_type == DCT_DCT);
-#endif
} else if (cpi->oxcf.txfm_cfg.use_intra_default_tx_only) {
const TX_TYPE default_type = get_default_tx_type(
PLANE_TYPE_Y, xd, tx_size, cpi->is_screen_content_type);
(void)default_type;
-#if CONFIG_IST
assert(get_primary_tx_type(tx_type) == default_type);
-#else
- assert(tx_type == default_type);
-#endif
}
}
@@ -3430,11 +3354,7 @@
else
intra_dir = mbmi->mode;
#if CONFIG_ENTROPY_STATS
-#if CONFIG_IST
const TX_TYPE primary_tx_type = get_primary_tx_type(tx_type);
-#else
- const TX_TYPE primary_tx_type = tx_type;
-#endif // CONFIG_IST
#if CONFIG_ATC_NEWTXSETS
++counts->intra_ext_tx[eset][txsize_sqr_map[tx_size]][intra_dir]
[av1_tx_type_to_idx(primary_tx_type, tx_set_type,
@@ -3454,16 +3374,12 @@
#else
fc->intra_ext_tx_cdf[eset][txsize_sqr_map[tx_size]][intra_dir],
#endif // CONFIG_ATC_REDUCED_TXSET
-#if CONFIG_IST
#if CONFIG_ATC_NEWTXSETS
av1_tx_type_to_idx(get_primary_tx_type(tx_type), tx_set_type,
intra_dir, av1_size_class[tx_size]),
#else
av1_ext_tx_ind_intra[tx_set_type][get_primary_tx_type(tx_type)],
#endif // CONFIG_ATC_NEWTXSETS
-#else
- av1_ext_tx_ind_intra[tx_set_type][tx_type],
-#endif
#if CONFIG_ATC_REDUCED_TXSET
cm->features.reduced_tx_set_used
? av1_num_reduced_tx_set
@@ -3471,37 +3387,25 @@
#else
av1_num_ext_tx_set_intra[tx_set_type]);
#endif // CONFIG_ATC_REDUCED_TXSET
-#if CONFIG_IST
- // Modified condition for CDF update
-#if CONFIG_IST_FIX_B098
+ // Modified condition for CDF update
if (cm->seq_params.enable_ist &&
block_signals_sec_tx_type(xd, tx_size, tx_type, eob))
-#else
- if (cm->seq_params.enable_ist)
-#endif // CONFIG_IST_FIX_B098
update_cdf(fc->stx_cdf[txsize_sqr_map[tx_size]],
(int8_t)get_secondary_tx_type(tx_type), STX_TYPES);
-#endif
}
}
}
}
-#if CONFIG_IST_FIX_B076
// CDF update for txsize_sqr_up_map[tx_size] >= TX_32X32
else if (!is_inter && cm->quant_params.base_qindex > 0 &&
!mbmi->skip_txfm[xd->tree_type == CHROMA_PART] &&
- !segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) {
- // Modified condition for CDF update
-#if CONFIG_IST_FIX_B098
- if (cm->seq_params.enable_ist &&
- block_signals_sec_tx_type(xd, tx_size, tx_type, eob))
-#else
- if (cm->seq_params.enable_ist)
-#endif // CONFIG_IST_FIX_B098
+ !segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP) &&
+ cm->seq_params.enable_ist &&
+ block_signals_sec_tx_type(xd, tx_size, tx_type, eob)) {
+ if (allow_update_cdf)
update_cdf(fc->stx_cdf[txsize_sqr_map[tx_size]],
(int8_t)get_secondary_tx_type(tx_type), STX_TYPES);
}
-#endif // CONFIG_IST_FIX_B076
}
void av1_update_and_record_txb_skip_context(int plane, int block, int blk_row,
@@ -3572,19 +3476,10 @@
int8_t *const signs = set_signs(signs_buf, width);
av1_txb_init_levels_signs(tcoeff, width, height, levels_buf, signs_buf);
update_tx_type_count(cpi, cm, xd, blk_row, blk_col, plane, tx_size,
- td->counts, allow_update_cdf
-#if CONFIG_IST_FIX_B098
- ,
- eob
-#endif // CONFIG_IST_FIX_B098
- );
+ td->counts, allow_update_cdf, eob);
const int16_t *const scan = scan_order->scan;
// record tx type usage
-#if CONFIG_IST
td->rd_counts.tx_type_used[tx_size][get_primary_tx_type(tx_type)]++;
-#else
- td->rd_counts.tx_type_used[tx_size][tx_type]++;
-#endif // CONFIG_IST
DECLARE_ALIGNED(16, int8_t, coeff_contexts[MAX_TX_SQUARE]);
av1_get_nz_map_contexts_skip(levels, scan, eob, tx_size, coeff_contexts);
for (int c = 0; c < eob; c++) {
@@ -3699,11 +3594,7 @@
av1_get_tx_type(xd, plane_type, blk_row, blk_col, tx_size,
cm->features.reduced_tx_set_used);
if ((xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART] &&
-#if CONFIG_IST
get_primary_tx_type(tx_type) == IDTX && plane == PLANE_TYPE_Y) ||
-#else
- tx_type == IDTX && plane == PLANE_TYPE_Y) ||
-#endif // CONFIG_IST
use_inter_fsc(cm, plane, tx_type,
is_inter_block(xd->mi[0], xd->tree_type))) {
av1_update_and_record_txb_skip_context(plane, block, blk_row, blk_col,
@@ -3805,26 +3696,13 @@
uint8_t *const levels = set_levels(levels_buf, width);
av1_txb_init_levels(tcoeff, width, height, levels);
update_tx_type_count(cpi, cm, xd, blk_row, blk_col, plane, tx_size,
- td->counts, allow_update_cdf
-#if CONFIG_IST_FIX_B098
- ,
- eob
-#endif // CONFIG_IST_FIX_B098
- );
+ td->counts, allow_update_cdf, eob);
-#if CONFIG_IST
const TX_CLASS tx_class = tx_type_to_class[get_primary_tx_type(tx_type)];
-#else
- const TX_CLASS tx_class = tx_type_to_class[tx_type];
-#endif
const int16_t *const scan = scan_order->scan;
// record tx type usage
-#if CONFIG_IST
td->rd_counts.tx_type_used[tx_size][get_primary_tx_type(tx_type)]++;
-#else
- td->rd_counts.tx_type_used[tx_size][tx_type]++;
-#endif
#if CONFIG_ENTROPY_STATS
av1_update_eob_context(cdf_idx, eob, tx_size, tx_class, plane_type, ec_ctx,
diff --git a/av1/encoder/hybrid_fwd_txfm.c b/av1/encoder/hybrid_fwd_txfm.c
index 2f61c72..5cbea4f 100644
--- a/av1/encoder/hybrid_fwd_txfm.c
+++ b/av1/encoder/hybrid_fwd_txfm.c
@@ -16,9 +16,7 @@
#include "av1/common/idct.h"
#include "av1/encoder/hybrid_fwd_txfm.h"
-#if CONFIG_IST
#include "av1/common/scan.h"
-#endif
/* 4-point reversible, orthonormal Walsh-Hadamard in 3.5 adds, 0.5 shifts per
pixel. */
@@ -333,7 +331,6 @@
}
#endif // CONFIG_CROSS_CHROMA_TX
-#if CONFIG_IST
void av1_fwd_stxfm(tran_low_t *coeff, TxfmParam *txfm_param) {
const TX_TYPE stx_type = txfm_param->sec_tx_type;
@@ -350,16 +347,10 @@
const int log2width = tx_size_wide_log2[txfm_param->tx_size];
const int sb_size = (width >= 8 && height >= 8) ? 8 : 4;
const int16_t *scan_order_in;
-#if CONFIG_IST_FIX_B076
// Align scan order of IST with primary transform scan order
const SCAN_ORDER *scan_order_out =
get_scan(txfm_param->tx_size, txfm_param->tx_type);
const int16_t *const scan = scan_order_out->scan;
-#else
- const int16_t *scan_order_out = (sb_size == 4)
- ? stx_scan_orders_4x4[log2width - 2]
- : stx_scan_orders_8x8[log2width - 2];
-#endif // CONFIG_IST_FIX_B076
tran_low_t buf0[64] = { 0 }, buf1[64] = { 0 };
tran_low_t *tmp = buf0;
tran_low_t *src = coeff;
@@ -387,13 +378,8 @@
memset(coeff, 0, width * height * sizeof(tran_low_t));
tmp = buf1;
for (int i = 0; i < sb_size * sb_size; i++) {
-#if CONFIG_IST_FIX_B076
// Align scan order of IST with primary transform scan order
coeff[scan[i]] = *tmp++;
-#else
- coeff[scan_order_out[i]] = *tmp++;
-#endif // CONFIG_IST_FIX_B076
}
}
}
-#endif
diff --git a/av1/encoder/hybrid_fwd_txfm.h b/av1/encoder/hybrid_fwd_txfm.h
index 357ae2f..aeef3ef 100644
--- a/av1/encoder/hybrid_fwd_txfm.h
+++ b/av1/encoder/hybrid_fwd_txfm.h
@@ -30,9 +30,7 @@
TX_SIZE tx_size, CctxType cctx_type);
#endif // CONFIG_CROSS_CHROMA_TX
-#if CONFIG_IST
void av1_fwd_stxfm(tran_low_t *coeff, TxfmParam *txfm_param);
-#endif
#ifdef __cplusplus
} // extern "C"
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c
index b346a7a..72f42e3 100644
--- a/av1/encoder/rd.c
+++ b/av1/encoder/rd.c
@@ -364,12 +364,10 @@
}
#endif // CONFIG_BVP_IMPROVEMENT
-#if CONFIG_IST
for (i = 0; i < TX_SIZES; ++i) {
av1_cost_tokens_from_cdf(mode_costs->stx_flag_cost[i], fc->stx_cdf[i],
NULL);
}
-#endif // CONFIG_IST
#if CONFIG_CROSS_CHROMA_TX
for (i = 0; i < EXT_TX_SIZES; ++i) {
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index ac68254..7edbf48 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -391,9 +391,7 @@
sf->tx_sf.intra_tx_size_search_init_depth_sqr = 1;
sf->tx_sf.model_based_prune_tx_search_level = 1;
sf->tx_sf.tx_type_search.use_reduced_intra_txset = 1;
-#if CONFIG_IST
sf->tx_sf.tx_type_search.skip_stx_search = 0;
-#endif
if (cpi->twopass.fr_content_type == FC_HIGHMOTION ||
cpi->is_screen_content_type) {
@@ -491,9 +489,7 @@
sf->inter_sf.selective_ref_frame = 3;
// TODO(Sachin): Enable/Enhance this speed feature for speed 2 & 3
-#if CONFIG_IST
sf->tx_sf.tx_type_search.skip_stx_search = 1;
-#endif
sf->intra_sf.disable_smooth_intra =
!frame_is_intra_only(&cpi->common) || (cpi->rc.frames_to_key != 1);
diff --git a/av1/encoder/speed_features.h b/av1/encoder/speed_features.h
index c035d93..54f139e 100644
--- a/av1/encoder/speed_features.h
+++ b/av1/encoder/speed_features.h
@@ -233,10 +233,8 @@
// mode evaluation and disables tx type mode pruning for winner mode
// processing.
int winner_mode_tx_type_pruning;
-#if CONFIG_IST
// Speed feature to disable intra secondary transform
int skip_stx_search;
-#endif
} TX_TYPE_SEARCH;
enum {
diff --git a/av1/encoder/tpl_model.c b/av1/encoder/tpl_model.c
index 9c4b226..e6ba250 100644
--- a/av1/encoder/tpl_model.c
+++ b/av1/encoder/tpl_model.c
@@ -65,9 +65,7 @@
int bit_depth) {
TxfmParam txfm_param;
txfm_param.tx_type = DCT_DCT;
-#if CONFIG_IST
txfm_param.sec_tx_type = 0;
-#endif
txfm_param.tx_size = tx_size;
txfm_param.lossless = 0;
txfm_param.tx_set_type = EXT_TX_SET_ALL16;
diff --git a/av1/encoder/tx_search.c b/av1/encoder/tx_search.c
index f755de1..26da00c 100644
--- a/av1/encoder/tx_search.c
+++ b/av1/encoder/tx_search.c
@@ -1117,11 +1117,7 @@
if (do_quant) {
TxfmParam txfm_param_intra;
QUANT_PARAM quant_param_intra;
- av1_setup_xform(cm, x,
-#if CONFIG_IST
- plane,
-#endif
- tx_size, best_tx_type,
+ av1_setup_xform(cm, x, plane, tx_size, best_tx_type,
#if CONFIG_CROSS_CHROMA_TX
cctx_type,
#endif // CONFIG_CROSS_CHROMA_TX
@@ -1254,11 +1250,7 @@
const int dst_idx = (blk_row * dst_stride + blk_col) << MI_SIZE_LOG2;
const uint16_t *src = &x->plane[plane].src.buf[src_idx];
const uint16_t *dst = &xd->plane[plane].dst.buf[dst_idx];
-#if CONFIG_IST
tran_low_t *dqcoeff = p->dqcoeff + BLOCK_OFFSET(block);
-#else
- const tran_low_t *dqcoeff = p->dqcoeff + BLOCK_OFFSET(block);
-#endif
assert(cpi != NULL);
assert(tx_size_wide_log2[0] == tx_size_high_log2[0]);
@@ -1524,11 +1516,7 @@
QUANT_PARAM quant_param;
TxfmParam txfm_param;
- av1_setup_xform(cm, x,
-#if CONFIG_IST
- plane,
-#endif
- tx_size, DCT_DCT,
+ av1_setup_xform(cm, x, plane, tx_size, DCT_DCT,
#if CONFIG_CROSS_CHROMA_TX
CCTX_NONE,
#endif // CONFIG_CROSS_CHROMA_TX
@@ -1654,11 +1642,7 @@
TxfmParam txfm_param;
QUANT_PARAM quant_param;
- av1_setup_xform(cm, x,
-#if CONFIG_IST
- plane,
-#endif
- tx_size, DCT_DCT,
+ av1_setup_xform(cm, x, plane, tx_size, DCT_DCT,
#if CONFIG_CROSS_CHROMA_TX
CCTX_NONE,
#endif // CONFIG_CROSS_CHROMA_TX
@@ -2576,11 +2560,9 @@
// Therefore transform domain distortion is not valid for these
// transform sizes.
(txsize_sqr_up_map[tx_size] != TX_64X64) &&
-#if CONFIG_IST
// Use pixel domain distortion for IST
// TODO(any): Make IST compatible with tx domain distortion
!cm->seq_params.enable_ist &&
-#endif
// Use pixel domain distortion for DC only blocks
!dc_only_blk;
// Flag to indicate if an extra calculation of distortion in the pixel domain
@@ -2598,11 +2580,7 @@
TxfmParam txfm_param;
QUANT_PARAM quant_param;
int skip_trellis_based_on_satd[TX_TYPES] = { 0 };
- av1_setup_xform(cm, x,
-#if CONFIG_IST
- plane,
-#endif
- tx_size, DCT_DCT,
+ av1_setup_xform(cm, x, plane, tx_size, DCT_DCT,
#if CONFIG_CROSS_CHROMA_TX
CCTX_NONE,
#endif // CONFIG_CROSS_CHROMA_TX
@@ -2635,7 +2613,6 @@
plane == PLANE_TYPE_Y) {
continue;
}
-#if CONFIG_IST
bool skip_idx = false;
xd->enable_ist = cm->seq_params.enable_ist &&
!cpi->sf.tx_sf.tx_type_search.skip_stx_search &&
@@ -2658,11 +2635,6 @@
tx_type += (stx << 4);
txfm_param.tx_type = get_primary_tx_type(tx_type);
txfm_param.sec_tx_type = stx;
-#else
- const TX_TYPE tx_type = (TX_TYPE)txk_map[idx];
- if (!(allowed_tx_mask & (1 << tx_type))) continue;
- txfm_param.tx_type = tx_type;
-#endif
if (av1_use_qmatrix(&cm->quant_params, xd, mbmi->segment_id)) {
av1_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, tx_type,
&quant_param);
@@ -2672,28 +2644,19 @@
av1_invalid_rd_stats(&this_rd_stats);
if (!dc_only_blk)
-#if CONFIG_IST
av1_xform(x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param,
1);
-#else
- av1_xform(x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param);
-#endif
else
av1_xform_dc_only(x, plane, block, &txfm_param, per_px_mean);
#if CONFIG_CROSS_CHROMA_TX
*coeffs_available = 1;
#endif // CONFIG_CROSS_CHROMA_TX
-#if CONFIG_IST
skip_trellis_based_on_satd[txfm_param.tx_type] =
- skip_trellis_opt_based_on_satd(
-#else
- skip_trellis_based_on_satd[tx_type] = skip_trellis_opt_based_on_satd(
-#endif
- x, &quant_param, plane, block, tx_size,
- cpi->oxcf.q_cfg.quant_b_adapt, qstep,
- txfm_params->coeff_opt_satd_threshold, skip_trellis_in,
- dc_only_blk);
+ skip_trellis_opt_based_on_satd(x, &quant_param, plane, block, tx_size,
+ cpi->oxcf.q_cfg.quant_b_adapt, qstep,
+ txfm_params->coeff_opt_satd_threshold,
+ skip_trellis_in, dc_only_blk);
uint8_t fsc_mode_in = (mbmi->fsc_mode[xd->tree_type == CHROMA_PART] &&
plane == PLANE_TYPE_Y) ||
@@ -2701,11 +2664,7 @@
if (fsc_mode_in) quant_param.use_optimize_b = false;
av1_quant(x, plane, block, &txfm_param, &quant_param);
if (fsc_mode_in) {
-#if CONFIG_IST
if (get_primary_tx_type(tx_type) == IDTX) {
-#else
- if (tx_type == IDTX) {
-#endif // CONFIG_IST
uint16_t *const eob = &p->eobs[block];
if (*eob != 0) *eob = av1_get_max_eob(txfm_param.tx_size);
}
@@ -2851,9 +2810,7 @@
if (cpi->sf.tx_sf.adaptive_txb_search_level) {
if ((best_rd - (best_rd >> cpi->sf.tx_sf.adaptive_txb_search_level)) >
ref_best_rd) {
-#if CONFIG_IST
skip_idx = true;
-#endif
break;
}
}
@@ -2861,26 +2818,18 @@
// Terminate transform type search if the block has been quantized to
// all zero.
if (cpi->sf.tx_sf.tx_type_search.skip_tx_search && !best_eob) {
-#if CONFIG_IST
skip_idx = true;
-#endif
break;
}
-#if CONFIG_IST
}
if (skip_idx) break;
-#endif
}
best_rd_stats->skip_txfm = best_eob == 0;
if (plane == 0) update_txk_array(xd, blk_row, blk_col, tx_size, best_tx_type);
x->plane[plane].txb_entropy_ctx[block] = best_txb_ctx;
x->plane[plane].eobs[block] = best_eob;
-#if CONFIG_IST
skip_trellis = skip_trellis_based_on_satd[get_primary_tx_type(best_tx_type)];
-#else
- skip_trellis = skip_trellis_based_on_satd[best_tx_type];
-#endif
skip_trellis &=
(mbmi->fsc_mode[xd->tree_type == CHROMA_PART] && plane == PLANE_TYPE_Y) ||
use_inter_fsc(cm, plane, best_tx_type, is_inter);
@@ -2948,11 +2897,7 @@
av1_get_tx_type(xd, PLANE_TYPE_UV, blk_row, blk_col, tx_size,
cpi->common.features.reduced_tx_set_used);
TxfmParam txfm_param;
- av1_setup_xform(cm, x,
-#if CONFIG_IST
- AOM_PLANE_U,
-#endif
- tx_size, tx_type, CCTX_NONE, &txfm_param);
+ av1_setup_xform(cm, x, AOM_PLANE_U, tx_size, tx_type, CCTX_NONE, &txfm_param);
QUANT_PARAM quant_param;
int xform_quant_idx =
skip_trellis
@@ -2962,17 +2907,10 @@
cpi->oxcf.q_cfg.quant_b_adapt, &quant_param);
if (!uv_coeffs_available) {
-#if CONFIG_IST
av1_xform(x, AOM_PLANE_U, block, blk_row, blk_col, plane_bsize, &txfm_param,
0);
av1_xform(x, AOM_PLANE_V, block, blk_row, blk_col, plane_bsize, &txfm_param,
0);
-#else
- av1_xform(x, AOM_PLANE_U, block, blk_row, blk_col, plane_bsize,
- &txfm_param);
- av1_xform(x, AOM_PLANE_V, block, blk_row, blk_col, plane_bsize,
- &txfm_param);
-#endif // CONFIG_IST
if (av1_use_qmatrix(&cm->quant_params, xd, mbmi->segment_id))
av1_setup_qmatrix(&cm->quant_params, xd, AOM_PLANE_U, tx_size, tx_type,
&quant_param);
diff --git a/av1/encoder/x86/highbd_fwd_txfm_sse4.c b/av1/encoder/x86/highbd_fwd_txfm_sse4.c
index 44d8797..703ddee 100644
--- a/av1/encoder/x86/highbd_fwd_txfm_sse4.c
+++ b/av1/encoder/x86/highbd_fwd_txfm_sse4.c
@@ -2605,7 +2605,6 @@
}
// Forward secondary transform
-#if CONFIG_IST
void fwd_stxfm_sse4_1(tran_low_t *src, tran_low_t *dst,
const PREDICTION_MODE mode, const uint8_t stx_idx,
const int size) {
@@ -2644,4 +2643,3 @@
kernel += (size * size);
}
}
-#endif
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake
index 58a3764..54bc487 100644
--- a/build/cmake/aom_config_defaults.cmake
+++ b/build/cmake/aom_config_defaults.cmake
@@ -166,8 +166,6 @@
"AV2 experiment flag to disable ORIP for DC mode.")
set_aom_config_var(CONFIG_ORIP_NONDC_DISABLED 0
"AV2 experiment flag to disable ORIP for non-DC modes.")
-set_aom_config_var(CONFIG_IST 1 NUMBER
- "AV2 experiment flag to enable intra secondary transform.")
set_aom_config_var(CONFIG_SMVP_IMPROVEMENT 1 "Enable SMVP improvement")
set_aom_config_var(CONFIG_TMVP_IMPROVEMENT 1 "Enable TMVP improvement")
set_aom_config_var(CONFIG_REF_MV_BANK 1 "AV2 ref mv bank experiment flag")
@@ -181,8 +179,6 @@
set_aom_config_var(CONFIG_AIMC 1 "AV2 adaptive intra mode coding flag.")
set_aom_config_var(CONFIG_COMPLEXITY_SCALABLE_MVP 1
"Enable complexity scalable mvp")
-set_aom_config_var(CONFIG_IST_FIX_B076 1
- "AV2 experiment flag to enable IST scan alignment.")
set_aom_config_var(
CONFIG_CONTEXT_DERIVATION 1
"AV2 experiment flag to enable modified context derivation : CWG-B065.")
@@ -206,9 +202,6 @@
# Source of throughput analysis : CWG-B065
set_aom_config_var(CONFIG_THROUGHPUT_ANALYSIS 0
"AV2 experiment flag to measure throughput.")
-set_aom_config_var(
- CONFIG_IST_FIX_B098 1
- "AV2 experiment flag to enable IST SIMD fix and further encoder updates.")
set_aom_config_var(CONFIG_IBC_SR_EXT 1 "Enables IntraBC search range extension")
set_aom_config_var(CONFIG_BVP_IMPROVEMENT 1 "Enables BVP improvements")
set_aom_config_var(CONFIG_BVCOST_UPDATE 1 "Enables sb-level update for bv cost")
diff --git a/build/cmake/aom_experiment_deps.cmake b/build/cmake/aom_experiment_deps.cmake
index 80981a1..760ed4b 100644
--- a/build/cmake/aom_experiment_deps.cmake
+++ b/build/cmake/aom_experiment_deps.cmake
@@ -25,24 +25,12 @@
change_config_and_warn(CONFIG_DIST_8X8 0 CONFIG_MULTITHREAD)
endif()
- # CONFIG_IST_FIX_B076 requires CONFIG_IST. If CONFIG_IST is off, we also turn
- # off CONFIG_IST_FIX_B076.
- if(NOT CONFIG_IST AND CONFIG_IST_FIX_B076)
- change_config_and_warn(CONFIG_IST_FIX_B076 0 !CONFIG_IST)
- endif()
-
# CONFIG_THROUGHPUT_ANALYSIS requires CONFIG_ACCOUNTING. If CONFIG_ACCOUNTING
# is off, we also turn off CONFIG_THROUGHPUT_ANALYSIS.
if(NOT CONFIG_ACCOUNTING AND CONFIG_THROUGHPUT_ANALYSIS)
change_config_and_warn(CONFIG_THROUGHPUT_ANALYSIS 0 !CONFIG_ACCOUNTING)
endif()
- # CONFIG_IST_FIX_B098 requires CONFIG_IST. If CONFIG_IST is off, we also turn
- # off CONFIG_IST_FIX_B098.
- if(NOT CONFIG_IST AND CONFIG_IST_FIX_B098)
- change_config_and_warn(CONFIG_IST_FIX_B098 0 !CONFIG_IST)
- endif()
-
# CONFIG_CCSO_EXT is dependent on CONFIG_CCSO. If CONFIG_CCSO is off,
# CONFIG_CCSO_EXT needs to be turned off.
if(NOT CONFIG_CCSO AND CONFIG_CCSO_EXT)
diff --git a/common/args.c b/common/args.c
index b4fc0c5..ffec73b 100644
--- a/common/args.c
+++ b/common/args.c
@@ -100,9 +100,7 @@
#if CONFIG_ORIP
GET_PARAMS(enable_orip);
#endif
-#if CONFIG_IST
GET_PARAMS(enable_ist);
-#endif
#if CONFIG_CROSS_CHROMA_TX
GET_PARAMS(enable_cctx);
#endif // CONFIG_CROSS_CHROMA_TX
diff --git a/common/av1_config.c b/common/av1_config.c
index 297f7a0..e8a9215 100644
--- a/common/av1_config.c
+++ b/common/av1_config.c
@@ -245,9 +245,7 @@
}
AV1C_READ_BIT_OR_RETURN_ERROR(explicit_ref_frame_map);
AV1C_READ_BIT_OR_RETURN_ERROR(enable_sdp);
-#if CONFIG_IST
AV1C_READ_BIT_OR_RETURN_ERROR(enable_ist);
-#endif
#if CONFIG_CROSS_CHROMA_TX
AV1C_READ_BIT_OR_RETURN_ERROR(enable_cctx);
#endif // CONFIG_CROSS_CHROMA_TX