Commit 30dfa883 authored by Sarah Parker's avatar Sarah Parker

Clean up hbd transform code

Responding to some left over cosmetic comments from
2b5cdb1cf87c933331a16cc0221455d0a8c255e1

Change-Id: I42e126593526cedd6675adf35b9c1df78e1ddf54
parent c9751c59
......@@ -51,8 +51,8 @@ static INLINE void fwd_txfm2d_c(const int16_t *input, int32_t *output,
const int txfm_size_col = cfg->row_cfg->txfm_size;
const int txfm_size_row = cfg->col_cfg->txfm_size;
// Take the shift from the larger dimension in the rectangular case.
const int8_t *shift =
txfm_size_col > txfm_size_row ? cfg->row_cfg->shift : cfg->col_cfg->shift;
const int8_t *shift = (txfm_size_col > txfm_size_row) ? cfg->row_cfg->shift
: cfg->col_cfg->shift;
const int8_t *stage_range_col = cfg->col_cfg->stage_range;
const int8_t *stage_range_row = cfg->row_cfg->stage_range;
const int8_t *cos_bit_col = cfg->col_cfg->cos_bit;
......@@ -264,10 +264,10 @@ static const TXFM_1D_CFG *fwd_txfm_row_cfg_ls[TX_TYPES_1D][TX_SIZES] = {
TXFM_2D_FLIP_CFG av1_get_fwd_txfm_cfg(int tx_type, int tx_size) {
TXFM_2D_FLIP_CFG cfg;
set_flip_cfg(tx_type, &cfg);
int tx_type_col = vtx_tab[tx_type];
int tx_type_row = htx_tab[tx_type];
int tx_size_col = txsize_vert_map[tx_size];
int tx_size_row = txsize_horz_map[tx_size];
const int tx_type_col = vtx_tab[tx_type];
const int tx_type_row = htx_tab[tx_type];
const int tx_size_col = txsize_vert_map[tx_size];
const int tx_size_row = txsize_horz_map[tx_size];
cfg.col_cfg = fwd_txfm_col_cfg_ls[tx_type_col][tx_size_col];
cfg.row_cfg = fwd_txfm_row_cfg_ls[tx_type_row][tx_size_row];
return cfg;
......
......@@ -105,10 +105,10 @@ static const TXFM_1D_CFG *inv_txfm_row_cfg_ls[TX_TYPES_1D][TX_SIZES] = {
TXFM_2D_FLIP_CFG av1_get_inv_txfm_cfg(int tx_type, int tx_size) {
TXFM_2D_FLIP_CFG cfg;
set_flip_cfg(tx_type, &cfg);
int tx_type_col = vtx_tab[tx_type];
int tx_type_row = htx_tab[tx_type];
int tx_size_col = txsize_vert_map[tx_size];
int tx_size_row = txsize_horz_map[tx_size];
const int tx_type_col = vtx_tab[tx_type];
const int tx_type_row = htx_tab[tx_type];
const int tx_size_col = txsize_vert_map[tx_size];
const int tx_size_row = txsize_horz_map[tx_size];
cfg.col_cfg = inv_txfm_col_cfg_ls[tx_type_col][tx_size_col];
cfg.row_cfg = inv_txfm_row_cfg_ls[tx_type_row][tx_size_row];
return cfg;
......@@ -139,8 +139,8 @@ static INLINE void inv_txfm2d_add_c(const int32_t *input, uint16_t *output,
const int txfm_size_col = cfg->row_cfg->txfm_size;
const int txfm_size_row = cfg->col_cfg->txfm_size;
// Take the shift from the larger dimension in the rectangular case.
const int8_t *shift =
txfm_size_col > txfm_size_row ? cfg->row_cfg->shift : cfg->col_cfg->shift;
const int8_t *shift = (txfm_size_col > txfm_size_row) ? cfg->row_cfg->shift
: cfg->col_cfg->shift;
const int8_t *stage_range_col = cfg->col_cfg->stage_range;
const int8_t *stage_range_row = cfg->row_cfg->stage_range;
const int8_t *cos_bit_col = cfg->col_cfg->cos_bit;
......
......@@ -1458,7 +1458,6 @@ void av1_highbd_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest,
case ADST_DCT:
case DCT_ADST:
case ADST_ADST:
// fallthrough intended
av1_inv_txfm2d_add_4x4(input, CONVERT_TO_SHORTPTR(dest), stride, tx_type,
bd);
break;
......@@ -1468,7 +1467,6 @@ void av1_highbd_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest,
case FLIPADST_FLIPADST:
case ADST_FLIPADST:
case FLIPADST_ADST:
// fallthrough intended
av1_inv_txfm2d_add_4x4(input, CONVERT_TO_SHORTPTR(dest), stride, tx_type,
bd);
break;
......@@ -1480,7 +1478,6 @@ void av1_highbd_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest,
case V_FLIPADST:
case H_FLIPADST:
case IDTX:
// fallthrough intended
av1_inv_txfm2d_add_4x4_c(input, CONVERT_TO_SHORTPTR(dest), stride,
tx_type, bd);
break;
......@@ -1544,7 +1541,6 @@ static void highbd_inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest,
case ADST_DCT:
case DCT_ADST:
case ADST_ADST:
// fallthrough intended
av1_inv_txfm2d_add_8x8(input, CONVERT_TO_SHORTPTR(dest), stride, tx_type,
bd);
break;
......@@ -1554,7 +1550,6 @@ static void highbd_inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest,
case FLIPADST_FLIPADST:
case ADST_FLIPADST:
case FLIPADST_ADST:
// fallthrough intended
av1_inv_txfm2d_add_8x8(input, CONVERT_TO_SHORTPTR(dest), stride, tx_type,
bd);
break;
......@@ -1566,7 +1561,6 @@ static void highbd_inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest,
case V_FLIPADST:
case H_FLIPADST:
case IDTX:
// fallthrough intended
av1_inv_txfm2d_add_8x8_c(input, CONVERT_TO_SHORTPTR(dest), stride,
tx_type, bd);
break;
......@@ -1584,7 +1578,6 @@ static void highbd_inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest,
case ADST_DCT:
case DCT_ADST:
case ADST_ADST:
// fallthrough intended
av1_inv_txfm2d_add_16x16(input, CONVERT_TO_SHORTPTR(dest), stride,
tx_type, bd);
break;
......@@ -1594,7 +1587,6 @@ static void highbd_inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest,
case FLIPADST_FLIPADST:
case ADST_FLIPADST:
case FLIPADST_ADST:
// fallthrough intended
av1_inv_txfm2d_add_16x16(input, CONVERT_TO_SHORTPTR(dest), stride,
tx_type, bd);
break;
......@@ -1606,7 +1598,6 @@ static void highbd_inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest,
case V_FLIPADST:
case H_FLIPADST:
case IDTX:
// fallthrough intended
av1_inv_txfm2d_add_16x16_c(input, CONVERT_TO_SHORTPTR(dest), stride,
tx_type, bd);
break;
......@@ -1624,7 +1615,6 @@ static void highbd_inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest,
case ADST_DCT:
case DCT_ADST:
case ADST_ADST:
// fallthrough intended
av1_inv_txfm2d_add_32x32(input, CONVERT_TO_SHORTPTR(dest), stride,
tx_type, bd);
break;
......@@ -1634,7 +1624,6 @@ static void highbd_inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest,
case FLIPADST_FLIPADST:
case ADST_FLIPADST:
case FLIPADST_ADST:
// fallthrough intended
av1_inv_txfm2d_add_32x32(input, CONVERT_TO_SHORTPTR(dest), stride,
tx_type, bd);
break;
......@@ -1646,7 +1635,6 @@ static void highbd_inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest,
case V_FLIPADST:
case H_FLIPADST:
case IDTX:
// fallthrough intended
av1_inv_txfm2d_add_32x32_c(input, CONVERT_TO_SHORTPTR(dest), stride,
tx_type, bd);
break;
......
......@@ -45,6 +45,7 @@ static INLINE void fwd_txfm2d_sse4_1(const int16_t *input, int32_t *output,
// Rectangular transforms use c code only, so it should be ok for now.
// It will be corrected when there are sse implementations for rectangular
// transforms.
assert(cfg->row_cfg->txfm_size == cfg->col_cfg->txfm_size);
const int txfm_size = cfg->row_cfg->txfm_size;
const int8_t *shift = cfg->row_cfg->shift;
const int8_t *stage_range_col = cfg->col_cfg->stage_range;
......
......@@ -2149,20 +2149,6 @@ void av1_fwd_idtx_c(const int16_t *src_diff, tran_low_t *coeff, int stride,
}
#endif // CONFIG_EXT_TX
#if CONFIG_HIGHBITDEPTH
void av1_highbd_fht32x32_c(const int16_t *input, tran_low_t *output, int stride,
int tx_type) {
av1_fht32x32_c(input, output, stride, tx_type);
}
#if CONFIG_TX64X64
void av1_highbd_fht64x64_c(const int16_t *input, tran_low_t *output, int stride,
int tx_type) {
av1_fht64x64_c(input, output, stride, tx_type);
}
#endif // CONFIG_TX64X64
#endif // CONFIG_HIGHBITDEPTH
#if CONFIG_DPCM_INTRA
void av1_dpcm_ft4_c(const int16_t *input, int stride, TX_TYPE_1D tx_type,
tran_low_t *output) {
......
......@@ -628,8 +628,6 @@ class Trans16x16HT : public Trans16x16TestBase,
tx_type_ = GET_PARAM(2);
bit_depth_ = GET_PARAM(3);
pitch_ = 16;
fwd_txfm_ref = fht16x16_ref;
inv_txfm_ref = iht16x16_ref;
mask_ = (1 << bit_depth_) - 1;
#if CONFIG_HIGHBITDEPTH
switch (bit_depth_) {
......@@ -647,6 +645,7 @@ class Trans16x16HT : public Trans16x16TestBase,
break;
}
#else
fwd_txfm_ref = fht16x16_ref;
inv_txfm_ref = iht16x16_ref;
#endif
}
......
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