Change input parameter order of av1_get_tx_type()

To make it consistent with the other functions.

Change-Id: I1ddba632a038eb2ad28103e8140f13d9f8857d96
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 470f34a..4ca7479 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -867,8 +867,8 @@
   }
 }
 
-static INLINE TX_TYPE av1_get_tx_type(PLANE_TYPE plane_type,
-                                      const MACROBLOCKD *xd, int blk_row,
+static INLINE TX_TYPE av1_get_tx_type(const MACROBLOCKD *xd,
+                                      PLANE_TYPE plane_type, int blk_row,
                                       int blk_col, TX_SIZE tx_size,
                                       int reduced_tx_set) {
   const MB_MODE_INFO *const mbmi = xd->mi[0];
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 2f0a45e..1da27c7 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -228,7 +228,7 @@
     struct macroblockd_plane *const pd = &xd->plane[plane];
 
     // tx_type will be read out in av1_read_coeffs_txb_facade
-    const TX_TYPE tx_type = av1_get_tx_type(plane_type, xd, row, col, tx_size,
+    const TX_TYPE tx_type = av1_get_tx_type(xd, plane_type, row, col, tx_size,
                                             cm->reduced_tx_set_used);
     eob_info *eob_data = pd->eob_data + xd->txb_offset[plane];
     if (eob_data->eob) {
@@ -252,7 +252,7 @@
   const struct macroblockd_plane *const pd = &xd->plane[plane];
 
   // tx_type will be read out in av1_read_coeffs_txb_facade
-  const TX_TYPE tx_type = av1_get_tx_type(plane_type, xd, blk_row, blk_col,
+  const TX_TYPE tx_type = av1_get_tx_type(xd, plane_type, blk_row, blk_col,
                                           tx_size, cm->reduced_tx_set_used);
 
   uint8_t *dst =
diff --git a/av1/decoder/decodetxb.c b/av1/decoder/decodetxb.c
index f915d3e..0c712c7 100644
--- a/av1/decoder/decodetxb.c
+++ b/av1/decoder/decodetxb.c
@@ -159,7 +159,7 @@
     // only y plane's tx_type is transmitted
     av1_read_tx_type(cm, xd, blk_row, blk_col, tx_size, r);
   }
-  const TX_TYPE tx_type = av1_get_tx_type(plane_type, xd, blk_row, blk_col,
+  const TX_TYPE tx_type = av1_get_tx_type(xd, plane_type, blk_row, blk_col,
                                           tx_size, cm->reduced_tx_set_used);
   const TX_CLASS tx_class = tx_type_to_class[tx_type];
   const TX_SIZE qm_tx_size = av1_get_adjusted_tx_size(tx_size);
@@ -350,7 +350,7 @@
   if (is_inter_block(mbmi)) {
     PLANE_TYPE plane_type = get_plane_type(plane);
     // tx_type will be read out in av1_read_coeffs_txb_facade
-    const TX_TYPE tx_type = av1_get_tx_type(plane_type, xd, row, col, tx_size,
+    const TX_TYPE tx_type = av1_get_tx_type(xd, plane_type, row, col, tx_size,
                                             cm->reduced_tx_set_used);
 
     if (plane == 0)
diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c
index 431d540..fc344e5 100644
--- a/av1/encoder/encodemb.c
+++ b/av1/encoder/encodemb.c
@@ -225,7 +225,7 @@
   l = &args->tl[blk_row];
 
   if (!is_blk_skip(x, plane, blk_row * bw + blk_col) && !mbmi->skip_mode) {
-    TX_TYPE tx_type = av1_get_tx_type(pd->plane_type, xd, blk_row, blk_col,
+    TX_TYPE tx_type = av1_get_tx_type(xd, pd->plane_type, blk_row, blk_col,
                                       tx_size, cm->reduced_tx_set_used);
     if (args->enable_optimize_b != NO_TRELLIS_OPT) {
       av1_xform_quant(
@@ -253,7 +253,7 @@
   if (p->eobs[block]) {
     *(args->skip) = 0;
 
-    TX_TYPE tx_type = av1_get_tx_type(pd->plane_type, xd, blk_row, blk_col,
+    TX_TYPE tx_type = av1_get_tx_type(xd, pd->plane_type, blk_row, blk_col,
                                       tx_size, cm->reduced_tx_set_used);
     av1_inverse_transform_block(xd, dqcoeff, plane, tx_type, tx_size, dst,
                                 pd->dst.stride, p->eobs[block],
@@ -566,7 +566,7 @@
   struct macroblockd_plane *const pd = &xd->plane[plane];
   tran_low_t *dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
   PLANE_TYPE plane_type = get_plane_type(plane);
-  const TX_TYPE tx_type = av1_get_tx_type(plane_type, xd, blk_row, blk_col,
+  const TX_TYPE tx_type = av1_get_tx_type(xd, plane_type, blk_row, blk_col,
                                           tx_size, cm->reduced_tx_set_used);
   uint16_t *eob = &p->eobs[block];
   const int dst_stride = pd->dst.stride;
diff --git a/av1/encoder/encodetxb.c b/av1/encoder/encodetxb.c
index e877a81..e2a10e2 100644
--- a/av1/encoder/encodetxb.c
+++ b/av1/encoder/encodetxb.c
@@ -519,7 +519,7 @@
   if (eob == 0) return;
 
   const PLANE_TYPE plane_type = get_plane_type(plane);
-  const TX_TYPE tx_type = av1_get_tx_type(plane_type, xd, blk_row, blk_col,
+  const TX_TYPE tx_type = av1_get_tx_type(xd, plane_type, blk_row, blk_col,
                                           tx_size, cm->reduced_tx_set_used);
   // Only y plane's tx_type is transmitted
   if (plane == 0) {
@@ -1822,7 +1822,7 @@
   MACROBLOCKD *const xd = &x->e_mbd;
   const PLANE_TYPE plane_type = get_plane_type(plane);
   const TX_SIZE txs_ctx = get_txsize_entropy_ctx(tx_size);
-  const TX_TYPE tx_type = av1_get_tx_type(plane_type, xd, blk_row, blk_col,
+  const TX_TYPE tx_type = av1_get_tx_type(xd, plane_type, blk_row, blk_col,
                                           tx_size, cm->reduced_tx_set_used);
   const MB_MODE_INFO *mbmi = xd->mi[0];
   const struct macroblock_plane *p = &x->plane[plane];
@@ -1920,7 +1920,7 @@
   const uint16_t eob = p->eobs[block];
   const tran_low_t *qcoeff = BLOCK_OFFSET(p->qcoeff, block);
   const PLANE_TYPE plane_type = pd->plane_type;
-  const TX_TYPE tx_type = av1_get_tx_type(plane_type, xd, blk_row, blk_col,
+  const TX_TYPE tx_type = av1_get_tx_type(xd, plane_type, blk_row, blk_col,
                                           tx_size, cm->reduced_tx_set_used);
   const SCAN_ORDER *const scan_order = get_scan(tx_size, tx_type);
   const int cul_level = av1_get_txb_entropy_context(qcoeff, scan_order, eob);
@@ -1942,7 +1942,7 @@
 
   // Only y plane's tx_type is updated
   if (plane > 0) return;
-  const TX_TYPE tx_type = av1_get_tx_type(PLANE_TYPE_Y, xd, blk_row, blk_col,
+  const TX_TYPE tx_type = av1_get_tx_type(xd, PLANE_TYPE_Y, blk_row, blk_col,
                                           tx_size, cm->reduced_tx_set_used);
   if (is_inter) {
     if (cpi->oxcf.use_inter_dct_only) {
@@ -2060,7 +2060,7 @@
                        td->counts, allow_update_cdf);
 
   const PLANE_TYPE plane_type = pd->plane_type;
-  const TX_TYPE tx_type = av1_get_tx_type(plane_type, xd, blk_row, blk_col,
+  const TX_TYPE tx_type = av1_get_tx_type(xd, plane_type, blk_row, blk_col,
                                           tx_size, cm->reduced_tx_set_used);
   const TX_CLASS tx_class = tx_type_to_class[tx_type];
   const SCAN_ORDER *const scan_order = get_scan(tx_size, tx_type);
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 303f154..e115ffc 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -2064,7 +2064,7 @@
   tran_low_t *dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
   const PLANE_TYPE plane_type = get_plane_type(plane);
   const TX_SIZE tx_size = av1_get_tx_size(plane, xd);
-  const TX_TYPE tx_type = av1_get_tx_type(plane_type, xd, blk_row, blk_col,
+  const TX_TYPE tx_type = av1_get_tx_type(xd, plane_type, blk_row, blk_col,
                                           tx_size, reduced_tx_set);
   const int dst_stride = pd->dst.stride;
   uint8_t *dst =
@@ -2171,7 +2171,7 @@
 #endif
 
   const PLANE_TYPE plane_type = get_plane_type(plane);
-  TX_TYPE tx_type = av1_get_tx_type(plane_type, xd, blk_row, blk_col, tx_size,
+  TX_TYPE tx_type = av1_get_tx_type(xd, plane_type, blk_row, blk_col, tx_size,
                                     cpi->common.reduced_tx_set_used);
   av1_inverse_transform_block(xd, dqcoeff, plane, tx_type, tx_size, recon,
                               MAX_TX_SIZE, eob,
@@ -3030,8 +3030,8 @@
         x->txb_rd_record_intra.tx_rd_info[intra_hash_idx].valid) {
       mbmi->txk_type[txk_type_idx] = intra_txb_rd_info->tx_type;
       const TX_TYPE ref_tx_type =
-          av1_get_tx_type(get_plane_type(plane), &x->e_mbd, blk_row, blk_col,
-                          tx_size, cpi->common.reduced_tx_set_used);
+          av1_get_tx_type(xd, get_plane_type(plane), blk_row, blk_col, tx_size,
+                          cpi->common.reduced_tx_set_used);
       if (ref_tx_type == intra_txb_rd_info->tx_type) {
         best_rd_stats->rate = intra_txb_rd_info->rate;
         best_rd_stats->dist = intra_txb_rd_info->dist;
@@ -3075,7 +3075,7 @@
   if (plane) {
     // tx_type of PLANE_TYPE_UV should be the same as PLANE_TYPE_Y
     uv_tx_type = txk_allowed =
-        av1_get_tx_type(get_plane_type(plane), xd, blk_row, blk_col, tx_size,
+        av1_get_tx_type(xd, get_plane_type(plane), blk_row, blk_col, tx_size,
                         cm->reduced_tx_set_used);
   }
   PREDICTION_MODE intra_dir =
@@ -4969,7 +4969,7 @@
     if (plane == 0)
       x->e_mbd.mi[0]->txk_type[txk_type_idx] = rd_info_array->tx_type;
     const TX_TYPE ref_tx_type =
-        av1_get_tx_type(get_plane_type(plane), &x->e_mbd, blk_row, blk_col,
+        av1_get_tx_type(&x->e_mbd, get_plane_type(plane), blk_row, blk_col,
                         tx_size, cpi->common.reduced_tx_set_used);
     if (ref_tx_type == rd_info_array->tx_type) {
       rd_stats->rate += rd_info_array->rate;