1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00
Commit Graph

119439 Commits

Author SHA1 Message Date
6995372ea2 doc/filters: Fix video size of mptestsrc
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-16 19:33:55 +08:00
058d49b168 Revert "lavf/id3v2dec: support multiple values and TIPL frames"
see: Re: [FFmpeg-devel] [PATCH 2/2] avformat/id3v2: Check that decode_str() did advance

but in short, first our API since 16years says we dont have multiple values per key
(which it supports since 9 years only)

and it causes some problems for ffprobe apparently.
I do believe the original patch is the correct direction but it requires
more changes. So revert this until other things are in place and until
we have a consensus.

This reverts commit 80b77e8e8d.
2025-04-16 13:09:05 +02:00
cf7dfddee4 avformat/rtpdec_mpeg4: add need_parsing for rtsp AAC
fix ticket #11531

the rtsp aac did not marked keyframe which cannot easy copy to output.
because f265f9c9d0 commit change the AAC props to match xHE-AAC.
in some formats like MOV, need_parsing is set, so AAC can be still parsed be keyframe
but rtsp did not, so this patch add it

Signed-off-by: Jack Lau <jacklau1222@qq.com>
Reviewed-by: Zhao Zhili <quinkblack@foxmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-16 13:09:04 +02:00
935a52c887 avcodec/ffv1enc: Use version 3 by default (CRCs by default)
Version 3 is since 2013 (FFmpeg 2.1) non experimental so should be widely supported

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-16 13:09:04 +02:00
0c28059b81 avcodec/ffv1enc: avoid repeating the same warning forever
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-16 13:09:04 +02:00
c818c67991 libpostproc: deprecate the AMD 3DNow! define
It was left unreferenced in 1f0948272a.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-16 13:09:03 +02:00
1946b7875c avformat/id3v2: Print the unknown encoding
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-16 13:09:03 +02:00
979608dde7 configure: Clearer documentation for "disable-safe-bitstream-reader"
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-16 13:09:03 +02:00
2fedb29780 avformat/fifo: Check for keyframe video type before stop dropping
The current behavior when using restart_with_keyframe is that it will
recover if it also encounters any audio packet, as they are flagged as a
keyframe.

The expectation is that packets are dropped until the next _video_
keyframe.

To fix that, check if exists a video stream, if it exists check the
packet stream codec type, only letting it recover when it is a video
one. If there is no video stream, resume to the original behavior, not
checking the codec type.

Fixes ticket: #11467

Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-16 13:09:02 +02:00
50910c32c5 tools: Fix deprecation warning in patcheck
GNU apparently deprecated their egrep alias, replace it with 'grep -E'
to avoid getting flooded with deprecation warnings.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-16 13:09:02 +02:00
a888975a3c fftools/textformat/avtextformat: Make close functions return void
Just like normal close functions.

Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-16 06:13:13 +02:00
37635d31cb fftools/textformat/avtextformat: Add missing AVERROR()
Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-16 06:13:03 +02:00
f873734f84 fftools/textformat/avtextformat: Initialize stuff earlier
avtext_context_close() calls av_opt_free() on an AVTextFormatContext
as well as av_bprint_finalize() on the containing section_pbuf
AvBPrints, yet it can happen that the AVBPrints have not been
initialized (only zeroed) and that av_opt_set_defaults() has
not been called. This works, but it is not really documented to do so.
So ensure that the options and the AVBPrints have been initialized
when avtext_context_close() is called.

Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-16 06:12:54 +02:00
50ef4b2a6b fftools/textformat/avtextformat: Fix segfault upon allocation error
Would happen if an AVTextFormatContext's private context
could not be allocated.

Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-16 06:12:48 +02:00
7ee7632cb8 fftools/textformat/avtextformat: Fix segfault upon allocation error
Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-16 06:12:41 +02:00
b9450583bc textformat/tw_avio: Remove close_on_uninit param from create_file
avtextwriter_create_file() creates an AVIOContext whose pointer
resides in its private context. If it were not always closed on
uninit, the AVIOContext would leak, so it makes no sense
to have this parameter.

Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-16 06:12:09 +02:00
f73badbf47 fftools/textformat/tw_avio: Use avio_closep()
Avoids leaving dangling pointers behind.

Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-16 06:12:05 +02:00
79fa31d159 fftools/textformat/tw_avio: Don't flush unnecessarily
avio_close() automatically flushes the AVIOContext.

Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-16 06:11:58 +02:00
395c91347f fftools/textformat/tw_avio: Remove unused private class
This AVTextWriter does not have any options.

Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-16 06:11:52 +02:00
c9dc6ca02b fftools/textformat: Use "", not <> for lavu headers
Also remove unused headers.

Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-16 06:11:45 +02:00
2ab1021264 fftools/textformat/avtextformat: Simplify avtext_print_rational()
Use snprintf() directly instead of initializing an AVBPrint
just for this.

Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-16 06:05:58 +02:00
0e59675698 avutil/hwcontext_vulkan: use the typedef'd name for the expect_assume struct
Signed-off-by: James Almer <jamrial@gmail.com>
2025-04-15 16:52:51 -03:00
f29475a89e avutil/hwcontext_vulkan: check if expect_assume is supported by the header
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: James Almer <jamrial@gmail.com>
2025-04-15 16:44:45 -03:00
0040d7e608 lavfi/src_movie: set pkt_timebase
Fix “Could not update timestamps for skipped samples” warning
and associated misfeature.
2025-04-15 15:49:38 +02:00
2229b74127 avformat/movenc: fix setting elst/stss for IAMF with Opus 2025-04-14 17:25:39 -03:00
d36883f119 avformat/iamf_writer: fix setting skip_samples and discard_padding for OPUS 2025-04-14 17:25:34 -03:00
3b2a9410ef avcodec/decode: Only use ff_progress_frame_get_buffer() with blank input
All users (namely HEVC) that use ff_progress_frame_alloc()
should just use ff_thread_get_buffer(). Using
ff_progress_frame_get_buffer() is not a must; it is merely
a convenience wrapper.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-14 10:15:08 +02:00
29b85cd4b8 vulkan_ffv1: add cached symbol reader for AMD
Speeds up everything on AMD by 3x.
This uses 32 local invocations to load state into cache, as well
as to do the RCT faster.
2025-04-14 06:10:43 +02:00
e040c087c7 vulkan: add support for expect/assume
This commit adds support for compiler hints.
While on AMD these are not used/needed, Nvidia benefits from them, and gives
a sizeable 10% speedup on 4k.
2025-04-14 06:10:43 +02:00
985a26be28 vulkan_ffv1: shortcut +-1 coeffs in symbol reading
Slightly faster, and allows for further optimizations.
2025-04-14 06:10:43 +02:00
4d561e6a1e vulkan_ffv1: remove need for scratch data during setup
This saves on some VRAM, but mainly allows for a more unified path.
2025-04-14 06:10:43 +02:00
8ceabb677c vulkan_ffv1: externalize extended lookup check
8% speedup on nvidia on 4k.
2025-04-14 06:10:43 +02:00
77f777d925 ffv1/vulkan: redo context count tracking and quant_table_idx management
This commit also makes it possible for the encoder to choose a different
quantization table on a per-slice basis, as well as adding this capability
to the decoder.

