From patchwork Fri Feb 7 13:48:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 17712 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 4A505446FBF for ; Fri, 7 Feb 2020 15:55:55 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2E5DE68B067; Fri, 7 Feb 2020 15:55:55 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe01-1.mx.upcmail.net (vie01a-dmta-pe01-1.mx.upcmail.net [62.179.121.154]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4959F68B057 for ; Fri, 7 Feb 2020 15:55:49 +0200 (EET) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe01.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1j040i-000ARC-1f for ffmpeg-devel@ffmpeg.org; Fri, 07 Feb 2020 14:49:32 +0100 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id 03zjjDaVzwlys03zjj0CWC; Fri, 07 Feb 2020 14:48:32 +0100 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=E5OzWpVl c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=hcnHL5KfeWmfr-6SCyMA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 7 Feb 2020 14:48:25 +0100 Message-Id: <20200207134831.23137-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-CMAE-Envelope: MS4wfDJ95lDyAUwjzSWOT1KcWIKC6YNZcNLAaXWJSqOyQHpauCkKD1ijUfGf6WySNEB1Xn/X6nvIDHPNzjggMVO1Nnc1IfgJ02xTWxGBMdaQp2nx0SM8S2eg ehbLpAWDUqSAaZm0E0F8HOSWnwzpqekx8CRX2jJGghzlpUZfE0xRnU4v Subject: [FFmpeg-devel] [PATCH 1/7] tools/target_dec_fuzzer: Fuzz skip_frame X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Should allow coverage of related code Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 2487b6ca94..67a2a41874 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -223,6 +223,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ctx->request_channel_layout = bytestream2_get_le64(&gbc); ctx->idct_algo = bytestream2_get_byte(&gbc) % 25; + ctx->skip_frame = bytestream2_get_byte(&gbc) - 254 + AVDISCARD_ALL; + if (flags & 0x20) { switch (ctx->codec_id) { From patchwork Fri Feb 7 13:48:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 17706 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 3461744BA5B for ; Fri, 7 Feb 2020 15:49:40 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 10C7668B053; Fri, 7 Feb 2020 15:49:40 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe06-3.mx.upcmail.net (vie01a-dmta-pe06-3.mx.upcmail.net [84.116.36.16]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2622C68AE6B for ; Fri, 7 Feb 2020 15:49:33 +0200 (EET) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe06.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1j040i-00027t-1h for ffmpeg-devel@ffmpeg.org; Fri, 07 Feb 2020 14:49:32 +0100 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id 03zkjDaXMwlys03zkj0CWW; Fri, 07 Feb 2020 14:48:32 +0100 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=E5OzWpVl c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=2-HJZUkRB2PPWDTzyt8A:9 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 7 Feb 2020 14:48:26 +0100 Message-Id: <20200207134831.23137-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200207134831.23137-1-michael@niedermayer.cc> References: <20200207134831.23137-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfDJ95lDyAUwjzSWOT1KcWIKC6YNZcNLAaXWJSqOyQHpauCkKD1ijUfGf6WySNEB1Xn/X6nvIDHPNzjggMVO1Nnc1IfgJ02xTWxGBMdaQp2nx0SM8S2eg ehbLpAWDUqSAaZm0E0F8HOSWnwzpqekx8CRX2jJGghzlpUZfE0xRnU4v Subject: [FFmpeg-devel] [PATCH 2/7] avcodec/h264_levels: Remove unused ff_h264_get_level() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- libavcodec/h264_levels.c | 12 ------------ libavcodec/h264_levels.h | 3 --- 2 files changed, 15 deletions(-) diff --git a/libavcodec/h264_levels.c b/libavcodec/h264_levels.c index dd517f1005..801b27fdd9 100644 --- a/libavcodec/h264_levels.c +++ b/libavcodec/h264_levels.c @@ -75,18 +75,6 @@ static int h264_get_br_factor(int profile_idc) return 1200; } -const H264LevelDescriptor *ff_h264_get_level(int level_idc, - int constraint_set3_flag) -{ - int i; - for (i = 0; i < FF_ARRAY_ELEMS(h264_levels); i++) { - if (h264_levels[i].level_idc == level_idc && - h264_levels[i].constraint_set3_flag == constraint_set3_flag) - return &h264_levels[i]; - } - return NULL; -} - const H264LevelDescriptor *ff_h264_guess_level(int profile_idc, int64_t bitrate, int framerate, diff --git a/libavcodec/h264_levels.h b/libavcodec/h264_levels.h index 0a0f410329..6bba2e8624 100644 --- a/libavcodec/h264_levels.h +++ b/libavcodec/h264_levels.h @@ -36,9 +36,6 @@ typedef struct H264LevelDescriptor { uint8_t max_mvs_per_2mb; } H264LevelDescriptor; -const H264LevelDescriptor *ff_h264_get_level(int level_idc, - int constraint_set3_flag); - /** * Guess the level of a stream from some parameters. * From patchwork Fri Feb 7 13:48:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 17708 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 45FE044BA5B for ; Fri, 7 Feb 2020 15:49:42 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 36D9D68B066; Fri, 7 Feb 2020 15:49:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe06-3.mx.upcmail.net (vie01a-dmta-pe06-3.mx.upcmail.net [84.116.36.16]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 755F868B00A for ; Fri, 7 Feb 2020 15:49:33 +0200 (EET) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe06.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1j040j-00027w-0g for ffmpeg-devel@ffmpeg.org; Fri, 07 Feb 2020 14:49:33 +0100 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id 03zkjDaY9wlys03zkj0CWZ; Fri, 07 Feb 2020 14:48:32 +0100 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=E5OzWpVl c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=t0ZZGeFCQuf886qKvUIA:9 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 7 Feb 2020 14:48:27 +0100 Message-Id: <20200207134831.23137-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200207134831.23137-1-michael@niedermayer.cc> References: <20200207134831.23137-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfEuPDHN6RGX0WNsSr9b7cHFdz1IC4SZYwRnIywCoKuTUl6DRybBNVnZhsqbNx5YLSgFgOuxEyV7c6FS0rYeUF1dW8fcq/mCkwBcXvzpUdh75x9+HnxMG ILuH9OPjpILGyoDrTxKcFE0SUiFg/YEnU+bKnI7ggla+/56qRSq0r+Te Subject: [FFmpeg-devel] [PATCH 3/7] tools/target_dec_fuzzer: enable mjpeg for tiff or tdsc X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This is needed for fuzzing tiff/tdsc and should increase coverage Signed-off-by: Michael Niedermayer --- libavcodec/allcodecs.c | 1 + tools/target_dec_fuzzer.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 0ad3338f9a..5735864702 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -795,6 +795,7 @@ extern AVCodec ff_vp9_qsv_encoder; // The iterate API is not usable with ossfuzz due to the excessive size of binaries created #if CONFIG_OSSFUZZ AVCodec * codec_list[] = { + NULL, NULL, NULL }; diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 67a2a41874..2e718c2e95 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -120,6 +120,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { codec_list[0] = &DECODER_SYMBOL(FFMPEG_DECODER); avcodec_register(&DECODER_SYMBOL(FFMPEG_DECODER)); +#if FFMPEG_DECODER == tiff || FFMPEG_DECODER == tdsc + extern AVCodec DECODER_SYMBOL(mjpeg); + codec_list[1] = &DECODER_SYMBOL(mjpeg); + avcodec_register(&DECODER_SYMBOL(mjpeg)); +#endif + c = &DECODER_SYMBOL(FFMPEG_DECODER); #else avcodec_register_all(); From patchwork Fri Feb 7 13:48:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 17711 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 49F90446FBF for ; Fri, 7 Feb 2020 15:55:47 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2FD1868B05E; Fri, 7 Feb 2020 15:55:47 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe01-1.mx.upcmail.net (vie01a-dmta-pe01-1.mx.upcmail.net [62.179.121.154]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 216D968B048 for ; Fri, 7 Feb 2020 15:55:41 +0200 (EET) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe01.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1j040j-000AR9-0d for ffmpeg-devel@ffmpeg.org; Fri, 07 Feb 2020 14:49:33 +0100 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id 03zljDaYKwlys03zlj0CWg; Fri, 07 Feb 2020 14:48:33 +0100 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=E5OzWpVl c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=tgJzfQ0mQLaUmr9rsJ0A:9 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 7 Feb 2020 14:48:28 +0100 Message-Id: <20200207134831.23137-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200207134831.23137-1-michael@niedermayer.cc> References: <20200207134831.23137-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfEuPDHN6RGX0WNsSr9b7cHFdz1IC4SZYwRnIywCoKuTUl6DRybBNVnZhsqbNx5YLSgFgOuxEyV7c6FS0rYeUF1dW8fcq/mCkwBcXvzpUdh75x9+HnxMG ILuH9OPjpILGyoDrTxKcFE0SUiFg/YEnU+bKnI7ggla+/56qRSq0r+Te Subject: [FFmpeg-devel] [PATCH 4/7] tools/target_dec_fuzzer: Set extradata for the parser X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This should improve coverage Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 2e718c2e95..f1768d4dce 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -266,6 +266,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { return 0; // Failure of avcodec_open2() does not imply that a issue was found } parser_avctx->codec_id = ctx->codec_id; + parser_avctx->extradata_size = ctx->extradata_size; + parser_avctx->extradata = av_memdup(ctx->extradata, ctx->extradata_size); + int got_frame; AVFrame *frame = av_frame_alloc(); From patchwork Fri Feb 7 13:48:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 17710 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 64EBD44BE3F for ; Fri, 7 Feb 2020 15:55:12 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3F96968B05E; Fri, 7 Feb 2020 15:55:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe02-2.mx.upcmail.net (vie01a-dmta-pe02-2.mx.upcmail.net [62.179.121.158]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3E69F68B044 for ; Fri, 7 Feb 2020 15:55:06 +0200 (EET) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe02.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1j040j-0003Rl-0e for ffmpeg-devel@ffmpeg.org; Fri, 07 Feb 2020 14:49:33 +0100 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id 03zljDaYbwlys03zlj0CWl; Fri, 07 Feb 2020 14:48:33 +0100 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=E5OzWpVl c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=hcnHL5KfeWmfr-6SCyMA:9 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 7 Feb 2020 14:48:29 +0100 Message-Id: <20200207134831.23137-5-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200207134831.23137-1-michael@niedermayer.cc> References: <20200207134831.23137-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfEuPDHN6RGX0WNsSr9b7cHFdz1IC4SZYwRnIywCoKuTUl6DRybBNVnZhsqbNx5YLSgFgOuxEyV7c6FS0rYeUF1dW8fcq/mCkwBcXvzpUdh75x9+HnxMG ILuH9OPjpILGyoDrTxKcFE0SUiFg/YEnU+bKnI7ggla+/56qRSq0r+Te Subject: [FFmpeg-devel] [PATCH 5/7] tools/target_dec_fuzzer: Fuzz AV_CODEC_FLAG2_EXPORT_MVS X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This should increase coverage Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index f1768d4dce..7e73c83686 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -210,6 +210,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { } if (flags & 0x10) ctx->flags2 |= AV_CODEC_FLAG2_FAST; + if (flags & 0x80) + ctx->flags2 |= AV_CODEC_FLAG2_EXPORT_MVS; if (flags & 0x40) av_force_cpu_flags(0); From patchwork Fri Feb 7 13:48:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 17707 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 3EDE944BA5B for ; Fri, 7 Feb 2020 15:49:41 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 28BF968B05C; Fri, 7 Feb 2020 15:49:41 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe06-3.mx.upcmail.net (vie01a-dmta-pe06-3.mx.upcmail.net [84.116.36.16]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6A5FA68AE6B for ; Fri, 7 Feb 2020 15:49:33 +0200 (EET) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe06.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1j040j-00027u-0g for ffmpeg-devel@ffmpeg.org; Fri, 07 Feb 2020 14:49:33 +0100 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id 03zljDaYiwlys03zlj0CWn; Fri, 07 Feb 2020 14:48:33 +0100 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=E5OzWpVl c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=dGcyz1ErC16UIYqlyT0A:9 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 7 Feb 2020 14:48:30 +0100 Message-Id: <20200207134831.23137-6-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200207134831.23137-1-michael@niedermayer.cc> References: <20200207134831.23137-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfEuPDHN6RGX0WNsSr9b7cHFdz1IC4SZYwRnIywCoKuTUl6DRybBNVnZhsqbNx5YLSgFgOuxEyV7c6FS0rYeUF1dW8fcq/mCkwBcXvzpUdh75x9+HnxMG ILuH9OPjpILGyoDrTxKcFE0SUiFg/YEnU+bKnI7ggla+/56qRSq0r+Te Subject: [FFmpeg-devel] [PATCH 6/7] tools/target_dec_fuzzer: Fuzz FF_DEBUG_* X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This should increase coverage Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 7e73c83686..dcf9e06121 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -191,6 +191,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { GetByteContext gbc; int extradata_size; int flags; + int64_t flags64; + size -= 1024; bytestream2_init(&gbc, data + size, 1024); ctx->width = bytestream2_get_le32(&gbc); @@ -246,6 +248,13 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { } } + flags64 = bytestream2_get_le64(&gbc); + if (flags64 &1) + ctx->debug |= FF_DEBUG_SKIP; + if (flags64 &2) + ctx->debug |= FF_DEBUG_QP; + if (flags64 &4) + ctx->debug |= FF_DEBUG_MB_TYPE; if (extradata_size < size) { ctx->extradata = av_mallocz(extradata_size + AV_INPUT_BUFFER_PADDING_SIZE); From patchwork Fri Feb 7 13:48:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 17709 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 07E7044BA5B for ; Fri, 7 Feb 2020 15:49:43 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E93A568B06C; Fri, 7 Feb 2020 15:49:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe05-3.mx.upcmail.net (vie01a-dmta-pe05-3.mx.upcmail.net [84.116.36.13]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9C47468B041 for ; Fri, 7 Feb 2020 15:49:33 +0200 (EET) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe05.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1j040j-0001QE-0e for ffmpeg-devel@ffmpeg.org; Fri, 07 Feb 2020 14:49:33 +0100 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id 03zljDaYpwlys03zlj0CWq; Fri, 07 Feb 2020 14:48:33 +0100 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=E5OzWpVl c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=VSr9u2JkKtpbWN087h0A:9 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 7 Feb 2020 14:48:31 +0100 Message-Id: <20200207134831.23137-7-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200207134831.23137-1-michael@niedermayer.cc> References: <20200207134831.23137-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfEuPDHN6RGX0WNsSr9b7cHFdz1IC4SZYwRnIywCoKuTUl6DRybBNVnZhsqbNx5YLSgFgOuxEyV7c6FS0rYeUF1dW8fcq/mCkwBcXvzpUdh75x9+HnxMG ILuH9OPjpILGyoDrTxKcFE0SUiFg/YEnU+bKnI7ggla+/56qRSq0r+Te Subject: [FFmpeg-devel] [PATCH 7/7] avcodec/bitpacked: Add codec_tags list X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This should improve coverage Signed-off-by: Michael Niedermayer --- libavcodec/bitpacked.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/bitpacked.c b/libavcodec/bitpacked.c index f0b417d595..be7d1e3629 100644 --- a/libavcodec/bitpacked.c +++ b/libavcodec/bitpacked.c @@ -146,4 +146,8 @@ AVCodec ff_bitpacked_decoder = { .init = bitpacked_init_decoder, .decode = bitpacked_decode, .capabilities = AV_CODEC_CAP_EXPERIMENTAL, + .codec_tags = (const uint32_t []){ + MKTAG('U', 'Y', 'V', 'Y') + FF_CODEC_TAGS_END, + }, };