dct.c: remove dead functions Change-Id: Ic4ca62d315a996cba308459f95e0693ff9f6fc00
diff --git a/av1/common/av1_rtcd_defs.pl b/av1/common/av1_rtcd_defs.pl index 61fcf52..7b21b17 100755 --- a/av1/common/av1_rtcd_defs.pl +++ b/av1/common/av1_rtcd_defs.pl
@@ -262,14 +262,6 @@ add_proto qw/void av1_fht32x32/, "const int16_t *input, tran_low_t *output, int stride, struct txfm_param *param"; specialize qw/av1_fht32x32 sse2 avx2/; - - add_proto qw/void av1_fht64x64/, "const int16_t *input, tran_low_t *output, int stride, struct txfm_param *param"; - add_proto qw/void av1_fht32x64/, "const int16_t *input, tran_low_t *output, int stride, struct txfm_param *param"; - add_proto qw/void av1_fht64x32/, "const int16_t *input, tran_low_t *output, int stride, struct txfm_param *param"; - add_proto qw/void av1_fht16x64/, "const int16_t *input, tran_low_t *output, int stride, struct txfm_param *param"; - add_proto qw/void av1_fht64x16/, "const int16_t *input, tran_low_t *output, int stride, struct txfm_param *param"; - - add_proto qw/void av1_fht4x8/, "const int16_t *input, tran_low_t *output, int stride, struct txfm_param *param"; specialize qw/av1_fht4x8 sse2/;
diff --git a/av1/encoder/dct.c b/av1/encoder/dct.c index 031ab00..79f3eee 100644 --- a/av1/encoder/dct.c +++ b/av1/encoder/dct.c
@@ -2006,284 +2006,6 @@ for (i = 0; i < 64; ++i) output[i] = (tran_low_t)out[i]; } -void av1_fht64x64_c(const int16_t *input, tran_low_t *output, int stride, - TxfmParam *txfm_param) { - const TX_TYPE tx_type = txfm_param->tx_type; - static const transform_2d FHT[] = { - { fdct64_col, fdct64_row }, // DCT_DCT - { fhalfright64, fdct64_row }, // ADST_DCT - { fdct64_col, fhalfright64 }, // DCT_ADST - { fhalfright64, fhalfright64 }, // ADST_ADST - { fhalfright64, fdct64_row }, // FLIPADST_DCT - { fdct64_col, fhalfright64 }, // DCT_FLIPADST - { fhalfright64, fhalfright64 }, // FLIPADST_FLIPADST - { fhalfright64, fhalfright64 }, // ADST_FLIPADST - { fhalfright64, fhalfright64 }, // FLIPADST_ADST - { fidtx64, fidtx64 }, // IDTX - { fdct64_col, fidtx64 }, // V_DCT - { fidtx64, fdct64_row }, // H_DCT - { fhalfright64, fidtx64 }, // V_ADST - { fidtx64, fhalfright64 }, // H_ADST - { fhalfright64, fidtx64 }, // V_FLIPADST - { fidtx64, fhalfright64 }, // H_FLIPADST - }; - const transform_2d ht = FHT[tx_type]; - tran_low_t out[4096]; - int i, j; - tran_low_t temp_in[64], temp_out[64]; - int16_t flipped_input[64 * 64]; - maybe_flip_input(&input, &stride, 64, 64, flipped_input, tx_type); - - // Columns - for (i = 0; i < 64; ++i) { - for (j = 0; j < 64; ++j) temp_in[j] = input[j * stride + i]; - ht.cols(temp_in, temp_out); - for (j = 0; j < 64; ++j) - out[j * 64 + i] = (temp_out[j] + 1 + (temp_out[j] > 0)) >> 2; - } - - // Rows - for (i = 0; i < 64; ++i) { - for (j = 0; j < 64; ++j) temp_in[j] = out[j + i * 64]; - ht.rows(temp_in, temp_out); - for (j = 0; j < 64; ++j) - output[j + i * 64] = - (tran_low_t)((temp_out[j] + 1 + (temp_out[j] < 0)) >> 2); - } - - // Zero out top-right 32x32 area. - for (int row = 0; row < 32; ++row) { - memset(output + row * 64 + 32, 0, 32 * sizeof(*output)); - } - // Zero out the bottom 64x32 area. - memset(output + 32 * 64, 0, 32 * 64 * sizeof(*output)); - // Re-pack non-zero coeffs in the first 32x32 indices. - for (int row = 1; row < 32; ++row) { - memcpy(output + row * 32, output + row * 64, 32 * sizeof(*output)); - } -} - -void av1_fht64x32_c(const int16_t *input, tran_low_t *output, int stride, - TxfmParam *txfm_param) { - const TX_TYPE tx_type = txfm_param->tx_type; - static const transform_2d FHT[] = { - { fdct32, fdct64_row }, // DCT_DCT - { fhalfright32, fdct64_row }, // ADST_DCT - { fdct32, fhalfright64 }, // DCT_ADST - { fhalfright32, fhalfright64 }, // ADST_ADST - { fhalfright32, fdct64_row }, // FLIPADST_DCT - { fdct32, fhalfright64 }, // DCT_FLIPADST - { fhalfright32, fhalfright64 }, // FLIPADST_FLIPADST - { fhalfright32, fhalfright64 }, // ADST_FLIPADST - { fhalfright32, fhalfright64 }, // FLIPADST_ADST - { fidtx32, fidtx64 }, // IDTX - { fdct32, fidtx64 }, // V_DCT - { fidtx32, fdct64_row }, // H_DCT - { fhalfright32, fidtx64 }, // V_ADST - { fidtx32, fhalfright64 }, // H_ADST - { fhalfright32, fidtx64 }, // V_FLIPADST - { fidtx32, fhalfright64 }, // H_FLIPADST - }; - const transform_2d ht = FHT[tx_type]; - tran_low_t out[2048]; - int i, j; - tran_low_t temp_in[64], temp_out[64]; - const int n = 32; - const int n2 = 64; - int16_t flipped_input[32 * 64]; - maybe_flip_input(&input, &stride, n, n2, flipped_input, tx_type); - - // Columns - for (i = 0; i < n2; ++i) { - for (j = 0; j < n; ++j) { - temp_in[j] = (tran_low_t)fdct_round_shift(input[j * stride + i] * Sqrt2); - } - ht.cols(temp_in, temp_out); - for (j = 0; j < n; ++j) { - out[j * n2 + i] = (tran_low_t)ROUND_POWER_OF_TWO_SIGNED(temp_out[j], 2); - } - } - - // Rows - for (i = 0; i < n; ++i) { - for (j = 0; j < n2; ++j) temp_in[j] = out[j + i * n2]; - ht.rows(temp_in, temp_out); - for (j = 0; j < n2; ++j) { - output[j + i * n2] = - (tran_low_t)ROUND_POWER_OF_TWO_SIGNED(temp_out[j], 2); - } - } - - // Zero out right 32x32 area. - for (int row = 0; row < n; ++row) { - memset(output + row * n2 + n, 0, n * sizeof(*output)); - } - // Re-pack non-zero coeffs in the first 32x32 indices. - for (int row = 1; row < 32; ++row) { - memcpy(output + row * 32, output + row * 64, 32 * sizeof(*output)); - } -} - -void av1_fht32x64_c(const int16_t *input, tran_low_t *output, int stride, - TxfmParam *txfm_param) { - const TX_TYPE tx_type = txfm_param->tx_type; - static const transform_2d FHT[] = { - { fdct64_row, fdct32 }, // DCT_DCT - { fhalfright64, fdct32 }, // ADST_DCT - { fdct64_row, fhalfright32 }, // DCT_ADST - { fhalfright64, fhalfright32 }, // ADST_ADST - { fhalfright64, fdct32 }, // FLIPADST_DCT - { fdct64_row, fhalfright32 }, // DCT_FLIPADST - { fhalfright64, fhalfright32 }, // FLIPADST_FLIPADST - { fhalfright64, fhalfright32 }, // ADST_FLIPADST - { fhalfright64, fhalfright32 }, // FLIPADST_ADST - { fidtx64, fidtx32 }, // IDTX - { fdct64_row, fidtx32 }, // V_DCT - { fidtx64, fdct32 }, // H_DCT - { fhalfright64, fidtx32 }, // V_ADST - { fidtx64, fhalfright32 }, // H_ADST - { fhalfright64, fidtx32 }, // V_FLIPADST - { fidtx64, fhalfright32 }, // H_FLIPADST - }; - const transform_2d ht = FHT[tx_type]; - tran_low_t out[32 * 64]; - int i, j; - tran_low_t temp_in[64], temp_out[64]; - const int n = 32; - const int n2 = 64; - int16_t flipped_input[32 * 64]; - maybe_flip_input(&input, &stride, n2, n, flipped_input, tx_type); - - // Rows - for (i = 0; i < n2; ++i) { - for (j = 0; j < n; ++j) { - temp_in[j] = (tran_low_t)fdct_round_shift(input[i * stride + j] * Sqrt2); - } - ht.rows(temp_in, temp_out); - for (j = 0; j < n; ++j) { - out[j * n2 + i] = (tran_low_t)ROUND_POWER_OF_TWO_SIGNED(temp_out[j], 2); - } - } - - // Columns - for (i = 0; i < n; ++i) { - for (j = 0; j < n2; ++j) temp_in[j] = out[j + i * n2]; - ht.cols(temp_in, temp_out); - for (j = 0; j < n2; ++j) { - output[i + j * n] = (tran_low_t)ROUND_POWER_OF_TWO_SIGNED(temp_out[j], 2); - } - } - - // Zero out the bottom 32x32 area. - memset(output + n * n, 0, n * n * sizeof(*output)); - // Note: no repacking needed here. -} - -void av1_fht16x64_c(const int16_t *input, tran_low_t *output, int stride, - TxfmParam *txfm_param) { - const TX_TYPE tx_type = txfm_param->tx_type; - static const transform_2d FHT[] = { - { fdct64_col, fdct16 }, // DCT_DCT - { fhalfright64, fdct16 }, // ADST_DCT - { fdct64_col, fadst16 }, // DCT_ADST - { fhalfright64, fadst16 }, // ADST_ADST - { fhalfright64, fdct16 }, // FLIPADST_DCT - { fdct64_col, fadst16 }, // DCT_FLIPADST - { fhalfright64, fadst16 }, // FLIPADST_FLIPADST - { fhalfright64, fadst16 }, // ADST_FLIPADST - { fhalfright64, fadst16 }, // FLIPADST_ADST - { fidtx64, fidtx16 }, // IDTX - { fdct64_col, fidtx16 }, // V_DCT - { fidtx64, fdct16 }, // H_DCT - { fhalfright64, fidtx16 }, // V_ADST - { fidtx64, fadst16 }, // H_ADST - { fhalfright64, fidtx16 }, // V_FLIPADST - { fidtx64, fadst16 }, // H_FLIPADST - }; - const transform_2d ht = FHT[tx_type]; - const int n = 16; - const int n4 = 64; - tran_low_t out[64 * 16]; - tran_low_t temp_in[64], temp_out[64]; - int i, j; - int16_t flipped_input[64 * 16]; - maybe_flip_input(&input, &stride, n4, n, flipped_input, tx_type); - - // Rows - for (i = 0; i < n4; ++i) { - for (j = 0; j < n; ++j) temp_in[j] = input[i * stride + j]; - ht.rows(temp_in, temp_out); - for (j = 0; j < n; ++j) out[j * n4 + i] = temp_out[j]; - } - - // Columns - for (i = 0; i < n; ++i) { - for (j = 0; j < n4; ++j) temp_in[j] = out[j + i * n4]; - ht.cols(temp_in, temp_out); - for (j = 0; j < n4; ++j) - output[i + j * n] = ROUND_POWER_OF_TWO_SIGNED(temp_out[j], 2); - } - // Zero out the bottom 16x32 area. - memset(output + 2 * n * n, 0, 2 * n * n * sizeof(*output)); - // Note: no repacking needed here. - // Note: overall scale factor of transform is 4 times unitary -} - -void av1_fht64x16_c(const int16_t *input, tran_low_t *output, int stride, - TxfmParam *txfm_param) { - const TX_TYPE tx_type = txfm_param->tx_type; - static const transform_2d FHT[] = { - { fdct16, fdct64_row }, // DCT_DCT - { fadst16, fdct64_row }, // ADST_DCT - { fdct16, fhalfright64 }, // DCT_ADST - { fadst16, fhalfright64 }, // ADST_ADST - { fadst16, fdct64_row }, // FLIPADST_DCT - { fdct16, fhalfright64 }, // DCT_FLIPADST - { fadst16, fhalfright64 }, // FLIPADST_FLIPADST - { fadst16, fhalfright64 }, // ADST_FLIPADST - { fadst16, fhalfright64 }, // FLIPADST_ADST - { fidtx16, fidtx64 }, // IDTX - { fdct16, fidtx64 }, // V_DCT - { fidtx16, fdct64_row }, // H_DCT - { fadst16, fidtx64 }, // V_ADST - { fidtx16, fhalfright64 }, // H_ADST - { fadst16, fidtx64 }, // V_FLIPADST - { fidtx16, fhalfright64 }, // H_FLIPADST - }; - const transform_2d ht = FHT[tx_type]; - const int n = 16; - const int n4 = 64; - tran_low_t out[64 * 16]; - tran_low_t temp_in[64], temp_out[64]; - int i, j; - int16_t flipped_input[64 * 16]; - maybe_flip_input(&input, &stride, n, n4, flipped_input, tx_type); - - // Columns - for (i = 0; i < n4; ++i) { - for (j = 0; j < n; ++j) temp_in[j] = input[j * stride + i]; - ht.cols(temp_in, temp_out); - for (j = 0; j < n; ++j) out[j * n4 + i] = temp_out[j]; - } - - // Rows - for (i = 0; i < n; ++i) { - for (j = 0; j < n4; ++j) temp_in[j] = out[j + i * n4]; - ht.rows(temp_in, temp_out); - for (j = 0; j < n4; ++j) - output[j + i * n4] = ROUND_POWER_OF_TWO_SIGNED(temp_out[j], 2); - } - // Zero out right 32x16 area. - for (int row = 0; row < n; ++row) { - memset(output + row * n4 + 2 * n, 0, 2 * n * sizeof(*output)); - } - // Re-pack non-zero coeffs in the first 32x16 indices. - for (int row = 1; row < 16; ++row) { - memcpy(output + row * 32, output + row * 64, 32 * sizeof(*output)); - } - // Note: overall scale factor of transform is 4 times unitary -} - // Forward identity transform. void av1_fwd_idtx_c(const int16_t *src_diff, tran_low_t *coeff, int stride, int bsx, int bsy, TX_TYPE tx_type) {