Commit Graph
110899 Commits
Author SHA1 Message Date
Lynne 77478f6793 av1dec: add Vulkan hwaccel 2023-05-29 00:42:00 +02:00
Lynne 5dc047716a fate-source: exclude Apache-2 licensed files 2023-05-29 00:41:59 +02:00
Lynne 6ec58ff820 cbs_av1: expose tile col/row starts in SBs 2023-05-29 00:41:59 +02:00
Dave AirlieandLynne e49b8b48cd av1: set skip mode frames properly
There are circumstances where the flag isn't set but the skip mode
frames are. So don't use the inferred bit which has other inputs
when deciding to pass the skip mode frames to the device.

This fixes some decoding bugs on intel av1
2023-05-29 00:41:58 +02:00
Lynne 36c16a06b2 hevcdec: add Vulkan hwaccel
Thanks to Dave Airlie for figuring out a lot of the parameters.
2023-05-29 00:41:58 +02:00
Lynne a9fbe8b472 h264dec: add Vulkan hwaccel
Thanks to Dave Airlie for figuring out a lot of the parameters.
2023-05-29 00:41:58 +02:00
Lynne 1e8fefff93 libavcodec: add Vulkan common video decoding code 2023-05-29 00:41:57 +02:00
Lynne 023ae6103f libavcodec: add Vulkan common video code 2023-05-29 00:41:57 +02:00
Lynne 6733a1a456 avcodec: add AVHWAccel.flush callback 2023-05-29 00:41:57 +02:00
Lynne be07145109 avcodec: add AVHWAccel.free_frame_priv callback 2023-05-29 00:41:56 +02:00
Lynne 09dc9193ea lavfi: add bwdif_vulkan 2023-05-29 00:41:56 +02:00
Niklas HaasandLynne 9675e54b02 avutil/hwcontext_vulkan: add libplacebo required features
For compatibility with vf_libplacebo
2023-05-29 00:41:55 +02:00
Niklas HaasandLynne b41ea8c6c3 avfilter/vf_libplacebo: bump max vk version
For two reasons:
1. We now create a vulkan 1.3 device
2. libplacebo master currently requires a vulkan 1.3 device
2023-05-29 00:41:55 +02:00
Niklas HaasandLynne 661db605db avfilter/vf_libplacebo: forward queue locking primitives
For thread safety.
2023-05-29 00:41:55 +02:00
Lynne f70f873272 transpose_vulkan: port for the rewrite 2023-05-29 00:41:54 +02:00
Lynne d4b51b5085 scale_vulkan: port for the rewrite 2023-05-29 00:41:54 +02:00
Lynne 8e9ceb1efb overlay_vulkan: port for the rewrite 2023-05-29 00:41:54 +02:00
Lynne 59f21c051d gblur_vulkan: port for the rewrite 2023-05-29 00:41:53 +02:00
Lynne d26cbae3e1 flip_vulkan: port for the rewrite 2023-05-29 00:41:53 +02:00
Lynne 125636608d chromaber_vulkan: port for the rewrite 2023-05-29 00:41:52 +02:00
Lynne 40bf1d525e blend_vulkan: port for the rewrite 2023-05-29 00:41:52 +02:00
Lynne f29850e98f avgblur_vulkan: port for the rewrite 2023-05-29 00:41:52 +02:00
Lynne 05ce6473ac lavfi: add lavfi-only Vulkan infrastructure 2023-05-29 00:41:51 +02:00
Lynne 51b7fe81be hwcontext_vulkan: enable additional device properties 2023-05-29 00:41:51 +02:00
Lynne 33fc919bb7 hwcontext_vulkan: remove duplicate code, port to use generic vulkan utils
The temporary AVFrame on staack enables us to use the common
dependency/dispatch code in prepare_frame().
The prepare_frame() function is used for both frame initialization
and frame import/export queue family transfer operations.
In the former case, no AVFrame exists yet, so, as this is purely
libavutil code, we create a temporary frame on stack. Otherwise,
we'd need to allocate multiple frames somewhere, one for each
possible command buffer dispatch.
2023-05-29 00:41:51 +02:00
Lynne 94e17a63a4 hwcontext_vulkan: don't change properties if prepare_frame fails 2023-05-29 00:41:50 +02:00
Lynne 32fc36ee61 hwcontext_vulkan: remove linear+host_visible "fast" path
The idea was that it's faster to map linear images and copy them
via regular memcpy. This is a very niche use, plus very inconsistently
useful, as it would only really be faster on a few Intel GPUs.
Even then, using the non-cached memcpy would've been better.

