6921 Commits

Author SHA1 Message Date
Michael Niedermayer
c1263a3dd9 Bump versions for master after release/8.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-03-08 02:31:23 +01:00
Michael Niedermayer
67c886222f Bump versions for release/8.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-03-08 02:29:20 +01:00
Ramiro Polla
252ab61726 avutil/frame: fix typos 2026-03-07 00:54:49 +00:00
Andreas Rheinhardt
5d3ad4f06e avutil/error: Fix overflow when negating
-INT_MIN is not representable in an int.
Fixes issue #22388.

Reviewed-by: Sean McGovern <gseanmcg@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-03-06 17:28:00 +01:00
Alexandru Ardelean
3291afd30f libavutil: hwcontext_amf: remove unreachable statements
Inside the amf_device_derive() function, there seem to be some
unreachable 'break' statements, which can be removed.
And also the final 'return 0' statement will also be unreachable
especially since there is a default case in the switch block.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
2026-03-05 15:42:00 +00:00
Georgii Zagoruiko
0edd75e150 aarch64/asm.S: to support SME added macro to save/restore registers d8-d16 2026-03-04 23:52:58 +02: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
Martin Storsjö
a0d23706e8 aarch64: Switch to a more correct Windows flag for detecting I8MM
Newer revisions of WinSDK 10.0.26100.0 have exposed more flags for
IsProcessorFeaturePresent; now there is a separate one for
detecting specifically I8MM and not just SVE-I8MM. Switch to using
this flag instead.
2026-03-04 21:46:18 +00:00
Shreesh Adiga
22d484f498 avutil/cpu: add static CPU feature flag for AArch64 CRC32 2026-03-03 21:38:00 +00:00
Michael Niedermayer
5554d9d555 avutil/eval: Store *prng_state / var only in root AVExpr
AFter this, depth and the root element flag is stored in space
needed for alignment and thus does not increase the AVExpr size

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-03-03 03:28:37 +01:00
Michael Niedermayer
1528ccb6a1 avutil/eval: use anonymous union
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-03-03 03:28:37 +01:00
Michael Niedermayer
ed5040e6f5 avutil/eval: Check depth of AVExpr
we already check the depth of the parser but the AVExpr tree differs

Fixes: stack exhaustion
Fixes: YWH-PGM40646-39

Found-by: jpraveenrao
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-03-03 03:28:37 +01:00
Andreas Rheinhardt
ac46514327 avutil/emms: Add ff_assert[01]_fpu()
These will be used to mark and check parts of the code
where the floating point state is supposed to be not
clobbered. They are an improvement on the (deprecated)
av_assert0_fpu() because of proper file and line number
information; they also reset the floating point state
if the assert is actually triggered.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-03-02 11:55:30 +01:00
Lynne
d80d5b4ee7 vulkan_spirv: reduce shader print level from TRACE to DEBUG
The issue was that FFv1 concat'd a lot of separate files, each with
a license header, inflating the total shader size to over 3000 lines.

As all codec shaders were rewritten for compile-time SPIR-V, this became
unnencessarily restrictive.

Sponsored-by: Sovereign Tech Fund
2026-02-26 14:10:21 +01:00
Lynne
0c34fcf0a8 vulkan: constify FFVulkanShader arg in ff_vk_exec_bind_shader
Sponsored-by: Sovereign Tech Fund
2026-02-26 14:10:21 +01:00
Lynne
6c5dc2011b vulkan: reset exec context when uninitializing
Sponsored-by: Sovereign Tech Fund
2026-02-26 14:10:19 +01:00
Andreas Rheinhardt
0b77f79191 avutil/attributes_internal: Add attribute_nonstring
This attribute is used to signal to the compiler
that an array object initialized via a string literal
is not a real string and may lack the space for
the trailing zero, as in char fourcc[4]="FOUR".

This is in preparation for enabling
the -Wunterminated-string-initialization warning.

Reviewed-by: J. Dekker <jdek@itanimul.li>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-02-20 11:59:37 +01:00
Andreas Rheinhardt
acde43703f avutil/error: Remove size from error_stringtable
This stringtable is a concatenation of strings, with their
own trailing \0. Without an explicit size said stringtable
ends with two \0 (one from the last string and one more
because it is initialized via a string literal); the explicit
size exists to discard the last \0.

Yet this makes GCC (but not Clang) think that this is an
unterminated string, leading to warnings when
-Wunterminated-string-initialization is enabled.
So just remove the explicit size to avoid this.

