[FFmpeg-cvslog] tools/target_dec_fuzzer: Sort threshold list alphabetically

Michael Niedermayer git at videolan.org
Wed Jan 29 15:39:32 EET 2020


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Jan 26 00:56:25 2020 +0100| [cc7bf7e05cf62d1f170f53b92a77fed2806f49fd] | committer: Michael Niedermayer

tools/target_dec_fuzzer: Sort threshold list alphabetically

This also removes the comments as they are hard to maintain
together with sorted lists

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cc7bf7e05cf62d1f170f53b92a77fed2806f49fd
---

 tools/target_dec_fuzzer.c | 54 ++++++++++++++++++++++-------------------------
 1 file changed, 25 insertions(+), 29 deletions(-)

diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index a3d784a019..79d8dab1b9 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -136,36 +136,32 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
     maxpixels = maxpixels_per_frame * maxiteration;
     maxsamples = maxsamples_per_frame * maxiteration;
     switch (c->id) {
-        // Allows a small input to generate gigantic output
-    case AV_CODEC_ID_BINKVIDEO: maxpixels /= 32; break;
-    case AV_CODEC_ID_CFHD:      maxpixels /= 128; break;
-    case AV_CODEC_ID_DIRAC:     maxpixels /= 8192; break;
-    case AV_CODEC_ID_DST:       maxsamples /= 8192; break;
-    case AV_CODEC_ID_DXV:       maxpixels /= 32;  break;
+    case AV_CODEC_ID_BINKVIDEO:   maxpixels  /= 32;    break;
+    case AV_CODEC_ID_CFHD:        maxpixels  /= 128;   break;
+    case AV_CODEC_ID_DIRAC:       maxpixels  /= 8192;  break;
+    case AV_CODEC_ID_DST:         maxsamples /= 8192;  break;
+    case AV_CODEC_ID_DXV:         maxpixels  /= 32;    break;
     case AV_CODEC_ID_FFWAVESYNTH: maxsamples /= 16384; break;
-    case AV_CODEC_ID_MSRLE:     maxpixels /= 16;  break;
-    case AV_CODEC_ID_QTRLE:     maxpixels /= 16;  break;
-    case AV_CODEC_ID_RASC:      maxpixels /= 16;  break;
-    case AV_CODEC_ID_SANM:      maxpixels /= 16;  break;
-    case AV_CODEC_ID_G2M:       maxpixels /= 64;  break;
-    case AV_CODEC_ID_GIF:       maxpixels /= 16;  break;
-        // Performs slow frame rescaling in C
-    case AV_CODEC_ID_GDV:       maxpixels /= 512; break;
-        // Postprocessing in C
-    case AV_CODEC_ID_HNM4_VIDEO:maxpixels /= 128; break;
-        // Cliping in C, generally slow even with small input
-    case AV_CODEC_ID_INDEO4:    maxpixels /= 128; break;
-    case AV_CODEC_ID_LSCR:        maxpixels /= 16; break;
-    case AV_CODEC_ID_MOTIONPIXELS:maxpixels /= 256; break;
-    case AV_CODEC_ID_MSS2:        maxpixels /= 16384; break;
-    case AV_CODEC_ID_MSZH:        maxpixels /= 128; break;
-    case AV_CODEC_ID_SCPR:        maxpixels /= 32;    break;
-    case AV_CODEC_ID_SMACKVIDEO:  maxpixels /= 64; break;
-    case AV_CODEC_ID_SNOW:        maxpixels /= 128; break;
-    case AV_CODEC_ID_TGV:         maxpixels /= 32;    break;
-    case AV_CODEC_ID_TRUEMOTION2: maxpixels /= 1024; break;
-    case AV_CODEC_ID_VP7:         maxpixels /= 256;  break;
-    case AV_CODEC_ID_VP9:         maxpixels /= 4096; break;
+    case AV_CODEC_ID_G2M:         maxpixels  /= 64;    break;
+    case AV_CODEC_ID_GDV:         maxpixels  /= 512;   break;
+    case AV_CODEC_ID_GIF:         maxpixels  /= 16;    break;
+    case AV_CODEC_ID_HNM4_VIDEO:  maxpixels  /= 128;   break;
+    case AV_CODEC_ID_INDEO4:      maxpixels  /= 128;   break;
+    case AV_CODEC_ID_LSCR:        maxpixels  /= 16;    break;
+    case AV_CODEC_ID_MOTIONPIXELS:maxpixels  /= 256;   break;
+    case AV_CODEC_ID_MSRLE:       maxpixels  /= 16;    break;
+    case AV_CODEC_ID_MSS2:        maxpixels  /= 16384; break;
+    case AV_CODEC_ID_MSZH:        maxpixels  /= 128;   break;
+    case AV_CODEC_ID_QTRLE:       maxpixels  /= 16;    break;
+    case AV_CODEC_ID_RASC:        maxpixels  /= 16;    break;
+    case AV_CODEC_ID_SANM:        maxpixels  /= 16;    break;
+    case AV_CODEC_ID_SCPR:        maxpixels  /= 32;    break;
+    case AV_CODEC_ID_SMACKVIDEO:  maxpixels  /= 64;    break;
+    case AV_CODEC_ID_SNOW:        maxpixels  /= 128;   break;
+    case AV_CODEC_ID_TGV:         maxpixels  /= 32;    break;
+    case AV_CODEC_ID_TRUEMOTION2: maxpixels  /= 1024;  break;
+    case AV_CODEC_ID_VP7:         maxpixels  /= 256;   break;
+    case AV_CODEC_ID_VP9:         maxpixels  /= 4096;  break;
     }
 
 



More information about the ffmpeg-cvslog mailing list