Removal of CONFIG_FORWARDSKIP macro
This MR removes all the compile-time macros for FSC coding. Note that the macro controls a normative signaling change for IDTX that becomes part of the anchor and cannot be controlled by the run-time flag --enable-fsc=1/0. The tool on/off testing for FSC will no longer capture full FSC behavior since (--enable-fsc) only enables/disables the residual coding mode.
diff --git a/aom/aom_encoder.h b/aom/aom_encoder.h
index a34aa43..0364bf2 100644
--- a/aom/aom_encoder.h
+++ b/aom/aom_encoder.h
@@ -309,12 +309,10 @@
*/
unsigned int enable_bawp;
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
/*!\brief enable Forward skip coding
*
*/
unsigned int enable_fsc;
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
/*!\brief enable Offset based refinement of Intra prediction
*
diff --git a/apps/aomenc.c b/apps/aomenc.c
index 313fce3..5ce133a 100644
--- a/apps/aomenc.c
+++ b/apps/aomenc.c
@@ -443,9 +443,7 @@
#if CONFIG_BAWP
&g_av1_codec_arg_defs.enable_bawp,
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
&g_av1_codec_arg_defs.enable_fsc,
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
&g_av1_codec_arg_defs.enable_orip,
#endif
@@ -645,9 +643,7 @@
#if CONFIG_BAWP
config->enable_bawp = 1;
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
config->enable_fsc = 1;
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
config->enable_orip = 1;
#endif
@@ -1514,20 +1510,15 @@
" : "
"EdgeFilter (%d), PaethPredictor (%d)"
", MRLS(%d)"
-#if CONFIG_FORWARDSKIP
", FSC(%d)"
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
", ORIP(%d)"
#endif // CONFIG_CONFIG_ORIP
", IBP(%d)"
"\n",
encoder_cfg->enable_intra_edge_filter,
- encoder_cfg->enable_paeth_intra, encoder_cfg->enable_mrls
-#if CONFIG_FORWARDSKIP
- ,
+ encoder_cfg->enable_paeth_intra, encoder_cfg->enable_mrls,
encoder_cfg->enable_fsc
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
,
encoder_cfg->enable_orip
diff --git a/av1/arg_defs.c b/av1/arg_defs.c
index 555bf6b..079c539 100644
--- a/av1/arg_defs.c
+++ b/av1/arg_defs.c
@@ -411,11 +411,9 @@
"Enable block adaptive weighted prediction (BAWP)"
"(0: false, 1: true (default))"),
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
.enable_fsc = ARG_DEF(NULL, "enable-fsc", 1,
"Enable forward skip coding"
"(0: false, 1: true (default))"),
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
.enable_orip = ARG_DEF(NULL, "enable-orip", 1,
"Enable Offset Based refinement of intra prediction"
diff --git a/av1/arg_defs.h b/av1/arg_defs.h
index 49b3ac5..bd4e389 100644
--- a/av1/arg_defs.h
+++ b/av1/arg_defs.h
@@ -163,9 +163,7 @@
#if CONFIG_BAWP
arg_def_t enable_bawp;
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
arg_def_t enable_fsc;
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
arg_def_t enable_orip;
#endif
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index a11e723..5a33fa3 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -137,9 +137,7 @@
#if CONFIG_BAWP
int enable_bawp; // enable block adaptive weighted prediction
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
- int enable_fsc; // enable forward skip coding
-#endif // CONFIG_FORWARDSKIP
+ int enable_fsc; // enable forward skip coding
#if CONFIG_ORIP
int enable_orip; // enable ORIP
#endif // CONFIG_ORIP
@@ -472,9 +470,7 @@
#if CONFIG_BAWP
1, // enable block adaptive weighted prediction (BAWP)
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
1, // enable forward skip coding
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
1, // enable ORIP
#endif // CONFIG_ORIP
@@ -968,9 +964,7 @@
#if CONFIG_BAWP
cfg->enable_bawp = extra_cfg->enable_bawp;
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
cfg->enable_fsc = extra_cfg->enable_fsc;
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
cfg->enable_orip = extra_cfg->enable_orip;
#endif
@@ -1086,9 +1080,7 @@
#if CONFIG_BAWP
extra_cfg->enable_bawp = cfg->enable_bawp;
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
extra_cfg->enable_fsc = cfg->enable_fsc;
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
extra_cfg->enable_orip = cfg->enable_orip;
#endif
@@ -1660,9 +1652,7 @@
intra_mode_cfg->enable_paeth_intra = extra_cfg->enable_paeth_intra;
intra_mode_cfg->enable_cfl_intra = extra_cfg->enable_cfl_intra;
intra_mode_cfg->enable_mrls = extra_cfg->enable_mrls;
-#if CONFIG_FORWARDSKIP
intra_mode_cfg->enable_fsc = extra_cfg->enable_fsc;
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
intra_mode_cfg->enable_orip = extra_cfg->enable_orip;
#endif
@@ -3824,11 +3814,9 @@
err_string)) {
extra_cfg.enable_bawp = arg_parse_int_helper(&arg, err_string);
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
} else if (arg_match_helper(&arg, &g_av1_codec_arg_defs.enable_fsc, argv,
err_string)) {
extra_cfg.enable_fsc = arg_parse_int_helper(&arg, err_string);
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
} else if (arg_match_helper(&arg, &g_av1_codec_arg_defs.enable_orip, argv,
err_string)) {
@@ -4313,9 +4301,7 @@
#if CONFIG_BAWP
1,
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
1,
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
1,
#endif
diff --git a/av1/common/av1_common_int.h b/av1/common/av1_common_int.h
index 4673ed3..99e325b 100644
--- a/av1/common/av1_common_int.h
+++ b/av1/common/av1_common_int.h
@@ -435,9 +435,7 @@
#if CONFIG_BAWP
uint8_t enable_bawp; // enables/disables block adaptive weighted prediction
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
- uint8_t enable_fsc; // enables/disables forward skip coding
-#endif // CONFIG_FORWARDSKIP
+ uint8_t enable_fsc; // enables/disables forward skip coding
uint8_t enable_filter_intra; // enables/disables filterintra
uint8_t enable_intra_edge_filter; // enables/disables edge upsampling
@@ -2241,7 +2239,6 @@
#endif // CONFIG_C043_MVP_IMPROVEMENTS
}
-#if CONFIG_FORWARDSKIP
static INLINE int get_fsc_mode_ctx(const MACROBLOCKD *xd, const int is_key) {
int ctx = 0;
if (is_key) {
@@ -2267,7 +2264,6 @@
const int ctx = get_fsc_mode_ctx(xd, is_key);
return tile_ctx->fsc_mode_cdf[ctx][fsc_size_group];
}
-#endif // CONFIG_FORWARDSKIP
#if !CONFIG_AIMC
static INLINE int get_y_mode_ctx(const MB_MODE_INFO *neighbor) {
diff --git a/av1/common/av1_rtcd_defs.pl b/av1/common/av1_rtcd_defs.pl
index c1ab084..16c257a 100644
--- a/av1/common/av1_rtcd_defs.pl
+++ b/av1/common/av1_rtcd_defs.pl
@@ -336,12 +336,10 @@
# End av1_high encoder functions
# txb
- if (aom_config("CONFIG_FORWARDSKIP") eq "yes") {
- add_proto qw/void av1_txb_init_levels_skip/, "const tran_low_t *const coeff, const int width, const int height, uint8_t *const levels";
- specialize qw/av1_txb_init_levels_skip sse4_1 avx2/;
- add_proto qw/void av1_get_nz_map_contexts_skip/, "const uint8_t *const levels, const int16_t *const scan, const uint16_t eob, const TX_SIZE tx_size, int8_t *const coeff_contexts";
- specialize qw/av1_get_nz_map_contexts_skip sse2/;
- }
+ add_proto qw/void av1_txb_init_levels_skip/, "const tran_low_t *const coeff, const int width, const int height, uint8_t *const levels";
+ specialize qw/av1_txb_init_levels_skip sse4_1 avx2/;
+ add_proto qw/void av1_get_nz_map_contexts_skip/, "const uint8_t *const levels, const int16_t *const scan, const uint16_t eob, const TX_SIZE tx_size, int8_t *const coeff_contexts";
+ specialize qw/av1_get_nz_map_contexts_skip sse2/;
if (aom_config("CONFIG_ATC_COEFCODING") eq "yes") {
add_proto qw/void av1_get_nz_map_contexts/, "const uint8_t *const levels, const int16_t *const scan, const uint16_t eob, const TX_SIZE tx_size, const TX_CLASS tx_class, int8_t *const coeff_contexts, const int plane";
@@ -350,10 +348,8 @@
specialize qw/av1_get_nz_map_contexts sse2 neon/;
}
- if (aom_config("CONFIG_FORWARDSKIP") eq "yes") {
- add_proto qw/void av1_txb_init_levels_signs/, "const tran_low_t *const coeff, const int width, const int height, uint8_t *const levels, int8_t *const signs";
- specialize qw/av1_txb_init_levels_signs sse4_1 avx2/;
- }
+ add_proto qw/void av1_txb_init_levels_signs/, "const tran_low_t *const coeff, const int width, const int height, uint8_t *const levels, int8_t *const signs";
+ specialize qw/av1_txb_init_levels_signs sse4_1 avx2/;
add_proto qw/void av1_txb_init_levels/, "const tran_low_t *const coeff, const int width, const int height, uint8_t *const levels";
specialize qw/av1_txb_init_levels sse4_1 avx2 neon/;
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index ba3925f..4a7e9bb 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -425,10 +425,8 @@
* modes for JOINT_AMVDNEWMV mode is 0, 1, and 2.*/
int jmvd_scale_mode;
#endif // CONFIG_IMPROVED_JMVD
-#if CONFIG_FORWARDSKIP
/*! \brief The forward skip mode for the current coding block. */
uint8_t fsc_mode[2];
-#endif // CONFIG_FORWARDSKIP
/*! \brief The UV mode when intra is used */
UV_PREDICTION_MODE uv_mode;
/*! \brief The q index for the current coding block. */
@@ -2249,7 +2247,6 @@
return bsize > BLOCK_4X4;
}
-#if CONFIG_FORWARDSKIP
// Number of transform types in each set type for intra blocks
static const int av1_num_ext_tx_set_intra[EXT_TX_SET_TYPES] = { 1, 1, 4,
6, 11, 15,
@@ -2262,8 +2259,6 @@
static const int av1_num_reduced_tx_set = 2;
#endif // CONFIG_ATC_NEWTXSETS && CONFIG_ATC_REDUCED_TXSET
-#endif // CONFIG_FORWARDSKIP
-
// Number of transform types in each set type
static const int av1_num_ext_tx_set[EXT_TX_SET_TYPES] = {
1, 2, 5, 7, 12, 16,
@@ -2492,12 +2487,8 @@
int use_reduced_set) {
const int set_type =
av1_get_ext_tx_set_type(tx_size, is_inter, use_reduced_set);
-#if CONFIG_FORWARDSKIP
return is_inter ? av1_num_ext_tx_set[set_type]
: av1_num_ext_tx_set_intra[set_type];
-#else
- return av1_num_ext_tx_set[set_type];
-#endif // CONFIG_FORWARDSKIP
}
#define TXSIZEMAX(t1, t2) (tx_size_2d[(t1)] >= tx_size_2d[(t2)] ? (t1) : (t2))
@@ -2954,12 +2945,10 @@
#endif // CONFIG_IST
return DCT_DCT;
}
-#if CONFIG_FORWARDSKIP
if (xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART] &&
!is_inter_block(mbmi, xd->tree_type) && plane_type == PLANE_TYPE_Y) {
return IDTX;
}
-#endif // CONFIG_FORWARDSKIP
TX_TYPE tx_type;
if (plane_type == PLANE_TYPE_Y) {
tx_type = xd->tx_type_map[blk_row * xd->tx_type_map_stride + blk_col];
diff --git a/av1/common/common_data.h b/av1/common/common_data.h
index 8d0b222..3b8e73d 100644
--- a/av1/common/common_data.h
+++ b/av1/common/common_data.h
@@ -65,11 +65,9 @@
0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 0, 0, 1, 1, 2, 2
};
-#if CONFIG_FORWARDSKIP
static const uint8_t fsc_bsize_groups[BLOCK_SIZES_ALL] = {
0, 1, 1, 2, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 3, 5, 5, 5, 5
};
-#endif // CONFIG_FORWARDSKIP
static const uint8_t num_pels_log2_lookup[BLOCK_SIZES_ALL] = {
4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 11, 11, 12, 13, 13, 14, 6, 6, 8, 8, 10, 10
diff --git a/av1/common/entropy.c b/av1/common/entropy.c
index 34fd0fb..b8567d8 100644
--- a/av1/common/entropy.c
+++ b/av1/common/entropy.c
@@ -54,13 +54,11 @@
#endif // CONFIG_ATC_COEFCODING
av1_copy(cm->fc->coeff_br_cdf, av1_default_coeff_lps_multi_cdfs[index]);
av1_copy(cm->fc->coeff_base_cdf, av1_default_coeff_base_multi_cdfs[index]);
-#if CONFIG_FORWARDSKIP
av1_copy(cm->fc->idtx_sign_cdf, av1_default_idtx_sign_cdfs[index]);
av1_copy(cm->fc->coeff_base_cdf_idtx,
av1_default_coeff_base_multi_cdfs_idtx[index]);
av1_copy(cm->fc->coeff_br_cdf_idtx,
av1_default_coeff_lps_multi_cdfs_idtx[index]);
-#endif // CONFIG_FORWARDSKIP
av1_copy(cm->fc->coeff_base_eob_cdf,
av1_default_coeff_base_eob_multi_cdfs[index]);
av1_copy(cm->fc->eob_flag_cdf16, av1_default_eob_multi16_cdfs[index]);
@@ -145,11 +143,9 @@
RESET_CDF_COUNTER(fc->coeff_br_lf_cdf, BR_CDF_SIZE);
#endif // CONFIG_ATC_COEFCODING
RESET_CDF_COUNTER(fc->coeff_base_cdf, 4);
-#if CONFIG_FORWARDSKIP
RESET_CDF_COUNTER(fc->idtx_sign_cdf, 2);
RESET_CDF_COUNTER(fc->coeff_base_cdf_idtx, 4);
RESET_CDF_COUNTER(fc->coeff_br_cdf_idtx, BR_CDF_SIZE);
-#endif // CONFIG_FORWARDSKIP
RESET_CDF_COUNTER(fc->coeff_br_cdf, BR_CDF_SIZE);
RESET_CDF_COUNTER(fc->inter_single_mode_cdf, INTER_SINGLE_MODES);
#if CONFIG_WARPMV
@@ -256,9 +252,7 @@
RESET_CDF_COUNTER(fc->seg.pred_cdf, 2);
RESET_CDF_COUNTER(fc->seg.spatial_pred_seg_cdf, MAX_SEGMENTS);
RESET_CDF_COUNTER(fc->mrl_index_cdf, MRL_LINE_NUMBER);
-#if CONFIG_FORWARDSKIP
RESET_CDF_COUNTER(fc->fsc_mode_cdf, FSC_MODES);
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_IMPROVED_CFL
RESET_CDF_COUNTER(fc->cfl_index_cdf, CFL_TYPE_COUNT);
diff --git a/av1/common/entropy.h b/av1/common/entropy.h
index 4bb546e..e6319aa 100644
--- a/av1/common/entropy.h
+++ b/av1/common/entropy.h
@@ -34,17 +34,11 @@
#define V_TXB_SKIP_CONTEXT_OFFSET 6
#endif // CONFIG_CONTEXT_DERIVATION
-#if CONFIG_FORWARDSKIP
#define TXB_SKIP_CONTEXTS 20
-#else
-#define TXB_SKIP_CONTEXTS 13
-#endif // CONFIG_FORWARDSKIP
-#if CONFIG_FORWARDSKIP
#define IDTX_SIGN_CONTEXTS 9
#define IDTX_SIG_COEF_CONTEXTS 14
#define IDTX_LEVEL_CONTEXTS 14
-#endif // CONFIG_FORWARDSKIP
#define EOB_COEF_CONTEXTS 9
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index b4f0ad1..81e8d7b 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -79,7 +79,6 @@
AOM_CDF4(24756, 29049, 31092)
};
-#if CONFIG_FORWARDSKIP
#if CONFIG_NEW_CONTEXT_MODELING
static const aom_cdf_prob
default_fsc_mode_cdf[FSC_MODE_CONTEXTS][FSC_BSIZE_CONTEXTS]
@@ -127,7 +126,6 @@
{ AOM_CDF2(32203) },
{ AOM_CDF2(32283) } } };
#endif // CONFIG_NEW_CONTEXT_MODELING
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_IMPROVED_CFL
static const aom_cdf_prob default_cfl_index_cdf[CDF_SIZE(CFL_TYPE_COUNT)] = {
@@ -996,7 +994,6 @@
},
#endif // CONFIG_ATC_REDUCED_TXSET
#else
-#if CONFIG_FORWARDSKIP
{
{
{ AOM_CDF6(4509, 4513, 6614, 19602, 25868) },
@@ -1121,132 +1118,6 @@
{ AOM_CDF4(8192, 16384, 24576) },
},
}
-#else
- {
- {
- { AOM_CDF7(1535, 8035, 9461, 12751, 23467, 27825) },
- { AOM_CDF7(564, 3335, 9709, 10870, 18143, 28094) },
- { AOM_CDF7(672, 3247, 3676, 11982, 19415, 23127) },
- { AOM_CDF7(5279, 13885, 15487, 18044, 23527, 30252) },
- { AOM_CDF7(4423, 6074, 7985, 10416, 25693, 29298) },
- { AOM_CDF7(1486, 4241, 9460, 10662, 16456, 27694) },
- { AOM_CDF7(439, 2838, 3522, 6737, 18058, 23754) },
- { AOM_CDF7(1190, 4233, 4855, 11670, 20281, 24377) },
- { AOM_CDF7(1045, 4312, 8647, 10159, 18644, 29335) },
- { AOM_CDF7(202, 3734, 4747, 7298, 17127, 24016) },
- { AOM_CDF7(447, 4312, 6819, 8884, 16010, 23858) },
- { AOM_CDF7(277, 4369, 5255, 8905, 16465, 22271) },
- { AOM_CDF7(3409, 5436, 10599, 15599, 19687, 24040) },
- },
- {
- { AOM_CDF7(1870, 13742, 14530, 16498, 23770, 27698) },
- { AOM_CDF7(326, 8796, 14632, 15079, 19272, 27486) },
- { AOM_CDF7(484, 7576, 7712, 14443, 19159, 22591) },
- { AOM_CDF7(1126, 15340, 15895, 17023, 20896, 30279) },
- { AOM_CDF7(655, 4854, 5249, 5913, 22099, 27138) },
- { AOM_CDF7(1299, 6458, 8885, 9290, 14851, 25497) },
- { AOM_CDF7(311, 5295, 5552, 6885, 16107, 22672) },
- { AOM_CDF7(883, 8059, 8270, 11258, 17289, 21549) },
- { AOM_CDF7(741, 7580, 9318, 10345, 16688, 29046) },
- { AOM_CDF7(110, 7406, 7915, 9195, 16041, 23329) },
- { AOM_CDF7(363, 7974, 9357, 10673, 15629, 24474) },
- { AOM_CDF7(153, 7647, 8112, 9936, 15307, 19996) },
- { AOM_CDF7(3511, 6332, 11165, 15335, 19323, 23594) },
- },
- {
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- },
- {
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- { AOM_CDF7(4681, 9362, 14043, 18725, 23406, 28087) },
- },
- },
- {
- {
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- },
- {
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- },
- {
- { AOM_CDF5(1127, 12814, 22772, 27483) },
- { AOM_CDF5(145, 6761, 11980, 26667) },
- { AOM_CDF5(362, 5887, 11678, 16725) },
- { AOM_CDF5(385, 15213, 18587, 30693) },
- { AOM_CDF5(25, 2914, 23134, 27903) },
- { AOM_CDF5(60, 4470, 11749, 23991) },
- { AOM_CDF5(37, 3332, 14511, 21448) },
- { AOM_CDF5(157, 6320, 13036, 17439) },
- { AOM_CDF5(119, 6719, 12906, 29396) },
- { AOM_CDF5(47, 5537, 12576, 21499) },
- { AOM_CDF5(269, 6076, 11258, 23115) },
- { AOM_CDF5(83, 5615, 12001, 17228) },
- { AOM_CDF5(1968, 5556, 12023, 18547) },
- },
- {
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- { AOM_CDF5(6554, 13107, 19661, 26214) },
- },
- },
-#endif // CONFIG_FORWARDSKIP
#endif // CONFIG_ATC_NEWTXSETS
};
@@ -3159,9 +3030,7 @@
#endif // CONFIG_AIMC
av1_copy(fc->uv_mode_cdf, default_uv_mode_cdf);
av1_copy(fc->mrl_index_cdf, default_mrl_index_cdf);
-#if CONFIG_FORWARDSKIP
av1_copy(fc->fsc_mode_cdf, default_fsc_mode_cdf);
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_IMPROVED_CFL
av1_copy(fc->cfl_index_cdf, default_cfl_index_cdf);
#endif
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index 06369e1b..b2ed81f 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -67,10 +67,8 @@
#define KF_MODE_CONTEXTS 5
-#if CONFIG_FORWARDSKIP
#define FSC_MODE_CONTEXTS 4
#define FSC_BSIZE_CONTEXTS 5
-#endif // CONFIG_FORWARDSKIP
#define COMPREF_BIT_TYPES 2
#define RANKED_REF0_TO_PRUNE 3
@@ -146,11 +144,9 @@
[CDF_SIZE(3)];
aom_cdf_prob coeff_base_cdf[TX_SIZES][PLANE_TYPES][SIG_COEF_CONTEXTS]
[CDF_SIZE(4)];
-#if CONFIG_FORWARDSKIP
aom_cdf_prob idtx_sign_cdf[IDTX_SIGN_CONTEXTS][CDF_SIZE(2)];
aom_cdf_prob coeff_base_cdf_idtx[IDTX_SIG_COEF_CONTEXTS][CDF_SIZE(4)];
aom_cdf_prob coeff_br_cdf_idtx[IDTX_LEVEL_CONTEXTS][CDF_SIZE(BR_CDF_SIZE)];
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ATC_COEFCODING
aom_cdf_prob coeff_base_lf_cdf[TX_SIZES][PLANE_TYPES][LF_SIG_COEF_CONTEXTS]
[CDF_SIZE(LF_BASE_SYMBOLS)];
@@ -328,10 +324,8 @@
[CDF_SIZE(UV_INTRA_MODES)];
#endif // !CONFIG_AIMC
aom_cdf_prob mrl_index_cdf[CDF_SIZE(MRL_LINE_NUMBER)];
-#if CONFIG_FORWARDSKIP
aom_cdf_prob fsc_mode_cdf[FSC_MODE_CONTEXTS][FSC_BSIZE_CONTEXTS]
[CDF_SIZE(FSC_MODES)];
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_IMPROVED_CFL
aom_cdf_prob cfl_index_cdf[CDF_SIZE(CFL_TYPE_COUNT)];
#endif
@@ -412,7 +406,6 @@
int initialized;
} FRAME_CONTEXT;
-#if CONFIG_FORWARDSKIP
static const int av1_ext_tx_ind_intra[EXT_TX_SET_TYPES][TX_TYPES] = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
@@ -430,7 +423,6 @@
{ 10, 11, 0, 1, 2, 4, 5, 3, 6, 7, 8, 0, 0, 0, 0, 0 },
{ 10, 11, 12, 13, 14, 15, 0, 1, 2, 4, 5, 3, 6, 7, 8, 0 },
};
-#endif // CONFIG_FORWARDSKIP
static const int av1_ext_tx_ind[EXT_TX_SET_TYPES][TX_TYPES] = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
diff --git a/av1/common/enums.h b/av1/common/enums.h
index 8f6fb47..fab7fd8 100644
--- a/av1/common/enums.h
+++ b/av1/common/enums.h
@@ -184,13 +184,11 @@
#define MODE_DEPTX_TXSIZES 19
#endif // CONFIG_ATC_NEWTXSETS
-#if CONFIG_FORWARDSKIP
#define FSC_MODES 2
#define FSC_MAXWIDTH 16
#define FSC_MAXHEIGHT 16
#define FSC_MINWIDTH 4
#define FSC_MINHEIGHT 4
-#endif // CONFIG_FORWARDSKIP
#define DIST_PRECISION_BITS 4
#define DIST_PRECISION (1 << DIST_PRECISION_BITS) // 16
@@ -472,13 +470,9 @@
#define TX_PAD_HOR 4
// Pad 6 extra rows (2 on top and 4 on bottom) to remove vertical availability
// check.
-#if CONFIG_FORWARDSKIP
#define TX_PAD_LEFT 4
#define TX_PAD_RIGHT 4
#define TX_PAD_TOP 4
-#else
-#define TX_PAD_TOP 0
-#endif // CONFIG_FORWARDSKIP
#define TX_PAD_BOTTOM 4
#define TX_PAD_VER (TX_PAD_TOP + TX_PAD_BOTTOM)
// Pad 16 extra bytes to avoid reading overflow in SIMD optimization.
@@ -590,7 +584,6 @@
#define EXT_TX_SETS_INTRA 3 // Sets of transform selections for INTRA
#endif // CONFIG_ATC_NEWTXSETS && !CONFIG_ATC_REDUCED_TXSET
-#if CONFIG_FORWARDSKIP
#if CONFIG_ATC_NEWTXSETS
#define INTRA_TX_SET1 7
#if CONFIG_ATC_REDUCED_TXSET
@@ -600,10 +593,6 @@
#define INTRA_TX_SET1 6
#define INTRA_TX_SET2 4
#endif // CONFIG_ATC_NEWTXSETS
-#else
-#define INTRA_TX_SET1 7
-#define INTRA_TX_SET2 5
-#endif // CONFIG_FORWARDSKIP
enum {
UNIDIR_COMP_REFERENCE,
diff --git a/av1/common/reconintra.h b/av1/common/reconintra.h
index e11e0b2..efd6533 100644
--- a/av1/common/reconintra.h
+++ b/av1/common/reconintra.h
@@ -107,7 +107,6 @@
#endif // CONFIG_IBC_SR_EXT
}
-#if CONFIG_FORWARDSKIP
static INLINE int allow_fsc_intra(const AV1_COMMON *const cm,
const MACROBLOCKD *const xd, BLOCK_SIZE bs,
const MB_MODE_INFO *const mbmi) {
@@ -129,7 +128,6 @@
plane_type == PLANE_TYPE_Y && is_inter && tx_type == IDTX;
return allow_fsc;
}
-#endif // CONFIG_FORWARDSKIP
static INLINE int av1_filter_intra_allowed_bsize(const AV1_COMMON *const cm,
BLOCK_SIZE bs) {
diff --git a/av1/common/token_cdfs.h b/av1/common/token_cdfs.h
index 890f5ed..546dd7a 100644
--- a/av1/common/token_cdfs.h
+++ b/av1/common/token_cdfs.h
@@ -109,7 +109,6 @@
};
#endif // CONFIG_CONTEXT_DERIVATION
-#if CONFIG_FORWARDSKIP
static const aom_cdf_prob
av1_default_idtx_sign_cdfs[TOKEN_CDF_Q_CTXS][IDTX_SIGN_CONTEXTS]
[CDF_SIZE(2)] = { { { AOM_CDF2(16384) },
@@ -148,7 +147,6 @@
{ AOM_CDF2(307) },
{ AOM_CDF2(32759) },
{ AOM_CDF2(108) } } };
-#endif // CONFIG_FORWARDSKIP
static const aom_cdf_prob
av1_default_dc_sign_cdfs[TOKEN_CDF_Q_CTXS][PLANE_TYPES][DC_SIGN_CONTEXTS]
@@ -201,223 +199,143 @@
{ AOM_CDF2(21935) }, { AOM_CDF2(20289) }, { AOM_CDF2(27473) },
{ AOM_CDF2(32487) }, { AOM_CDF2(7654) }, { AOM_CDF2(19473) },
{ AOM_CDF2(29984) }, { AOM_CDF2(9961) }, { AOM_CDF2(30242) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(32117) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) } },
-#else
- { AOM_CDF2(32117) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(31548) }, { AOM_CDF2(1549) }, { AOM_CDF2(10130) },
{ AOM_CDF2(16656) }, { AOM_CDF2(18591) }, { AOM_CDF2(26308) },
{ AOM_CDF2(32537) }, { AOM_CDF2(5403) }, { AOM_CDF2(18096) },
{ AOM_CDF2(30003) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) } },
-#else
- { AOM_CDF2(16384) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(29957) }, { AOM_CDF2(5391) }, { AOM_CDF2(18039) },
{ AOM_CDF2(23566) }, { AOM_CDF2(22431) }, { AOM_CDF2(25822) },
{ AOM_CDF2(32197) }, { AOM_CDF2(3778) }, { AOM_CDF2(15336) },
{ AOM_CDF2(28981) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) } },
-#else
- { AOM_CDF2(16384) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(17920) }, { AOM_CDF2(1818) }, { AOM_CDF2(7282) },
{ AOM_CDF2(25273) }, { AOM_CDF2(10923) }, { AOM_CDF2(31554) },
{ AOM_CDF2(32624) }, { AOM_CDF2(1366) }, { AOM_CDF2(15628) },
{ AOM_CDF2(30462) }, { AOM_CDF2(146) }, { AOM_CDF2(5132) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(31657) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) } },
-#else
- { AOM_CDF2(31657) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(6308) }, { AOM_CDF2(117) }, { AOM_CDF2(1638) },
{ AOM_CDF2(2161) }, { AOM_CDF2(16384) }, { AOM_CDF2(10923) },
{ AOM_CDF2(30247) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) } } },
-#else
- { AOM_CDF2(16384) } } },
-#endif // CONFIG_FORWARDSKIP
{ { { AOM_CDF2(30371) }, { AOM_CDF2(7570) }, { AOM_CDF2(13155) },
{ AOM_CDF2(20751) }, { AOM_CDF2(20969) }, { AOM_CDF2(27067) },
{ AOM_CDF2(32013) }, { AOM_CDF2(5495) }, { AOM_CDF2(17942) },
{ AOM_CDF2(28280) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(16384) }, { AOM_CDF2(32764) }, { AOM_CDF2(12704) },
{ AOM_CDF2(12601) }, { AOM_CDF2(19903) }, { AOM_CDF2(16904) },
{ AOM_CDF2(23700) }, { AOM_CDF2(31844) } },
-#else
- { AOM_CDF2(16384) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(31782) }, { AOM_CDF2(1836) }, { AOM_CDF2(10689) },
{ AOM_CDF2(17604) }, { AOM_CDF2(21622) }, { AOM_CDF2(27518) },
{ AOM_CDF2(32399) }, { AOM_CDF2(4419) }, { AOM_CDF2(16294) },
{ AOM_CDF2(28345) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(16384) }, { AOM_CDF2(32714) }, { AOM_CDF2(13275) },
{ AOM_CDF2(17221) }, { AOM_CDF2(18758) }, { AOM_CDF2(17830) },
{ AOM_CDF2(22617) }, { AOM_CDF2(26771) } },
-#else
- { AOM_CDF2(16384) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(31901) }, { AOM_CDF2(10311) }, { AOM_CDF2(18047) },
{ AOM_CDF2(24806) }, { AOM_CDF2(23288) }, { AOM_CDF2(27914) },
{ AOM_CDF2(32296) }, { AOM_CDF2(4215) }, { AOM_CDF2(15756) },
{ AOM_CDF2(28341) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(16384) }, { AOM_CDF2(30260) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) } },
-#else
- { AOM_CDF2(16384) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(26726) }, { AOM_CDF2(1045) }, { AOM_CDF2(11703) },
{ AOM_CDF2(20590) }, { AOM_CDF2(18554) }, { AOM_CDF2(25970) },
{ AOM_CDF2(31938) }, { AOM_CDF2(5583) }, { AOM_CDF2(21313) },
{ AOM_CDF2(29390) }, { AOM_CDF2(641) }, { AOM_CDF2(22265) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(31452) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) } },
-#else
- { AOM_CDF2(31452) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(26584) }, { AOM_CDF2(188) }, { AOM_CDF2(8847) },
{ AOM_CDF2(24519) }, { AOM_CDF2(22938) }, { AOM_CDF2(30583) },
{ AOM_CDF2(32608) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) } } },
-#else
- { AOM_CDF2(16384) } } },
-#endif // CONFIG_FORWARDSKIP
{ { { AOM_CDF2(29614) }, { AOM_CDF2(9068) }, { AOM_CDF2(12924) },
{ AOM_CDF2(19538) }, { AOM_CDF2(17737) }, { AOM_CDF2(24619) },
{ AOM_CDF2(30642) }, { AOM_CDF2(4119) }, { AOM_CDF2(16026) },
{ AOM_CDF2(25657) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(16384) }, { AOM_CDF2(32533) }, { AOM_CDF2(8474) },
{ AOM_CDF2(13239) }, { AOM_CDF2(17178) }, { AOM_CDF2(14820) },
{ AOM_CDF2(21712) }, { AOM_CDF2(29393) } },
-#else
- { AOM_CDF2(16384) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(31957) }, { AOM_CDF2(3230) }, { AOM_CDF2(11153) },
{ AOM_CDF2(18123) }, { AOM_CDF2(20143) }, { AOM_CDF2(26536) },
{ AOM_CDF2(31986) }, { AOM_CDF2(3050) }, { AOM_CDF2(14603) },
{ AOM_CDF2(25155) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(16384) }, { AOM_CDF2(26043) }, { AOM_CDF2(3227) },
{ AOM_CDF2(9773) }, { AOM_CDF2(13337) }, { AOM_CDF2(10652) },
{ AOM_CDF2(16117) }, { AOM_CDF2(23916) } },
-#else
- { AOM_CDF2(16384) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(32363) }, { AOM_CDF2(10692) }, { AOM_CDF2(19090) },
{ AOM_CDF2(24357) }, { AOM_CDF2(24442) }, { AOM_CDF2(28312) },
{ AOM_CDF2(32169) }, { AOM_CDF2(3648) }, { AOM_CDF2(15690) },
{ AOM_CDF2(26815) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(16384) }, { AOM_CDF2(26561) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) } },
-#else
- { AOM_CDF2(16384) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(30669) }, { AOM_CDF2(3832) }, { AOM_CDF2(11663) },
{ AOM_CDF2(18889) }, { AOM_CDF2(19782) }, { AOM_CDF2(23313) },
{ AOM_CDF2(31330) }, { AOM_CDF2(5124) }, { AOM_CDF2(18719) },
{ AOM_CDF2(28468) }, { AOM_CDF2(3082) }, { AOM_CDF2(20982) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(29443) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) } },
-#else
- { AOM_CDF2(29443) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(28573) }, { AOM_CDF2(3183) }, { AOM_CDF2(17802) },
{ AOM_CDF2(25977) }, { AOM_CDF2(26677) }, { AOM_CDF2(27832) },
{ AOM_CDF2(32387) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) } } },
-#else
- { AOM_CDF2(16384) } } },
-#endif // CONFIG_FORWARDSKIP
{ { { AOM_CDF2(26887) }, { AOM_CDF2(6729) }, { AOM_CDF2(10361) },
{ AOM_CDF2(17442) }, { AOM_CDF2(15045) }, { AOM_CDF2(22478) },
{ AOM_CDF2(29072) }, { AOM_CDF2(2713) }, { AOM_CDF2(11861) },
{ AOM_CDF2(20773) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(16384) }, { AOM_CDF2(32764) }, { AOM_CDF2(11206) },
{ AOM_CDF2(11823) }, { AOM_CDF2(15424) }, { AOM_CDF2(15748) },
{ AOM_CDF2(20746) }, { AOM_CDF2(26270) } },
-#else
- { AOM_CDF2(16384) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(31903) }, { AOM_CDF2(2044) }, { AOM_CDF2(7528) },
{ AOM_CDF2(14618) }, { AOM_CDF2(16182) }, { AOM_CDF2(24168) },
{ AOM_CDF2(31037) }, { AOM_CDF2(2786) }, { AOM_CDF2(11194) },
{ AOM_CDF2(20155) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(16384) }, { AOM_CDF2(31262) }, { AOM_CDF2(8599) },
{ AOM_CDF2(13077) }, { AOM_CDF2(14805) }, { AOM_CDF2(11751) },
{ AOM_CDF2(16048) }, { AOM_CDF2(20878) } },
-#else
- { AOM_CDF2(16384) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(32510) }, { AOM_CDF2(8430) }, { AOM_CDF2(17318) },
{ AOM_CDF2(24154) }, { AOM_CDF2(23674) }, { AOM_CDF2(28789) },
{ AOM_CDF2(32139) }, { AOM_CDF2(3440) }, { AOM_CDF2(13117) },
{ AOM_CDF2(22702) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(16384) }, { AOM_CDF2(30967) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) } },
-#else
- { AOM_CDF2(16384) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(31671) }, { AOM_CDF2(2056) }, { AOM_CDF2(11746) },
{ AOM_CDF2(16852) }, { AOM_CDF2(18635) }, { AOM_CDF2(24715) },
{ AOM_CDF2(31484) }, { AOM_CDF2(4656) }, { AOM_CDF2(16074) },
{ AOM_CDF2(24704) }, { AOM_CDF2(1806) }, { AOM_CDF2(14645) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(25336) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) } },
-#else
- { AOM_CDF2(25336) } },
-#endif // CONFIG_FORWARDSKIP
{ { AOM_CDF2(31539) }, { AOM_CDF2(8433) }, { AOM_CDF2(20576) },
{ AOM_CDF2(27904) }, { AOM_CDF2(27852) }, { AOM_CDF2(30026) },
{ AOM_CDF2(32441) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
-#if CONFIG_FORWARDSKIP
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
{ AOM_CDF2(16384) }, { AOM_CDF2(16384) } } }
};
-#else
- { AOM_CDF2(16384) } } } };
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_CONTEXT_DERIVATION
static const aom_cdf_prob
@@ -1096,7 +1014,6 @@
{ AOM_CDF11(2979, 5958, 8937, 11916, 14895, 17873, 20852,
23831, 26810, 29789) } } } };
-#if CONFIG_FORWARDSKIP
static const aom_cdf_prob
av1_default_coeff_lps_multi_cdfs_idtx[TOKEN_CDF_Q_CTXS][IDTX_LEVEL_CONTEXTS]
[CDF_SIZE(BR_CDF_SIZE)] = {
@@ -1157,7 +1074,6 @@
{ AOM_CDF4(14818, 22048, 30042) },
{ AOM_CDF4(13384, 20248, 26029) } }
};
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ATC_COEFCODING
static const aom_cdf_prob
@@ -1987,7 +1903,6 @@
};
#endif // CONFIG_ATC_COEFCODING
-#if CONFIG_FORWARDSKIP
static const aom_cdf_prob av1_default_coeff_base_multi_cdfs_idtx
[TOKEN_CDF_Q_CTXS][IDTX_SIG_COEF_CONTEXTS]
[CDF_SIZE(NUM_BASE_LEVELS + 2)] = { { { AOM_CDF4(8192, 16384, 24576) },
@@ -2046,7 +1961,6 @@
{ AOM_CDF4(4206, 10098, 20341) },
{ AOM_CDF4(2674, 5476, 12215) },
{ AOM_CDF4(1568, 3054, 5228) } } };
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ATC_COEFCODING
static const aom_cdf_prob av1_default_coeff_base_lf_multi_cdfs
diff --git a/av1/common/txb_common.h b/av1/common/txb_common.h
index 556ad8f..79f6929 100644
--- a/av1/common/txb_common.h
+++ b/av1/common/txb_common.h
@@ -67,7 +67,6 @@
return idx + ((idx >> bwl) << TX_PAD_HOR_LOG2);
}
-#if CONFIG_FORWARDSKIP
// This function sets the signs buffer for coefficient coding.
static INLINE int8_t *set_signs(int8_t *const signs_buf, const int width) {
return signs_buf + TX_PAD_TOP * (width + TX_PAD_HOR);
@@ -97,7 +96,6 @@
if ((row < 2) && (col < (2 + TX_PAD_LEFT))) return mag;
return mag + 7;
}
-#endif // CONFIG_FORWARDSKIP
static INLINE int get_br_ctx_2d(const uint8_t *const levels,
const int c, // raster order
@@ -283,7 +281,6 @@
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
};
-#if CONFIG_FORWARDSKIP
// This function returns the neighboring left + above levels with clipping.
static AOM_FORCE_INLINE int get_nz_mag_skip(const uint8_t *const levels,
const int bwl) {
@@ -323,7 +320,6 @@
if (level_pt[0] > COEFF_BASE_RANGE && sign_ctx != 0) sign_ctx += 2;
return sign_ctx;
}
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ATC_COEFCODING
// This function returns the template sum of absolute values
@@ -393,7 +389,6 @@
NZ_MAP_CTX_10, NZ_MAP_CTX_10,
};
-#if CONFIG_FORWARDSKIP
static AOM_FORCE_INLINE int get_nz_map_ctx_from_stats_skip(const int stats,
const int coeff_idx,
const int bwl) {
@@ -403,7 +398,6 @@
if ((row < 2) && (col < (2 + TX_PAD_LEFT))) return ctx;
return ctx + 7;
}
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ATC_COEFCODING
// This function returns the base range context index/increment for the
@@ -569,7 +563,6 @@
return 3;
}
-#if CONFIG_FORWARDSKIP
static INLINE int get_upper_levels_ctx_2d(const uint8_t *levels, int coeff_idx,
int bwl) {
int mag;
@@ -582,7 +575,6 @@
if ((row < 2) && (col < (2 + TX_PAD_LEFT))) return ctx;
return ctx + 7;
}
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ATC_COEFCODING
// This function returns the base range context index/increment for the
@@ -726,7 +718,6 @@
*cul_level += 2 << COEFF_CONTEXT_BITS;
}
-#if CONFIG_FORWARDSKIP
static INLINE void get_txb_ctx_skip(const BLOCK_SIZE plane_bsize,
const TX_SIZE tx_size,
const ENTROPY_CONTEXT *const a,
@@ -761,24 +752,17 @@
txb_ctx->txb_skip_ctx = skip_contexts[top][left] + skip_offset;
}
}
-#endif // CONFIG_FORWARDSKIP
static INLINE void get_txb_ctx(const BLOCK_SIZE plane_bsize,
const TX_SIZE tx_size, const int plane,
const ENTROPY_CONTEXT *const a,
const ENTROPY_CONTEXT *const l,
-#if CONFIG_FORWARDSKIP
TXB_CTX *const txb_ctx, uint8_t fsc_mode) {
-#else
- TXB_CTX *const txb_ctx) {
-#endif
#define MAX_TX_SIZE_UNIT 16
-#if CONFIG_FORWARDSKIP
if (fsc_mode && plane == PLANE_TYPE_Y) {
get_txb_ctx_skip(plane_bsize, tx_size, a, l, txb_ctx);
return;
}
-#endif
static const int8_t signs[3] = { 0, -1, 1 };
static const int8_t dc_sign_contexts[4 * MAX_TX_SIZE_UNIT + 1] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index c3c0d35..deaf30c 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -6023,9 +6023,7 @@
#if CONFIG_BAWP
seq_params->enable_bawp = aom_rb_read_bit(rb);
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
seq_params->enable_fsc = aom_rb_read_bit(rb);
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_CCSO
seq_params->enable_ccso = aom_rb_read_bit(rb);
#endif
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index e1a7dc7..45b85e3 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -262,12 +262,10 @@
return mrl_index;
}
-#if CONFIG_FORWARDSKIP
static uint8_t read_fsc_mode(aom_reader *r, aom_cdf_prob *fsc_cdf) {
const uint8_t fsc_mode = aom_read_symbol(r, fsc_cdf, FSC_MODES, ACCT_STR);
return fsc_mode;
}
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_IMPROVED_CFL
static uint8_t read_cfl_index(FRAME_CONTEXT *ec_ctx, aom_reader *r) {
@@ -1173,18 +1171,15 @@
r, ec_ctx->inter_ext_tx_cdf[eset][square_tx_size],
av1_num_ext_tx_set[tx_set_type], ACCT_STR)];
} else {
-#if CONFIG_FORWARDSKIP
if (mbmi->fsc_mode[xd->tree_type == CHROMA_PART]) {
*tx_type = IDTX;
return;
}
-#endif // CONFIG_FORWARDSKIP
const PREDICTION_MODE intra_mode =
mbmi->filter_intra_mode_info.use_filter_intra
? fimode_to_intradir[mbmi->filter_intra_mode_info
.filter_intra_mode]
: mbmi->mode;
-#if CONFIG_FORWARDSKIP
#if CONFIG_ATC_NEWTXSETS
#if CONFIG_ATC_REDUCED_TXSET
const int size_info = av1_size_class[tx_size];
@@ -1211,11 +1206,6 @@
r, ec_ctx->intra_ext_tx_cdf[eset][square_tx_size][intra_mode],
av1_num_ext_tx_set_intra[tx_set_type], ACCT_STR)];
#endif // CONFIG_ATC_NEWTXSETS
-#else
- *tx_type = av1_ext_tx_inv[tx_set_type][aom_read_symbol(
- r, ec_ctx->intra_ext_tx_cdf[eset][square_tx_size][intra_mode],
- av1_num_ext_tx_set[tx_set_type], ACCT_STR)];
-#endif // CONFIG_FORWARDSKIP
}
}
}
@@ -1394,10 +1384,8 @@
if (mbmi->use_intrabc[xd->tree_type == CHROMA_PART]) {
BLOCK_SIZE bsize = mbmi->sb_type[xd->tree_type == CHROMA_PART];
mbmi->mode = DC_PRED;
-#if CONFIG_FORWARDSKIP
mbmi->fsc_mode[PLANE_TYPE_Y] = 0;
mbmi->fsc_mode[PLANE_TYPE_UV] = 0;
-#endif // CONFIG_FORWARDSKIP
mbmi->uv_mode = UV_DC_PRED;
mbmi->interp_fltr = BILINEAR;
mbmi->motion_mode = SIMPLE_TRANSLATION;
@@ -1633,25 +1621,21 @@
if (xd->tree_type != CHROMA_PART) {
#if CONFIG_AIMC
read_intra_luma_mode(xd, r);
-#if CONFIG_FORWARDSKIP
if (allow_fsc_intra(cm, xd, bsize, mbmi)) {
aom_cdf_prob *fsc_cdf = get_fsc_mode_cdf(xd, bsize, 1);
mbmi->fsc_mode[xd->tree_type == CHROMA_PART] = read_fsc_mode(r, fsc_cdf);
} else {
mbmi->fsc_mode[xd->tree_type == CHROMA_PART] = 0;
}
-#endif // CONFIG_FORWARDSKIP
#else
mbmi->mode = read_intra_mode(
r, get_y_mode_cdf(ec_ctx, xd->neighbors[0], xd->neighbors[1]));
-#if CONFIG_FORWARDSKIP
if (allow_fsc_intra(cm, xd, bsize, mbmi)) {
aom_cdf_prob *fsc_cdf = get_fsc_mode_cdf(xd, bsize, 1);
mbmi->fsc_mode[xd->tree_type == CHROMA_PART] = read_fsc_mode(r, fsc_cdf);
} else {
mbmi->fsc_mode[xd->tree_type == CHROMA_PART] = 0;
}
-#endif // CONFIG_FORWARDSKIP
mbmi->angle_delta[PLANE_TYPE_Y] =
(use_angle_delta && av1_is_directional_mode(mbmi->mode))
? read_angle_delta(
@@ -2115,19 +2099,16 @@
#if CONFIG_AIMC
read_intra_luma_mode(xd, r);
-#if CONFIG_FORWARDSKIP
if (allow_fsc_intra(cm, xd, bsize, mbmi) && xd->tree_type != CHROMA_PART) {
aom_cdf_prob *fsc_cdf = get_fsc_mode_cdf(xd, bsize, 0);
mbmi->fsc_mode[xd->tree_type == CHROMA_PART] = read_fsc_mode(r, fsc_cdf);
} else {
mbmi->fsc_mode[xd->tree_type == CHROMA_PART] = 0;
}
-#endif // CONFIG_FORWARDSKIP
#else
const int use_angle_delta = av1_use_angle_delta(bsize);
mbmi->mode = read_intra_mode(r, ec_ctx->y_mode_cdf[size_group_lookup[bsize]]);
-#if CONFIG_FORWARDSKIP
if (allow_fsc_intra(cm, xd, bsize, mbmi) && xd->tree_type != CHROMA_PART) {
aom_cdf_prob *fsc_cdf = get_fsc_mode_cdf(xd, bsize, 0);
mbmi->fsc_mode[xd->tree_type == CHROMA_PART] = read_fsc_mode(r, fsc_cdf);
@@ -2137,7 +2118,6 @@
} else {
mbmi->fsc_mode[xd->tree_type == CHROMA_PART] = 0;
}
-#endif // CONFIG_FORWARDSKIP
mbmi->angle_delta[PLANE_TYPE_Y] =
use_angle_delta && av1_is_directional_mode(mbmi->mode)
? read_angle_delta(
@@ -2615,10 +2595,8 @@
mbmi->uv_mode = UV_DC_PRED;
mbmi->palette_mode_info.palette_size[0] = 0;
mbmi->palette_mode_info.palette_size[1] = 0;
-#if CONFIG_FORWARDSKIP
mbmi->fsc_mode[PLANE_TYPE_Y] = 0;
mbmi->fsc_mode[PLANE_TYPE_UV] = 0;
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_NEW_CONTEXT_MODELING
mbmi->use_intrabc[0] = 0;
mbmi->use_intrabc[1] = 0;
@@ -3130,10 +3108,8 @@
mbmi->skip_txfm[xd->tree_type == CHROMA_PART] =
read_skip_txfm(cm, xd, mbmi->segment_id, r);
-#if CONFIG_FORWARDSKIP
mbmi->fsc_mode[PLANE_TYPE_Y] = 0;
mbmi->fsc_mode[PLANE_TYPE_UV] = 0;
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_WARP_REF_LIST
mbmi->warp_ref_idx = 0;
mbmi->max_num_warp_candidates = 0;
diff --git a/av1/decoder/decodetxb.c b/av1/decoder/decodetxb.c
index 24515f6..6e227e1 100644
--- a/av1/decoder/decodetxb.c
+++ b/av1/decoder/decodetxb.c
@@ -17,9 +17,7 @@
#include "av1/common/pred_common.h"
#include "av1/common/scan.h"
#include "av1/common/txb_common.h"
-#if CONFIG_FORWARDSKIP
#include "av1/common/reconintra.h"
-#endif // CONFIG_FORWARDSKIP
#include "av1/decoder/decodemv.h"
#define ACCT_STR __func__
@@ -199,7 +197,6 @@
}
}
-#if CONFIG_FORWARDSKIP
static INLINE void read_coeffs_forward_2d(aom_reader *r, int start_si,
int end_si, const int16_t *scan,
int bwl, uint8_t *levels,
@@ -390,7 +387,6 @@
set_dc_sign(&cul_level, dc_val);
return cul_level;
}
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_PAR_HIDING
// This function returns the partial absolute level of the coefficient
@@ -427,11 +423,6 @@
const TXB_CTX *const txb_ctx,
const TX_SIZE tx_size) {
MACROBLOCKD *const xd = &dcb->xd;
-#if CONFIG_CONTEXT_DERIVATION && !CONFIG_FORWARDSKIP
- if (plane == AOM_PLANE_U) {
- xd->eob_u = 0;
- }
-#endif // CONFIG_CONTEXT_DERIVATION
FRAME_CONTEXT *const ec_ctx = xd->tile_ctx;
const int32_t max_value = (1 << (7 + xd->bd)) - 1;
const int32_t min_value = -(1 << (7 + xd->bd));
@@ -449,62 +440,12 @@
int dc_val = 0;
uint8_t levels_buf[TX_PAD_2D];
uint8_t *const levels = set_levels(levels_buf, width);
-#if !CONFIG_FORWARDSKIP
-#if CONFIG_CROSS_CHROMA_TX && CCTX_C2_DROPPED
- if (plane == AOM_PLANE_V && is_cctx_allowed(cm, xd)) {
- CctxType cctx_type = av1_get_cctx_type(xd, blk_row, blk_col);
- if (!keep_chroma_c2(cctx_type)) return 0;
- }
-#endif // CONFIG_CROSS_CHROMA_TX && CCTX_C2_DROPPED
-#if CONFIG_CONTEXT_DERIVATION
- int txb_skip_ctx = txb_ctx->txb_skip_ctx;
- int all_zero;
- if (plane == AOM_PLANE_Y || plane == AOM_PLANE_U) {
- all_zero = aom_read_symbol(r, ec_ctx->txb_skip_cdf[txs_ctx][txb_skip_ctx],
- 2, ACCT_STR);
- } else {
- txb_skip_ctx += (xd->eob_u_flag ? V_TXB_SKIP_CONTEXT_OFFSET : 0);
- all_zero =
- aom_read_symbol(r, ec_ctx->v_txb_skip_cdf[txb_skip_ctx], 2, ACCT_STR);
- }
-#else
- const int all_zero = aom_read_symbol(
- r, ec_ctx->txb_skip_cdf[txs_ctx][txb_ctx->txb_skip_ctx], 2, ACCT_STR);
-#endif // CONFIG_CONTEXT_DERIVATION
-
-#if CONFIG_CROSS_CHROMA_TX
- if (plane == AOM_PLANE_U && is_cctx_allowed(cm, xd)) {
- if (!all_zero) {
- av1_read_cctx_type(cm, xd, blk_row, blk_col, tx_size, r);
- } else {
- int row_offset, col_offset;
-#if CONFIG_EXT_RECUR_PARTITIONS
- get_chroma_mi_offsets(xd, &row_offset, &col_offset);
-#else
- get_chroma_mi_offsets(xd, tx_size, &row_offset, &col_offset);
-#endif // CONFIG_EXT_RECUR_PARTITIONS
- update_cctx_array(xd, blk_row, blk_col, row_offset, col_offset, tx_size,
- CCTX_NONE);
- }
- }
-#endif // CONFIG_CROSS_CHROMA_TX
-#endif // CONFIG_FORWARDSKIP
eob_info *eob_data = dcb->eob_data[plane] + dcb->txb_offset[plane];
uint16_t *const eob = &(eob_data->eob);
uint16_t *const max_scan_line = &(eob_data->max_scan_line);
*max_scan_line = 0;
*eob = 0;
-#if !CONFIG_FORWARDSKIP
-#if CONFIG_INSPECTION
- if (plane == 0) {
- const int txk_type_idx =
- av1_get_txk_type_index(mbmi->sb_type[0], blk_row, blk_col);
- mbmi->tx_skip[txk_type_idx] = all_zero;
- }
-#endif
-#endif // CONFIG_FORWARDSKIP
-
#if DEBUG_EXTQUANT
fprintf(cm->fDecCoeffLog,
"\nmi_row = %d, mi_col = %d, blk_row = %d,"
@@ -512,31 +453,6 @@
xd->mi_row, xd->mi_col, blk_row, blk_col, plane, tx_size);
#endif
-#if !CONFIG_FORWARDSKIP
-#if CONFIG_CONTEXT_DERIVATION
- if (plane == AOM_PLANE_U) {
- xd->eob_u_flag = all_zero ? 0 : 1;
- }
-#endif // CONFIG_CONTEXT_DERIVATION
-
- if (all_zero) {
- *max_scan_line = 0;
- if (plane == 0) {
- xd->tx_type_map[blk_row * xd->tx_type_map_stride + blk_col] = DCT_DCT;
- }
-#if CONFIG_PC_WIENER
- av1_update_txk_skip_array(cm, xd->mi_row, xd->mi_col, xd->tree_type,
- &mbmi->chroma_ref_info, plane, blk_row, blk_col,
- tx_size);
-#endif // CONFIG_PC_WIENER
- return 0;
- }
-
- if (plane == AOM_PLANE_Y) {
- // only y plane's tx_type is transmitted
- av1_read_tx_type(cm, xd, blk_row, blk_col, tx_size, r);
- }
-#endif // CONFIG_FORWARDSKIP
const TX_TYPE tx_type =
av1_get_tx_type(xd, plane_type, blk_row, blk_col, tx_size,
cm->features.reduced_tx_set_used);
@@ -637,13 +553,7 @@
#endif
//
if (*eob > 1) {
-#if CONFIG_FORWARDSKIP
memset(levels_buf, 0, sizeof(*levels_buf) * TX_PAD_2D);
-#else
- memset(levels_buf, 0,
- sizeof(*levels_buf) *
- ((width + TX_PAD_HOR) * (height + TX_PAD_VER) + TX_PAD_END));
-#endif // CONFIG_FORWARDSKIP
}
#if DEBUG_EXTQUANT
@@ -993,7 +903,6 @@
#endif // !CONFIG_EXT_RECUR_PARTITIONS
TXB_CTX txb_ctx;
-#if CONFIG_FORWARDSKIP
get_txb_ctx(plane_bsize, tx_size, plane, pd->above_entropy_context + col,
pd->left_entropy_context + row, &txb_ctx,
mbmi->fsc_mode[xd->tree_type == CHROMA_PART]);
@@ -1026,22 +935,9 @@
&mbmi->chroma_ref_info, plane, row, col, tx_size);
}
#endif // CONFIG_PC_WIENER
-#else
- get_txb_ctx(plane_bsize, tx_size, plane, pd->above_entropy_context + col,
- pd->left_entropy_context + row, &txb_ctx);
- const uint8_t cul_level =
- av1_read_coeffs_txb(cm, dcb, r, row, col, plane, &txb_ctx, tx_size);
-#endif // CONFIG_FORWARDSKIP
av1_set_entropy_contexts(xd, pd, plane, plane_bsize, tx_size, cul_level, col,
row);
if (is_inter_block(mbmi, xd->tree_type)) {
-#if !CONFIG_FORWARDSKIP
- const PLANE_TYPE plane_type = get_plane_type(plane);
- // tx_type will be read out in av1_read_coeffs_txb_facade
- const TX_TYPE tx_type = av1_get_tx_type(xd, plane_type, row, col, tx_size,
- cm->features.reduced_tx_set_used);
-#endif // CONFIG_FORWARDSKIP
-
if (plane == 0) {
const int txw = tx_size_wide_unit[tx_size];
const int txh = tx_size_high_unit[tx_size];
diff --git a/av1/decoder/decodetxb.h b/av1/decoder/decodetxb.h
index d54b028..b3adb57 100644
--- a/av1/decoder/decodetxb.h
+++ b/av1/decoder/decodetxb.h
@@ -33,7 +33,6 @@
const int row, const int col,
const TX_SIZE tx_size);
-#if CONFIG_FORWARDSKIP
uint8_t av1_read_sig_txtype(const struct AV1Common *const cm,
struct DecoderCodingBlock *dcb,
struct aom_reader *const r, const int blk_row,
@@ -46,5 +45,4 @@
struct aom_reader *const r, const int blk_row,
const int blk_col, const int plane,
const TX_SIZE tx_size);
-#endif // CONFIG_FORWARDSKIP
#endif // AOM_AV1_DECODER_DECODETXB_H_
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 4bbcaaf..bac2dbd 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -697,7 +697,6 @@
aom_writer *w, AV1_COMMON *cm, MACROBLOCK *const x, MACROBLOCKD *xd,
MB_MODE_INFO *mbmi, int plane, int block, int blk_row, int blk_col,
TX_SIZE tx_size) {
-#if CONFIG_FORWARDSKIP
// code significance and TXB
const int code_rest =
av1_write_sig_txtype(cm, x, w, blk_row, blk_col, plane, block, tx_size);
@@ -719,9 +718,6 @@
av1_write_coeffs_txb(cm, x, w, blk_row, blk_col, plane, block, tx_size);
}
}
-#else
- av1_write_coeffs_txb(cm, x, w, blk_row, blk_col, plane, block, tx_size);
-#endif // CONFIG_FORWARDSKIP
}
static AOM_INLINE void pack_txb_tokens(
@@ -1256,11 +1252,9 @@
ec_ctx->inter_ext_tx_cdf[eset][square_tx_size],
av1_num_ext_tx_set[tx_set_type]);
} else {
-#if CONFIG_FORWARDSKIP
if (mbmi->fsc_mode[xd->tree_type == CHROMA_PART]) {
return;
}
-#endif // CONFIG_FORWARDSKIP
#if !CONFIG_ATC_NEWTXSETS
PREDICTION_MODE intra_dir;
if (mbmi->filter_intra_mode_info.use_filter_intra)
@@ -1272,7 +1266,6 @@
#if CONFIG_IST
aom_write_symbol(
-#if CONFIG_FORWARDSKIP
#if CONFIG_ATC_NEWTXSETS
w,
av1_tx_type_to_idx(get_primary_tx_type(tx_type), tx_set_type,
@@ -1293,22 +1286,10 @@
av1_num_ext_tx_set_intra[tx_set_type]);
#endif // CONFIG_ATC_NEWTXSETS
#else
- w, av1_ext_tx_ind[tx_set_type][get_primary_tx_type(tx_type)],
- ec_ctx->intra_ext_tx_cdf[eset][square_tx_size][intra_dir],
- av1_num_ext_tx_set[tx_set_type]);
-#endif // CONFIG_FORWARDSKIP
-#else
-#if CONFIG_FORWARDSKIP
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]);
-#else
- aom_write_symbol(
- w, av1_ext_tx_ind[tx_set_type][tx_type],
- ec_ctx->intra_ext_tx_cdf[eset][square_tx_size][intra_dir],
- av1_num_ext_tx_set[tx_set_type]);
-#endif // CONFIG_FORWARDSKIP
#endif
}
}
@@ -1386,12 +1367,10 @@
aom_write_symbol(w, mrl_index, ec_ctx->mrl_index_cdf, MRL_LINE_NUMBER);
}
-#if CONFIG_FORWARDSKIP
static AOM_INLINE void write_fsc_mode(uint8_t fsc_mode, aom_writer *w,
aom_cdf_prob *fsc_cdf) {
aom_write_symbol(w, fsc_mode, fsc_cdf, FSC_MODES);
}
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_IMPROVED_CFL
static AOM_INLINE void write_cfl_index(FRAME_CONTEXT *ec_ctx, uint8_t cfl_index,
@@ -1679,9 +1658,7 @@
#endif // CONFIG_AIMC
static AOM_INLINE void write_intra_prediction_modes(AV1_COMP *cpi,
-#if !CONFIG_AIMC || CONFIG_FORWARDSKIP
int is_keyframe,
-#endif // !CONFIG_AIMC
aom_writer *w) {
const AV1_COMMON *const cm = &cpi->common;
MACROBLOCK *const x = &cpi->td.mb;
@@ -1698,12 +1675,10 @@
if (xd->tree_type != CHROMA_PART) {
#if CONFIG_AIMC
write_intra_luma_mode(xd, w);
-#if CONFIG_FORWARDSKIP
if (allow_fsc_intra(cm, xd, bsize, mbmi) && xd->tree_type != CHROMA_PART) {
aom_cdf_prob *fsc_cdf = get_fsc_mode_cdf(xd, bsize, is_keyframe);
write_fsc_mode(mbmi->fsc_mode[xd->tree_type == CHROMA_PART], w, fsc_cdf);
}
-#endif // CONFIG_FORWARDSKIP
#else
if (is_keyframe) {
write_intra_y_mode_kf(ec_ctx, mbmi, xd->neighbors[0], xd->neighbors[1],
@@ -1712,12 +1687,10 @@
write_intra_y_mode_nonkf(ec_ctx, bsize, mode, w);
}
-#if CONFIG_FORWARDSKIP
if (allow_fsc_intra(cm, xd, bsize, mbmi) && xd->tree_type != CHROMA_PART) {
aom_cdf_prob *fsc_cdf = get_fsc_mode_cdf(xd, bsize, is_keyframe);
write_fsc_mode(mbmi->fsc_mode[xd->tree_type == CHROMA_PART], w, fsc_cdf);
}
-#endif // CONFIG_FORWARDSKIP
// Y angle delta.
if (use_angle_delta && av1_is_directional_mode(mode)) {
write_angle_delta(w, mbmi->angle_delta[PLANE_TYPE_Y],
@@ -1967,11 +1940,7 @@
}
#endif // CONFIG_IBC_SR_EXT
if (!is_inter) {
-#if CONFIG_AIMC && !CONFIG_FORWARDSKIP
- write_intra_prediction_modes(cpi, w);
-#else
write_intra_prediction_modes(cpi, 0, w);
-#endif // CONFIG_AIMC
} else {
int16_t mode_ctx;
@@ -2322,11 +2291,7 @@
if (is_intrabc_block(mbmi, xd->tree_type)) return;
}
-#if CONFIG_AIMC && !CONFIG_FORWARDSKIP
- write_intra_prediction_modes(cpi, w);
-#else
write_intra_prediction_modes(cpi, 1, w);
-#endif // CONFIG_AIMC
}
#if CONFIG_RD_DEBUG
@@ -4533,9 +4498,7 @@
#if CONFIG_BAWP
aom_wb_write_bit(wb, seq_params->enable_bawp);
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
aom_wb_write_bit(wb, seq_params->enable_fsc);
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_CCSO
aom_wb_write_bit(wb, seq_params->enable_ccso);
#endif
diff --git a/av1/encoder/block.h b/av1/encoder/block.h
index bb207ee..371d359 100644
--- a/av1/encoder/block.h
+++ b/av1/encoder/block.h
@@ -197,7 +197,6 @@
#endif // CONFIG_CONTEXT_DERIVATION
//! Cost for encoding an increment to the coefficient
int lps_cost[LEVEL_CONTEXTS][COEFF_BASE_RANGE + 1 + COEFF_BASE_RANGE + 1];
-#if CONFIG_FORWARDSKIP
//! Cost for encoding the base level of a coefficient for IDTX blocks
int idtx_base_cost[IDTX_SIG_COEF_CONTEXTS][8];
//! Cost for encoding the sign of a coefficient for IDTX blocks
@@ -205,7 +204,6 @@
//! Cost for encoding an increment to the coefficient for IDTX blocks
int lps_cost_skip[IDTX_LEVEL_CONTEXTS]
[COEFF_BASE_RANGE + 1 + COEFF_BASE_RANGE + 1];
-#endif // CONFIG_FORWARDSKIP
} LV_MAP_COEFF_COST;
/*! \brief Costs for encoding the eob.
@@ -794,10 +792,8 @@
//! mrl_index_cost
int mrl_index_cost[MRL_LINE_NUMBER];
-#if CONFIG_FORWARDSKIP
//! Cost of signaling the forward skip coding mode
int fsc_cost[FSC_MODE_CONTEXTS][FSC_BSIZE_CONTEXTS][FSC_MODES];
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_IMPROVED_CFL
//! Cost of signaling the cfl mode
int cfl_index_cost[CFL_TYPE_COUNT];
diff --git a/av1/encoder/encodeframe_utils.c b/av1/encoder/encodeframe_utils.c
index bdc85a5..4fb239e 100644
--- a/av1/encoder/encodeframe_utils.c
+++ b/av1/encoder/encodeframe_utils.c
@@ -482,7 +482,6 @@
}
}
-#if CONFIG_FORWARDSKIP
static INLINE void update_fsc_cdf(const AV1_COMMON *const cm, MACROBLOCKD *xd,
#if CONFIG_ENTROPY_STATS
FRAME_COUNTS *counts,
@@ -501,7 +500,6 @@
FSC_MODES);
}
}
-#endif // CONFIG_FORWARDSKIP
void av1_sum_intra_stats(const AV1_COMMON *const cm, FRAME_COUNTS *counts,
MACROBLOCKD *xd, const MB_MODE_INFO *const mbmi) {
@@ -512,9 +510,7 @@
(void)counts;
const BLOCK_SIZE bsize = mbmi->sb_type[xd->tree_type == CHROMA_PART];
if (xd->tree_type != CHROMA_PART) {
-#if !CONFIG_AIMC || CONFIG_FORWARDSKIP
const int intraonly = frame_is_intra_only(cm);
-#endif // !CONFIG_AIMC || CONFIG_FORWARDSKIP
#if CONFIG_AIMC
const int context = get_y_mode_idx_ctx(xd);
const int mode_idx = mbmi->y_mode_idx;
@@ -538,13 +534,11 @@
update_cdf(fc->y_mode_idx_cdf_1[context], mode_idx_in_set,
SECOND_MODE_COUNT);
}
-#if CONFIG_FORWARDSKIP
update_fsc_cdf(cm, xd,
#if CONFIG_ENTROPY_STATS
counts,
#endif // CONFIG_ENTROPY_STATS
intraonly);
-#endif // CONFIG_FORWARDSKIP
#else
if (intraonly) {
#if CONFIG_ENTROPY_STATS
@@ -560,13 +554,11 @@
#endif // CONFIG_ENTROPY_STATS
update_cdf(fc->y_mode_cdf[size_group_lookup[bsize]], y_mode, INTRA_MODES);
}
-#if CONFIG_FORWARDSKIP
update_fsc_cdf(cm, xd,
#if CONFIG_ENTROPY_STATS
counts,
#endif // CONFIG_ENTROPY_STATS
intraonly);
-#endif // CONFIG_FORWARDSKIP
#endif // CONFIG_AIMC
if (cm->seq_params.enable_mrls && av1_is_directional_mode(mbmi->mode)) {
#if CONFIG_ENTROPY_STATS
@@ -1220,12 +1212,10 @@
AVERAGE_CDF(ctx_left->coeff_br_lf_cdf, ctx_tr->coeff_br_lf_cdf, BR_CDF_SIZE);
#endif // CONFIG_ATC_COEFCODING
AVERAGE_CDF(ctx_left->coeff_base_cdf, ctx_tr->coeff_base_cdf, 4);
-#if CONFIG_FORWARDSKIP
AVERAGE_CDF(ctx_left->idtx_sign_cdf, ctx_tr->idtx_sign_cdf, 2);
AVERAGE_CDF(ctx_left->coeff_base_cdf_idtx, ctx_tr->coeff_base_cdf_idtx, 4);
AVERAGE_CDF(ctx_left->coeff_br_cdf_idtx, ctx_tr->coeff_br_cdf_idtx,
BR_CDF_SIZE);
-#endif // CONFIG_FORWARDSKIP
AVERAGE_CDF(ctx_left->coeff_br_cdf, ctx_tr->coeff_br_cdf, BR_CDF_SIZE);
AVERAGE_CDF(ctx_left->inter_single_mode_cdf, ctx_tr->inter_single_mode_cdf,
INTER_SINGLE_MODES);
@@ -1377,9 +1367,7 @@
#if CONFIG_LR_MERGE_COEFFS
AVERAGE_CDF(ctx_left->merged_param_cdf, ctx_tr->merged_param_cdf, 2);
#endif // CONFIG_LR_MERGE_COEFFS
-#if CONFIG_FORWARDSKIP
AVERAGE_CDF(ctx_left->fsc_mode_cdf, ctx_tr->fsc_mode_cdf, FSC_MODES);
-#endif // CONFIG_FORWARDSKIP
AVERAGE_CDF(ctx_left->mrl_index_cdf, ctx_tr->mrl_index_cdf, MRL_LINE_NUMBER);
#if CONFIG_IMPROVED_CFL
diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c
index 65a35d0..16fe6cc 100644
--- a/av1/encoder/encodemb.c
+++ b/av1/encoder/encodemb.c
@@ -369,18 +369,13 @@
(tran_low_t)((per_px_mean * dc_coeff_scale[txfm_param->tx_size]) >> 12);
}
-void av1_xform_quant(
-#if CONFIG_FORWARDSKIP
- const AV1_COMMON *cm,
-#endif // CONFIG_FORWARDSKIP
- MACROBLOCK *x, int plane, int block, int blk_row, int blk_col,
- BLOCK_SIZE plane_bsize, TxfmParam *txfm_param, QUANT_PARAM *qparam) {
-#if CONFIG_FORWARDSKIP
+void av1_xform_quant(const AV1_COMMON *cm, MACROBLOCK *x, int plane, int block,
+ int blk_row, int blk_col, BLOCK_SIZE plane_bsize,
+ TxfmParam *txfm_param, QUANT_PARAM *qparam) {
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = xd->mi[0];
const struct macroblock_plane *const p = &x->plane[plane];
const int is_inter = is_inter_block(mbmi, xd->tree_type);
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_CROSS_CHROMA_TX
if (is_cctx_allowed(cm, xd)) {
// In the pipeline of cross-chroma transform, the forward transform for
@@ -415,14 +410,11 @@
#if CONFIG_CROSS_CHROMA_TX
}
#endif // CONFIG_CROSS_CHROMA_TX
-#if CONFIG_FORWARDSKIP
const uint8_t fsc_mode =
(mbmi->fsc_mode[xd->tree_type == CHROMA_PART] && plane == PLANE_TYPE_Y) ||
use_inter_fsc(cm, plane, txfm_param->tx_type, is_inter);
if (fsc_mode) qparam->use_optimize_b = false;
-#endif // CONFIG_FORWARDSKIP
av1_quant(x, plane, block, txfm_param, qparam);
-#if CONFIG_FORWARDSKIP
if (fsc_mode) {
#if CONFIG_IST
if (get_primary_tx_type(txfm_param->tx_type) == IDTX) {
@@ -433,7 +425,6 @@
if (*eob != 0) *eob = av1_get_max_eob(txfm_param->tx_size);
}
}
-#endif // CONFIG_FORWARDSKIP
}
void av1_xform(MACROBLOCK *x, int plane, int block, int blk_row, int blk_col,
@@ -573,9 +564,7 @@
if ((txfm_param->intra_mode < PAETH_PRED) &&
!xd->lossless[mbmi->segment_id] &&
!(mbmi->filter_intra_mode_info.use_filter_intra) &&
-#if CONFIG_FORWARDSKIP
!(mbmi->fsc_mode[xd->tree_type == CHROMA_PART]) &&
-#endif // CONFIG_FORWARDSKIP
cm->seq_params.enable_ist) {
txfm_param->sec_tx_type = get_secondary_tx_type(tx_type);
}
@@ -611,14 +600,12 @@
qparam->iqmatrix = NULL;
}
-#if CONFIG_FORWARDSKIP
void av1_update_trellisq(int use_optimize_b, int xform_quant_idx,
int use_quant_b_adapt, QUANT_PARAM *qparam) {
qparam->use_quant_b_adapt = use_quant_b_adapt;
qparam->use_optimize_b = use_optimize_b;
qparam->xform_quant_idx = xform_quant_idx;
}
-#endif // CONFIG_FORWARDSKIP
void av1_setup_qmatrix(const CommonQuantParams *quant_params,
const MACROBLOCKD *xd, int plane, TX_SIZE tx_size,
@@ -681,17 +668,12 @@
TxfmParam txfm_param;
QUANT_PARAM quant_param;
-#if CONFIG_FORWARDSKIP
const int is_inter = is_inter_block(mbmi, xd->tree_type);
const int fsc_mode = (mbmi->fsc_mode[xd->tree_type == CHROMA_PART] &&
plane == PLANE_TYPE_Y) ||
use_inter_fsc(cm, plane, tx_type, is_inter);
-#endif // CONFIG_FORWARDSKIP
- const int use_trellis = is_trellis_used(args->enable_optimize_b, dry_run)
-#if CONFIG_FORWARDSKIP
- && !fsc_mode
-#endif // CONFIG_FORWARDSKIP
- ;
+ const int use_trellis =
+ is_trellis_used(args->enable_optimize_b, dry_run) && !fsc_mode;
#if CONFIG_PAR_HIDING
bool enable_parity_hiding =
cm->features.allow_parity_hiding && !xd->lossless[mbmi->segment_id] &&
@@ -716,12 +698,8 @@
cpi->oxcf.q_cfg.quant_b_adapt, &quant_param);
av1_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, tx_type,
&quant_param);
- av1_xform_quant(
-#if CONFIG_FORWARDSKIP
- cm,
-#endif // CONFIG_FORWARDSKIP
- x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param,
- &quant_param);
+ av1_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize,
+ &txfm_param, &quant_param);
// Whether trellis or dropout optimization is required for inter frames.
const bool do_trellis = INTER_BLOCK_OPT_TYPE == TRELLIS_OPT ||
@@ -731,22 +709,15 @@
if (quant_param.use_optimize_b && do_trellis) {
TXB_CTX txb_ctx;
- get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx
-#if CONFIG_FORWARDSKIP
- ,
- mbmi->fsc_mode[xd->tree_type == CHROMA_PART]
-#endif // CONFIG_FORWARDSKIP
- );
+ get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx,
+ mbmi->fsc_mode[xd->tree_type == CHROMA_PART]);
av1_optimize_b(args->cpi, x, plane, block, tx_size, tx_type,
#if CONFIG_CROSS_CHROMA_TX
cctx_type,
#endif // CONFIG_CROSS_CHROMA_TX
&txb_ctx, &dummy_rate_cost);
}
- if (!quant_param.use_optimize_b && do_dropout
-#if CONFIG_FORWARDSKIP
- && !fsc_mode
-#endif // CONFIG_FORWARDSKIP
+ if (!quant_param.use_optimize_b && do_dropout && !fsc_mode
#if CONFIG_PAR_HIDING
&& !enable_parity_hiding
#endif // CONFIG_PAR_HIDING
@@ -1061,12 +1032,8 @@
&quant_param);
av1_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, DCT_DCT,
&quant_param);
- av1_xform_quant(
-#if CONFIG_FORWARDSKIP
- cm,
-#endif // CONFIG_FORWARDSKIP
- x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param,
- &quant_param);
+ av1_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize,
+ &txfm_param, &quant_param);
if (p->eobs[block] > 0) {
txfm_param.eob = p->eobs[block];
@@ -1211,10 +1178,8 @@
const AV1_COMMON *const cm = &cpi->common;
MACROBLOCK *const x = args->x;
MACROBLOCKD *const xd = &x->e_mbd;
-#if CONFIG_FORWARDSKIP
MB_MODE_INFO *const mbmi = xd->mi[0];
const int is_inter = is_inter_block(mbmi, xd->tree_type);
-#endif // CONFIG_FORWARDSKIP
struct macroblock_plane *const p = &x->plane[plane];
struct macroblockd_plane *const pd = &xd->plane[plane];
tran_low_t *dqcoeff = p->dqcoeff + BLOCK_OFFSET(block);
@@ -1256,17 +1221,11 @@
cm->features.reduced_tx_set_used);
TxfmParam txfm_param;
QUANT_PARAM quant_param;
-#if CONFIG_FORWARDSKIP
const uint8_t fsc_mode = (mbmi->fsc_mode[xd->tree_type == CHROMA_PART] &&
plane == PLANE_TYPE_Y) ||
use_inter_fsc(cm, plane, tx_type, is_inter);
-#endif // CONFIG_FORWARDSKIP
const int use_trellis =
- is_trellis_used(args->enable_optimize_b, args->dry_run)
-#if CONFIG_FORWARDSKIP
- && !fsc_mode
-#endif // CONFIG_FORWARDSKIP
- ;
+ is_trellis_used(args->enable_optimize_b, args->dry_run) && !fsc_mode;
#if CONFIG_PAR_HIDING
bool enable_parity_hiding =
cm->features.allow_parity_hiding && !xd->lossless[mbmi->segment_id] &&
@@ -1292,12 +1251,8 @@
cpi->oxcf.q_cfg.quant_b_adapt, &quant_param);
av1_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, tx_type,
&quant_param);
- av1_xform_quant(
-#if CONFIG_FORWARDSKIP
- cm,
-#endif // CONFIG_FORWARDSKIP
- x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param,
- &quant_param);
+ av1_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize,
+ &txfm_param, &quant_param);
#if DEBUG_EXTQUANT
if (args->dry_run == OUTPUT_ENABLED) {
fprintf(cm->fEncCoeffLog, "tx_type = %d, eob = %d\n", tx_type, *eob);
@@ -1324,22 +1279,15 @@
if (quant_param.use_optimize_b && do_trellis) {
TXB_CTX txb_ctx;
- get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx
-#if CONFIG_FORWARDSKIP
- ,
- mbmi->fsc_mode[xd->tree_type == CHROMA_PART]
-#endif // CONFIG_FORWARDSKIP
- );
+ get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx,
+ mbmi->fsc_mode[xd->tree_type == CHROMA_PART]);
av1_optimize_b(args->cpi, x, plane, block, tx_size, tx_type,
#if CONFIG_CROSS_CHROMA_TX
CCTX_NONE,
#endif // CONFIG_CROSS_CHROMA_TX
&txb_ctx, &dummy_rate_cost);
}
- if (do_dropout
-#if CONFIG_FORWARDSKIP
- && !fsc_mode
-#endif // CONFIG_FORWARDSKIP
+ if (do_dropout && !fsc_mode
#if CONFIG_PAR_HIDING
&& !enable_parity_hiding
#endif // CONFIG_PAR_HIDING
@@ -1522,24 +1470,16 @@
}
av1_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, tx_type,
&quant_param);
- av1_xform_quant(
-#if CONFIG_FORWARDSKIP
- cm,
-#endif // CONFIG_FORWARDSKIP
- x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param,
- &quant_param);
+ av1_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize,
+ &txfm_param, &quant_param);
if (quant_param.use_optimize_b && do_trellis) {
const ENTROPY_CONTEXT *a =
&args->ta[blk_col + (plane - AOM_PLANE_U) * MAX_MIB_SIZE];
const ENTROPY_CONTEXT *l =
&args->tl[blk_row + (plane - AOM_PLANE_U) * MAX_MIB_SIZE];
TXB_CTX txb_ctx;
- get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx
-#if CONFIG_FORWARDSKIP
- ,
- xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART]
-#endif // CONFIG_FORWARDSKIP
- );
+ get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx,
+ xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART]);
av1_optimize_b(args->cpi, x, plane, block, tx_size, tx_type, cctx_type,
&txb_ctx, &dummy_rate_cost);
}
diff --git a/av1/encoder/encodemb.h b/av1/encoder/encodemb.h
index 918d0d7..989e0ea 100644
--- a/av1/encoder/encodemb.h
+++ b/av1/encoder/encodemb.h
@@ -86,10 +86,8 @@
void av1_setup_quant(TX_SIZE tx_size, int use_optimize_b, int xform_quant_idx,
int use_quant_b_adapt, QUANT_PARAM *qparam);
-#if CONFIG_FORWARDSKIP
void av1_update_trellisq(int use_optimize_b, int xform_quant_idx,
int use_quant_b_adapt, QUANT_PARAM *qparam);
-#endif // CONFIG_FORWARDSKIP
void av1_setup_qmatrix(const CommonQuantParams *quant_params,
const MACROBLOCKD *xd, int plane, TX_SIZE tx_size,
@@ -98,12 +96,9 @@
void av1_xform_dc_only(MACROBLOCK *x, int plane, int block,
TxfmParam *txfm_param, int64_t per_px_mean);
-void av1_xform_quant(
-#if CONFIG_FORWARDSKIP
- const AV1_COMMON *cm,
-#endif // CONFIG_FORWARDSKIP
- MACROBLOCK *x, int plane, int block, int blk_row, int blk_col,
- BLOCK_SIZE plane_bsize, TxfmParam *txfm_param, QUANT_PARAM *qparam);
+void av1_xform_quant(const AV1_COMMON *cm, MACROBLOCK *x, int plane, int block,
+ int blk_row, int blk_col, BLOCK_SIZE plane_bsize,
+ 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
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 035192c..e45c2dd 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -477,9 +477,7 @@
seq->enable_sdp = oxcf->part_cfg.enable_sdp;
seq->enable_mrls = oxcf->intra_mode_cfg.enable_mrls;
-#if CONFIG_FORWARDSKIP
seq->enable_fsc = oxcf->intra_mode_cfg.enable_fsc;
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
seq->enable_orip = oxcf->intra_mode_cfg.enable_orip;
#endif
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 45ce4d9..3f256c7 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -278,12 +278,10 @@
* should be enabled.
*/
bool enable_mrls;
-#if CONFIG_FORWARDSKIP
/*!
* Flag to indicate if forward skip coding is enabled
*/
bool enable_fsc;
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
/*!
* Flag to indicate if ORIP should be enabled
@@ -1223,9 +1221,7 @@
unsigned int y_mode[BLOCK_SIZE_GROUPS][INTRA_MODES];
unsigned int uv_mode[CFL_ALLOWED_TYPES][INTRA_MODES][UV_INTRA_MODES];
#endif
-#if CONFIG_FORWARDSKIP
unsigned int fsc_mode[FSC_MODE_CONTEXTS][FSC_BSIZE_CONTEXTS][FSC_MODES];
-#endif // CONFIG_FORWARDSKIP
unsigned int mrl_index[MRL_LINE_NUMBER];
#if CONFIG_IMPROVED_CFL
unsigned int cfl_index[CFL_TYPE_COUNT];
@@ -1264,14 +1260,12 @@
[DC_SIGN_CONTEXTS][2];
unsigned int v_ac_sign[TOKEN_CDF_Q_CTXS][CROSS_COMPONENT_CONTEXTS][2];
#endif // CONFIG_CONTEXT_DERIVATION
-#if CONFIG_FORWARDSKIP
unsigned int idtx_sign[TOKEN_CDF_Q_CTXS][IDTX_SIGN_CONTEXTS][2];
unsigned int coeff_lps_skip[BR_CDF_SIZE - 1][IDTX_LEVEL_CONTEXTS][2];
unsigned int coeff_lps_multi_skip[TOKEN_CDF_Q_CTXS][IDTX_LEVEL_CONTEXTS]
[BR_CDF_SIZE];
unsigned int coeff_base_multi_skip[TOKEN_CDF_Q_CTXS][IDTX_SIG_COEF_CONTEXTS]
[NUM_BASE_LEVELS + 2];
-#endif // CONFIG_FORWARDSKIP
unsigned int coeff_lps[TX_SIZES][PLANE_TYPES][BR_CDF_SIZE - 1][LEVEL_CONTEXTS]
[2];
unsigned int eob_flag[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS][2];
diff --git a/av1/encoder/encodetxb.c b/av1/encoder/encodetxb.c
index 8e167f0..0ca1100 100644
--- a/av1/encoder/encodetxb.c
+++ b/av1/encoder/encodetxb.c
@@ -17,9 +17,7 @@
#include "av1/common/idct.h"
#include "av1/common/pred_common.h"
#include "av1/common/scan.h"
-#if CONFIG_FORWARDSKIP
#include "av1/common/reconintra.h"
-#endif // CONFIG_FORWARDSKIP
#include "av1/encoder/bitstream.h"
#include "av1/encoder/cost.h"
#include "av1/encoder/encodeframe.h"
@@ -409,7 +407,6 @@
#endif // CONFIG_ATC_COEFCODING
}
-#if CONFIG_FORWARDSKIP
static INLINE int get_nz_map_ctx_skip(const uint8_t *const levels,
const int coeff_idx, const int bwl) {
const int stats =
@@ -469,7 +466,6 @@
}
}
}
-#endif // CONFIG_FORWARDSKIP
void av1_txb_init_levels_c(const tran_low_t *const coeff, const int width,
const int height, uint8_t *const levels) {
@@ -518,7 +514,6 @@
}
}
-#if CONFIG_FORWARDSKIP
void av1_get_nz_map_contexts_skip_c(const uint8_t *const levels,
const int16_t *const scan,
const uint16_t eob, const TX_SIZE tx_size,
@@ -662,7 +657,6 @@
}
}
}
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_PAR_HIDING
static INLINE void write_coeff_hidden(aom_writer *w, TX_CLASS tx_class,
@@ -705,47 +699,8 @@
const uint16_t *eob_txb = cb_coef_buff->eobs[plane] + txb_offset;
const uint16_t eob = eob_txb[block];
const uint8_t *entropy_ctx = cb_coef_buff->entropy_ctx[plane] + txb_offset;
-#if !CONFIG_FORWARDSKIP
-#if CONFIG_CONTEXT_DERIVATION
- int txb_skip_ctx = (entropy_ctx[block] & TXB_SKIP_CTX_MASK);
- if (plane == AOM_PLANE_V) {
- txb_skip_ctx += (xd->eob_u_flag ? V_TXB_SKIP_CONTEXT_OFFSET : 0);
- }
-#else
- const int txb_skip_ctx = entropy_ctx[block] & TXB_SKIP_CTX_MASK;
-#endif // CONFIG_CONTEXT_DERIVATION
-#endif // CONFIG_FORWARDSKIP
const TX_SIZE txs_ctx = get_txsize_entropy_ctx(tx_size);
FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-
-#if !CONFIG_FORWARDSKIP
-#if CONFIG_CROSS_CHROMA_TX && CCTX_C2_DROPPED
- if (plane == AOM_PLANE_V && is_cctx_allowed(cm, xd)) {
- CctxType cctx_type = av1_get_cctx_type(xd, blk_row, blk_col);
- if (!keep_chroma_c2(cctx_type)) return 0;
- }
-#endif // CONFIG_CROSS_CHROMA_TX && CCTX_C2_DROPPED
-#if CONFIG_CONTEXT_DERIVATION
- if (plane == AOM_PLANE_U) {
- xd->eob_u_flag = eob ? 1 : 0;
- }
- if (plane == AOM_PLANE_Y || plane == AOM_PLANE_U) {
- aom_write_symbol(w, eob == 0, ec_ctx->txb_skip_cdf[txs_ctx][txb_skip_ctx],
- 2);
- } else {
- aom_write_symbol(w, eob == 0, ec_ctx->v_txb_skip_cdf[txb_skip_ctx], 2);
- }
-#else
- aom_write_symbol(w, eob == 0, ec_ctx->txb_skip_cdf[txs_ctx][txb_skip_ctx], 2);
-#endif // CONFIG_CONTEXT_DERIVATION
-
-#if CONFIG_CROSS_CHROMA_TX
- if (plane == AOM_PLANE_U && eob > 0 && is_cctx_allowed(cm, xd)) {
- CctxType cctx_type = av1_get_cctx_type(xd, blk_row, blk_col);
- av1_write_cctx_type(cm, xd, cctx_type, tx_size, w);
- }
-#endif // CONFIG_CROSS_CHROMA_TX
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_PC_WIENER
assert((eob == 0) ==
av1_get_txk_skip(cm, xd->mi_row, xd->mi_col, plane, blk_row, blk_col));
@@ -756,12 +711,6 @@
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_FORWARDSKIP
- // Only y plane's tx_type is transmitted
- if (plane == 0) {
- av1_write_tx_type(cm, xd, tx_type, tx_size, w);
- }
-#endif // CONFIG_FORWARDSKIP
#if DEBUG_EXTQUANT
fprintf(cm->fEncCoeffLog, "\nblk_row=%d,blk_col=%d,plane=%d,tx_size=%d",
@@ -1172,10 +1121,8 @@
void av1_write_intra_coeffs_mb(const AV1_COMMON *const cm, MACROBLOCK *x,
aom_writer *w, BLOCK_SIZE bsize) {
MACROBLOCKD *xd = &x->e_mbd;
-#if CONFIG_FORWARDSKIP
const MB_MODE_INFO *const mbmi = xd->mi[0];
const int is_inter = is_inter_block(mbmi, xd->tree_type);
-#endif // CONFIG_FORWARDSKIP
int block[MAX_MB_PLANE] = { 0 };
int row, col;
assert(bsize == get_plane_block_size(bsize, xd->plane[0].subsampling_x,
@@ -1220,18 +1167,15 @@
// because the transform information for both planes are needed at
// once at the decoder side.
if (plane == AOM_PLANE_V && is_cctx_allowed(cm, xd)) {
-#if CONFIG_FORWARDSKIP
const int code_rest =
av1_write_sig_txtype(cm, x, w, blk_row, blk_col, AOM_PLANE_U,
block[AOM_PLANE_U], tx_size);
if (code_rest)
-#endif // CONFIG_FORWARDSKIP
av1_write_coeffs_txb(cm, x, w, blk_row, blk_col, AOM_PLANE_U,
block[AOM_PLANE_U], tx_size);
block[AOM_PLANE_U] += step;
}
#endif // CONFIG_CROSS_CHROMA_TX
-#if CONFIG_FORWARDSKIP
const int code_rest = av1_write_sig_txtype(
cm, x, w, blk_row, blk_col, plane, block[plane], tx_size);
const TX_TYPE tx_type =
@@ -1253,10 +1197,6 @@
block[plane], tx_size);
}
}
-#else
- av1_write_coeffs_txb(cm, x, w, blk_row, blk_col, plane,
- block[plane], tx_size);
-#endif // CONFIG_FORWARDSKIP
block[plane] += step;
}
}
@@ -1300,12 +1240,10 @@
const TX_SIZE square_tx_size = txsize_sqr_map[tx_size];
const MB_MODE_INFO *mbmi = xd->mi[0];
-#if CONFIG_FORWARDSKIP
if (mbmi->fsc_mode[xd->tree_type == CHROMA_PART] &&
!is_inter_block(mbmi, xd->tree_type) && plane == PLANE_TYPE_Y) {
return 0;
}
-#endif // CONFIG_FORWARDSKIP
const int is_inter = is_inter_block(mbmi, xd->tree_type);
if (get_ext_tx_types(tx_size, is_inter, reduced_tx_set_used) > 1 &&
!xd->lossless[xd->mi[0]->segment_id]) {
@@ -1385,7 +1323,6 @@
*eob = eob_out;
}
-#if CONFIG_FORWARDSKIP
static AOM_FORCE_INLINE int warehouse_efficients_txb_skip(
#if CONFIG_CROSS_CHROMA_TX
const AV1_COMMON *cm,
@@ -1451,7 +1388,6 @@
}
return cost;
}
-#endif // CONFIG_FORWARDSKIP
static AOM_FORCE_INLINE int warehouse_efficients_txb(
#if CONFIG_CROSS_CHROMA_TX
@@ -1738,10 +1674,7 @@
}
static AOM_FORCE_INLINE int warehouse_efficients_txb_laplacian(
-#if CONFIG_FORWARDSKIP || CONFIG_CROSS_CHROMA_TX
- const AV1_COMMON *cm,
-#endif // CONFIG_FORWARDSKIP || CONFIG_CROSS_CHROMA_TX
- const MACROBLOCK *x, const int plane, const int block,
+ const AV1_COMMON *cm, const MACROBLOCK *x, const int plane, const int block,
const TX_SIZE tx_size, const TXB_CTX *const txb_ctx, const int eob,
const PLANE_TYPE plane_type, const LV_MAP_COEFF_COST *const coeff_costs,
const MACROBLOCKD *const xd, const TX_TYPE tx_type,
@@ -1783,11 +1716,6 @@
cost += get_cctx_type_cost(cm, x, xd, plane, tx_size, block, cctx_type);
#endif // CONFIG_CROSS_CHROMA_TX
-#if !CONFIG_FORWARDSKIP
- cost += get_eob_cost(eob, eob_costs, coeff_costs, tx_class);
-#endif // CONFIG_FORWARDSKIP
-
-#if CONFIG_FORWARDSKIP
const MB_MODE_INFO *mbmi = xd->mi[0];
if ((mbmi->fsc_mode[xd->tree_type == CHROMA_PART] &&
#if CONFIG_IST
@@ -1802,9 +1730,6 @@
cost += get_eob_cost(eob, eob_costs, coeff_costs, tx_class);
cost += av1_cost_coeffs_txb_estimate(x, plane, block, tx_size, tx_type);
}
-#else
- cost += av1_cost_coeffs_txb_estimate(x, plane, block, tx_size, tx_type);
-#endif // CONFIG_FORWARDSKIP
return cost;
}
@@ -1852,7 +1777,6 @@
return cost;
}
-#if CONFIG_FORWARDSKIP
int av1_cost_coeffs_txb_skip_estimate(const MACROBLOCK *x, const int plane,
const int block, const TX_SIZE tx_size,
const TX_TYPE tx_type) {
@@ -1874,15 +1798,10 @@
cost += (const_term + loge_par) * (eob - 1);
return cost;
}
-#endif // CONFIG_FORWARDSKIP
-#if CONFIG_FORWARDSKIP || CONFIG_CROSS_CHROMA_TX
int av1_cost_coeffs_txb(const AV1_COMMON *cm, const MACROBLOCK *x,
- const int plane, const int block,
-#else
-int av1_cost_coeffs_txb(const MACROBLOCK *x, const int plane, const int block,
-#endif // CONFIG_FORWARDSKIP
- const TX_SIZE tx_size, const TX_TYPE tx_type,
+ const int plane, const int block, const TX_SIZE tx_size,
+ const TX_TYPE tx_type,
#if CONFIG_CROSS_CHROMA_TX
const CctxType cctx_type,
#endif // CONFIG_CROSS_CHROMA_TX
@@ -1931,7 +1850,7 @@
plane == PLANE_TYPE_Y &&
get_primary_tx_type(tx_type) < IDTX;
#endif // CONFIG_PAR_HIDING
-#if CONFIG_FORWARDSKIP
+
const MB_MODE_INFO *mbmi = xd->mi[0];
if ((mbmi->fsc_mode[xd->tree_type == CHROMA_PART] &&
#if CONFIG_IST
@@ -1966,36 +1885,17 @@
#endif // CONFIG_PAR_HIDING
);
}
-#else
- return warehouse_efficients_txb(
-#if CONFIG_CROSS_CHROMA_TX
- cm,
-#endif // CONFIG_CROSS_CHROMA_TX
- x, plane, block, tx_size, txb_ctx, p, eob, plane_type, coeff_costs, xd,
- tx_type,
-#if CONFIG_CROSS_CHROMA_TX
- cctx_type,
-#endif // CONFIG_CROSS_CHROMA_TX
- tx_class, reduced_tx_set_used
-#if CONFIG_PAR_HIDING
- ,
- enable_parity_hiding, &x->coeff_costs.coeff_costs[0][0]
-#endif // CONFIG_PAR_HIDING
- );
-#endif // CONFIG_FORWARDSKIP
}
-int av1_cost_coeffs_txb_laplacian(
-#if CONFIG_FORWARDSKIP || CONFIG_CROSS_CHROMA_TX
- const AV1_COMMON *cm,
-#endif // CONFIG_FORWARDSKIP
- const MACROBLOCK *x, const int plane, const int block,
- const TX_SIZE tx_size, const TX_TYPE tx_type,
+int av1_cost_coeffs_txb_laplacian(const AV1_COMMON *cm, const MACROBLOCK *x,
+ const int plane, const int block,
+ const TX_SIZE tx_size, const TX_TYPE tx_type,
#if CONFIG_CROSS_CHROMA_TX
- const CctxType cctx_type,
+ const CctxType cctx_type,
#endif // CONFIG_CROSS_CHROMA_TX
- const TXB_CTX *const txb_ctx, const int reduced_tx_set_used,
- const int adjust_eob) {
+ const TXB_CTX *const txb_ctx,
+ const int reduced_tx_set_used,
+ const int adjust_eob) {
const struct macroblock_plane *p = &x->plane[plane];
int eob = p->eobs[block];
@@ -2042,16 +1942,13 @@
const TX_CLASS tx_class = tx_type_to_class[tx_type];
#endif
- return warehouse_efficients_txb_laplacian(
-#if CONFIG_FORWARDSKIP || CONFIG_CROSS_CHROMA_TX
- cm,
-#endif // CONFIG_FORWARDSKIP || CONFIG_CROSS_CHROMA_TX
- x, plane, block, tx_size, txb_ctx, eob, plane_type, coeff_costs, xd,
- tx_type,
+ return warehouse_efficients_txb_laplacian(cm, x, plane, block, tx_size,
+ txb_ctx, eob, plane_type,
+ coeff_costs, xd, tx_type,
#if CONFIG_CROSS_CHROMA_TX
- cctx_type,
+ cctx_type,
#endif // CONFIG_CROSS_CHROMA_TX
- tx_class, reduced_tx_set_used);
+ tx_class, reduced_tx_set_used);
}
static AOM_FORCE_INLINE int get_two_coeff_cost_simple(
@@ -3523,12 +3420,9 @@
[av1_ext_tx_ind[tx_set_type][tx_type]];
#endif // CONFIG_ENTROPY_STATS
} else {
-#if CONFIG_FORWARDSKIP
if (mbmi->fsc_mode[xd->tree_type == CHROMA_PART] && allow_update_cdf) {
return;
}
-
-#endif // CONFIG_FORWARDSKIP
PREDICTION_MODE intra_dir;
if (mbmi->filter_intra_mode_info.use_filter_intra)
intra_dir = fimode_to_intradir[mbmi->filter_intra_mode_info
@@ -3541,7 +3435,6 @@
#else
const TX_TYPE primary_tx_type = tx_type;
#endif // CONFIG_IST
-#if CONFIG_FORWARDSKIP
#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,
@@ -3552,10 +3445,6 @@
[av1_ext_tx_ind_intra[tx_set_type]
[primary_tx_type]];
#endif // CONFIG_ATC_NEWTXSETS
-#else
- ++counts->intra_ext_tx[eset][txsize_sqr_map[tx_size]][intra_dir]
- [av1_ext_tx_ind[tx_set_type][primary_tx_type]];
-#endif // CONFIG_FORWARDSKIP
#endif // CONFIG_ENTROPY_STATS
if (allow_update_cdf) {
update_cdf(
@@ -3566,7 +3455,6 @@
fc->intra_ext_tx_cdf[eset][txsize_sqr_map[tx_size]][intra_dir],
#endif // CONFIG_ATC_REDUCED_TXSET
#if CONFIG_IST
-#if CONFIG_FORWARDSKIP
#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]),
@@ -3574,16 +3462,8 @@
av1_ext_tx_ind_intra[tx_set_type][get_primary_tx_type(tx_type)],
#endif // CONFIG_ATC_NEWTXSETS
#else
- av1_ext_tx_ind[tx_set_type][get_primary_tx_type(tx_type)],
-#endif // CONFIG_FORWARDSKIP
-#else
-#if CONFIG_FORWARDSKIP
av1_ext_tx_ind_intra[tx_set_type][tx_type],
-#else
- av1_ext_tx_ind[tx_set_type][tx_type],
-#endif // CONFIG_FORWARDSKIP
#endif
-#if CONFIG_FORWARDSKIP
#if CONFIG_ATC_REDUCED_TXSET
cm->features.reduced_tx_set_used
? av1_num_reduced_tx_set
@@ -3591,9 +3471,6 @@
#else
av1_num_ext_tx_set_intra[tx_set_type]);
#endif // CONFIG_ATC_REDUCED_TXSET
-#else
- av1_num_ext_tx_set[tx_set_type]);
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_IST
// Modified condition for CDF update
#if CONFIG_IST_FIX_B098
@@ -3627,7 +3504,6 @@
#endif // CONFIG_IST_FIX_B076
}
-#if CONFIG_FORWARDSKIP
void av1_update_and_record_txb_skip_context(int plane, int block, int blk_row,
int blk_col, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg) {
@@ -3765,7 +3641,6 @@
av1_set_entropy_contexts(xd, pd, plane, plane_bsize, tx_size, cul_level,
blk_col, blk_row);
}
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_PAR_HIDING
void update_coeff_ctx_hiden(TX_CLASS tx_class, const int16_t *scan, int bwl,
@@ -3823,7 +3698,6 @@
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_FORWARDSKIP
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) ||
@@ -3836,7 +3710,6 @@
plane_bsize, tx_size, arg);
return;
}
-#endif // CONFIG_FORWARDSKIP
const SCAN_ORDER *const scan_order = get_scan(tx_size, tx_type);
tran_low_t *tcoeff;
assert(args->dry_run != DRY_RUN_COSTCOEFFS);
@@ -3845,12 +3718,7 @@
TXB_CTX txb_ctx;
get_txb_ctx(plane_bsize, tx_size, plane,
pd->above_entropy_context + blk_col,
- pd->left_entropy_context + blk_row, &txb_ctx
-#if CONFIG_FORWARDSKIP
- ,
- 0
-#endif // CONFIG_FORWARDSKIP
- );
+ pd->left_entropy_context + blk_row, &txb_ctx, 0);
#if CONFIG_CROSS_CHROMA_TX && CCTX_C2_DROPPED
if (plane == AOM_PLANE_V && is_cctx_allowed(cm, xd)) {
CctxType cctx_type = av1_get_cctx_type(xd, blk_row, blk_col);
diff --git a/av1/encoder/encodetxb.h b/av1/encoder/encodetxb.h
index ebf9786..b533c21 100644
--- a/av1/encoder/encodetxb.h
+++ b/av1/encoder/encodetxb.h
@@ -27,13 +27,8 @@
/*!\cond */
-#if CONFIG_FORWARDSKIP
#define TXB_SKIP_CTX_MASK 31
#define DC_SIGN_CTX_SHIFT 5
-#else
-#define TXB_SKIP_CTX_MASK 15
-#define DC_SIGN_CTX_SHIFT 4
-#endif // CONFIG_FORWARDSKIP
#define DC_SIGN_CTX_MASK 3
typedef struct TxbInfo {
@@ -126,16 +121,14 @@
* a reduced set.
*/
#endif // CONFIG_CROSS_CHROMA_TX
-int av1_cost_coeffs_txb(
-#if CONFIG_FORWARDSKIP
- const AV1_COMMON *cm,
-#endif // CONFIG_FORWARDSKIP
- const MACROBLOCK *x, const int plane, const int block,
- const TX_SIZE tx_size, const TX_TYPE tx_type,
+
+int av1_cost_coeffs_txb(const AV1_COMMON *cm, const MACROBLOCK *x,
+ const int plane, const int block, const TX_SIZE tx_size,
+ const TX_TYPE tx_type,
#if CONFIG_CROSS_CHROMA_TX
- const CctxType cctx_type,
+ const CctxType cctx_type,
#endif // CONFIG_CROSS_CHROMA_TX
- const TXB_CTX *const txb_ctx, int reduced_tx_set_used);
+ const TXB_CTX *const txb_ctx, int reduced_tx_set_used);
#if CONFIG_CROSS_CHROMA_TX
/*!\brief Estimate the entropy cost of coding a transform block using Laplacian
@@ -215,17 +208,15 @@
block.
*/
#endif // CONFIG_CROSS_CHROMA_TX
-int av1_cost_coeffs_txb_laplacian(
-#if CONFIG_FORWARDSKIP
- const AV1_COMMON *cm,
-#endif // CONFIG_FORWARDSKIP
- const MACROBLOCK *x, const int plane, const int block,
- const TX_SIZE tx_size, const TX_TYPE tx_type,
+int av1_cost_coeffs_txb_laplacian(const AV1_COMMON *cm, const MACROBLOCK *x,
+ const int plane, const int block,
+ const TX_SIZE tx_size, const TX_TYPE tx_type,
#if CONFIG_CROSS_CHROMA_TX
- const CctxType cctx_type,
+ const CctxType cctx_type,
#endif // CONFIG_CROSS_CHROMA_TX
- const TXB_CTX *const txb_ctx, const int reduced_tx_set_used,
- const int adjust_eob);
+ const TXB_CTX *const txb_ctx,
+ const int reduced_tx_set_used,
+ const int adjust_eob);
/*!\brief Estimate the entropy cost of transform coefficients using Laplacian
* distribution.
@@ -298,7 +289,6 @@
aom_writer *w, int blk_row, int blk_col, int plane,
int block, TX_SIZE tx_size);
-#if CONFIG_FORWARDSKIP
/*!\brief Write the transform unit skip flag and the transform type for Luma
*
* \ingroup coefficient_coding
@@ -400,7 +390,6 @@
void av1_write_coeffs_txb_skip(const AV1_COMMON *const cm, MACROBLOCK *const x,
aom_writer *w, int blk_row, int blk_col,
int plane, int block, TX_SIZE tx_size);
-#endif // CONFIG_FORWARDSKIP
/*!\brief Write quantized coefficients of all transform blocks in an intra
* macroblock into the bitstream using entropy coding.
@@ -498,7 +487,6 @@
int blk_col, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg);
-#if CONFIG_FORWARDSKIP
/*!\brief Update the probability model (cdf) and the entropy context related to
* coefficient coding for a transform block when the transform type is 2D
* identity (IDTX) and the forward skip residual coding mode is used..
@@ -538,7 +526,6 @@
void av1_update_and_record_txb_skip_context(int plane, int block, int blk_row,
int blk_col, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg);
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_CROSS_CHROMA_TX
/*!\brief Adjust the magnitude of quantized coefficients to achieve better
diff --git a/av1/encoder/intra_mode_search.c b/av1/encoder/intra_mode_search.c
index d3b4d2d..b2d10b5 100644
--- a/av1/encoder/intra_mode_search.c
+++ b/av1/encoder/intra_mode_search.c
@@ -50,10 +50,8 @@
mbmi->mode = DC_PRED;
mbmi->palette_mode_info.palette_size[0] = 0;
mbmi->mrl_index = 0;
-#if CONFIG_FORWARDSKIP
mbmi->fsc_mode[PLANE_TYPE_Y] = 0;
mbmi->fsc_mode[PLANE_TYPE_UV] = 0;
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_NEW_CONTEXT_MODELING
mbmi->use_intrabc[0] = 0;
mbmi->use_intrabc[1] = 0;
@@ -124,10 +122,8 @@
mbmi->angle_delta[PLANE_TYPE_Y] = 0;
mbmi->angle_delta[PLANE_TYPE_UV] = 0;
#endif
-#if CONFIG_FORWARDSKIP
mbmi->fsc_mode[PLANE_TYPE_Y] = 0;
mbmi->fsc_mode[PLANE_TYPE_UV] = 0;
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_NEW_CONTEXT_MODELING
mbmi->use_intrabc[0] = 0;
mbmi->use_intrabc[1] = 0;
@@ -1236,9 +1232,7 @@
if (this_rd < *best_intra_rd) {
*best_intra_rd = this_rd;
intra_search_state->best_intra_mode = mode;
-#if CONFIG_FORWARDSKIP
intra_search_state->best_fsc = mbmi->fsc_mode[xd->tree_type == CHROMA_PART];
-#endif // CONFIG_FORWARDSKIP
intra_search_state->best_mrl_index = mbmi->mrl_index;
}
@@ -1255,7 +1249,6 @@
return this_rd;
}
-#if CONFIG_FORWARDSKIP
void search_fsc_mode(const AV1_COMP *const cpi, MACROBLOCK *x, int *rate,
int *rate_tokenonly, int64_t *distortion, int *skippable,
BLOCK_SIZE bsize,
@@ -1440,7 +1433,6 @@
*mbmi = *best_mbmi;
}
}
-#endif // CONFIG_FORWARDSKIP
// Finds the best non-intrabc mode on an intra frame.
int64_t av1_rd_pick_intra_sby_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
@@ -1453,9 +1445,7 @@
assert(!is_inter_block(mbmi, xd->tree_type));
int64_t best_model_rd = INT64_MAX;
int is_directional_mode;
-#if CONFIG_FORWARDSKIP
mbmi->fsc_mode[xd->tree_type == CHROMA_PART] = 0;
-#endif // CONFIG_FORWARDSKIP
uint8_t directional_mode_skip_mask[INTRA_MODES] = { 0 };
// Flag to check rd of any intra mode is better than best_rd passed to this
// function
@@ -1627,7 +1617,6 @@
}
}
-#if CONFIG_FORWARDSKIP
// Searches forward skip coding
if (beat_best_rd && allow_fsc_intra(&cpi->common, xd, bsize, mbmi)) {
search_fsc_mode(cpi, x, rate, rate_tokenonly, distortion, skippable, bsize,
@@ -1639,7 +1628,6 @@
directional_mode_skip_mask, &best_rd, &best_model_rd, ctx,
&best_mbmi);
}
-#endif // CONFIG_FORWARDSKIP
// Searches palette
#if CONFIG_AIMC
diff --git a/av1/encoder/intra_mode_search.h b/av1/encoder/intra_mode_search.h
index 38940dc..47b9652 100644
--- a/av1/encoder/intra_mode_search.h
+++ b/av1/encoder/intra_mode_search.h
@@ -55,12 +55,10 @@
*/
int best_mrl_index;
-#if CONFIG_FORWARDSKIP
/*!
* \brief The best forward skip mode found.
*/
int best_fsc;
-#endif // CONFIG_FORWARDSKIP
/** \name Speed feature variables
* Variables to help with pruning some luma intra-modes during inter frame
@@ -167,7 +165,6 @@
int64_t *best_model_rd,
int64_t top_intra_model_rd[]);
-#if CONFIG_FORWARDSKIP
/*!\brief Search for the best forward skip coding mode for intra blocks.
*
* \ingroup intra_mode_search
@@ -209,7 +206,6 @@
uint8_t *dir_skip_mask, int64_t *best_rd,
int64_t *best_model_rd, PICK_MODE_CONTEXT *ctx,
MB_MODE_INFO *best_mbmi);
-#endif // CONFIG_FORWARDSKIP
/*!\brief Evaluate luma palette mode for inter frames.
*
diff --git a/av1/encoder/intra_mode_search_utils.h b/av1/encoder/intra_mode_search_utils.h
index f77bd37..ca777cb 100644
--- a/av1/encoder/intra_mode_search_utils.h
+++ b/av1/encoder/intra_mode_search_utils.h
@@ -242,14 +242,12 @@
total_rate += palette_mode_cost;
}
}
-#if CONFIG_FORWARDSKIP
if (allow_fsc_intra(&cpi->common, xd, bsize, mbmi)) {
const int use_fsc = mbmi->fsc_mode[PLANE_TYPE_Y];
const int fsc_ctx = get_fsc_mode_ctx(xd, frame_is_intra_only(&cpi->common));
total_rate +=
mode_costs->fsc_cost[fsc_ctx][fsc_bsize_groups[bsize]][use_fsc];
}
-#endif // CONFIG_FORWARDSKIP
if (av1_filter_intra_allowed(&cpi->common, mbmi)) {
total_rate +=
mode_costs
diff --git a/av1/encoder/palette.c b/av1/encoder/palette.c
index 3f7aef6..efeda05 100644
--- a/av1/encoder/palette.c
+++ b/av1/encoder/palette.c
@@ -420,9 +420,7 @@
mbmi->mrl_index = 0;
-#if CONFIG_FORWARDSKIP
mbmi->fsc_mode[xd->tree_type == CHROMA_PART] = 0;
-#endif // CONFIG_FORWARDSKIP
assert(!is_inter_block(mbmi, xd->tree_type));
assert(av1_allow_palette(cpi->common.features.allow_screen_content_tools,
bsize));
@@ -638,9 +636,7 @@
mbmi->sb_type[PLANE_TYPE_UV]));
PALETTE_MODE_INFO *const pmi = &mbmi->palette_mode_info;
const BLOCK_SIZE bsize = mbmi->sb_type[PLANE_TYPE_UV];
-#if CONFIG_FORWARDSKIP
mbmi->fsc_mode[PLANE_TYPE_UV] = 0;
-#endif // CONFIG_FORWARDSKIP
const SequenceHeader *const seq_params = &cpi->common.seq_params;
int this_rate;
int64_t this_rd;
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c
index 8e06d2b..b346a7a 100644
--- a/av1/encoder/rd.c
+++ b/av1/encoder/rd.c
@@ -155,14 +155,12 @@
av1_cost_tokens_from_cdf(mode_costs->mrl_index_cost, fc->mrl_index_cdf, NULL);
-#if CONFIG_FORWARDSKIP
for (i = 0; i < FSC_MODE_CONTEXTS; ++i) {
for (j = 0; j < FSC_BSIZE_CONTEXTS; ++j) {
av1_cost_tokens_from_cdf(mode_costs->fsc_cost[i][j],
fc->fsc_mode_cdf[i][j], NULL);
}
}
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_IMPROVED_CFL
av1_cost_tokens_from_cdf(mode_costs->cfl_index_cost, fc->cfl_index_cdf, NULL);
@@ -334,11 +332,7 @@
#else
mode_costs->intra_tx_type_costs[s][i][j],
fc->intra_ext_tx_cdf[s][i][j],
-#if CONFIG_FORWARDSKIP
av1_ext_tx_inv_intra[av1_ext_tx_set_idx_to_type[0][s]]);
-#else
- av1_ext_tx_inv[av1_ext_tx_set_idx_to_type[0][s]]);
-#endif // CONFIG_FORWARDSKIP
#endif // CONFIG_ATC_NEWTXSETS
}
}
@@ -971,7 +965,7 @@
}
}
}
-#if CONFIG_FORWARDSKIP
+
for (int tx_size = 0; tx_size < TX_SIZES; ++tx_size) {
int plane = PLANE_TYPE_Y;
LV_MAP_COEFF_COST *pcost = &coeff_costs->coeff_costs[tx_size][plane];
@@ -1013,7 +1007,7 @@
}
}
}
-#endif // CONFIG_FORWARDSKIP
+
#if CONFIG_PAR_HIDING
const int tx_size = TX_4X4;
const int plane_type = 0;
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 6164a60..66cddaa 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -5326,10 +5326,8 @@
mbmi->angle_delta[PLANE_TYPE_UV] = 0;
#endif
-#if CONFIG_FORWARDSKIP
mbmi->fsc_mode[PLANE_TYPE_Y] = 0;
mbmi->fsc_mode[PLANE_TYPE_UV] = 0;
-#endif // CONFIG_FORWARDSKIP
mbmi->mode = DC_PRED;
mbmi->uv_mode = UV_DC_PRED;
mbmi->motion_mode = SIMPLE_TRANSLATION;
@@ -5633,9 +5631,7 @@
return;
}
#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
-#if CONFIG_FORWARDSKIP
mbmi->fsc_mode[xd->tree_type == CHROMA_PART] = 0;
-#endif
#if CONFIG_BAWP
mbmi->bawp_flag = 0;
#endif
@@ -5821,9 +5817,7 @@
search_state->best_mbmode.skip_txfm[xd->tree_type == CHROMA_PART] =
mbmi->skip_txfm[xd->tree_type == CHROMA_PART];
-#if CONFIG_FORWARDSKIP
search_state->best_mbmode.fsc_mode[xd->tree_type == CHROMA_PART] = 0;
-#endif
#if CONFIG_OPTFLOW_REFINEMENT
search_state->best_mbmode.mode =
@@ -6638,9 +6632,7 @@
intra_search_state->skip_intra_modes = 0;
intra_search_state->best_intra_mode = DC_PRED;
intra_search_state->best_mrl_index = 0;
-#if CONFIG_FORWARDSKIP
intra_search_state->best_fsc = 0;
-#endif // CONFIG_FORWARDSKIP
intra_search_state->dir_mode_skip_mask_ready = 0;
av1_zero(intra_search_state->directional_mode_skip_mask);
intra_search_state->rate_uv_intra = INT_MAX;
@@ -8301,10 +8293,8 @@
yv12_mb[COMPACT_INDEX0_NRS(second_ref_frame)][i];
}
-#if CONFIG_FORWARDSKIP
mbmi->fsc_mode[PLANE_TYPE_Y] = 0;
mbmi->fsc_mode[PLANE_TYPE_UV] = 0;
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_NEW_CONTEXT_MODELING
mbmi->use_intrabc[0] = 0;
mbmi->use_intrabc[1] = 0;
@@ -8489,21 +8479,13 @@
get_y_intra_mode_set(mbmi, xd);
#endif // CONFIG_AIMC
-#if CONFIG_FORWARDSKIP
for (int fsc_mode = 0;
fsc_mode < (allow_fsc_intra(cm, xd, bsize, mbmi) ? FSC_MODES : 1);
fsc_mode++) {
-#endif // CONFIG_FORWARDSKIP
- uint8_t enable_mrls_flag = cm->seq_params.enable_mrls
-#if CONFIG_FORWARDSKIP
- && !fsc_mode
-#endif // CONFIG_FORWARDSKIP
- ;
+ uint8_t enable_mrls_flag = cm->seq_params.enable_mrls && !fsc_mode;
for (int mrl_index = 0;
mrl_index < (enable_mrls_flag ? MRL_LINE_NUMBER : 1); mrl_index++) {
-#if CONFIG_FORWARDSKIP
mbmi->fsc_mode[xd->tree_type == CHROMA_PART] = fsc_mode;
-#endif // CONFIG_FORWARDSKIP
mbmi->mrl_index = mrl_index;
for (int mode_idx = INTRA_MODE_START; mode_idx < LUMA_MODE_COUNT;
++mode_idx) {
@@ -8515,7 +8497,7 @@
mbmi->joint_y_mode_delta_angle = mbmi->y_intra_mode_list[mode_idx];
set_y_mode_and_delta_angle(mbmi->joint_y_mode_delta_angle, mbmi);
#else
- set_y_mode_and_delta_angle(mode_idx, mbmi);
+ set_y_mode_and_delta_angle(mode_idx, mbmi);
#endif // CONFIG_AIMC
if ((!cpi->oxcf.intra_mode_cfg.enable_smooth_intra ||
cpi->sf.intra_sf.disable_smooth_intra) &&
@@ -8534,7 +8516,6 @@
if (mbmi->mrl_index > 0 && av1_is_directional_mode(mbmi->mode) == 0) {
continue;
}
-#if CONFIG_FORWARDSKIP
if (!allow_fsc_intra(cm, xd, bsize, mbmi) &&
mbmi->fsc_mode[PLANE_TYPE_Y] > 0) {
continue;
@@ -8551,7 +8532,6 @@
continue;
}
#endif // CONFIG_AIMC
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_EXT_RECUR_PARTITIONS
const MB_MODE_INFO *cached_mi = x->inter_mode_cache;
if (cached_mi) {
@@ -8579,12 +8559,12 @@
#endif
);
#else
- init_mbmi(mbmi, this_mode, refs, cm
+ init_mbmi(mbmi, this_mode, refs, cm
#if CONFIG_FLEX_MVRES
- ,
- xd->sbi
+ ,
+ xd->sbi
#endif
- );
+ );
#endif // CONFIG_IBC_SR_EXT
txfm_info->skip_txfm = 0;
@@ -8617,9 +8597,7 @@
set_mv_precision(mbmi, mbmi->max_mv_precision);
#endif
}
-#if CONFIG_FORWARDSKIP
}
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_COLLECT_COMPONENT_TIMING
end_timing(cpi, handle_intra_mode_time);
#endif
diff --git a/av1/encoder/tx_search.c b/av1/encoder/tx_search.c
index 212a0e0..f755de1 100644
--- a/av1/encoder/tx_search.c
+++ b/av1/encoder/tx_search.c
@@ -553,12 +553,8 @@
ENTROPY_CONTEXT *tl = ctxl;
const TX_SIZE txs_ctx = get_txsize_entropy_ctx(tx_size);
TXB_CTX txb_ctx;
- get_txb_ctx(bsize, tx_size, 0, ta, tl, &txb_ctx
-#if CONFIG_FORWARDSKIP
- ,
- mbmi->fsc_mode[xd->tree_type == CHROMA_PART]
-#endif // CONFIG_FORWARDSKIP
- );
+ get_txb_ctx(bsize, tx_size, 0, ta, tl, &txb_ctx,
+ mbmi->fsc_mode[xd->tree_type == CHROMA_PART]);
const int zero_blk_rate = x->coeff_costs.coeff_costs[txs_ctx][PLANE_TYPE_Y]
.txb_skip_cost[txb_ctx.txb_skip_ctx][1];
rd_stats->rate = zero_blk_rate *
@@ -1138,12 +1134,8 @@
cpi->oxcf.q_cfg.quant_b_adapt, &quant_param_intra);
av1_setup_qmatrix(&cm->quant_params, xd, plane, tx_size, best_tx_type,
&quant_param_intra);
- av1_xform_quant(
-#if CONFIG_FORWARDSKIP
- cm,
-#endif // CONFIG_FORWARDSKIP
- x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param_intra,
- &quant_param_intra);
+ av1_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize,
+ &txfm_param_intra, &quant_param_intra);
if (quant_param_intra.use_optimize_b) {
av1_optimize_b(cpi, x, plane, block, tx_size, best_tx_type,
#if CONFIG_CROSS_CHROMA_TX
@@ -1432,26 +1424,20 @@
find_tx_size_rd_info(&txfm_info->txb_rd_record_intra, intra_hash);
*intra_txb_rd_info =
&txfm_info->txb_rd_record_intra.tx_rd_info[intra_hash_idx];
-#if CONFIG_FORWARDSKIP
*cur_joint_ctx = txb_ctx->txb_skip_ctx;
if (xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART] == 0) {
*cur_joint_ctx += (txb_ctx->dc_sign_ctx << 8);
}
-#else
- *cur_joint_ctx = (txb_ctx->dc_sign_ctx << 8) + txb_ctx->txb_skip_ctx;
-#endif // CONFIG_FORWARDSKIP
if ((*intra_txb_rd_info)->entropy_context == *cur_joint_ctx &&
txfm_info->txb_rd_record_intra.tx_rd_info[intra_hash_idx].valid) {
xd->tx_type_map[tx_type_map_idx] = (*intra_txb_rd_info)->tx_type;
const TX_TYPE ref_tx_type =
av1_get_tx_type(xd, get_plane_type(plane), blk_row, blk_col, tx_size,
cpi->common.features.reduced_tx_set_used);
-#if CONFIG_FORWARDSKIP
const int fsc_invalid =
!xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART] &&
(*intra_txb_rd_info)->tx_type == IDTX;
if (fsc_invalid) return 0;
-#endif // CONFIG_FORWARDSKIP
return (ref_tx_type == (*intra_txb_rd_info)->tx_type);
}
return 0;
@@ -1562,23 +1548,16 @@
tx_type = idx_map[idx];
txfm_param.tx_type = tx_type;
- av1_xform_quant(
-#if CONFIG_FORWARDSKIP
- cm,
-#endif // CONFIG_FORWARDSKIP
- x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param,
- &quant_param);
+ av1_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize,
+ &txfm_param, &quant_param);
dist_block_tx_domain(x, plane, block, tx_size, &dist, &sse);
- rate_cost = av1_cost_coeffs_txb_laplacian(
-#if CONFIG_FORWARDSKIP
- cm,
-#endif // CONFIG_FORWARDSKIP
- x, plane, block, tx_size, tx_type,
+ rate_cost =
+ av1_cost_coeffs_txb_laplacian(cm, x, plane, block, tx_size, tx_type,
#if CONFIG_CROSS_CHROMA_TX
- CCTX_NONE,
+ CCTX_NONE,
#endif // CONFIG_CROSS_CHROMA_TX
- txb_ctx, reduced_tx_set_used, 0);
+ txb_ctx, reduced_tx_set_used, 0);
rds_h[idx] = RDCOST(x->rdmult, rate_cost, dist);
@@ -1602,24 +1581,17 @@
tx_type = idx_map_v[idx_v[idx] * 4];
txfm_param.tx_type = tx_type;
- av1_xform_quant(
-#if CONFIG_FORWARDSKIP
- cm,
-#endif // CONFIG_FORWARDSKIP
- x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param,
- &quant_param);
+ av1_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize,
+ &txfm_param, &quant_param);
dist_block_tx_domain(x, plane, block, tx_size, &dist, &sse);
- rate_cost = av1_cost_coeffs_txb_laplacian(
-#if CONFIG_FORWARDSKIP
- cm,
-#endif // CONFIG_FORWARDSKIP
- x, plane, block, tx_size, tx_type,
+ rate_cost =
+ av1_cost_coeffs_txb_laplacian(cm, x, plane, block, tx_size, tx_type,
#if CONFIG_CROSS_CHROMA_TX
- CCTX_NONE,
+ CCTX_NONE,
#endif // CONFIG_CROSS_CHROMA_TX
- txb_ctx, reduced_tx_set_used, 0);
+ txb_ctx, reduced_tx_set_used, 0);
rds_v[idx] = RDCOST(x->rdmult, rate_cost, dist);
@@ -1706,22 +1678,15 @@
txfm_param.tx_type = tx_type;
// do txfm and quantization
- av1_xform_quant(
-#if CONFIG_FORWARDSKIP
- cm,
-#endif // CONFIG_FORWARDSKIP
- x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param,
- &quant_param);
+ av1_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize,
+ &txfm_param, &quant_param);
// estimate rate cost
- rate_cost = av1_cost_coeffs_txb_laplacian(
-#if CONFIG_FORWARDSKIP
- cm,
-#endif // CONFIG_FORWARDSKIP
- x, plane, block, tx_size, tx_type,
+ rate_cost =
+ av1_cost_coeffs_txb_laplacian(cm, x, plane, block, tx_size, tx_type,
#if CONFIG_CROSS_CHROMA_TX
- CCTX_NONE,
+ CCTX_NONE,
#endif // CONFIG_CROSS_CHROMA_TX
- txb_ctx, reduced_tx_set_used, 0);
+ txb_ctx, reduced_tx_set_used, 0);
// tx domain dist
dist_block_tx_domain(x, plane, block, tx_size, &dist, &sse);
@@ -2286,7 +2251,6 @@
}
}
-#if CONFIG_FORWARDSKIP
if (mbmi->fsc_mode[xd->tree_type == CHROMA_PART] &&
txsize_sqr_up_map[tx_size] < TX_32X32 && plane == PLANE_TYPE_Y) {
txk_allowed = IDTX;
@@ -2298,7 +2262,6 @@
uint16_t fsc_mask = UINT16_MAX - (1 << IDTX);
allowed_tx_mask &= fsc_mask;
}
-#endif // CONFIG_FORWARDSKIP
// Need to have at least one transform type allowed.
if (allowed_tx_mask == 0) {
@@ -2335,28 +2298,22 @@
}
#endif
-static INLINE int cost_coeffs(
-#if CONFIG_FORWARDSKIP
- const AV1_COMMON *cm,
-#endif // CONFIG_FORWARDSKIP
- MACROBLOCK *x, int plane, int block, TX_SIZE tx_size, const TX_TYPE tx_type,
+static INLINE int cost_coeffs(const AV1_COMMON *cm, MACROBLOCK *x, int plane,
+ int block, TX_SIZE tx_size, const TX_TYPE tx_type,
#if CONFIG_CROSS_CHROMA_TX
- const CctxType cctx_type,
+ const CctxType cctx_type,
#endif // CONFIG_CROSS_CHROMA_TX
- const TXB_CTX *const txb_ctx, int reduced_tx_set_used) {
+ const TXB_CTX *const txb_ctx,
+ int reduced_tx_set_used) {
#if TXCOEFF_COST_TIMER
struct aom_usec_timer timer;
aom_usec_timer_start(&timer);
#endif
- const int cost = av1_cost_coeffs_txb(
-#if CONFIG_FORWARDSKIP
- cm,
-#endif // CONFIG_FORWARDSKIP
- x, plane, block, tx_size, tx_type,
+ const int cost = av1_cost_coeffs_txb(cm, x, plane, block, tx_size, tx_type,
#if CONFIG_CROSS_CHROMA_TX
- cctx_type,
+ cctx_type,
#endif // CONFIG_CROSS_CHROMA_TX
- txb_ctx, reduced_tx_set_used);
+ txb_ctx, reduced_tx_set_used);
#if TXCOEFF_COST_TIMER
AV1_COMMON *tmp_cm = (AV1_COMMON *)&cpi->common;
aom_usec_timer_mark(&timer);
@@ -2448,12 +2405,8 @@
const TX_SIZE txs_ctx = get_txsize_entropy_ctx(tx_size);
TXB_CTX txb_ctx_tmp;
const PLANE_TYPE plane_type = get_plane_type(plane);
- get_txb_ctx(plane_bsize, tx_size, plane, ta, tl, &txb_ctx_tmp
-#if CONFIG_FORWARDSKIP
- ,
- mbmi->fsc_mode[xd->tree_type == CHROMA_PART]
-#endif // CONFIG_FORWARDSKIP
- );
+ get_txb_ctx(plane_bsize, tx_size, plane, ta, tl, &txb_ctx_tmp,
+ mbmi->fsc_mode[xd->tree_type == CHROMA_PART]);
#if CONFIG_CONTEXT_DERIVATION
int zero_blk_rate = 0;
if (plane == AOM_PLANE_Y || plane == AOM_PLANE_U) {
@@ -2512,11 +2465,9 @@
skip_trellis |= !is_trellis_used(cpi->optimize_seg_arr[xd->mi[0]->segment_id],
DRY_RUN_NORMAL);
-#if CONFIG_FORWARDSKIP
uint8_t fsc_mode =
(mbmi->fsc_mode[xd->tree_type == CHROMA_PART] && plane == PLANE_TYPE_Y);
skip_trellis |= fsc_mode;
-#endif // CONFIG_FORWARDSKIP
// Hashing based speed feature for intra block. If the hash of the residue
// is found in the hash table, use the previous RD search results stored in
@@ -2657,22 +2608,14 @@
#endif // CONFIG_CROSS_CHROMA_TX
&txfm_param);
-#if CONFIG_FORWARDSKIP
const int xform_quant_b =
USE_B_QUANT_NO_TRELLIS ? AV1_XFORM_QUANT_B : AV1_XFORM_QUANT_FP;
av1_setup_quant(tx_size, !skip_trellis,
skip_trellis ? xform_quant_b : AV1_XFORM_QUANT_FP,
-#else
- av1_setup_quant(tx_size, !skip_trellis,
- skip_trellis ? (USE_B_QUANT_NO_TRELLIS ? AV1_XFORM_QUANT_B
- : AV1_XFORM_QUANT_FP)
- : AV1_XFORM_QUANT_FP,
-#endif // CONFIG_FORWARDSKIP
cpi->oxcf.q_cfg.quant_b_adapt, &quant_param);
// Iterate through all transform type candidates.
for (int idx = 0; idx < TX_TYPES; ++idx) {
-#if CONFIG_FORWARDSKIP
int skip_trellis_in =
skip_trellis || use_inter_fsc(cm, plane, txk_map[idx], is_inter);
av1_update_trellisq(!skip_trellis_in,
@@ -2692,15 +2635,11 @@
plane == PLANE_TYPE_Y) {
continue;
}
-#endif // CONFIG_FORWARDSKIP
#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
-#if CONFIG_FORWARDSKIP
- && !mbmi->fsc_mode[xd->tree_type == CHROMA_PART]
-#endif // CONFIG_FORWARDSKIP
- ;
+ !cpi->sf.tx_sf.tx_type_search.skip_stx_search &&
+ !mbmi->fsc_mode[xd->tree_type == CHROMA_PART];
const int max_stx = xd->enable_ist ? 4 : 1;
for (int stx = 0; stx < max_stx; ++stx) {
TX_TYPE tx_type = (TX_TYPE)txk_map[idx];
@@ -2713,9 +2652,7 @@
((tx_type != DCT_DCT && tx_type != ADST_ADST) || plane != 0 ||
is_inter_block(mbmi, xd->tree_type) || dc_only_blk ||
intra_mode >= PAETH_PRED || filter || !is_depth0 ||
-#if CONFIG_FORWARDSKIP
mbmi->fsc_mode[xd->tree_type == CHROMA_PART] ||
-#endif // CONFIG_FORWARDSKIP
xd->lossless[mbmi->segment_id]);
if (skip_stx && stx) continue;
tx_type += (stx << 4);
@@ -2755,15 +2692,9 @@
#endif
x, &quant_param, plane, block, tx_size,
cpi->oxcf.q_cfg.quant_b_adapt, qstep,
- txfm_params->coeff_opt_satd_threshold,
-#if CONFIG_FORWARDSKIP
- skip_trellis_in,
-#else
- skip_trellis,
-#endif // CONFIG_FORWARDSKIP
+ txfm_params->coeff_opt_satd_threshold, skip_trellis_in,
dc_only_blk);
-#if CONFIG_FORWARDSKIP
uint8_t fsc_mode_in = (mbmi->fsc_mode[xd->tree_type == CHROMA_PART] &&
plane == PLANE_TYPE_Y) ||
use_inter_fsc(cm, plane, tx_type, is_inter);
@@ -2773,15 +2704,12 @@
#if CONFIG_IST
if (get_primary_tx_type(tx_type) == IDTX) {
#else
- if (tx_type == IDTX) {
+ 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);
}
}
-#else
- av1_quant(x, plane, block, &txfm_param, &quant_param);
-#endif // CONFIG_FORWARDSKIP
// Calculate rate cost of quantized coefficients.
if (quant_param.use_optimize_b) {
av1_optimize_b(cpi, x, plane, block, tx_size, tx_type,
@@ -2799,15 +2727,11 @@
parity_hiding_trellis_off(cpi, x, plane, block, tx_size, tx_type);
#endif
- rate_cost = cost_coeffs(
-#if CONFIG_FORWARDSKIP
- cm,
-#endif // CONFIG_FORWARDSKIP
- x, plane, block, tx_size, tx_type,
+ rate_cost = cost_coeffs(cm, x, plane, block, tx_size, tx_type,
#if CONFIG_CROSS_CHROMA_TX
- CCTX_NONE,
+ CCTX_NONE,
#endif // CONFIG_CROSS_CHROMA_TX
- txb_ctx, cm->features.reduced_tx_set_used);
+ txb_ctx, cm->features.reduced_tx_set_used);
}
// If rd cost based on coeff rate alone is already more than best_rd,
@@ -2819,11 +2743,7 @@
// When eob is 0, pixel domain distortion is more efficient and
// accurate.
this_rd_stats.dist = this_rd_stats.sse = block_sse;
-#if CONFIG_FORWARDSKIP
} else if (dc_only_blk || (fsc_mode_in && plane == PLANE_TYPE_Y)) {
-#else
- } else if (dc_only_blk) {
-#endif // CONFIG_FORWARDSKIP
this_rd_stats.sse = block_sse;
this_rd_stats.dist = dist_block_px_domain(
cpi, x, plane, plane_bsize, block, blk_row, blk_col, tx_size);
@@ -2961,11 +2881,9 @@
#else
skip_trellis = skip_trellis_based_on_satd[best_tx_type];
#endif
-#if CONFIG_FORWARDSKIP
skip_trellis &=
(mbmi->fsc_mode[xd->tree_type == CHROMA_PART] && plane == PLANE_TYPE_Y) ||
use_inter_fsc(cm, plane, best_tx_type, is_inter);
-#endif // CONFIG_FORWARDSKIP
// Point dqcoeff to the quantized coefficients corresponding to the best
// transform type, then we can skip transform and quantization, e.g. in the
@@ -3128,10 +3046,7 @@
&rate_cost[plane - AOM_PLANE_U]);
} else {
rate_cost[plane - AOM_PLANE_U] = cost_coeffs(
-#if CONFIG_FORWARDSKIP
- cm,
-#endif // CONFIG_FORWARDSKIP
- x, plane, block, tx_size, tx_type, cctx_type,
+ cm, x, plane, block, tx_size, tx_type, cctx_type,
&txb_ctx_uv[plane - AOM_PLANE_U], cm->features.reduced_tx_set_used);
}
}
@@ -3310,12 +3225,8 @@
const ENTROPY_CONTEXT *const ptl = tl + blk_row;
const TX_SIZE txs_ctx = get_txsize_entropy_ctx(tx_size);
TXB_CTX txb_ctx;
- get_txb_ctx(plane_bsize, tx_size, 0, pta, ptl, &txb_ctx
-#if CONFIG_FORWARDSKIP
- ,
- mbmi->fsc_mode[xd->tree_type == CHROMA_PART]
-#endif // CONFIG_FORWARDSKIP
- );
+ get_txb_ctx(plane_bsize, tx_size, 0, pta, ptl, &txb_ctx,
+ mbmi->fsc_mode[xd->tree_type == CHROMA_PART]);
const int zero_blk_rate = x->coeff_costs.coeff_costs[txs_ctx][PLANE_TYPE_Y]
.txb_skip_cost[txb_ctx.txb_skip_ctx][1];
rd_stats->zero_rate = zero_blk_rate;
@@ -3999,12 +3910,8 @@
}
TXB_CTX txb_ctx;
- get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx
-#if CONFIG_FORWARDSKIP
- ,
- xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART]
-#endif // CONFIG_FORWARDSKIP
- );
+ get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx,
+ xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART]);
#if CONFIG_CROSS_CHROMA_TX
int dummy = 0;
#endif // CONFIG_CROSS_CHROMA_TX
@@ -4014,15 +3921,12 @@
#endif // CONFIG_CROSS_CHROMA_TX
&txb_ctx, args->ftxs_mode, args->skip_trellis,
args->best_rd - args->current_rd, &this_rd_stats);
-#if CONFIG_FORWARDSKIP
+
if (this_rd_stats.dist == INT64_MAX) {
args->exit_early = 1;
args->incomplete_exit = 1;
return;
}
-#else
- assert(this_rd_stats.dist != INT64_MAX);
-#endif // CONFIG_FORWARDSKIP
if (plane == AOM_PLANE_Y && xd->cfl.store_y && xd->tree_type == SHARED_PART) {
assert(!is_inter || plane_bsize < BLOCK_8X8);
@@ -4175,12 +4079,8 @@
ENTROPY_CONTEXT *tl = left_ctx + blk_row;
const TX_SIZE txs_ctx = get_txsize_entropy_ctx(tx_size);
TXB_CTX txb_ctx;
- get_txb_ctx(plane_bsize, tx_size, 0, ta, tl, &txb_ctx
-#if CONFIG_FORWARDSKIP
- ,
- mbmi->fsc_mode[xd->tree_type == CHROMA_PART]
-#endif // CONFIG_FORWARDSKIP
- );
+ get_txb_ctx(plane_bsize, tx_size, 0, ta, tl, &txb_ctx,
+ mbmi->fsc_mode[xd->tree_type == CHROMA_PART]);
const int zero_blk_rate =
x->coeff_costs.coeff_costs[txs_ctx][get_plane_type(0)]
@@ -4360,12 +4260,8 @@
ENTROPY_CONTEXT *a = args->t_above + blk_col;
ENTROPY_CONTEXT *l = args->t_left + blk_row;
- get_txb_ctx(plane_bsize, tx_size, plane, a, l, txb_ctx
-#if CONFIG_FORWARDSKIP
- ,
- xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART]
-#endif // CONFIG_FORWARDSKIP
- );
+ get_txb_ctx(plane_bsize, tx_size, plane, a, l, txb_ctx,
+ xd->mi[0]->fsc_mode[xd->tree_type == CHROMA_PART]);
// Obtain stats for CCTX_NONE
search_tx_type(cpi, x, plane, block, blk_row, blk_col, plane_bsize, tx_size,
@@ -4374,12 +4270,10 @@
#endif // CONFIG_CROSS_CHROMA_TX
txb_ctx, args->ftxs_mode, args->skip_trellis,
args->best_rd - args->current_rd, this_rd_stats);
-#if CONFIG_FORWARDSKIP
if (this_rd_stats->dist == INT64_MAX) {
args->exit_early = 1;
args->incomplete_exit = 1;
}
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_RD_DEBUG
update_txb_coeff_cost(this_rd_stats, plane, tx_size, blk_row, blk_col,
diff --git a/av1/encoder/x86/encodetxb_avx2.c b/av1/encoder/x86/encodetxb_avx2.c
index d281b96..44174c0 100644
--- a/av1/encoder/x86/encodetxb_avx2.c
+++ b/av1/encoder/x86/encodetxb_avx2.c
@@ -22,7 +22,6 @@
#include "aom_dsp/x86/synonyms.h"
#include "aom_dsp/x86/synonyms_avx2.h"
-#if CONFIG_FORWARDSKIP
static INLINE void _yy256_fill_buffer(__m256i *buff, __m256i *end,
__m256i zeros) {
do {
@@ -289,7 +288,6 @@
} while (i < height);
}
}
-#endif // CONFIG_FORWARDSKIP
void av1_txb_init_levels_avx2(const tran_low_t *const coeff, const int width,
const int height, uint8_t *const levels) {
diff --git a/av1/encoder/x86/encodetxb_sse2.c b/av1/encoder/x86/encodetxb_sse2.c
index 1494f9a..93f4032 100644
--- a/av1/encoder/x86/encodetxb_sse2.c
+++ b/av1/encoder/x86/encodetxb_sse2.c
@@ -431,7 +431,6 @@
} while (--row);
}
-#if CONFIG_FORWARDSKIP
static INLINE void load_levels_4x4x5_skip_sse2(const uint8_t *const src,
const int stride,
__m128i *const level) {
@@ -562,7 +561,6 @@
get_16n_coeff_contexts_2d_skip_sse2(levels, width, height, coeff_contexts);
}
}
-#endif // CONFIG_FORWARDSKIP
// Note: levels[] must be in the range [0, 127], inclusive.
void av1_get_nz_map_contexts_sse2(const uint8_t *const levels,
diff --git a/av1/encoder/x86/encodetxb_sse4.c b/av1/encoder/x86/encodetxb_sse4.c
index f0f4dc5..d1b2dfe 100644
--- a/av1/encoder/x86/encodetxb_sse4.c
+++ b/av1/encoder/x86/encodetxb_sse4.c
@@ -19,7 +19,6 @@
#include "av1/common/txb_common.h"
#include "aom_dsp/x86/synonyms.h"
-#if CONFIG_FORWARDSKIP
static INLINE void _xx_fill_buffer(__m128i *buff, __m128i *end, __m128i zeros) {
do {
_mm_storeu_si128(buff, zeros);
@@ -211,7 +210,6 @@
} while (i < height);
}
}
-#endif // CONFIG_FORWARDSKIP
void av1_txb_init_levels_sse4_1(const tran_low_t *const coeff, const int width,
const int height, uint8_t *const levels) {
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake
index fd5021b..58a3764 100644
--- a/build/cmake/aom_config_defaults.cmake
+++ b/build/cmake/aom_config_defaults.cmake
@@ -155,8 +155,6 @@
set_aom_config_var(CONFIG_H_PARTITION 1 NUMBER
"AV2 H partition mode experiment flag")
set_aom_config_var(CONFIG_ERP_TFLITE 0 NUMBER "Build ERP with TFLite")
-set_aom_config_var(CONFIG_FORWARDSKIP 1
- "AV2 enable forward skip residual coding.")
set_aom_config_var(CONFIG_COMPOUND_WARP_SAMPLES 1 NUMBER
"AV2 compound warped motion samples experiment flag")
set_aom_config_var(CONFIG_NEW_TX_PARTITION 1
diff --git a/build/cmake/aom_experiment_deps.cmake b/build/cmake/aom_experiment_deps.cmake
index 6e31652..80981a1 100644
--- a/build/cmake/aom_experiment_deps.cmake
+++ b/build/cmake/aom_experiment_deps.cmake
@@ -49,13 +49,6 @@
change_config_and_warn(CONFIG_CCSO_EXT 0 !CONFIG_CCSO)
endif()
- # CONFIG_ATC_NEWTXSETS depends on CONFIG_FORWARDSKIP. If CONFIG_FORWARDSKIP is
- # off, then CONFIG_ATC_NEWTXSETS needs to be disabled otherwise IDTX would be
- # disabled.
- if(NOT CONFIG_FORWARDSKIP AND CONFIG_ATC_NEWTXSETS)
- change_config_and_warn(CONFIG_ATC_NEWTXSETS 0 !CONFIG_FORWARDSKIP)
- endif()
-
# CONFIG_ATC_REDUCED_TXSET depends on CONFIG_ATC_NEWTXSETS. If
# CONFIG_ATC_NEWTXSETS is off, then CONFIG_ATC_REDUCED_TXSET needs to be
# disabled.
diff --git a/common/args.c b/common/args.c
index 4d7152f..b4fc0c5 100644
--- a/common/args.c
+++ b/common/args.c
@@ -96,9 +96,7 @@
#if CONFIG_BAWP
GET_PARAMS(enable_bawp);
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
GET_PARAMS(enable_fsc);
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_ORIP
GET_PARAMS(enable_orip);
#endif
diff --git a/common/av1_config.c b/common/av1_config.c
index 6b80dda..297f7a0 100644
--- a/common/av1_config.c
+++ b/common/av1_config.c
@@ -261,9 +261,7 @@
#if CONFIG_BAWP
AV1C_READ_BIT_OR_RETURN_ERROR(enable_bawp);
#endif // CONFIG_BAWP
-#if CONFIG_FORWARDSKIP
AV1C_READ_BIT_OR_RETURN_ERROR(enable_fsc);
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_CCSO
AV1C_READ_BIT_OR_RETURN_ERROR(enable_ccso);
#endif
diff --git a/test/encodetxb_test.cc b/test/encodetxb_test.cc
index 777eb6e..58f1711 100644
--- a/test/encodetxb_test.cc
+++ b/test/encodetxb_test.cc
@@ -261,11 +261,7 @@
printf("(%3.2f)\n", t1 / t2);
}
const int stride = width + TX_PAD_HOR;
-#if CONFIG_FORWARDSKIP
for (int r = TX_PAD_TOP; r < height + TX_PAD_VER; ++r) {
-#else
- for (int r = 0; r < height + TX_PAD_VER; ++r) {
-#endif // CONFIG_FORWARDSKIP
for (int c = 0; c < stride; ++c) {
ASSERT_EQ(levels_buf[0][c + r * stride], levels_buf[1][c + r * stride])
<< "[" << r << "," << c << "] " << run_times << width << "x"
diff --git a/tools/aom_entropy_optimizer.c b/tools/aom_entropy_optimizer.c
index ede14c9..7ded0c2 100644
--- a/tools/aom_entropy_optimizer.c
+++ b/tools/aom_entropy_optimizer.c
@@ -493,7 +493,6 @@
cts_each_dim[1] = EXT_TX_SIZES;
cts_each_dim[2] = INTRA_MODES;
cts_each_dim[3] = TX_TYPES;
-#if CONFIG_FORWARDSKIP
#if CONFIG_ATC_NEWTXSETS
int intra_ext_tx_types_each_ctx[EXT_TX_SETS_INTRA] = { 0, INTRA_TX_SET1 };
optimize_cdf_table_var_modes_4d(
@@ -510,14 +509,6 @@
"static const aom_cdf_prob default_intra_ext_tx_cdf[EXT_TX_SETS_INTRA]"
"[EXT_TX_SIZES][INTRA_MODES][CDF_SIZE(TX_TYPES)]");
#endif
-#else
- int intra_ext_tx_types_each_ctx[EXT_TX_SETS_INTRA] = { 0, 7, 5 };
- optimize_cdf_table_var_modes_4d(
- &fc.intra_ext_tx[0][0][0][0], probsfile, 4, cts_each_dim,
- intra_ext_tx_types_each_ctx,
- "static const aom_cdf_prob default_intra_ext_tx_cdf[EXT_TX_SETS_INTRA]"
- "[EXT_TX_SIZES][INTRA_MODES][CDF_SIZE(TX_TYPES)]");
-#endif // CONFIG_FORWARDSKIP
cts_each_dim[0] = EXT_TX_SETS_INTER;
cts_each_dim[1] = EXT_TX_SIZES;
@@ -926,7 +917,6 @@
"static const aom_cdf_prob "
"default_filter_intra_cdfs[BLOCK_SIZES_ALL][CDF_SIZE(2)]");
-#if CONFIG_FORWARDSKIP
/* forward skip coding flag */
cts_each_dim[0] = FSC_MODE_CONTEXTS;
cts_each_dim[1] = FSC_BSIZE_CONTEXTS;
@@ -935,7 +925,6 @@
"static const aom_cdf_prob "
"default_fsc_mode_cdf[FSC_MODE_CONTEXTS]"
"[FSC_BSIZE_CONTEXTS][CDF_SIZE(FSC_MODES)]");
-#endif // CONFIG_FORWARDSKIP
/* restoration type */
cts_each_dim[0] = RESTORE_SWITCHABLE_TYPES;
@@ -976,7 +965,6 @@
"av1_default_txb_skip_cdfs[TOKEN_CDF_Q_CTXS][TX_SIZES]"
"[TXB_SKIP_CONTEXTS][CDF_SIZE(2)]");
-#if CONFIG_FORWARDSKIP
/* forward skip sign bit */
cts_each_dim[0] = TOKEN_CDF_Q_CTXS;
cts_each_dim[1] = IDTX_SIGN_CONTEXTS;
@@ -985,7 +973,6 @@
"static const aom_cdf_prob "
"av1_default_idtx_sign_cdfs[TOKEN_CDF_Q_CTXS]"
"[IDTX_SIGN_CONTEXTS][CDF_SIZE(2)]");
-#endif // CONFIG_FORWARDSKIP
#if CONFIG_CONTEXT_DERIVATION
cts_each_dim[0] = TOKEN_CDF_Q_CTXS;
@@ -1133,7 +1120,6 @@
"[TOKEN_CDF_Q_CTXS][TX_SIZES][PLANE_TYPES][SIG_COEF_CONTEXTS]"
"[CDF_SIZE(NUM_BASE_LEVELS + 2)]");
-#if CONFIG_FORWARDSKIP
cts_each_dim[0] = TOKEN_CDF_Q_CTXS;
cts_each_dim[1] = IDTX_LEVEL_CONTEXTS;
cts_each_dim[2] = BR_CDF_SIZE;
@@ -1152,7 +1138,6 @@
"static const aom_cdf_prob av1_default_coeff_base_multi_cdfs_idtx"
"[TOKEN_CDF_Q_CTXS][IDTX_SIG_COEF_CONTEXTS]"
"[CDF_SIZE(NUM_BASE_LEVELS + 2)]");
-#endif // CONFIG_FORWARDSKIP
cts_each_dim[0] = TOKEN_CDF_Q_CTXS;
cts_each_dim[1] = TX_SIZES;