idct.c: remove dead functions
Change-Id: I6d0674f311bd2b644629fe30e4785fc18dd1b619
diff --git a/av1/common/av1_rtcd_defs.pl b/av1/common/av1_rtcd_defs.pl
index c3e2fdc..61fcf52 100755
--- a/av1/common/av1_rtcd_defs.pl
+++ b/av1/common/av1_rtcd_defs.pl
@@ -129,13 +129,6 @@
add_proto qw/void av1_iht32x32_1024_add/, "const tran_low_t *input, uint8_t *output, int pitch, const struct txfm_param *param";
-
- add_proto qw/void av1_iht64x64_4096_add/, "const tran_low_t *input, uint8_t *output, int pitch, const struct txfm_param *param";
- add_proto qw/void av1_iht32x64_2048_add/, "const tran_low_t *input, uint8_t *output, int pitch, const struct txfm_param *param";
- add_proto qw/void av1_iht64x32_2048_add/, "const tran_low_t *input, uint8_t *output, int pitch, const struct txfm_param *param";
- add_proto qw/void av1_iht16x64_1024_add/, "const tran_low_t *input, uint8_t *output, int pitch, const struct txfm_param *param";
- add_proto qw/void av1_iht64x16_1024_add/, "const tran_low_t *input, uint8_t *output, int pitch, const struct txfm_param *param";
-
# directional intra predictor functions
add_proto qw/void av1_dr_prediction_z1/, "uint8_t *dst, ptrdiff_t stride, int bw, int bh, const uint8_t *above, const uint8_t *left, int upsample_above, int dx, int dy";
add_proto qw/void av1_dr_prediction_z2/, "uint8_t *dst, ptrdiff_t stride, int bw, int bh, const uint8_t *above, const uint8_t *left, int upsample_above, int upsample_left, int dx, int dy";
diff --git a/av1/common/idct.c b/av1/common/idct.c
index 6355c15..544116a 100644
--- a/av1/common/idct.c
+++ b/av1/common/idct.c
@@ -868,320 +868,6 @@
}
}
-void av1_iht64x64_4096_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_64[] = {
- { idct64_col_c, idct64_row_c }, // DCT_DCT
- { ihalfright64_c, idct64_row_c }, // ADST_DCT
- { idct64_col_c, ihalfright64_c }, // DCT_ADST
- { ihalfright64_c, ihalfright64_c }, // ADST_ADST
- { ihalfright64_c, idct64_row_c }, // FLIPADST_DCT
- { idct64_col_c, ihalfright64_c }, // DCT_FLIPADST
- { ihalfright64_c, ihalfright64_c }, // FLIPADST_FLIPADST
- { ihalfright64_c, ihalfright64_c }, // ADST_FLIPADST
- { ihalfright64_c, ihalfright64_c }, // FLIPADST_ADST
- { iidtx64_c, iidtx64_c }, // IDTX
- { idct64_col_c, iidtx64_c }, // V_DCT
- { iidtx64_c, idct64_row_c }, // H_DCT
- { ihalfright64_c, iidtx64_c }, // V_ADST
- { iidtx64_c, ihalfright64_c }, // H_ADST
- { ihalfright64_c, iidtx64_c }, // V_FLIPADST
- { iidtx64_c, ihalfright64_c }, // H_FLIPADST
- };
-
- // TODO(urvang): Can the same array be reused, instead of using a new array?
- // Remap 32x32 input into a modified 64x64 input by:
- // - Copying over these values in top-left 32x32 locations.
- // - Setting the rest of the locations to 0.
- DECLARE_ALIGNED(32, tran_low_t, mod_input[64 * 64]);
- for (int row = 0; row < 32; ++row) {
- memcpy(mod_input + row * 64, input + row * 32, 32 * sizeof(*mod_input));
- memset(mod_input + row * 64 + 32, 0, 32 * sizeof(*mod_input));
- }
- memset(mod_input + 32 * 64, 0, 32 * 64 * sizeof(*mod_input));
- const tran_low_t *mod_input_ptr = mod_input;
-
- tran_low_t tmp[64][64];
- tran_low_t out[64][64];
- tran_low_t *outp = &out[0][0];
- int outstride = 64;
-
- // inverse transform row vectors
- for (int i = 0; i < 64; ++i) {
- IHT_64[tx_type].rows(mod_input_ptr, out[i]);
- for (int j = 0; j < 64; ++j) out[i][j] = ROUND_POWER_OF_TWO(out[i][j], 1);
- mod_input_ptr += 64;
- }
-
- // transpose
- for (int i = 0; i < 64; i++) {
- for (int j = 0; j < 64; j++) {
- tmp[j][i] = out[i][j];
- }
- }
-
- // inverse transform column vectors
- for (int i = 0; i < 64; ++i) IHT_64[tx_type].cols(tmp[i], out[i]);
-
- maybe_flip_strides(&dest, &stride, &outp, &outstride, tx_type, 64, 64);
-
- // Sum with the destination
- for (int i = 0; i < 64; ++i) {
- for (int j = 0; j < 64; ++j) {
- int d = i * stride + j;
- int s = j * outstride + i;
- dest[d] = clip_pixel_add(dest[d], ROUND_POWER_OF_TWO(outp[s], 5));
- }
- }
-}
-
-void av1_iht64x32_2048_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_64x32[] = {
- { aom_idct32_c, idct64_row_c }, // DCT_DCT
- { ihalfright32_c, idct64_row_c }, // ADST_DCT
- { aom_idct32_c, ihalfright64_c }, // DCT_ADST
- { ihalfright32_c, ihalfright64_c }, // ADST_ADST
- { ihalfright32_c, idct64_row_c }, // FLIPADST_DCT
- { aom_idct32_c, ihalfright64_c }, // DCT_FLIPADST
- { ihalfright32_c, ihalfright64_c }, // FLIPADST_FLIPADST
- { ihalfright32_c, ihalfright64_c }, // ADST_FLIPADST
- { ihalfright32_c, ihalfright64_c }, // FLIPADST_ADST
- { iidtx32_c, iidtx64_c }, // IDTX
- { aom_idct32_c, iidtx64_c }, // V_DCT
- { iidtx32_c, idct64_row_c }, // H_DCT
- { ihalfright32_c, iidtx64_c }, // V_ADST
- { iidtx32_c, ihalfright64_c }, // H_ADST
- { ihalfright32_c, iidtx64_c }, // V_FLIPADST
- { iidtx32_c, ihalfright64_c }, // H_FLIPADST
- };
-
- // Remap 32x32 input into a modified 64x32 input by:
- // - Copying over these values in top-left 32x32 locations.
- // - Setting the rest of the locations to 0.
- DECLARE_ALIGNED(32, tran_low_t, mod_input[64 * 32]);
- for (int row = 0; row < 32; ++row) {
- memcpy(mod_input + row * 64, input + row * 32, 32 * sizeof(*mod_input));
- memset(mod_input + row * 64 + 32, 0, 32 * sizeof(*mod_input));
- }
- const tran_low_t *mod_input_ptr = mod_input;
-
- const int n = 32;
- const int n2 = 64;
-
- tran_low_t out[64][32], tmp[64][32], outtmp[64];
- tran_low_t *outp = &out[0][0];
- int outstride = n;
-
- // inverse transform row vectors and transpose
- for (int i = 0; i < n; ++i) {
- IHT_64x32[tx_type].rows(mod_input_ptr, outtmp);
- for (int j = 0; j < n2; ++j)
- tmp[j][i] = (tran_low_t)dct_const_round_shift(outtmp[j] * InvSqrt2);
- mod_input_ptr += n2;
- }
-
- // inverse transform column vectors
- for (int i = 0; i < n2; ++i) IHT_64x32[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;
- dest[d] = clip_pixel_add(dest[d], ROUND_POWER_OF_TWO(outp[s], 5));
- }
- }
-}
-
-void av1_iht32x64_2048_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_32x64[] = {
- { idct64_col_c, aom_idct32_c }, // DCT_DCT
- { ihalfright64_c, aom_idct32_c }, // ADST_DCT
- { idct64_col_c, ihalfright32_c }, // DCT_ADST
- { ihalfright64_c, ihalfright32_c }, // ADST_ADST
- { ihalfright64_c, aom_idct32_c }, // FLIPADST_DCT
- { idct64_col_c, ihalfright32_c }, // DCT_FLIPADST
- { ihalfright64_c, ihalfright32_c }, // FLIPADST_FLIPADST
- { ihalfright64_c, ihalfright32_c }, // ADST_FLIPADST
- { ihalfright64_c, ihalfright32_c }, // FLIPADST_ADST
- { iidtx64_c, iidtx32_c }, // IDTX
- { idct64_col_c, iidtx32_c }, // V_DCT
- { iidtx64_c, aom_idct32_c }, // H_DCT
- { ihalfright64_c, iidtx32_c }, // V_ADST
- { iidtx64_c, ihalfright32_c }, // H_ADST
- { ihalfright64_c, iidtx32_c }, // V_FLIPADST
- { iidtx64_c, ihalfright32_c }, // H_FLIPADST
- };
-
- // Remap 32x32 input into a modified 32x64 input by:
- // - Copying over these values in top-left 32x32 locations.
- // - Setting the rest of the locations to 0.
- DECLARE_ALIGNED(32, tran_low_t, mod_input[32 * 64]);
- memcpy(mod_input, input, 32 * 32 * sizeof(*mod_input));
- memset(mod_input + 32 * 32, 0, 32 * 32 * sizeof(*mod_input));
- const tran_low_t *mod_input_ptr = mod_input;
-
- const int n = 32;
- const int n2 = 64;
-
- tran_low_t out[32][64], tmp[32][64], outtmp[32];
- tran_low_t *outp = &out[0][0];
- int outstride = n2;
-
- // inverse transform row vectors and transpose
- for (int i = 0; i < n2; ++i) {
- IHT_32x64[tx_type].rows(mod_input_ptr, outtmp);
- for (int j = 0; j < n; ++j)
- tmp[j][i] = (tran_low_t)dct_const_round_shift(outtmp[j] * InvSqrt2);
- mod_input_ptr += n;
- }
-
- // inverse transform column vectors
- for (int i = 0; i < n; ++i) IHT_32x64[tx_type].cols(tmp[i], out[i]);
-
- maybe_flip_strides(&dest, &stride, &outp, &outstride, tx_type, n2, n);
-
- // Sum with the destination
- for (int i = 0; i < n2; ++i) {
- for (int j = 0; j < n; ++j) {
- int d = i * stride + j;
- int s = j * outstride + i;
- dest[d] = clip_pixel_add(dest[d], ROUND_POWER_OF_TWO(outp[s], 5));
- }
- }
-}
-
-void av1_iht16x64_1024_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_16x64[] = {
- { idct64_col_c, aom_idct16_c }, // DCT_DCT
- { ihalfright64_c, aom_idct16_c }, // ADST_DCT
- { idct64_col_c, aom_iadst16_c }, // DCT_ADST
- { ihalfright64_c, aom_iadst16_c }, // ADST_ADST
- { ihalfright64_c, aom_idct16_c }, // FLIPADST_DCT
- { idct64_col_c, aom_iadst16_c }, // DCT_FLIPADST
- { ihalfright64_c, aom_iadst16_c }, // FLIPADST_FLIPADST
- { ihalfright64_c, aom_iadst16_c }, // ADST_FLIPADST
- { ihalfright64_c, aom_iadst16_c }, // FLIPADST_ADST
- { iidtx64_c, iidtx16_c }, // IDTX
- { idct64_col_c, iidtx16_c }, // V_DCT
- { iidtx64_c, aom_idct16_c }, // H_DCT
- { ihalfright64_c, iidtx16_c }, // V_ADST
- { iidtx64_c, aom_iadst16_c }, // H_ADST
- { ihalfright64_c, iidtx16_c }, // V_FLIPADST
- { iidtx64_c, aom_iadst16_c }, // H_FLIPADST
- };
-
- // Remap 16x32 input into a modified 16x64 input by:
- // - Copying over these values in top-left 16x32 locations.
- // - Setting the rest of the locations to 0.
- DECLARE_ALIGNED(32, tran_low_t, mod_input[16 * 64]);
- memcpy(mod_input, input, 16 * 32 * sizeof(*mod_input));
- memset(mod_input + 16 * 32, 0, 16 * 32 * sizeof(*mod_input));
- const tran_low_t *mod_input_ptr = mod_input;
-
- const int n = 16;
- const int n4 = 64;
-
- tran_low_t out[16][64], tmp[16][64], outtmp[16];
- tran_low_t *outp = &out[0][0];
- int outstride = n4;
-
- // inverse transform row vectors and transpose
- for (int i = 0; i < n4; ++i) {
- IHT_16x64[tx_type].rows(mod_input_ptr, outtmp);
- for (int j = 0; j < n; ++j) tmp[j][i] = outtmp[j];
- mod_input_ptr += n;
- }
-
- // inverse transform column vectors
- for (int i = 0; i < n; ++i) {
- IHT_16x64[tx_type].cols(tmp[i], out[i]);
- }
-
- maybe_flip_strides(&dest, &stride, &outp, &outstride, tx_type, n4, n);
-
- // Sum with the destination
- for (int i = 0; i < n4; ++i) {
- for (int j = 0; j < n; ++j) {
- int d = i * stride + j;
- int s = j * outstride + i;
- dest[d] = clip_pixel_add(dest[d], ROUND_POWER_OF_TWO(outp[s], 6));
- }
- }
-}
-
-void av1_iht64x16_1024_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_64x16[] = {
- { aom_idct16_c, idct64_row_c }, // DCT_DCT
- { aom_iadst16_c, idct64_row_c }, // ADST_DCT
- { aom_idct16_c, ihalfright64_c }, // DCT_ADST
- { aom_iadst16_c, ihalfright64_c }, // ADST_ADST
- { aom_iadst16_c, idct64_row_c }, // FLIPADST_DCT
- { aom_idct16_c, ihalfright64_c }, // DCT_FLIPADST
- { aom_iadst16_c, ihalfright64_c }, // FLIPADST_FLIPADST
- { aom_iadst16_c, ihalfright64_c }, // ADST_FLIPADST
- { aom_iadst16_c, ihalfright64_c }, // FLIPADST_ADST
- { iidtx16_c, iidtx64_c }, // IDTX
- { aom_idct16_c, iidtx64_c }, // V_DCT
- { iidtx16_c, idct64_row_c }, // H_DCT
- { aom_iadst16_c, iidtx64_c }, // V_ADST
- { iidtx16_c, ihalfright64_c }, // H_ADST
- { aom_iadst16_c, iidtx64_c }, // V_FLIPADST
- { iidtx16_c, ihalfright64_c }, // H_FLIPADST
- };
-
- // Remap 32x16 input into a modified 64x16 input by:
- // - Copying over these values in top-left 32x16 locations.
- // - Setting the rest of the locations to 0.
- DECLARE_ALIGNED(32, tran_low_t, mod_input[64 * 16]);
- for (int row = 0; row < 16; ++row) {
- memcpy(mod_input + row * 64, input + row * 32, 32 * sizeof(*mod_input));
- memset(mod_input + row * 64 + 32, 0, 32 * sizeof(*mod_input));
- }
- const tran_low_t *mod_input_ptr = mod_input;
-
- const int n = 16;
- const int n4 = 64;
-
- tran_low_t out[64][16], tmp[64][16], outtmp[64];
- tran_low_t *outp = &out[0][0];
- int outstride = n;
-
- // inverse transform row vectors and transpose
- for (int i = 0; i < n; ++i) {
- IHT_64x16[tx_type].rows(mod_input_ptr, outtmp);
- for (int j = 0; j < n4; ++j) tmp[j][i] = outtmp[j];
- mod_input_ptr += n4;
- }
-
- // inverse transform column vectors
- for (int i = 0; i < n4; ++i) {
- IHT_64x16[tx_type].cols(tmp[i], out[i]);
- }
-
- maybe_flip_strides(&dest, &stride, &outp, &outstride, tx_type, n, n4);
-
- // Sum with the destination
- for (int i = 0; i < n; ++i) {
- for (int j = 0; j < n4; ++j) {
- int d = i * stride + j;
- int s = j * outstride + i;
- dest[d] = clip_pixel_add(dest[d], ROUND_POWER_OF_TWO(outp[s], 6));
- }
- }
-}
-
// idct
static void highbd_iwht4x4_add(const tran_low_t *input, uint8_t *dest,
int stride, int eob, int bd) {
diff --git a/test/av1_fht64x64_test.cc b/test/av1_fht64x64_test.cc
deleted file mode 100644
index 0103a6c..0000000
--- a/test/av1_fht64x64_test.cc
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 2017, 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 "./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> Ht64x64Param;
-
-void fht64x64_ref(const int16_t *in, tran_low_t *out, int stride,
- TxfmParam *txfm_param) {
- av1_fht64x64_c(in, out, stride, txfm_param);
-}
-
-void iht64x64_ref(const tran_low_t *in, uint8_t *dest, int stride,
- const TxfmParam *txfm_param) {
- av1_iht64x64_4096_add_c(in, dest, stride, txfm_param);
-}
-
-class AV1Trans64x64HT : public libaom_test::TransformTestBase,
- public ::testing::TestWithParam<Ht64x64Param> {
- public:
- virtual ~AV1Trans64x64HT() {}
-
- virtual void SetUp() {
- fwd_txfm_ = GET_PARAM(0);
- inv_txfm_ = GET_PARAM(1);
- pitch_ = 64;
- height_ = 64;
- fwd_txfm_ref = fht64x64_ref;
- inv_txfm_ref = iht64x64_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(AV1Trans64x64HT, CoeffCheck) { RunCoeffCheck(); }
-TEST_P(AV1Trans64x64HT, MemCheck) { RunMemCheck(); }
-TEST_P(AV1Trans64x64HT, InvCoeffCheck) { RunInvCoeffCheck(); }
-
-using std::tr1::make_tuple;
-
-const Ht64x64Param kArrayHt64x64Param_c[] = {
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, DCT_DCT, AOM_BITS_8,
- 4096),
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, ADST_DCT, AOM_BITS_8,
- 4096),
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, DCT_ADST, AOM_BITS_8,
- 4096),
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, ADST_ADST, AOM_BITS_8,
- 4096),
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, FLIPADST_DCT,
- AOM_BITS_8, 4096),
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, DCT_FLIPADST,
- AOM_BITS_8, 4096),
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, FLIPADST_FLIPADST,
- AOM_BITS_8, 4096),
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, ADST_FLIPADST,
- AOM_BITS_8, 4096),
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, FLIPADST_ADST,
- AOM_BITS_8, 4096),
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, IDTX, AOM_BITS_8, 4096),
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, V_DCT, AOM_BITS_8,
- 4096),
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, H_DCT, AOM_BITS_8,
- 4096),
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, V_ADST, AOM_BITS_8,
- 4096),
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, H_ADST, AOM_BITS_8,
- 4096),
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, V_FLIPADST, AOM_BITS_8,
- 4096),
- make_tuple(&av1_fht64x64_c, &av1_iht64x64_4096_add_c, H_FLIPADST, AOM_BITS_8,
- 4096)
-};
-INSTANTIATE_TEST_CASE_P(C, AV1Trans64x64HT,
- ::testing::ValuesIn(kArrayHt64x64Param_c));
-
-} // namespace
diff --git a/test/test.cmake b/test/test.cmake
index fc89920..c2f94af 100644
--- a/test/test.cmake
+++ b/test/test.cmake
@@ -284,9 +284,6 @@
"${AOM_ROOT}/test/obmc_sad_test.cc"
"${AOM_ROOT}/test/obmc_variance_test.cc")
- set(AOM_UNIT_TEST_ENCODER_SOURCES
- ${AOM_UNIT_TEST_ENCODER_SOURCES}
- "${AOM_ROOT}/test/av1_fht64x64_test.cc")
endif ()
endif ()