C Specification

The outputModeFlags field reports the minimum bitstream generation commands that must be included between each vkCmdBeginVideoCodingKHR and vkCmdEncodeVideoKHR pair (henceforth simply begin/end pair). The various output modes are:

// Provided by VK_EXT_video_encode_h264
typedef enum VkVideoEncodeH264OutputModeFlagBitsEXT {
    VK_VIDEO_ENCODE_H264_OUTPUT_MODE_FRAME_BIT_EXT = 0x00000001,
    VK_VIDEO_ENCODE_H264_OUTPUT_MODE_SLICE_BIT_EXT = 0x00000002,
    VK_VIDEO_ENCODE_H264_OUTPUT_MODE_NON_VCL_BIT_EXT = 0x00000004,
} VkVideoEncodeH264OutputModeFlagBitsEXT;

Description

  • VK_VIDEO_ENCODE_H264_OUTPUT_MODE_FRAME_BIT_EXT indicates calls to generate all NALUs of a frame must be included within a single begin/end pair. Any non-VCL NALUs must be encoded within the same begin/end pair if VK_VIDEO_ENCODE_H264_OUTPUT_MODE_NON_VCL_BIT_EXT is not supported.

  • VK_VIDEO_ENCODE_H264_OUTPUT_MODE_SLICE_BIT_EXT indicates each begin/end pair must encode at least one slice. Any non-VCL NALUs must be encoded within the same begin/end pair as the first slice of the frame if VK_VIDEO_ENCODE_H264_OUTPUT_MODE_NON_VCL_BIT_EXT is not supported.

  • VK_VIDEO_ENCODE_H264_OUTPUT_MODE_NON_VCL_BIT_EXT indicates each begin/end pair may encode only a non-VCL NALU by itself. An implementation must support at least one of VK_VIDEO_ENCODE_H264_OUTPUT_MODE_FRAME_BIT_EXT or VK_VIDEO_ENCODE_H264_OUTPUT_MODE_SLICE_BIT_EXT.

A single begin/end pair must not encode more than a single frame.

The bitstreams of NALUs generated within a single begin/end pair are written continuously into the same bitstream buffer (any padding between the NALUs must be compliant to the H.264 standard).

The supported input modes must be coarser or equal to the supported output modes. For example, it is illegal to report slice input is supported but only frame output is supported.

An implementation must report one of the following combinations of input/output modes: Input: Frame, Output: Frame Input: Frame, Output: Frame and Non-VCL Input: Frame, Output: Slice Input: Frame, Output: Slice and Non-VCL Input: Slice, Output: Slice Input: Slice, Output: Slice and Non-VCL Input: Frame and Non-VCL, Output: Frame and Non-VCL Input: Frame and Non-VCL, Output: Slice and Non-VCL ** Input: Slice and Non-VCL, Output: Slice and Non-VCL

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

SPDX-License-Identifier: CC-BY-4.0