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

Move daala_fdct32() / daala_idct32() into daala_tx.c.

This commit has no impact on metrics.

Change-Id: Iea355a67a4b689325deec320dd4b0b313befe7d1
parent cbcff06b
...@@ -816,18 +816,6 @@ void aom_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) { ...@@ -816,18 +816,6 @@ void aom_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) {
} }
} }
#if CONFIG_DAALA_DCT32
void aom_idct32_c(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[32];
od_coeff y[32];
for (i = 0; i < 32; i++) y[i] = (od_coeff)input[i];
od_bin_idct32(x, 1, y);
for (i = 0; i < 32; i++) output[i] = (tran_low_t)x[i];
}
#else
void aom_idct32_c(const tran_low_t *input, tran_low_t *output) { void aom_idct32_c(const tran_low_t *input, tran_low_t *output) {
tran_low_t step1[32], step2[32]; tran_low_t step1[32], step2[32];
tran_high_t temp1, temp2; tran_high_t temp1, temp2;
...@@ -1194,7 +1182,6 @@ void aom_idct32_c(const tran_low_t *input, tran_low_t *output) { ...@@ -1194,7 +1182,6 @@ void aom_idct32_c(const tran_low_t *input, tran_low_t *output) {
output[30] = WRAPLOW(step1[1] - step1[30]); output[30] = WRAPLOW(step1[1] - step1[30]);
output[31] = WRAPLOW(step1[0] - step1[31]); output[31] = WRAPLOW(step1[0] - step1[31]);
} }
#endif
#if CONFIG_MRC_TX #if CONFIG_MRC_TX
void aom_imrc32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, void aom_imrc32x32_1024_add_c(const tran_low_t *input, uint8_t *dest,
......
...@@ -4214,3 +4214,21 @@ void daala_idst16(const tran_low_t *input, tran_low_t *output) { ...@@ -4214,3 +4214,21 @@ void daala_idst16(const tran_low_t *input, tran_low_t *output) {
od_bin_idst16(x, 1, y); od_bin_idst16(x, 1, y);
for (i = 0; i < 16; i++) output[i] = (tran_low_t)x[i]; for (i = 0; i < 16; i++) output[i] = (tran_low_t)x[i];
} }
void daala_fdct32(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[32];
od_coeff y[32];
for (i = 0; i < 32; i++) x[i] = (od_coeff)input[i];
od_bin_fdct32(y, x, 1);
for (i = 0; i < 32; i++) output[i] = (tran_low_t)y[i];
}
void daala_idct32(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[32];
od_coeff y[32];
for (i = 0; i < 32; i++) y[i] = (od_coeff)input[i];
od_bin_idct32(x, 1, y);
for (i = 0; i < 32; i++) output[i] = (tran_low_t)x[i];
}
...@@ -16,6 +16,8 @@ void daala_fdct16(const tran_low_t *input, tran_low_t *output); ...@@ -16,6 +16,8 @@ void daala_fdct16(const tran_low_t *input, tran_low_t *output);
void daala_idct16(const tran_low_t *input, tran_low_t *output); void daala_idct16(const tran_low_t *input, tran_low_t *output);
void daala_fdst16(const tran_low_t *input, tran_low_t *output); 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_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);
void od_bin_fdct4(od_coeff y[4], const od_coeff *x, int xstride); 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]); void od_bin_idct4(od_coeff *x, int xstride, const od_coeff y[4]);
......
...@@ -103,7 +103,7 @@ static void ihalfright32_c(const tran_low_t *input, tran_low_t *output) { ...@@ -103,7 +103,7 @@ static void ihalfright32_c(const tran_low_t *input, tran_low_t *output) {
for (i = 0; i < 16; ++i) { for (i = 0; i < 16; ++i) {
output[i] = input[16 + i]; output[i] = input[16 + i];
} }
aom_idct16_c(inputhalf, output + 16); daala_idct16(inputhalf, output + 16);
} }
#else #else
static void ihalfright32_c(const tran_low_t *input, tran_low_t *output) { static void ihalfright32_c(const tran_low_t *input, tran_low_t *output) {
...@@ -1391,7 +1391,27 @@ void av1_iht32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride, ...@@ -1391,7 +1391,27 @@ void av1_iht32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride,
assert(tx_type == DCT_DCT); assert(tx_type == DCT_DCT);
#endif #endif
static const transform_2d IHT_32[] = { static const transform_2d IHT_32[] = {
{ aom_idct32_c, aom_idct32_c }, // DCT_DCT #if CONFIG_DAALA_DCT32
{ daala_idct32, daala_idct32 }, // DCT_DCT
#if CONFIG_EXT_TX
{ ihalfright32_c, daala_idct32 }, // ADST_DCT
{ daala_idct32, ihalfright32_c }, // DCT_ADST
{ ihalfright32_c, ihalfright32_c }, // ADST_ADST
{ ihalfright32_c, daala_idct32 }, // FLIPADST_DCT
{ daala_idct32, ihalfright32_c }, // DCT_FLIPADST
{ ihalfright32_c, ihalfright32_c }, // FLIPADST_FLIPADST
{ ihalfright32_c, ihalfright32_c }, // ADST_FLIPADST
{ ihalfright32_c, ihalfright32_c }, // FLIPADST_ADST
{ iidtx32_c, iidtx32_c }, // IDTX
{ daala_idct32, iidtx32_c }, // V_DCT
{ iidtx32_c, daala_idct32 }, // H_DCT
{ ihalfright32_c, iidtx32_c }, // V_ADST
{ iidtx32_c, ihalfright32_c }, // H_ADST
{ ihalfright32_c, iidtx32_c }, // V_FLIPADST
{ iidtx32_c, ihalfright32_c }, // H_FLIPADST
#endif
#else
{ aom_idct32_c, aom_idct32_c }, // DCT_DCT
#if CONFIG_EXT_TX #if CONFIG_EXT_TX
{ ihalfright32_c, aom_idct32_c }, // ADST_DCT { ihalfright32_c, aom_idct32_c }, // ADST_DCT
{ aom_idct32_c, ihalfright32_c }, // DCT_ADST { aom_idct32_c, ihalfright32_c }, // DCT_ADST
...@@ -1408,6 +1428,7 @@ void av1_iht32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride, ...@@ -1408,6 +1428,7 @@ void av1_iht32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride,
{ iidtx32_c, ihalfright32_c }, // H_ADST { iidtx32_c, ihalfright32_c }, // H_ADST
{ ihalfright32_c, iidtx32_c }, // V_FLIPADST { ihalfright32_c, iidtx32_c }, // V_FLIPADST
{ iidtx32_c, ihalfright32_c }, // H_FLIPADST { iidtx32_c, ihalfright32_c }, // H_FLIPADST
#endif
#endif #endif
}; };
......
...@@ -331,18 +331,6 @@ static void fdct16(const tran_low_t *input, tran_low_t *output) { ...@@ -331,18 +331,6 @@ static void fdct16(const tran_low_t *input, tran_low_t *output) {
range_check(output, 16, 16); range_check(output, 16, 16);
} }
#if CONFIG_DAALA_DCT32
static void fdct32(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[32];
od_coeff y[32];
for (i = 0; i < 32; i++) x[i] = (od_coeff)input[i];
od_bin_fdct32(y, x, 1);
for (i = 0; i < 32; i++) output[i] = (tran_low_t)y[i];
}
#else
static void fdct32(const tran_low_t *input, tran_low_t *output) { static void fdct32(const tran_low_t *input, tran_low_t *output) {
tran_high_t temp; tran_high_t temp;
tran_low_t step[32]; tran_low_t step[32];
...@@ -740,7 +728,6 @@ static void fdct32(const tran_low_t *input, tran_low_t *output) { ...@@ -740,7 +728,6 @@ static void fdct32(const tran_low_t *input, tran_low_t *output) {
range_check(output, 32, 18); range_check(output, 32, 18);
} }
#endif
#ifndef AV1_DCT_GTEST #ifndef AV1_DCT_GTEST
#if CONFIG_TX64X64 && CONFIG_DAALA_DCT64 #if CONFIG_TX64X64 && CONFIG_DAALA_DCT64
...@@ -1045,7 +1032,7 @@ static void fhalfright32(const tran_low_t *input, tran_low_t *output) { ...@@ -1045,7 +1032,7 @@ static void fhalfright32(const tran_low_t *input, tran_low_t *output) {
for (i = 0; i < 16; ++i) { for (i = 0; i < 16; ++i) {
inputhalf[i] = input[i + 16]; inputhalf[i] = input[i + 16];
} }
fdct16(inputhalf, output); daala_fdct16(inputhalf, output);
} }
#else #else
static void fhalfright32(const tran_low_t *input, tran_low_t *output) { static void fhalfright32(const tran_low_t *input, tran_low_t *output) {
...@@ -2454,7 +2441,27 @@ void av1_fht32x32_c(const int16_t *input, tran_low_t *output, int stride, ...@@ -2454,7 +2441,27 @@ void av1_fht32x32_c(const int16_t *input, tran_low_t *output, int stride,
assert(tx_type == DCT_DCT); assert(tx_type == DCT_DCT);
#endif #endif
static const transform_2d FHT[] = { static const transform_2d FHT[] = {
{ fdct32, fdct32 }, // DCT_DCT #if CONFIG_DAALA_DCT32
{ daala_fdct32, daala_fdct32 }, // DCT_DCT
#if CONFIG_EXT_TX
{ fhalfright32, daala_fdct32 }, // ADST_DCT
{ daala_fdct32, fhalfright32 }, // DCT_ADST
{ fhalfright32, fhalfright32 }, // ADST_ADST
{ fhalfright32, daala_fdct32 }, // FLIPADST_DCT
{ daala_fdct32, fhalfright32 }, // DCT_FLIPADST
{ fhalfright32, fhalfright32 }, // FLIPADST_FLIPADST
{ fhalfright32, fhalfright32 }, // ADST_FLIPADST
{ fhalfright32, fhalfright32 }, // FLIPADST_ADST
{ fidtx32, fidtx32 }, // IDTX
{ daala_fdct32, fidtx32 }, // V_DCT
{ fidtx32, daala_fdct32 }, // H_DCT
{ fhalfright32, fidtx32 }, // V_ADST
{ fidtx32, fhalfright32 }, // H_ADST
{ fhalfright32, fidtx32 }, // V_FLIPADST
{ fidtx32, fhalfright32 }, // H_FLIPADST
#endif
#else
{ fdct32, fdct32 }, // DCT_DCT
#if CONFIG_EXT_TX #if CONFIG_EXT_TX
{ fhalfright32, fdct32 }, // ADST_DCT { fhalfright32, fdct32 }, // ADST_DCT
{ fdct32, fhalfright32 }, // DCT_ADST { fdct32, fhalfright32 }, // DCT_ADST
...@@ -2472,6 +2479,7 @@ void av1_fht32x32_c(const int16_t *input, tran_low_t *output, int stride, ...@@ -2472,6 +2479,7 @@ void av1_fht32x32_c(const int16_t *input, tran_low_t *output, int stride,
{ fhalfright32, fidtx32 }, // V_FLIPADST { fhalfright32, fidtx32 }, // V_FLIPADST
{ fidtx32, fhalfright32 }, // H_FLIPADST { fidtx32, fhalfright32 }, // H_FLIPADST
#endif #endif
#endif
#if CONFIG_MRC_TX #if CONFIG_MRC_TX
{ fdct32, fdct32 }, // MRC_TX { fdct32, fdct32 }, // MRC_TX
#endif // CONFIG_MRC_TX #endif // CONFIG_MRC_TX
......
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