Replace tx_size_1d with tx_size_wide/high

This prepares the support to both rectangular and 2x2 transform
block sizes.

Change-Id: I3c2d4e317f6b627bb45d2273c278331bd976ee92
diff --git a/av1/common/common_data.h b/av1/common/common_data.h
index f068ee7..62e9937 100644
--- a/av1/common/common_data.h
+++ b/av1/common/common_data.h
@@ -442,7 +442,37 @@
 #endif       // CONFIG_EXT_TX
 };
 
-static const int tx_size_1d[TX_SIZES] = { 4, 8, 16, 32 };
+// Transform block width in pixels
+static const int tx_size_wide[TX_SIZES_ALL] = {
+  4, 8, 16, 32,
+#if CONFIG_EXT_TX
+  4, 8, 8,  16, 16, 32,
+#endif
+};
+
+// Transform block height in pixels
+static const int tx_size_high[TX_SIZES_ALL] = {
+  4, 8, 16, 32,
+#if CONFIG_EXT_TX
+  8, 4, 16, 8,  32, 16,
+#endif
+};
+
+// Transform block width in unit
+static const int tx_size_wide_unit[TX_SIZES_ALL] = {
+  1, 2, 4, 8,
+#if CONFIG_EXT_TX
+  1, 2, 2, 4, 4, 8,
+#endif
+};
+
+// Transform block height in unit
+static const int tx_size_high_unit[TX_SIZES_ALL] = {
+  1, 2, 4, 8,
+#if CONFIG_EXT_TX
+  2, 1, 4, 2, 8, 4,
+#endif
+};
 
 static const int tx_size_2d[TX_SIZES_ALL] = {
   16, 64, 256, 1024,
@@ -453,8 +483,6 @@
 
 static const uint8_t tx_size_1d_log2[TX_SIZES] = { 2, 3, 4, 5 };
 
-static const int tx_size_1d_in_unit[TX_SIZES] = { 1, 2, 4, 8 };
-
 // TODO(jingning): Temporary table during the construction.
 static const int tx_size_1d_in_unit_log2[TX_SIZES] = { 0, 1, 2, 3 };
 
diff --git a/av1/common/scan.c b/av1/common/scan.c
index 945c65e..1281843 100644
--- a/av1/common/scan.c
+++ b/av1/common/scan.c
@@ -4305,7 +4305,7 @@
 
 void av1_update_neighbors(int tx_size, const int16_t *scan,
                           const int16_t *iscan, int16_t *neighbors) {
-  const int tx1d_size = tx_size_1d[tx_size];
+  const int tx1d_size = tx_size_wide[tx_size];
   const int tx2d_size = tx_size_2d[tx_size];
   int scan_idx;
   for (scan_idx = 0; scan_idx < tx2d_size; ++scan_idx) {
@@ -4336,7 +4336,7 @@
 void av1_update_sort_order(TX_SIZE tx_size, const uint32_t *non_zero_prob,
                            int16_t *sort_order) {
   uint32_t temp[COEFF_IDX_SIZE];
-  const int tx1d_size = tx_size_1d[tx_size];
+  const int tx1d_size = tx_size_wide[tx_size];
   const int tx2d_size = tx_size_2d[tx_size];
   int sort_idx;
   assert(tx2d_size <= COEFF_IDX_SIZE);
@@ -4354,7 +4354,7 @@
   int coeff_idx;
   int scan_idx;
   int sort_idx;
-  const int tx1d_size = tx_size_1d[tx_size];
+  const int tx1d_size = tx_size_wide[tx_size];
   const int tx2d_size = tx_size_2d[tx_size];
 
   for (coeff_idx = 0; coeff_idx < tx2d_size; ++coeff_idx) {