6134 Commits

Author SHA1 Message Date
Kacper Michajłow
6e322fa582 configure: warn about excessive stack usage
Use a 120 KiB per-function threshold. This roughly matches the default
thread stack size on Musl, which is 128 KiB, leaving some headroom for
caller frames.

This warning draws attention to functions in the codebase that may have
excessively large stack frames. A few functions could benefit from
reducing their frame size.

120 KiB is a reasonable limit. If a function requires more stack, it
likely would benefit from restructuring the code.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-03-05 16:02:04 +00:00
IndecisiveTurtle
cebe0b577e lavc: implement a Vulkan-based prores encoder
Adds a vulkan implementation of the reference prores kostya encoder. Provides about 3-4x speedup over the CPU code
2026-03-05 14:02:39 +00:00
Georgii Zagoruiko
905348df9d configure: add detection of SME-I16I64 extension 2026-03-04 23:52:57 +02:00
Georgii Zagoruiko
70691bbb27 configure: add detection of assembler support for SME2 2026-03-04 23:52:36 +02:00
stevxiao
8429aec5e4 avfilter: add d3d12 deinterlace filter deinterlace_d3d12
This commit introduces a video filter `deinterlace_d3d12` that provides
hardware-accelerated deinterlacing using the D3D12 Video Processor.

The filter supports:
 - bob and custom (motion-adaptive)deinterlace modes
 - frame-rate and field-rate output
 - automatic interlace detection

Sample command lines:

1. Software decode with hwupload:

    ffmpeg -init_hw_device d3d12va=d3d12 -i interlaced.ts \
      -vf "format=nv12,hwupload,deinterlace_d3d12=mode=default,hwdownload,format=nv12" \
      -c:v libx264 output.mp4

2. Full hardware pipeline:

    ffmpeg -hwaccel d3d12va -hwaccel_output_format d3d12 -i interlaced.ts \
      -vf "deinterlace_d3d12=mode=custom:rate=field" \
      -c:v h264_d3d12va output.mp4

Signed-off-by: younengxiao <steven.xiao@amd.com>
2026-03-02 16:59:32 -05:00
Andreas Rheinhardt
576d5aaf5d configure: Remove vf_spp->me_cmp dependency
It is not used for anything. In fact, me_cmp is not exported at all.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-03-02 21:53:48 +01:00
James Almer
0390793dc3 avcodec/cbs: add support for LCEVC bitstreams
As defined in ISO/IEC 23094-2:2021/FDAM 1:2023

Signed-off-by: James Almer <jamrial@gmail.com>
2026-02-28 16:12:33 -03:00
Jack Lau
bc63000741 configure: add pkg-config check for amr related libs
This patch doesn't break previous approach, just add
one possible valid method to find the lib.

Signed-off-by: Jack Lau <jacklau1222gm@gmail.com>
2026-02-27 01:51:09 +00:00
Lynne
bd24abfb6c swscale/vulkan: initialize GLSL compilation and shader execution
Sponsored-by: Sovereign Tech Fund
2026-02-26 14:10:22 +01:00
Adrien Destugues
5425be53b5 configure: re-enable memalign for Haiku
This had been disabled in 2011:
https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2011-June/038362.html

If there are still problems with it we should rather fix them on Haiku
side.

Signed-off-by: Niklas Haas <git@haasn.dev>
See-Also: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22233
2026-02-26 10:16:11 +00:00
Niklas Haas
d67d81a374 configure: don't support asm without memalign
I tried it, and it broke horribly. We should definitively rule out this.

Unfortunately, it's not as easy as just setting `disable asm` here, because
asm having been enabled will already have affected the build process further
upstream - conversely, we don't know whether or not memalign exists until
fairly late in the build process, and I'm not about to go destroying
the current organization of the file just to work around this.

So an error message it is.
2026-02-26 10:16:11 +00:00
Jack Lau
35ccd5f3de avformat/tls_mbedtls: add dtls support
Signed-off-by: Jack Lau <jacklau1222gm@gmail.com>
2026-02-25 03:27:03 +00:00
Andreas Rheinhardt
9a7e0f1052 configure: Enable -Wunterminated-string-initialization warning
When an array of pointers to strings is converted into
an array of constant-length strings, one has to find out
the maximum size of the strings. Currently no warning will
be emitted If one forgets to account for the trailing zero,
making this optimization dangerous (think of the scenario
where the array will be modified without adjusting the maximum
size of the strings).

The -Wunterminated-string-initialization warning catches these cases.
It is supported by GCC 15.1 and Clang 21. It only requires to mark
the few instances of arrays initialized via string literals that
are not supposed to be strings with the nonstring attribute; this
has already been done in the previous commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-02-20 11:59:37 +01:00
Andreas Rheinhardt
005510501e configure: Make check for accepting warnings stricter
Clang by default allows unknown warnings and merely emits
a Wunknown-warning-option warning which is non-fatal by default,
making it appear as if Clang supported any warning. This patch
rewrites the tests to always add the arguments to error out
in case an unrecognized option is encountered.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-02-20 11:59:37 +01:00
Andreas Rheinhardt
05098eef42 configure: Use per-language unknown-warnings-flags
E.g. when CC is clang, the unknown warnings flags
are -Werror=unused-command-line-argument and
-Werror=unknown-warning-option. These flags are currently
also used for testing the C++ and ObjC compilers, yet
g++ does not recognize these flags and errors out because
of them, so that the tests fail and the parentheses,
switch etc. warnings are not disabled for C++.

