Commit 27b5136f authored by Debargha Mukherjee's avatar Debargha Mukherjee

Remove DISABLE_VARTX_FOR_CHROMA = 2 option.

Removing code for this option since it is not better than the
DISABLE_VARTX_FOR_CHROMA = 1 option and is more complex.

Change-Id: Id39d23bc6130bbed0ac008c1c76a2ba5aaee4d22
parent 1a8664ea
......@@ -40,11 +40,6 @@ extern "C" {
#define MAX_SEG_MASK_BITS 1
// Disables vartx transform split for chroma
// There are two possible options:
// 1: Always choose chroma tx_size to be the largest allowed for the PU
// 2: If the luma tranform size is split at least one level, split the
// chroma by one level, otherwise use the largest allowed transform size for
// chroma.
#define DISABLE_VARTX_FOR_CHROMA 1
// SEG_MASK_TYPES should not surpass 1 << MAX_SEG_MASK_BITS
......
......@@ -527,18 +527,6 @@ static void decode_token_and_recon_block(AV1Decoder *const pbi,
TX_SIZE max_tx_size = get_vartx_max_txsize(
xd, plane_bsize, pd->subsampling_x || pd->subsampling_y);
#if DISABLE_VARTX_FOR_CHROMA == 2
// If the luma transform size is split at least one level, split the
// chroma by one level. Otherwise use the largest possible trasnform
// size for chroma.
if (plane && (pd->subsampling_x || pd->subsampling_y)) {
const TX_SIZE l_max_tx_size = get_vartx_max_txsize(xd, bsizec, 0);
const int is_split =
(l_max_tx_size != mbmi->inter_tx_size[0][0] && bsize == bsizec &&
txsize_to_bsize[l_max_tx_size] == bsizec);
if (is_split) max_tx_size = sub_tx_size_map[1][max_tx_size];
}
#endif // DISABLE_VARTX_FOR_CHROMA == 2
const int bh_var_tx = tx_size_high_unit[max_tx_size];
const int bw_var_tx = tx_size_wide_unit[max_tx_size];
int block = 0;
......
......@@ -1920,18 +1920,6 @@ static void write_inter_txb_coeff(AV1_COMMON *const cm, MACROBLOCK *const x,
TX_SIZE max_tx_size = get_vartx_max_txsize(
xd, plane_bsize, pd->subsampling_x || pd->subsampling_y);
#if DISABLE_VARTX_FOR_CHROMA == 2
// If the luma transform size is split at least one level, split the chroma
// by one level. Otherwise use the largest possible trasnform size for
// chroma.
if (plane && (pd->subsampling_x || pd->subsampling_y)) {
const TX_SIZE l_max_tx_size = get_vartx_max_txsize(xd, bsizec, 0);
const int is_split =
(l_max_tx_size != mbmi->inter_tx_size[0][0] && bsize == bsizec &&
txsize_to_bsize[l_max_tx_size] == bsizec);
if (is_split) max_tx_size = sub_tx_size_map[1][max_tx_size];
}
#endif // DISABLE_VARTX_FOR_CHROMA == 2
const int step =
tx_size_wide_unit[max_tx_size] * tx_size_high_unit[max_tx_size];
const int bkw = tx_size_wide_unit[max_tx_size];
......
......@@ -791,19 +791,6 @@ void av1_encode_sb(AV1_COMMON *cm, MACROBLOCK *x, BLOCK_SIZE bsize, int mi_row,
TX_SIZE max_tx_size = get_vartx_max_txsize(
xd, plane_bsize, pd->subsampling_x || pd->subsampling_y);
#if DISABLE_VARTX_FOR_CHROMA == 2
// If the luma transform size is split at least one level, split the chroma
// by one level. Otherwise use the largest possible trasnform size for
// chroma.
if (plane && (pd->subsampling_x || pd->subsampling_y)) {
const TX_SIZE l_max_tx_size = get_vartx_max_txsize(xd, bsizec, 0);
const int is_split =
(l_max_tx_size != mbmi->inter_tx_size[0][0] && bsize == bsizec &&
txsize_to_bsize[l_max_tx_size] == bsizec);
if (is_split) max_tx_size = sub_tx_size_map[1][max_tx_size];
}
#endif // DISABLE_VARTX_FOR_CHROMA == 2
const BLOCK_SIZE txb_size = txsize_to_bsize[max_tx_size];
const int bw = block_size_wide[txb_size] >> tx_size_wide_log2[0];
const int bh = block_size_high[txb_size] >> tx_size_wide_log2[0];
......
......@@ -5060,18 +5060,6 @@ int inter_block_uvrd(const AV1_COMP *cpi, MACROBLOCK *x, RD_STATS *rd_stats,
block_size_high[plane_bsize] >> tx_size_high_log2[0];
TX_SIZE max_tx_size = get_vartx_max_txsize(
xd, plane_bsize, pd->subsampling_x || pd->subsampling_y);
#if DISABLE_VARTX_FOR_CHROMA == 2
// If the luma transform size is split at least one level, split the
// chroma by one level. Otherwise use the largest possible trasnform size
// for chroma.
if (pd->subsampling_x || pd->subsampling_y) {
const TX_SIZE l_max_tx_size = get_vartx_max_txsize(xd, bsizec, 0);
const int is_split =
(l_max_tx_size != mbmi->inter_tx_size[0][0] && bsize == bsizec &&
txsize_to_bsize[l_max_tx_size] == bsizec);
if (is_split) max_tx_size = sub_tx_size_map[1][max_tx_size];
}
#endif // DISABLE_VARTX_FOR_CHROMA == 2
const int bh = tx_size_high_unit[max_tx_size];
const int bw = tx_size_wide_unit[max_tx_size];
int idx, idy;
......
......@@ -615,18 +615,6 @@ void av1_tokenize_sb_vartx(const AV1_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
const int mi_height = block_size_high[plane_bsize] >> tx_size_wide_log2[0];
TX_SIZE max_tx_size = get_vartx_max_txsize(
xd, plane_bsize, pd->subsampling_x || pd->subsampling_y);
#if DISABLE_VARTX_FOR_CHROMA == 2
// If the luma transform size is split at least one level, split the chroma
// by one level. Otherwise use the largest possible trasnform size for
// chroma.
if (plane && (pd->subsampling_x || pd->subsampling_y)) {
const TX_SIZE l_max_tx_size = get_vartx_max_txsize(xd, bsizec, 0);
const int is_split =
(l_max_tx_size != mbmi->inter_tx_size[0][0] && bsize == bsizec &&
txsize_to_bsize[l_max_tx_size] == bsizec);
if (is_split) max_tx_size = sub_tx_size_map[1][max_tx_size];
}
#endif // DISABLE_VARTX_FOR_CHROMA == 2
const BLOCK_SIZE txb_size = txsize_to_bsize[max_tx_size];
int bw = block_size_wide[txb_size] >> tx_size_wide_log2[0];
int bh = block_size_high[txb_size] >> tx_size_wide_log2[0];
......
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