Go to the documentation of this file.
19 #ifndef AVUTIL_HWCONTEXT_VULKAN_H
20 #define AVUTIL_HWCONTEXT_VULKAN_H
22 #if defined(_WIN32) && !defined(VK_USE_PLATFORM_WIN32_KHR)
23 #define VK_USE_PLATFORM_WIN32_KHR
25 #include <vulkan/vulkan.h>
46 const VkAllocationCallbacks *
alloc;
VkPhysicalDevice phys_dev
Physical device.
AVPixelFormat
Pixel format.
PFN_vkGetInstanceProcAddr get_proc_addr
Pointer to the instance-provided vkGetInstanceProcAddr loading function.
void * create_pnext
Extension data for image creation.
int queue_family_decode_index
Queue family index for video decode ops, and the amount of queues enabled.
VkInstance inst
Vulkan instance.
int queue_family_index
Queue family index for graphics operations, and the number of queues enabled for it.
const VkAllocationCallbacks * alloc
Custom memory allocator, else NULL.
VkImage img[AV_NUM_DATA_POINTERS]
Vulkan images to which the memory is bound to.
ptrdiff_t offset[AV_NUM_DATA_POINTERS]
Describes the binding offset of each plane to the VkDeviceMemory.
int queue_family_comp_index
Queue family index for compute operations and the number of queues enabled.
@ AV_VK_FRAME_FLAG_CONTIGUOUS_MEMORY
AVVkFrameFlags flags
A combination of AVVkFrameFlags.
VkDeviceMemory mem[AV_NUM_DATA_POINTERS]
Memory backing the images.
Allocated as AVHWFramesContext.hwctx, used to set pool-specific options.
Main Vulkan context, allocated as AVHWDeviceContext.hwctx.
int nb_enabled_dev_extensions
VkMemoryPropertyFlagBits flags
OR'd flags for all memory allocated.
void * alloc_pnext[AV_NUM_DATA_POINTERS]
Extension data for memory allocation.
const char *const * enabled_inst_extensions
Enabled instance extensions.
VkImageUsageFlagBits usage
Defines extra usage of output frames.
int queue_family_tx_index
Queue family index for transfer operations and the number of queues enabled.
size_t size[AV_NUM_DATA_POINTERS]
VkAccessFlagBits access[AV_NUM_DATA_POINTERS]
Updated after every barrier.
const VkFormat * av_vkfmt_from_pixfmt(enum AVPixelFormat p)
Returns the format of each image up to the number of planes for a given sw_format.
#define AV_NUM_DATA_POINTERS
AVVkFrame * av_vk_frame_alloc(void)
Allocates a single AVVkFrame and initializes everything as 0.
AVVkFrameFlags
Defines the behaviour of frame allocation.
VkSemaphore sem[AV_NUM_DATA_POINTERS]
Synchronization timeline semaphores, one for each sw_format plane.
VkImageTiling tiling
The same tiling must be used for all images in the frame.
VkImageTiling tiling
Controls the tiling of allocated frames.
uint64_t sem_value[AV_NUM_DATA_POINTERS]
Up to date semaphore value at which each image becomes accessible.
const char *const * enabled_dev_extensions
Enabled device extensions.
VkImageLayout layout[AV_NUM_DATA_POINTERS]
VkDevice act_dev
Active device.
int nb_enabled_inst_extensions
VkPhysicalDeviceFeatures2 device_features
This structure should be set to the set of features that present and enabled during device creation.
int queue_family_encode_index
Queue family index for video encode ops, and the amount of queues enabled.