Commit Graph

6463 Commits

Author SHA1 Message Date
Lynne
80a0567a2f
vulkan: fix ImageView flexible array struct allocation
Same as the previous commit, the compiler may insert padding.
Thanks to Marvin Scholz for pointing this out.
2024-10-09 02:39:34 +02:00
Marvin Scholz
f5e2914a89 libavutil/vulkan: fix flexible array struct allocation
The flexible array member struct can have padding added by
the compiler which was not taken into account properly, which
could lead to a heap buffer overflow.
2024-10-09 02:36:12 +02:00
Lynne
4ad4f8101a
hwcontext_vulkan: set hwctx->device_features
This was forgotten during the recent device feature refactor.
2024-10-09 01:01:32 +02:00
Lynne
31def0c3ce
hwcontext_vulkan: remove redundant hostQueryReset setting
Its set just a few lines earlier.
2024-10-09 01:01:32 +02:00
Lynne
b8d1b4358b
vulkan: add a #define when printf debugging is enabled 2024-10-09 01:01:31 +02:00
James Almer
29ea34728f avutil/pixfmt: add V30X pixel format
This maps to the 444YpCbCr10 pixel format as defined by Apple.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 19:45:10 -03:00
James Almer
1f9424e0b1 avutil/pixfmt: add VYU444 pixel format
This maps to the 444YpCbCr8 pixel format as defined by Apple, which is ordered
Cr Y' Cb.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 14:10:07 -03:00
James Almer
dc3ef53819 avutil/pixfmt: add UYVA pixel format
This maps to the 4444YpCbCrA8 pixel format as defined by Apple, which is ordered
Cb Y' Cr A.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 14:10:07 -03:00
James Almer
263108a504 avutil/pixfmt: add AYUV pixel format
This maps to the 4444AYpCbCr8 pixel format as defined by Apple, which is ordered
A Y’ Cb Cr.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 14:10:07 -03:00
James Almer
2e79690a70 avutil/pixfmt: extend the VUY{A,X} description
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 14:10:07 -03:00
Lynne
6871fd3170
vulkan: always enable GL_EXT_control_flow_attributes 2024-10-06 07:13:04 +02:00
Lynne
8c250da8f3
vulkan: always enable GL_EXT_shader_explicit_arithmetic_types
Implicit types were a mistake.
lowp/mediump/highp was a sin.
2024-10-06 07:12:59 +02:00
Lynne
9391d4ccc5
lavu/vulkan_spirv: use correct inclusion guards
Forgot to change them after moving the file over from libavfilter.
2024-10-06 06:04:36 +02:00
IndecisiveTurtle
d80676117a
libavutil/vulkan: Prevent crash on shaders with no descriptors
Needed to prevent crashes on vc2 vulkan encoder patch
2024-10-06 01:32:50 +02:00
Lynne
892f64ad9b
x86/tx_float: remove HAVE_AVX2_EXTERNAL checks
It'll always be enabled.
Thanks, nasm.
2024-10-06 01:32:49 +02:00
Lynne
b17a240c8d
Revert "x86/tx_float: set all operands for shufps"
This reverts commit 74f5fb6db8.
2024-10-06 01:32:49 +02:00
Lynne
24c5a58e55
Revert "x86/tx_float: add missing check for AVX2"
This reverts commit f4097e4c1f.
2024-10-06 01:32:48 +02:00
Lynne
bf643f989b
Revert "x86/tx_float: add missing preprocessor wrapper for AVX2 functions"
This reverts commit 750f378bec.
2024-10-06 01:32:48 +02:00
Lynne
b890482d05
Revert "x86/tx_float: change a condition in a preprocessor check"
This reverts commit 0d8f43c74d.
2024-10-06 01:32:47 +02:00
Lynne
0a1f8107bb
vulkan: move SPIR-V compilation code to libavutil
The code is not currently used by libavutil, its just where our
common Vulkan code is.
Since SPIR-V compilation will be needed by lavc, move it, rather
than having lavc including lavfi.
2024-10-06 01:21:44 +02:00
Lynne
ac092c6707
hwcontext_vulkan: guard all uses of new spec defines and fix stray bracket
This fixes compilation with less recent Vulkan headers.
2024-10-04 10:41:03 +02:00
Lynne
a304cbeb8d
vulkan: add profiling debug setting
This simply keeps all shader optimizations, but allows debug
data to be generated.
2024-10-04 10:10:46 +02:00
Lynne
832947be02
vulkan: don't enable GL_EXT_buffer_reference by default
Only nlmeans_vulkan uses it.
2024-10-04 10:10:45 +02:00
Lynne
356d1cc8ff
vulkan: parse instance list and add the DEBUG_UTILS extension
Required to let users know whether debugging is active.
2024-10-04 10:10:44 +02:00
Lynne
e3676d96cb
hwcontext_vulkan: move device feature struct setup to a new function 2024-10-04 10:10:43 +02:00
Lynne
535e5eb7f3
hwcontext_vulkan: enable VK_KHR_shader_relaxed_extended_instruction 2024-10-04 10:10:43 +02:00
Lynne
0d5bfd0b21
vulkan_functions: change extension type to a typedef uint64_t
We were getting a bit too close for comfort to the 32-bit limit
on enums.
2024-10-04 10:10:42 +02:00
Lynne
d80f9f55c8
vulkan: always enable GL_EXT_scalar_block_layout
This makes std430 (which we use everywhere already) fully match C
layout.
Extension was made mandatory in 1.2.
2024-10-04 10:10:42 +02:00
Lynne
37d5cb84e8
vulkan: check if current buffer has finished execution before picking another
This saves resources, as dependencies are freed/reclaimed with a lower latency,
and provies a speedup.
2024-10-04 10:10:42 +02:00
Lynne
877c5a9692
vulkan: use shader objects if supported
Shader objects finally allow completely independent shaders.
2024-10-04 10:10:41 +02:00
Lynne
d233d9902f
vulkan: move shader data execution state to execution pools
This finally permits using fully compiled shaders across
multiple execution contexts.
2024-10-04 10:10:41 +02:00
Lynne
0a37d5a3b1
vulkan: merge FFVkSPIRVShader and FFVkPipeline into FFVkShader
Pipelines are just shaders. There's no reason to treat them
differently.
This also lets us implement shader objects and is an overall
cleanup.
2024-10-04 10:10:36 +02:00
Martin Storsjö
04a59bcac4 libavutil: Makefile: Fix alphabetical order for the film_grain_params files
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-10-02 11:25:14 +03:00
Anton Khirnov
0548ab2e42 lavu/log,opt: detect setting non-runtime options post-init
Add a mechanism to AVClass to allow objects to signal their state to
generic code. When an object flags itself with the 'initialized' state,
print an error (and fail, after the next major bump) if the caller
attempts to set non-runtime options.
2024-10-01 09:57:57 +02:00
Anton Khirnov
3785b27b76 lavu/opt: consolidate common prologue for av_opt_set*()
The options-setting functions share several operations at their
beginnings - locating the option and the object to operate on, handling
the read-only and deprecated flags, and constructing the pointer to the
target value. Some of the functions also do not perform some of the
checks, although they should. E.g. a deprecation warning is currently
only printed for av_opt_set().

