VkVideoSessionCreateInfoKHR(3)

# VkVideoSessionCreateInfoKHR(3) Manual Page

## Name

VkVideoSessionCreateInfoKHR - Structure specifying parameters of a newly created video decode session

Loading… please wait.

## C Specification

The VkVideoSessionCreateInfoKHR structure is defined as:

    // Provided by VK_KHR_video_queue
    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;

## Members

- `sType` is the type of this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `queueFamilyIndex` is the queue family of the created video session.

- `flags` is a bitmask of VkVideoSessionCreateFlagBitsKHR specifying creation flags.

- `pVideoProfile` is a pointer to a VkVideoProfileInfoKHR structure.

- `pictureFormat` is the format of the image views representing decoded Output or encoded Input pictures.

- `maxCodedExtent` is the maximum width and height of the coded pictures that this instance will be able to support.

- `referencePicturesFormat` is the format of the DPB image views representing the Reference Pictures.

- `maxDpbSlots` is the maximum number of DPB Slots that can be activated with associated Video Picture Resources for the created video session.

- `maxActiveReferencePictures` is the maximum number of active DPB Slots that can be used as Dpb or Reconstructed Reference Pictures within a single decode or encode operation for the created video session.

- `pStdHeaderVersion` is a pointer to a VkExtensionProperties structure requesting the Video Std header version to use for `codecOperation` in `pVideoProfile`.

## Description

Valid Usage

- VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-04845
  `pVideoProfile` must be a pointer to a valid VkVideoProfileInfoKHR structure whose `pNext` chain must include a valid codec-specific profile structure

- VUID-VkVideoSessionCreateInfoKHR-maxDpbSlots-04846
  If Reference Pictures are required for use with the created video session, the `maxDpbSlots` must be set to a value bigger than `0`

- VUID-VkVideoSessionCreateInfoKHR-maxDpbSlots-04847
  `maxDpbSlots` cannot exceed the implementation reported VkVideoCapabilitiesKHR::`maxDpbSlots`

- VUID-VkVideoSessionCreateInfoKHR-maxActiveReferencePictures-04848
  If Reference Pictures are required for use with the created video session, the `maxActiveReferencePictures` must be set to a value bigger than `0`

- VUID-VkVideoSessionCreateInfoKHR-maxActiveReferencePictures-04849
  `maxActiveReferencePictures` cannot exceed the implementation reported VkVideoCapabilitiesKHR::`maxActiveReferencePictures`

- VUID-VkVideoSessionCreateInfoKHR-maxActiveReferencePictures-04850
  `maxActiveReferencePictures` cannot exceed the `maxDpbSlots`

- VUID-VkVideoSessionCreateInfoKHR-maxCodedExtent-04851
  `maxCodedExtent` cannot be smaller than VkVideoCapabilitiesKHR::`minExtent` and bigger than VkVideoCapabilitiesKHR::`maxExtent`

- VUID-VkVideoSessionCreateInfoKHR-referencePicturesFormat-04852
  If the `videoCodecOperation` member of `pVideoProfile` specifies a decode operation then `referencePicturesFormat` must be one of the supported decode DPB formats as reported by vkGetPhysicalDeviceVideoFormatPropertiesKHR in the `format` member of VkVideoFormatPropertiesKHR when called with the `imageUsage` member of its `pVideoFormatInfo` parameter containing `VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR`, and with a VkVideoProfileListInfoKHR structure chained to its `pVideoFormatInfo` parameter whose `pProfiles` member contains an entry matching `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-videoCodecOperation-06814
  If the `videoCodecOperation` member of `pVideoProfile` specifies an encode operation then `referencePicturesFormat` must be one of the supported encode DPB formats as reported by vkGetPhysicalDeviceVideoFormatPropertiesKHR in the `format` member of VkVideoFormatPropertiesKHR when called with the `imageUsage` member of its `pVideoFormatInfo` parameter containing `VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR`, and with a VkVideoProfileListInfoKHR structure chained to its `pVideoFormatInfo` parameter whose `pProfiles` member contains an entry matching `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-pictureFormat-04853
  If the `videoCodecOperation` member of `pVideoProfile` specifies a decode operation then `pictureFormat` must be one of the supported decode output formats as reported by vkGetPhysicalDeviceVideoFormatPropertiesKHR in the `format` member of VkVideoFormatPropertiesKHR when called with the `imageUsage` member of its `pVideoFormatInfo` parameter containing `VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR`, and with a VkVideoProfileListInfoKHR structure chained to its `pVideoFormatInfo` parameter whose `pProfiles` member contains an entry matching `pVideoProfile`

- VUID-VkVideoSessionCreateInfoKHR-pictureFormat-04854
  If the `videoCodecOperation` member of `pVideoProfile` specifies an encode operation then `pictureFormat` must be one of the supported encode input formats as reported by vkGetPhysicalDeviceVideoFormatPropertiesKHR in the `format` member of VkVideoFormatPropertiesKHR when called with the `imageUsage` member of its `pVideoFormatInfo` parameter containing `VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR`, and with a VkVideoProfileListInfoKHR structure chained to its `pVideoFormatInfo` parameter whose `pProfiles` member contains an entry matching `pVideoProfile`

Valid Usage (Implicit)

- VUID-VkVideoSessionCreateInfoKHR-sType-sType
  `sType` must be `VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR`

- VUID-VkVideoSessionCreateInfoKHR-pNext-pNext
  `pNext` must be `NULL`

- VUID-VkVideoSessionCreateInfoKHR-flags-parameter
  `flags` must be a valid combination of VkVideoSessionCreateFlagBitsKHR values

- VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-parameter
  `pVideoProfile` must be a valid pointer to a valid VkVideoProfileInfoKHR structure

- VUID-VkVideoSessionCreateInfoKHR-pictureFormat-parameter
  `pictureFormat` must be a valid VkFormat value

- VUID-VkVideoSessionCreateInfoKHR-referencePictureFormat-parameter
  `referencePictureFormat` must be a valid VkFormat value

- VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-parameter
  `pStdHeaderVersion` must be a valid pointer to a valid VkExtensionProperties structure

## See Also

VK_KHR_video_queue, VkExtensionProperties, VkExtent2D, VkFormat, VkStructureType, VkVideoProfileInfoKHR, VkVideoSessionCreateFlagsKHR, vkCreateVideoSessionKHR

## Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright 2014-2022 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0