Move daala_fdst64() / daala_idst64() into daala_tx.c.

This commit has no impact on metrics.

Change-Id: Iba8baae9123c88062f10deb6e1e9a709708a4f19
diff --git a/av1/common/daala_tx.c b/av1/common/daala_tx.c
index b6a59a5..e5b2372 100644
--- a/av1/common/daala_tx.c
+++ b/av1/common/daala_tx.c
@@ -4298,6 +4298,32 @@
   for (i = 0; i < 64; i++) output[i] = (tran_low_t)x[i];
 }
 
+/* Preserve the "half-right" transform behavior. */
+void daala_fdst64(const tran_low_t *input, tran_low_t *output) {
+  int i;
+  tran_low_t inputhalf[32];
+  for (i = 0; i < 32; ++i) {
+    output[32 + i] = input[i];
+  }
+  for (i = 0; i < 32; ++i) {
+    inputhalf[i] = input[i + 32];
+  }
+  daala_fdct32(inputhalf, output);
+}
+
+/* Preserve the "half-right" transform behavior. */
+void daala_idst64(const tran_low_t *input, tran_low_t *output) {
+  int i;
+  tran_low_t inputhalf[32];
+  for (i = 0; i < 32; ++i) {
+    inputhalf[i] = input[i];
+  }
+  for (i = 0; i < 32; ++i) {
+    output[i] = input[32 + i];
+  }
+  daala_idct32(inputhalf, output + 32);
+}
+
 void daala_idtx64(const tran_low_t *input, tran_low_t *output) {
   int i;
   for (i = 0; i < 64; i++) output[i] = input[i];
diff --git a/av1/common/daala_tx.h b/av1/common/daala_tx.h
index 6ca133f..7145b66 100644
--- a/av1/common/daala_tx.h
+++ b/av1/common/daala_tx.h
@@ -27,6 +27,8 @@
 #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);
+void daala_fdst64(const tran_low_t *input, tran_low_t *output);
+void daala_idst64(const tran_low_t *input, tran_low_t *output);
 void daala_idtx64(const tran_low_t *input, tran_low_t *output);
 #endif
 
diff --git a/av1/common/idct.c b/av1/common/idct.c
index a8f928c..151ce4a 100644
--- a/av1/common/idct.c
+++ b/av1/common/idct.c
@@ -86,21 +86,7 @@
   // Note overall scaling factor is 4 times orthogonal
 }
 
-#if CONFIG_TX64X64
-#if CONFIG_DAALA_DCT64
-static void ihalfright64_c(const tran_low_t *input, tran_low_t *output) {
-  int i;
-  tran_low_t inputhalf[32];
-  // No scaling within; Daala transforms are all orthonormal
-  for (i = 0; i < 32; ++i) {
-    inputhalf[i] = input[i];
-  }
-  for (i = 0; i < 32; ++i) {
-    output[i] = input[32 + i];
-  }
-  daala_idct32(inputhalf, output + 32);
-}
-#else
+#if CONFIG_TX64X64 && !CONFIG_DAALA_DCT64
 static void idct64_col_c(const tran_low_t *input, tran_low_t *output) {
   int32_t in[64], out[64];
   int i;
@@ -131,7 +117,6 @@
   aom_idct32_c(inputhalf, output + 32);
   // Note overall scaling factor is 4 * sqrt(2)  times orthogonal
 }
-#endif  // CONFIG_DAALA_DCT64
 #endif  // CONFIG_TX64X64
 
 // Inverse identity transform and add.
@@ -1449,23 +1434,23 @@
 #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
