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

This commit has no impact on metrics.

Change-Id: I58d85dc22627849657c88c082db940baff921f8d
diff --git a/aom_dsp/inv_txfm.c b/aom_dsp/inv_txfm.c
index 65913fb..de77dba 100644
--- a/aom_dsp/inv_txfm.c
+++ b/aom_dsp/inv_txfm.c
@@ -160,18 +160,6 @@
   }
 }
 
-#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 @@
   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];
diff --git a/av1/common/daala_tx.c b/av1/common/daala_tx.c
index 8f93645..79cc68c 100644
--- a/av1/common/daala_tx.c
+++ b/av1/common/daala_tx.c
@@ -4142,3 +4142,21 @@
   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];
+}
diff --git a/av1/common/daala_tx.h b/av1/common/daala_tx.h
index 59f88b2..fefdd42 100644
--- a/av1/common/daala_tx.h
+++ b/av1/common/daala_tx.h
@@ -8,6 +8,8 @@
 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]);
diff --git a/av1/common/idct.c b/av1/common/idct.c
index b4e3f04..046056a 100644
--- a/av1/common/idct.c
+++ b/av1/common/idct.c
@@ -1180,6 +1180,26 @@
   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
@@ -1198,6 +1218,7 @@
     { aom_iadst8_c, iidtx8_c },      // V_FLIPADST
     { iidtx8_c, aom_iadst8_c },      // H_FLIPADST
 #endif
+#endif
   };
 
   int i, j;
diff --git a/av1/encoder/dct.c b/av1/encoder/dct.c
index 7cbe0d0..1788eff 100644
--- a/av1/encoder/dct.c
+++ b/av1/encoder/dct.c
@@ -79,18 +79,6 @@
   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 @@
 
   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 @@
 #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
@@ -2270,6 +2277,7 @@
       { fadst8, fidtx8 },  // V_FLIPADST
       { fidtx8, fadst8 },  // H_FLIPADST
 #endif
+#endif
     };
     const transform_2d ht = FHT[tx_type];
     tran_low_t out[64];