- 22 Mar, 2024 26 commits
-
-
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>
-
Andreas Rheinhardt authored
More exactly: Not more than one stream of each type for which a default codec (i.e. AVOutputFormat.(audio|video|subtitle)_codec) is set; for those types for which no such codec is set (or for which no designated default codec in AVOutputFormat exists at all) no streams are permitted. Given that with this flag set the default codecs become more important, they are now set explicitly to AV_CODEC_ID_NONE for "unset"; the earlier code relied on AV_CODEC_ID_NONE being equal to zero, so that default static initialization set it accordingly; but this is not how one is supposed to use an enum. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
This test muxes two streams into a single pcm file, although the two streams are of course not recoverable from the output (unless one has extra information). So use the streamhash muxer instead (which also provides coverage for it; it was surprisingly unused in FATE so far). This is in preparation for actually enforcing a limit of one stream for the PCM muxers. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
If AVOutputFormat.video_codec, audio_codec or subtitle_codec is AV_CODEC_ID_NONE, it means that there is no default codec for this format and not that it is supported to mux AV_CODEC_ID_NONE. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Avoids one #if. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
It better reflects that this is a muxer-only flag. Also document the flag. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
(AVStream did not have an AVClass when this muxer was added.) Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Signal that anything except MP3 and the ID3V2 attached pic types are forbidden. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Also use sizeof of the proper type, namely sizeof(**sd) and not sizeof(*sd). Reviewed-by:
Jan Ekström <jeebjp@gmail.com> Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
av_frame_side_data_get() has a const AVFrameSideData * const *sd parameter; so calling it with an AVFramesSideData **sd like AVCodecContext.decoded_side_data (or with a AVFramesSideData * const *sd) is safe, but the conversion is not performed automatically in C. All users of this function therefore resort to a cast. This commit changes this: av_frame_side_data_get() is renamed to av_frame_side_data_get_c(); furthermore, a static inline wrapper for it name av_frame_side_data_get() is added that accepts an AVFramesSideData * const * and converts this to const AVFramesSideData * const * in a Wcast-qual safe way. This also allows to remove the casts from the current users. Reviewed-by:
Jan Ekström <jeebjp@gmail.com> Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Reviewed-by:
Jan Ekström <jeebjp@gmail.com> Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
The latter need not be save, because av_log() expects to get a pointer to an AVClass-enabled structure and not only a fake object. If this function were actually be called in the following way: const AVClass *avcl = avctx->av_class; handle_mdcv(&avcl, ); the AVClass's item_name would expect to point to an actual AVCodecContext, potentially leading to a segfault. Reviewed-by:
Jan Ekström <jeebjp@gmail.com> Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
This code uses the AVBPrint API for exactly one av_bprintf() in a scenario in which a good upper bound for the needed size of the buffer is available (with said upper bound being much smaller than sizeof(AVBPrint)). So one can simply use snprintf() instead. This also avoids the (always-false due to the current size of the internal AVBPrint buffer) check for whether the AVBPrint is complete. Furthermore, the old code used AV_BPRINT_SIZE_AUTOMATIC which implies that the AVBPrint buffer will never be (re)allocated and yet it used av_bprint_finalize(). This has of course also been removed. Reviewed-by:
Jan Ekström <jeebjp@gmail.com> Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Reviewed-by:
Jan Ekström <jeebjp@gmail.com> Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Reviewed-by:
Zhao Zhili <quinkblack@foxmail.com> Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Andreas Rheinhardt authored
Unnecessary since 67e7f0b0 as there are no longer two opaque fields. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Niklas Haas authored
Otherwise the last VDR would never get copied.
-
Niklas Haas authored
-
Zhao Zhili authored
Signed-off-by:
Zhao Zhili <zhilizhao@tencent.com>
-
Zhao Zhili authored
AVCodecContext extradata should be an AVCDecoderConfigurationRecord when bitstream format is avcc. Simply concatenating the NALUs output by x264_encoder_headers does not form a standard AVCDecoderConfigurationRecord. The following cmd generates broken file before the patch: ffmpeg -i foo.mp4 -c:v libx264 -x264-params annexb=0 bar.mp4 Signed-off-by:
Zhao Zhili <zhilizhao@tencent.com>
-
Zhao Zhili authored
Many users mistakenly think that hwaccel is an instance of a decoder, and cannot find the corresponding decoder name in the logs. Log hwaccel name so user know hwaccel has taken effect. Signed-off-by:
Zhao Zhili <zhilizhao@tencent.com>
-
Andreas Rheinhardt authored
When the compiler chooses to inline put_amf_string(pb, ""), the avio_write(pb, "", 0) can be avoided. Happens with Clang-17 with -O1 and higher and GCC 13 with -O2 and higher here. Signed-off-by:
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
- 21 Mar, 2024 4 commits
-
-
James Almer authored
These were defined in a way compatible with the Vulkan HEVC acceleration, which expects bitmasks, yet the fields were being overwritting on each loop with the latest read value. Signed-off-by:
James Almer <jamrial@gmail.com>
-
James Almer authored
Fixes: timeout Fixes: 64033/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5332101272305664 Signed-off-by:
James Almer <jamrial@gmail.com>
-
James Almer authored
Fixes: null pointer derference Fixes: 67007/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-6522819204677632 Tested-by:
Michael Niedermayer <michael@niedermayer.cc> Signed-off-by:
James Almer <jamrial@gmail.com>
-
James Almer authored
Signed-off-by:
James Almer <jamrial@gmail.com>
-
- 20 Mar, 2024 10 commits
-
-
James Almer authored
Signed-off-by:
James Almer <jamrial@gmail.com>
-
James Almer authored
While ensuring it's at least C11, the minimum supported version. Also, enforce C11 on the host compiler, same as we already do for C11 on the target compiler. Tested-by:
Michael Niedermayer <michael@niedermayer.cc> Signed-off-by:
James Almer <jamrial@gmail.com>
-
Jan Ekström authored
The newer of these two are the separate integers for content light level, introduced in 3952bf3e98c76c31594529a3fe34e056d3e3e2ea , with X265_BUILD 75. As we already require X265_BUILD of at least 89, no further conditions are required.
-
Jan Ekström authored
Both of these two structures were first available with X264_BUILD 163, so make relevant functionality conditional on the version being at least such. Keep handle_side_data available in all cases as this way X264_init does not require additional version based conditions within it. Finally, add a FATE test which verifies that pass-through of the MDCV/CLL side data is working during encoding.
-
Jan Ekström authored
These two were added in 28e23d7f348c78d49a726c7469f9d4e38edec341 and 3558c1f2e97455e0b89edef31b9a72ab7fa30550 for version 0.9.0 of SVT-AV1, which is also our minimum requirement right now. In other words, no additional version limiting conditions seem to be required. Additionally, add a FATE test which verifies that pass-through of the MDCV/CLL side data is working during encoding.
-
Jan Ekström authored
This enables further configuration of output based on the results of input decoding and filtering in a similar manner as the color information.
-
Jan Ekström authored
This allows configuring an encoder by using AVFrameSideData.
-
Jan Ekström authored
-
Jan Ekström authored
-
Jan Ekström authored
-