Pass tx_type into get_eob_ctx()

Change-Id: I3209d0074bf3ed1fda260dc2f5cacbfa616ad6ae
diff --git a/av1/common/txb_common.h b/av1/common/txb_common.h
index c8de720..ceadc07 100644
--- a/av1/common/txb_common.h
+++ b/av1/common/txb_common.h
@@ -365,8 +365,9 @@
 
 static INLINE int get_eob_ctx(const tran_low_t *tcoeffs,
                               const int coeff_idx,  // raster order
-                              const TX_SIZE txs_ctx) {
+                              const TX_SIZE txs_ctx, TX_TYPE tx_type) {
   (void)tcoeffs;
+  (void)tx_type;
   if (txs_ctx == TX_4X4) return av1_coeff_band_4x4[coeff_idx];
   if (txs_ctx == TX_8X8) return av1_coeff_band_8x8[coeff_idx];
   if (txs_ctx == TX_16X16) return av1_coeff_band_16x16[coeff_idx];
diff --git a/av1/decoder/decodetxb.c b/av1/decoder/decodetxb.c
index 3b23898..715f44c 100644
--- a/av1/decoder/decodetxb.c
+++ b/av1/decoder/decodetxb.c
@@ -101,7 +101,7 @@
   for (c = 0; c < seg_eob; ++c) {
     int is_nz;
     int coeff_ctx = get_nz_map_ctx(tcoeffs, scan[c], bwl, height, tx_type);
-    int eob_ctx = get_eob_ctx(tcoeffs, scan[c], txs_ctx);
+    int eob_ctx = get_eob_ctx(tcoeffs, scan[c], txs_ctx, tx_type);
 
     if (c < seg_eob - 1) {
 #if LV_MAP_PROB
diff --git a/av1/encoder/encodetxb.c b/av1/encoder/encodetxb.c
index 489d3d2..7c2ca9a 100644
--- a/av1/encoder/encodetxb.c
+++ b/av1/encoder/encodetxb.c
@@ -138,7 +138,7 @@
 
   for (c = 0; c < eob; ++c) {
     int coeff_ctx = get_nz_map_ctx(tcoeff, scan[c], bwl, height, tx_type);
-    int eob_ctx = get_eob_ctx(tcoeff, scan[c], txs_ctx);
+    int eob_ctx = get_eob_ctx(tcoeff, scan[c], txs_ctx, tx_type);
 
     tran_low_t v = tcoeff[scan[c]];
     is_nz = (v != 0);
@@ -498,7 +498,7 @@
       }
 
       if (c < seg_eob) {
-        int eob_ctx = get_eob_ctx(qcoeff, scan[c], txs_ctx);
+        int eob_ctx = get_eob_ctx(qcoeff, scan[c], txs_ctx, tx_type);
         cost += coeff_costs->eob_cost[eob_ctx][c == (eob - 1)];
       }
     }
@@ -810,8 +810,8 @@
     }
 
     if (scan_idx < txb_info->seg_eob) {
-      const int eob_ctx =
-          get_eob_ctx(txb_info->qcoeff, coeff_idx, txb_info->txs_ctx);
+      const int eob_ctx = get_eob_ctx(txb_info->qcoeff, coeff_idx,
+                                      txb_info->txs_ctx, txb_info->tx_type);
       cost_diff -=
           txb_costs->eob_cost[eob_ctx][scan_idx == (txb_info->eob - 1)];
     }
@@ -1013,8 +1013,8 @@
     cost += get_base_cost(abs_qc, ctx, txb_costs->base_cost[base_idx][ctx],
                           base_idx);
     if (scan_idx < txb_info->seg_eob) {
-      const int eob_ctx =
-          get_eob_ctx(txb_info->qcoeff, coeff_idx, txb_info->txs_ctx);
+      const int eob_ctx = get_eob_ctx(txb_info->qcoeff, coeff_idx,
+                                      txb_info->txs_ctx, txb_info->tx_type);
       cost += txb_costs->eob_cost[eob_ctx][scan_idx == (txb_info->eob - 1)];
     }
     cost += get_sign_bit_cost(qc, coeff_idx, txb_costs->dc_sign_cost,
@@ -1069,8 +1069,8 @@
   if (*new_eob > 0) {
     // Note that get_eob_ctx does NOT actually account for qcoeff, so we don't
     // need to lower down the qcoeff here
-    const int eob_ctx =
-        get_eob_ctx(txb_info->qcoeff, scan[*new_eob - 1], txb_info->txs_ctx);
+    const int eob_ctx = get_eob_ctx(txb_info->qcoeff, scan[*new_eob - 1],
+                                    txb_info->txs_ctx, txb_info->tx_type);
     cost_diff -= txb_costs->eob_cost[eob_ctx][0];
     cost_diff += txb_costs->eob_cost[eob_ctx][1];
   } else {
@@ -1241,8 +1241,8 @@
     }
 
     if (scan_idx < txb_info->seg_eob) {
-      int eob_ctx =
-          get_eob_ctx(txb_info->qcoeff, scan[scan_idx], txb_info->txs_ctx);
+      int eob_ctx = get_eob_ctx(txb_info->qcoeff, scan[scan_idx],
+                                txb_info->txs_ctx, txb_info->tx_type);
       cost += txb_costs->eob_cost[eob_ctx][scan_idx == (txb_info->eob - 1)];
     }
   }
@@ -1693,7 +1693,7 @@
     tran_low_t v = qcoeff[scan[c]];
     int is_nz = (v != 0);
     int coeff_ctx = get_nz_map_ctx(tcoeff, scan[c], bwl, height, tx_type);
-    int eob_ctx = get_eob_ctx(tcoeff, scan[c], txsize_ctx);
+    int eob_ctx = get_eob_ctx(tcoeff, scan[c], txsize_ctx, tx_type);
 
     if (c == seg_eob - 1) break;