aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/bsf
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/bsf/dts2pts: use a RefStruct pool to allocate nodesJames Almer2024-09-161-4/+12
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/filter_units: Fix extradata and packets can have different bitstream ↵Zhao Zhili2024-08-241-1/+4
| | | | | | | | | | format Filter init can change extradata from avcc/hvcc to annexb format. With different passthrough logic, packets can still in avcc/hvcc format. Use same passthrough logic for init and filter. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avcodec/h2645_parse: replace three bool arguments in ff_h2645_packet_split ↵James Almer2024-08-191-1/+1
| | | | | | with a single flags one Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/bsf/dovi_rpu: add new bitstream filterNiklas Haas2024-08-162-0/+286
| | | | | This can be used to strip dovi metadata, or enable/disable dovi metadata compression. Possibly more use cases in the future.
* bsf/media100_to_mjpegb: Clear output buffer paddingMichael Niedermayer2024-08-141-0/+1
| | | | | | | | Fixes: use-of-uninitialized-value Fixes: 70855/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MEDIA100_fuzzer-5537446610141184 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h264_mp4toannexb: Prepend SPS/PPS to buffering period SEIJosh Allmann2024-08-141-0/+15
| | | | | | | | | | | | | Encoders may emit a buffering period SEI without a corresponding SPS/PPS if the SPS/PPS is carried out-of-band, eg with avcc. During Annex B conversion, this may result in the SPS/PPS being inserted *after* the buffering period SEI but before the IDR NAL. Since the buffering period SEI references the SPS, the SPS/PPS needs to come first. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avcodec/bsf/showinfo: print packet data checksumJames Almer2024-07-131-1/+5
| | | | | Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h265_metadata: Add options to set width/height after cropZhao Zhili2024-06-071-3/+98
| | | | | | | | | | It's a common usecase to request a video size after crop. Before this patch, user must know the video size before crop, then set crop_right/crop_bottom accordingly. Since HEVC can have different CTU size, it's not easy to get/deduce the video size before crop. With the new width/height options, there is no such requirement. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* lavc/hevc*: move to hevc/ subdirAnton Khirnov2024-06-044-4/+8
|
* avcodec/adts_header: Add ff_adts_header_parse_buf()Andreas Rheinhardt2024-05-201-4/+2
| | | | | | | | | | | | Most users of ff_adts_header_parse() don't already have an opened GetBitContext for the header, so add a convenience function for them. Also use a forward declaration of GetBitContext in adts_header.h as this avoids (implicit) inclusion of get_bits.h in some of the users that now no longer use a GetBitContext of their own. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/bsf/dts2pts: Fix shadowingAndreas Rheinhardt2024-05-131-2/+2
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Revert "bsf: use standard include paths"Anton Khirnov2024-04-1044-184/+186
| | | | | | | This reverts commit 41b73ae883ec2a70c814e394de0e5ae5f1f13e87. This patch was pushed extremely quickly, without giving developers the time to object.
* bsf: use standard include pathsAndrew Kelley2024-04-0944-186/+184
| | | | | | | | | | | | | | Removes the special -I flag specified in the avcodec/bsf/ subdirectory. This makes code copy-pastable to other parts of the ffmpeg codebase, as well as simplifying the build script. It also reduces ambiguity, since there are many instances of same-named header files existing in both libavformat/ and libavcodec/ subdirectories. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/common: Don't auto-include mem.hAndreas Rheinhardt2024-03-316-1/+6
| | | | | | | | | | | There are lots of files that don't need it: The number of object files that actually need it went down from 2011 to 884 here. Keep it for external users in order to not cause breakages. Also improve the other headers a bit while just at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264_mp4toannexb: Fix heap buffer overflowZhao Zhili2024-03-271-13/+46
| | | | | | | | | | | | | Fixes: out of array write Fixes: 64407/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_MP4TOANNEXB_fuzzer-4966763443650560 mp4toannexb_filter counts the number of bytes needed in the first pass and allocate the memory, then do memcpy in the second pass. Update sps/pps size in the loop makes the count invalid in the case of SPS/PPS occur after IDR slice. This patch process in-band SPS/PPS before the two pass loops. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avcodec/bsf/pcm_rechunk: add some more supported PCM formatsMarton Balint2024-03-141-1/+19
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/bsf/pcm_rechunk: reorder supported codec listMarton Balint2024-03-141-10/+10
| | | | | | Use lexical order. Signed-off-by: Marton Balint <cus@passwd.hu>
* fix /// comments that should be ///<Andrew Sayers2024-03-041-12/+12
| | | | | | Actual command: sed -i -e "s/\([;,] *\)<* *\/\/\/ *<* */\1\/\/\/< /" $( git grep -l "[;,] */// " ) Signed-off-by: Andrew Sayers <ffmpeg-devel@pileofstuff.org>
* avcodec/bsf/mp3_header_decompress: Remove BSFAndreas Rheinhardt2024-03-022-131/+0
| | | | | | | | | | | | | | | | | This BSF is supposed to be used in conjunction with mp3_header_compress, which has been removed more than ten years ago in commit c6080d89009056530119ab794ad02e4d515c7754. It mangled the headers by removing the CRC field as well as fields that are supposed to stay constant for the entirety of a stream (which are put into extradata). This made these files unplayable; they need to be decompressed with the BSF first (which does not happen automatically). Even in this case the CRC does not get restored. I am not aware that such compressed files exist at all; therefore this commit removes the BSF completely. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* all: use designated initializers for AVOption.unitAnton Khirnov2024-02-1410-64/+64
| | | | | | | | | | | | | | | | | | | | | | | | Makes it robust against adding fields before it, which will be useful in following commits. Majority of the patch generated by the following Coccinelle script: @@ typedef AVOption; identifier arr_name; initializer list il; initializer list[8] il1; expression tail; @@ AVOption arr_name[] = { il, { il1, - tail + .unit = tail }, ... }; with some manual changes, as the script: * has trouble with options defined inside macros * sometimes does not handle options under an #else branch * sometimes swallows whitespace
* avcodec/hevc_mp4toannexb: more validations for nalu_lenNuo Mi2024-02-111-2/+4
| | | | | For a corrupted stream, the value of nalu_len read from the extradata is not reliable. We need to perform additional checks
* avcodec/vvc_mp4toannexb: more validations for nalu_lenNuo Mi2024-02-111-3/+4
| | | | | | | | | | | | For a corrupted stream, the value of nalu_len read from the extradata is not reliable. We need to perform additional checks Fixes: fuzzer timeout Fixes: 65253/clusterfuzz-testcase-minimized-ffmpeg_BSF_VVC_MP4TOANNEXB_fuzzer-4972412487467008 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/bsf: add a showinfo filterAnton Khirnov2024-02-022-0/+64
| | | | | Analogous to the (a)showinfo lavfi filters, logs basic packet information. Mainly useful for debugging/testing/development.
* avcodec: move leb reading functions to its own headerJames Almer2024-01-311-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lavc: move bitstream filters into bsf/ subdirAnton Khirnov2024-01-2944-0/+9325