Skip to content
Snippets Groups Projects
Commit a782a3b6 authored by Deb Mukherjee's avatar Deb Mukherjee Committed by Gerrit Code Review
Browse files

Merge "Some cleanups for unnecessary macros" into nextgenv2

parents 9c323bc2 3b52b3ac
No related branches found
No related tags found
2 merge requests!6Rav1e 11 yushin 1,!3Rav1e 10 yushin
......@@ -438,24 +438,15 @@ static INLINE int get_tx2d_size(TX_SIZE tx_size) {
#if CONFIG_EXT_TX
#define ALLOW_INTRA_EXT_TX 1
// whether masked transforms are used for 32X32
#define USE_MSKTX_FOR_32X32 0
#define USE_REDUCED_TXSET_FOR_16X16 1
static const int num_ext_tx_set_inter[EXT_TX_SETS_INTER] = { 1, 16, 12, 2 };
static const int num_ext_tx_set_intra[EXT_TX_SETS_INTRA] = { 1, 7, 5 };
#if EXT_TX_SIZES == 4
static INLINE int get_ext_tx_set(TX_SIZE tx_size, BLOCK_SIZE bs, int is_inter) {
tx_size = txsize_sqr_map[tx_size];
if (tx_size > TX_32X32 || bs < BLOCK_8X8) return 0;
#if USE_REDUCED_TXSET_FOR_16X16
if (tx_size == TX_32X32) return is_inter ? 3 - USE_MSKTX_FOR_32X32 : 0;
if (tx_size == TX_32X32) return is_inter ? 3 : 0;
return (tx_size == TX_16X16 ? 2 : 1);
#else
if (tx_size == TX_32X32) return is_inter ? 3 - 2 * USE_MSKTX_FOR_32X32 : 0;
return (tx_size == TX_16X16 && !is_inter ? 2 : 1);
#endif // USE_REDUCED_TXSET_FOR_16X16
}
static const int use_intra_ext_tx_for_txsize[EXT_TX_SETS_INTRA][TX_SIZES] = {
......@@ -465,39 +456,11 @@ static const int use_intra_ext_tx_for_txsize[EXT_TX_SETS_INTRA][TX_SIZES] = {
};
static const int use_inter_ext_tx_for_txsize[EXT_TX_SETS_INTER][TX_SIZES] = {
{ 0, 0, 0, 0 }, // unused
{ 1, 1, (!USE_REDUCED_TXSET_FOR_16X16), USE_MSKTX_FOR_32X32 },
{ 0, 0, USE_REDUCED_TXSET_FOR_16X16, 0 },
{ 0, 0, 0, (!USE_MSKTX_FOR_32X32) },
};
#else // EXT_TX_SIZES == 4
static INLINE int get_ext_tx_set(TX_SIZE tx_size, BLOCK_SIZE bs, int is_inter) {
(void)is_inter;
tx_size = txsize_sqr_map[tx_size];
if (tx_size > TX_32X32 || bs < BLOCK_8X8) return 0;
if (tx_size == TX_32X32) return 0;
#if USE_REDUCED_TXSET_FOR_16X16
return (tx_size == TX_16X16 ? 2 : 1);
#else
return (tx_size == TX_16X16 && !is_inter ? 2 : 1);
#endif // USE_REDUCED_TXSET_FOR_16X16
}
static const int use_intra_ext_tx_for_txsize[EXT_TX_SETS_INTRA][TX_SIZES] = {
{ 0, 0, 0, 0 }, // unused
{ 1, 1, 0, 0 },
{ 0, 0, 1, 0 },
};
static const int use_inter_ext_tx_for_txsize[EXT_TX_SETS_INTER][TX_SIZES] = {
{ 0, 0, 0, 0 }, // unused
{ 1, 1, (!USE_REDUCED_TXSET_FOR_16X16), 0 },
{ 0, 0, USE_REDUCED_TXSET_FOR_16X16, 0 },
{ 0, 0, 0, 1 },
};
#endif // EXT_TX_SIZES == 4
// Transform types used in each intra set
static const int ext_tx_used_intra[EXT_TX_SETS_INTRA][TX_TYPES] = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment