aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/video_enc_params.c
Commit message (Collapse)AuthorAgeFilesLines
* lavu/video_enc_params: Avoid relying on an undefined C constructMartin Storsjö2023-01-311-5/+5
| | | | | | | | | | | | | | | | | | | | | The construct of using offsetof on a (potentially anonymous) struct defined within the offsetof expression, while supported by all current compilers, has been declared explicitly undefined by the C standards committee [1]. Clang recently got a change to identify this as an issue [2]; initially it was treated as a hard error, but it was soon after softened into a warning under the -Wgnu-offsetof-extensions option (not enabled automatically as part of -Wall though). Nevertheless - in this particular case, it's trivial to fix the code not to rely on the construct that the standards committee has explicitly called out as undefined. [1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm [2] https://reviews.llvm.org/D133574 Signed-off-by: Martin Storsjö <martin@martin.st>
* Remove unnecessary libavutil/(avutil|common|internal).h inclusionsAndreas Rheinhardt2022-02-241-2/+0
| | | | | | | | | | Some of these were made possible by moving several common macros to libavutil/macros.h. While just at it, also improve the other headers a bit. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavu/video_enc_params: make sure blocks are properly alignedAnton Khirnov2021-06-101-3/+7
|
* avutil/buffer: Switch AVBuffer API to size_tAndreas Rheinhardt2021-04-271-4/+0
| | | | | | | Announced in 14040a1d913794d9a3fd6406a6d8c2f0e37e0062. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/video_enc_params: Check for truncation before creating bufferAndreas Rheinhardt2021-02-191-0/+4
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avutil/video_enc_params: Combine overflow checksAndreas Rheinhardt2021-02-191-2/+1
| | | | | | | | | | | This patch also fixes a -Wtautological-constant-out-of-range-compare warning from Clang and a -Wtype-limits warning from GCC on systems where size_t is 64bits and unsigned 32bits. The reason for this seems to be that variable (whose value derives from sizeof() and can therefore be known at compile-time) is used instead of using sizeof() directly in the comparison. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* libavutil: add API for exporting video frame quantizersJuan De León2020-05-121-0/+79
This is intended to replace the deprecated the AV_FRAME_DATA_QP_TABLE* API and extend it to a wider range of codecs. In the future, it may also be extended to support other encoding parameters such as motion vectors. Additional changes by Anton Khirnov <anton@khirnov.net> with suggestions by Lynne <dev@lynne.ee>. Signed-off-by: Juan De León <juandl@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Anton Khirnov <anton@khirnov.net>