1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00
Commit Graph

6434 Commits

Author SHA1 Message Date
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
Lynne
bc36fe6f1f
vulkan: use push descriptors where possible
Push descriptors are in theory slightly faster, but come with
limitations for which we have to check.

Either way, they're not difficult to implement, so even though
no one should be using peasant-tier descriptors, do it anyway.
2024-09-23 13:41:07 +02:00
Lynne
8a7af4aa49
vulkan: add support for regular descriptor pools
This permits:
 - The use of Vulkan filtering on many more devices
 - Better debugging due to lack of descriptor buffer support in layers

Much of the changes here are due to a requirement that updates to
descriptors must happen between the command buffer being waited on,
and the pipeline not being bound.

We routinely did it the other way around, by updating only after
we bind the pipeline.
2024-09-23 13:40:38 +02:00
Lynne
3d75ba7495
vulkan: separate out descriptor layouts from sets
Just avoids a single temporary allocation.
2024-09-23 13:40:38 +02:00
Lynne
2942ca802a
hwcontext_vulkan: forward debug_mode to check_extensions() for devices
This allows disabling of certain extensions when debug mode is turned on.
2024-09-23 13:40:37 +02:00
Lynne
b5184c5d45
hwcontext_vulkan: add the PROFILE_INDEPENDENT only when needed 2024-09-23 13:40:36 +02:00
Lynne
a577d313b2
hwcontext_vulkan: add support for implicit DRM synchronization
More recent kernel versions allow for users to extract a sync_file
handle from a DMA-BUF, which can then be imported into Vulkan as a
binary semaphore.

This finally allows for synchronization between Vulkan and DMA-BUF
images, such as those from screen capture software, or VAAPI,
avoiding any corruption artifacts.

This is done fully asynchronously, where we use the kernel's
given binary semaphores as a dependency to increment the image's
usual VkSemaphores we allocate. The old imported binary semaphores
are cleaned up after execution as usual.

In the future, hwcontext_drm should receive support for explicitly
synchronized images as well, which would make the synchronization
more robust and portable.
2024-09-22 02:11:08 +02:00
Lynne
2395444c80
vulkan: add ff_vk_exec_add_dep_bool_sem
This function simply takes in a binary semaphore as a dependency
to an execution.
2024-09-22 02:11:08 +02:00
Lynne
c4048013e5
vulkan: flexibly allocate temporary imageviews
No reason to allocate 16 when 3 will do.
2024-09-22 02:11:07 +02:00
Lynne
1445102e68
hwcontext_vulkan: fix VUID-VkPhysicalDeviceImageFormatInfo2-usage-requiredbitmask
fmt_props.usage was initialized to 0 as create_info.usage was set later.
2024-09-22 02:11:04 +02:00
Brad Smith
2bf588f273 libavutil/ppc: Make use of getauxval() and elf_aux_info() on ppc
Modern Linux has getauxval() and FreeBSD/OpenBSD ppc have elf_aux_info().

Signed-off-by: Brad Smith <brad@comstyle.com>
2024-09-21 03:11:22 -04:00
James Almer
90d12c24c5 avutil/frame: add an LCEVC enhancement data payload side data type
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-19 08:45:48 -03:00
Lynne
8875da347a
hwcontext_vulkan: consider encode DBPs as always independent 2024-09-18 05:59:46 +02:00
Lynne
32d47166c8
hwcontext_vulkan: fix p->img_qfs
The array was tied to our old queue API, which meant that if users
set it, it was never set.
2024-09-18 05:59:41 +02:00
Lynne
0fa6f33875
hwcontext_vulkan: add support for x2bgr10 and proper DRM mappings for 10-bit images
This allows mapping of 10-bit DRM images.
2024-09-16 14:03:56 +02:00
Marvin Scholz
5dfc547f25 avutil/file: use av_err2str to simplify code
No need to explicitly specify the buffer here as it is only
ever passed to av_log, so av_err2str can be used.
2024-09-13 00:29:10 +02:00
Brad Smith
a3f79fd22a aarch64: Implement support for elf_aux_info(3) on FreeBSD and OpenBSD
FreeBSD 12.0+, OpenBSD -current and what will be OpenBSD 7.6 support
elf_aux_info(3).

Signed-off-by: Brad Smith <brad@comstyle.com>
2024-09-09 07:17:49 -04:00
Brad Smith
fe4b9ef69f avutil/cpu_internal: Provide ff_getauxval() wrapper for getauxvaul()
Initially used for getauxval() but will be used to add support for
other API, such as elf_aux_info().

Signed-off-by: Brad Smith <brad@comstyle.com>
2024-09-09 06:20:11 -04:00
Lynne
5e9845f11e
vulkan(_decode): fix, simplify and improve queries
The old query code never worked properly, and did some hideous
heuristics to read the status bit, and work that into a return
code.
This is all best left to callers to do, which simplifies
our code a lot.

This also fixes minor validation errors regarding calling queries
which are not in their active state.
2024-09-09 07:05:46 +02:00
Lynne
3415e0533f
hwcontext_vulkan: disable more false positive validation checks
Both of these are fundamentally incompatible with video decoding.

The third one can be tracked in the following validation layer issue:
https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/6627
2024-09-09 07:05:46 +02:00
Lynne
620822c0c5
vulkan: add a ff_vk_init function
This function sets the class correctly, and calls functions
that all users have to call anyway.
2024-09-09 07:05:45 +02:00
Lynne
0ffa967170
hwcontext_vulkan: ask for storage images by default
The issue is that we ask for storage images by default if
available, but because that is gated by the format supporting
storage images, and the check for the format supporting storage
images is gated by the usage, this resulted in a catch-22.
2024-09-09 07:05:45 +02:00
Lynne
c41ef7f2ff
hwcontext_vulkan: add PREP_MODE_GENERAL for non-transfer_dst images
Vulkan filters don't need images which can be transferred into.
2024-09-09 07:05:44 +02:00
Lynne
06483d039a
vulkan: error out if query is called without being initialized 2024-09-09 07:05:43 +02:00
Lynne
fd86c373c2
vulkan: use correct return codes for query errors 2024-09-09 07:05:43 +02:00
Marvin Scholz
8a314e3f11 lavu/opt: Fix return of uninitialised value
In one of the failure paths of av_opt_get_array, the ret variable
was accidentally declared again, shadowing the outer one and once when
jumping to the fail label would return the still uninitialised outer
one.

To fix this simply remove the local declaration of ret that shadowed
the outer one.

Introduced in d89930f866

Fixes: CID1618663 Uninitialized scalar variable
2024-09-07 20:42:26 +02:00
Marvin Scholz
b4e64b86ad lavu/opt: av_opt_set_array: fix uninitialised return
In one failure path for av_opt_set_array, the ret variable
was declared again, shadowing the outer one and writing the
return value to the wrong one and then after the goto returning
the uninitialized one instead.

Introduced in 450a3f58ed

Fixes: CID1619242 Uninitialized scalar variable
2024-09-07 20:39:42 +02:00
Timo Rothenpieler
7e35aeda03 lavu/opt: properly initialize av_opt_set_array return value 2024-09-07 20:21:01 +02:00
Anton Khirnov
4ef149249a lavu/opt: handle UINT options as the POD they are
Fixes operations on array UINT options.
2024-09-06 13:59:04 +02:00
Anton Khirnov
450a3f58ed lavu/opt: add API for setting array-type option values
Previously one could only replace the entire array with a new one
deserialized from a string. The new API allows inserting, replacing, and
removing arbitrary element ranges.
2024-09-06 13:59:04 +02:00