summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avcodec/mpegvideo: ReindentationAndreas Rheinhardt2021-12-17
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h263: Remove declaration of inexistent functionAndreas Rheinhardt2021-12-17
| | | | | | Forgotten in c46eeae2a80dfe0046c15b542e8b9a2c78f19bf7. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Allocate several buffers jointlyAndreas Rheinhardt2021-12-17
| | | | | | Reduces the amount of allocations and frees. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Don't allocate encoder-only buffers when decodingAndreas Rheinhardt2021-12-17
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc, vc1dec: Remove always-false checkAndreas Rheinhardt2021-12-17
| | | | | | Mpeg1EncContext.droppable is only nonzero for the FLV decoder. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Don't update encoder-only fields for decodersAndreas Rheinhardt2021-12-17
| | | | | | ff_mpeg_update_thread_context() is only used by decoders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move closed_gop to Mpeg1ContextAndreas Rheinhardt2021-12-17
| | | | | | Only used there and only by the main thread. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/4xm: Check for duplicate track idsMichael Niedermayer2021-12-16
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/4xm: Consider max_streams on reallocating tracks arrayMichael Niedermayer2021-12-16
| | | | | | | | Fixes: OOM Fixes: 41595/clusterfuzz-testcase-minimized-ffmpeg_dem_FOURXM_fuzzer-6355979363549184 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/cinedec: Avoid repeatedly allocating packets beyond the inputMichael Niedermayer2021-12-16
| | | | | | | | Fixes: Timeout Fixes: 41025/clusterfuzz-testcase-minimized-ffmpeg_dem_CINE_fuzzer-5540848285122560 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/speexdec: Avoid violating the vector_fmul_scalar() APIMichael Niedermayer2021-12-16
| | | | | | | | Fixes: out of array access Fixes: 40054/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SPEEX_fuzzer-6713285764841472 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 next offset in mov_read_dref()Michael Niedermayer2021-12-16
| | | | | | | | Fixes: signed integer overflow: 9223372036200463215 + 1109914409 cannot be represented in type 'long' Fixes: 41480/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6553086177443840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/vivo: Favor setting fps from explicit fractionsMichael Niedermayer2021-12-16
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/vivo: Do not use the general expression evaluator for parsing a ↵Michael Niedermayer2021-12-16
| | | | | | | | | | floating point value Fixes: Timeout Fixes: 41564/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVO_fuzzer-6309014024093696 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* x86/scale_avx2: don't use $ for hex literalsJames Almer2021-12-16
| | | | | | Fixes compilation with AVX2 enabled yasm. Signed-off-by: James Almer <jamrial@gmail.com>
* tools/target_dec_fuzzer: Adjust threshold for proresMichael Niedermayer2021-12-16
| | | | | | | | Fixes: Timeout Fixes: 42072/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_fuzzer-4957999452520448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mvdec: Use 64 bit in timestamp computationMichael Niedermayer2021-12-16
| | | | | | | | | | Fixes: division by zero Fixes: 42198/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5054366405492736.fuzz Fixes: 42222/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-4561249331970048 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>
* x86/scale_avx2: Change asm indent from 2 to 4 spaces.Alan Kelly2021-12-16
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* x86/swscale: fix minor coding style issuesAlan Kelly2021-12-16
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* x86/scale_avx2: add missing check for AVX2 assembler supportJames Almer2021-12-16
| | | | | | Should fix compilation with old yasm. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/tests: Update .gitignore fileAndreas Rheinhardt2021-12-16
| | | | | | Forgotten in 136865413c04760aeeda6079002bc3c1f9ae230a. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/cmdutils: Avoid crash when opts could not be allocatedYu Yang2021-12-16
| | | | | | | | If 'opts' could not be allocated, exiting the program to avoid crash when release it. Reported-by: TOTE Robot <oslab@tsinghua.edu.cn> Signed-off-by: Yu Yang <yuyang14@kuaishou.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aviobuf: fix double free by return early on errorSteven Liu2021-12-16
| | | | | | | | | | Because the s->buffer has been freed by av_freep in avio_closep. It should not av_freep the buffer in label fail after avio_closep. Then just move the av_freep before avio_closep and remove the label fail. Reported-by: TOTE Robot <oslab@tsinghua.edu.cn> Reviewed-by: Zhao Zhili <zhilizhao@tencent.com> Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
* avformat/moflex: Don't use uninitialized timebase for data streamAndreas Rheinhardt2021-12-16
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/moflex: Free AVPackets via av_packet_free() on errorAndreas Rheinhardt2021-12-16
| | | | | | | (This is not a leak as long as av_free() completely frees blank packets.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/speedhq: Replace always-true check by assertAndreas Rheinhardt2021-12-16
| | | | | | Should fix Coverity tickets #1473572 and #1473504. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/decode: Reset *got_sub_ptr on errorAndreas Rheinhardt2021-12-16
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/xsubdec: Use dedicated pointer for AVSubtitleRectAndreas Rheinhardt2021-12-16
| | | | | | Improves readability and slightly reduces codesize. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/xsubdec: Cleanup generically upon allocation errorAndreas Rheinhardt2021-12-16
| | | | | | | This is possible by incrementing the counter of allocated rects directly after said allocation succeeded. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ass: Fix leaks upon ff_ass_add_rect() errorAndreas Rheinhardt2021-12-16
| | | | | | | Do this by actually incrementing the counter for the number of rects at the right time. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/decode: Fix leaks upon subtitle decoding errorsAndreas Rheinhardt2021-12-16
| | | | | | | | | | | | | | Up until now, various subtitle decoders have not cleaned up the AVSubtitle on error; this task must not be left to the user because the documentation explicitly states that the AVSubtitle "must be freed with avsubtitle_free if *got_sub_ptr is set" (which it isn't on error). Leaks happen upon failure in ff_ass_add_rect() or in ass_decode_frame(); freeing generically also allows to remove now redundant freeing code in pgssubdec and dvbsubdec. While just at it, also reset got_sub_ptr generically on error. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pgssubdec: Use dedicated pointer for accessesAndreas Rheinhardt2021-12-16
| | | | | | Improves readability and decreases codesize. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pgssubdec: Remove redundant freeing codeAndreas Rheinhardt2021-12-16
| | | | | | | | The caller of display_end_segment() frees the AVSubtitle on error in case ENOMEM is returned or err_recognition is set to explode, so display_end_segment() doesn't have to. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pgssubdec: Always return error upon allocation errorAndreas Rheinhardt2021-12-16
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/demux: Remove redundant prevention against infinite loopAndreas Rheinhardt2021-12-16
| | | | | | | | | | | | | | | | | | | This piece of code has been added as FFmpeg's answer to infinite loops in try_decode_frame() in commit 6072a19b4f311cb172d45e90daad90824e40e4b6. There is no loop around try_decode_frame() any more, so this code can be removed. This code is only triggered in case a) the codec parameter could not be determined, b) the decode delay could not be guessed or c) no packet was ever encountered and the encoder has the AV_CODEC_CAP_CHANNEL_CONF. In these cases the new code will no longer emit a "decoding for stream %d failed" message, which is prima facie false. In case a) an additional "Could not find codec parameters" message is (and will be) emitted. No warning will be emitted any more in case b) (this happens e.g. with some h264-conformance FATE-files). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/demux: Remove fake-loopAndreas Rheinhardt2021-12-16
| | | | | | | When flushing, try_decode_frame() itself loops until the desired properties have been found or the decoder is drained. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h2645_parse: Move ref_idc further up in H2645NALAndreas Rheinhardt2021-12-16
| | | | | | | | This puts it directly near the NALU type which is more natural and furthermore reduces the size of the structure because it can be placed in padding (on 64-bit systems). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h2645_parse: Remove H2645NAL.rbsp_bufferAndreas Rheinhardt2021-12-16
| | | | | | | | | | Forgotten in 03b82b3ab9883cef017e513c7d0b3b986b3b3e7b. (Moving data to the front is only done to make existing initializations like H2645NAL nal = { NULL } not emit int->pointer conversion warnings.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* libswscale: Adds ff_hscale8to15_4_avx2 and ff_hscale8to15_X4_avx2 for all ↵Alan Kelly2021-12-15
| | | | | | | | | | filter sizes. Fixes so that fate under 64 bit Windows passes. These functions replace all ff_hscale8to15_*_ssse3 when avx2 is available. Signed-off-by: James Almer <jamrial@gmail.com>
* lavfi/vf_libplacebo: update deprecated option nameNiklas Haas2021-12-15
| | | | | | | | This was renamed upstream quite a while ago (v3.112.0). Rename the option name as well for consistency (and expand the description just slightly). Signed-off-by: Niklas Haas <git@haasn.dev>
* vf_libplacebo: switch to newer libplacebo helpersNiklas Haas2021-12-15
| | | | | | | | | | | | | | | | | Support for mapping/unmapping hardware frames has been added into libplacebo itself, so we can scrap this code in favor of using the new functions. This has the additional benefit of being forwards-compatible as support for more complicated frame-related state management is added to libplacebo (e.g. mapping dolby vision metadata). It's worth pointing out that, technically, this would also allow `vf_libplacebo` to accept, practically unmodified, other frame types (e.g. vaapi or drm), or even software input formats. (Although we still need a vulkan *device* to be available) To keep things simple, though, retain the current restriction to vulkan frames. It's possible we could rethink this in a future commit, but for now I don't want to introduce any more potentially breaking changes.
* avcodec: [loongarch] Optimize pred16x16_plane with LASX.Hao Chen2021-12-15
| | | | | | | | | | | ./ffmpeg -i ../1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an before:295 after :296 Change-Id: I281bc739f708d45f91fc3860150944c0b8a6a5ba Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: [loongarch] Optimize h264_deblock with LASX.Jin Bo2021-12-15
| | | | | | | | | | | | ./ffmpeg -i ../1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an before:293 after :295 Change-Id: I5ff6cba4eaca0c4218c0c97b880ca500e35f9c87 Signed-off-by: Hao Chen <chenhao@loongson.cn> Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: [loongarch] Optimize h264idct with LASX.Lu Wang2021-12-15
| | | | | | | | | | | ./ffmpeg -i ../1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an before:282 after :293 Change-Id: Ia8889935a6359630dd5dbb61263287f1cb24a0a4 Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: [loongarch] Optimize h264dsp with LASX.gxw2021-12-15
| | | | | | | | | | | ./ffmpeg -i ../1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an before:225 after :282 Change-Id: Ibe245827dcdfe8fc1541c6b172483151bfa9e642 Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: [loongarch] Optimize h264qpel with LASX.Shiyou Yin2021-12-15
| | | | | | | | | | | ./ffmpeg -i ../1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an before:183 after :225 Change-Id: I7c7d2f34cd82ef728aab5ce8f6bfb46dd81f0da4 Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: [loongarch] Optimize h264_chroma_mc with LASX.Shiyou Yin2021-12-15
| | | | | | | | | | | ./ffmpeg -i ../1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an before:170 after :183 Change-Id: I42ff23cc2dc7c32bd1b7e4274da9d9ec87065f20 Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil: [loongarch] Add support for loongarch SIMD.Shiyou Yin2021-12-15
| | | | | | | | | | | LSX and LASX is loongarch SIMD extention. They are enabled by default if compiler support it, and can be disabled with '--disable-lsx' '--disable-lasx'. Change-Id: Ie2608ea61dbd9b7fffadbf0ec2348bad6c124476 Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/af_astats: improve options descriptionsLimin Wang2021-12-14
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtpdec_rfc4175: cosmetic changesLimin Wang2021-12-14
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>