Merge "Some cleanups for unnecessary macros" into nextgenv2

This commit is contained in:
Debargha Mukherjee 2016-09-02 08:37:36 +00:00 коммит произвёл Gerrit Code Review
Родитель 9c323bc272 3b52b3ac27
Коммит a782a3b68f
1 изменённых файлов: 1 добавлений и 38 удалений

Просмотреть файл

@ -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] = {