Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-09avcodec/apedec: Change avg to uint32_tMichael Niedermayer
Fixes: Integer overflow Fixes: 40973/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-6739312704618496 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Suggested-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-12-09avcodec/targa: Do not return images when there is no image in the tgaMichael Niedermayer
Fixes: Timeout Fixes: 35877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TARGA_fuzzer-5407292819374080 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-12-09avcodec/bitpacked_enc: suppport for frame thread encodeLimin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-12-09avcodec/bitpacked_dec: support for frame thread decodeLimin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-12-09avcodec/bitpacked_dec: setting pict_type and key_frame after decode()Limin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-12-09avcodec/bitpacked_dec: remove AV_CODEC_CAP_EXPERIMENTAL capabilitiesLimin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-12-08avcodec/movtextdec: Sanitize style entriesAndreas Rheinhardt
There are three types of style entries which are redundant: a) Entries with length zero. They are already discarded. b) Entries that are equivalent to the default style: They can be safely discarded. c) Entries that are equivalent to the immediately preceding style if the start of the current style coincides with the end of the preceding style. In this case the styles can be merged. This commit implements discarding/merging in cases b) and c). This fixes ticket #9548. In said ticket each packet contained exactly one style entry that covered the complete packet with the exception of the last character (probably created by a tool that didn't know that the style's end is exclusive). Said style coincided with the default style, leading to a superfluous reset, which is now gone. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-08avcodec/movtextdec: Perform RGB->BGR color conversion earlyAndreas Rheinhardt
Reduces the amount of conversions. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-08avcodec/movtextdec: Deduplicate parsing of StyleRecordsAndreas Rheinhardt
Both TextSampleEntry and TextSample can contain StyleRecords; yet both the code as well as the structures for them were duplicated. This commit changes this. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-08avcodec/movtextdec: Rename several structure elementsAndreas Rheinhardt
Giving elements of a structure called StyleBox names like "style_start" or "style_end" is redundant, especially given that the relevant variables are also called style. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-08avcodec/libkvazaar: Increase array sizeAndreas Rheinhardt
av_image_copy() expects an array of four pointers according to its declaration; although it currently only touches pointers that are actually in use (depending upon the pixel format) this might change at any time (as has already happened for the linesizes in d7bc52bf456deba0f32d9fe5c288ec441f1ebef5). This fixes a -Wstringop-overflow= warning with GCC 11.2. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-07packet: add description for the AVPacket.time_base fieldLynne
This description documents the field. Thanks to elenril for suggesting the phrasing.
2021-12-06avcodec/gemdec: Move all support checks before image allocationMichael Niedermayer
Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-12-06avcodec/avpacket: Perform fewer reallocations in repeated av_grow_packet()Michael Niedermayer
Fixes: Timeout Fixes: 41446/clusterfuzz-testcase-minimized-ffmpeg_dem_SAMI_fuzzer-4667644540747776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-12-06avcodec/libopenh264dec: Increase array sizes, fix stack-buffer overreadAndreas Rheinhardt
av_image_copy() expects an array of four pointers and linesizes according to its declaration; it currently only pointers that are actually in use (depending upon the pixel format), but this might change at any time. It has already happened for the linesizes in d7bc52bf456deba0f32d9fe5c288ec441f1ebef5 and so increasing their array fixes a stack-buffer overread. This fixes a -Wstringop-overflow= and -Wstringop-overread warning from GCC 11.2. Reviewed-by: Linjie Fu <linjie.justin.fu@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-04avcodec/videotoolbox: fix use of unknown builtin '__builtin_available'Limin Wang
Old system is: OSX version: 10.11.6 Apple LLVM version 8.0.0 (clang-800.0.42.1) Target: x86_64-apple-darwin15.6.0 Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-12-03all: Remove unused-but-set variablesAndreas Rheinhardt
Newer versions of Clang detect this and emit warnings for it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-03all: Use av_memdup() where appropriateAndreas Rheinhardt
Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-03avcodec/h264_redundant_pps_bsf: Inline constantAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-03avcodec/h264_redundant_pps_bsf: Support multiple input PPSAndreas Rheinhardt
Up until now, the h264_redundant_pps_bsf stored the initial value of pic_init_qp_minus26 of the most recently encountered PPS; it also modified the slices based upon to assumption that the most recent PPS is the PPS the slice belongs to. Yet this assumption is flawed, as there can be several PPS with different IDs that are visible at any given time. If these have different pic_init_qp_minus26 values, the output can be invalid. Fix this by directly using the pic_init_qp_minus26 value of the input PPS. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-03avcodec/h264_redundant_pps_bsf: Remove flush callbackAndreas Rheinhardt
extradata_pic_init_qp is unset since fa75e438756f159a667080dcba58ea2e3b190001 (and resetting current_pic_init_qp to the value it had in extradata never made much sense). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-02avcodec/movtextenc: Simplify writing a single charAndreas Rheinhardt
Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-02avcodec/movtextenc: Remove redundant byte countAndreas Rheinhardt
Use the AVBPrint's len instead. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-02avcodec/movtextenc: Fix encoding of subtitles with multiple rectsAndreas Rheinhardt
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>
2021-12-02avcodec/movtextenc: Check for too long subtitlesAndreas Rheinhardt
Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-02avcodec/movtextenc: Reset AVBPrint at the beginning, not end of encodingAndreas Rheinhardt
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>
2021-12-02avcodec/movtextenc: Fix infinite loop due to variable truncationAndreas Rheinhardt
Regression since af043b839c38e850af1184fd6be691f8475c048e. Fixes ticket #9409. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-01avcodec/vp3: Check version in all cases when VP4 code is not builtMichael Niedermayer
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>
2021-12-01avcodec/gemdec: Check tag & planes before image allocationMichael Niedermayer
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>
2021-12-01avcodec: [loongarch] Optimize decode_significance/_8x8_loongarch.Hao Chen
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>
2021-12-01avcodec: [loongarch] optimize get_cabac.Shiyou Yin
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>
2021-12-01avcodec/vaapi_encode: Fix segfault upon closing uninitialized encoderAndreas Rheinhardt
Fixes ticket #9537. Probably a regression since 2b3206891649f317c20993411efef4bee39ae784. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-30avcodec/qsvenc: Properly flush the FIFO on closeAndreas Rheinhardt
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>
2021-11-30avcodec/qsvenc: Fix leak of A53 dataAndreas Rheinhardt
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>
2021-11-30avcodec/qsvenc: Fix leak and crash when encoding H.264 due to A53_CCAndreas Rheinhardt
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>
2021-11-29avcodec/iff: limit written bytes to twice the output array size in ↵Michael Niedermayer
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>
2021-11-29avcodec/vqavideo: Use GetByteContext and check for endMichael Niedermayer
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>
2021-11-29avcodec/videotoolbox: silence some -Wimplicit-fallthrough warningsJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2021-11-29lavc/videotoolbox: fix build on pre-10.14 SDKsrcombs
Also fixes handling of future codec tags (needed to bswap)
2021-11-29lavc: bump minor version for new VT hwaccelsrcombs
2021-11-29lavc/proresdec: add videotoolbox hwaccelrcombs
2021-11-29lavc/proresdec: add scaffolding for hwdec supportrcombs
2021-11-29videotoolbox: add alpha supportrcombs
2021-11-29lavc/videotoolbox: add VP9 hardware accelerationrcombs
On M1 Max, this supports profiles 0 and 2, but not 1 and 3.
2021-11-29lavc/videotoolbox: call VTRegisterSupplementalVideoDecoderIfAvailablercombs
This is required for VP9 to work.
2021-11-29lavc/videotoolbox: expose some functions as lavc-internalrcombs
2021-11-29lavc/hevcdec: support all color formats in videotoolbox hwaccelrcombs
2021-11-29lavc/h264dec: support all color formats in videotoolbox hwaccelrcombs
2021-11-29lavc/videotoolbox: select 4:2:2 and 4:4:4 formats when applicablercombs
2021-11-29lavc/videotoolbox: fix format computationrcombs
Use sw_pix_fmt instead of pix_fmt (consistent with other hwaccels)