VkVideoCodingControlInfoKHR(3)

# VkVideoCodingControlInfoKHR(3) Manual Page

## Name

VkVideoCodingControlInfoKHR - Structure specifying parameters of coding control

Loading… please wait.

## C Specification

The VkVideoCodingControlInfoKHR structure is defined as:

    // Provided by VK_KHR_video_queue
    typedef struct VkVideoCodingControlInfoKHR {
        VkStructureType                 sType;
        const void*                     pNext;
        VkVideoCodingControlFlagsKHR    flags;
    } VkVideoCodingControlInfoKHR;

## Members

- `sType` is the type of this structure.

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

- `flags` is a bitmask of VkVideoCodingControlFlagsKHR specifying control flags.

## Description

A newly created video session must be reset before use for video decode or encode operations by including `VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR` in `flags`. The reset operation returns all session DPB slots to the unused state (see DPB Slot States).

For encode sessions, the reset operation returns rate control configuration to implementation default settings.

After decode or encode operations are performed on a session, the reset operation may be used to return the video session object to the same initial state as after the reset of a newly created video session. This may be used when different video sequences are processed with the same video session object.

Valid Usage

- VUID-VkVideoCodingControlInfoKHR-flags-07016
  `flags` must include at least one bit

- VUID-VkVideoCodingControlInfoKHR-flags-07017
  If the bound video session object is in uninitialized state, then `flags` must include `VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR`

- VUID-VkVideoCodingControlInfoKHR-flags-07018
  If `flags` includes `VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR`, then the `pNext` chain must include a valid VkVideoEncodeRateControlInfoKHR structure

- VUID-VkVideoCodingControlInfoKHR-flags-07019
  If `flags` includes `VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_LAYER_BIT_KHR`, then the `pNext` chain must include a valid VkVideoEncodeRateControlLayerInfoKHR structure

- VUID-VkVideoCodingControlInfoKHR-flags-07020
  If `flags` includes `VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR`, then it must not also include `VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_LAYER_BIT_KHR`

- VUID-VkVideoCodingControlInfoKHR-flags-07021
  If `flags` includes `VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR`, the `rateControlMode` member of VkVideoEncodeRateControlInfoKHR included in the `pNext` chain is not `VK_VIDEO_ENCODE_RATE_CONTROL_MODE_NONE_BIT_KHR`, and the bound video session was created with VkVideoProfileInfoKHR::`videoCodecOperation` set to `VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT`, then the `pNext` chain must include a VkVideoEncodeH264RateControlInfoEXT structure

- VUID-VkVideoCodingControlInfoKHR-pNext-07022
  If the `pNext` chain includes a VkVideoEncodeRateControlInfoKHR, and VkVideoEncodeRateControlInfoKHR::`layerCount` is greater than `1`, then VkVideoEncodeH264RateControlInfoEXT::`temporalLayerCount` must be equal to `layerCount`

- VUID-VkVideoCodingControlInfoKHR-flags-07023
  If `flags` includes `VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_LAYER_BIT_KHR` and the bound video session was created with VkVideoProfileInfoKHR::`videoCodecOperation` set to `VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT`, then the `pNext` chain must include a VkVideoEncodeH264RateControlLayerInfoEXT structure

- VUID-VkVideoCodingControlInfoKHR-flags-07024
  If `flags` includes `VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR`, the `rateControlMode` member of VkVideoEncodeRateControlInfoKHR included in the `pNext` chain is not `VK_VIDEO_ENCODE_RATE_CONTROL_MODE_NONE_BIT_KHR`, and the bound video session was created with VkVideoProfileInfoKHR::`videoCodecOperation` set to `VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_EXT`, then the `pNext` chain must include a VkVideoEncodeH265RateControlInfoEXT structure

- VUID-VkVideoCodingControlInfoKHR-pNext-07025
  If the `pNext` chain includes a VkVideoEncodeRateControlInfoKHR, and VkVideoEncodeRateControlInfoKHR::`layerCount` is greater than `1`, then VkVideoEncodeH265RateControlInfoEXT::`subLayerCount` must be equal to `layerCount`

- VUID-VkVideoCodingControlInfoKHR-flags-07026
  If `flags` includes `VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_LAYER_BIT_KHR` and the bound video session was created with VkVideoProfileInfoKHR::`videoCodecOperation` set to `VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_EXT`, then the `pNext` chain must include a VkVideoEncodeH265RateControlLayerInfoEXT structure

Valid Usage (Implicit)

- VUID-VkVideoCodingControlInfoKHR-sType-sType
  `sType` must be `VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR`

- VUID-VkVideoCodingControlInfoKHR-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 VkVideoEncodeH264RateControlInfoEXT, VkVideoEncodeH264RateControlLayerInfoEXT, VkVideoEncodeH265RateControlInfoEXT, VkVideoEncodeH265RateControlLayerInfoEXT, VkVideoEncodeRateControlInfoKHR, or VkVideoEncodeRateControlLayerInfoKHR

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

- VUID-VkVideoCodingControlInfoKHR-flags-parameter
  `flags` must be a valid combination of VkVideoCodingControlFlagBitsKHR values

## See Also

VK_KHR_video_queue, VkStructureType, VkVideoCodingControlFlagsKHR, vkCmdControlVideoCodingKHR

## 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