- 10 Aug, 2023 5 commits
-
-
Andreas Rheinhardt authored
The AVBPrint API guarantees that the string buffer is always zero-terminated; in order to honour this guarantee, there obviously must be a string buffer at all and it must have a size >= 1. Therefore av_bprint_init_for_buffer() treats passing a NULL buffer or size == 0 as invalid data that leads to undefined behaviour, namely NPD in case NULL is provided or a write to a buffer of size 0 in case size == 0. But it would be easy to support this, namely by using the internal buffer with AV_BPRINT_SIZE_COUNT_ONLY in case size == 0. There is a reason to allow this: Several functions like av_channel_(description|name) are actually wrappers around corresponding AVBPrint functions. They accept user provided buffers and are supposed to return the required size of the buffer, which would allow the user to call it once to get the required buffer size and call it once more after having allocated the buffer. If av_bprint_init_for_buffer() treats size == 0 as invalid, all these users would need to check for this themselves and basically add the same codeblock that this patch adds to av_bprint_init_for_buffer(). This change is in line with e.g. snprintf() which also allows the pointer to be NULL in case size is zero. This fixes Coverity issues #1503074, #1503076 and #1503082; all of these issues are about providing NULL to the channel-layout functions that are wrappers around AVBPrint versions. Reviewed-by:
Nicolas George <george@nsup.org> Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Reviewed-by:
Nicolas George <george@nsup.org> Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
The demuxer uses a extradata offset of 26, so we would need to recreate the missing 26 bytes somehow in the muxer, but we just don't. Remuxed files (like real/rv30.rm from the FATE-suite) don't work due to missing extradata. (The extradata offset also applies to RV40 and the extradata is indeed lost upon remuxing, yet remuxing real/spygames-2MB.rmvb works; our RV40 decoder does not use extradata at all.) Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
RV10 and RV20 are unsupported because creating the correct CodecPrivate is unsupported (the demuxer uses a codecpriv_offset of 26, so one would need to recreate the missing 26 bytes); COOK and SIPR are unsupported, because Matroska uses a packetization mode that is different from what FFmpeg uses in its packets (see matroska_parse_rm_audio() in the demuxer). Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Provides coverage for the code transforming the ALAC extradata. Also set creation_time metadata to test this, too. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
- 09 Aug, 2023 3 commits
-
-
Andreas Rheinhardt authored
bda44f0f added code that potentially added another BlockMore master and BlockAdditional data as well as BlockAddID number, yet it bumped the number of EBML elements by four instead of only three. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Matroska supports orthogonal transformations (both pure rotations as well as reflections) via its 3D-projection elements, namely ProjectionPoseYaw (for a horizontal reflection) as well as ProjectionPoseRoll (for rotations). This commit adds support for this. Support for this in the demuxer has been added in 937bb6bb and the sample used in the matroska-dovi-write-config8 FATE-test includes a displaymatrix indicating a rotation which is now properly written and read, thereby providing coverage for the relevant code in the muxer as well as the demuxer. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Note: There is a slight difference in the handling of the max_file_size option: The earlier code used it to mean to limit the size of the buffer to allocate; the new code treats it more literally as maximum size to read from the input. Reviewed-by:
Nicolas George <george@nsup.org> Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
- 08 Aug, 2023 8 commits
-
-
Andreas Rheinhardt authored
This is a bit cleaner as int need not be the underlying type of an enum if a smaller type can hold all its values. Also declare the children_ids array as const as it never changes. Reviewed-by:
Stefano Sabatini <stefasab@gmail.com> Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Marton Balint authored
Also rename the contexts and the functions so their names will reflect their intended size. With the earlier patch this fixes the audio corruption regression caused by 6ba0aa17. Fixes ticket #10029. Signed-off-by:
Marton Balint <cus@passwd.hu>
-
Marton Balint authored
Improves the audio corruption regression caused by 6ba0aa17 reported in ticket #10029. There is still however a noticable audio glitch, so the FFT conversion to AVTX probably also needs some modifications. Signed-off-by:
Marton Balint <cus@passwd.hu>
-
Paul B Mahol authored
Move some code out of inner loop.
-
Casey Smalley authored
This patch changes the return instruction in the tr_32x4 macro from BR to RET. Function returns should always use the RET instruction instead of BR, to avoid interfering with branch prediction. On devices that support BTI, this is observeable as a landing pad is required when branching with BR. The change fixes fate-hevc-hdr-vivid-metadata when on hardware with BTI support. Signed-off-by:
Casey Smalley <casey.smalley@arm.com> Signed-off-by:
Martin Storsjö <martin@martin.st>
-
Elias Carotti authored
Pass the information about unchanged parts of the frame by means of the AVVideoHint side data.
-
Elias Carotti authored
Add side data type to provide hint to the video encoders about unchanged portions of each frame. Signed-off-by:
Anton Khirnov <anton@khirnov.net>
-
Benjamin Cheng authored
The Vulkan spec wants ScalingList8x8 as defined by ITU spec, which is in a different order from how ffmpeg parses it.
-
- 07 Aug, 2023 15 commits
-
-
Brad Smith authored
Signed-off-by:
Michael Niedermayer <michael@niedermayer.cc>
-
Paul B Mahol authored
-
Paul B Mahol authored
-
Paul B Mahol authored
-
Paul B Mahol authored
-
Andreas Rheinhardt authored
This commit is the AVHWAccel analogue of commit 20f97270: It moves the private fields of AVHWAccel to a new struct FFHWAccel extending AVHWAccel in an internal header (namely hwaccel_internal.h). Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
All usages of ff_hwaccel_frame_priv_alloc() have the same pattern: Check for whether a hwaccel is in use; check whether it needs private frame-specific data; allocate the AVBuffer and set it. This commit modifies ff_hwaccel_frame_priv_alloc() to perform this task on its own. (It also seems that the H.264 decoder did not perform proper cleanup in case the buffer could not be allocated. This has been changed.) Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
libavcodec/hwconfig.h currently contains HWACCEL_CAP_* flags as well as the definition of AVCodecHWConfigInternal and some macros to create them. The users of these two are nearly disjoint: The flags are used by files providing AVHWAccels whereas AVCodecHWConfigInternal is used by files providing codecs (for FFCodec.hw_configs). This patch therefore moves these flags to a new file hwaccel_internal.h. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
While just at it, also improve the other headers a bit. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
A filter needs formats.h iff it uses FILTER_QUERY_FUNC(); since lots of filters have been switched to use something else than FILTER_QUERY_FUNC, they don't need it any more, but removing this header has been forgotten. This commit does this; files with formats.h inclusion went down from 304 to 139 here (it were 449 before the preceding commit). While just at it, also improve the other headers a bit. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
internal.h doesn't rely on it; instead include it directly in every user that needs it (a filter needing it is basically equivalent to it using FILTER_QUERY_FUNC, i.e. a majority of filters doesn't need it). Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
This file is only used by the greyedge filter and therefore only compiled if said filter is enabled. This also allows to remove a config_components.h inclusion, avoiding unnecessary rebuilds. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Lots of video filters use a very simple input or output: An array with a single AVFilterPad whose name is "default" and whose type is AVMEDIA_TYPE_VIDEO; everything else is unset. Given that we never use pointer equality for inputs or outputs*, we can simply use a single AVFilterPad instead of dozens; this even saves .data.rel.ro (8312B here) as well as relocations. *: In fact, several filters (like the filters in vf_lut.c) already use the same outputs; furthermore, ff_filter_alloc() duplicates the input and output pads so that we do not even work with the pads directly. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
internal.h does not depend on video.h (and should not depend on it) and therefore should not include video.h at all; instead all users of video.h should include it directly. Doing so also avoids unnecessary video.h inclusions in files that don't need it, like most audio filters. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Lots of audio filters use very simple inputs or outputs: An array with a single AVFilterPad whose name is "default" and whose type is AVMEDIA_TYPE_AUDIO; everything else is unset. Given that we never use pointer equality for inputs or outputs*, we can simply use a single AVFilterPad instead of dozens; this even saves .data.rel.ro (4784B here) as well as relocations. *: In fact, several filters (like the filters in af_biquads.c) already use the same inputs; furthermore, ff_filter_alloc() duplicates the input and output pads so that we do not even work with the pads directly. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
- 06 Aug, 2023 2 commits
-
-
Zhao Zhili authored
Signed-off-by:
Zhao Zhili <zhilizhao@tencent.com>
-
Zhao Zhili authored
bits_per_raw_sample might not set when remux raw PCM. Fix #10433. Signed-off-by:
Zhao Zhili <zhilizhao@tencent.com>
-
- 05 Aug, 2023 7 commits
-
-
Michael Niedermayer authored
Code should make more sense now Fixes: out of array access Fixes: 58299/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-6627570448465920 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegReviewed-by:
Pierre-Anthony Lemieux <pal@sandflow.com> Signed-off-by:
Michael Niedermayer <michael@niedermayer.cc>
-
Andreas Rheinhardt authored
Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Namely proresenc_anatoliy.c. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Namely h264_slice.c. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
h264_sei.h is no longer used since the SEIs were moved to sei.h; this also avoids inclusions of avcodec.h and bytestream.h. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Possible since 28505848. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-