Fix this by using per-language flags.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-02-20 11:59:37 +01:00
Lynne
eff3dad6b7 avcodec: remove support for runtime SPIR-V compilation
Begone.
2026-02-19 19:42:29 +01:00
Lynne
b736d1c73e ffv1enc_vulkan: convert encode shader to compile-time SPIR-V generation 2026-02-19 19:42:29 +01:00
Lynne
3dceda7769 vulkan_ffv1: convert to compile-time SPIR-V generation 2026-02-19 19:42:27 +01:00
Lynne
ae1a227cf6 Makefile: specify GLSL version via command line arguments
GLSL strictly mandates the version must be the very first non-comment
statement, which results in issues when #including for templating.
2026-02-19 19:42:20 +01:00
Tim Blechmann
2799aaa5af avutil: hwcontext_videotoolbox: support YUYV422 pixel format 2026-02-19 16:52:58 +00:00
Marvin Scholz
b98ec6d312 configure: remove require_cpp, check_lib_cpp
Remove the improperly named check functions that were added for the
opencolorio detection in 677cf95ea4.
Those are not needed anymore and there are already require_cxx and
check_lib_cxx for this purpose.
2026-02-17 15:17:37 +00:00
Marvin Scholz
8014cc7620 configure: cleanup libopencolorio check
Do a proper pkg-config check instead of just blindly compiling a test
program even if pkg-config doesn't find anything.
2026-02-17 15:17:37 +00:00
Marvin Scholz
84ffb18f77 configure: do not require default-constructible class
When checking for C++ classes in check_class_headers_cxx, the test code
required the class to be default-constructible, which is not always the
case. For the sake of the test, it is enough to check that referencing
the class succeeds.
2026-02-17 15:17:37 +00:00
Marvin Scholz
305c383d94 configure: add {test,check,require}_pkg_config_cxx
This is necessary to check for C++ only pkg-config dependencies
2026-02-17 15:17:37 +00:00
Sam.Richards@taurich.org
a1309700ed configure: remove accidentally added library
This was added by accident in 677cf95ea4
but is not actually used by anything.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>
2026-02-17 15:14:22 +00:00
Stéphane Cerveau
a2489b3ac6 configure: provide vulkan incflags
This patch allows to use pkgconfig cflags
for vulkan in check_cpp_condition as the vulkan
sdk might be installed in different place than
system wide.

See https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html
2026-02-14 12:24:39 +00:00
Sam.Richards@taurich.org
677cf95ea4 Initial checkin of OCIO filter.
Initial checkin of OCIO filter.

Initial checkin of OCIO filter.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Change for the right C++ library, should work on linux too.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Adding inverse when using display/view.

Removed comments.

Removed code that was setting the CICP values. Hopefully this can be done through OCIO at some point.

Config cleanup - need a modified require_cpp to handle namespacing.

Switch to using require_cpp so that namespace can be used.

Adding documentation.

Sadly a bit of linting went in here, but more importantly added a threads option to split the image into horizontal tiles, since OCIO was running rather slow.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Adding context parameters.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Add the OCIO config parameter.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Make the min threads 1 for now, reserve 0 for later if we can automatically pick something.
Also added a few comments.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

This is using ffmpeg-slicing.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Adding OCIO filetransform.

Making sure everything is using av_log rather than std::cerr.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Updating the tests so they would work without additional files.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Adding the file-transform documentation.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Adding copyright/license info.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Removing tests, since this is optional code.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Code cleanup.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Typo.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

I went the wrong way, av_log is expecting \n

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Fix indenting to 4 spaces.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Fixing lint issues and a spelling mistake.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Code formatting cleanup to match conventions.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

Whitespace removal.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>
2026-02-14 12:21:10 +00:00
Andreas Rheinhardt
0fefecd53f Revert "avcodec/opus/parse: export the packet and extradata parsing functions"
This reverts commit aa20d7b3e8.

Adding these avpriv functions is absolutely overblown: Muxers
can get the desired duration in a few lines themselves.
In particular, using the parse functions from this file
necessitated parsing the extradata (and entailed exporting
the parsing function), although it was only used to know
whether the frames are self-delimiting, but everything of
interest to a muxer does not depend on this at all.

The commit to be reverted also made several structures
part of the ABI, which should be avoided in general.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-02-06 14:09:15 +01:00
James Almer
aa20d7b3e8 avcodec/opus/parse: export the packet and extradata parsing functions
Needed for the following commit.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-02-05 23:21:49 -03:00
Jack Lau
3c902f68d7 configure: update whip dependences
The dtls_protocol is ffmpeg component, should
be included by whip_muxer_select

