Fix decoder bug in dependent-horztiles

Change the function av1_tile_set_tg_boundary to calculate
whether the selected tile is on the top boundary of its containing
tile group. This appears to be the intended behaviour, based on
how the function is used, but it was calculating something different.

BUG=aomedia:698

Change-Id: Ib3eb679a20153ead00e0b266b2ebf46044e62f05
diff --git a/av1/common/tile_common.c b/av1/common/tile_common.c
index 2d2a52c..507a012 100644
--- a/av1/common/tile_common.c
+++ b/av1/common/tile_common.c
@@ -16,16 +16,10 @@
 #if CONFIG_DEPENDENT_HORZTILES
 void av1_tile_set_tg_boundary(TileInfo *tile, const AV1_COMMON *const cm,
                               int row, int col) {
-  if (row < cm->tile_rows - 1) {
-    tile->tg_horz_boundary =
-        col >= cm->tile_group_start_col[row][col]
-            ? (row == cm->tile_group_start_row[row][col] ? 1 : 0)
-            : (row == cm->tile_group_start_row[row + 1][col] ? 1 : 0);
-  } else {
-    assert(col >= cm->tile_group_start_col[row][col]);
-    tile->tg_horz_boundary =
-        (row == cm->tile_group_start_row[row][col] ? 1 : 0);
-  }
+  const int tg_start_row = cm->tile_group_start_row[row][col];
+  const int tg_start_col = cm->tile_group_start_col[row][col];
+  tile->tg_horz_boundary = ((row == tg_start_row && col >= tg_start_col) ||
+                            (row == tg_start_row + 1 && col < tg_start_col));
 #if CONFIG_MAX_TILE
   if (cm->tile_row_independent[row]) {
     tile->tg_horz_boundary = 1;  // this tile row is independent