+    { daala_idct64, daala_idct64 },  // DCT_DCT
+    { daala_idst64, daala_idct64 },  // ADST_DCT
+    { daala_idct64, daala_idst64 },  // DCT_ADST
+    { daala_idst64, daala_idst64 },  // 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
-    { daala_idtx64, daala_idtx64 },      // IDTX
-    { daala_idct64, daala_idtx64 },      // V_DCT
-    { daala_idtx64, daala_idct64 },      // H_DCT
-    { ihalfright64_c, daala_idtx64 },    // V_ADST
-    { daala_idtx64, ihalfright64_c },    // H_ADST
-    { ihalfright64_c, daala_idtx64 },    // V_FLIPADST
-    { daala_idtx64, ihalfright64_c },    // H_FLIPADST
+    { daala_idst64, daala_idct64 },  // FLIPADST_DCT
+    { daala_idct64, daala_idst64 },  // DCT_FLIPADST
+    { daala_idst64, daala_idst64 },  // FLIPADST_FLIPADST
+    { daala_idst64, daala_idst64 },  // ADST_FLIPADST
+    { daala_idst64, daala_idst64 },  // FLIPADST_ADST
+    { daala_idtx64, daala_idtx64 },  // IDTX
+    { daala_idct64, daala_idtx64 },  // V_DCT
+    { daala_idtx64, daala_idct64 },  // H_DCT
+    { daala_idst64, daala_idtx64 },  // V_ADST
+    { daala_idtx64, daala_idst64 },  // H_ADST
+    { daala_idst64, daala_idtx64 },  // V_FLIPADST
+    { daala_idtx64, daala_idst64 },  // H_FLIPADST
 #endif
 #else
     { idct64_col_c, idct64_row_c },      // DCT_DCT
diff --git a/av1/encoder/dct.c b/av1/encoder/dct.c
index 8e5a947..f559090 100644
--- a/av1/encoder/dct.c
+++ b/av1/encoder/dct.c
@@ -2490,24 +2490,7 @@
 }
 
 #if CONFIG_TX64X64
-#if CONFIG_DAALA_DCT64
-#if CONFIG_EXT_TX
-// For use in lieu of ADST
-static void fhalfright64(const tran_low_t *input, tran_low_t *output) {
-  int i;
-  tran_low_t inputhalf[32];
-  // No scaling within; Daala transforms are all orthonormal
-  for (i = 0; i < 32; ++i) {
-    output[32 + i] = input[i];
-  }
-  for (i = 0; i < 32; ++i) {
-    inputhalf[i] = input[i + 32];
-  }
-  daala_fdct32(inputhalf, output);
-  // Note overall scaling factor is 2 times unitary
-}
-#endif  // CONFIG_EXT_TX
-#else
+#if !CONFIG_DAALA_DCT64
 #if CONFIG_EXT_TX
 static void fidtx64(const tran_low_t *input, tran_low_t *output) {
   int i;
@@ -2561,21 +2544,21 @@
 #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
+    { daala_fdst64, daala_fdct64 },  // ADST_DCT
+    { daala_fdct64, daala_fdst64 },  // DCT_ADST
+    { daala_fdst64, daala_fdst64 },  // ADST_ADST
+    { daala_fdst64, daala_fdct64 },  // FLIPADST_DCT
+    { daala_fdct64, daala_fdst64 },  // DCT_FLIPADST
+    { daala_fdst64, daala_fdst64 },  // FLIPADST_FLIPADST
+    { daala_fdst64, daala_fdst64 },  // ADST_FLIPADST
+    { daala_fdst64, daala_fdst64 },  // FLIPADST_ADST
     { daala_idtx64, daala_idtx64 },  // IDTX
     { daala_fdct64, daala_idtx64 },  // V_DCT
     { daala_idtx64, daala_fdct64 },  // H_DCT
-    { fhalfright64, daala_idtx64 },  // V_ADST
-    { daala_idtx64, fhalfright64 },  // H_ADST
-    { fhalfright64, daala_idtx64 },  // V_FLIPADST
-    { daala_idtx64, fhalfright64 },  // H_FLIPADST
+    { daala_fdst64, daala_idtx64 },  // V_ADST
+    { daala_idtx64, daala_fdst64 },  // H_ADST
+    { daala_fdst64, daala_idtx64 },  // V_FLIPADST
+    { daala_idtx64, daala_fdst64 },  // H_FLIPADST
 #endif
 #else
     { fdct64_col, fdct64_row },      // DCT_DCT