- 24 Mar, 2024 7 commits
-
-
Andreas Rheinhardt authored
C11 provides static assertions via _Static_assert and provides static_assert as a convenience define for this in assert.h. Our codebase uses the latter, as _Static_assert has actually already been deprecated in C23. Not all toolchains that declare support for C11 actually support it; e.g. MSVC 19.27 does not support _Static_assert, but somehow supports static_assert. MSVC 19.27 admits to be a "preview implementation of the ISO C11 standard", so this is not surprising (MSVC 19.28 does not come with this caveat). Furthermore some FATE boxes [1] use old GCC toolchains (with only experimental support for C11) where _Static_assert is supported, but assert.h does not provide the fallback define. They are broken since the first usage of static_assert. This commit therefore checks whether static_assert and _Static_assert work with assert.h included; if not, configure errors out. This intentionally drops support for MSVC 19.27. Users like the old FATE boxes above can still add -Dstatic_assert=_Static_assert to cflags as a workaround if desired. [1]: https://fate.ffmpeg.org/report.cgi?time=20240321123620&slot=sh4-debian-qemu-gcc-4.7Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Otherwise these statements might be torn apart by av_logs from other threads. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
It has been moved after "st = s->streams[pkt->stream_index]" in b140b833. Deduplicate ff_read_packet() and ff_buffer_packet() while fixing this. This also fixes shadowing in ff_read_packet(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Leo Izen authored
The continue statement will break out of the do/while loop, not the outer loop as intended. This is one (compound) statement anyway, so we can remove the do/while entirely. Signed-off-by: Leo Izen <leo.izen@gmail.com>
-
Leo Izen authored
These variables are never read from, so they trigger -Wunused-variables Signed-off-by: Leo Izen <leo.izen@gmail.com>
-
Henrik Gramner authored
Make things up-to-date with upstream. https://code.videolan.org/videolan/x86inc.asm
-
Henrik Gramner authored
x86inc.asm adds defines for <argument_name>{b,w,d,q} which clashes with the nasm d{b,w,d,q} pseudo-instructions for writing initialized data.
-
- 23 Mar, 2024 28 commits
-
-
Niklas Haas authored
Following the usual logic for H.274 film grain.
-
Niklas Haas authored
I restricted this SEI to HEVC for now, until I see a H.264 sample.
-
Niklas Haas authored
Based on the AOMedia Film Grain Synthesis 1 (AFGS1) spec: https://aomediacodec.github.io/afgs1-spec/ The parsing has been changed substantially relative to the AV1 film grain OBU. In particular: 1. There is the possibility of maintaining multiple independent film grain parameter sets, and decoders/players are recommended to pick the one most appropriate for the intended display resolution. This could also be used to e.g. switch between different grain profiles without having to re-signal the appropriate coefficients. 2. Supporting this, it's possible to *predict* the grain coefficients from previously signalled parameter sets, transmitting only the residual. 3. When not predicting, the parameter sets are now stored as a series of increments, rather than being directly transmitted. 4. There are several new AFGS1-exclusive fields. I placed this parser in its own file, rather than h2645_sei.c, since nothing in the generic AFGS1 film grain payload is specific to T.35, and to compartmentalize the code base.
-
Niklas Haas authored
Implementation copied wholesale from dav1d, sans SIMD, under permissive license. This implementation was extensively verified to be bit-exact, so it serves as a much better starting point than trying to re-engineer this from scratch for no reason. (I also authored the original implementation in dav1d, so any "clean room" implementation would end up looking much the same, anyway) The notable changes I had to make while adapting this from the dav1d code-base to the FFmpeg codebase include: - reordering variable declarations to avoid triggering warnings - replacing several inline helpers by avutil equivalents - changing code that accesses frame metadata - replacing raw plane copying logic by av_image_copy_plane Apart from this, the implementation is basically unmodified.
-
Niklas Haas authored
Common utility function that can be used by all codecs to select the right (any valid) film grain parameter set. In particular, this is useful for AFGS1, which has support for multiple parameters. However, it also performs parameter validation for H274.
-
Niklas Haas authored
To allow for AFGS1 usage, which can expose multiple parameter sets for a single frame.
-
Niklas Haas authored
Not directly signalled by AV1, but we should still set this accordingly so that users will know what the original intended video characteristics and chroma resolution were.
-
Niklas Haas authored
Not directly signalled by AV1, but we should still set this accordingly so that users will know what the original intended video characteristics and chroma resolution were.
-
Niklas Haas authored
H.274 specifies that film grain parameters are signalled as intended for 4:4:4 frames, so we always signal this, regardless of the frame's actual subsampling.
-
Niklas Haas authored
Follow the establish convention of printing the bit depth metadata per-component.
-
Niklas Haas authored
-
Niklas Haas authored
-
Niklas Haas authored
This is needed for AV1 film grain as well, when using AFGS1 streams. Also add extra width/height and subsampling information, which AFGS1 cares about, as part of the same API bump. (And in principle, H274 should also expose this information, since it is needed downstream to correctly adjust the chroma grain frequency to the subsampling ratio) Deprecate the equivalent H274-exclusive fields. To avoid breaking ABI, add the new fields after the union; but with enough of a paper trail to hopefully re-order them on the next bump.
-
Jun Zhao authored
small cleanup for style, redundant semicolons, goto labels, in FFmpeg, we put goto labels at brace level. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
-
Michael Niedermayer authored
Fixes: out of array access Fixes: 67021/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4883576579489792 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
Anton Khirnov authored
Fixes fate-ffmpeg-loopback-decoding with THREADS=random*
-
Leo Izen authored
avpkt->pos needs to be set for generic indexing or features such as the stream_loop option will not work. Co-authored-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Leo Izen <leo.izen@gmail.com>
-
Wenbin Chen authored
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
-
Stefano Sabatini authored
-
Stefano Sabatini authored
-
Stefano Sabatini authored
-
Stefano Sabatini authored
-
Matthieu Bouron authored
Delete{Global,Local}Ref already handle NULL.
-
Matthieu Bouron authored
Reduces a bit the horizontal spacing.
-
Matthieu Bouron authored
Delete{Global,Local}Ref() already handle NULL.
-
Matthieu Bouron authored
-
Matthieu Bouron authored
Handles Android content URIs starting with content://.
-
Matthieu Bouron authored
This will allow users to pass the Android ApplicationContext which is mandatory to retrieve the ContentResolver responsible to resolve/open Android content URIS.
-
- 22 Mar, 2024 5 commits
-
-
Andreas Rheinhardt authored
Also mark them as av_cold while just at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
E.g. chromaprint expects to be fed 16bit signed PCM in native endianness, yet there was no check for this. Similarly for other muxers. Use the new FF_OFMT_FLAG_ONLY_DEFAULT_CODECS to enfore this where appropriate, e.g. for pcm/raw muxers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
AVOutputFormat has default codecs for audio, video and subtitle and often these are the only codecs of this type allowed. So add a flag to AVOutputFormat so that this can be checked generically. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Several muxers (e.g. pcm muxers) did not check the number of streams even though the individual streams were not recoverable from the muxed files. This commit changes this by using the FF_OFMT_MAX_ONE_OF_EACH flag where appropriate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-