Commit 2e7bb933 authored by Debargha Mukherjee's avatar Debargha Mukherjee

Remove CONFIG_SIMPLIFY_TX_MODE flag

Change-Id: Ia34909cc6edc20f17a777e0b7bff97a62e0ac0c2
parent 1fa9ba4c
......@@ -973,7 +973,6 @@ static const int8_t txsize_log2_minus4[TX_SIZES_ALL] = {
};
/* clang-format off */
#if CONFIG_SIMPLIFY_TX_MODE
static const TX_SIZE tx_mode_to_biggest_tx_size[TX_MODES] = {
TX_4X4, // ONLY_4X4
#if CONFIG_TX64X64
......@@ -984,20 +983,6 @@ static const TX_SIZE tx_mode_to_biggest_tx_size[TX_MODES] = {
TX_32X32, // TX_MODE_SELECT
#endif // CONFIG_TX64X64
};
#else
static const TX_SIZE tx_mode_to_biggest_tx_size[TX_MODES] = {
TX_4X4, // ONLY_4X4
TX_8X8, // ALLOW_8X8
TX_16X16, // ALLOW_16X16
TX_32X32, // ALLOW_32X32
#if CONFIG_TX64X64
TX_64X64, // ALLOW_64X64
TX_64X64, // TX_MODE_LARGEST
#else
TX_32X32, // TX_MODE_SELECT
#endif // CONFIG_TX64X64
};
#endif // CONFIG_SIMPLIFY_TX_MODE
/* clang-format on */
static const BLOCK_SIZE ss_size_lookup[BLOCK_SIZES_ALL][2][2] = {
......
......@@ -252,7 +252,6 @@ typedef enum ATTRIBUTE_PACKED {
#define MAX_TX_BLOCKS_IN_MAX_SB (1 << MAX_TX_BLOCKS_IN_MAX_SB_LOG2)
// frame transform mode
#if CONFIG_SIMPLIFY_TX_MODE
typedef enum ATTRIBUTE_PACKED {
ONLY_4X4, // use only 4x4 transform
TX_MODE_LARGEST, // transform size is the largest possible for pu size
......@@ -260,21 +259,6 @@ typedef enum ATTRIBUTE_PACKED {
TX_MODES,
} TX_MODE;
#else
typedef enum ATTRIBUTE_PACKED {
ONLY_4X4, // only 4x4 transform used
ALLOW_8X8, // allow block transform size up to 8x8
ALLOW_16X16, // allow block transform size up to 16x16
ALLOW_32X32, // allow block transform size up to 32x32
#if CONFIG_TX64X64
ALLOW_64X64, // allow block transform size up to 64x64
#endif
TX_MODE_SELECT, // transform specified for each block
TX_MODES,
} TX_MODE;
#endif // CONFIG_SIMPLIFY_TX_MODE
// 1D tx types
typedef enum ATTRIBUTE_PACKED {
DCT_1D,
......
......@@ -91,24 +91,10 @@ static int read_is_valid(const uint8_t *start, size_t len, const uint8_t *end) {
return len != 0 && len <= (size_t)(end - start);
}
#if CONFIG_SIMPLIFY_TX_MODE
static TX_MODE read_tx_mode(AV1_COMMON *cm, struct aom_read_bit_buffer *rb) {
if (cm->all_lossless) return ONLY_4X4;
return aom_rb_read_bit(rb) ? TX_MODE_SELECT : TX_MODE_LARGEST;
}
#else
static TX_MODE read_tx_mode(AV1_COMMON *cm, struct aom_read_bit_buffer *rb) {
if (cm->all_lossless) return ONLY_4X4;
#if CONFIG_TX64X64
TX_MODE tx_mode =
aom_rb_read_bit(rb) ? TX_MODE_SELECT : aom_rb_read_literal(rb, 2);
if (tx_mode == ALLOW_32X32) tx_mode += aom_rb_read_bit(rb);
return tx_mode;
#else
return aom_rb_read_bit(rb) ? TX_MODE_SELECT : aom_rb_read_literal(rb, 2);
#endif // CONFIG_TX64X64
}
#endif // CONFIG_SIMPLIFY_TX_MODE
static REFERENCE_MODE read_frame_reference_mode(
const AV1_COMMON *cm, struct aom_read_bit_buffer *rb) {
......
......@@ -2511,20 +2511,7 @@ static void write_tx_mode(AV1_COMMON *cm, TX_MODE *mode,
*mode = ONLY_4X4;
return;
}
#if CONFIG_SIMPLIFY_TX_MODE
aom_wb_write_bit(wb, *mode == TX_MODE_SELECT);
#else
#if CONFIG_TX64X64
aom_wb_write_bit(wb, *mode == TX_MODE_SELECT);
if (*mode != TX_MODE_SELECT) {
aom_wb_write_literal(wb, AOMMIN(*mode, ALLOW_32X32), 2);
if (*mode >= ALLOW_32X32) aom_wb_write_bit(wb, *mode == ALLOW_64X64);
}
#else
aom_wb_write_bit(wb, *mode == TX_MODE_SELECT);
if (*mode != TX_MODE_SELECT) aom_wb_write_literal(wb, *mode, 2);
#endif // CONFIG_TX64X64
#endif // CONFIG_SIMPLIFY_TX_MODE
}
static void write_frame_interp_filter(InterpFilter filter,
......
......@@ -3791,7 +3791,6 @@ static MV_REFERENCE_FRAME get_frame_type(const AV1_COMP *cpi) {
return LAST_FRAME;
}
#if CONFIG_SIMPLIFY_TX_MODE
static TX_MODE select_tx_mode(const AV1_COMP *cpi) {
if (cpi->common.all_lossless) return ONLY_4X4;
if (cpi->sf.tx_size_search_method == USE_LARGESTALL)
......@@ -3802,18 +3801,6 @@ static TX_MODE select_tx_mode(const AV1_COMP *cpi) {
else
return cpi->common.tx_mode;
}
#else
static TX_MODE select_tx_mode(const AV1_COMP *cpi) {
if (cpi->common.all_lossless) return ONLY_4X4;
if (cpi->sf.tx_size_search_method == USE_LARGESTALL)
return ALLOW_32X32 + CONFIG_TX64X64;
else if (cpi->sf.tx_size_search_method == USE_FULL_RD ||
cpi->sf.tx_size_search_method == USE_FAST_RD)
return TX_MODE_SELECT;
else
return cpi->common.tx_mode;
}
#endif // CONFIG_SIMPLIFY_TX_MODE
void av1_init_tile_data(AV1_COMP *cpi) {
AV1_COMMON *const cm = &cpi->common;
......@@ -4697,11 +4684,7 @@ void av1_encode_frame(AV1_COMP *cpi) {
if (!cm->large_scale_tile) {
#endif // CONFIG_EXT_TILE
if (cm->tx_mode == TX_MODE_SELECT && cpi->td.mb.txb_split_count == 0)
#if CONFIG_SIMPLIFY_TX_MODE
cm->tx_mode = TX_MODE_LARGEST;
#else
cm->tx_mode = ALLOW_32X32 + CONFIG_TX64X64;
#endif // CONFIG_SIMPLIFY_TX_MODE
#if CONFIG_EXT_TILE
}
#endif // CONFIG_EXT_TILE
......
......@@ -152,7 +152,6 @@ set(CONFIG_SCALABILITY 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SEGMENT_GLOBALMV 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SEGMENT_PRED_LAST 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SHORT_FILTER 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SIMPLIFY_TX_MODE 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SPATIAL_SEGMENTATION 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_TEMPMV_SIGNALING 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_TILE_INFO_FIRST 0 CACHE NUMBER "AV1 experiment flag.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment