[libavif] Cut down on post-decode combinations to avoid timeouts (#4308)

Co-authored-by: Joe Drago <jdrago@netflix.com>
This commit is contained in:
Joe Drago 2020-08-12 13:43:18 -07:00 committed by GitHub
parent 6ffa47eb77
commit 014e070f99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -17,19 +17,18 @@
#include "avif/avif.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
static avifRGBFormat rgbFormats[] = {
AVIF_RGB_FORMAT_RGB, AVIF_RGB_FORMAT_RGBA, AVIF_RGB_FORMAT_ARGB,
AVIF_RGB_FORMAT_BGR, AVIF_RGB_FORMAT_BGRA, AVIF_RGB_FORMAT_ABGR};
static avifRGBFormat rgbFormats[] = {AVIF_RGB_FORMAT_RGB,
AVIF_RGB_FORMAT_RGBA};
static size_t rgbFormatsCount = sizeof(rgbFormats) / sizeof(rgbFormats[0]);
static avifChromaUpsampling upsamplings[] = {AVIF_CHROMA_UPSAMPLING_BILINEAR,
AVIF_CHROMA_UPSAMPLING_NEAREST};
static size_t upsamplingsCount = sizeof(upsamplings) / sizeof(upsamplings[0]);
static uint32_t rgbDepths[] = {8, 10, 12, 16};
static uint32_t rgbDepths[] = {8, 10};
static size_t rgbDepthsCount = sizeof(rgbDepths) / sizeof(rgbDepths[0]);
static uint32_t yuvDepths[] = {8, 10, 12};
static uint32_t yuvDepths[] = {8, 10};
static size_t yuvDepthsCount = sizeof(yuvDepths) / sizeof(yuvDepths[0]);
avifROData raw;