Commit e8c6f5f1 authored by Debargha Mukherjee's avatar Debargha Mukherjee

Adds prep work for 4:1 transforms

Also fixes a bug with rectangular transforms

Change-Id: Id459c18d8fdc767678452e0b20c4168a412f4de7
parent f79d48d5
This diff is collapsed.
......@@ -70,6 +70,8 @@ const uint16_t band_count_table[TX_SIZES_ALL][8] = {
{ 1, 2, 3, 4, 8, 32 - 18, 0 }, { 1, 2, 3, 4, 8, 32 - 18, 0 },
{ 1, 2, 3, 4, 11, 128 - 21, 0 }, { 1, 2, 3, 4, 11, 128 - 21, 0 },
{ 1, 2, 3, 4, 11, 512 - 21, 0 }, { 1, 2, 3, 4, 11, 512 - 21, 0 },
{ 1, 2, 3, 4, 11, 64 - 21, 0 }, { 1, 2, 3, 4, 11, 64 - 21, 0 },
{ 1, 2, 3, 4, 11, 256 - 21, 0 }, { 1, 2, 3, 4, 11, 256 - 21, 0 },
};
const uint16_t band_cum_count_table[TX_SIZES_ALL][8] = {
......@@ -84,8 +86,8 @@ const uint16_t band_cum_count_table[TX_SIZES_ALL][8] = {
{ 0, 1, 3, 6, 10, 18, 32, 0 }, { 0, 1, 3, 6, 10, 18, 32, 0 },
{ 0, 1, 3, 6, 10, 21, 128, 0 }, { 0, 1, 3, 6, 10, 21, 128, 0 },
{ 0, 1, 3, 6, 10, 21, 512, 0 }, { 0, 1, 3, 6, 10, 21, 512, 0 },
#if CONFIG_TX64X64
#endif // CONFIG_TX64X64
{ 0, 1, 3, 6, 10, 21, 64, 0 }, { 0, 1, 3, 6, 10, 21, 64, 0 },
{ 0, 1, 3, 6, 10, 21, 256, 0 }, { 0, 1, 3, 6, 10, 21, 256, 0 },
};
const uint8_t av1_coefband_trans_8x8plus[MAX_TX_SQUARE] = {
......@@ -253,12 +255,10 @@ const uint8_t av1_coefband_trans_8x8plus[MAX_TX_SQUARE] = {
#endif // CONFIG_TX64X64
};
#if CONFIG_EXT_TX
const uint8_t av1_coefband_trans_4x8_8x4[32] = {
0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4,
4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
};
#endif // CONFIG_EXT_TX
const uint8_t av1_coefband_trans_4x4[16] = {
0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5,
......
......@@ -156,9 +156,7 @@ void av1_partial_adapt_probs(struct AV1Common *cm, int mi_row, int mi_col);
DECLARE_ALIGNED(16, extern const uint8_t,
av1_coefband_trans_8x8plus[MAX_TX_SQUARE]);
#if CONFIG_EXT_TX
DECLARE_ALIGNED(16, extern const uint8_t, av1_coefband_trans_4x8_8x4[32]);
#endif // CONFIG_EXT_TX
DECLARE_ALIGNED(16, extern const uint8_t, av1_coefband_trans_4x4[16]);
DECLARE_ALIGNED(16, extern const uint16_t, band_count_table[TX_SIZES_ALL][8]);
......@@ -168,9 +166,8 @@ DECLARE_ALIGNED(16, extern const uint16_t,
static INLINE const uint8_t *get_band_translate(TX_SIZE tx_size) {
switch (tx_size) {
case TX_4X4: return av1_coefband_trans_4x4;
#if CONFIG_EXT_TX
case TX_8X4:
case TX_4X8: return av1_coefband_trans_4x8_8x4;
#endif // CONFIG_EXT_TX
default: return av1_coefband_trans_8x8plus;
}
}
......
......@@ -155,11 +155,10 @@ typedef enum ATTRIBUTE_PACKED {
TX_16X8, // 16x8 transform
TX_16X32, // 16x32 transform
TX_32X16, // 32x16 transform
#if 0 // CONFIG_TX64X64
// TODO(debargha): To be enabled later
TX_32X64, // 32x64 transform
TX_64X32, // 64x32 transform
#endif // CONFIG_TX64X64
TX_4X16, // 4x16 transform
TX_16X4, // 16x4 transform
TX_8X32, // 8x32 transform
TX_32X8, // 32x8 transform
TX_SIZES_ALL, // Includes rectangular transforms
TX_SIZES = TX_4X8, // Does NOT include rectangular transforms
TX_INVALID = 255 // Invalid transform size
......
This diff is collapsed.
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