Introduce a prologue function that is called from every av_opt_set*()
and performs all these common initialization operations.
2024-10-01 09:57:41 +02:00
Anton Khirnov
0d09645cfe lavu/opt: combine option type size+name into a single descriptor
Makes it easier to handle options generically and will be useful in
future commits.
2024-10-01 09:57:41 +02:00
Anton Khirnov
041d992060 lavu/class: improve AVClass doxy 2024-10-01 09:57:41 +02:00
Anton Khirnov
df9b80d21a lavu: deprecate av_opt_set_int_list() and related infrastructure
It has no more users and is replaced by array-type options.
2024-09-30 09:14:04 +02:00
Brad Smith
6ec6b07900 ppc: Recognize the PPC VSX and Power8 CPU flags
Signed-off-by: Brad Smith <brad@comstyle.com>
2024-09-28 18:50:08 -04:00
Anton Khirnov
505fea34e5 lavu/opt: avoid accidentally propagating spurious errors
An error from read_number() is non-fatal here and should not be
forwarded.
2024-09-28 17:04:33 +02:00
Anton Khirnov
9b764e9b49 lavu/opt: add missing 'else' 2024-09-28 17:04:33 +02:00
Martin Storsjö
fd1ea75c93 libavutil: Fix building libavutil/tests/cpu for aarch64 without SVE
This adds a condition that was missed in
b1ee2af843, fixing compilation on
toolchains that don't support SVE.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-09-27 09:02:10 +03:00
Martin Storsjö
b1ee2af843 aarch64: Print the SVE vector length in libavutil/tests/cpu.c
This makes this aspect more visible in test logs.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-09-27 00:06:30 +03:00
Martin Storsjö
e6eabb7ce7 aarch64: Add CPU feature flags for SVE and SVE2
Add code for detecting the feature on Linux and Windows.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-09-27 00:04:30 +03:00
Martin Storsjö
e6e56fd7a7 configure: Add detection of assembler support for SVE/SVE2
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-09-27 00:03:04 +03:00
Martin Storsjö
067abbfe9d aarch64: Detect I8MM on Windows via SVE-I8MM
There's no direct processor feature constant for I8MM alone, but
there is a flag for SVE-I8MM (added in WinSDK 10.0.26100 and
recent versions of mingw-w64). If SVE-I8MM is available, we can
assume that I8MM is available.

While HW supporting these features isn't yet commonly running
Windows, this at least allows detecting and running the I8MM codepaths
in Windows builds in Wine (possibly running in QEMU).

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-09-27 00:02:48 +03:00
James Almer
d55ab2ba9b avutil/iamf: fix doxygen
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-26 16:42:45 -03:00
Michael Niedermayer
38e224c2ba
*/version.h: bump after release/7.1 branch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 17:10:35 +02:00
Michael Niedermayer
e1094ac45d
*/version.h: bump minor versions for release/7.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 17:07:30 +02:00
Anton Khirnov
6940a6de2f lavu/frame: add side data storing view ID for multi-view video 2024-09-23 17:11:38 +02:00