Signed-off-by: Jack Lau <jacklau1222gm@gmail.com>
2026-01-29 12:19:17 +00:00
Jack Lau
7f9d8b0c16 avformat/tls_gnutls: enable dtls build
Implement ff_ssl_*_key_cert()

Generate self-signed cert and key in server
mode if there're no key and cert input.

Implement ff_tls_set_external_socket() and
ff_dtls_export_materials()

Add gnutls as dtls protocol deps.

Signed-off-by: Jack Lau <jacklau1222gm@gmail.com>
2026-01-28 10:47:07 +00:00
stevxiao
451ff239e6 avfilter: d3d12 motion estimation filter support
This commit introduces a video filter `mestimate_d3d12` that provides hardware-accelerated motion estimation using DirectX 12 Video Encoding APIs. The filter leverages GPU hardware motion estimation capabilities to achieve significant performance improvements over the existing software-based mestimate filter.

Sample Command Line:

1. Basic mestimate_d3d12 functionality
```
	ffmpeg_g.exe -hwaccel d3d12va -i test.mp4 -vf mestimate_d3d12=mb_size=16 -f null -
```
2. Motion vector visualization
```
	ffmpeg -hwaccel d3d12va -i input.mp4 -vf "mestimate_d3d12,hwdownload,format=nv12,codecview=mv=pf" -c:v libx264 output.mp4
```
2026-01-26 11:31:48 +00:00
wangbin
4561fc5e48 configure: probe glslang
if shaderc is not installed and --glslc is not set
2026-01-22 03:05:01 +00:00
Zhao Zhili
e35b9e7c5c configure: fix scale_vulkan_filter dependency
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2026-01-19 13:59:39 +00:00
Dmitrii Ovchinnikov
6972b127de avfilter: Add vsrc_amf - AMF based screen capture
This patch adds screen capture support via AMF vsrc_amf:
ffmpeg -y \
    -filter_complex "vsrc_amf=framerate=120:capture_mode=keep_framerate" \
    -c:v hevc_amf \
    -frames:v 300 \
    output_grab.mp4

If the HW frames pool is insufficient,
increase extra_hw_frames in filter_complex.
2026-01-19 10:16:37 +00:00
James Almer
80a3ba7d79 configure: add missing vulkan_1_4 check
Removed in f2affdfafb by mistake.
Also, fix the logic in probe_glslc() so it doesn't return false when debug is disabled.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-01-13 13:28:23 -03:00
James Almer
f897bcd122 configure: fix glslc checks and add missing dependencies to relevant modules
Signed-off-by: James Almer <jamrial@gmail.com>
2026-01-12 18:20:01 -03:00
Lynne
f2a55af9a4 vulkan_dpx: switch to compile-time SPIR-V generation 2026-01-12 17:28:43 +01:00
Lynne
e27b510da8 vulkan_prores: generate SPIR-V at compile-time 2026-01-12 17:28:42 +01:00
Lynne
026e94e339 vulkan_prores_raw: use compile-time SPIR-V generation 2026-01-12 17:28:42 +01:00
Lynne
f3b0ca4f2c avgblur_vulkan: generate SPIR-V during compilation 2026-01-12 17:28:42 +01:00
Lynne
a6391168f2 bwdif_vulkan: use compile-time SPIR-V 2026-01-12 17:28:42 +01:00
Lynne
e844b43776 vulkan: support shader compression 2026-01-12 17:28:41 +01:00
Lynne
35235c762c configure: add zlib to suggests for shader_compression 2026-01-12 17:28:40 +01:00
Lynne
5996a9ad3d configure: rename PTX_COMPRESSION to SHADER_COMPRESSION
Its useful for GLSL and Metal as well.
2026-01-12 17:28:40 +01:00
Lynne
f2affdfafb configure/make: support compile-time SPIR-V generation 2026-01-12 17:28:40 +01:00
Lynne
17f9a64860 configure: rename spirv_compiler to spirv_library
More accurate.
2026-01-12 17:28:40 +01:00
Lynne
f11aa29df8 configure: remove unused X86ASM dependency flag variables 2026-01-12 17:28:40 +01:00
Vann Harl
41342aea22 configure: bump CONFIG_THIS_YEAR to 2026 2026-01-07 15:07:09 +01:00
Martin Storsjö
3dcbcce80c configure: Check for the AArch64 CRC extension
Name the feature "arm_crc" rather than plain "crc", to make it
clear that this is about a CPU feature extension, not CRC
implementations in general.

This requires dealing with the extension slightly differently
than other extensions, as the name of the feature and the
".arch_extension" extension name differ.

Naming it with an "arm" prefix rather than "aarch64", as the
CPU extension also is available in 32 bit ARM form, even though
we don't intend to use it there.
2026-01-04 15:49:30 +01:00