Move daala_fdct64() / daala_idct64() into daala_tx.c.
This commit has no impact on metrics.
Change-Id: I29e927e64938a5a88bf6b359774f92719df2a4af
diff --git a/aom_dsp/inv_txfm.c b/aom_dsp/inv_txfm.c
index 801366c..6b7c1c2 100644
--- a/aom_dsp/inv_txfm.c
+++ b/aom_dsp/inv_txfm.c
@@ -1390,17 +1390,6 @@
}
}
-#if CONFIG_TX64X64 && CONFIG_DAALA_DCT64
-void aom_idct64_c(const tran_low_t *input, tran_low_t *output) {
- int i;
- od_coeff x[64];
- od_coeff y[64];
- for (i = 0; i < 64; i++) y[i] = (od_coeff)input[i];
- od_bin_idct64(x, 1, y);
- for (i = 0; i < 64; i++) output[i] = (tran_low_t)x[i];
-}
-#endif
-
void aom_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8,
int stride, int bd) {
/* 4-point reversible, orthonormal inverse Walsh-Hadamard in 3.5 adds,
diff --git a/av1/common/daala_tx.c b/av1/common/daala_tx.c
index 834682e..5ae7df0 100644
--- a/av1/common/daala_tx.c
+++ b/av1/common/daala_tx.c
@@ -4232,3 +4232,23 @@
od_bin_idct32(x, 1, y);
for (i = 0; i < 32; i++) output[i] = (tran_low_t)x[i];
}
+
+#if CONFIG_TX64X64
+void daala_fdct64(const tran_low_t *input, tran_low_t *output) {
+ int i;
+ od_coeff x[64];
+ od_coeff y[64];
+ for (i = 0; i < 64; i++) x[i] = (od_coeff)input[i];
+ od_bin_fdct64(y, x, 1);
+ for (i = 0; i < 64; i++) output[i] = (tran_low_t)y[i];
+}
+
+void daala_idct64(const tran_low_t *input, tran_low_t *output) {
+ int i;
+ od_coeff x[64];
+ od_coeff y[64];
+ for (i = 0; i < 64; i++) y[i] = (od_coeff)input[i];
+ od_bin_idct64(x, 1, y);
+ for (i = 0; i < 64; i++) output[i] = (tran_low_t)x[i];
+}
+#endif
diff --git a/av1/common/daala_tx.h b/av1/common/daala_tx.h
index 7c1a8eb..1c3ef41 100644
--- a/av1/common/daala_tx.h
+++ b/av1/common/daala_tx.h
@@ -18,6 +18,10 @@
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);
+#if CONFIG_TX64X64
+void daala_fdct64(const tran_low_t *input, tran_low_t *output);
+void daala_idct64(const tran_low_t *input, tran_low_t *output);
+#endif
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 bf6ce76..e2a1ee1 100644
--- a/av1/common/idct.c
+++ b/av1/common/idct.c
@@ -123,14 +123,6 @@
#if CONFIG_TX64X64
#if CONFIG_DAALA_DCT64
-static void idct64_col_c(const tran_low_t *input, tran_low_t *output) {
- aom_idct64_c(input, output);
-}
-
-static void idct64_row_c(const tran_low_t *input, tran_low_t *output) {
- aom_idct64_c(input, output);
-}
-
static void ihalfright64_c(const tran_low_t *input, tran_low_t *output) {
int i;
tran_low_t inputhalf[32];
@@ -141,9 +133,8 @@
for (i = 0; i < 32; ++i) {
output[i] = input[32 + i];
}
- aom_idct32_c(inputhalf, output + 32);
+ daala_idct32(inputhalf, output + 32);
}
-
#else
static void idct64_col_c(const tran_low_t *input, tran_low_t *output) {
int32_t in[64], out[64];
@@ -1492,6 +1483,26 @@
assert(tx_type == DCT_DCT);
#endif
static const transform_2d IHT_64[] = {
+#if CONFIG_DAALA_DCT64
+ { daala_idct64, daala_idct64 }, // DCT_DCT
+ { ihalfright64_c, daala_idct64 }, // ADST_DCT
+ { daala_idct64, ihalfright64_c }, // DCT_ADST
+ { ihalfright64_c, ihalfright64_c }, // ADST_ADST
+#if CONFIG_EXT_TX
+ { ihalfright64_c, daala_idct64 }, // FLIPADST_DCT
+ { daala_idct64, ihalfright64_c }, // DCT_FLIPADST
+ { ihalfright64_c, ihalfright64_c }, // FLIPADST_FLIPADST
+ { ihalfright64_c, ihalfright64_c }, // ADST_FLIPADST
+ { ihalfright64_c, ihalfright64_c }, // FLIPADST_ADST
+ { iidtx64_c, iidtx64_c }, // IDTX
+ { daala_idct64, iidtx64_c }, // V_DCT
+ { iidtx64_c, daala_idct64 }, // H_DCT
+ { ihalfright64_c, iidtx64_c }, // V_ADST
+ { iidtx64_c, ihalfright64_c }, // H_ADST
+ { ihalfright64_c, iidtx64_c }, // V_FLIPADST
+ { iidtx64_c, ihalfright64_c }, // H_FLIPADST
+#endif
+#else
{ idct64_col_c, idct64_row_c }, // DCT_DCT
{ ihalfright64_c, idct64_row_c }, // ADST_DCT
{ idct64_col_c, ihalfright64_c }, // DCT_ADST
@@ -1510,6 +1521,7 @@
{ ihalfright64_c, iidtx64_c }, // V_FLIPADST
{ iidtx64_c, ihalfright64_c }, // H_FLIPADST
#endif
+#endif
};
int i, j;
diff --git a/av1/encoder/dct.c b/av1/encoder/dct.c
index 43d6780..68d6383 100644
--- a/av1/encoder/dct.c
+++ b/av1/encoder/dct.c
@@ -730,17 +730,6 @@
}
#ifndef AV1_DCT_GTEST
-#if CONFIG_TX64X64 && CONFIG_DAALA_DCT64
-static void fdct64(const tran_low_t *input, tran_low_t *output) {
- int i;
- od_coeff x[64];
- od_coeff y[64];
- for (i = 0; i < 64; i++) x[i] = (od_coeff)input[i];
- od_bin_fdct64(y, x, 1);
- for (i = 0; i < 64; i++) output[i] = (tran_low_t)y[i];
-}
-#endif
-
static void fadst4(const tran_low_t *input, tran_low_t *output) {
tran_high_t x0, x1, x2, x3;
tran_high_t s0, s1, s2, s3, s4, s5, s6, s7;
@@ -2550,18 +2539,10 @@
for (i = 0; i < 32; ++i) {
inputhalf[i] = input[i + 32];
}
- fdct32(inputhalf, output);
+ daala_fdct32(inputhalf, output);
// Note overall scaling factor is 2 times unitary
}
#endif // CONFIG_EXT_TX
-
-static void fdct64_col(const tran_low_t *input, tran_low_t *output) {
- fdct64(input, output);
-}
-
-static void fdct64_row(const tran_low_t *input, tran_low_t *output) {
- fdct64(input, output);
-}
#else
#if CONFIG_EXT_TX
static void fidtx64(const tran_low_t *input, tran_low_t *output) {
@@ -2613,7 +2594,27 @@
assert(tx_type == DCT_DCT);
#endif
static const transform_2d FHT[] = {
- { fdct64_col, fdct64_row }, // DCT_DCT
+#if CONFIG_DAALA_DCT64
+ { daala_fdct64, daala_fdct64 }, // DCT_DCT
+#if CONFIG_EXT_TX
+ { fhalfright64, daala_fdct64 }, // ADST_DCT
+ { daala_fdct64, fhalfright64 }, // DCT_ADST
+ { fhalfright64, fhalfright64 }, // ADST_ADST
+ { fhalfright64, daala_fdct64 }, // FLIPADST_DCT
+ { daala_fdct64, fhalfright64 }, // DCT_FLIPADST
+ { fhalfright64, fhalfright64 }, // FLIPADST_FLIPADST
+ { fhalfright64, fhalfright64 }, // ADST_FLIPADST
+ { fhalfright64, fhalfright64 }, // FLIPADST_ADST
+ { fidtx64, fidtx64 }, // IDTX
+ { daala_fdct64, fidtx64 }, // V_DCT
+ { fidtx64, daala_fdct64 }, // H_DCT
+ { fhalfright64, fidtx64 }, // V_ADST
+ { fidtx64, fhalfright64 }, // H_ADST
+ { fhalfright64, fidtx64 }, // V_FLIPADST
+ { fidtx64, fhalfright64 }, // H_FLIPADST
+#endif
+#else
+ { fdct64_col, fdct64_row }, // DCT_DCT
#if CONFIG_EXT_TX
{ fhalfright64, fdct64_row }, // ADST_DCT
{ fdct64_col, fhalfright64 }, // DCT_ADST
@@ -2631,6 +2632,7 @@
{ fhalfright64, fidtx64 }, // V_FLIPADST
{ fidtx64, fhalfright64 }, // H_FLIPADST
#endif
+#endif
};
const transform_2d ht = FHT[tx_type];
tran_low_t out[4096];