Replace arbitrary number with defs

Change-Id: Ia5a68f26c67d13d3f2dd3b3f8afabb781e2c8f73
diff --git a/vp10/decoder/decodemv.c b/vp10/decoder/decodemv.c
index 8d26c62..38520f1 100644
--- a/vp10/decoder/decodemv.c
+++ b/vp10/decoder/decodemv.c
@@ -1294,7 +1294,7 @@
 
 #if CONFIG_VAR_TX
     xd->above_txfm_context = cm->above_txfm_context + mi_col;
-    xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & 0x07);
+    xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & MI_MASK);
     if (bsize >= BLOCK_8X8 && cm->tx_mode == TX_MODE_SELECT &&
         !mbmi->skip && inter_block) {
       const TX_SIZE max_tx_size = max_txsize_lookup[bsize];
diff --git a/vp10/encoder/bitstream.c b/vp10/encoder/bitstream.c
index d4bd122..86f7f94 100644
--- a/vp10/encoder/bitstream.c
+++ b/vp10/encoder/bitstream.c
@@ -1306,7 +1306,7 @@
   } else {
 #if CONFIG_VAR_TX
     xd->above_txfm_context = cm->above_txfm_context + mi_col;
-    xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & 0x07);
+    xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & MI_MASK);
 #endif
     pack_inter_mode_mvs(cpi, m,
 #if CONFIG_SUPERTX
diff --git a/vp10/encoder/encodeframe.c b/vp10/encoder/encodeframe.c
index e26505f..18a4980 100644
--- a/vp10/encoder/encodeframe.c
+++ b/vp10/encoder/encodeframe.c
@@ -233,7 +233,7 @@
 
 #if CONFIG_VAR_TX
   xd->above_txfm_context = cm->above_txfm_context + mi_col;
-  xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & 0x07);
+  xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & MI_MASK);
   xd->max_tx_size = max_txsize_lookup[bsize];
 #endif
 
@@ -2260,7 +2260,7 @@
 
 #if CONFIG_VAR_TX
   xd->above_txfm_context = cm->above_txfm_context + mi_col;
-  xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & 0x07);
+  xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & MI_MASK);
 #endif
   pc_tree->partitioning = partition;
   save_context(x, mi_row, mi_col, a, l, sa, sl,
@@ -2586,7 +2586,7 @@
 
 #if CONFIG_VAR_TX
   xd->above_txfm_context = cm->above_txfm_context + mi_col;
-  xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & 0x07);
+  xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & MI_MASK);
 #endif
   restore_context(x, mi_row, mi_col, a, l, sa, sl,
 #if CONFIG_VAR_TX
@@ -2948,7 +2948,7 @@
 
 #if CONFIG_VAR_TX
   xd->above_txfm_context = cm->above_txfm_context + mi_col;
-  xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & 0x07);
+  xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & MI_MASK);
   save_context(x, mi_row, mi_col, a, l, sa, sl, ta, tl, bsize);
 #else
   save_context(x, mi_row, mi_col, a, l, sa, sl, bsize);
@@ -3109,7 +3109,7 @@
     }
 #if CONFIG_VAR_TX
     xd->above_txfm_context = cm->above_txfm_context + mi_col;
-    xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & 0x07);
+    xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & MI_MASK);
     restore_context(x, mi_row, mi_col, a, l, sa, sl, ta, tl, bsize);
 #else
     restore_context(x, mi_row, mi_col, a, l, sa, sl, bsize);
@@ -3311,7 +3311,7 @@
     }
 #if CONFIG_VAR_TX
     xd->above_txfm_context = cm->above_txfm_context + mi_col;
-    xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & 0x07);
+    xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & MI_MASK);
     restore_context(x, mi_row, mi_col, a, l, sa, sl, ta, tl, bsize);
 #else
     restore_context(x, mi_row, mi_col, a, l, sa, sl, bsize);
@@ -3442,7 +3442,7 @@
     }
 #if CONFIG_VAR_TX
     xd->above_txfm_context = cm->above_txfm_context + mi_col;
-    xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & 0x07);
+    xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & MI_MASK);
     restore_context(x, mi_row, mi_col, a, l, sa, sl, ta, tl, bsize);
 #else
     restore_context(x, mi_row, mi_col, a, l, sa, sl, bsize);
@@ -3571,7 +3571,7 @@
     }
 #if CONFIG_VAR_TX
     xd->above_txfm_context = cm->above_txfm_context + mi_col;
-    xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & 0x07);
+    xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & MI_MASK);
     restore_context(x, mi_row, mi_col, a, l, sa, sl, ta, tl, bsize);
 #else
     restore_context(x, mi_row, mi_col, a, l, sa, sl, bsize);
@@ -4244,7 +4244,7 @@
   int idx, idy;
 
   xd->above_txfm_context = cm->above_txfm_context + mi_col;
-  xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & 0x07);
+  xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & MI_MASK);
 
   for (idy = 0; idy < mi_height; idy += bh)
     for (idx = 0; idx < mi_width; idx += bh)
@@ -4308,7 +4308,7 @@
   int idx, idy;
 
   xd->above_txfm_context = cm->above_txfm_context + mi_col;
-  xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & 0x07);
+  xd->left_txfm_context = xd->left_txfm_context_buffer + (mi_row & MI_MASK);
 
   for (idy = 0; idy < mi_height; idy += bh)
     for (idx = 0; idx < mi_width; idx += bh)