(An alternative would be to mark this as a non-string
for GCC, but not for Clang, but this has been deemed ugly;
another alternative would be to omit the internal \0 from
the stringtable and use length fields instead, but
the necessary copying code more than outweighs the size benefits
of omitting the \0.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-02-20 11:59:37 +01:00
Lynne
4b6396a49b ffv1enc_vulkan: allocate all results memory upfront
Suballocation is the Vulkan way.
2026-02-19 19:42:34 +01:00
Lynne
3ba81f2af4 vulkan: drop support for descriptor buffers
Descriptor buffers were a neat attempt at organizing descriptors.
Simple, robust, reliable.

Unfortunately, driver support never caught on, and neither did validation
layer support.

Now they're being replaced by descriptor heaps, which promises to be
the future. We'll see how it goes.
2026-02-19 19:42:31 +01:00
Lynne
61ca28d6e0 hwcontext_vulkan: correctly set stride for host image uploads
Cursed.
2026-02-19 19:42:27 +01:00
Lynne
6452e0c56e hwcontext_vulkan: drop debug=3 (profile)
The mode is useless with pregenerated SPIR-V.
2026-02-19 19:42:27 +01:00
Lynne
6f749ec0a7 hwcontext_vulkan: zero-pad optional_instance_exts
The layer settings extension was enabled since the list was blank,
and some compilers complained about that, and it should have been
always supported on all platforms everywhere.

Unfortunately, some platforms LIE, claim they support it and yet
they error out that the extension is missing.

Juse zero pad the array.
2026-02-19 19:42:27 +01:00
Lynne
ee1d5da27f hwcontext_vulkan: enable VK_KHR_shader_relaxed_extended_instruction by default
We compile our shaders with debug information by default.
2026-02-19 19:42:26 +01:00
Lynne
eadfbc109d hwcontext_vulkan: disable shader object when debugging 2026-02-19 19:42:26 +01:00
Tim Blechmann
2799aaa5af avutil: hwcontext_videotoolbox: support YUYV422 pixel format 2026-02-19 16:52:58 +00:00
lompik
38cd91c99a hwdec/vulkan: fix invalid number of planes usage in map_to_drm
This fixes a SIGSEGV happening (for >1 plane images) in drivers as we
are sending a null semaphore for them to wait on.
2026-02-18 13:48:04 +04:00
Andreas Rheinhardt
66766bb1c7 avutil/avassert: Deprecate av_assert0_fpu()
Said function has presumably been added in order to check
that we have successfully reset the floating point state
after having violated the ABI/calling convention by not
issuing emms in our MMX DSP routines.

Yet the ability to check this should not have been made public,
because there is no external need for it and because the
function does not even always achieve what its documentation
claims to do: It only works when inline assembly is available.
It should have been implemented in emms.h like emms_c()
(which is where a replacement should be put if there is still
ABI-violating MMX code when av_assert0_fpu() is removed).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-02-13 09:21:02 +01:00
Andreas Rheinhardt
fb8a12db17 avutil/opt: Improve type-safety
In particular, make this code -fshort-enums compatible.
The branch can be optimized away by compilers when
sizeof(enum AVPixelFormat) == sizeof(enum AVSampleFormat).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-02-10 19:44:46 +01:00
James Almer
706d4e4736 avutil/iamf: stop setting parameter definition block defaults
It was done for the sake of having subblock_duration not be zero as the spec
forbids that value, but harcoding it to any arbitrary value is no better
considering the user is meant to fill the entire structure.

This helps speeding up the function when trying to allocate a struct with a
huge amount of blocks.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-02-08 21:58:06 -03:00
Brad Smith
c352a9ab02 avutil/cpu: add CPU feature detection for AArch64 CRC32 on OpenBSD
Signed-off-by: Brad Smith <brad@comstyle.com>
2026-02-06 14:24:01 -05:00
Michael Niedermayer
d1a43f1486 avutil/dovi_meta: Document valid range for index of av_dovi_get_ext()
Every use case in libavcodec already checks the index

Found-by: 이동준 <ldj6192@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-02-04 15:25:18 +00:00
Dmitrii Ovchinnikov
714152dd9a avutil/hwcontext_d3d11va: added resource and heap flags to DeviceContext 2026-01-26 10:39:10 +00:00
Lynne
e2f9861036 hwcontext_vulkan: fix stride for host image copy uploads
Can this cursed extension ever bloody ever even work!?!
2026-01-21 21:21:32 +01: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
AnandajithS
ed085692d9 doc: fix typos
Fix trivial grammatical errors.

Signed-off-by: AnandajithS <anandajiths2006@gmail.com>
2026-01-18 03:33:04 +00:00
Zhao Zhili
e8daa03fee arm/timer: disable PMCCNTR timer for Android
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2026-01-15 16:06:13 +00:00
Zhao Zhili
9bb5ae3a42 avutil/hwcontext_vulkan: fix vulkan callback function prototype
Fix -Wincompatible-function-pointer-types.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2026-01-15 16:05:56 +00:00
Lynne
e32cb94258 hwcontext_vulkan: enable long vector extension
This enables us to do some neat tricks.
2026-01-12 17:28:41 +01:00
Lynne
95a23820f7 hwcontext_vulkan: enable non-uniform features we were already using 2026-01-12 17:28:41 +01:00
Lynne
cf0ce1b7e4 hwcontext_vulkan: enable the VK_EXT_shader_replicated_composites extension
Its required to use certain features in SPIR-V that glslang uses.
2026-01-12 17:28:41 +01:00
Lynne
e844b43776 vulkan: support shader compression 2026-01-12 17:28:41 +01:00
Lynne
7ce22b085e cuda/load_helper: move zlib decompression into a separate file
Allows it to be reused for Vulkan
2026-01-12 17:28:41 +01:00
Lynne
540c4df5c7 vulkan: add support for precompiled shaders 2026-01-12 17:28:40 +01:00
Lynne
40edf7d75d vulkan: switch to static allocation for temporary descriptor data
Simplifies management, and the hardware is limited to 4 descriptor sets
and whatever bindings.
2026-01-12 17:28:35 +01:00
Cosmin Stejerean
3474ec01e7 avutil/dovi_meta - fix L11 dovi metadata definition
deprecate the incorrect fields in AVDOVIDmLevel11 and schedule them
for removal
2026-01-07 13:14:11 +00:00
Zhao Zhili
66f7e9db71 avutil/crc: use arm64 crc32 instruction
On rpi5 A76
crc_32_ieee_le_c:                       23146.3 ( 1.00x)
crc_32_ieee_le_crc:                      1060.1 (21.83x)

On RK3566 A55
crc_32_ieee_le_c:                       28773.8 ( 1.00x)
crc_32_ieee_le_crc:                      2602.4 (11.06x)

Co-authored-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-01-04 15:49:30 +01:00
Zhao Zhili
0645c48453 avutil/cpu: add CPU feature flag for arm crc32
Co-Authored-by: Martin Storsjö <martin@martin.st>
2026-01-04 15:49:30 +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