Cleanup dead high-bitdepth inverse-tx functions Cleanup related last unit-test callers. BUG=aomedia:442 Change-Id: I9fa8a19c140bf0ef6c1690456fc9d1a54ad6b091
diff --git a/aom_dsp/inv_txfm.c b/aom_dsp/inv_txfm.c index f3f7411..d1735cf 100644 --- a/aom_dsp/inv_txfm.c +++ b/aom_dsp/inv_txfm.c
@@ -1461,47 +1461,6 @@ output[7] = HIGHBD_WRAPLOW(step1[0] - step1[7], bd); } -void aom_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { - tran_low_t out[8 * 8]; - tran_low_t *outptr = out; - int i, j; - tran_low_t temp_in[8], temp_out[8]; - uint16_t *dest = CONVERT_TO_SHORTPTR(dest8); - - // First transform rows. - for (i = 0; i < 8; ++i) { - aom_highbd_idct8_c(input, outptr, bd); - input += 8; - outptr += 8; - } - - // Then transform columns. - for (i = 0; i < 8; ++i) { - for (j = 0; j < 8; ++j) temp_in[j] = out[j * 8 + i]; - aom_highbd_idct8_c(temp_in, temp_out, bd); - for (j = 0; j < 8; ++j) { - dest[j * stride + i] = highbd_clip_pixel_add( - dest[j * stride + i], ROUND_POWER_OF_TWO(temp_out[j], 5), bd); - } - } -} - -void aom_highbd_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { - int i, j; - tran_high_t a1; - tran_low_t out = - HIGHBD_WRAPLOW(dct_const_round_shift(input[0] * cospi_16_64), bd); - uint16_t *dest = CONVERT_TO_SHORTPTR(dest8); - out = HIGHBD_WRAPLOW(dct_const_round_shift(out * cospi_16_64), bd); - a1 = ROUND_POWER_OF_TWO(out, 5); - for (j = 0; j < 8; ++j) { - for (i = 0; i < 8; ++i) dest[i] = highbd_clip_pixel_add(dest[i], a1, bd); - dest += stride; - } -} - void aom_highbd_iadst4_c(const tran_low_t *input, tran_low_t *output, int bd) { tran_high_t s0, s1, s2, s3, s4, s5, s6, s7; @@ -2032,22 +1991,6 @@ } } -void aom_highbd_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { - int i, j; - tran_high_t a1; - tran_low_t out = - HIGHBD_WRAPLOW(dct_const_round_shift(input[0] * cospi_16_64), bd); - uint16_t *dest = CONVERT_TO_SHORTPTR(dest8); - - out = HIGHBD_WRAPLOW(dct_const_round_shift(out * cospi_16_64), bd); - a1 = ROUND_POWER_OF_TWO(out, 6); - for (j = 0; j < 16; ++j) { - for (i = 0; i < 16; ++i) dest[i] = highbd_clip_pixel_add(dest[i], a1, bd); - dest += stride; - } -} - void aom_highbd_idct32_c(const tran_low_t *input, tran_low_t *output, int bd) { tran_low_t step1[32], step2[32]; tran_high_t temp1, temp2; @@ -2416,84 +2359,4 @@ output[31] = HIGHBD_WRAPLOW(step1[0] - step1[31], bd); } -void aom_highbd_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { - tran_low_t out[32 * 32]; - tran_low_t *outptr = out; - int i, j; - tran_low_t temp_in[32], temp_out[32]; - uint16_t *dest = CONVERT_TO_SHORTPTR(dest8); - - // Rows - for (i = 0; i < 32; ++i) { - tran_low_t zero_coeff[16]; - for (j = 0; j < 16; ++j) zero_coeff[j] = input[2 * j] | input[2 * j + 1]; - for (j = 0; j < 8; ++j) - zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1]; - for (j = 0; j < 4; ++j) - zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1]; - for (j = 0; j < 2; ++j) - zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1]; - - if (zero_coeff[0] | zero_coeff[1]) - aom_highbd_idct32_c(input, outptr, bd); - else - memset(outptr, 0, sizeof(tran_low_t) * 32); - input += 32; - outptr += 32; - } - - // Columns - for (i = 0; i < 32; ++i) { - for (j = 0; j < 32; ++j) temp_in[j] = out[j * 32 + i]; - aom_highbd_idct32_c(temp_in, temp_out, bd); - for (j = 0; j < 32; ++j) { - dest[j * stride + i] = highbd_clip_pixel_add( - dest[j * stride + i], ROUND_POWER_OF_TWO(temp_out[j], 6), bd); - } - } -} - -void aom_highbd_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { - tran_low_t out[32 * 32] = { 0 }; - tran_low_t *outptr = out; - int i, j; - tran_low_t temp_in[32], temp_out[32]; - uint16_t *dest = CONVERT_TO_SHORTPTR(dest8); - - // Rows - // Only upper-left 8x8 has non-zero coeff. - for (i = 0; i < 8; ++i) { - aom_highbd_idct32_c(input, outptr, bd); - input += 32; - outptr += 32; - } - // Columns - for (i = 0; i < 32; ++i) { - for (j = 0; j < 32; ++j) temp_in[j] = out[j * 32 + i]; - aom_highbd_idct32_c(temp_in, temp_out, bd); - for (j = 0; j < 32; ++j) { - dest[j * stride + i] = highbd_clip_pixel_add( - dest[j * stride + i], ROUND_POWER_OF_TWO(temp_out[j], 6), bd); - } - } -} - -void aom_highbd_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { - int i, j; - int a1; - uint16_t *dest = CONVERT_TO_SHORTPTR(dest8); - - tran_low_t out = - HIGHBD_WRAPLOW(dct_const_round_shift(input[0] * cospi_16_64), bd); - out = HIGHBD_WRAPLOW(dct_const_round_shift(out * cospi_16_64), bd); - a1 = ROUND_POWER_OF_TWO(out, 6); - - for (j = 0; j < 32; ++j) { - for (i = 0; i < 32; ++i) dest[i] = highbd_clip_pixel_add(dest[i], a1, bd); - dest += stride; - } -} #endif // CONFIG_HIGHBITDEPTH
diff --git a/test/dct32x32_test.cc b/test/dct32x32_test.cc index 2c99007..7c1db65 100644 --- a/test/dct32x32_test.cc +++ b/test/dct32x32_test.cc
@@ -69,16 +69,6 @@ typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, aom_bit_depth_t> Trans32x32Param; -#if CONFIG_HIGHBITDEPTH -void idct32x32_10(const tran_low_t *in, uint8_t *out, int stride) { - aom_highbd_idct32x32_1024_add_c(in, out, stride, 10); -} - -void idct32x32_12(const tran_low_t *in, uint8_t *out, int stride) { - aom_highbd_idct32x32_1024_add_c(in, out, stride, 12); -} -#endif // CONFIG_HIGHBITDEPTH - class Trans32x32Test : public ::testing::TestWithParam<Trans32x32Param> { public: virtual ~Trans32x32Test() {} @@ -356,14 +346,10 @@ #if CONFIG_HIGHBITDEPTH INSTANTIATE_TEST_CASE_P( C, Trans32x32Test, - ::testing::Values( - make_tuple(&aom_highbd_fdct32x32_c, &idct32x32_10, 0, AOM_BITS_10), - make_tuple(&aom_highbd_fdct32x32_rd_c, &idct32x32_10, 1, AOM_BITS_10), - make_tuple(&aom_highbd_fdct32x32_c, &idct32x32_12, 0, AOM_BITS_12), - make_tuple(&aom_highbd_fdct32x32_rd_c, &idct32x32_12, 1, AOM_BITS_12), - make_tuple(&aom_fdct32x32_c, &aom_idct32x32_1024_add_c, 0, AOM_BITS_8), - make_tuple(&aom_fdct32x32_rd_c, &aom_idct32x32_1024_add_c, 1, - AOM_BITS_8))); + ::testing::Values(make_tuple(&aom_fdct32x32_c, &aom_idct32x32_1024_add_c, 0, + AOM_BITS_8), + make_tuple(&aom_fdct32x32_rd_c, &aom_idct32x32_1024_add_c, + 1, AOM_BITS_8))); INSTANTIATE_TEST_CASE_P( C, PartialTrans32x32Test, ::testing::Values(make_tuple(&aom_highbd_fdct32x32_1_c, AOM_BITS_8), @@ -411,17 +397,10 @@ #if HAVE_SSE2 && CONFIG_HIGHBITDEPTH INSTANTIATE_TEST_CASE_P( SSE2, Trans32x32Test, - ::testing::Values( - make_tuple(&aom_highbd_fdct32x32_sse2, &idct32x32_10, 0, AOM_BITS_10), - make_tuple(&aom_highbd_fdct32x32_rd_sse2, &idct32x32_10, 1, - AOM_BITS_10), - make_tuple(&aom_highbd_fdct32x32_sse2, &idct32x32_12, 0, AOM_BITS_12), - make_tuple(&aom_highbd_fdct32x32_rd_sse2, &idct32x32_12, 1, - AOM_BITS_12), - make_tuple(&aom_fdct32x32_sse2, &aom_idct32x32_1024_add_c, 0, - AOM_BITS_8), - make_tuple(&aom_fdct32x32_rd_sse2, &aom_idct32x32_1024_add_c, 1, - AOM_BITS_8))); + ::testing::Values(make_tuple(&aom_fdct32x32_sse2, &aom_idct32x32_1024_add_c, + 0, AOM_BITS_8), + make_tuple(&aom_fdct32x32_rd_sse2, + &aom_idct32x32_1024_add_c, 1, AOM_BITS_8))); INSTANTIATE_TEST_CASE_P(SSE2, PartialTrans32x32Test, ::testing::Values(make_tuple(&aom_fdct32x32_1_sse2, AOM_BITS_8)));
diff --git a/test/fdct8x8_test.cc b/test/fdct8x8_test.cc index 5299e00..e840bd7 100644 --- a/test/fdct8x8_test.cc +++ b/test/fdct8x8_test.cc
@@ -87,14 +87,6 @@ } #if CONFIG_HIGHBITDEPTH -void idct8x8_10(const tran_low_t *in, uint8_t *out, int stride) { - aom_highbd_idct8x8_64_add_c(in, out, stride, 10); -} - -void idct8x8_12(const tran_low_t *in, uint8_t *out, int stride) { - aom_highbd_idct8x8_64_add_c(in, out, stride, 12); -} - void iht8x8_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) { av1_highbd_iht8x8_64_add_c(in, out, stride, tx_type, 10); } @@ -623,12 +615,10 @@ using std::tr1::make_tuple; #if CONFIG_HIGHBITDEPTH -INSTANTIATE_TEST_CASE_P( - C, FwdTrans8x8DCT, - ::testing::Values( - make_tuple(&aom_fdct8x8_c, &aom_idct8x8_64_add_c, 0, AOM_BITS_8), - make_tuple(&aom_highbd_fdct8x8_c, &idct8x8_10, 0, AOM_BITS_10), - make_tuple(&aom_highbd_fdct8x8_c, &idct8x8_12, 0, AOM_BITS_12))); +INSTANTIATE_TEST_CASE_P(C, FwdTrans8x8DCT, + ::testing::Values(make_tuple(&aom_fdct8x8_c, + &aom_idct8x8_64_add_c, 0, + AOM_BITS_8))); #else INSTANTIATE_TEST_CASE_P(C, FwdTrans8x8DCT, ::testing::Values(make_tuple(&aom_fdct8x8_c, @@ -719,13 +709,10 @@ // that to test both branches. INSTANTIATE_TEST_CASE_P( SSE2, InvTrans8x8DCT, - ::testing::Values( - make_tuple(&idct8x8_10_add_10_c, &idct8x8_10_add_10_sse2, 6225, - AOM_BITS_10), - make_tuple(&idct8x8_10, &idct8x8_64_add_10_sse2, 6225, AOM_BITS_10), - make_tuple(&idct8x8_10_add_12_c, &idct8x8_10_add_12_sse2, 6225, - AOM_BITS_12), - make_tuple(&idct8x8_12, &idct8x8_64_add_12_sse2, 6225, AOM_BITS_12))); + ::testing::Values(make_tuple(&idct8x8_10_add_10_c, &idct8x8_10_add_10_sse2, + 6225, AOM_BITS_10), + make_tuple(&idct8x8_10_add_12_c, &idct8x8_10_add_12_sse2, + 6225, AOM_BITS_12))); #endif // HAVE_SSE2 && CONFIG_HIGHBITDEPTH #if HAVE_SSSE3 && ARCH_X86_64