Structures

VkVideoSessionCreateInfoKHR

Structure specifying parameters of a newly created video session

The VkVideoSessionCreateInfoKHR structure is defined as:

typedef struct VkVideoSessionCreateInfoKHR {
    VkStructureType sType;
    const void* pNext;
    uint32_t queueFamilyIndex;
    VkVideoSessionCreateFlagsKHR flags;
    const VkVideoProfileInfoKHR* pVideoProfile;
    VkFormat pictureFormat;
    VkExtent2D maxCodedExtent;
    VkFormat referencePictureFormat;
    uint32_t maxDpbSlots;
    uint32_t maxActiveReferencePictures;
    const VkExtensionProperties* pStdHeaderVersion;
} VkVideoSessionCreateInfoKHR;
  • sType is a VkStructureType value identifying this structure.
  • pNext is NULL or a pointer to a structure extending this structure.
  • queueFamilyIndex is the index of the queue family the created video session will be used with.
  • flags is a bitmask of VkVideoSessionCreateFlagBitsKHR specifying creation flags.
  • pVideoProfile is a pointer to a VkVideoProfileInfoKHR structure specifying the video profile the created video session will be used with.
  • pictureFormat is the image format the created video session will be used with. If pVideoProfile→videoCodecOperation specifies a decode operation, then pictureFormat is the image format of decode output pictures usable with the created video session. If pVideoProfile→videoCodecOperation specifies an encode operation, then pictureFormat is the image format of encode input pictures usable with the created video session.
  • maxCodedExtent is the maximum width and height of the coded frames the created video session will be used with.
  • referencePictureFormat is the image format of reference pictures stored in the DPB the created video session will be used with.
  • maxDpbSlots is the maximum number of DPB Slots that can be used with the created video session.
  • maxActiveReferencePictures is the maximum number of active reference pictures that can be used in a single video coding operation using the created video session.
  • pStdHeaderVersion is a pointer to a VkExtensionProperties structure requesting the Video Std header version to use for the videoCodecOperation specified in pVideoProfile.

Valid Usage

VUID-VkVideoSessionCreateInfoKHR-protectedMemory-07189

If the protectedMemory feature is not enabled or if VkVideoCapabilitiesKHR::flags does not include VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by pVideoProfile, then flags must not include VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR

VUID-VkVideoSessionCreateInfoKHR-flags-08371

If flags includes VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, then videoMaintenance1 must be enabled

VUID-VkVideoSessionCreateInfoKHR-maxDpbSlots-04847

maxDpbSlots must be less than or equal to VkVideoCapabilitiesKHR::maxDpbSlots, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by pVideoProfile

VUID-VkVideoSessionCreateInfoKHR-maxActiveReferencePictures-04849

maxActiveReferencePictures must be less than or equal to VkVideoCapabilitiesKHR::maxActiveReferencePictures, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by pVideoProfile

VUID-VkVideoSessionCreateInfoKHR-maxDpbSlots-04850

If either maxDpbSlots or maxActiveReferencePictures is 0, then both must be 0

VUID-VkVideoSessionCreateInfoKHR-maxCodedExtent-04851

maxCodedExtent must be between VkVideoCapabilitiesKHR::minCodedExtent and VkVideoCapabilitiesKHR::maxCodedExtent, inclusive, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by pVideoProfile

VUID-VkVideoSessionCreateInfoKHR-referencePictureFormat-04852

If pVideoProfile→videoCodecOperation specifies a decode operation and maxActiveReferencePictures is greater than 0, then referencePictureFormat must be one of the supported decode DPB formats, as returned by vkGetPhysicalDeviceVideoFormatPropertiesKHR in VkVideoFormatPropertiesKHR::format when called with the imageUsage member of its pVideoFormatInfo parameter containing VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, and with a VkVideoProfileListInfoKHR structure specified in the pNext chain of its pVideoFormatInfo parameter whose pProfiles member contains an element matching pVideoProfile

VUID-VkVideoSessionCreateInfoKHR-referencePictureFormat-06814

If pVideoProfile→videoCodecOperation specifies an encode operation and maxActiveReferencePictures is greater than 0, then referencePictureFormat must be one of the supported decode DPB formats, as returned by then referencePictureFormat must be one of the supported encode DPB formats, as returned by vkGetPhysicalDeviceVideoFormatPropertiesKHR in VkVideoFormatPropertiesKHR::format when called with the imageUsage member of its pVideoFormatInfo parameter containing VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, and with a VkVideoProfileListInfoKHR structure specified in the pNext chain of its pVideoFormatInfo parameter whose pProfiles member contains an element matching pVideoProfile

VUID-VkVideoSessionCreateInfoKHR-pictureFormat-04853

If pVideoProfile→videoCodecOperation specifies a decode operation, then pictureFormat must be one of the supported decode output formats, as returned by vkGetPhysicalDeviceVideoFormatPropertiesKHR in VkVideoFormatPropertiesKHR::format when called with the imageUsage member of its pVideoFormatInfo parameter containing VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, and with a VkVideoProfileListInfoKHR structure specified in the pNext chain of its pVideoFormatInfo parameter whose pProfiles member contains an element matching pVideoProfile

VUID-VkVideoSessionCreateInfoKHR-pictureFormat-04854

If pVideoProfile→videoCodecOperation specifies an encode operation, then pictureFormat must be one of the supported encode input formats, as returned by vkGetPhysicalDeviceVideoFormatPropertiesKHR in VkVideoFormatPropertiesKHR::format when called with the imageUsage member of its pVideoFormatInfo parameter containing VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, and with a VkVideoProfileListInfoKHR structure specified in the pNext chain of its pVideoFormatInfo parameter whose pProfiles member contains an element matching pVideoProfile

VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-07190

pStdHeaderVersion→extensionName must match VkVideoCapabilitiesKHR::stdHeaderVersion.extensionName, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by pVideoProfile

VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-07191

pStdHeaderVersion→specVersion must be less than or equal to VkVideoCapabilitiesKHR::stdHeaderVersion.specVersion, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by pVideoProfile

VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-08251

If pVideoProfile→videoCodecOperation is VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and the pNext chain of this structure includes a VkVideoEncodeH264SessionCreateInfoKHR structure, then its maxLevelIdc member must be less than or equal to VkVideoEncodeH264CapabilitiesKHR::maxLevelIdc, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified in pVideoProfile

VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-08252

If pVideoProfile→videoCodecOperation is VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the pNext chain of this structure includes a VkVideoEncodeH265SessionCreateInfoKHR structure, then its maxLevelIdc member must be less than or equal to VkVideoEncodeH265CapabilitiesKHR::maxLevelIdc, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified in pVideoProfile

Valid Usage (Implicit)

VUID-VkVideoSessionCreateInfoKHR-sType-sType

sType must be VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR

VUID-VkVideoSessionCreateInfoKHR-pNext-pNext

Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkVideoEncodeH264SessionCreateInfoKHR or VkVideoEncodeH265SessionCreateInfoKHR

VUID-VkVideoSessionCreateInfoKHR-sType-unique

The sType value of each struct in the pNext chain must be unique

VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-parameter

pVideoProfile must be a valid pointer to a valid VkVideoProfileInfoKHR structure

VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-parameter

pStdHeaderVersion must be a valid pointer to a valid VkExtensionProperties structure