Commit 1f9bfc65de for aom

commit 1f9bfc65de63a01bd8c256eeb22f121915ea135f
Author: Wan-Teh Chang <wtc@google.com>
Date:   Mon Jan 12 10:59:27 2026 -0800

    av1/decoder/obu.c: don't fail on undefined levels

    The AV1 spec is silent on how a decoder should handle a level that is
    not yet defined. A reasonable behavior is to allow such a level without
    checking the level constraints (because they are not defined).

    Bug: 471949427
    Change-Id: I5022d283f79ba8455dccbf49749b160902c111db

diff --git a/av1/decoder/obu.c b/av1/decoder/obu.c
index 2ee124b6fd..815d80523c 100644
--- a/av1/decoder/obu.c
+++ b/av1/decoder/obu.c
@@ -79,14 +79,6 @@ static int byte_alignment(AV1_COMMON *const cm,

 static uint32_t read_temporal_delimiter_obu(void) { return 0; }

-// Returns a boolean that indicates success.
-static int read_bitstream_level(AV1_LEVEL *seq_level_idx,
-                                struct aom_read_bit_buffer *rb) {
-  *seq_level_idx = aom_rb_read_literal(rb, LEVEL_BITS);
-  if (!is_valid_seq_level_idx(*seq_level_idx)) return 0;
-  return 1;
-}
-
 // Returns whether two sequence headers are consistent with each other.
 // Note that the 'op_params' field is not compared per Section 7.5 in the spec:
 //   Within a particular coded video sequence, the contents of
@@ -137,11 +129,7 @@ static uint32_t read_sequence_header_obu(AV1Decoder *pbi,
     seq_params->operating_points_cnt_minus_1 = 0;
     seq_params->operating_point_idc[0] = 0;
     seq_params->has_nonzero_operating_point_idc = false;
-    if (!read_bitstream_level(&seq_params->seq_level_idx[0], rb)) {
-      aom_internal_error(&pbi->error, AOM_CODEC_UNSUP_BITSTREAM,
-                         "Value %d of seq_level_idx[%d] is not yet defined",
-                         seq_params->seq_level_idx[0], 0);
-    }
+    seq_params->seq_level_idx[0] = aom_rb_read_literal(rb, LEVEL_BITS);
     seq_params->tier[0] = 0;
     seq_params->op_params[0].decoder_model_param_present_flag = 0;
     seq_params->op_params[0].display_model_param_present_flag = 0;
@@ -165,11 +153,7 @@ static uint32_t read_sequence_header_obu(AV1Decoder *pbi,
           aom_rb_read_literal(rb, OP_POINTS_IDC_BITS);
       if (seq_params->operating_point_idc[i] != 0)
         seq_params->has_nonzero_operating_point_idc = true;
-      if (!read_bitstream_level(&seq_params->seq_level_idx[i], rb)) {
-        aom_internal_error(&pbi->error, AOM_CODEC_UNSUP_BITSTREAM,
-                           "Value %d of seq_level_idx[%d] is not yet defined",
-                           seq_params->seq_level_idx[i], i);
-      }
+      seq_params->seq_level_idx[i] = aom_rb_read_literal(rb, LEVEL_BITS);
       // This is the seq_level_idx[i] > 7 check in the spec. seq_level_idx 7
       // is equivalent to level 3.3.
       if (seq_params->seq_level_idx[i] >= SEQ_LEVEL_4_0)
diff --git a/test/invalid_file_test.cc b/test/invalid_file_test.cc
index 9a052b4f16..4cbf29ed4a 100644
--- a/test/invalid_file_test.cc
+++ b/test/invalid_file_test.cc
@@ -13,6 +13,7 @@
 #include <ostream>
 #include <string>

+#include "config/aom_config.h"
 #include "gtest/gtest.h"
 #include "test/codec_factory.h"
 #include "test/ivf_video_source.h"
@@ -131,7 +132,7 @@ const DecodeParam kAV1InvalidFileTests[] = {
   { 1, "invalid-google-142530197-1.ivf", nullptr },
   { 4, "invalid-oss-fuzz-9463.ivf", "invalid-oss-fuzz-9463.ivf.res.2" },
   { 1, "invalid-oss-fuzz-9720.ivf", nullptr },
-  { 1, "invalid-oss-fuzz-10389.ivf", "invalid-oss-fuzz-10389.ivf.res.4" },
+  { 1, "invalid-oss-fuzz-10389.ivf", "invalid-oss-fuzz-10389.ivf.res.5" },
 #if !defined(CHROMIUM) && !CONFIG_SIZE_LIMIT ||         \
     (CONFIG_SIZE_LIMIT && DECODE_WIDTH_LIMIT >= 5120 && \
      DECODE_HEIGHT_LIMIT >= 180)
@@ -151,11 +152,7 @@ const DecodeParam kAV1InvalidFileTests[] = {
   { 1, "invalid-oss-fuzz-10227.ivf", nullptr },
   { 4, "invalid-oss-fuzz-10555.ivf", nullptr },
   { 1, "invalid-oss-fuzz-10705.ivf", nullptr },
-#if CONFIG_CWG_C013
   { 1, "invalid-oss-fuzz-10723.ivf", "invalid-oss-fuzz-10723.ivf.res.3" },
-#else
-  { 1, "invalid-oss-fuzz-10723.ivf", "invalid-oss-fuzz-10723.ivf.res.2" },
-#endif
   { 1, "invalid-oss-fuzz-10779.ivf", nullptr },
   { 1, "invalid-oss-fuzz-11477.ivf", nullptr },
   { 1, "invalid-oss-fuzz-11479.ivf", "invalid-oss-fuzz-11479.ivf.res.2" },
diff --git a/test/test-data.sha1 b/test/test-data.sha1
index 88ada1474b..a5bd6e2065 100644
--- a/test/test-data.sha1
+++ b/test/test-data.sha1
@@ -16,7 +16,7 @@ c9e06c4c7fb7d69fd635a1f606a5e478d60e99cf *invalid-oss-fuzz-10117-mc-buf-use-high
 91a5bedeb4832c1c2900736cc0f644bb63971bbc *invalid-oss-fuzz-10227.ivf
 b055f06b9a95aaa5697fa26497b592a47843a7c8 *invalid-oss-fuzz-10227.ivf.res
 b2d0a29a65879436bf483d04865faca7d11cc2ee *invalid-oss-fuzz-10389.ivf
-f4ce175af1d871ed1603c8936f6b78e968f93c85 *invalid-oss-fuzz-10389.ivf.res.4
+ddd9f38cd81a88e53ef71879adbaa40bac02e634 *invalid-oss-fuzz-10389.ivf.res.5
 11df8e9a068669c678097d460b63609d3da73828 *invalid-oss-fuzz-10555.ivf
 b055f06b9a95aaa5697fa26497b592a47843a7c8 *invalid-oss-fuzz-10555.ivf.res
 cf5945085fe85456a1f74bf4cc7998b88b3f4b62 *invalid-oss-fuzz-10705.ivf
diff --git a/test/test_data_util.cmake b/test/test_data_util.cmake
index 76e77a544c..8ae6b258fb 100644
--- a/test/test_data_util.cmake
+++ b/test/test_data_util.cmake
@@ -552,7 +552,7 @@ if(CONFIG_AV1_DECODER)
               "invalid-oss-fuzz-10227.ivf"
               "invalid-oss-fuzz-10227.ivf.res"
               "invalid-oss-fuzz-10389.ivf"
-              "invalid-oss-fuzz-10389.ivf.res.4"
+              "invalid-oss-fuzz-10389.ivf.res.5"
               "invalid-oss-fuzz-10555.ivf"
               "invalid-oss-fuzz-10555.ivf.res"
               "invalid-oss-fuzz-10705.ivf"