• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2018-2024 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5include::{generated}/meta/{refprefix}VK_KHR_video_encode_queue.adoc[]
6
7=== Other Extension Metadata
8
9*Last Modified Date*::
10    2023-12-05
11*IP Status*::
12    No known IP claims.
13*Contributors*::
14  - Ahmed Abdelkhalek, AMD
15  - Damien Kessler, NVIDIA
16  - George Hao, AMD
17  - Jake Beju, AMD
18  - Peter Fang, AMD
19  - Piers Daniell, NVIDIA
20  - Srinath Kumarapuram, NVIDIA
21  - Thomas J. Meier, NVIDIA
22  - Tony Zlatinski, NVIDIA
23  - Ravi Chaudhary, NVIDIA
24  - Yang Liu, AMD
25  - Daniel Rakos, RasterGrid
26  - Ping Liu, Intel
27  - Aidan Fabius, Core Avionics & Industrial Inc.
28  - Lynne Iribarren, Independent
29
30=== Description
31
32This extension builds upon the `apiext:VK_KHR_video_queue` extension by
33adding common APIs specific to video encoding and thus enabling
34implementations to expose queue families supporting video encode operations.
35
36More specifically, it adds video encode specific capabilities and a new
37command buffer command that allows recording video encode operations against
38a video session.
39
40This extension is to be used in conjunction with other codec specific video
41encode extensions that enable encoding video sequences of specific video
42compression standards.
43
44include::{generated}/interfaces/VK_KHR_video_encode_queue.adoc[]
45
46=== Version History
47
48  * Revision 1, 2018-07-23 (Ahmed Abdelkhalek)
49  ** Initial draft
50  * Revision 1.1, 10/29/2019 (Tony Zlatinski)
51  ** Updated the reserved spec tokens and renamed VkVideoEncoderKHR to
52     VkVideoSessionKHR
53  * Revision 1.6, Jan 08 2020 (Tony Zlatinski)
54  ** API unify with the video_decode_queue spec
55  * Revision 2, March 29 2021 (Tony Zlatinski)
56  ** Spec and API updates.
57  * Revision 3, 2021-09-30 (Jon Leech)
58  ** Add interaction with `apiext:VK_KHR_format_feature_flags2` to `vk.xml`
59  * Revision 4, 2022-02-10 (Ahmed Abdelkhalek)
60  ** Updates to encode capability interface
61  * Revision 5, 2022-03-31 (Ahmed Abdelkhalek)
62  ** Remove redundant VkVideoEncodeInfoKHR.codedExtent
63  * Revision 6, 2022-07-18 (Daniel Rakos)
64  ** Remove `VkVideoEncodeRateControlFlagBitsKHR` and
65     `VkVideoEncodeFlagBitsKHR` as they contain no defined flags for now
66  ** Add `VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR` and
67     `VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_LAYER_BIT_KHR` to indicate
68     rate control and rate control layer change requests, respectively, in
69     video coding control operations
70  * Revision 7, 2022-08-12 (Daniel Rakos)
71  ** Add VkVideoEncodeUsageInfoKHR structure and related flags
72  * Revision 8, 2023-03-06 (Daniel Rakos)
73  ** Replace `VK_QUERY_TYPE_VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR` queries
74     with more generic `VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR` queries
75     that can be extended in the future with more feedback values
76  ** Rename `dstBitstreamBuffer`, `dstBitstreamBufferOffset`, and
77     `dstBitstreamBufferMaxRange` in `VkVideoEncodeInfoKHR` to `dstBuffer`,
78     `dstBufferOffset`, and `dstBufferRange`, respectively, for consistency
79     with the naming convention in the video decode extensions
80  ** Change the type of `rateControlLayerCount` and `qualityLevelCount` in
81     `VkVideoEncodeCapabilitiesKHR` from `uint8_t` to `uint32_t` and rename
82     them to `maxRateControlLayers` and `maxQualityLevels`, respectively
83  ** Change the type of `averageBitrate` and `maxBitrate` in
84     `VkVideoEncodeRateControlLayerInfoKHR`` from `uint32_t` to `uint64_t`
85  ** Fixed the definition of rate control flag bits and added the new
86     `VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR` constant to indicate
87     implementation-specific automatic rate control
88  ** Change the type of `VkVideoEncodeRateControlInfoKHR::layerCount` from
89     `uint8_t` to `uint32_t`
90  ** Rename `pLayerConfigs` to `pLayers` in
91     `VkVideoEncodeRateControlInfoKHR`
92  * Revision 9, 2023-03-28 (Daniel Rakos)
93  ** Removed `VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_LAYER_BIT_KHR` and
94     the ability to change the state of individual rate control layers
95  ** Added new `VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR`
96     flag to video encode feedback queries
97  ** Added new video session create flag
98     `VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS_BIT_KHR`
99     to opt-in to video session and encoding parameter optimizations
100  ** Added the `vkGetEncodedVideoSessionParametersKHR` command to enable
101     retrieving encoded video session parameter data
102  ** Moved `virtualBufferSizeInMs` and `initialVirtualBufferSizeInMs` from
103     `VkVideoEncodeRateControlLayerInfoKHR` to
104     `VkVideoEncodeRateControlInfoKHR`
105  ** Added `maxBitrate` capability
106  ** Renamed `inputImageDataFillAlignment` capability to
107     `encodeInputPictureGranularity` to better reflect its purpose
108  ** Added new `vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR`
109     command and related structures to enable querying recommended settings
110     for video encode quality levels
111  ** Added `VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR` flag and
112     `VkVideoEncodeQualityLevelInfoKHR` structure to allow controlling video
113     encode quality level and removed `qualityLevel` from the encode
114     operation parameters
115  * Revision 10, 2023-07-19 (Daniel Rakos)
116  ** Added `VK_QUERY_RESULT_STATUS_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_KHR`
117     query result status code and the related capability flag
118     `VK_VIDEO_ENCODE_CAPABILITY_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_DETECTION_BIT_KHR`
119  * Revision 11, 2023-09-04 (Daniel Rakos)
120  ** Extension is no longer provisional
121  * Revision 12, 2023-12-05 (Daniel Rakos)
122  ** Require the specification of a reconstructed picture in all cases,
123     except when the video session was created with no DPB slots to match
124     shipping implementations
125  ** Make DPB slot activation behavior codec-specific to continue allowing
126     application control over reference picture setup now that a
127     reconstructed picture is always mandatory
128