C Specification

The VkVideoBeginCodingInfoKHR structure is defined as:

// Provided by VK_KHR_video_queue
typedef struct VkVideoBeginCodingInfoKHR {
    VkStructureType                       sType;
    const void*                           pNext;
    VkVideoBeginCodingFlagsKHR            flags;
    VkVideoSessionKHR                     videoSession;
    VkVideoSessionParametersKHR           videoSessionParameters;
    uint32_t                              referenceSlotCount;
    const VkVideoReferenceSlotInfoKHR*    pReferenceSlots;
} VkVideoBeginCodingInfoKHR;

Members

  • sType is a VkStructureType value identifying this structure.

  • pNext is NULL or a pointer to a structure extending this structure.

  • flags is reserved for future use.

  • videoSession is the video session object to be bound for the processing of the video commands.

  • videoSessionParameters is VK_NULL_HANDLE or a handle of a VkVideoSessionParametersKHR object to be used for the processing of the video commands. If VK_NULL_HANDLE, then no video session parameters object is bound for the duration of the video coding scope.

  • referenceSlotCount is the number of elements in the pReferenceSlots array.

  • pReferenceSlots is a pointer to an array of VkVideoReferenceSlotInfoKHR structures specifying the information used to determine the set of bound reference picture resources for the video coding scope and their initial association with DPB slot indices.

Description

Limiting values are defined below that are referenced by the relevant valid usage statements of this structure.

Valid Usage
  • VUID-VkVideoBeginCodingInfoKHR-videoSession-07237
    videoSession must have memory bound to all of its memory bindings returned by vkGetVideoSessionMemoryRequirementsKHR for videoSession

  • VUID-VkVideoBeginCodingInfoKHR-slotIndex-04856
    Each non-negative VkVideoReferenceSlotInfoKHR::slotIndex specified in the elements of pReferenceSlots must be less than the VkVideoSessionCreateInfoKHR::maxDpbSlots specified when videoSession was created

  • VUID-VkVideoBeginCodingInfoKHR-pPictureResource-07238
    Each video picture resource corresponding to any non-NULL pPictureResource member specified in the elements of pReferenceSlots must be unique within pReferenceSlots

  • VUID-VkVideoBeginCodingInfoKHR-pPictureResource-07240
    If the pPictureResource member of any element of pReferenceSlots is not NULL, then the image view specified in pPictureResource->imageViewBinding for that element must be compatible with the video profile videoSession was created with

  • VUID-VkVideoBeginCodingInfoKHR-pPictureResource-07241
    If the pPictureResource member of any element of pReferenceSlots is not NULL, then the format of the image view specified in pPictureResource->imageViewBinding for that element must match the VkVideoSessionCreateInfoKHR::referencePictureFormat videoSession was created with

  • VUID-VkVideoBeginCodingInfoKHR-pPictureResource-07242
    If the pPictureResource member of any element of pReferenceSlots is not NULL, then its codedOffset member must be an integer multiple of codedOffsetGranularity

  • VUID-VkVideoBeginCodingInfoKHR-pPictureResource-07243
    If the pPictureResource member of any element of pReferenceSlots is not NULL, then its codedExtent member must be between minCodedExtent and maxCodedExtent, inclusive, videoSession was created with

  • VUID-VkVideoBeginCodingInfoKHR-flags-07244
    If VkVideoCapabilitiesKHR::flags does not include VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR, as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile videoSession was created with, then pPictureResource->imageViewBinding of all elements of pReferenceSlots with a non-NULL pPictureResource member must specify image views created from the same image

  • VUID-VkVideoBeginCodingInfoKHR-slotIndex-07245
    If videoSession was created with a decode operation and the slotIndex member of any element of pReferenceSlots is not negative, then the image view specified in pPictureResource->imageViewBinding for that element must have been created with VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR

  • VUID-VkVideoBeginCodingInfoKHR-slotIndex-07246
    If videoSession was created with an encode operation and the slotIndex member of any element of pReferenceSlots is not negative, then the image view specified in pPictureResource->imageViewBinding for that element must have been created with VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR

  • VUID-VkVideoBeginCodingInfoKHR-videoSession-07247
    If videoSession was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then videoSessionParameters must not be VK_NULL_HANDLE

  • VUID-VkVideoBeginCodingInfoKHR-videoSession-07248
    If videoSession was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then videoSessionParameters must not be VK_NULL_HANDLE

  • VUID-VkVideoBeginCodingInfoKHR-videoSession-09261
    If videoSession was created with the video codec operation VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then videoSessionParameters must not be VK_NULL_HANDLE

  • VUID-VkVideoBeginCodingInfoKHR-videoSession-07249
    If videoSession was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, then videoSessionParameters must not be VK_NULL_HANDLE

  • VUID-VkVideoBeginCodingInfoKHR-videoSession-07250
    If videoSession was created with the video codec operation VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, then videoSessionParameters must not be VK_NULL_HANDLE

  • VUID-VkVideoBeginCodingInfoKHR-videoSessionParameters-04857
    If videoSessionParameters is not VK_NULL_HANDLE, it must have been created with videoSession specified in VkVideoSessionParametersCreateInfoKHR::videoSession

Valid Usage (Implicit)
  • VUID-VkVideoBeginCodingInfoKHR-sType-sType
    sType must be VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR

  • VUID-VkVideoBeginCodingInfoKHR-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 VkVideoEncodeH264GopRemainingFrameInfoKHR, VkVideoEncodeH264RateControlInfoKHR, VkVideoEncodeH265GopRemainingFrameInfoKHR, VkVideoEncodeH265RateControlInfoKHR, or VkVideoEncodeRateControlInfoKHR

  • VUID-VkVideoBeginCodingInfoKHR-sType-unique
    The sType value of each struct in the pNext chain must be unique

  • VUID-VkVideoBeginCodingInfoKHR-flags-zerobitmask
    flags must be 0

  • VUID-VkVideoBeginCodingInfoKHR-videoSession-parameter
    videoSession must be a valid VkVideoSessionKHR handle

  • VUID-VkVideoBeginCodingInfoKHR-videoSessionParameters-parameter
    If videoSessionParameters is not VK_NULL_HANDLE, videoSessionParameters must be a valid VkVideoSessionParametersKHR handle

  • VUID-VkVideoBeginCodingInfoKHR-pReferenceSlots-parameter
    If referenceSlotCount is not 0, pReferenceSlots must be a valid pointer to an array of referenceSlotCount valid VkVideoReferenceSlotInfoKHR structures

  • VUID-VkVideoBeginCodingInfoKHR-videoSessionParameters-parent
    If videoSessionParameters is a valid handle, it must have been created, allocated, or retrieved from videoSession

  • VUID-VkVideoBeginCodingInfoKHR-commonparent
    Both of videoSession, and videoSessionParameters that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

See Also

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 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0