Move daala_fdct4() / daala_idct4() into daala_tx.c. This commit has no impact on metrics. Change-Id: I218f2a95542ae68491d2844becf6018eda529a1f
diff --git a/aom_dsp/inv_txfm.c b/aom_dsp/inv_txfm.c index ffd0d8e..c6c2f64 100644 --- a/aom_dsp/inv_txfm.c +++ b/aom_dsp/inv_txfm.c
@@ -97,18 +97,6 @@ } } -#if CONFIG_DAALA_DCT4 -void aom_idct4_c(const tran_low_t *input, tran_low_t *output) { - int i; - od_coeff x[4]; - od_coeff y[4]; - for (i = 0; i < 4; i++) y[i] = input[i]; - od_bin_idct4(x, 1, y); - for (i = 0; i < 4; i++) output[i] = (tran_low_t)x[i]; -} - -#else - void aom_idct4_c(const tran_low_t *input, tran_low_t *output) { tran_low_t step[4]; tran_high_t temp1, temp2; @@ -128,7 +116,6 @@ output[2] = WRAPLOW(step[1] - step[2]); output[3] = WRAPLOW(step[0] - step[3]); } -#endif void aom_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride) { tran_low_t out[4 * 4];
diff --git a/av1/common/daala_tx.c b/av1/common/daala_tx.c index c35cc44..9ad6388 100644 --- a/av1/common/daala_tx.c +++ b/av1/common/daala_tx.c
@@ -4106,3 +4106,21 @@ x[63*xstride] = (od_coeff)t; } #endif + +void daala_fdct4(const tran_low_t *input, tran_low_t *output) { + int i; + od_coeff x[4]; + od_coeff y[4]; + for (i = 0; i < 4; i++) x[i] = (od_coeff)input[i]; + od_bin_fdct4(y, x, 1); + for (i = 0; i < 4; i++) output[i] = (tran_low_t)y[i]; +} + +void daala_idct4(const tran_low_t *input, tran_low_t *output) { + int i; + od_coeff x[4]; + od_coeff y[4]; + for (i = 0; i < 4; i++) y[i] = input[i]; + od_bin_idct4(x, 1, y); + for (i = 0; i < 4; i++) output[i] = (tran_low_t)x[i]; +}
diff --git a/av1/common/daala_tx.h b/av1/common/daala_tx.h index 16ab4c5..061876f 100644 --- a/av1/common/daala_tx.h +++ b/av1/common/daala_tx.h
@@ -1,8 +1,12 @@ #ifndef AOM_DSP_DAALA_TX_H_ #define AOM_DSP_DAALA_TX_H_ +#include "aom_dsp/aom_dsp_common.h" #include "av1/common/odintrin.h" +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 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_fdst4(od_coeff y[4], const od_coeff *x, int xstride);
diff --git a/av1/common/idct.c b/av1/common/idct.c index 086b6e2..a9bfb9a 100644 --- a/av1/common/idct.c +++ b/av1/common/idct.c
@@ -19,6 +19,10 @@ #include "av1/common/blockd.h" #include "av1/common/enums.h" #include "av1/common/idct.h" +#if CONFIG_DAALA_DCT4 || CONFIG_DAALA_DCT8 || CONFIG_DAALA_DCT16 || \ + CONFIG_DAALA_DCT32 || CONFIG_DAALA_DCT64 +#include "av1/common/daala_tx.h" +#endif int av1_get_tx_scale(const TX_SIZE tx_size) { const int pels = tx_size_2d[tx_size]; @@ -326,6 +330,26 @@ } #endif static const transform_2d IHT_4[] = { +#if CONFIG_DAALA_DCT4 + { daala_idct4, daala_idct4 }, // DCT_DCT = 0 + { aom_iadst4_c, daala_idct4 }, // ADST_DCT = 1 + { daala_idct4, aom_iadst4_c }, // DCT_ADST = 2 + { aom_iadst4_c, aom_iadst4_c }, // ADST_ADST = 3 +#if CONFIG_EXT_TX + { aom_iadst4_c, daala_idct4 }, // FLIPADST_DCT + { daala_idct4, aom_iadst4_c }, // DCT_FLIPADST + { aom_iadst4_c, aom_iadst4_c }, // FLIPADST_FLIPADST + { aom_iadst4_c, aom_iadst4_c }, // ADST_FLIPADST + { aom_iadst4_c, aom_iadst4_c }, // FLIPADST_ADST + { iidtx4_c, iidtx4_c }, // IDTX + { daala_idct4, iidtx4_c }, // V_DCT + { iidtx4_c, daala_idct4 }, // H_DCT + { aom_iadst4_c, iidtx4_c }, // V_ADST + { iidtx4_c, aom_iadst4_c }, // H_ADST + { aom_iadst4_c, iidtx4_c }, // V_FLIPADST + { iidtx4_c, aom_iadst4_c }, // H_FLIPADST +#endif +#else { aom_idct4_c, aom_idct4_c }, // DCT_DCT = 0 { aom_iadst4_c, aom_idct4_c }, // ADST_DCT = 1 { aom_idct4_c, aom_iadst4_c }, // DCT_ADST = 2 @@ -344,6 +368,7 @@ { aom_iadst4_c, iidtx4_c }, // V_FLIPADST { iidtx4_c, aom_iadst4_c }, // H_FLIPADST #endif +#endif }; int i, j;
diff --git a/av1/encoder/dct.c b/av1/encoder/dct.c index 128b499..8027c9a 100644 --- a/av1/encoder/dct.c +++ b/av1/encoder/dct.c
@@ -43,18 +43,6 @@ #endif } -#if CONFIG_DAALA_DCT4 -static void fdct4(const tran_low_t *input, tran_low_t *output) { - int i; - od_coeff x[4]; - od_coeff y[4]; - for (i = 0; i < 4; i++) x[i] = (od_coeff)input[i]; - od_bin_fdct4(y, x, 1); - for (i = 0; i < 4; i++) output[i] = (tran_low_t)y[i]; -} - -#else - static void fdct4(const tran_low_t *input, tran_low_t *output) { tran_high_t temp; tran_low_t step[4]; @@ -90,7 +78,6 @@ range_check(output, 4, 16); } -#endif #if CONFIG_DAALA_DCT8 static void fdct8(const tran_low_t *input, tran_low_t *output) { @@ -1377,6 +1364,26 @@ #endif { static const transform_2d FHT[] = { +#if CONFIG_DAALA_DCT4 + { daala_fdct4, daala_fdct4 }, // DCT_DCT + { fadst4, daala_fdct4 }, // ADST_DCT + { daala_fdct4, fadst4 }, // DCT_ADST + { fadst4, fadst4 }, // ADST_ADST +#if CONFIG_EXT_TX + { fadst4, daala_fdct4 }, // FLIPADST_DCT + { daala_fdct4, fadst4 }, // DCT_FLIPADST + { fadst4, fadst4 }, // FLIPADST_FLIPADST + { fadst4, fadst4 }, // ADST_FLIPADST + { fadst4, fadst4 }, // FLIPADST_ADST + { fidtx4, fidtx4 }, // IDTX + { daala_fdct4, fidtx4 }, // V_DCT + { fidtx4, daala_fdct4 }, // H_DCT + { fadst4, fidtx4 }, // V_ADST + { fidtx4, fadst4 }, // H_ADST + { fadst4, fidtx4 }, // V_FLIPADST + { fidtx4, fadst4 }, // H_FLIPADST +#endif +#else { fdct4, fdct4 }, // DCT_DCT { fadst4, fdct4 }, // ADST_DCT { fdct4, fadst4 }, // DCT_ADST @@ -1395,6 +1402,7 @@ { fadst4, fidtx4 }, // V_FLIPADST { fidtx4, fadst4 }, // H_FLIPADST #endif +#endif }; const transform_2d ht = FHT[tx_type]; tran_low_t out[4 * 4];