Commit 75bfeb8d authored by Nathan E. Egge's avatar Nathan E. Egge Committed by Nathan Egge

Move daala_fdct8() / daala_idct8() into daala_tx.c.

This commit has no impact on metrics.

Change-Id: I58d85dc22627849657c88c082db940baff921f8d
parent 1aefb5ed
......@@ -160,18 +160,6 @@ void aom_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest,
}
}
#if CONFIG_DAALA_DCT8
void aom_idct8_c(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[8];
od_coeff y[8];
for (i = 0; i < 8; i++) y[i] = (od_coeff)input[i];
od_bin_idct8(x, 1, y);
for (i = 0; i < 8; i++) output[i] = (tran_low_t)x[i];
}
#else
void aom_idct8_c(const tran_low_t *input, tran_low_t *output) {
tran_low_t step1[8], step2[8];
tran_high_t temp1, temp2;
......@@ -225,7 +213,6 @@ void aom_idct8_c(const tran_low_t *input, tran_low_t *output) {
output[6] = WRAPLOW(step1[1] - step1[6]);
output[7] = WRAPLOW(step1[0] - step1[7]);
}
#endif
void aom_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride) {
tran_low_t out[8 * 8];
......
......@@ -4142,3 +4142,21 @@ void daala_idst4(const tran_low_t *input, tran_low_t *output) {
od_bin_idst4(x, 1, y);
for (i = 0; i < 4; i++) output[i] = (tran_low_t)x[i];
}
void daala_fdct8(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[8];
od_coeff y[8];
for (i = 0; i < 8; i++) x[i] = (od_coeff)input[i];
od_bin_fdct8(y, x, 1);
for (i = 0; i < 8; i++) output[i] = (tran_low_t)y[i];
}
void daala_idct8(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[8];
od_coeff y[8];
for (i = 0; i < 8; i++) y[i] = (od_coeff)input[i];
od_bin_idct8(x, 1, y);
for (i = 0; i < 8; i++) output[i] = (tran_low_t)x[i];
}
......@@ -8,6 +8,8 @@ void daala_fdct4(const tran_low_t *input, tran_low_t *output);
void daala_idct4(const tran_low_t *input, tran_low_t *output);
void daala_fdst4(const tran_low_t *input, tran_low_t *output);
void daala_idst4(const tran_low_t *input, tran_low_t *output);
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 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]);
......
......@@ -1180,6 +1180,26 @@ void av1_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride,
assert(tx_type == DCT_DCT);
#endif
static const transform_2d IHT_8[] = {
#if CONFIG_DAALA_DCT8
{ daala_idct8, daala_idct8 }, // DCT_DCT = 0
{ aom_iadst8_c, daala_idct8 }, // ADST_DCT = 1
{ daala_idct8, aom_iadst8_c }, // DCT_ADST = 2
{ aom_iadst8_c, aom_iadst8_c }, // ADST_ADST = 3
#if CONFIG_EXT_TX
{ aom_iadst8_c, daala_idct8 }, // FLIPADST_DCT
{ daala_idct8, aom_iadst8_c }, // DCT_FLIPADST
{ aom_iadst8_c, aom_iadst8_c }, // FLIPADST_FLIPADST
{ aom_iadst8_c, aom_iadst8_c }, // ADST_FLIPADST
{ aom_iadst8_c, aom_iadst8_c }, // FLIPADST_ADST
{ iidtx8_c, iidtx8_c }, // IDTX
{ daala_idct8, iidtx8_c }, // V_DCT
{ iidtx8_c, daala_idct8 }, // H_DCT
{ aom_iadst8_c, iidtx8_c }, // V_ADST
{ iidtx8_c, aom_iadst8_c }, // H_ADST
{ aom_iadst8_c, iidtx8_c }, // V_FLIPADST
{ iidtx8_c, aom_iadst8_c }, // H_FLIPADST
#endif
#else
{ aom_idct8_c, aom_idct8_c }, // DCT_DCT = 0
{ aom_iadst8_c, aom_idct8_c }, // ADST_DCT = 1
{ aom_idct8_c, aom_iadst8_c }, // DCT_ADST = 2
......@@ -1197,6 +1217,7 @@ void av1_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride,
{ iidtx8_c, aom_iadst8_c }, // H_ADST
{ aom_iadst8_c, iidtx8_c }, // V_FLIPADST
{ iidtx8_c, aom_iadst8_c }, // H_FLIPADST
#endif
#endif
};
......
......@@ -79,18 +79,6 @@ static void fdct4(const tran_low_t *input, tran_low_t *output) {
range_check(output, 4, 16);
}
#if CONFIG_DAALA_DCT8
static void fdct8(const tran_low_t *input, tran_low_t *output) {
int i;
od_coeff x[8];
od_coeff y[8];
for (i = 0; i < 8; i++) x[i] = (od_coeff)input[i];
od_bin_fdct8(y, x, 1);
for (i = 0; i < 8; i++) output[i] = (tran_low_t)y[i];
}
#else
static void fdct8(const tran_low_t *input, tran_low_t *output) {
tran_high_t temp;
tran_low_t step[8];
......@@ -168,7 +156,6 @@ static void fdct8(const tran_low_t *input, tran_low_t *output) {
range_check(output, 8, 16);
}
#endif
#if CONFIG_DAALA_DCT16
static void fdct16(const tran_low_t *input, tran_low_t *output) {
......@@ -2252,6 +2239,26 @@ void av1_fht8x8_c(const int16_t *input, tran_low_t *output, int stride,
#endif
{
static const transform_2d FHT[] = {
#if CONFIG_DAALA_DCT8
{ daala_fdct8, daala_fdct8 }, // DCT_DCT
{ fadst8, daala_fdct8 }, // ADST_DCT
{ daala_fdct8, fadst8 }, // DCT_ADST
{ fadst8, fadst8 }, // ADST_ADST
#if CONFIG_EXT_TX
{ fadst8, daala_fdct8 }, // FLIPADST_DCT
{ daala_fdct8, fadst8 }, // DCT_FLIPADST
{ fadst8, fadst8 }, // FLIPADST_FLIPADST
{ fadst8, fadst8 }, // ADST_FLIPADST
{ fadst8, fadst8 }, // FLIPADST_ADST
{ fidtx8, fidtx8 }, // IDTX
{ daala_fdct8, fidtx8 }, // V_DCT
{ fidtx8, daala_fdct8 }, // H_DCT
{ fadst8, fidtx8 }, // V_ADST
{ fidtx8, fadst8 }, // H_ADST
{ fadst8, fidtx8 }, // V_FLIPADST
{ fidtx8, fadst8 }, // H_FLIPADST
#endif
#else
{ fdct8, fdct8 }, // DCT_DCT
{ fadst8, fdct8 }, // ADST_DCT
{ fdct8, fadst8 }, // DCT_ADST
......@@ -2269,6 +2276,7 @@ void av1_fht8x8_c(const int16_t *input, tran_low_t *output, int stride,
{ fidtx8, fadst8 }, // H_ADST
{ fadst8, fidtx8 }, // V_FLIPADST
{ fidtx8, fadst8 }, // 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