Commit c756e4d0 authored by Frederic Barbier's avatar Frederic Barbier Committed by Fred BARBIER
Browse files

Cleanup dead high-bitdepth inverse-tx functions

Cleanup related last unit-test callers.

BUG=aomedia:442

Change-Id: I9fa8a19c140bf0ef6c1690456fc9d1a54ad6b091
parent b14c1799
......@@ -1461,47 +1461,6 @@ void aom_highbd_idct8_c(const tran_low_t *input, tran_low_t *output, int bd) {
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_10_add_c(const tran_low_t *input, uint8_t *dest8,
}
}
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 @@ void aom_highbd_idct32_c(const tran_low_t *input, tran_low_t *output, int bd) {
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
......@@ -69,16 +69,6 @@ typedef void (*InvTxfmFunc)(const tran_low_t *in, uint8_t *out, int stride);
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 @@ using std::tr1::make_tuple;
#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 @@ INSTANTIATE_TEST_CASE_P(AVX2, PartialTrans32x32Test,
#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)));
......
......@@ -87,14 +87,6 @@ void fht8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
}
#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 @@ TEST_P(InvTrans8x8DCT, CompareReference) {
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 @@ INSTANTIATE_TEST_CASE_P(
// 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment