summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avfilter: add audio dynamic smooth filterPaul B Mahol2021-12-02
|
* avfilter: add audio spectral stats filterPaul B Mahol2021-12-02
|
* avcodec/movtextenc: Simplify writing a single charAndreas Rheinhardt2021-12-02
| | | | | Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextenc: Remove redundant byte countAndreas Rheinhardt2021-12-02
| | | | | | | Use the AVBPrint's len instead. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextenc: Fix encoding of subtitles with multiple rectsAndreas Rheinhardt2021-12-02
| | | | | | | | | | | | | | | | | | | | | | | | The format of a mov_text (3GPP Timed Text) sample is: uint16_t text_length; uint8_t text[text_length]; TextSampleModifierBox text_modifier; Yet in case our encoder receives an AVSubtitle with multiple ASS AVSubtitleRects, it creates something like this: uint16_t text_length; uint8_t text[text_length_1]; TextSampleModifierBox text_modifier_1; uint8_t text[text_length_2]; TextSampleModifierBox text_modifier_2; ... where text_length is the sum of all the text_length_*. This commit fixes this by writing the TextSampleModifierBoxes only after all the rects have been written. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextenc: Check for too long subtitlesAndreas Rheinhardt2021-12-02
| | | | | Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextenc: Reset AVBPrint at the beginning, not end of encodingAndreas Rheinhardt2021-12-02
| | | | | | | | | This avoids abusing a variable called length for the return value and ensures that the AVBPrint is always reset before using it; previously this has been forgotten in some error paths. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextenc: Fix infinite loop due to variable truncationAndreas Rheinhardt2021-12-02
| | | | | | | | Regression since af043b839c38e850af1184fd6be691f8475c048e. Fixes ticket #9409. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/ffmpeg: add some more flags to the shortest testsJames Almer2021-12-01
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fate/ffmpeg: add missing bitexact flags to the shortest testsJames Almer2021-12-01
| | | | | | Should fix fate failures on some targets. Signed-off-by: James Almer <jamrial@gmail.com>
* fate/ffmpeg: add tests for shortest optionJames Almer2021-12-01
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* ffmpeg: fix usage of -shortest in codec copy scenariosJames Almer2021-12-01
| | | | | | | | | Don't mark all streams as finished, instead make sync_opts keep track of the stream's duration, and set recording_time to it, same as in transcoding paths. Fixes tickets #9512 and #9513. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/vp3: Check version in all cases when VP4 code is not builtMichael Niedermayer2021-12-01
| | | | | | | | | Fixes: out of array read Fixes: 40284/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP3_fuzzer-4599568176644096 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>
* tools/target_dec_fuzzer: Adjust DXA thresholdMichael Niedermayer2021-12-01
| | | | | | | | Fixes: Timeout Fixes: 40203/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXA_fuzzer-4587923496894464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gemdec: Check tag & planes before image allocationMichael Niedermayer2021-12-01
| | | | | | | | | Fixes: Timeout Fixes: 41083/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GEM_fuzzer-5843826518917120 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>
* avcodec: [loongarch] Optimize decode_significance/_8x8_loongarch.Hao Chen2021-12-01
| | | | | | | | Decoding 1080P H264 from 168fps to 170fps. Signed-off-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: 陈昊 <chenhao@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: [loongarch] optimize get_cabac.Shiyou Yin2021-12-01
| | | | | | | | Decoding 1080P H264 on 2.5Ghz 3A5000: 165fps==>168fps. Testing command: ffmpeg -i ***.mp4 -f rawvideo -y /dev/null -an Reviewed-by: 陈昊 <chenhao@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* configure: Add support for loongarch.Shiyou Yin2021-12-01
| | | | | | | | | | | | For la464 cpu: ./configure --cpu=la464 With cross-compiler: ./configure --cross-prefix=loongarch64-linux-gnu- \ --enable-cross-compile --arch=loongarch64 \ --target-os=linux --cpu=la464 Reviewed-by: 陈昊 <chenhao@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/scd: add demuxerZane van Iperen2021-12-02
| | | | | | | | | | | | | | | | Adds demuxer for Square Enux SCD files. Based off [1] and personal investigation. This has only been tested against Drakengard 3 (PS3) *_SCD.XXX files (big-endian). As it is highly likely that FFXIV (PC) files are little-endian, this demuxer is marked as experimental until this can be confirmed. [1]: http://ffxivexplorer.fragmenterworks.com/research/scd%20files.txt Reviewed-by: Peter Ross <pross@xvid.org> Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/vaapi_encode: Fix segfault upon closing uninitialized encoderAndreas Rheinhardt2021-12-01
| | | | | | | Fixes ticket #9537. Probably a regression since 2b3206891649f317c20993411efef4bee39ae784. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Sort cues entries by ptsAndreas Rheinhardt2021-11-30
| | | | | | | | | | | Currently they are ordered as-written (i.e. by increasing position); in case av_interleaved_write_frame() is used, this is (mostly) the same as ordered by increasing dts. Yet the Matroska specification strongly recommends (SHOULD) that the CuePoints be sorted by CueTime. mkvalidator warns when they are not. Therefore this commit sorts them accordingly. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/qsvenc: Properly flush the FIFO on closeAndreas Rheinhardt2021-11-30
| | | | | | | | Freeing the new H.264 specific fields has been forgotten. (This leak only appears in case the encoder has not been completely drained.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/qsvenc: Fix leak of A53 dataAndreas Rheinhardt2021-11-30
| | | | | | | Up until now, it has only been freed when the QSVFrame is reused, so that the last one contained in it leaked at the end. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/qsvenc: Fix leak and crash when encoding H.264 due to A53_CCAndreas Rheinhardt2021-11-30
| | | | | | | | | | | | | | | | | | | | | Since commit 3bbe0c210b05fc6fbd7b1d4bbd8479db7f2cf957, the Payloads array of every QSVFrame leaks as soon as the frame is reused; the leak is small and not very noticeable, but if there is an attempt to use said array the ensuing crash is much more noticeable. This happens when encoding H.264 with A53 CC side data. Furthermore, if said array can not be allocated at all, an AVFrame leaks. Fix all of this by not allocating the array separately at all; put it in QSVFrame instead and restore the Payloads array upon reusing the frame. Finally, use av_freep() instead of av_free() to free the payload entries. Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg_opt: Don't set source_index redundantlyAndreas Rheinhardt2021-11-30
| | | | | | It is already set in new_output_stream(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg_opt: Don't duplicate array unnecessarilyAndreas Rheinhardt2021-11-30
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/fifo: avoid repeated scaling of timestamps on failure and recoveryRyoji Gyoda2021-11-29
| | | | | | | | | | | | | | | | | | | If fifo_thread_recover() succeeds immediately after fifo_thread_dispatch_message() fails, the dts of the packet is scaled twice, causing cur_dts to be abnormally large and "Application provided invalid, non monotonically increasing dts to muxer in stream" to occur repeatedly. Steps to reproduce: 1. ffmpeg -f lavfi -i testsrc -c:v libx264 -map 0:v -flags +global_header -f fifo -fifo_format flv -attempt_recovery 1 -recover_any_error 1 rtmp://example.com/livekey 2. set a breakpoint on fifo_thread_recover 3. force disconnect from the rtmp server 4. wait for break 5. reconnect to the rtmp server 6. resume execution of ffmpeg Signed-off-by: Ryoji Gyoda <gy.cft4@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffprobe: print size of attachment streams (extradata_size)softworkz2021-11-29
| | | | | Signed-off-by: softworkz <softworkz@hotmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/flvenc: avoid 24bit timestamp truncation for FLV metadataasilvestre2021-11-29
| | | | | | | | | | | | | | | | | FLV AMF tags have a 24bit field for timestamps plus an 8bit for extended timestamps. All FLV AMF tags except when we write metadata handle this correctly using the put_timestamp function. Until now when writing metadata we were only using the first 24 bits and thus the timestamp value was wraping around 4 hours 40 minutes (16,800,000 ms, max 24 bit value 16,777,216) of playback. This commit fixes this applying this same function put_timestamp for the metadata FLV tag. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/iff: limit written bytes to twice the output array size in ↵Michael Niedermayer2021-11-29
| | | | | | | | | | decode_delta_l() Fixes: Timeout Fixes: 39436/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-6624915520880640 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: Disable MB debug after a few iterationsMichael Niedermayer2021-11-29
| | | | | | | | | | This debug code can be quite slow on constructed streams Fixes: Timeout Fixes: 38907/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-6334628852531200 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 channels for mov_parse_stsd_audio()Michael Niedermayer2021-11-29
| | | | | | | | Fixes: signed integer overflow: -776522110086937600 * 16 cannot be represented in type 'long' Fixes: 40563/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6644829447127040 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vqavideo: Use GetByteContext and check for endMichael Niedermayer2021-11-29
| | | | | | | | Fixes: out of array access Fixes: Timeout Fixes: 40481/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQA_fuzzer-6502647583080448 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/src_movie: add format_opts for the opened fileLimin Wang2021-11-29
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/videotoolbox: silence some -Wimplicit-fallthrough warningsJames Almer2021-11-28
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/videotoolbox: fix build on pre-10.14 SDKsrcombs2021-11-28
| | | | Also fixes handling of future codec tags (needed to bswap)
* lavc: bump minor version for new VT hwaccelsrcombs2021-11-28
|
* lavc/proresdec: add videotoolbox hwaccelrcombs2021-11-28
|
* lavc/proresdec: add scaffolding for hwdec supportrcombs2021-11-28
|
* videotoolbox: add alpha supportrcombs2021-11-28
|
* lavc/videotoolbox: add VP9 hardware accelerationrcombs2021-11-28
| | | | On M1 Max, this supports profiles 0 and 2, but not 1 and 3.
* lavc/videotoolbox: call VTRegisterSupplementalVideoDecoderIfAvailablercombs2021-11-28
| | | | This is required for VP9 to work.
* lavc/videotoolbox: expose some functions as lavc-internalrcombs2021-11-28
|
* lavc/hevcdec: support all color formats in videotoolbox hwaccelrcombs2021-11-28
|
* lavc/h264dec: support all color formats in videotoolbox hwaccelrcombs2021-11-28
|
* lavc/videotoolbox: select 4:2:2 and 4:4:4 formats when applicablercombs2021-11-28
|
* lavc/videotoolbox: fix format computationrcombs2021-11-28
| | | | Use sw_pix_fmt instead of pix_fmt (consistent with other hwaccels)
* lavc/videotoolbox: escape 0x00000[0-3]s in avcC PSsrcombs2021-11-28
|
* lavu/videotoolbox: add 422 and 444 pixel format mappingsrcombs2021-11-28
|
* swscale: add P210/P410/P216/P416 inputrcombs2021-11-28
|