Commit d866114e authored by Nathan E. Egge's avatar Nathan E. Egge Committed by Nathan Egge

Move daala_fdct64() / daala_idct64() into daala_tx.c.

This commit has no impact on metrics.

Change-Id: I29e927e64938a5a88bf6b359774f92719df2a4af
parent dfd1a925
......@@ -1390,17 +1390,6 @@ void aom_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) {
}
}
#if CONFIG_TX64X64 && CONFIG_DAALA_DCT64
void aom_idct64_c(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[64];
od_coeff y[64];
for (i = 0; i < 64; i++) y[i] = (od_coeff)input[i];
od_bin_idct64(x, 1, y);
for (i = 0; i < 64; i++) output[i] = (tran_low_t)x[i];
}
#endif
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,
......
......@@ -4232,3 +4232,23 @@ void daala_idct32(const tran_low_t *input, tran_low_t *output) {
od_bin_idct32(x, 1, y);
for (i = 0; i < 32; i++) output[i] = (tran_low_t)x[i];
}
#if CONFIG_TX64X64
void daala_fdct64(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[64];
od_coeff y[64];
for (i = 0; i < 64; i++) x[i] = (od_coeff)input[i];
od_bin_fdct64(y, x, 1);
for (i = 0; i < 64; i++) output[i] = (tran_low_t)y[i];
}
void daala_idct64(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[64];
od_coeff y[64];
for (i = 0; i < 64; i++) y[i] = (od_coeff)input[i];
od_bin_idct64(x, 1, y);
for (i = 0; i < 64; i++) output[i] = (tran_low_t)x[i];
}
#endif
......@@ -18,6 +18,10 @@ void daala_fdst16(const tran_low_t *input, tran_low_t *output);
void daala_idst16(const tran_low_t *input, tran_low_t *output);
void daala_fdct32(const tran_low_t *input, tran_low_t *output);
void daala_idct32(const tran_low_t *input, tran_low_t *output);
#if CONFIG_TX64X64
void daala_fdct64(const tran_low_t *input, tran_low_t *output);
void daala_idct64(const tran_low_t *input, tran_low_t *output);
#endif
void od_bin_fdct4(od_coeff y[4], const od_coeff *x, int xstride);
void od_bin_idct4(od_coeff *x, int xstride, const od_coeff y[4]);
......
......@@ -123,14 +123,6 @@ static void ihalfright32_c(const tran_low_t *input, tran_low_t *output) {
#if CONFIG_TX64X64
#if CONFIG_DAALA_DCT64
static void idct64_col_c(const tran_low_t *input, tran_low_t *output) {
aom_idct64_c(input, output);
}
static void idct64_row_c(const tran_low_t *input, tran_low_t *output) {
aom_idct64_c(input, output);
}
static void ihalfright64_c(const tran_low_t *input, tran_low_t *output) {
int i;
tran_low_t inputhalf[32];
......@@ -141,9 +133,8 @@ static void ihalfright64_c(const tran_low_t *input, tran_low_t *output) {
for (i = 0; i < 32; ++i) {
output[i] = input[32 + i];
}
aom_idct32_c(inputhalf, output + 32);
daala_idct32(inputhalf, output + 32);
}
#else
static void idct64_col_c(const tran_low_t *input, tran_low_t *output) {
int32_t in[64], out[64];
......@@ -1492,6 +1483,26 @@ void av1_iht64x64_4096_add_c(const tran_low_t *input, uint8_t *dest, int stride,
assert(tx_type == DCT_DCT);
#endif
static const transform_2d IHT_64[] = {
#if CONFIG_DAALA_DCT64
{ daala_idct64, daala_idct64 }, // DCT_DCT
{ ihalfright64_c, daala_idct64 }, // ADST_DCT
{ daala_idct64, ihalfright64_c }, // DCT_ADST
{ ihalfright64_c, ihalfright64_c }, // ADST_ADST
#if CONFIG_EXT_TX
{ ihalfright64_c, daala_idct64 }, // FLIPADST_DCT
{ daala_idct64, 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
{ daala_idct64, iidtx64_c }, // V_DCT
{ iidtx64_c, daala_idct64 }, // 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
#endif
#else
{ idct64_col_c, idct64_row_c }, // DCT_DCT
{ ihalfright64_c, idct64_row_c }, // ADST_DCT
{ idct64_col_c, ihalfright64_c }, // DCT_ADST
......@@ -1509,6 +1520,7 @@ void av1_iht64x64_4096_add_c(const tran_low_t *input, uint8_t *dest, int stride,
{ iidtx64_c, ihalfright64_c }, // H_ADST
{ ihalfright64_c, iidtx64_c }, // V_FLIPADST
{ iidtx64_c, ihalfright64_c }, // H_FLIPADST
#endif
#endif
};
......
......@@ -730,17 +730,6 @@ static void fdct32(const tran_low_t *input, tran_low_t *output) {
}
#ifndef AV1_DCT_GTEST
#if CONFIG_TX64X64 && CONFIG_DAALA_DCT64
static void fdct64(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[64];
od_coeff y[64];
for (i = 0; i < 64; i++) x[i] = (od_coeff)input[i];
od_bin_fdct64(y, x, 1);
for (i = 0; i < 64; i++) output[i] = (tran_low_t)y[i];
}
#endif
static void fadst4(const tran_low_t *input, tran_low_t *output) {
tran_high_t x0, x1, x2, x3;
tran_high_t s0, s1, s2, s3, s4, s5, s6, s7;
......@@ -2550,18 +2539,10 @@ static void fhalfright64(const tran_low_t *input, tran_low_t *output) {
for (i = 0; i < 32; ++i) {
inputhalf[i] = input[i + 32];
}
fdct32(inputhalf, output);
daala_fdct32(inputhalf, output);
// Note overall scaling factor is 2 times unitary
}
#endif // CONFIG_EXT_TX
static void fdct64_col(const tran_low_t *input, tran_low_t *output) {
fdct64(input, output);
}
static void fdct64_row(const tran_low_t *input, tran_low_t *output) {
fdct64(input, output);
}
#else
#if CONFIG_EXT_TX
static void fidtx64(const tran_low_t *input, tran_low_t *output) {
......@@ -2613,7 +2594,27 @@ void av1_fht64x64_c(const int16_t *input, tran_low_t *output, int stride,
assert(tx_type == DCT_DCT);
#endif
static const transform_2d FHT[] = {
{ fdct64_col, fdct64_row }, // DCT_DCT
#if CONFIG_DAALA_DCT64
{ daala_fdct64, daala_fdct64 }, // DCT_DCT
#if CONFIG_EXT_TX
{ fhalfright64, daala_fdct64 }, // ADST_DCT
{ daala_fdct64, fhalfright64 }, // DCT_ADST
{ fhalfright64, fhalfright64 }, // ADST_ADST
{ fhalfright64, daala_fdct64 }, // FLIPADST_DCT
{ daala_fdct64, fhalfright64 }, // DCT_FLIPADST
{ fhalfright64, fhalfright64 }, // FLIPADST_FLIPADST
{ fhalfright64, fhalfright64 }, // ADST_FLIPADST
{ fhalfright64, fhalfright64 }, // FLIPADST_ADST
{ fidtx64, fidtx64 }, // IDTX
{ daala_fdct64, fidtx64 }, // V_DCT
{ fidtx64, daala_fdct64 }, // H_DCT
{ fhalfright64, fidtx64 }, // V_ADST
{ fidtx64, fhalfright64 }, // H_ADST
{ fhalfright64, fidtx64 }, // V_FLIPADST
{ fidtx64, fhalfright64 }, // H_FLIPADST
#endif
#else
{ fdct64_col, fdct64_row }, // DCT_DCT
#if CONFIG_EXT_TX
{ fhalfright64, fdct64_row }, // ADST_DCT
{ fdct64_col, fhalfright64 }, // DCT_ADST
......@@ -2630,6 +2631,7 @@ void av1_fht64x64_c(const int16_t *input, tran_low_t *output, int stride,
{ fidtx64, fhalfright64 }, // H_ADST
{ fhalfright64, fidtx64 }, // V_FLIPADST
{ fidtx64, fhalfright64 }, // H_FLIPADST
#endif
#endif
};
const transform_2d ht = FHT[tx_type];
......
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