Instead, scrap this code. Drivers are better at figuring out
what copy to use, and if we're host-mapping, it should actually be
just as fast, if not faster.
2023-05-29 00:41:50 +02:00
Lynne 48f85de0e7 hwcontext_vulkan: rewrite to support multiplane surfaces
This commit adds proper handling of multiplane images throughout
all of the hwcontext code. To avoid breakage of individual
components, the change is performed as a single commit.
2023-05-29 00:41:49 +02:00
Lynne a4d63b46d9 vulkan: make GLSL macro functions semicolumn-safe 2023-05-29 00:41:49 +02:00
Lynne 83024beec2 vulkan: enable forcing of full subgroups 2023-05-29 00:41:49 +02:00
Lynne 758f8b26b9 vulkan: add ff_vk_count_images() 2023-05-29 00:41:48 +02:00
Lynne b5eaeb1f13 vulkan: rewrite to support all necessary features
This commit rewrites the majority of vulkan.c to enable its use
as a general-purpose high-level utility code, usable for decoding,
encoding, and filtering of video frames.

The dependency system was rewritten to simplify management of
execution.

The image handling system was rewritten to accomodate multiplane
images.

Due to how related all the new features were, this is a single
commit.
2023-05-29 00:41:48 +02:00
Lynne 721b71da4a vulkan: return current queue index from ff_vk_qf_rotate() 2023-05-29 00:41:48 +02:00
Lynne b15104ed97 vulkan: add support for retrieving queue, query and video properties 2023-05-29 00:41:47 +02:00
Lynne 6eaf3fe69c vulkan: add support for queries 2023-05-29 00:41:47 +02:00
Lynne f3fb1b50bb vulkan: minor indent fix, add support for synchronous submission/waiting 2023-05-29 00:41:46 +02:00
Lynne d386988c39 vulkan: use device properties 2 and add a convenience loader function 2023-05-29 00:41:46 +02:00
Lynne bf69a64135 vulkan: add size tracking to buffer structs 2023-05-29 00:41:46 +02:00
Lynne b18e20a4ee vulkan: do not wait for device idle when destroying buffers
This should be done explicitly.
2023-05-29 00:41:45 +02:00
Lynne 15de0af8f0 vulkan: allow alloc pNext in ff_vk_create_buf 2023-05-29 00:41:45 +02:00
Lynne af48790465 vulkan: support ignoring memory properties when allocating 2023-05-29 00:41:45 +02:00
Lynne 3c2f43d8ee vulkan: expose ff_vk_alloc_mem() 2023-05-29 00:41:44 +02:00
Lynne fa67ccee37 vulkan: add ff_vk_image_create() 2023-05-29 00:41:44 +02:00
Lynne e8fce74abf vulkan: add ff_vk_qf_fill() 2023-05-29 00:41:43 +02:00
Lynne b5e333bba7 vulkan: add pNext argument to ff_vk_create_buf() 2023-05-29 00:41:43 +02:00
Lynne a0d47a2ad9 vulkan: fix comment statement about exec_queue blocking 2023-05-29 00:41:43 +02:00
Lynne 619b1265a2 vulkan: add additional error codes 2023-05-29 00:41:42 +02:00
Lynne 0c9c0e40fb vulkan: define VK_NO_PROTOTYPES
This just disables the vulkan headers from defining any symbols
like vkCmdPipelineBarrier2(). Instead, all functions must be loaded
via the loader and used as function pointers as vk->CmdPipelineBarrier2.

Mostly just forces developers to write correct code, as using the
symbols can be undesirable in case API users define their own
function wrappers via the loader API.
2023-05-29 00:41:42 +02:00
Lynne 92ddd415bc vulkan: lock queues before submitting operations 2023-05-29 00:41:42 +02:00
Lynne 9b385b480f hwcontext_vulkan: enable GPU-assisted validation when debugging 2023-05-29 00:41:41 +02:00