• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_
2 #define VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_ 1
3 
4 /*
5 ** Copyright 2015-2022 The Khronos Group Inc.
6 **
7 ** SPDX-License-Identifier: Apache-2.0
8 */
9 
10 /*
11 ** This header is generated from the Khronos Vulkan XML API Registry.
12 **
13 */
14 
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 
21 
22 #define vulkan_video_codec_h265std_encode 1
23 // Vulkan 0.9 provisional Vulkan video H.265 encode std specification version number
24 #define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_0_9_9 VK_MAKE_VIDEO_STD_VERSION(0, 9, 9)
25 
26 #define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_0_9_9
27 #define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265_encode"
28 typedef struct StdVideoEncodeH265WeightTableFlags {
29     uint16_t    luma_weight_l0_flag;
30     uint16_t    chroma_weight_l0_flag;
31     uint16_t    luma_weight_l1_flag;
32     uint16_t    chroma_weight_l1_flag;
33 } StdVideoEncodeH265WeightTableFlags;
34 
35 typedef struct StdVideoEncodeH265WeightTable {
36     StdVideoEncodeH265WeightTableFlags    flags;
37     uint8_t                               luma_log2_weight_denom;
38     int8_t                                delta_chroma_log2_weight_denom;
39     int8_t                                delta_luma_weight_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF];
40     int8_t                                luma_offset_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF];
41     int8_t                                delta_chroma_weight_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
42     int8_t                                delta_chroma_offset_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
43     int8_t                                delta_luma_weight_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF];
44     int8_t                                luma_offset_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF];
45     int8_t                                delta_chroma_weight_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
46     int8_t                                delta_chroma_offset_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
47 } StdVideoEncodeH265WeightTable;
48 
49 typedef struct StdVideoEncodeH265SliceSegmentHeaderFlags {
50     uint32_t    first_slice_segment_in_pic_flag : 1;
51     uint32_t    no_output_of_prior_pics_flag : 1;
52     uint32_t    dependent_slice_segment_flag : 1;
53     uint32_t    pic_output_flag : 1;
54     uint32_t    short_term_ref_pic_set_sps_flag : 1;
55     uint32_t    slice_temporal_mvp_enable_flag : 1;
56     uint32_t    slice_sao_luma_flag : 1;
57     uint32_t    slice_sao_chroma_flag : 1;
58     uint32_t    num_ref_idx_active_override_flag : 1;
59     uint32_t    mvd_l1_zero_flag : 1;
60     uint32_t    cabac_init_flag : 1;
61     uint32_t    cu_chroma_qp_offset_enabled_flag : 1;
62     uint32_t    deblocking_filter_override_flag : 1;
63     uint32_t    slice_deblocking_filter_disabled_flag : 1;
64     uint32_t    collocated_from_l0_flag : 1;
65     uint32_t    slice_loop_filter_across_slices_enabled_flag : 1;
66 } StdVideoEncodeH265SliceSegmentHeaderFlags;
67 
68 typedef struct StdVideoEncodeH265SliceSegmentLongTermRefPics {
69     uint8_t     num_long_term_sps;
70     uint8_t     num_long_term_pics;
71     uint8_t     lt_idx_sps[STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS];
72     uint8_t     poc_lsb_lt[STD_VIDEO_H265_MAX_LONG_TERM_PICS];
73     uint16_t    used_by_curr_pic_lt_flag;
74     uint8_t     delta_poc_msb_present_flag[STD_VIDEO_H265_MAX_DELTA_POC];
75     uint8_t     delta_poc_msb_cycle_lt[STD_VIDEO_H265_MAX_DELTA_POC];
76 } StdVideoEncodeH265SliceSegmentLongTermRefPics;
77 
78 typedef struct StdVideoEncodeH265SliceSegmentHeader {
79     StdVideoEncodeH265SliceSegmentHeaderFlags               flags;
80     StdVideoH265SliceType                                   slice_type;
81     uint32_t                                                slice_segment_address;
82     uint8_t                                                 short_term_ref_pic_set_idx;
83     uint8_t                                                 collocated_ref_idx;
84     uint8_t                                                 num_ref_idx_l0_active_minus1;
85     uint8_t                                                 num_ref_idx_l1_active_minus1;
86     uint8_t                                                 MaxNumMergeCand;
87     int8_t                                                  slice_cb_qp_offset;
88     int8_t                                                  slice_cr_qp_offset;
89     int8_t                                                  slice_beta_offset_div2;
90     int8_t                                                  slice_tc_offset_div2;
91     int8_t                                                  slice_act_y_qp_offset;
92     int8_t                                                  slice_act_cb_qp_offset;
93     int8_t                                                  slice_act_cr_qp_offset;
94     const StdVideoH265ShortTermRefPicSet*                   pShortTermRefPicSet;
95     const StdVideoEncodeH265SliceSegmentLongTermRefPics*    pLongTermRefPics;
96     const StdVideoEncodeH265WeightTable*                    pWeightTable;
97 } StdVideoEncodeH265SliceSegmentHeader;
98 
99 typedef struct StdVideoEncodeH265ReferenceModificationFlags {
100     uint32_t    ref_pic_list_modification_flag_l0 : 1;
101     uint32_t    ref_pic_list_modification_flag_l1 : 1;
102 } StdVideoEncodeH265ReferenceModificationFlags;
103 
104 typedef struct StdVideoEncodeH265ReferenceModifications {
105     StdVideoEncodeH265ReferenceModificationFlags    flags;
106     uint8_t                                         referenceList0ModificationsCount;
107     const uint8_t*                                  pReferenceList0Modifications;
108     uint8_t                                         referenceList1ModificationsCount;
109     const uint8_t*                                  pReferenceList1Modifications;
110 } StdVideoEncodeH265ReferenceModifications;
111 
112 typedef struct StdVideoEncodeH265PictureInfoFlags {
113     uint32_t    is_reference_flag : 1;
114     uint32_t    IrapPicFlag : 1;
115     uint32_t    long_term_flag : 1;
116     uint32_t    discardable_flag : 1;
117     uint32_t    cross_layer_bla_flag : 1;
118 } StdVideoEncodeH265PictureInfoFlags;
119 
120 typedef struct StdVideoEncodeH265PictureInfo {
121     StdVideoEncodeH265PictureInfoFlags    flags;
122     StdVideoH265PictureType               PictureType;
123     uint8_t                               sps_video_parameter_set_id;
124     uint8_t                               pps_seq_parameter_set_id;
125     uint8_t                               pps_pic_parameter_set_id;
126     int32_t                               PicOrderCntVal;
127     uint8_t                               TemporalId;
128 } StdVideoEncodeH265PictureInfo;
129 
130 typedef struct StdVideoEncodeH265ReferenceInfoFlags {
131     uint32_t    used_for_long_term_reference : 1;
132     uint32_t    unused_for_reference : 1;
133 } StdVideoEncodeH265ReferenceInfoFlags;
134 
135 typedef struct StdVideoEncodeH265ReferenceInfo {
136     StdVideoEncodeH265ReferenceInfoFlags    flags;
137     int32_t                                 PicOrderCntVal;
138     uint8_t                                 TemporalId;
139 } StdVideoEncodeH265ReferenceInfo;
140 
141 
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 #endif
147