Commit 25ed5305 authored by Debargha Mukherjee's avatar Debargha Mukherjee

Misc. fixes for 64x64 transform

Generalize intra buffer size to cover 64x64 txfms.
Fix tx_size encodings.

Change-Id: Ibc219d291b850a600c3a1370d88769a7640fb4d2
parent 1806b14a
......@@ -928,19 +928,21 @@ static const int palette_color_context_lookup[PALETTE_COLOR_CONTEXTS] = {
const aom_tree_index av1_tx_size_tree[MAX_TX_DEPTH][TREE_SIZE(TX_SIZES)] = {
{
// Max tx_size is 8X8
-0, -1,
-TX_4X4, -TX_8X8,
},
{
// Max tx_size is 16X16
-0, 2, -1, -2,
-TX_4X4, 2, -TX_8X8, -TX_16X16,
},
{
// Max tx_size is 32X32
-0, 2, -1, 4, -2, -3,
-TX_4X4, 2, -TX_8X8, 4, -TX_16X16, -TX_32X32,
},
#if CONFIG_TX64X64
{ // Max tx_size is 64X64
-0, 2, -1, 4, -2, 6, -3, -4 },
{
// Max tx_size is 64X64
-TX_4X4, 2, -TX_8X8, 4, -TX_16X16, 6, -TX_32X32, -TX_64X64,
},
#endif // CONFIG_TX64X64
};
......
......@@ -1235,8 +1235,8 @@ static void build_intra_predictors_high(
int i;
uint16_t *dst = CONVERT_TO_SHORTPTR(dst8);
uint16_t *ref = CONVERT_TO_SHORTPTR(ref8);
DECLARE_ALIGNED(16, uint16_t, left_col[MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint16_t, above_data[MAX_SB_SIZE + 16]);
DECLARE_ALIGNED(16, uint16_t, left_col[MAX_TX_SIZE * 2]);
DECLARE_ALIGNED(16, uint16_t, above_data[MAX_TX_SIZE * 2 + 16]);
uint16_t *above_row = above_data + 16;
const uint16_t *const_above_row = above_row;
const int bs = tx_size_wide[tx_size];
......@@ -1395,9 +1395,9 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
int n_left_px, int n_bottomleft_px,
int plane) {
int i;
DECLARE_ALIGNED(16, uint8_t, left_col[MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint8_t, left_col[MAX_TX_SIZE * 2]);
const uint8_t *above_ref = ref - ref_stride;
DECLARE_ALIGNED(16, uint8_t, above_data[MAX_SB_SIZE + 16]);
DECLARE_ALIGNED(16, uint8_t, above_data[MAX_TX_SIZE * 2 + 16]);
uint8_t *above_row = above_data + 16;
const uint8_t *const_above_row = above_row;
const int bs = tx_size_wide[tx_size];
......
......@@ -81,6 +81,9 @@ static const struct av1_token tx_size_encodings[MAX_TX_DEPTH][TX_SIZES] = {
{ { 0, 1 }, { 1, 1 } }, // Max tx_size is 8X8
{ { 0, 1 }, { 2, 2 }, { 3, 2 } }, // Max tx_size is 16X16
{ { 0, 1 }, { 2, 2 }, { 6, 3 }, { 7, 3 } }, // Max tx_size is 32X32
#if CONFIG_TX64X64
{ { 0, 1 }, { 2, 2 }, { 6, 3 }, { 14, 4 }, { 15, 4 } }, // Max tx_size 64X64
#endif // CONFIG_TX64X64
};
#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA || CONFIG_PALETTE
......
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