Remove dead tx: fht16x8_128_add Change-Id: I44afc709b6546cac315347000ea5481be26fcb6f
diff --git a/av1/common/av1_rtcd_defs.pl b/av1/common/av1_rtcd_defs.pl index bbbbf2f..0adf42b 100755 --- a/av1/common/av1_rtcd_defs.pl +++ b/av1/common/av1_rtcd_defs.pl
@@ -94,9 +94,6 @@ add_proto qw/void av1_iht8x16_128_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, const struct txfm_param *param"; specialize qw/av1_iht8x16_128_add sse2/; -add_proto qw/void av1_iht16x8_128_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, const struct txfm_param *param"; -specialize qw/av1_iht16x8_128_add sse2/; - add_proto qw/void av1_iht4x16_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, const struct txfm_param *param"; add_proto qw/void av1_iht16x4_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, const struct txfm_param *param"; @@ -150,8 +147,6 @@ add_proto qw/void av1_highbd_iht8x16_128_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, const struct txfm_param *param"; -add_proto qw/void av1_highbd_iht16x8_128_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, const struct txfm_param *param"; - add_proto qw/void av1_highbd_iht4x16_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, const struct txfm_param *param"; add_proto qw/void av1_highbd_iht16x4_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, const struct txfm_param *param"; @@ -244,9 +239,6 @@ add_proto qw/void av1_fht8x16/, "const int16_t *input, tran_low_t *output, int stride, struct txfm_param *param"; specialize qw/av1_fht8x16 sse2/; - add_proto qw/void av1_fht16x8/, "const int16_t *input, tran_low_t *output, int stride, struct txfm_param *param"; - specialize qw/av1_fht16x8 sse2/; - add_proto qw/void av1_fht4x16/, "const int16_t *input, tran_low_t *output, int stride, struct txfm_param *param"; add_proto qw/void av1_fht16x4/, "const int16_t *input, tran_low_t *output, int stride, struct txfm_param *param";
diff --git a/av1/common/idct.c b/av1/common/idct.c index 9c01a52..39e74bb 100644 --- a/av1/common/idct.c +++ b/av1/common/idct.c
@@ -363,73 +363,6 @@ } } -void av1_iht16x8_128_add_c(const tran_low_t *input, uint8_t *dest, int stride, - const TxfmParam *txfm_param) { - const TX_TYPE tx_type = txfm_param->tx_type; - static const transform_2d IHT_16x8[] = { - { aom_idct8_c, aom_idct16_c }, // DCT_DCT - { aom_iadst8_c, aom_idct16_c }, // ADST_DCT - { aom_idct8_c, aom_iadst16_c }, // DCT_ADST - { aom_iadst8_c, aom_iadst16_c }, // ADST_ADST - { aom_iadst8_c, aom_idct16_c }, // FLIPADST_DCT - { aom_idct8_c, aom_iadst16_c }, // DCT_FLIPADST - { aom_iadst8_c, aom_iadst16_c }, // FLIPADST_FLIPADST - { aom_iadst8_c, aom_iadst16_c }, // ADST_FLIPADST - { aom_iadst8_c, aom_iadst16_c }, // FLIPADST_ADST - { iidtx8_c, iidtx16_c }, // IDTX - { aom_idct8_c, iidtx16_c }, // V_DCT - { iidtx8_c, aom_idct16_c }, // H_DCT - { aom_iadst8_c, iidtx16_c }, // V_ADST - { iidtx8_c, aom_iadst16_c }, // H_ADST - { aom_iadst8_c, iidtx16_c }, // V_FLIPADST - { iidtx8_c, aom_iadst16_c }, // H_FLIPADST - }; - - const int n = 8; - const int n2 = 16; - - tran_low_t out[16][8], tmp[16][8], outtmp[16]; - tran_low_t *outp = &out[0][0]; - int outstride = n; - - // Multi-way scaling matrix (bits): - // AV1 row, LGT/AV1 col input+0, rowTX+1.5, mid+.5, colTX+1, out-6 == -3 - // LGT row, Daala col N/A (no 16-point LGT) - // Daala row, LGT col input+1, rowTX+0, mid+1, colTX+1, out-6 == -3 - // Daala row, col input+1, rowTX+0, mid+0, colTX+0, out-4 == -3 - - // inverse transform row vectors and transpose - for (int i = 0; i < n; ++i) { - // Case 1 - // No input scaling - // Row transform, AV1 scales up by 1.5 bits - IHT_16x8[tx_type].rows(input, outtmp); - // Transpose and mid scaling up .5 bits - for (int j = 0; j < n2; ++j) - tmp[j][i] = (tran_low_t)dct_const_round_shift(outtmp[j] * Sqrt2); - input += n2; - } - - // inverse transform column vectors - // AV!/LGT scales up by 1 bit, Daala does not scale - for (int i = 0; i < n2; ++i) { - IHT_16x8[tx_type].cols(tmp[i], out[i]); - } - - maybe_flip_strides(&dest, &stride, &outp, &outstride, tx_type, n, n2); - - // Sum with the destination - for (int i = 0; i < n; ++i) { - for (int j = 0; j < n2; ++j) { - int d = i * stride + j; - int s = j * outstride + i; - // Output scaling - // case 1 - dest[d] = clip_pixel_add(dest[d], ROUND_POWER_OF_TWO(outp[s], 6)); - } - } -} - void av1_iht8x32_256_add_c(const tran_low_t *input, uint8_t *dest, int stride, const TxfmParam *txfm_param) { const TX_TYPE tx_type = txfm_param->tx_type;
diff --git a/av1/common/x86/idct_intrin_sse2.c b/av1/common/x86/idct_intrin_sse2.c index 9b27bb6..84f1b0e 100644 --- a/av1/common/x86/idct_intrin_sse2.c +++ b/av1/common/x86/idct_intrin_sse2.c
@@ -486,156 +486,3 @@ default: assert(0); break; } } - -static INLINE void write_buffer_8x8_round6(uint8_t *dest, __m128i *in, - int stride) { - const __m128i final_rounding = _mm_set1_epi16(1 << 5); - const __m128i zero = _mm_setzero_si128(); - // Final rounding and shift - in[0] = _mm_adds_epi16(in[0], final_rounding); - in[1] = _mm_adds_epi16(in[1], final_rounding); - in[2] = _mm_adds_epi16(in[2], final_rounding); - in[3] = _mm_adds_epi16(in[3], final_rounding); - in[4] = _mm_adds_epi16(in[4], final_rounding); - in[5] = _mm_adds_epi16(in[5], final_rounding); - in[6] = _mm_adds_epi16(in[6], final_rounding); - in[7] = _mm_adds_epi16(in[7], final_rounding); - - in[0] = _mm_srai_epi16(in[0], 6); - in[1] = _mm_srai_epi16(in[1], 6); - in[2] = _mm_srai_epi16(in[2], 6); - in[3] = _mm_srai_epi16(in[3], 6); - in[4] = _mm_srai_epi16(in[4], 6); - in[5] = _mm_srai_epi16(in[5], 6); - in[6] = _mm_srai_epi16(in[6], 6); - in[7] = _mm_srai_epi16(in[7], 6); - - RECON_AND_STORE(dest + 0 * stride, in[0]); - RECON_AND_STORE(dest + 1 * stride, in[1]); - RECON_AND_STORE(dest + 2 * stride, in[2]); - RECON_AND_STORE(dest + 3 * stride, in[3]); - RECON_AND_STORE(dest + 4 * stride, in[4]); - RECON_AND_STORE(dest + 5 * stride, in[5]); - RECON_AND_STORE(dest + 6 * stride, in[6]); - RECON_AND_STORE(dest + 7 * stride, in[7]); -} - -void av1_iht16x8_128_add_sse2(const tran_low_t *input, uint8_t *dest, - int stride, const TxfmParam *txfm_param) { - __m128i in[16]; - const TX_TYPE tx_type = txfm_param->tx_type; - - // Transpose 16x8 input into in[] - in[0] = load_input_data(input + 0 * 16); - in[1] = load_input_data(input + 1 * 16); - in[2] = load_input_data(input + 2 * 16); - in[3] = load_input_data(input + 3 * 16); - in[4] = load_input_data(input + 4 * 16); - in[5] = load_input_data(input + 5 * 16); - in[6] = load_input_data(input + 6 * 16); - in[7] = load_input_data(input + 7 * 16); - array_transpose_8x8(in, in); - - in[8] = load_input_data(input + 8 + 0 * 16); - in[9] = load_input_data(input + 8 + 1 * 16); - in[10] = load_input_data(input + 8 + 2 * 16); - in[11] = load_input_data(input + 8 + 3 * 16); - in[12] = load_input_data(input + 8 + 4 * 16); - in[13] = load_input_data(input + 8 + 5 * 16); - in[14] = load_input_data(input + 8 + 6 * 16); - in[15] = load_input_data(input + 8 + 7 * 16); - array_transpose_8x8(in + 8, in + 8); - - // Row transform - switch (tx_type) { - case DCT_DCT: - case ADST_DCT: - case FLIPADST_DCT: - case H_DCT: idct16_8col(in); break; - case DCT_ADST: - case ADST_ADST: - case DCT_FLIPADST: - case FLIPADST_FLIPADST: - case ADST_FLIPADST: - case FLIPADST_ADST: - case H_ADST: - case H_FLIPADST: iadst16_8col(in); break; - case V_FLIPADST: - case V_ADST: - case V_DCT: - case IDTX: idtx16_8col(in); break; - default: assert(0); break; - } - - // Scale - scale_sqrt2_8x8(in); - scale_sqrt2_8x8(in + 8); - - // Column transform - switch (tx_type) { - case DCT_DCT: - case DCT_ADST: - case DCT_FLIPADST: - case V_DCT: - aom_idct8_sse2(in); - aom_idct8_sse2(in + 8); - break; - case ADST_DCT: - case ADST_ADST: - case FLIPADST_ADST: - case ADST_FLIPADST: - case FLIPADST_FLIPADST: - case FLIPADST_DCT: - case V_ADST: - case V_FLIPADST: - aom_iadst8_sse2(in); - aom_iadst8_sse2(in + 8); - break; - case H_DCT: - case H_ADST: - case H_FLIPADST: - case IDTX: - array_transpose_8x8(in, in); - array_transpose_8x8(in + 8, in + 8); - iidtx8_sse2(in); - iidtx8_sse2(in + 8); - break; - default: assert(0); break; - } - - switch (tx_type) { - case DCT_DCT: - case ADST_DCT: - case DCT_ADST: - case ADST_ADST: - case H_DCT: - case H_ADST: - case V_ADST: - case V_DCT: - case IDTX: - write_buffer_8x8_round6(dest, in, stride); - write_buffer_8x8_round6(dest + 8, in + 8, stride); - break; - case FLIPADST_DCT: - case FLIPADST_ADST: - case V_FLIPADST: - write_buffer_8x8_round6(dest + stride * 7, in, -stride); - write_buffer_8x8_round6(dest + stride * 7 + 8, in + 8, -stride); - break; - case DCT_FLIPADST: - case ADST_FLIPADST: - case H_FLIPADST: - flip_buffer_lr_8x8(in); - flip_buffer_lr_8x8(in + 8); - write_buffer_8x8_round6(dest, in + 8, stride); - write_buffer_8x8_round6(dest + 8, in, stride); - break; - case FLIPADST_FLIPADST: - flip_buffer_lr_8x8(in); - flip_buffer_lr_8x8(in + 8); - write_buffer_8x8_round6(dest + stride * 7, in + 8, -stride); - write_buffer_8x8_round6(dest + stride * 7 + 8, in, -stride); - break; - default: assert(0); break; - } -}
diff --git a/test/av1_fht16x8_test.cc b/test/av1_fht16x8_test.cc deleted file mode 100644 index 991cdb4..0000000 --- a/test/av1_fht16x8_test.cc +++ /dev/null
@@ -1,151 +0,0 @@ -/* - * Copyright (c) 2016, Alliance for Open Media. All rights reserved - * - * This source code is subject to the terms of the BSD 2 Clause License and - * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License - * was not distributed with this source code in the LICENSE file, you can - * obtain it at www.aomedia.org/license/software. If the Alliance for Open - * Media Patent License 1.0 was not distributed with this source code in the - * PATENTS file, you can obtain it at www.aomedia.org/license/patent. - */ - -#include "third_party/googletest/src/googletest/include/gtest/gtest.h" - -#include "./aom_dsp_rtcd.h" -#include "./av1_rtcd.h" - -#include "aom_ports/mem.h" -#include "test/acm_random.h" -#include "test/clear_system_state.h" -#include "test/register_state_check.h" -#include "test/transform_test_base.h" -#include "test/util.h" - -using libaom_test::ACMRandom; - -namespace { -typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride, - const TxfmParam *txfm_param); -using libaom_test::FhtFunc; -using std::tr1::tuple; -typedef tuple<FhtFunc, IhtFunc, TX_TYPE, aom_bit_depth_t, int> Ht16x8Param; - -void fht16x8_ref(const int16_t *in, tran_low_t *out, int stride, - TxfmParam *txfm_param) { - av1_fht16x8_c(in, out, stride, txfm_param); -} - -void iht16x8_ref(const tran_low_t *in, uint8_t *out, int stride, - const TxfmParam *txfm_param) { - av1_iht16x8_128_add_c(in, out, stride, txfm_param); -} - -class AV1Trans16x8HT : public libaom_test::TransformTestBase, - public ::testing::TestWithParam<Ht16x8Param> { - public: - virtual ~AV1Trans16x8HT() {} - - virtual void SetUp() { - fwd_txfm_ = GET_PARAM(0); - inv_txfm_ = GET_PARAM(1); - pitch_ = 16; - height_ = 8; - inv_txfm_ref = iht16x8_ref; - fwd_txfm_ref = fht16x8_ref; - bit_depth_ = GET_PARAM(3); - mask_ = (1 << bit_depth_) - 1; - num_coeffs_ = GET_PARAM(4); - txfm_param_.tx_type = GET_PARAM(2); - } - virtual void TearDown() { libaom_test::ClearSystemState(); } - - protected: - void RunFwdTxfm(const int16_t *in, tran_low_t *out, int stride) { - fwd_txfm_(in, out, stride, &txfm_param_); - } - - void RunInvTxfm(const tran_low_t *out, uint8_t *dst, int stride) { - inv_txfm_(out, dst, stride, &txfm_param_); - } - - FhtFunc fwd_txfm_; - IhtFunc inv_txfm_; -}; - -TEST_P(AV1Trans16x8HT, AccuracyCheck) { RunAccuracyCheck(1, 0.001); } -TEST_P(AV1Trans16x8HT, CoeffCheck) { RunCoeffCheck(); } -TEST_P(AV1Trans16x8HT, MemCheck) { RunMemCheck(); } -TEST_P(AV1Trans16x8HT, InvCoeffCheck) { RunInvCoeffCheck(); } -TEST_P(AV1Trans16x8HT, InvAccuracyCheck) { RunInvAccuracyCheck(1); } - -using std::tr1::make_tuple; - -const Ht16x8Param kArrayHt16x8Param_c[] = { - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, DCT_DCT, AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, ADST_DCT, AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, DCT_ADST, AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, ADST_ADST, AOM_BITS_8, - 128), - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, FLIPADST_DCT, AOM_BITS_8, - 128), - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, DCT_FLIPADST, AOM_BITS_8, - 128), - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, FLIPADST_FLIPADST, - AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, ADST_FLIPADST, AOM_BITS_8, - 128), - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, FLIPADST_ADST, AOM_BITS_8, - 128), - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, IDTX, AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, V_DCT, AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, H_DCT, AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, V_ADST, AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, H_ADST, AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, V_FLIPADST, AOM_BITS_8, - 128), - make_tuple(&av1_fht16x8_c, &av1_iht16x8_128_add_c, H_FLIPADST, AOM_BITS_8, - 128) -}; -INSTANTIATE_TEST_CASE_P(C, AV1Trans16x8HT, - ::testing::ValuesIn(kArrayHt16x8Param_c)); - -#if HAVE_SSE2 -const Ht16x8Param kArrayHt16x8Param_sse2[] = { - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, DCT_DCT, AOM_BITS_8, - 128), - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, ADST_DCT, AOM_BITS_8, - 128), - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, DCT_ADST, AOM_BITS_8, - 128), - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, ADST_ADST, - AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, FLIPADST_DCT, - AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, DCT_FLIPADST, - AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, FLIPADST_FLIPADST, - AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, ADST_FLIPADST, - AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, FLIPADST_ADST, - AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, IDTX, AOM_BITS_8, - 128), - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, V_DCT, AOM_BITS_8, - 128), - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, H_DCT, AOM_BITS_8, - 128), - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, V_ADST, AOM_BITS_8, - 128), - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, H_ADST, AOM_BITS_8, - 128), - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, V_FLIPADST, - AOM_BITS_8, 128), - make_tuple(&av1_fht16x8_sse2, &av1_iht16x8_128_add_sse2, H_FLIPADST, - AOM_BITS_8, 128) -}; -INSTANTIATE_TEST_CASE_P(SSE2, AV1Trans16x8HT, - ::testing::ValuesIn(kArrayHt16x8Param_sse2)); -#endif // HAVE_SSE2 - -} // namespace
diff --git a/test/test.cmake b/test/test.cmake index 2d43f33..3d4c13b 100644 --- a/test/test.cmake +++ b/test/test.cmake
@@ -271,7 +271,6 @@ set(AOM_UNIT_TEST_ENCODER_SOURCES ${AOM_UNIT_TEST_ENCODER_SOURCES} - "${AOM_ROOT}/test/av1_fht16x8_test.cc" "${AOM_ROOT}/test/av1_fht4x4_test.cc" "${AOM_ROOT}/test/av1_fht8x16_test.cc")