Commit 3a0e3a7950 for aom

commit 3a0e3a7950a40c644060e48523542a82a2316158
Author: Bohan Li <bohanli@google.com>
Date:   Thu Jan 15 13:38:49 2026 -0800

    Don't use 2x max tile area for level 7.x 8.x

    Change-Id: I31f8ba914933a0a89cf6460e77c6e3563997a402

diff --git a/av1/common/tile_common.c b/av1/common/tile_common.c
index a8f2f0231e..fcd8f59740 100644
--- a/av1/common/tile_common.c
+++ b/av1/common/tile_common.c
@@ -40,27 +40,7 @@ void av1_get_tile_limits(AV1_COMMON *const cm) {
   const int sb_size_log2 = seq_params->mib_size_log2 + MI_SIZE_LOG2;
   tiles->max_width_sb = MAX_TILE_WIDTH >> sb_size_log2;

-#if CONFIG_CWG_C013
-  bool use_level_7_above = false;
-  for (int i = 0; i < seq_params->operating_points_cnt_minus_1 + 1; i++) {
-    if (seq_params->seq_level_idx[i] >= SEQ_LEVEL_7_0 &&
-        seq_params->seq_level_idx[i] <= SEQ_LEVEL_8_3) {
-      // Currently it is assumed that levels 7.x and 8.x are either used for all
-      // operating points, or none of them.
-      if (i != 0 && !use_level_7_above) {
-        aom_internal_error(cm->error, AOM_CODEC_UNSUP_BITSTREAM,
-                           "Either all the operating points are levels 7.x or "
-                           "8.x, or none of them are.");
-      }
-      use_level_7_above = true;
-    }
-  }
-  const int max_tile_area_sb =
-      (use_level_7_above ? MAX_TILE_AREA_LEVEL_7_AND_ABOVE : MAX_TILE_AREA) >>
-      (2 * sb_size_log2);
-#else
   const int max_tile_area_sb = MAX_TILE_AREA >> (2 * sb_size_log2);
-#endif

   tiles->min_log2_cols = tile_log2(tiles->max_width_sb, sb_cols);
   tiles->max_log2_cols = tile_log2(1, AOMMIN(sb_cols, MAX_TILE_COLS));
diff --git a/av1/common/tile_common.h b/av1/common/tile_common.h
index 89f290f2d9..b876c7fe6c 100644
--- a/av1/common/tile_common.h
+++ b/av1/common/tile_common.h
@@ -49,9 +49,6 @@ int av1_get_sb_cols_in_tile(const struct AV1Common *cm, const TileInfo *tile);
 // The minimum tile width or height is fixed at one superblock
 #define MAX_TILE_WIDTH (4096)        // Max Tile width in pixels
 #define MAX_TILE_AREA (4096 * 2304)  // Maximum tile area in pixels
-#if CONFIG_CWG_C013
-#define MAX_TILE_AREA_LEVEL_7_AND_ABOVE (4096 * 4608)
-#endif

 // Gets the width and height (in units of MI_SIZE) of the tiles in a tile list.
 // Returns true on success, false on failure.
diff --git a/av1/encoder/level.c b/av1/encoder/level.c
index 4bae4eff5a..b1fa236a40 100644
--- a/av1/encoder/level.c
+++ b/av1/encoder/level.c
@@ -1039,14 +1039,7 @@ static TARGET_LEVEL_FAIL_ID check_level_constraints(
       break;
     }

-#if CONFIG_CWG_C013
-    const int max_tile_size = (level >= SEQ_LEVEL_7_0 && level <= SEQ_LEVEL_8_3)
-                                  ? MAX_TILE_AREA_LEVEL_7_AND_ABOVE
-                                  : MAX_TILE_AREA;
-#else
-    const int max_tile_size = MAX_TILE_AREA;
-#endif
-    if (level_stats->max_tile_size > max_tile_size) {
+    if (level_stats->max_tile_size > MAX_TILE_AREA) {
       fail_id = TILE_TOO_LARGE;
       break;
     }