Commit c29c09a405 for aom
commit c29c09a4055894d5d73fedd09475bce19d3519b3
Author: Jerome Jiang <jianj@google.com>
Date: Thu Oct 29 10:46:06 2026 -0400
Quarter frame counts in av1_enc_fuzzer
Commit d38f7e4429 reduced kNumFramesForCpuUsed from 50-100 down to
4-10, which prevented small frames from cycling through all 8 AV1
reference frame slots or a full golden-frame interval at slower
presets.
Set kNumFramesForCpuUsed to a quarter of the original counts (12-25) so
small frames exercise multi-frame reference rotation and rate control,
and tighten kMaxSuperblocksForCpuUsed at cpu_used 0-5 (96-1024) so
medium and large frames stay well within the OSS-Fuzz timeout while
still encoding at least 3 frames up to 1024x1024.
TAG=agy
CONV=f2ed7983-e7b9-43ce-bdab-6286b21e3af8
Bug: 558505651
Change-Id: Idc4c54b3148f406641f265414b79627309c33c1d
diff --git a/examples/av1_enc_fuzzer.cc b/examples/av1_enc_fuzzer.cc
index 4e183dd737..924de8c1b6 100644
--- a/examples/av1_enc_fuzzer.cc
+++ b/examples/av1_enc_fuzzer.cc
@@ -42,32 +42,33 @@ enum ModeFlag {
// fuzzer's execution time budget (libFuzzer defaults to one second per
// input). This can be refined based on measured fuzzer performance.
constexpr unsigned int kNumFramesForCpuUsed[12] = {
- 4, // cpu_used 0
- 4, // cpu_used 1
- 4, // cpu_used 2
- 5, // cpu_used 3
- 5, // cpu_used 4
- 6, // cpu_used 5
- 6, // cpu_used 6
- 7, // cpu_used 7
- 8, // cpu_used 8
- 9, // cpu_used 9
- 9, // cpu_used 10
- 10 // cpu_used 11
+ 12, // cpu_used 0
+ 12, // cpu_used 1
+ 12, // cpu_used 2
+ 15, // cpu_used 3
+ 15, // cpu_used 4
+ 17, // cpu_used 5
+ 17, // cpu_used 6
+ 20, // cpu_used 7
+ 20, // cpu_used 8
+ 22, // cpu_used 9
+ 22, // cpu_used 10
+ 25 // cpu_used 11
};
// Maximum number of 64x64 superblocks to encode across all frames for a
// given cpu_used value (one 1024x1024 frame is 256 superblocks). This caps
-// worst-case execution time on large frames at slow speed presets while
-// still allowing full 1024x1024 resolution and at least 3 frames (initial,
+// worst-case execution time on medium and large frames at slow speed presets
+// while letting small frames run the full kNumFramesForCpuUsed count and still
+// allowing full 1024x1024 resolution with at least 3 frames (initial,
// switch_frame, and restore_frame) at every cpu_used.
constexpr unsigned int kMaxSuperblocksForCpuUsed[12] = {
- 768, // cpu_used 0
- 768, // cpu_used 1
- 768, // cpu_used 2
- 1024, // cpu_used 3
- 1024, // cpu_used 4
- 1280, // cpu_used 5
+ 96, // cpu_used 0
+ 256, // cpu_used 1
+ 384, // cpu_used 2
+ 512, // cpu_used 3
+ 640, // cpu_used 4
+ 1024, // cpu_used 5
1280, // cpu_used 6
1536, // cpu_used 7
1792, // cpu_used 8