max-tile: Fix issues discovered when testing max-tile

max-tile remains off by default until more testing is performed but I would
like to check in the fixes that are known so far to prevent this patch getting too big

max_tile was provisionally adopted at the working group meeting 2017-Oct-10

This patch fixes the following issues:
- max_tile is fixed to suport superblock size 64x64 as well as 128x128 (ext_partition support)
- max_tile is fixed in combination with loop_restoration
- max_tile is fixed in combination with ext_tile (Bug: 1013)
- max_tile is fixed in combination with lv_map and 64x64 subperblock (lv_map memory allocation
  fixed for 64x64 superblock)
- max_tile reports the size of the first tile for inspection.c used by the analyzer

Change-Id: Ib83ff613e5d66563c81452a085c7984d3b4813e4
diff --git a/av1/common/alloccommon.c b/av1/common/alloccommon.c
index 33bdf3d..00ff268 100644
--- a/av1/common/alloccommon.c
+++ b/av1/common/alloccommon.c
@@ -135,8 +135,9 @@
   int num_stripes = 0;
   for (int i = 0; i < cm->tile_rows; ++i) {
 #if CONFIG_MAX_TILE
-    const int sb_h = cm->tile_row_start_sb[i + 1] - cm->tile_row_start_sb[i];
-    const int mi_h = sb_h << MAX_MIB_SIZE_LOG2;
+    TileInfo tile_info;
+    av1_tile_set_row(&tile_info, cm, i);
+    const int mi_h = tile_info.mi_row_end - tile_info.mi_row_start;
 #else
     const int mi_h = ((i + 1) < cm->tile_rows)
                          ? cm->tile_height