Add a test for b/312517065
authorWan-Teh Chang <wtc@google.com>
Thu, 30 Nov 2023 23:37:12 +0000 (15:37 -0800)
committerWan-Teh Chang <wtc@google.com>
Fri, 1 Dec 2023 00:10:04 +0000 (16:10 -0800)
Bug: b/312517065
Change-Id: I6b5529a8e034fb0468f110e420fafb4944a19d0f

test/encode_api_test.cc

index da3676f..7ca2b59 100644 (file)
@@ -601,7 +601,7 @@ TEST(EncodeAPI, PrevMiCheckNullptr) {
   encoder.Encode(false);
 }
 
-// This is a test case from clusterfuzz: based on 310477034.
+// This is a test case from clusterfuzz: based on b/310477034.
 // Encode a few frames with multiple change config call
 // with different frame size.
 TEST(EncodeAPI, MultipleChangeConfigResize) {
@@ -673,6 +673,18 @@ TEST(EncodeAPI, DynamicDeadlineChange) {
   encoder.Encode(false);
 }
 
+// This is a test case from clusterfuzz: based on b/312517065.
+TEST(EncodeAPI, Buganizer312517065) {
+  VP9Encoder encoder(4);
+  encoder.Configure(0, 1060, 437, VPX_CBR, VPX_DL_REALTIME);
+  encoder.Encode(true);
+  encoder.Configure(10, 33, 437, VPX_VBR, VPX_DL_GOOD_QUALITY);
+  encoder.Encode(false);
+  encoder.Configure(6, 327, 269, VPX_VBR, VPX_DL_GOOD_QUALITY);
+  encoder.Configure(15, 1060, 437, VPX_CBR, VPX_DL_REALTIME);
+  encoder.Encode(false);
+}
+
 class EncodeApiGetTplStatsTest
     : public ::libvpx_test::EncoderTest,
       public ::testing::TestWithParam<const libvpx_test::CodecFactory *> {