summaryrefslogtreecommitdiff
path: root/libavutil/hwcontext_vulkan.h
Commit message (Collapse)AuthorAge
* hwcontext_vulkan: stricter semaphore number requirementsLynne2021-12-10
| | | | | | Always require one semaphore per sw_format plane. This is what the implementation uses and relies upon throughout. This was a leftover from an earlier revision that was never needed.
* hwcontext_vulkan: support creating DRM-tiled images and autodetecting modifiersWenbin Chen2021-12-10
| | | | | | | | | | | | | | | When vulkan image exports to drm, the tilling need to be VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT. Now add code to create vulkan image using this format. Now the following command line works: ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format \ vaapi -i input_1080p.264 -vf "hwmap=derive_device=vulkan,format=vulkan, \ scale_vulkan=1920:1080,hwmap=derive_device=vaapi,format=vaapi" -c:v h264_vaapi output.264 Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Further-modifications-by: Lynne <dev@lynne.ee>
* hwcontext_vulkan: add support for allocating all planes in a single allocationWenbin Chen2021-12-10
| | | | | | | | | | | | | | VAAPI on Intel can import external frame, but the planes of the external frames should be in the same drm object. A new option "contiguous_planes" is added to device. This flag tells device to allocate places in one memory. When device is derived from vaapi this flag will be enabled. A new flag frame_flag is also added to AVVulkanFramesContext. User can use this flag to force enable or disable this behaviour. A new variable "offset "is added to AVVKFrame. It describe describe the offset from the memory currently bound to the VkImage. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Further-modifications-by: Lynne <dev@lynne.ee>
* avutil/vulkan: load win32 external memory functionsTimo Rothenpieler2021-11-14
|
* vulkan: add support for encode and decode queues and refactor queue codeLynne2021-11-12
| | | | | | | | | This simplifies and makes queue family picking simpler and more robust. The requirements on the device context are relaxed. They made no sense in the first place. The video encode/decode extension is still in beta, at least on paper, but I really doubt they'd change needing a separate queue family.
* hwcontext_vulkan: switch to using timeline semaphoresLynne2021-11-12
|
* hwcontext_vulkan: bump required Vulkan loader version to 1.2Lynne2021-11-12
|
* hwcontext_vulkan: dynamically load functionsLynne2021-04-30
| | | | This patch allows for alternative loader implementations.
* hwcontext_vulkan: reorder structure fields and add spaces in betweenLynne2021-04-28
| | | | We're in the middle of an ABI unstable period, so we're allowed to.
* hwcontext_vulkan: fix make checkheaders failJun Zhao2020-06-04
| | | | | | | | | | | | make checkheaders will get error as follow: CC libavutil/hwcontext_vulkan.h.o In file included from libavutil/hwcontext_vulkan.h.c:1: ./libavutil/hwcontext_vulkan.h:130:23: error: ‘AV_NUM_DATA_POINTERS’ undeclared here (not in a function) 130 | void *alloc_pnext[AV_NUM_DATA_POINTERS]; | ^~~~~~~~~~~~~~~~~~~~ ./libavutil/hwcontext_vulkan.h:199:43: warning: ‘enum AVPixelFormat’ declared inside parameter list will not be visible outside of this definition or declaration Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* hwcontext_vulkan: use host mapped buffers when uploading and downloadingLynne2020-05-26
| | | | Speeds up both use cases by 30%.
* hwcontext_vulkan: do not OR the user-specified usage with our default flagsLynne2020-05-23
| | | | | Some users may need special formats that aren't available when the STORAGE flag bit is set, which would result in allocations failing.
* hwcontext_vulkan: improve public header documentationLynne2020-05-23
| | | | | Some things like using ImageLists were from a really old version that still used multiplanar images.
* hwcontext_vulkan: expose the enabled device featuresLynne2020-05-23
| | | | | | | With this, the puzzle of making libplacebo, ffmpeg and any other Vulkan API users interoperable is complete. Users of both libraries can initialize one another's contexts without having to create a new one.
* hwcontext_vulkan: expose the amount of queues for each queue familyLynne2020-05-23
| | | | | This, along with the next patch, are the last missing pieces to being interoperable with libplacebo.
* Revert "hwcontext_vulkan: only use one semaphore per image"Lynne2020-05-11
| | | | | | | | | This reverts commit 97b526c192add6f252b327245fd9223546867352. It broke the API, and assumed no other APIs used multiple semaphores. This also disallowed certain optimizations to happen. Dealing with APIs that give or expect single semaphores is easier when we use per-image semaphores.
* hwcontext_vulkan: create all images with concurrent sharing modeLynne2020-05-10
| | | | | | | | | As it turns out, we were already assuming and treating all images as if they had concurrent access mode. This just changes the flag to CONCURRENT, which has less restrictions than EXCLUSIVE, and fixed validation messages on machines with multiple queues. The validation layer didn't pick this up because the machine I was testing on had only a single queue.
* hwcontext_vulkan: expose enabled device and instance extensionsLynne2020-05-10
| | | | | | | This solves a huge oversight - it lets users reliably use their own AVVulkanDeviceContext. Otherwise, the extensions supplied and enabled are not discoverable by anything outside of hwcontext_vulkan. Also clarifies that any user-supplied VkInstance must be at least 1.1.
* hwcontext_vulkan: only use one semaphore per imageLynne2020-04-07
| | | | | | The idea was to allow separate planes to be filtered independently, however, in hindsight, literaly nothing uses separate per-plane semaphores and it would only work when each plane is backed by separate device memory.
* lavu: add Vulkan hwcontext codeLynne2020-02-04
This commit adds the necessary code to initialize and use a Vulkan device within the hwcontext libavutil framework. Currently direct mapping to VAAPI and DRM frames is functional, and transfers to CUDA and native frames are supported. Lets hope the future Vulkan video decode extension fits well within this framework.