Remove unreachable tx: idct4x4
Change-Id: Ib868d7c62ab5cc21eba6eb3ec206dd7f06254432
diff --git a/aom_dsp/aom_dsp_rtcd_defs.pl b/aom_dsp/aom_dsp_rtcd_defs.pl
index a692c35..c77e663 100755
--- a/aom_dsp/aom_dsp_rtcd_defs.pl
+++ b/aom_dsp/aom_dsp_rtcd_defs.pl
@@ -437,12 +437,6 @@
add_proto qw/void aom_highbd_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
add_proto qw/void aom_highbd_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
-
- add_proto qw/void aom_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
- specialize qw/aom_idct4x4_16_add sse2/;
-
- add_proto qw/void aom_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
- specialize qw/aom_idct4x4_1_add sse2/;
} # CONFIG_AV1
#
diff --git a/aom_dsp/inv_txfm.c b/aom_dsp/inv_txfm.c
index 83ee8c6..245763f 100644
--- a/aom_dsp/inv_txfm.c
+++ b/aom_dsp/inv_txfm.c
@@ -93,106 +93,6 @@
}
}
-void aom_idct4_c(const tran_low_t *input, tran_low_t *output) {
- tran_low_t step[4];
- tran_high_t temp1, temp2;
- // stage 1
- temp1 = (input[0] + input[2]) * cospi_16_64;
- temp2 = (input[0] - input[2]) * cospi_16_64;
- step[0] = WRAPLOW(dct_const_round_shift(temp1));
- step[1] = WRAPLOW(dct_const_round_shift(temp2));
- temp1 = input[1] * cospi_24_64 - input[3] * cospi_8_64;
- temp2 = input[1] * cospi_8_64 + input[3] * cospi_24_64;
- step[2] = WRAPLOW(dct_const_round_shift(temp1));
- step[3] = WRAPLOW(dct_const_round_shift(temp2));
-
- // stage 2
- output[0] = WRAPLOW(step[0] + step[3]);
- output[1] = WRAPLOW(step[1] + step[2]);
- output[2] = WRAPLOW(step[1] - step[2]);
- output[3] = WRAPLOW(step[0] - step[3]);
-}
-
-void aom_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride) {
- tran_low_t out[4 * 4];
- tran_low_t *outptr = out;
- int i, j;
- tran_low_t temp_in[4], temp_out[4];
-
- // Rows
- for (i = 0; i < 4; ++i) {
- aom_idct4_c(input, outptr);
- input += 4;
- outptr += 4;
- }
-
- // Columns
- for (i = 0; i < 4; ++i) {
- for (j = 0; j < 4; ++j) temp_in[j] = out[j * 4 + i];
- aom_idct4_c(temp_in, temp_out);
- for (j = 0; j < 4; ++j) {
- dest[j * stride + i] = clip_pixel_add(dest[j * stride + i],
- ROUND_POWER_OF_TWO(temp_out[j], 4));
- }
- }
-}
-
-void aom_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest,
- int dest_stride) {
- int i;
- tran_high_t a1;
- tran_low_t out = WRAPLOW(dct_const_round_shift(input[0] * cospi_16_64));
- out = WRAPLOW(dct_const_round_shift(out * cospi_16_64));
- a1 = ROUND_POWER_OF_TWO(out, 4);
-
- if (a1 == 0) return;
-
- for (i = 0; i < 4; i++) {
- dest[0] = clip_pixel_add(dest[0], a1);
- dest[1] = clip_pixel_add(dest[1], a1);
- dest[2] = clip_pixel_add(dest[2], a1);
- dest[3] = clip_pixel_add(dest[3], a1);
- dest += dest_stride;
- }
-}
-
-void aom_iadst4_c(const tran_low_t *input, tran_low_t *output) {
- tran_high_t s0, s1, s2, s3, s4, s5, s6, s7;
-
- tran_low_t x0 = input[0];
- tran_low_t x1 = input[1];
- tran_low_t x2 = input[2];
- tran_low_t x3 = input[3];
-
- if (!(x0 | x1 | x2 | x3)) {
- output[0] = output[1] = output[2] = output[3] = 0;
- return;
- }
-
- s0 = sinpi_1_9 * x0;
- s1 = sinpi_2_9 * x0;
- s2 = sinpi_3_9 * x1;
- s3 = sinpi_4_9 * x2;
- s4 = sinpi_1_9 * x2;
- s5 = sinpi_2_9 * x3;
- s6 = sinpi_4_9 * x3;
- s7 = WRAPLOW(x0 - x2 + x3);
-
- s0 = s0 + s3 + s5;
- s1 = s1 - s4 - s6;
- s3 = s2;
- s2 = sinpi_3_9 * s7;
-
- // 1-D transform scaling factor is sqrt(2).
- // The overall dynamic range is 14b (input) + 14b (multiplication scaling)
- // + 1b (addition) = 29b.
- // Hence the output bit depth is 15b.
- output[0] = WRAPLOW(dct_const_round_shift(s0 + s3));
- output[1] = WRAPLOW(dct_const_round_shift(s1 + s3));
- output[2] = WRAPLOW(dct_const_round_shift(s2));
- output[3] = WRAPLOW(dct_const_round_shift(s0 + s1 - s3));
-}
-
void aom_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8,
int stride, int bd) {
/* 4-point reversible, orthonormal inverse Walsh-Hadamard in 3.5 adds,
diff --git a/test/av1_inv_txfm_test.cc b/test/av1_inv_txfm_test.cc
deleted file mode 100644
index 5f68df7..0000000
--- a/test/av1_inv_txfm_test.cc
+++ /dev/null
@@ -1,81 +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 <math.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
-
-#include "./av1_rtcd.h"
-#include "./aom_dsp_rtcd.h"
-#include "test/acm_random.h"
-#include "test/av1_txfm_test.h"
-#include "test/clear_system_state.h"
-#include "test/register_state_check.h"
-#include "test/util.h"
-#include "av1/common/blockd.h"
-#include "av1/common/scan.h"
-#include "aom/aom_integer.h"
-#include "aom_dsp/inv_txfm.h"
-
-using libaom_test::ACMRandom;
-
-namespace {
-
-typedef void (*IdctFunc)(const tran_low_t *in, tran_low_t *out);
-
-typedef std::tr1::tuple<IdctFunc, int, int> IdctParam;
-class AV1InvTxfm : public ::testing::TestWithParam<IdctParam> {
- public:
- virtual void SetUp() {
- inv_txfm_ = GET_PARAM(0);
- txfm_size_ = GET_PARAM(1);
- max_error_ = GET_PARAM(2);
- }
-
- void RunInvAccuracyCheck() {
- ACMRandom rnd(ACMRandom::DeterministicSeed());
- const int count_test_block = 5000;
- for (int ti = 0; ti < count_test_block; ++ti) {
- tran_low_t input[64];
- double ref_input[64];
- for (int ni = 0; ni < txfm_size_; ++ni) {
- input[ni] = rnd.Rand8() - rnd.Rand8();
- ref_input[ni] = static_cast<double>(input[ni]);
- }
-
- tran_low_t output[64];
- inv_txfm_(input, output);
-
- double ref_output[64];
- libaom_test::reference_idct_1d(ref_input, ref_output, txfm_size_);
-
- for (int ni = 0; ni < txfm_size_; ++ni) {
- EXPECT_LE(
- abs(output[ni] - static_cast<tran_low_t>(round(ref_output[ni]))),
- max_error_);
- }
- }
- }
-
- private:
- double max_error_;
- int txfm_size_;
- IdctFunc inv_txfm_;
-};
-
-TEST_P(AV1InvTxfm, RunInvAccuracyCheck) { RunInvAccuracyCheck(); }
-
-INSTANTIATE_TEST_CASE_P(C, AV1InvTxfm,
- ::testing::Values(IdctParam(&aom_idct4_c, 4, 1)));
-
-} // namespace
diff --git a/test/fdct4x4_test.cc b/test/fdct4x4_test.cc
index 3de5990..f03b1e1 100644
--- a/test/fdct4x4_test.cc
+++ b/test/fdct4x4_test.cc
@@ -38,11 +38,6 @@
typedef std::tr1::tuple<FdctFunc, IdctFunc, TX_TYPE, aom_bit_depth_t, int>
Dct4x4Param;
-void fdct4x4_ref(const int16_t *in, tran_low_t *out, int stride,
- TxfmParam * /*txfm_param*/) {
- aom_fdct4x4_c(in, out, stride);
-}
-
void fwht4x4_ref(const int16_t *in, tran_low_t *out, int stride,
TxfmParam * /*txfm_param*/) {
av1_fwht4x4_c(in, out, stride);
@@ -56,44 +51,6 @@
aom_highbd_iwht4x4_16_add_c(in, out, stride, 12);
}
-class Trans4x4DCT : public libaom_test::TransformTestBase,
- public ::testing::TestWithParam<Dct4x4Param> {
- public:
- virtual ~Trans4x4DCT() {}
-
- virtual void SetUp() {
- fwd_txfm_ = GET_PARAM(0);
- inv_txfm_ = GET_PARAM(1);
- pitch_ = 4;
- height_ = 4;
- fwd_txfm_ref = fdct4x4_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);
- }
- void RunInvTxfm(const tran_low_t *out, uint8_t *dst, int stride) {
- inv_txfm_(out, dst, stride);
- }
-
- FdctFunc fwd_txfm_;
- IdctFunc inv_txfm_;
-};
-
-TEST_P(Trans4x4DCT, AccuracyCheck) { RunAccuracyCheck(0, 0.00001); }
-
-TEST_P(Trans4x4DCT, CoeffCheck) { RunCoeffCheck(); }
-
-TEST_P(Trans4x4DCT, MemCheck) { RunMemCheck(); }
-
-TEST_P(Trans4x4DCT, InvAccuracyCheck) { RunInvAccuracyCheck(1); }
-
class Trans4x4WHT : public libaom_test::TransformTestBase,
public ::testing::TestWithParam<Dct4x4Param> {
public:
@@ -132,10 +89,6 @@
TEST_P(Trans4x4WHT, InvAccuracyCheck) { RunInvAccuracyCheck(0); }
using std::tr1::make_tuple;
-INSTANTIATE_TEST_CASE_P(C, Trans4x4DCT,
- ::testing::Values(make_tuple(&aom_fdct4x4_c,
- &aom_idct4x4_16_add_c,
- DCT_DCT, AOM_BITS_8, 16)));
INSTANTIATE_TEST_CASE_P(
C, Trans4x4WHT,
::testing::Values(make_tuple(&av1_highbd_fwht4x4_c, &iwht4x4_10, DCT_DCT,
diff --git a/test/test.cmake b/test/test.cmake
index 45815c5..f5adbf0 100644
--- a/test/test.cmake
+++ b/test/test.cmake
@@ -193,7 +193,6 @@
"${AOM_ROOT}/test/av1_fwd_txfm2d_test.cc"
"${AOM_ROOT}/test/av1_inv_txfm1d_test.cc"
"${AOM_ROOT}/test/av1_inv_txfm2d_test.cc"
- "${AOM_ROOT}/test/av1_inv_txfm_test.cc"
"${AOM_ROOT}/test/av1_wedge_utils_test.cc"
"${AOM_ROOT}/test/avg_test.cc"
"${AOM_ROOT}/test/blend_a64_mask_1d_test.cc"