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-flags-10398

If flags includes VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, then videoMaintenance2 must be enabled

VUID-VkVideoSessionCreateInfoKHR-flags-10399

If flags includes VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, then pVideoProfile→videoCodecOperation must specify a decode operation

VUID-VkVideoSessionCreateInfoKHR-flags-10264

If flags includes VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR, then the videoEncodeQuantizationMap feature must be enabled

VUID-VkVideoSessionCreateInfoKHR-flags-10265

If flags includes VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR or VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR, then pVideoProfile→videoCodecOperation must specify an encode operation

VUID-VkVideoSessionCreateInfoKHR-flags-10266

If flags includes VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR, then it must not also include VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR

VUID-VkVideoSessionCreateInfoKHR-flags-10267

If VkVideoEncodeCapabilitiesKHR::flags does not include VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by pVideoProfile, then flags must not include VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR

VUID-VkVideoSessionCreateInfoKHR-flags-10268

If VkVideoEncodeCapabilitiesKHR::flags does not include VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by pVideoProfile, then flags must not include VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR

VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-11759

pVideoProfile→videoCodecOperation must be supported by the queue family index specified in queueFamilyIndex, as reported in VkQueueFamilyVideoPropertiesKHR::videoCodecOperations

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-pVideoProfile-10835

If pVideoProfile→videoCodecOperation specifies an encode operation, the pNext chain of this structure includes a VkVideoEncodeSessionIntraRefreshCreateInfoKHR structure, and its intraRefreshMode member is not VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_NONE_KHR, then the videoEncodeIntraRefresh feature must be enabled

VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-10836

If pVideoProfile→videoCodecOperation specifies an encode operation, the pNext chain of this structure includes a VkVideoEncodeSessionIntraRefreshCreateInfoKHR structure, and its intraRefreshMode member is not VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_NONE_KHR, then intraRefreshMode must specify one of the bits included in VkVideoEncodeIntraRefreshCapabilitiesKHR::intraRefreshModes, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile specified by 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-10793

If pVideoProfile→videoCodecOperation is VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR, then the videoDecodeVP9 feature must be enabled

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

VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-10269

If pVideoProfile→videoCodecOperation is VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the videoEncodeAV1 feature must be enabled

VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-10270

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

VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-10923

If the pVideoProfile→pNext chain includes a VkVideoEncodeProfileRgbConversionInfoVALVE structure, then the videoEncodeRgbConversion feature must be enabled

VUID-VkVideoSessionCreateInfoKHR-pNext-10924

If a VkVideoEncodeProfileRgbConversionInfoVALVE structure is included in the pNext chain of pVideoProfile and VkVideoEncodeProfileRgbConversionInfoVALVE::performEncodeRgbConversion is enabled, a VkVideoEncodeSessionRgbConversionCreateInfoVALVE structure must be included in the pNext chain of VkVideoSessionCreateInfoKHR

Valid Usage (Implicit)

VUID-VkVideoSessionCreateInfoKHR-sType-sType

sType must be VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR

VUID-VkVideoSessionCreateInfoKHR-sType-unique

The sType value of each structure 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