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

Move daala_fdct16() / daala_idct16() into daala_tx.c.

This commit has no impact on metrics.

Change-Id: I4e2c66d9082e1f2bdbe8851492e91c653f5da6f1
parent 8a873db7
......@@ -390,18 +390,6 @@ void aom_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride) {
}
}
#if CONFIG_DAALA_DCT16
void aom_idct16_c(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[16];
od_coeff y[16];
for (i = 0; i < 16; i++) y[i] = (od_coeff)input[i];
od_bin_idct16(x, 1, y);
for (i = 0; i < 16; i++) output[i] = (tran_low_t)x[i];
}
#else
void aom_idct16_c(const tran_low_t *input, tran_low_t *output) {
tran_low_t step1[16], step2[16];
tran_high_t temp1, temp2;
......@@ -566,7 +554,6 @@ void aom_idct16_c(const tran_low_t *input, tran_low_t *output) {
output[14] = WRAPLOW(step2[1] - step2[14]);
output[15] = WRAPLOW(step2[0] - step2[15]);
}
#endif // CONFIG_DAALA_DCT16
void aom_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest,
int stride) {
......
......@@ -4178,3 +4178,21 @@ void daala_idst8(const tran_low_t *input, tran_low_t *output) {
od_bin_idst8(x, 1, y);
for (i = 0; i < 8; i++) output[i] = (tran_low_t)x[i];
}
void daala_fdct16(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[16];
od_coeff y[16];
for (i = 0; i < 16; i++) x[i] = (od_coeff)input[i];
od_bin_fdct16(y, x, 1);
for (i = 0; i < 16; i++) output[i] = (tran_low_t)y[i];
}
void daala_idct16(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[16];
od_coeff y[16];
for (i = 0; i < 16; i++) y[i] = (od_coeff)input[i];
od_bin_idct16(x, 1, y);
for (i = 0; i < 16; i++) output[i] = (tran_low_t)x[i];
}
......@@ -12,6 +12,8 @@ void daala_fdct8(const tran_low_t *input, tran_low_t *output);
void daala_idct8(const tran_low_t *input, tran_low_t *output);
void daala_fdst8(const tran_low_t *input, tran_low_t *output);
void daala_idst8(const tran_low_t *input, tran_low_t *output);
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 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]);
......
......@@ -1296,6 +1296,26 @@ void av1_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride,
assert(tx_type == DCT_DCT);
#endif
static const transform_2d IHT_16[] = {
#if CONFIG_DAALA_DCT16
{ daala_idct16, daala_idct16 }, // DCT_DCT = 0
{ aom_iadst16_c, daala_idct16 }, // ADST_DCT = 1
{ daala_idct16, aom_iadst16_c }, // DCT_ADST = 2
{ aom_iadst16_c, aom_iadst16_c }, // ADST_ADST = 3
#if CONFIG_EXT_TX
{ aom_iadst16_c, daala_idct16 }, // FLIPADST_DCT
{ daala_idct16, aom_iadst16_c }, // DCT_FLIPADST
{ aom_iadst16_c, aom_iadst16_c }, // FLIPADST_FLIPADST
{ aom_iadst16_c, aom_iadst16_c }, // ADST_FLIPADST
{ aom_iadst16_c, aom_iadst16_c }, // FLIPADST_ADST
{ iidtx16_c, iidtx16_c }, // IDTX
{ daala_idct16, iidtx16_c }, // V_DCT
{ iidtx16_c, daala_idct16 }, // H_DCT
{ aom_iadst16_c, iidtx16_c }, // V_ADST
{ iidtx16_c, aom_iadst16_c }, // H_ADST
{ aom_iadst16_c, iidtx16_c }, // V_FLIPADST
{ iidtx16_c, aom_iadst16_c }, // H_FLIPADST
#endif
#else
{ aom_idct16_c, aom_idct16_c }, // DCT_DCT = 0
{ aom_iadst16_c, aom_idct16_c }, // ADST_DCT = 1
{ aom_idct16_c, aom_iadst16_c }, // DCT_ADST = 2
......@@ -1313,6 +1333,7 @@ void av1_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride,
{ iidtx16_c, aom_iadst16_c }, // H_ADST
{ aom_iadst16_c, iidtx16_c }, // V_FLIPADST
{ iidtx16_c, aom_iadst16_c }, // H_FLIPADST
#endif
#endif
};
......
......@@ -157,18 +157,6 @@ static void fdct8(const tran_low_t *input, tran_low_t *output) {
range_check(output, 8, 16);
}
#if CONFIG_DAALA_DCT16
static void fdct16(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[16];
od_coeff y[16];
for (i = 0; i < 16; i++) x[i] = (od_coeff)input[i];
od_bin_fdct16(y, x, 1);
for (i = 0; i < 16; i++) output[i] = (tran_low_t)y[i];
}
#else
static void fdct16(const tran_low_t *input, tran_low_t *output) {
tran_high_t temp;
tran_low_t step[16];
......@@ -342,7 +330,6 @@ static void fdct16(const tran_low_t *input, tran_low_t *output) {
range_check(output, 16, 16);
}
#endif
#if CONFIG_DAALA_DCT32
static void fdct32(const tran_low_t *input, tran_low_t *output) {
......@@ -2385,6 +2372,26 @@ void av1_fht16x16_c(const int16_t *input, tran_low_t *output, int stride,
assert(tx_type == DCT_DCT);
#endif
static const transform_2d FHT[] = {
#if CONFIG_DAALA_DCT16
{ daala_fdct16, daala_fdct16 }, // DCT_DCT
{ fadst16, daala_fdct16 }, // ADST_DCT
{ daala_fdct16, fadst16 }, // DCT_ADST
{ fadst16, fadst16 }, // ADST_ADST
#if CONFIG_EXT_TX
{ fadst16, daala_fdct16 }, // FLIPADST_DCT
{ daala_fdct16, fadst16 }, // DCT_FLIPADST
{ fadst16, fadst16 }, // FLIPADST_FLIPADST
{ fadst16, fadst16 }, // ADST_FLIPADST
{ fadst16, fadst16 }, // FLIPADST_ADST
{ fidtx16, fidtx16 }, // IDTX
{ daala_fdct16, fidtx16 }, // V_DCT
{ fidtx16, daala_fdct16 }, // H_DCT
{ fadst16, fidtx16 }, // V_ADST
{ fidtx16, fadst16 }, // H_ADST
{ fadst16, fidtx16 }, // V_FLIPADST
{ fidtx16, fadst16 }, // H_FLIPADST
#endif
#else
{ fdct16, fdct16 }, // DCT_DCT
{ fadst16, fdct16 }, // ADST_DCT
{ fdct16, fadst16 }, // DCT_ADST
......@@ -2402,6 +2409,7 @@ void av1_fht16x16_c(const int16_t *input, tran_low_t *output, int stride,
{ fidtx16, fadst16 }, // H_ADST
{ fadst16, fidtx16 }, // V_FLIPADST
{ fidtx16, fadst16 }, // 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