Move daala_fdct32() / daala_idct32() into daala_tx.c. This commit has no impact on metrics. Change-Id: Iea355a67a4b689325deec320dd4b0b313befe7d1
diff --git a/aom_dsp/inv_txfm.c b/aom_dsp/inv_txfm.c index fabe986..801366c 100644 --- a/aom_dsp/inv_txfm.c +++ b/aom_dsp/inv_txfm.c
@@ -816,18 +816,6 @@ } } -#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) { tran_low_t step1[32], step2[32]; tran_high_t temp1, temp2; @@ -1194,7 +1182,6 @@ output[30] = WRAPLOW(step1[1] - step1[30]); output[31] = WRAPLOW(step1[0] - step1[31]); } -#endif #if CONFIG_MRC_TX void aom_imrc32x32_1024_add_c(const tran_low_t *input, uint8_t *dest,
diff --git a/av1/common/daala_tx.c b/av1/common/daala_tx.c index 5dca5f8..834682e 100644 --- a/av1/common/daala_tx.c +++ b/av1/common/daala_tx.c
@@ -4214,3 +4214,21 @@ od_bin_idst16(x, 1, y); 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]; +}
diff --git a/av1/common/daala_tx.h b/av1/common/daala_tx.h index 738329f..7c1a8eb 100644 --- a/av1/common/daala_tx.h +++ b/av1/common/daala_tx.h
@@ -16,6 +16,8 @@ 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_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_idct4(od_coeff *x, int xstride, const od_coeff y[4]);
diff --git a/av1/common/idct.c b/av1/common/idct.c index 02430b7..bf6ce76 100644 --- a/av1/common/idct.c +++ b/av1/common/idct.c
@@ -103,7 +103,7 @@ for (i = 0; i < 16; ++i) { output[i] = input[16 + i]; } - aom_idct16_c(inputhalf, output + 16); + daala_idct16(inputhalf, output + 16); } #else static void ihalfright32_c(const tran_low_t *input, tran_low_t *output) { @@ -1391,7 +1391,27 @@ assert(tx_type == DCT_DCT); #endif 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 { ihalfright32_c, aom_idct32_c }, // ADST_DCT { aom_idct32_c, ihalfright32_c }, // DCT_ADST @@ -1409,6 +1429,7 @@ { ihalfright32_c, iidtx32_c }, // V_FLIPADST { iidtx32_c, ihalfright32_c }, // H_FLIPADST #endif +#endif }; int i, j;
diff --git a/av1/encoder/dct.c b/av1/encoder/dct.c index e0eace5..43d6780 100644 --- a/av1/encoder/dct.c +++ b/av1/encoder/dct.c
@@ -331,18 +331,6 @@ 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) { tran_high_t temp; tran_low_t step[32]; @@ -740,7 +728,6 @@ range_check(output, 32, 18); } -#endif #ifndef AV1_DCT_GTEST #if CONFIG_TX64X64 && CONFIG_DAALA_DCT64 @@ -1045,7 +1032,7 @@ for (i = 0; i < 16; ++i) { inputhalf[i] = input[i + 16]; } - fdct16(inputhalf, output); + daala_fdct16(inputhalf, output); } #else static void fhalfright32(const tran_low_t *input, tran_low_t *output) { @@ -2454,7 +2441,27 @@ assert(tx_type == DCT_DCT); #endif 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 { fhalfright32, fdct32 }, // ADST_DCT { fdct32, fhalfright32 }, // DCT_ADST @@ -2472,6 +2479,7 @@ { fhalfright32, fidtx32 }, // V_FLIPADST { fidtx32, fhalfright32 }, // H_FLIPADST #endif +#endif #if CONFIG_MRC_TX { fdct32, fdct32 }, // MRC_TX #endif // CONFIG_MRC_TX