Also, this commit fully fixes decoding of context=1 encoded files.
2025-04-14 06:10:42 +02:00
66b8c92df2 vulkan_ffv1: cache only 2 lines when decoding RGB
This reduces the intermediate VRAM used for RGB decoding by a
factor of 100x for 6k video.
This also speeds the decoder up by 16% for 4k RGB24 and 31% for 6k video.

This is equivalent to what the software decoder does, but with less pointers.
2025-04-14 06:10:42 +02:00
72953477a4 vulkan_ffv1: fix left-2 sample addressing
Typo.
Not enough to fix context=1, but its a start.
2025-04-14 06:10:42 +02:00
694ebe890c vulkan_ffv1: improve buffer barrier correctness for slice state
This is likely a nanooptimization, but its more correct.
2025-04-14 06:10:42 +02:00
6111aef533 vulkan_ffv1: fix reset shader dependencies
Without a barrier upfront, the reset shader may read data fields not
yet set by the setup shader.
2025-04-14 06:10:42 +02:00
b72ada0a96 vulkan_ffv1: fallback to upload if mapping packet fails, fix fallback
The commit which added support for host mapping accidentally broke the
original, upload route.
For drivers without host-mapping (very few), fix it.
2025-04-14 06:10:42 +02:00
45d7abf6d9 vulkan_ffv1: init overread/corrupt fields
Forgotten.
2025-04-14 06:10:42 +02:00
1f09b55c94 vulkan_ffv1: allocate just as much memory for slice state as needed
Rather than always using the maximum allowed slices, just use the number
of slices present in this frame.
2025-04-14 06:10:41 +02:00
fc960dafef vulkan_ffv1: optimize symbol reader
This was the fastest variant tested.
2025-04-14 06:10:41 +02:00
defebd74c0 vulkan_ffv1: slightly optimize the range decoder
GPUs have cmovs as standard.
2025-04-14 06:10:41 +02:00
d7772da728 vulkan_ffv1: remove unused define
Leftover debug macro.
2025-04-14 06:10:41 +02:00
d077e00f3e vulkan_ffv1: enable acceleration on Intel
Fixed by previous commit.
2025-04-14 06:10:41 +02:00
a1137f9214 hwcontext_vulkan: disable descriptor buffer extension on Intel
Temporary workaround. Will be replaced with a version check once a fix is
in the works and a known next version for Mesa with a fix is known.
2025-04-14 06:10:41 +02:00
79ff1f21c4 vulkan_decode: only create sequence params in end_frame
We tried to create sequence params in both start_frame and end_frame.
This was redundant.

Just always create them in end_frame.
2025-04-14 06:10:40 +02:00
4f64df2928 vulkan: remove unused field from exec pools
This used to be involved in a mechanism to switch between queue indices,
but since the rewrite of the rewrite of the rewrite, it was rewritten out.
2025-04-14 06:10:40 +02:00
11911aef46 vulkan_shaderc/glslang: print full shaders on TRACE rather than VERBOSE
Way too spammy.
2025-04-14 06:10:40 +02:00
7b0156201b vulkan: fix logging level when erroring upon creating shader module 2025-04-14 06:10:34 +02:00
75d5672b4b avcodec/mpegaudioenc: Rename MPA_encode_* -> mpa_encode_*
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-13 22:49:21 +02:00