Commit a989d832 authored by Urvang Joshi's avatar Urvang Joshi

AV1InvTxfm2d.CfgTest: Add 1:2 and 1:4 transforms.

Also, fix this test by using 'txsize_sqr_up_map' instead of
'tx_size_sqr_map' in both code and test.

BUG=aomedia:1114

Change-Id: Id72b5e72a40f79ad32819224c99822b5a98538d9
parent 102ef812
......@@ -232,9 +232,11 @@ static INLINE void inv_txfm2d_add_facade(const int32_t *input, uint16_t *output,
int bd) {
TXFM_2D_FLIP_CFG cfg;
av1_get_inv_txfm_cfg(tx_type, tx_size, &cfg);
TX_SIZE tx_size_sqr = txsize_sqr_map[tx_size];
// Forward shift sum uses larger square size, to be consistent with what
// av1_gen_inv_stage_range() does for inverse shifts.
const TX_SIZE tx_size_sqr_up = txsize_sqr_up_map[tx_size];
inv_txfm2d_add_c(input, output, stride, &cfg, txfm_buf,
fwd_shift_sum[tx_size_sqr], bd);
fwd_shift_sum[tx_size_sqr_up], bd);
}
void av1_inv_txfm2d_add_4x8_c(const int32_t *input, uint16_t *output,
......
......@@ -192,19 +192,22 @@ TEST(AV1InvTxfm2d, CfgTest) {
int bd = libaom_test::bd_arr[bd_idx];
int8_t low_range = libaom_test::low_range_arr[bd_idx];
int8_t high_range = libaom_test::high_range_arr[bd_idx];
// TODO(angiebird): include rect txfm in this test
for (int tx_size = 0; tx_size < TX_SIZES; ++tx_size) {
for (int tx_size = 0; tx_size < TX_SIZES_ALL; ++tx_size) {
for (int tx_type = 0; tx_type < TX_TYPES; ++tx_type) {
#if CONFIG_TX64X64
if (tx_size == TX_64X64 && tx_type != DCT_DCT) continue;
if ((tx_size_wide[tx_size] == 64 || tx_size_high[tx_size] == 64) &&
tx_type != DCT_DCT) {
continue;
}
#endif // CONFIG_TX64X64
TXFM_2D_FLIP_CFG cfg;
av1_get_inv_txfm_cfg(static_cast<TX_TYPE>(tx_type),
static_cast<TX_SIZE>(tx_size), &cfg);
int8_t stage_range_col[MAX_TXFM_STAGE_NUM];
int8_t stage_range_row[MAX_TXFM_STAGE_NUM];
const TX_SIZE tx_size_sqr_up = txsize_sqr_up_map[tx_size];
av1_gen_inv_stage_range(stage_range_col, stage_range_row, &cfg,
fwd_shift_sum[tx_size], bd);
fwd_shift_sum[tx_size_sqr_up], bd);
const TXFM_1D_CFG *col_cfg = cfg.col_cfg;
const TXFM_1D_CFG *row_cfg = cfg.row_cfg;
libaom_test::txfm_stage_range_check(stage_range_col, col_cfg->stage_num,
......
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