VkVideoEncodeInfoKHR(3)

# VkVideoEncodeInfoKHR(3) Manual Page

## Name

VkVideoEncodeInfoKHR - Structure to chain codec-specific structures to

Loading… please wait.

## C Specification

The VkVideoEncodeInfoKHR structure is defined as:

    // Provided by VK_KHR_video_encode_queue
    typedef struct VkVideoEncodeInfoKHR {
        VkStructureType                   sType;
        const void*                       pNext;
        VkVideoEncodeFlagsKHR             flags;
        uint32_t                          qualityLevel;
        VkExtent2D                        codedExtent;
        VkBuffer                          dstBitstreamBuffer;
        VkDeviceSize                      dstBitstreamBufferOffset;
        VkDeviceSize                      dstBitstreamBufferMaxRange;
        VkVideoPictureResourceKHR         srcPictureResource;
        const VkVideoReferenceSlotKHR*    pSetupReferenceSlot;
        uint32_t                          referenceSlotCount;
        const VkVideoReferenceSlotKHR*    pReferenceSlots;
    } VkVideoEncodeInfoKHR;

## Members

Multiple vkCmdEncodeVideoKHR commands may be recorded within a Vulkan Video Encode Context. The execution of each vkCmdEncodeVideoKHR command will result in generating codec-specific bitstream units. These bitstream units are generated consecutively into the bitstream buffer specified in `dstBitstreamBuffer` of VkVideoEncodeInfoKHR within the vkCmdBeginVideoCodingKHR command. The produced bitstream is the sum of all these bitstream units, including any padding between the bitstream units. Any bitstream padding must be filled with data compliant to the codec standard so as not to cause any syntax errors during decoding of the bitstream units with the padding included. The range of the bitstream buffer written can be queried via video encode bitstream buffer range queries.

## Description

Valid Usage (Implicit)

- VUID-VkVideoEncodeInfoKHR-sType-sType
  `sType` must be `VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR`

- VUID-VkVideoEncodeInfoKHR-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 VkVideoEncodeH264EmitPictureParametersEXT or VkVideoEncodeH264VclFrameInfoEXT

- VUID-VkVideoEncodeInfoKHR-sType-unique
  The `sType` value of each struct in the `pNext` chain must be unique

- VUID-VkVideoEncodeInfoKHR-flags-parameter
  `flags` must be a valid combination of VkVideoEncodeFlagBitsKHR values

- VUID-VkVideoEncodeInfoKHR-dstBitstreamBuffer-parameter
  `dstBitstreamBuffer` must be a valid VkBuffer handle

- VUID-VkVideoEncodeInfoKHR-srcPictureResource-parameter
  `srcPictureResource` must be a valid VkVideoPictureResourceKHR structure

- VUID-VkVideoEncodeInfoKHR-pSetupReferenceSlot-parameter
  `pSetupReferenceSlot` must be a valid pointer to a valid VkVideoReferenceSlotKHR structure

- VUID-VkVideoEncodeInfoKHR-pReferenceSlots-parameter
  `pReferenceSlots` must be a valid pointer to an array of `referenceSlotCount` valid VkVideoReferenceSlotKHR structures

- VUID-VkVideoEncodeInfoKHR-referenceSlotCount-arraylength
  `referenceSlotCount` must be greater than `0`

## See Also

VkBuffer, `VkDeviceSize`, VkExtent2D, VkStructureType, VkVideoEncodeFlagsKHR, VkVideoPictureResourceKHR, VkVideoReferenceSlotKHR, vkCmdEncodeVideoKHR

## 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-2021 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0