diff --git a/av1/common/av1_fwd_txfm2d.c b/av1/common/av1_fwd_txfm2d.c index 5d20e5498c2a824291415183ffe20bb4e40572de..c124f3af7530274646e19f3be6eb58fff962f11a 100644 --- a/av1/common/av1_fwd_txfm2d.c +++ b/av1/common/av1_fwd_txfm2d.c @@ -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; diff --git a/av1/common/av1_inv_txfm2d.c b/av1/common/av1_inv_txfm2d.c index 14c35fc789f6e4015d077a78a01bc476bc36924d..58845f19b4e23c6ec7e35937df85ce4f435f332b 100644 --- a/av1/common/av1_inv_txfm2d.c +++ b/av1/common/av1_inv_txfm2d.c @@ -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; diff --git a/av1/common/idct.c b/av1/common/idct.c index 4e1596957cef50abb3c1c485f7a84159034d0d84..460e9b5802ea76e4aeb8517274e3b8afa3c71eb7 100644 --- a/av1/common/idct.c +++ b/av1/common/idct.c @@ -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; diff --git a/av1/common/x86/av1_fwd_txfm2d_sse4.c b/av1/common/x86/av1_fwd_txfm2d_sse4.c index 17855094a675ef588909a80131855c0337af2b86..f7824b62768f29f4077e9a6424ed45dd6d6caab3 100644 --- a/av1/common/x86/av1_fwd_txfm2d_sse4.c +++ b/av1/common/x86/av1_fwd_txfm2d_sse4.c @@ -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; diff --git a/av1/encoder/dct.c b/av1/encoder/dct.c index fcaea5915105b9c3191e3a69237c5dbd5aa4a670..cf00cd0d94d6420a6039e66ba91d2929d7c72527 100644 --- a/av1/encoder/dct.c +++ b/av1/encoder/dct.c @@ -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) { diff --git a/test/dct16x16_test.cc b/test/dct16x16_test.cc index 6c69f658ea6515f402106ba1f0190b8d8d8786cf..af01d02345c49c675137022994a55a74d24a24a2 100644 --- a/test/dct16x16_test.cc +++ b/test/dct16x16_test.cc @@ -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 }