summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* avformat/mxfenc: Fix typoAndreas Rheinhardt2021-02-16
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mxfenc: Use user-specified version even when bitexactAndreas Rheinhardt2021-02-16
| | | | | | Doing so is still bitexact. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mxfenc: Never set codec_ul UID to NULLAndreas Rheinhardt2021-02-16
| | | | | | | | | | | | | | | | | mxf distinguishes codec profiles by different UIDs and therefore needs to check that the input is actually compatible with mxf (i.e. if there is a defined UID for it). If not, then sometimes the UID would be set to NULL and writing the (video) packet would fail. Yet the following audio packet would trigger writing the header (which has been postponed because the UID is not known at the start) and if the UID is NULL, this can lead to segfaults. This commit therefore stops setting the UID to NULL if the input is incompatible with mxf (it has initially been set to a generic value in mxf_write_header()). Fixes #7993. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vif: Include avfilter.hAndreas Rheinhardt2021-02-16
| | | | | | Fixes checkheaders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/frame_thread_encoder: Use more natural typesAndreas Rheinhardt2021-02-16
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/frame_thread_encoder: Reduce amount of code guarded by mutexAndreas Rheinhardt2021-02-16
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/frame_thread_encoder: Avoid FIFOAndreas Rheinhardt2021-02-16
| | | | | | It can be replaced by a simple counter. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/frame_thread_encoder: Avoid allocations of AVFramesAndreas Rheinhardt2021-02-16
| | | | | | | | | | | | | | | | Up until now, when using frame threaded encoding, an AVFrame would be allocated for every frame to be encoded. These AVFrames would reach the worker threads via a FIFO of tasks, a structure which contained the AVFrame as well as an index into an array which gives the place where the worker thread shall put the returned packet; in addition to that, said structure also contained several unused fields. This commit changes this: The AVFrames are now allocated during init in the array that is up until now only used to return the packets. The contents to be encoded are put into the AVFrame in the same array element that is also used to return the packets. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/frame_thread_encoder: Avoid creating reference to frameAndreas Rheinhardt2021-02-16
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/frame_thread_encoder: Avoid allocations of AVPackets, fix deadlockAndreas Rheinhardt2021-02-16
| | | | | | | | | | | | | | | | | | | | | Up until now, when doing frame thread encoding, each worker thread tried to allocate an AVPacket for every AVFrame to be encoded; said packets would then be handed back to the main thread, where the content of said packet is copied into the packet actually destined for output; the temporary AVPacket is then freed. Besides being wasteful this also has another problem: There is a risk of deadlock, namely if no AVPacket can be allocated at all. The user doesn't get an error at all in this case and the worker threads will simply try to allocate a packet again and again. If the user has supplied enough frames, the user's thread will block until a task has been completed, which just doesn't happen if no packet can ever be allocated. This patch instead modifies the code to allocate the packets during init; they are then reused again and again. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/frame_thread_encoder: Fix segfault on allocation errorAndreas Rheinhardt2021-02-16
| | | | | | | | | | | Fixes a segfault from av_fifo_size(NULL) that happens in ff_frame_thread_encoder_free if the fifo couldn't be allocted; furthermore the mutexes and conditions that are destroyed in ff_frame_thread_encoder_free are not even initialized at this point, so don't call said function. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/frame_thread_encoder: Improve type safetyAndreas Rheinhardt2021-02-16
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/x86/vf_gblur: add postscale SIMDPaul B Mahol2021-02-16
|
* avfilter/vf_gblur: factor out postscale functionPaul B Mahol2021-02-16
|
* tools/target_dec_fuzzer: Adjust threshold for wavpackMichael Niedermayer2021-02-16
| | | | | | | | Fixes: Timeout (long -> 4sec) Fixes: 29064/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVPACK_fuzzer-5104450901508096 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 MSA1Michael Niedermayer2021-02-16
| | | | | | | | Fixes: Timeout (too long to wait -> 1ms) Fixes: 29048/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSA1_fuzzer-5733703473037312 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 cookMichael Niedermayer2021-02-16
| | | | | | | | Fixes: Timeout (long -> 3ms) Fixes: 29134/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5192822695264256 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 theoraMichael Niedermayer2021-02-16
| | | | | | | | Fixes: Timeout Fixes: 29226/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-6195092572471296 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: Update maxpixels_per_frame for low thresholdsMichael Niedermayer2021-02-16
| | | | | | | | Fixes: Timeout Fixes: 29990/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSS2_fuzzer-5469155073589248 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: count all video decoding failures in the new APIMichael Niedermayer2021-02-16
| | | | | | The next commit depends on this Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rmdec: Check codec_length without overflowMichael Niedermayer2021-02-16
| | | | | | | | Fixes: signed integer overflow: 2147483647 + 64 cannot be represented in type 'int' Fixes: 30333/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-5175286983426048 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Check element count in mov_metadata_hmmt()Michael Niedermayer2021-02-16
| | | | | | | | Fixes: Timeout Fixes: 30325/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6048395703746560 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vp8: Move end check into MB loop in vp78_decode_mv_mb_modes()Michael Niedermayer2021-02-16
| | | | | | | | | Fixes: Timeout (long -> 5sec) Fixes: 30269/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP7_fuzzer-5430325004075008 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/buffersrc: simplify av_buffersrc_add_frame_flags()James Almer2021-02-16
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter: add vif filterAshish Singh2021-02-16
| | | | | | | This is Visual Information Fidelity (VIF) filter and one of the component filters of VMAF. It outputs the average VIF score over all frames. Signed-off-by: Ashish Singh <ashk43712@gmail.com>
* avcodec/exr: export any unknown header string variable to metadataPaul B Mahol2021-02-16
| | | | And properly skip preview type in header.
* avcodec/exr: refactor GetByteContext usagePaul B Mahol2021-02-16
|
* avcodec/exr: correctly calculate display windowPaul B Mahol2021-02-16
|
* avcodec/exr: add multipart supportPaul B Mahol2021-02-16
|
* fate/matroska: Add test for remuxing file with spherical metadataAndreas Rheinhardt2021-02-15
| | | | | | | | Also, test modifying colorspace properties and the default_mode passthrough which is used here to create a file that has no default track at all. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fate/matroska: Add test for zero-length BlockAndreas Rheinhardt2021-02-15
| | | | | | | | | | It furthermore tests the demuxer's handling of chained SeekHeads, level 1-elements after the Clusters and the muxer's capability of writing huge TrackNumbers as well as expanding the Cues' length field by one byte if necessary to fill the reserved space. It also tests propagation of metadata. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/setts_bsf: add sample rate for expressionsPaul B Mahol2021-02-15
|
* avcodec/exr: unbreak parsing sample aspect ratioPaul B Mahol2021-02-15
|
* avcodec/exr: read fps from metadata tooPaul B Mahol2021-02-15
|
* avformat/utils: Add av_assert1 to preclude NULL + len, len != 0Andreas Rheinhardt2021-02-15
| | | | | | | | | Such a scenario is undefined behaviour and would also indicate a bug in our code. Suggested-by: James Almer <jamrial@gmail.com> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavf/img2dec: Autodetect pfm images.Carl Eugen Hoyos2021-02-15
|
* lavfi/vflip: Support Bayer vertical flip.Carl Eugen Hoyos2021-02-15
| | | | Fixes ticket #8819.
* lavc/pnm: Allow decoding gray float pfm images.Carl Eugen Hoyos2021-02-15
|
* avformat/utils: Fix undefined NULL + 0Andreas Rheinhardt2021-02-14
| | | | | | | | | | | This is undefined behaviour in C, so use data = len ? data + len : data instead of data += len. GCC optimizes the branch away in this case; Clang unfortunately doesn't. Fixes ticket #8592. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avdevice/avdevice: Deprecate AVDevice Capabilities APIAndreas Rheinhardt2021-02-14
| | | | | | | | | | | | | | It has been added in 6db42a2b6b22e6f1928fafcf3faa67ed78201004, yet since then none of the necessary create/free_device_capabilities functions has been implemented, making this API completely useless. Because of this one can already simplify avdevice_capabilities_free/create and can already remove the function pointers at the next major bump; given that the documentation explicitly states that av_device_capabilities is not to be used by a user, it's options can already be removed (save for the sentinel). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* tools/target_dec_fuzzer: Adjust threshold for VMNCMichael Niedermayer2021-02-14
| | | | | | | | Fixes: Timeout Fixes: 30055/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VMNC_fuzzer-4739482576355328 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/fmvc: avoid copying uninitialized dataMichael Niedermayer2021-02-14
| | | | | | | | Fixes: Timeout Fixes: 30049/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FMVC_fuzzer-5986909455253504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/fits: Check gcount and pcount being non negativeMichael Niedermayer2021-02-14
| | | | | | | | Fixes: signed integer overflow: 9223372036854775807 - -30069403896 cannot be represented in type 'long' Fixes: 30046/clusterfuzz-testcase-minimized-ffmpeg_dem_FITS_fuzzer-5807144773484544 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 the threshold of vc1imageMichael Niedermayer2021-02-14
| | | | | | | | Fixes: Timeout Fixes: 30025/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5965511357759488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/nutdec: Check timebase count against main header lengthMichael Niedermayer2021-02-14
| | | | | | | | | Fixes: Timeout (long -> 3ms) Fixes: 28514/clusterfuzz-testcase-minimized-ffmpeg_dem_NUT_fuzzer-6078669009321984 Fixes: 30095/clusterfuzz-testcase-minimized-ffmpeg_dem_NUT_fuzzer-5074433016463360 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: sanity check STSD entriesMichael Niedermayer2021-02-14
| | | | | | | | | | | | The choosen value is arbitrary. I am not sure if this is a good idea but i dont immedeately see an alternative better way, it seems either an arbitrary limit or OOM Fixes: OOM Fixes: 27492/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6194970578649088 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/apedec: export bits_per_raw_samplePaul B Mahol2021-02-14
| | | | Fixes #4717
* avcodec/pngenc: remove monowhite from apng formatsPaul B Mahol2021-02-14
| | | | | | | Monowhite pixel format is not supported, and it does not make sense to add support for it. Fixes #7989
* avcodec/mediacodecdec: do not abort when H264/HEVC extradata extraction failssfan52021-02-14
| | | | | | | Although rare, extradata can be present but empty and extraction will fail. However Android also supports passing codec-specific data inline and will likely play such a stream anyway. So there's no reason to abort initialization before we know for sure.
* avformat/mux: return a pointer to the packet in ff_interleaved_peek()James Almer2021-02-13
| | | | | | | And make it const, so the caller doesn't attempt to change it. ff_get_muxer_ts_offset() should be used to get the muxer timestamp offset. Signed-off-by: James Almer <jamrial@gmail.com>