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

This commit has no impact on metrics.

Change-Id: I4e2c66d9082e1f2bdbe8851492e91c653f5da6f1
diff --git a/aom_dsp/inv_txfm.c b/aom_dsp/inv_txfm.c
index dcd0c7c..4ee5ec3 100644
--- a/aom_dsp/inv_txfm.c
+++ b/aom_dsp/inv_txfm.c
@@ -390,18 +390,6 @@
   }
 }
 
-#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 @@
   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) {
diff --git a/av1/common/daala_tx.c b/av1/common/daala_tx.c
index 1e5d9a5..68999bd 100644
--- a/av1/common/daala_tx.c
+++ b/av1/common/daala_tx.c
@@ -4178,3 +4178,21 @@
   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];
+}
diff --git a/av1/common/daala_tx.h b/av1/common/daala_tx.h
index 22eeb7c..7d60626 100644
--- a/av1/common/daala_tx.h
+++ b/av1/common/daala_tx.h
@@ -12,6 +12,8 @@
 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]);
diff --git a/av1/common/idct.c b/av1/common/idct.c
index 78e9185..14a95ce 100644
--- a/av1/common/idct.c
+++ b/av1/common/idct.c
@@ -1296,6 +1296,26 @@
   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
@@ -1314,6 +1334,7 @@
     { aom_iadst16_c, iidtx16_c },      // V_FLIPADST
     { iidtx16_c, aom_iadst16_c },      // H_FLIPADST
 #endif
+#endif
   };
 
   int i, j;
diff --git a/av1/encoder/dct.c b/av1/encoder/dct.c
index b152bb0..27e5870 100644
--- a/av1/encoder/dct.c
+++ b/av1/encoder/dct.c
@@ -157,18 +157,6 @@
   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 @@
 
   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 @@
   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
@@ -2403,6 +2410,7 @@
     { fadst16, fidtx16 },  // V_FLIPADST
     { fidtx16, fadst16 },  // H_FLIPADST
 #endif
+#endif
   };
   const transform_2d ht = FHT[tx_type];
   tran_low_t out[256];