Unify FWD_TXFM_PARAM and INV_TXFM_PARAM

Change two similar structs, FWD_TXFM_PARAM and INV_TXFM_PARAM,
into a common struct: TxfmParam. Its definition is moved to
aom_dsp/txfm_common.h to simplify dependency.

This change is made so that, in later changes of the LGT
experiment, functions requiring FWD_TXFM_PARAM and
INV_TXFM_PARAM, such as get_fwd_lgt4 and get_inv_lgt4, can
also be unified.

Change-Id: I756b0176a02314005060adbf8e62386f10eeb344
diff --git a/test/fdct4x4_test.cc b/test/fdct4x4_test.cc
index 68b35fa..e1bd612 100644
--- a/test/fdct4x4_test.cc
+++ b/test/fdct4x4_test.cc
@@ -33,7 +33,7 @@
 typedef void (*FdctFunc)(const int16_t *in, tran_low_t *out, int stride);
 typedef void (*IdctFunc)(const tran_low_t *in, uint8_t *out, int stride);
 typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride,
-                        const INV_TXFM_PARAM *inv_txfm_param);
+                        const TxfmParam *txfm_param);
 using libaom_test::FhtFunc;
 
 typedef std::tr1::tuple<FdctFunc, IdctFunc, int, aom_bit_depth_t, int>
@@ -41,41 +41,41 @@
 typedef std::tr1::tuple<FhtFunc, IhtFunc, int, aom_bit_depth_t, int> Ht4x4Param;
 
 void fdct4x4_ref(const int16_t *in, tran_low_t *out, int stride,
-                 FWD_TXFM_PARAM * /*fwd_txfm_param*/) {
+                 TxfmParam * /*txfm_param*/) {
   aom_fdct4x4_c(in, out, stride);
 }
 
 void fht4x4_ref(const int16_t *in, tran_low_t *out, int stride,
-                FWD_TXFM_PARAM *fwd_txfm_param) {
-  av1_fht4x4_c(in, out, stride, fwd_txfm_param);
+                TxfmParam *txfm_param) {
+  av1_fht4x4_c(in, out, stride, txfm_param);
 }
 
 void fwht4x4_ref(const int16_t *in, tran_low_t *out, int stride,
-                 FWD_TXFM_PARAM * /*fwd_txfm_param*/) {
+                 TxfmParam * /*txfm_param*/) {
   av1_fwht4x4_c(in, out, stride);
 }
 
 #if CONFIG_HIGHBITDEPTH
 void fht4x4_10(const int16_t *in, tran_low_t *out, int stride,
-               FWD_TXFM_PARAM *fwd_txfm_param) {
-  av1_fwd_txfm2d_4x4_c(in, out, stride, fwd_txfm_param->tx_type, 10);
+               TxfmParam *txfm_param) {
+  av1_fwd_txfm2d_4x4_c(in, out, stride, txfm_param->tx_type, 10);
 }
 
 void fht4x4_12(const int16_t *in, tran_low_t *out, int stride,
-               FWD_TXFM_PARAM *fwd_txfm_param) {
-  av1_fwd_txfm2d_4x4_c(in, out, stride, fwd_txfm_param->tx_type, 12);
+               TxfmParam *txfm_param) {
+  av1_fwd_txfm2d_4x4_c(in, out, stride, txfm_param->tx_type, 12);
 }
 
 void iht4x4_10(const tran_low_t *in, uint8_t *out, int stride,
-               const INV_TXFM_PARAM *inv_txfm_param) {
+               const TxfmParam *txfm_param) {
   av1_inv_txfm2d_add_4x4_c(in, CONVERT_TO_SHORTPTR(out), stride,
-                           inv_txfm_param->tx_type, 10);
+                           txfm_param->tx_type, 10);
 }
 
 void iht4x4_12(const tran_low_t *in, uint8_t *out, int stride,
-               const INV_TXFM_PARAM *inv_txfm_param) {
+               const TxfmParam *txfm_param) {
   av1_inv_txfm2d_add_4x4_c(in, CONVERT_TO_SHORTPTR(out), stride,
-                           inv_txfm_param->tx_type, 12);
+                           txfm_param->tx_type, 12);
 }
 
 void iwht4x4_10(const tran_low_t *in, uint8_t *out, int stride) {
@@ -101,8 +101,7 @@
     bit_depth_ = GET_PARAM(3);
     mask_ = (1 << bit_depth_) - 1;
     num_coeffs_ = GET_PARAM(4);
-    fwd_txfm_param_.tx_type = (TX_TYPE)GET_PARAM(2);
-    inv_txfm_param_.tx_type = (TX_TYPE)GET_PARAM(2);
+    txfm_param_.tx_type = GET_PARAM(2);
   }
   virtual void TearDown() { libaom_test::ClearSystemState(); }
 
@@ -140,8 +139,7 @@
     bit_depth_ = GET_PARAM(3);
     mask_ = (1 << bit_depth_) - 1;
     num_coeffs_ = GET_PARAM(4);
-    fwd_txfm_param_.tx_type = (TX_TYPE)GET_PARAM(2);
-    inv_txfm_param_.tx_type = (TX_TYPE)GET_PARAM(2);
+    txfm_param_.tx_type = GET_PARAM(2);
 #if CONFIG_HIGHBITDEPTH
     switch (bit_depth_) {
       case AOM_BITS_10: fwd_txfm_ref = fht4x4_10; break;
@@ -154,11 +152,11 @@
 
  protected:
   void RunFwdTxfm(const int16_t *in, tran_low_t *out, int stride) {
-    fwd_txfm_(in, out, stride, &fwd_txfm_param_);
+    fwd_txfm_(in, out, stride, &txfm_param_);
   }
 
   void RunInvTxfm(const tran_low_t *out, uint8_t *dst, int stride) {
-    inv_txfm_(out, dst, stride, &inv_txfm_param_);
+    inv_txfm_(out, dst, stride, &txfm_param_);
   }
 
   FhtFunc fwd_txfm_;