aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* doc/examples/demuxing_decoding: convert to new decoding APIAnton Khirnov2020-05-121-86/+91
|
* doc/examples/demuxing_decoding: drop -refcountAnton Khirnov2020-05-121-22/+6
| | | | | Non-refcounted frames are deprecated and there is no good reason to use them.
* avcodec/utvideodec: Fix integer overflow in decode_plane()Michael Niedermayer2020-05-121-1/+1
| | | | | | | | Fixes: signed integer overflow: 2147483594 + 142 cannot be represented in type 'int' Fixes: 20492/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_UTVIDEO_fuzzer-5658568101724160 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ttadsp: Fix several integer overflows in tta_filter_process_c()Michael Niedermayer2020-05-121-1/+3
| | | | | | | | Fixes: signed integer overflow: 1931744255 + 252497024 cannot be represented in type 'int' Fixes: 20492/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-5763348114440192 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ralf: Fix integer overflow in decode_block()Michael Niedermayer2020-05-121-3/+4
| | | | | | | | Fixes: signed integer overflow: 289082077 - -2003141111 cannot be represented in type 'int' Fixes: 20492/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5196077752123392 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/nuv: widen buf_size typeMichael Niedermayer2020-05-121-1/+1
| | | | | | | | Fixes: signed integer overflow: 65312 * 65312 cannot be represented in type 'int' Fixes: 20492/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NUV_fuzzer-5740176118906880 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libswscale: fix for floating point formats, require full chromaMark Reid2020-05-121-0/+2
| | | | | | upon more floating point testing, looks like I missed adding this bit. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* test: Add codecview testMichael Niedermayer2020-05-122-0/+14
|
* tests: Add pp7, spp tests based on pp testMichael Niedermayer2020-05-123-0/+28
|
* avfilter/vf_spp: Fix endian-dependance in add_block()Michael Niedermayer2020-05-121-4/+8
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_spp: Remove unused AVCodecContextMichael Niedermayer2020-05-122-8/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Revert "hwcontext_vulkan: only use one semaphore per image"Lynne2020-05-113-89/+91
| | | | | | | | | This reverts commit 97b526c192add6f252b327245fd9223546867352. It broke the API, and assumed no other APIs used multiple semaphores. This also disallowed certain optimizations to happen. Dealing with APIs that give or expect single semaphores is easier when we use per-image semaphores.
* avformat/ivfenc: move bsf insertion to the init functionJames Almer2020-05-111-14/+10
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/ivfenc: add an AVOutputFormat.init() functionJames Almer2020-05-111-2/+11
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/iff: Fix several integer overflowsMichael Niedermayer2020-05-111-2/+1
| | | | | | | | | Fixes: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int'); cast to an unsigned type to negate this value to itself Fixes: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int32_t' (aka 'int') Fixes: 20492/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5764066459254784 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/g729postfilter: Clip gain before scaling with AGC_FAC1Michael Niedermayer2020-05-111-0/+1
| | | | | | | | | | | | The fixed point integer reference specifies the multiplication used to have 16bit input and clips so we need to clip the input The floating point implementation does not seem to do that. Fixes: signed integer overflow: 6317568 * 410 cannot be represented in type 'int' Fixes: 20492/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G729_fuzzer-5700189272932352 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/alac: Fix integer overflow with 24/20bps samplesMichael Niedermayer2020-05-111-2/+2
| | | | | | | | Fixes: signed integer overflow: 1020048 * 4096 cannot be represented in type 'int' Fixes: 20492/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-5753877751660544 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/adpcm: Clip predictor for IMA_APMMichael Niedermayer2020-05-111-2/+2
| | | | | | | | Fixes: signed integer overflow: -2147483647 - 61436 cannot be represented in type 'int' Fixes: 20492/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_IMA_APM_fuzzer-5092176004644864 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* hwcontext_vulkan: convert to general layout and transfer queue when exportingLynne2020-05-101-1/+19
| | | | | | | The specs note that images should be in the GENERAL layout when exporting for maximum compatibility. CUDA exported images are handled differently, and the queue is the same, so we don't need to do that there.
* hwcontext_vulkan: create all images with concurrent sharing modeLynne2020-05-102-31/+52
| | | | | | | | | As it turns out, we were already assuming and treating all images as if they had concurrent access mode. This just changes the flag to CONCURRENT, which has less restrictions than EXCLUSIVE, and fixed validation messages on machines with multiple queues. The validation layer didn't pick this up because the machine I was testing on had only a single queue.
* hwcontext_vulkan: fix inverted condition when exporting images to drm_primeLynne2020-05-101-1/+1
| | | | Calling vkGetImageSubresourceLayout is only legal for linear and drm images.
* hwcontext_vulkan: update debugging layer nameLynne2020-05-101-1/+1
|
* hwcontext_vulkan: remove unused internal REQUIRED extension flagLynne2020-05-101-16/+4
| | | | | This is a leftover from an old version which used the 1.0 Vulkan API with the maintenance extensions being required.
* hwcontext_vulkan: expose enabled device and instance extensionsLynne2020-05-104-11/+56
| | | | | | | This solves a huge oversight - it lets users reliably use their own AVVulkanDeviceContext. Otherwise, the extensions supplied and enabled are not discoverable by anything outside of hwcontext_vulkan. Also clarifies that any user-supplied VkInstance must be at least 1.1.
* hwcontext_vulkan: let users enable device and instance extensions using optionsLynne2020-05-102-7/+81
| | | | | | Also documents all options supported by the hwdevice. This lets users enable all extensions they need without writing their own instance initialization code.
* avformat/hlsenc: Simplify setting base_output_dirnameAndreas Rheinhardt2020-05-101-15/+9
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/hlsenc: Simplify setting basename with av_asprintf()Andreas Rheinhardt2020-05-101-29/+14
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/hlsenc: Simplify setting subtitle basename with av_asprintfAndreas Rheinhardt2020-05-101-12/+8
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/hlsenc: Don't cast const awayAndreas Rheinhardt2020-05-101-4/+4
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/hlsenc: Remove redundant initializationsAndreas Rheinhardt2020-05-101-4/+0
| | | | | | | | | | | | | For every variantstream vs, vs->packets_written is set to one, only to be set to zero a few lines below. Given that the relevant structure has been zeroed during the allocation, this commit removes both assignments. A redundant initialization for vs->init_range_length has been removed as well a few lines below. Given that the relevant structure has been zeroed during the allocation, this commit removes both assignments. A redundant initialization for vs->init_range_length has been removed as well. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/hlsenc: Don't reset AVIOContext pointer manually a second timeAndreas Rheinhardt2020-05-101-1/+0
| | | | | | ff_format_io_close() already does it for us. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_signalstats: reindent after last commitLimin Wang2020-05-101-6/+6
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_signalstats: make the alloc array used for any bit depthLimin Wang2020-05-101-9/+9
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_signalstats: add SignalstatsContext.maxsize variableLimin Wang2020-05-101-9/+11
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_signalstats: rename config_props -> config_outputLimin Wang2020-05-101-2/+2
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* fate: add signalstats 8bit and 10bit testLimin Wang2020-05-103-0/+7
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/http: Fix for invalid use of av_strtokLimin Wang2020-05-101-2/+6
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/ftp: Fix for invalid use of av_strtokLimin Wang2020-05-101-6/+8
| | | | | | | | | | By the av_strtok() description: * On the first call to av_strtok(), s should point to the string to * parse, and the value of saveptr is ignored. In subsequent calls, s * should be NULL, and saveptr should be unchanged since the previous * call. Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/wavenc: simplify, use av_rescale_q() insteadLimin Wang2020-05-101-4/+3
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/vividas: simplify, use av_rescale_q() insteadLimin Wang2020-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | note it'll cause a small difference in accuracy for the pts, please see the testing result below: $ wget http://samples.ffmpeg.org/archive/all/unknown+unknown+unknown+unknown+5029_paramount_en_1250.viv $ ./ffmpeg -t 0.04 -i ./unknown+unknown+unknown+unknown+5029_paramount_en_1250.viv -f null - old: pts: 522 pts: 1044 pts: 1567 pts: 3918 pts: 8097 pts: 12277 pts: 16457 ... new: pts: 522 pts: 1045 pts: 1567 pts: 3918 pts: 8098 pts: 12278 pts: 16457 ... Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* hwcontext_vulkan: optionally enable the VK_KHR_surface extension if availableLynne2020-05-101-1/+1
| | | | This allows any phys_device derived to be used as a display rendering device.
* avcodec/dstdec: Check sample rateMichael Niedermayer2020-05-101-0/+4
| | | | | | | | | Fixes: out of array access Fixes: 20659/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-5735812071424000 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/decode: remove unused AVCodecInternal compat_decode fieldJames Almer2020-05-092-3/+0
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/v4l2_context: Finish draining if V4L2_BUF_FLAG_LAST is setAndriy Gelman2020-05-091-0/+4
| | | | | | | | | | | | | | | | | | V4L2 api can indicate that flushing of the capture buffers is completed by setting the V4L2_BUF_FLAG_LAST flag. Use guards because the flag was only defined in Linux v4.2. Reference: linux/Documentation/media/uapi/v4l/dev-decoder.rst "The client must continue to handle both queues independently, similarly to normal decode operation. This includes: ... - queuing and dequeuing CAPTURE buffers, until a buffer marked with the V4L2_BUF_FLAG_LAST flag is dequeued" Reviewed-by: Ming Qian <ming.qian@nxp.com> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avcodec/v4l2_context: Drop empty packet while drainingAndriy Gelman2020-05-091-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | v4l2_m2m devices may send an empty packet/frame while draining to indicate that all capture buffers have been flushed. Currently, the empty packet/frame is not handled correctly: When encoding, the empty packet is forwarded to the muxer, usually creating warnings. When decoding, a reference to the memory is created anyway. Since in the past this memory contained a decoded frame, it results in an extra frame being decoded. This commit discards the empty packet/frame. References: linux/Documentation/media/uapi/v4l/dev-decoder.rst: "The last buffer may be empty (with :c:type:`v4l2_buffer` bytesused = 0) and in that case it must be ignored by the client, as it does not contain a decoded frame." linux/Documentation/media/uapi/media/v4l/vidioc-encoder-cmd.rst: "...This buffer may be empty, indicated by the driver setting the ``bytesused`` field to 0." Reviewed-by: Ming Qian <ming.qian@nxp.com> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avcodec/aacdec_template: Pass AVCodecContext seperatly to ↵Michael Niedermayer2020-05-101-10/+10
| | | | | | | | | | | set_default_channel_config() Regression since 4d9b9c5e4637ac15205467f16fcac92a28e18f18 Fixes: Null pointer dereference Fixes: 21642/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5670101358739456 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/thp: Require a video streamMichael Niedermayer2020-05-101-0/+3
| | | | | | | | | | The demuxer code assumes the existence of a video stream Fixes: assertion failure Fixes: 21512/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5699660783288320 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mpeg: Decrease score by 1 for files with very little valid dataMichael Niedermayer2020-05-101-1/+1
| | | | | | Fixes: 8233/PPY6574574605_cut.mp3 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pngdec: Check length in fdATMichael Niedermayer2020-05-101-1/+1
| | | | | | | | Fixes: 21089/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5135981419429888 Fixes: out of array read Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Adjust threshold for PNG and APNGMichael Niedermayer2020-05-101-0/+2
| | | | | | | | Fixes: Timeout (84sec -> 2sec) Fixes: 21127/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5098412367413248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>