VkVideoEncodeH264RateControlInfoEXT(3)

# VkVideoEncodeH264RateControlInfoEXT(3) Manual Page

## Name

VkVideoEncodeH264RateControlInfoEXT - Structure describing H.264 stream rate control parameters

Loading… please wait.

## C Specification

The `VkVideoEncodeH264RateControlInfoEXT` structure is defined as:

    // Provided by VK_EXT_video_encode_h264
    typedef struct VkVideoEncodeH264RateControlInfoEXT {
        VkStructureType                                     sType;
        const void*                                         pNext;
        uint32_t                                            gopFrameCount;
        uint32_t                                            idrPeriod;
        uint32_t                                            consecutiveBFrameCount;
        VkVideoEncodeH264RateControlStructureFlagBitsEXT    rateControlStructure;
        uint8_t                                             temporalLayerCount;
    } VkVideoEncodeH264RateControlInfoEXT;

## Members

- `sType` is the type of this structure.

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

- `gopFrameCount` is the number of frames contained within the group of pictures (GOP), starting from an intra frame and until the next intra frame. If it is set to 0, the implementation chooses a suitable value. If it is set to `UINT32_MAX`, the GOP length is treated as infinite.

- `idrPeriod` is the interval, in terms of number of frames, between two IDR frames. If it is set to 0, the implementation chooses a suitable value. If it is set to `UINT32_MAX`, the IDR period is treated as infinite.

- `consecutiveBFrameCount` is the number of consecutive B-frames between I- and/or P-frames within the GOP.

- `rateControlStructure` is a VkVideoEncodeH264RateControlStructureFlagBitsEXT value specifying the expected encode stream reference structure, to aid in rate control calculations.

- `temporalLayerCount` specifies the number of temporal layers enabled in the stream.

## Description

In order to provide H.264-specific stream rate control parameters, add a `VkVideoEncodeH264RateControlInfoEXT` structure to the `pNext` chain of the VkVideoEncodeRateControlInfoKHR structure in the `pNext` chain of the VkVideoCodingControlInfoKHR structure passed to the vkCmdControlVideoCodingKHR command.

The parameters from this structure act as a guidance for implementations to apply various rate control heuristics.

It is possible to infer the picture type to be used when encoding a frame, on the basis of the values provided for `consecutiveBFrameCount`, `idrPeriod`, and `gopFrameCount`, but this inferred picture type will not be used by implementations to override the picture type provided in vkCmdEncodeVideoKHR. Additionally, it is not required for the video session to be reset if the inferred picture type does not match the actual picture type.

Valid Usage (Implicit)

- VUID-VkVideoEncodeH264RateControlInfoEXT-sType-sType
  `sType` must be `VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT`

- VUID-VkVideoEncodeH264RateControlInfoEXT-rateControlStructure-parameter
  `rateControlStructure` must be a valid VkVideoEncodeH264RateControlStructureFlagBitsEXT value

## See Also

VK_EXT_video_encode_h264, VkStructureType, VkVideoEncodeH264RateControlStructureFlagBitsEXT

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