From: Dave Airlie Date: Wed, 24 Aug 2022 20:03:45 +0000 (+1000) Subject: vulkan: update rest of the headers to v1.3.225 X-Git-Tag: upstream/22.3.5~4299 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76bcf69e33b9452bdbc9c79e64ba4353dd57398a;p=platform%2Fupstream%2Fmesa.git vulkan: update rest of the headers to v1.3.225 Acked-by: Mike Blumenkrantz Part-of: --- diff --git a/include/vk_video/vulkan_video_codec_h264std.h b/include/vk_video/vulkan_video_codec_h264std.h index 0595698..440b09e 100644 --- a/include/vk_video/vulkan_video_codec_h264std.h +++ b/include/vk_video/vulkan_video_codec_h264std.h @@ -21,16 +21,13 @@ extern "C" { #define vulkan_video_codec_h264std 1 #include -// Vulkan 0.9 provisional Vulkan video H.264 encode and decode std specification version number -#define VK_STD_VULKAN_VIDEO_CODEC_H264_API_VERSION_0_9_5 VK_MAKE_VIDEO_STD_VERSION(0, 9, 5) // Patch version should always be set to 0 - #define STD_VIDEO_H264_CPB_CNT_LIST_SIZE 32 #define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS 6 #define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS 16 #define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS 2 #define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS 64 -#define VK_STD_VULKAN_VIDEO_CODEC_H264_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_API_VERSION_0_9_5 -#define VK_STD_VULKAN_VIDEO_CODEC_H264_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264" +#define STD_VIDEO_H264_MAX_NUM_LIST_REF 32 +#define STD_VIDEO_H264_MAX_CHROMA_PLANES 2 typedef enum StdVideoH264ChromaFormatIdc { STD_VIDEO_H264_CHROMA_FORMAT_IDC_MONOCHROME = 0, @@ -207,19 +204,19 @@ typedef struct StdVideoH264HrdParameters { } StdVideoH264HrdParameters; typedef struct StdVideoH264SequenceParameterSetVui { - StdVideoH264AspectRatioIdc aspect_ratio_idc; - uint16_t sar_width; - uint16_t sar_height; - uint8_t video_format; - uint8_t color_primaries; - uint8_t transfer_characteristics; - uint8_t matrix_coefficients; - uint32_t num_units_in_tick; - uint32_t time_scale; - StdVideoH264HrdParameters* pHrdParameters; - uint8_t max_num_reorder_frames; - uint8_t max_dec_frame_buffering; - StdVideoH264SpsVuiFlags flags; + StdVideoH264SpsVuiFlags flags; + StdVideoH264AspectRatioIdc aspect_ratio_idc; + uint16_t sar_width; + uint16_t sar_height; + uint8_t video_format; + uint8_t color_primaries; + uint8_t transfer_characteristics; + uint8_t matrix_coefficients; + uint32_t num_units_in_tick; + uint32_t time_scale; + const StdVideoH264HrdParameters* pHrdParameters; + uint8_t max_num_reorder_frames; + uint8_t max_dec_frame_buffering; } StdVideoH264SequenceParameterSetVui; typedef struct StdVideoH264SpsFlags { @@ -249,29 +246,29 @@ typedef struct StdVideoH264ScalingLists { } StdVideoH264ScalingLists; typedef struct StdVideoH264SequenceParameterSet { - StdVideoH264ProfileIdc profile_idc; - StdVideoH264Level level_idc; - uint8_t seq_parameter_set_id; - StdVideoH264ChromaFormatIdc chroma_format_idc; - uint8_t bit_depth_luma_minus8; - uint8_t bit_depth_chroma_minus8; - uint8_t log2_max_frame_num_minus4; - StdVideoH264PocType pic_order_cnt_type; - uint8_t log2_max_pic_order_cnt_lsb_minus4; - int32_t offset_for_non_ref_pic; - int32_t offset_for_top_to_bottom_field; - uint8_t num_ref_frames_in_pic_order_cnt_cycle; - uint8_t max_num_ref_frames; - uint32_t pic_width_in_mbs_minus1; - uint32_t pic_height_in_map_units_minus1; - uint32_t frame_crop_left_offset; - uint32_t frame_crop_right_offset; - uint32_t frame_crop_top_offset; - uint32_t frame_crop_bottom_offset; - StdVideoH264SpsFlags flags; - int32_t* pOffsetForRefFrame; - StdVideoH264ScalingLists* pScalingLists; - StdVideoH264SequenceParameterSetVui* pSequenceParameterSetVui; + StdVideoH264SpsFlags flags; + StdVideoH264ProfileIdc profile_idc; + StdVideoH264Level level_idc; + uint8_t seq_parameter_set_id; + StdVideoH264ChromaFormatIdc chroma_format_idc; + uint8_t bit_depth_luma_minus8; + uint8_t bit_depth_chroma_minus8; + uint8_t log2_max_frame_num_minus4; + StdVideoH264PocType pic_order_cnt_type; + uint8_t log2_max_pic_order_cnt_lsb_minus4; + int32_t offset_for_non_ref_pic; + int32_t offset_for_top_to_bottom_field; + uint8_t num_ref_frames_in_pic_order_cnt_cycle; + uint8_t max_num_ref_frames; + uint32_t pic_width_in_mbs_minus1; + uint32_t pic_height_in_map_units_minus1; + uint32_t frame_crop_left_offset; + uint32_t frame_crop_right_offset; + uint32_t frame_crop_top_offset; + uint32_t frame_crop_bottom_offset; + const int32_t* pOffsetForRefFrame; + const StdVideoH264ScalingLists* pScalingLists; + const StdVideoH264SequenceParameterSetVui* pSequenceParameterSetVui; } StdVideoH264SequenceParameterSet; typedef struct StdVideoH264PpsFlags { @@ -287,17 +284,17 @@ typedef struct StdVideoH264PpsFlags { } StdVideoH264PpsFlags; typedef struct StdVideoH264PictureParameterSet { - uint8_t seq_parameter_set_id; - uint8_t pic_parameter_set_id; - uint8_t num_ref_idx_l0_default_active_minus1; - uint8_t num_ref_idx_l1_default_active_minus1; - StdVideoH264WeightedBipredIdc weighted_bipred_idc; - int8_t pic_init_qp_minus26; - int8_t pic_init_qs_minus26; - int8_t chroma_qp_index_offset; - int8_t second_chroma_qp_index_offset; - StdVideoH264PpsFlags flags; - StdVideoH264ScalingLists* pScalingLists; + StdVideoH264PpsFlags flags; + uint8_t seq_parameter_set_id; + uint8_t pic_parameter_set_id; + uint8_t num_ref_idx_l0_default_active_minus1; + uint8_t num_ref_idx_l1_default_active_minus1; + StdVideoH264WeightedBipredIdc weighted_bipred_idc; + int8_t pic_init_qp_minus26; + int8_t pic_init_qs_minus26; + int8_t chroma_qp_index_offset; + int8_t second_chroma_qp_index_offset; + const StdVideoH264ScalingLists* pScalingLists; } StdVideoH264PictureParameterSet; diff --git a/include/vk_video/vulkan_video_codec_h264std_decode.h b/include/vk_video/vulkan_video_codec_h264std_decode.h index 8e3b05c..7a1688a 100644 --- a/include/vk_video/vulkan_video_codec_h264std_decode.h +++ b/include/vk_video/vulkan_video_codec_h264std_decode.h @@ -20,8 +20,13 @@ extern "C" { #define vulkan_video_codec_h264std_decode 1 +// Vulkan 0.9 provisional Vulkan video H.264 decode std specification version number +#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_0_9_6 VK_MAKE_VIDEO_STD_VERSION(0, 9, 6) // Patch version should always be set to 0 + #define STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE 2 #define STD_VIDEO_DECODE_H264_MVC_REF_LIST_SIZE 15 +#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_0_9_6 +#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264_decode" typedef enum StdVideoDecodeH264FieldOrderCount { STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_TOP = 0, @@ -39,27 +44,27 @@ typedef struct StdVideoDecodeH264PictureInfoFlags { } StdVideoDecodeH264PictureInfoFlags; typedef struct StdVideoDecodeH264PictureInfo { + StdVideoDecodeH264PictureInfoFlags flags; uint8_t seq_parameter_set_id; uint8_t pic_parameter_set_id; uint16_t reserved; uint16_t frame_num; uint16_t idr_pic_id; int32_t PicOrderCnt[STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE]; - StdVideoDecodeH264PictureInfoFlags flags; } StdVideoDecodeH264PictureInfo; typedef struct StdVideoDecodeH264ReferenceInfoFlags { uint32_t top_field_flag : 1; uint32_t bottom_field_flag : 1; - uint32_t is_long_term : 1; + uint32_t used_for_long_term_reference : 1; uint32_t is_non_existing : 1; } StdVideoDecodeH264ReferenceInfoFlags; typedef struct StdVideoDecodeH264ReferenceInfo { + StdVideoDecodeH264ReferenceInfoFlags flags; uint16_t FrameNum; uint16_t reserved; int32_t PicOrderCnt[2]; - StdVideoDecodeH264ReferenceInfoFlags flags; } StdVideoDecodeH264ReferenceInfo; typedef struct StdVideoDecodeH264MvcElementFlags { @@ -85,9 +90,9 @@ typedef struct StdVideoDecodeH264MvcElement { } StdVideoDecodeH264MvcElement; typedef struct StdVideoDecodeH264Mvc { - uint32_t viewId0; - uint32_t mvcElementCount; - StdVideoDecodeH264MvcElement* pMvcElements; + uint32_t viewId0; + uint32_t mvcElementCount; + const StdVideoDecodeH264MvcElement* pMvcElements; } StdVideoDecodeH264Mvc; diff --git a/include/vk_video/vulkan_video_codec_h264std_encode.h b/include/vk_video/vulkan_video_codec_h264std_encode.h index 8b69abf..4cf37e3 100644 --- a/include/vk_video/vulkan_video_codec_h264std_encode.h +++ b/include/vk_video/vulkan_video_codec_h264std_encode.h @@ -20,6 +20,32 @@ extern "C" { #define vulkan_video_codec_h264std_encode 1 +// Vulkan 0.9 provisional Vulkan video H.264 encode std specification version number +#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_0_9_6 VK_MAKE_VIDEO_STD_VERSION(0, 9, 6) // Patch version should always be set to 0 + +#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_0_9_6 +#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264_encode" +typedef struct StdVideoEncodeH264WeightTableFlags { + uint32_t luma_weight_l0_flag; + uint32_t chroma_weight_l0_flag; + uint32_t luma_weight_l1_flag; + uint32_t chroma_weight_l1_flag; +} StdVideoEncodeH264WeightTableFlags; + +typedef struct StdVideoEncodeH264WeightTable { + StdVideoEncodeH264WeightTableFlags flags; + uint8_t luma_log2_weight_denom; + uint8_t chroma_log2_weight_denom; + int8_t luma_weight_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF]; + int8_t luma_offset_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF]; + int8_t chroma_weight_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES]; + int8_t chroma_offset_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES]; + int8_t luma_weight_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF]; + int8_t luma_offset_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF]; + int8_t chroma_weight_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES]; + int8_t chroma_offset_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES]; +} StdVideoEncodeH264WeightTable; + typedef struct StdVideoEncodeH264SliceHeaderFlags { uint32_t direct_spatial_mv_pred_flag : 1; uint32_t num_ref_idx_active_override_flag : 1; @@ -31,11 +57,11 @@ typedef struct StdVideoEncodeH264SliceHeaderFlags { typedef struct StdVideoEncodeH264PictureInfoFlags { uint32_t idr_flag : 1; uint32_t is_reference_flag : 1; - uint32_t long_term_reference_flag : 1; + uint32_t used_for_long_term_reference : 1; } StdVideoEncodeH264PictureInfoFlags; typedef struct StdVideoEncodeH264ReferenceInfoFlags { - uint32_t is_long_term : 1; + uint32_t used_for_long_term_reference : 1; } StdVideoEncodeH264ReferenceInfoFlags; typedef struct StdVideoEncodeH264RefMgmtFlags { @@ -58,17 +84,19 @@ typedef struct StdVideoEncodeH264RefPicMarkingEntry { } StdVideoEncodeH264RefPicMarkingEntry; typedef struct StdVideoEncodeH264RefMemMgmtCtrlOperations { - StdVideoEncodeH264RefMgmtFlags flags; - uint8_t refList0ModOpCount; - StdVideoEncodeH264RefListModEntry* pRefList0ModOperations; - uint8_t refList1ModOpCount; - StdVideoEncodeH264RefListModEntry* pRefList1ModOperations; - uint8_t refPicMarkingOpCount; - StdVideoEncodeH264RefPicMarkingEntry* pRefPicMarkingOperations; + StdVideoEncodeH264RefMgmtFlags flags; + uint8_t refList0ModOpCount; + const StdVideoEncodeH264RefListModEntry* pRefList0ModOperations; + uint8_t refList1ModOpCount; + const StdVideoEncodeH264RefListModEntry* pRefList1ModOperations; + uint8_t refPicMarkingOpCount; + const StdVideoEncodeH264RefPicMarkingEntry* pRefPicMarkingOperations; } StdVideoEncodeH264RefMemMgmtCtrlOperations; typedef struct StdVideoEncodeH264PictureInfo { StdVideoEncodeH264PictureInfoFlags flags; + uint8_t seq_parameter_set_id; + uint8_t pic_parameter_set_id; StdVideoH264PictureType pictureType; uint32_t frame_num; int32_t PicOrderCnt; @@ -86,8 +114,6 @@ typedef struct StdVideoEncodeH264SliceHeader { StdVideoEncodeH264SliceHeaderFlags flags; uint32_t first_mb_in_slice; StdVideoH264SliceType slice_type; - uint8_t seq_parameter_set_id; - uint8_t pic_parameter_set_id; uint16_t idr_pic_id; uint8_t num_ref_idx_l0_active_minus1; uint8_t num_ref_idx_l1_active_minus1; @@ -95,6 +121,7 @@ typedef struct StdVideoEncodeH264SliceHeader { StdVideoH264DisableDeblockingFilterIdc disable_deblocking_filter_idc; int8_t slice_alpha_c0_offset_div2; int8_t slice_beta_offset_div2; + const StdVideoEncodeH264WeightTable* pWeightTable; } StdVideoEncodeH264SliceHeader; diff --git a/include/vk_video/vulkan_video_codec_h265std.h b/include/vk_video/vulkan_video_codec_h265std.h index 009133a..f0e5c78 100644 --- a/include/vk_video/vulkan_video_codec_h265std.h +++ b/include/vk_video/vulkan_video_codec_h265std.h @@ -20,9 +20,6 @@ extern "C" { #define vulkan_video_codec_h265std 1 -// Vulkan 0.5 version number WIP -#define VK_STD_VULKAN_VIDEO_CODEC_H265_API_VERSION_0_9_5 VK_MAKE_VIDEO_STD_VERSION(0, 9, 5) // Patch version should always be set to 0 - #define STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE 7 #define STD_VIDEO_H265_CPB_CNT_LIST_SIZE 32 #define STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS 6 @@ -38,8 +35,8 @@ extern "C" { #define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE 19 #define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE 21 #define STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE 6 -#define VK_STD_VULKAN_VIDEO_CODEC_H265_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_API_VERSION_0_9_5 -#define VK_STD_VULKAN_VIDEO_CODEC_H265_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265" +#define STD_VIDEO_H265_MAX_NUM_LIST_REF 15 +#define STD_VIDEO_H265_MAX_CHROMA_PLANES 2 typedef enum StdVideoH265ChromaFormatIdc { STD_VIDEO_H265_CHROMA_FORMAT_IDC_MONOCHROME = 0, @@ -119,20 +116,20 @@ typedef struct StdVideoH265HrdFlags { } StdVideoH265HrdFlags; typedef struct StdVideoH265HrdParameters { - uint8_t tick_divisor_minus2; - uint8_t du_cpb_removal_delay_increment_length_minus1; - uint8_t dpb_output_delay_du_length_minus1; - uint8_t bit_rate_scale; - uint8_t cpb_size_scale; - uint8_t cpb_size_du_scale; - uint8_t initial_cpb_removal_delay_length_minus1; - uint8_t au_cpb_removal_delay_length_minus1; - uint8_t dpb_output_delay_length_minus1; - uint8_t cpb_cnt_minus1[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE]; - uint16_t elemental_duration_in_tc_minus1[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE]; - StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersNal[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE]; - StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersVcl[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE]; - StdVideoH265HrdFlags flags; + StdVideoH265HrdFlags flags; + uint8_t tick_divisor_minus2; + uint8_t du_cpb_removal_delay_increment_length_minus1; + uint8_t dpb_output_delay_du_length_minus1; + uint8_t bit_rate_scale; + uint8_t cpb_size_scale; + uint8_t cpb_size_du_scale; + uint8_t initial_cpb_removal_delay_length_minus1; + uint8_t au_cpb_removal_delay_length_minus1; + uint8_t dpb_output_delay_length_minus1; + uint8_t cpb_cnt_minus1[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE]; + uint16_t elemental_duration_in_tc_minus1[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE]; + const StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersNal[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE]; + const StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersVcl[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE]; } StdVideoH265HrdParameters; typedef struct StdVideoH265VpsFlags { @@ -143,14 +140,14 @@ typedef struct StdVideoH265VpsFlags { } StdVideoH265VpsFlags; typedef struct StdVideoH265VideoParameterSet { - uint8_t vps_video_parameter_set_id; - uint8_t vps_max_sub_layers_minus1; - uint32_t vps_num_units_in_tick; - uint32_t vps_time_scale; - uint32_t vps_num_ticks_poc_diff_one_minus1; - StdVideoH265DecPicBufMgr* pDecPicBufMgr; - StdVideoH265HrdParameters* pHrdParameters; - StdVideoH265VpsFlags flags; + StdVideoH265VpsFlags flags; + uint8_t vps_video_parameter_set_id; + uint8_t vps_max_sub_layers_minus1; + uint32_t vps_num_units_in_tick; + uint32_t vps_time_scale; + uint32_t vps_num_ticks_poc_diff_one_minus1; + const StdVideoH265DecPicBufMgr* pDecPicBufMgr; + const StdVideoH265HrdParameters* pHrdParameters; } StdVideoH265VideoParameterSet; typedef struct StdVideoH265ScalingLists { @@ -184,29 +181,29 @@ typedef struct StdVideoH265SpsVuiFlags { } StdVideoH265SpsVuiFlags; typedef struct StdVideoH265SequenceParameterSetVui { - uint8_t aspect_ratio_idc; - uint16_t sar_width; - uint16_t sar_height; - uint8_t video_format; - uint8_t colour_primaries; - uint8_t transfer_characteristics; - uint8_t matrix_coeffs; - uint8_t chroma_sample_loc_type_top_field; - uint8_t chroma_sample_loc_type_bottom_field; - uint16_t def_disp_win_left_offset; - uint16_t def_disp_win_right_offset; - uint16_t def_disp_win_top_offset; - uint16_t def_disp_win_bottom_offset; - uint32_t vui_num_units_in_tick; - uint32_t vui_time_scale; - uint32_t vui_num_ticks_poc_diff_one_minus1; - StdVideoH265HrdParameters* pHrdParameters; - uint16_t min_spatial_segmentation_idc; - uint8_t max_bytes_per_pic_denom; - uint8_t max_bits_per_min_cu_denom; - uint8_t log2_max_mv_length_horizontal; - uint8_t log2_max_mv_length_vertical; - StdVideoH265SpsVuiFlags flags; + StdVideoH265SpsVuiFlags flags; + uint8_t aspect_ratio_idc; + uint16_t sar_width; + uint16_t sar_height; + uint8_t video_format; + uint8_t colour_primaries; + uint8_t transfer_characteristics; + uint8_t matrix_coeffs; + uint8_t chroma_sample_loc_type_top_field; + uint8_t chroma_sample_loc_type_bottom_field; + uint16_t def_disp_win_left_offset; + uint16_t def_disp_win_right_offset; + uint16_t def_disp_win_top_offset; + uint16_t def_disp_win_bottom_offset; + uint32_t vui_num_units_in_tick; + uint32_t vui_time_scale; + uint32_t vui_num_ticks_poc_diff_one_minus1; + const StdVideoH265HrdParameters* pHrdParameters; + uint16_t min_spatial_segmentation_idc; + uint8_t max_bytes_per_pic_denom; + uint8_t max_bits_per_min_cu_denom; + uint8_t log2_max_mv_length_horizontal; + uint8_t log2_max_mv_length_vertical; } StdVideoH265SequenceParameterSetVui; typedef struct StdVideoH265PredictorPaletteEntries { @@ -237,6 +234,7 @@ typedef struct StdVideoH265SpsFlags { uint32_t high_precision_offsets_enabled_flag : 1; uint32_t persistent_rice_adaptation_enabled_flag : 1; uint32_t cabac_bypass_alignment_enabled_flag : 1; + uint32_t sps_scc_extension_flag : 1; uint32_t sps_curr_pic_ref_enabled_flag : 1; uint32_t palette_mode_enabled_flag : 1; uint32_t sps_palette_predictor_initializer_present_flag : 1; @@ -244,43 +242,42 @@ typedef struct StdVideoH265SpsFlags { } StdVideoH265SpsFlags; typedef struct StdVideoH265SequenceParameterSet { - StdVideoH265ProfileIdc profile_idc; - StdVideoH265Level level_idc; - uint32_t pic_width_in_luma_samples; - uint32_t pic_height_in_luma_samples; - uint8_t sps_video_parameter_set_id; - uint8_t sps_max_sub_layers_minus1; - uint8_t sps_seq_parameter_set_id; - uint8_t chroma_format_idc; - uint8_t bit_depth_luma_minus8; - uint8_t bit_depth_chroma_minus8; - uint8_t log2_max_pic_order_cnt_lsb_minus4; - uint8_t sps_max_dec_pic_buffering_minus1; - uint8_t log2_min_luma_coding_block_size_minus3; - uint8_t log2_diff_max_min_luma_coding_block_size; - uint8_t log2_min_luma_transform_block_size_minus2; - uint8_t log2_diff_max_min_luma_transform_block_size; - uint8_t max_transform_hierarchy_depth_inter; - uint8_t max_transform_hierarchy_depth_intra; - uint8_t num_short_term_ref_pic_sets; - uint8_t num_long_term_ref_pics_sps; - uint8_t pcm_sample_bit_depth_luma_minus1; - uint8_t pcm_sample_bit_depth_chroma_minus1; - uint8_t log2_min_pcm_luma_coding_block_size_minus3; - uint8_t log2_diff_max_min_pcm_luma_coding_block_size; - uint32_t conf_win_left_offset; - uint32_t conf_win_right_offset; - uint32_t conf_win_top_offset; - uint32_t conf_win_bottom_offset; - StdVideoH265DecPicBufMgr* pDecPicBufMgr; - StdVideoH265SpsFlags flags; - StdVideoH265ScalingLists* pScalingLists; - StdVideoH265SequenceParameterSetVui* pSequenceParameterSetVui; - uint8_t palette_max_size; - uint8_t delta_palette_max_predictor_size; - uint8_t motion_vector_resolution_control_idc; - uint8_t sps_num_palette_predictor_initializer_minus1; - StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries; + StdVideoH265SpsFlags flags; + StdVideoH265ProfileIdc profile_idc; + StdVideoH265Level level_idc; + uint32_t pic_width_in_luma_samples; + uint32_t pic_height_in_luma_samples; + uint8_t sps_video_parameter_set_id; + uint8_t sps_max_sub_layers_minus1; + uint8_t sps_seq_parameter_set_id; + uint8_t chroma_format_idc; + uint8_t bit_depth_luma_minus8; + uint8_t bit_depth_chroma_minus8; + uint8_t log2_max_pic_order_cnt_lsb_minus4; + uint8_t log2_min_luma_coding_block_size_minus3; + uint8_t log2_diff_max_min_luma_coding_block_size; + uint8_t log2_min_luma_transform_block_size_minus2; + uint8_t log2_diff_max_min_luma_transform_block_size; + uint8_t max_transform_hierarchy_depth_inter; + uint8_t max_transform_hierarchy_depth_intra; + uint8_t num_short_term_ref_pic_sets; + uint8_t num_long_term_ref_pics_sps; + uint8_t pcm_sample_bit_depth_luma_minus1; + uint8_t pcm_sample_bit_depth_chroma_minus1; + uint8_t log2_min_pcm_luma_coding_block_size_minus3; + uint8_t log2_diff_max_min_pcm_luma_coding_block_size; + uint32_t conf_win_left_offset; + uint32_t conf_win_right_offset; + uint32_t conf_win_top_offset; + uint32_t conf_win_bottom_offset; + const StdVideoH265DecPicBufMgr* pDecPicBufMgr; + const StdVideoH265ScalingLists* pScalingLists; + const StdVideoH265SequenceParameterSetVui* pSequenceParameterSetVui; + uint8_t palette_max_size; + uint8_t delta_palette_max_predictor_size; + uint8_t motion_vector_resolution_control_idc; + uint8_t sps_num_palette_predictor_initializer_minus1; + const StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries; } StdVideoH265SequenceParameterSet; typedef struct StdVideoH265PpsFlags { @@ -318,38 +315,38 @@ typedef struct StdVideoH265PpsFlags { } StdVideoH265PpsFlags; typedef struct StdVideoH265PictureParameterSet { - uint8_t pps_pic_parameter_set_id; - uint8_t pps_seq_parameter_set_id; - uint8_t num_extra_slice_header_bits; - uint8_t num_ref_idx_l0_default_active_minus1; - uint8_t num_ref_idx_l1_default_active_minus1; - int8_t init_qp_minus26; - uint8_t diff_cu_qp_delta_depth; - int8_t pps_cb_qp_offset; - int8_t pps_cr_qp_offset; - uint8_t num_tile_columns_minus1; - uint8_t num_tile_rows_minus1; - uint16_t column_width_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE]; - uint16_t row_height_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE]; - int8_t pps_beta_offset_div2; - int8_t pps_tc_offset_div2; - uint8_t log2_parallel_merge_level_minus2; - StdVideoH265PpsFlags flags; - StdVideoH265ScalingLists* pScalingLists; - uint8_t log2_max_transform_skip_block_size_minus2; - uint8_t diff_cu_chroma_qp_offset_depth; - uint8_t chroma_qp_offset_list_len_minus1; - int8_t cb_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE]; - int8_t cr_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE]; - uint8_t log2_sao_offset_scale_luma; - uint8_t log2_sao_offset_scale_chroma; - int8_t pps_act_y_qp_offset_plus5; - int8_t pps_act_cb_qp_offset_plus5; - int8_t pps_act_cr_qp_offset_plus5; - uint8_t pps_num_palette_predictor_initializer; - uint8_t luma_bit_depth_entry_minus8; - uint8_t chroma_bit_depth_entry_minus8; - StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries; + StdVideoH265PpsFlags flags; + uint8_t pps_pic_parameter_set_id; + uint8_t pps_seq_parameter_set_id; + uint8_t num_extra_slice_header_bits; + uint8_t num_ref_idx_l0_default_active_minus1; + uint8_t num_ref_idx_l1_default_active_minus1; + int8_t init_qp_minus26; + uint8_t diff_cu_qp_delta_depth; + int8_t pps_cb_qp_offset; + int8_t pps_cr_qp_offset; + uint8_t num_tile_columns_minus1; + uint8_t num_tile_rows_minus1; + uint16_t column_width_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE]; + uint16_t row_height_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE]; + int8_t pps_beta_offset_div2; + int8_t pps_tc_offset_div2; + uint8_t log2_parallel_merge_level_minus2; + const StdVideoH265ScalingLists* pScalingLists; + uint8_t log2_max_transform_skip_block_size_minus2; + uint8_t diff_cu_chroma_qp_offset_depth; + uint8_t chroma_qp_offset_list_len_minus1; + int8_t cb_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE]; + int8_t cr_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE]; + uint8_t log2_sao_offset_scale_luma; + uint8_t log2_sao_offset_scale_chroma; + int8_t pps_act_y_qp_offset_plus5; + int8_t pps_act_cb_qp_offset_plus5; + int8_t pps_act_cr_qp_offset_plus5; + uint8_t pps_num_palette_predictor_initializer; + uint8_t luma_bit_depth_entry_minus8; + uint8_t chroma_bit_depth_entry_minus8; + const StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries; } StdVideoH265PictureParameterSet; diff --git a/include/vk_video/vulkan_video_codec_h265std_decode.h b/include/vk_video/vulkan_video_codec_h265std_decode.h index 0867952..1171f33 100644 --- a/include/vk_video/vulkan_video_codec_h265std_decode.h +++ b/include/vk_video/vulkan_video_codec_h265std_decode.h @@ -20,7 +20,12 @@ extern "C" { #define vulkan_video_codec_h265std_decode 1 +// Vulkan 0.9 provisional Vulkan video H.265 decode std specification version number +#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_0_9_7 VK_MAKE_VIDEO_STD_VERSION(0, 9, 7) // Patch version should always be set to 0 + #define STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE 8 +#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_0_9_7 +#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265_decode" typedef struct StdVideoDecodeH265PictureInfoFlags { uint32_t IrapPicFlag : 1; uint32_t IdrPicFlag : 1; @@ -29,8 +34,9 @@ typedef struct StdVideoDecodeH265PictureInfoFlags { } StdVideoDecodeH265PictureInfoFlags; typedef struct StdVideoDecodeH265PictureInfo { - uint8_t vps_video_parameter_set_id; - uint8_t sps_seq_parameter_set_id; + StdVideoDecodeH265PictureInfoFlags flags; + uint8_t sps_video_parameter_set_id; + uint8_t pps_seq_parameter_set_id; uint8_t pps_pic_parameter_set_id; uint8_t num_short_term_ref_pic_sets; int32_t PicOrderCntVal; @@ -39,17 +45,17 @@ typedef struct StdVideoDecodeH265PictureInfo { uint8_t RefPicSetStCurrBefore[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE]; uint8_t RefPicSetStCurrAfter[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE]; uint8_t RefPicSetLtCurr[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE]; - StdVideoDecodeH265PictureInfoFlags flags; } StdVideoDecodeH265PictureInfo; typedef struct StdVideoDecodeH265ReferenceInfoFlags { - uint32_t is_long_term : 1; + uint32_t used_for_long_term_reference : 1; + uint32_t unused_for_reference : 1; uint32_t is_non_existing : 1; } StdVideoDecodeH265ReferenceInfoFlags; typedef struct StdVideoDecodeH265ReferenceInfo { - int32_t PicOrderCntVal; StdVideoDecodeH265ReferenceInfoFlags flags; + int32_t PicOrderCntVal; } StdVideoDecodeH265ReferenceInfo; diff --git a/include/vk_video/vulkan_video_codec_h265std_encode.h b/include/vk_video/vulkan_video_codec_h265std_encode.h index 5acdc5d..dd3b7ff 100644 --- a/include/vk_video/vulkan_video_codec_h265std_encode.h +++ b/include/vk_video/vulkan_video_codec_h265std_encode.h @@ -20,13 +20,37 @@ extern "C" { #define vulkan_video_codec_h265std_encode 1 -#define STD_VIDEO_ENCODE_H265_LUMA_LIST_SIZE 15 -#define STD_VIDEO_ENCODE_H265_CHROMA_LIST_SIZE 15 -#define STD_VIDEO_ENCODE_H265_CHROMA_LISTS_NUM 2 +// Vulkan 0.9 provisional Vulkan video H.265 encode std specification version number +#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_0_9_7 VK_MAKE_VIDEO_STD_VERSION(0, 9, 7) // Patch version should always be set to 0 + +#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_0_9_7 +#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265_encode" +typedef struct StdVideoEncodeH265WeightTableFlags { + uint16_t luma_weight_l0_flag; + uint16_t chroma_weight_l0_flag; + uint16_t luma_weight_l1_flag; + uint16_t chroma_weight_l1_flag; +} StdVideoEncodeH265WeightTableFlags; + +typedef struct StdVideoEncodeH265WeightTable { + StdVideoEncodeH265WeightTableFlags flags; + uint8_t luma_log2_weight_denom; + int8_t delta_chroma_log2_weight_denom; + int8_t delta_luma_weight_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF]; + int8_t luma_offset_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF]; + int8_t delta_chroma_weight_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES]; + int8_t delta_chroma_offset_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES]; + int8_t delta_luma_weight_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF]; + int8_t luma_offset_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF]; + int8_t delta_chroma_weight_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES]; + int8_t delta_chroma_offset_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES]; +} StdVideoEncodeH265WeightTable; + typedef struct StdVideoEncodeH265SliceSegmentHeaderFlags { uint32_t first_slice_segment_in_pic_flag : 1; uint32_t no_output_of_prior_pics_flag : 1; uint32_t dependent_slice_segment_flag : 1; + uint32_t pic_output_flag : 1; uint32_t short_term_ref_pic_set_sps_flag : 1; uint32_t slice_temporal_mvp_enable_flag : 1; uint32_t slice_sao_luma_flag : 1; @@ -37,17 +61,11 @@ typedef struct StdVideoEncodeH265SliceSegmentHeaderFlags { uint32_t slice_deblocking_filter_disable_flag : 1; uint32_t collocated_from_l0_flag : 1; uint32_t slice_loop_filter_across_slices_enabled_flag : 1; - uint32_t bLastSliceInPic : 1; - uint32_t reservedBits : 18; - uint16_t luma_weight_l0_flag; - uint16_t chroma_weight_l0_flag; - uint16_t luma_weight_l1_flag; - uint16_t chroma_weight_l1_flag; } StdVideoEncodeH265SliceSegmentHeaderFlags; typedef struct StdVideoEncodeH265SliceSegmentHeader { + StdVideoEncodeH265SliceSegmentHeaderFlags flags; StdVideoH265SliceType slice_type; - uint8_t slice_pic_parameter_set_id; uint8_t num_short_term_ref_pic_sets; uint32_t slice_segment_address; uint8_t short_term_ref_pic_set_idx; @@ -56,16 +74,6 @@ typedef struct StdVideoEncodeH265SliceSegmentHeader { uint8_t collocated_ref_idx; uint8_t num_ref_idx_l0_active_minus1; uint8_t num_ref_idx_l1_active_minus1; - uint8_t luma_log2_weight_denom; - int8_t delta_chroma_log2_weight_denom; - int8_t delta_luma_weight_l0[STD_VIDEO_ENCODE_H265_LUMA_LIST_SIZE]; - int8_t luma_offset_l0[STD_VIDEO_ENCODE_H265_LUMA_LIST_SIZE]; - int8_t delta_chroma_weight_l0[STD_VIDEO_ENCODE_H265_CHROMA_LIST_SIZE][STD_VIDEO_ENCODE_H265_CHROMA_LISTS_NUM]; - int8_t delta_chroma_offset_l0[STD_VIDEO_ENCODE_H265_CHROMA_LIST_SIZE][STD_VIDEO_ENCODE_H265_CHROMA_LISTS_NUM]; - int8_t delta_luma_weight_l1[STD_VIDEO_ENCODE_H265_LUMA_LIST_SIZE]; - int8_t luma_offset_l1[STD_VIDEO_ENCODE_H265_LUMA_LIST_SIZE]; - int8_t delta_chroma_weight_l1[STD_VIDEO_ENCODE_H265_CHROMA_LIST_SIZE][STD_VIDEO_ENCODE_H265_CHROMA_LISTS_NUM]; - int8_t delta_chroma_offset_l1[STD_VIDEO_ENCODE_H265_CHROMA_LIST_SIZE][STD_VIDEO_ENCODE_H265_CHROMA_LISTS_NUM]; uint8_t MaxNumMergeCand; int8_t slice_cb_qp_offset; int8_t slice_cr_qp_offset; @@ -74,7 +82,7 @@ typedef struct StdVideoEncodeH265SliceSegmentHeader { int8_t slice_act_y_qp_offset; int8_t slice_act_cb_qp_offset; int8_t slice_act_cr_qp_offset; - StdVideoEncodeH265SliceSegmentHeaderFlags flags; + const StdVideoEncodeH265WeightTable* pWeightTable; } StdVideoEncodeH265SliceSegmentHeader; typedef struct StdVideoEncodeH265ReferenceModificationFlags { @@ -85,35 +93,38 @@ typedef struct StdVideoEncodeH265ReferenceModificationFlags { typedef struct StdVideoEncodeH265ReferenceModifications { StdVideoEncodeH265ReferenceModificationFlags flags; uint8_t referenceList0ModificationsCount; - uint8_t* pReferenceList0Modifications; + const uint8_t* pReferenceList0Modifications; uint8_t referenceList1ModificationsCount; - uint8_t* pReferenceList1Modifications; + const uint8_t* pReferenceList1Modifications; } StdVideoEncodeH265ReferenceModifications; typedef struct StdVideoEncodeH265PictureInfoFlags { uint32_t is_reference_flag : 1; uint32_t IrapPicFlag : 1; uint32_t long_term_flag : 1; + uint32_t discardable_flag : 1; + uint32_t cross_layer_bla_flag : 1; } StdVideoEncodeH265PictureInfoFlags; typedef struct StdVideoEncodeH265PictureInfo { + StdVideoEncodeH265PictureInfoFlags flags; StdVideoH265PictureType PictureType; uint8_t sps_video_parameter_set_id; uint8_t pps_seq_parameter_set_id; + uint8_t pps_pic_parameter_set_id; int32_t PicOrderCntVal; uint8_t TemporalId; - StdVideoEncodeH265PictureInfoFlags flags; } StdVideoEncodeH265PictureInfo; typedef struct StdVideoEncodeH265ReferenceInfoFlags { - uint32_t is_long_term : 1; - uint32_t isUsedFlag : 1; + uint32_t used_for_long_term_reference : 1; + uint32_t unused_for_reference : 1; } StdVideoEncodeH265ReferenceInfoFlags; typedef struct StdVideoEncodeH265ReferenceInfo { + StdVideoEncodeH265ReferenceInfoFlags flags; int32_t PicOrderCntVal; uint8_t TemporalId; - StdVideoEncodeH265ReferenceInfoFlags flags; } StdVideoEncodeH265ReferenceInfo; diff --git a/include/vulkan/vulkan_beta.h b/include/vulkan/vulkan_beta.h index 89c5c4a..d862b2c 100644 --- a/include/vulkan/vulkan_beta.h +++ b/include/vulkan/vulkan_beta.h @@ -22,7 +22,7 @@ extern "C" { #define VK_KHR_video_queue 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionKHR) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionParametersKHR) -#define VK_KHR_VIDEO_QUEUE_SPEC_VERSION 4 +#define VK_KHR_VIDEO_QUEUE_SPEC_VERSION 5 #define VK_KHR_VIDEO_QUEUE_EXTENSION_NAME "VK_KHR_video_queue" typedef enum VkQueryResultStatusKHR { @@ -33,7 +33,7 @@ typedef enum VkQueryResultStatusKHR { } VkQueryResultStatusKHR; typedef enum VkVideoCodecOperationFlagBitsKHR { - VK_VIDEO_CODEC_OPERATION_INVALID_BIT_KHR = 0, + VK_VIDEO_CODEC_OPERATION_NONE_KHR = 0, #ifdef VK_ENABLE_BETA_EXTENSIONS VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT = 0x00010000, #endif @@ -51,7 +51,7 @@ typedef enum VkVideoCodecOperationFlagBitsKHR { typedef VkFlags VkVideoCodecOperationFlagsKHR; typedef enum VkVideoChromaSubsamplingFlagBitsKHR { - VK_VIDEO_CHROMA_SUBSAMPLING_INVALID_BIT_KHR = 0, + VK_VIDEO_CHROMA_SUBSAMPLING_INVALID_KHR = 0, VK_VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR = 0x00000001, VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR = 0x00000002, VK_VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR = 0x00000004, @@ -77,55 +77,52 @@ typedef enum VkVideoCapabilityFlagBitsKHR { typedef VkFlags VkVideoCapabilityFlagsKHR; typedef enum VkVideoSessionCreateFlagBitsKHR { - VK_VIDEO_SESSION_CREATE_DEFAULT_KHR = 0, VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR = 0x00000001, VK_VIDEO_SESSION_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoSessionCreateFlagBitsKHR; typedef VkFlags VkVideoSessionCreateFlagsKHR; +typedef VkFlags VkVideoSessionParametersCreateFlagsKHR; typedef VkFlags VkVideoBeginCodingFlagsKHR; typedef VkFlags VkVideoEndCodingFlagsKHR; typedef enum VkVideoCodingControlFlagBitsKHR { - VK_VIDEO_CODING_CONTROL_DEFAULT_KHR = 0, VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR = 0x00000001, +#ifdef VK_ENABLE_BETA_EXTENSIONS + VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR = 0x00000002, +#endif +#ifdef VK_ENABLE_BETA_EXTENSIONS + VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_LAYER_BIT_KHR = 0x00000004, +#endif VK_VIDEO_CODING_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoCodingControlFlagBitsKHR; typedef VkFlags VkVideoCodingControlFlagsKHR; - -typedef enum VkVideoCodingQualityPresetFlagBitsKHR { - VK_VIDEO_CODING_QUALITY_PRESET_NORMAL_BIT_KHR = 0x00000001, - VK_VIDEO_CODING_QUALITY_PRESET_POWER_BIT_KHR = 0x00000002, - VK_VIDEO_CODING_QUALITY_PRESET_QUALITY_BIT_KHR = 0x00000004, - VK_VIDEO_CODING_QUALITY_PRESET_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkVideoCodingQualityPresetFlagBitsKHR; -typedef VkFlags VkVideoCodingQualityPresetFlagsKHR; -typedef struct VkQueueFamilyQueryResultStatusProperties2KHR { +typedef struct VkQueueFamilyQueryResultStatusPropertiesKHR { VkStructureType sType; void* pNext; VkBool32 queryResultStatusSupport; -} VkQueueFamilyQueryResultStatusProperties2KHR; +} VkQueueFamilyQueryResultStatusPropertiesKHR; -typedef struct VkVideoQueueFamilyProperties2KHR { +typedef struct VkQueueFamilyVideoPropertiesKHR { VkStructureType sType; void* pNext; VkVideoCodecOperationFlagsKHR videoCodecOperations; -} VkVideoQueueFamilyProperties2KHR; +} VkQueueFamilyVideoPropertiesKHR; -typedef struct VkVideoProfileKHR { +typedef struct VkVideoProfileInfoKHR { VkStructureType sType; const void* pNext; VkVideoCodecOperationFlagBitsKHR videoCodecOperation; VkVideoChromaSubsamplingFlagsKHR chromaSubsampling; VkVideoComponentBitDepthFlagsKHR lumaBitDepth; VkVideoComponentBitDepthFlagsKHR chromaBitDepth; -} VkVideoProfileKHR; +} VkVideoProfileInfoKHR; -typedef struct VkVideoProfilesKHR { - VkStructureType sType; - const void* pNext; - uint32_t profileCount; - const VkVideoProfileKHR* pProfiles; -} VkVideoProfilesKHR; +typedef struct VkVideoProfileListInfoKHR { + VkStructureType sType; + const void* pNext; + uint32_t profileCount; + const VkVideoProfileInfoKHR* pProfiles; +} VkVideoProfileListInfoKHR; typedef struct VkVideoCapabilitiesKHR { VkStructureType sType; @@ -143,7 +140,7 @@ typedef struct VkVideoCapabilitiesKHR { typedef struct VkPhysicalDeviceVideoFormatInfoKHR { VkStructureType sType; - void* pNext; + const void* pNext; VkImageUsageFlags imageUsage; } VkPhysicalDeviceVideoFormatInfoKHR; @@ -158,44 +155,44 @@ typedef struct VkVideoFormatPropertiesKHR { VkImageUsageFlags imageUsageFlags; } VkVideoFormatPropertiesKHR; -typedef struct VkVideoPictureResourceKHR { +typedef struct VkVideoPictureResourceInfoKHR { VkStructureType sType; const void* pNext; VkOffset2D codedOffset; VkExtent2D codedExtent; uint32_t baseArrayLayer; VkImageView imageViewBinding; -} VkVideoPictureResourceKHR; - -typedef struct VkVideoReferenceSlotKHR { - VkStructureType sType; - const void* pNext; - int8_t slotIndex; - const VkVideoPictureResourceKHR* pPictureResource; -} VkVideoReferenceSlotKHR; - -typedef struct VkVideoGetMemoryPropertiesKHR { - VkStructureType sType; - const void* pNext; - uint32_t memoryBindIndex; - VkMemoryRequirements2* pMemoryRequirements; -} VkVideoGetMemoryPropertiesKHR; +} VkVideoPictureResourceInfoKHR; -typedef struct VkVideoBindMemoryKHR { +typedef struct VkVideoReferenceSlotInfoKHR { + VkStructureType sType; + const void* pNext; + int8_t slotIndex; + const VkVideoPictureResourceInfoKHR* pPictureResource; +} VkVideoReferenceSlotInfoKHR; + +typedef struct VkVideoSessionMemoryRequirementsKHR { + VkStructureType sType; + void* pNext; + uint32_t memoryBindIndex; + VkMemoryRequirements memoryRequirements; +} VkVideoSessionMemoryRequirementsKHR; + +typedef struct VkBindVideoSessionMemoryInfoKHR { VkStructureType sType; const void* pNext; uint32_t memoryBindIndex; VkDeviceMemory memory; VkDeviceSize memoryOffset; VkDeviceSize memorySize; -} VkVideoBindMemoryKHR; +} VkBindVideoSessionMemoryInfoKHR; typedef struct VkVideoSessionCreateInfoKHR { VkStructureType sType; const void* pNext; uint32_t queueFamilyIndex; VkVideoSessionCreateFlagsKHR flags; - const VkVideoProfileKHR* pVideoProfile; + const VkVideoProfileInfoKHR* pVideoProfile; VkFormat pictureFormat; VkExtent2D maxCodedExtent; VkFormat referencePicturesFormat; @@ -205,10 +202,11 @@ typedef struct VkVideoSessionCreateInfoKHR { } VkVideoSessionCreateInfoKHR; typedef struct VkVideoSessionParametersCreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkVideoSessionParametersKHR videoSessionParametersTemplate; - VkVideoSessionKHR videoSession; + VkStructureType sType; + const void* pNext; + VkVideoSessionParametersCreateFlagsKHR flags; + VkVideoSessionParametersKHR videoSessionParametersTemplate; + VkVideoSessionKHR videoSession; } VkVideoSessionParametersCreateInfoKHR; typedef struct VkVideoSessionParametersUpdateInfoKHR { @@ -221,11 +219,10 @@ typedef struct VkVideoBeginCodingInfoKHR { VkStructureType sType; const void* pNext; VkVideoBeginCodingFlagsKHR flags; - VkVideoCodingQualityPresetFlagsKHR codecQualityPreset; VkVideoSessionKHR videoSession; VkVideoSessionParametersKHR videoSessionParameters; uint32_t referenceSlotCount; - const VkVideoReferenceSlotKHR* pReferenceSlots; + const VkVideoReferenceSlotInfoKHR* pReferenceSlots; } VkVideoBeginCodingInfoKHR; typedef struct VkVideoEndCodingInfoKHR { @@ -240,12 +237,12 @@ typedef struct VkVideoCodingControlInfoKHR { VkVideoCodingControlFlagsKHR flags; } VkVideoCodingControlInfoKHR; -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR)(VkPhysicalDevice physicalDevice, const VkVideoProfileKHR* pVideoProfile, VkVideoCapabilitiesKHR* pCapabilities); +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR)(VkPhysicalDevice physicalDevice, const VkVideoProfileInfoKHR* pVideoProfile, VkVideoCapabilitiesKHR* pCapabilities); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, uint32_t* pVideoFormatPropertyCount, VkVideoFormatPropertiesKHR* pVideoFormatProperties); typedef VkResult (VKAPI_PTR *PFN_vkCreateVideoSessionKHR)(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession); typedef void (VKAPI_PTR *PFN_vkDestroyVideoSessionKHR)(VkDevice device, VkVideoSessionKHR videoSession, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkGetVideoSessionMemoryRequirementsKHR)(VkDevice device, VkVideoSessionKHR videoSession, uint32_t* pVideoSessionMemoryRequirementsCount, VkVideoGetMemoryPropertiesKHR* pVideoSessionMemoryRequirements); -typedef VkResult (VKAPI_PTR *PFN_vkBindVideoSessionMemoryKHR)(VkDevice device, VkVideoSessionKHR videoSession, uint32_t videoSessionBindMemoryCount, const VkVideoBindMemoryKHR* pVideoSessionBindMemories); +typedef VkResult (VKAPI_PTR *PFN_vkGetVideoSessionMemoryRequirementsKHR)(VkDevice device, VkVideoSessionKHR videoSession, uint32_t* pMemoryRequirementsCount, VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements); +typedef VkResult (VKAPI_PTR *PFN_vkBindVideoSessionMemoryKHR)(VkDevice device, VkVideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos); typedef VkResult (VKAPI_PTR *PFN_vkCreateVideoSessionParametersKHR)(VkDevice device, const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionParametersKHR* pVideoSessionParameters); typedef VkResult (VKAPI_PTR *PFN_vkUpdateVideoSessionParametersKHR)(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo); typedef void (VKAPI_PTR *PFN_vkDestroyVideoSessionParametersKHR)(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkAllocationCallbacks* pAllocator); @@ -256,7 +253,7 @@ typedef void (VKAPI_PTR *PFN_vkCmdControlVideoCodingKHR)(VkCommandBuffer command #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceVideoCapabilitiesKHR( VkPhysicalDevice physicalDevice, - const VkVideoProfileKHR* pVideoProfile, + const VkVideoProfileInfoKHR* pVideoProfile, VkVideoCapabilitiesKHR* pCapabilities); VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceVideoFormatPropertiesKHR( @@ -279,14 +276,14 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyVideoSessionKHR( VKAPI_ATTR VkResult VKAPI_CALL vkGetVideoSessionMemoryRequirementsKHR( VkDevice device, VkVideoSessionKHR videoSession, - uint32_t* pVideoSessionMemoryRequirementsCount, - VkVideoGetMemoryPropertiesKHR* pVideoSessionMemoryRequirements); + uint32_t* pMemoryRequirementsCount, + VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements); VKAPI_ATTR VkResult VKAPI_CALL vkBindVideoSessionMemoryKHR( VkDevice device, VkVideoSessionKHR videoSession, - uint32_t videoSessionBindMemoryCount, - const VkVideoBindMemoryKHR* pVideoSessionBindMemories); + uint32_t bindSessionMemoryInfoCount, + const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos); VKAPI_ATTR VkResult VKAPI_CALL vkCreateVideoSessionParametersKHR( VkDevice device, @@ -319,22 +316,15 @@ VKAPI_ATTR void VKAPI_CALL vkCmdControlVideoCodingKHR( #define VK_KHR_video_decode_queue 1 -#define VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION 4 +#define VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION 5 #define VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME "VK_KHR_video_decode_queue" typedef enum VkVideoDecodeCapabilityFlagBitsKHR { - VK_VIDEO_DECODE_CAPABILITY_DEFAULT_KHR = 0, VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR = 0x00000001, VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR = 0x00000002, VK_VIDEO_DECODE_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoDecodeCapabilityFlagBitsKHR; typedef VkFlags VkVideoDecodeCapabilityFlagsKHR; - -typedef enum VkVideoDecodeFlagBitsKHR { - VK_VIDEO_DECODE_DEFAULT_KHR = 0, - VK_VIDEO_DECODE_RESERVED_0_BIT_KHR = 0x00000001, - VK_VIDEO_DECODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkVideoDecodeFlagBitsKHR; typedef VkFlags VkVideoDecodeFlagsKHR; typedef struct VkVideoDecodeCapabilitiesKHR { VkStructureType sType; @@ -343,16 +333,16 @@ typedef struct VkVideoDecodeCapabilitiesKHR { } VkVideoDecodeCapabilitiesKHR; typedef struct VkVideoDecodeInfoKHR { - VkStructureType sType; - const void* pNext; - VkVideoDecodeFlagsKHR flags; - VkBuffer srcBuffer; - VkDeviceSize srcBufferOffset; - VkDeviceSize srcBufferRange; - VkVideoPictureResourceKHR dstPictureResource; - const VkVideoReferenceSlotKHR* pSetupReferenceSlot; - uint32_t referenceSlotCount; - const VkVideoReferenceSlotKHR* pReferenceSlots; + VkStructureType sType; + const void* pNext; + VkVideoDecodeFlagsKHR flags; + VkBuffer srcBuffer; + VkDeviceSize srcBufferOffset; + VkDeviceSize srcBufferRange; + VkVideoPictureResourceInfoKHR dstPictureResource; + const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot; + uint32_t referenceSlotCount; + const VkVideoReferenceSlotInfoKHR* pReferenceSlots; } VkVideoDecodeInfoKHR; typedef void (VKAPI_PTR *PFN_vkCmdDecodeVideoKHR)(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pFrameInfo); @@ -396,18 +386,11 @@ typedef struct VkPhysicalDevicePortabilitySubsetPropertiesKHR { #define VK_KHR_video_encode_queue 1 -#define VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION 5 +#define VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION 6 #define VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME "VK_KHR_video_encode_queue" - -typedef enum VkVideoEncodeFlagBitsKHR { - VK_VIDEO_ENCODE_DEFAULT_KHR = 0, - VK_VIDEO_ENCODE_RESERVED_0_BIT_KHR = 0x00000001, - VK_VIDEO_ENCODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkVideoEncodeFlagBitsKHR; typedef VkFlags VkVideoEncodeFlagsKHR; typedef enum VkVideoEncodeCapabilityFlagBitsKHR { - VK_VIDEO_ENCODE_CAPABILITY_DEFAULT_KHR = 0, VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeCapabilityFlagBitsKHR; @@ -420,26 +403,20 @@ typedef enum VkVideoEncodeRateControlModeFlagBitsKHR { VK_VIDEO_ENCODE_RATE_CONTROL_MODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeRateControlModeFlagBitsKHR; typedef VkFlags VkVideoEncodeRateControlModeFlagsKHR; - -typedef enum VkVideoEncodeRateControlFlagBitsKHR { - VK_VIDEO_ENCODE_RATE_CONTROL_DEFAULT_KHR = 0, - VK_VIDEO_ENCODE_RATE_CONTROL_RESERVED_0_BIT_KHR = 0x00000001, - VK_VIDEO_ENCODE_RATE_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkVideoEncodeRateControlFlagBitsKHR; typedef VkFlags VkVideoEncodeRateControlFlagsKHR; typedef struct VkVideoEncodeInfoKHR { - VkStructureType sType; - const void* pNext; - VkVideoEncodeFlagsKHR flags; - uint32_t qualityLevel; - VkBuffer dstBitstreamBuffer; - VkDeviceSize dstBitstreamBufferOffset; - VkDeviceSize dstBitstreamBufferMaxRange; - VkVideoPictureResourceKHR srcPictureResource; - const VkVideoReferenceSlotKHR* pSetupReferenceSlot; - uint32_t referenceSlotCount; - const VkVideoReferenceSlotKHR* pReferenceSlots; - uint32_t precedingExternallyEncodedBytes; + VkStructureType sType; + const void* pNext; + VkVideoEncodeFlagsKHR flags; + uint32_t qualityLevel; + VkBuffer dstBitstreamBuffer; + VkDeviceSize dstBitstreamBufferOffset; + VkDeviceSize dstBitstreamBufferMaxRange; + VkVideoPictureResourceInfoKHR srcPictureResource; + const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot; + uint32_t referenceSlotCount; + const VkVideoReferenceSlotInfoKHR* pReferenceSlots; + uint32_t precedingExternallyEncodedBytes; } VkVideoEncodeInfoKHR; typedef struct VkVideoEncodeCapabilitiesKHR { @@ -484,9 +461,16 @@ VKAPI_ATTR void VKAPI_CALL vkCmdEncodeVideoKHR( #define VK_EXT_video_encode_h264 1 #include "vk_video/vulkan_video_codec_h264std.h" #include "vk_video/vulkan_video_codec_h264std_encode.h" -#define VK_EXT_VIDEO_ENCODE_H264_SPEC_VERSION 7 +#define VK_EXT_VIDEO_ENCODE_H264_SPEC_VERSION 8 #define VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME "VK_EXT_video_encode_h264" +typedef enum VkVideoEncodeH264RateControlStructureEXT { + VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0, + VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_FLAT_EXT = 1, + VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_DYADIC_EXT = 2, + VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_MAX_ENUM_EXT = 0x7FFFFFFF +} VkVideoEncodeH264RateControlStructureEXT; + typedef enum VkVideoEncodeH264CapabilityFlagBitsEXT { VK_VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_ENABLED_BIT_EXT = 0x00000001, VK_VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_DISABLED_BIT_EXT = 0x00000002, @@ -532,14 +516,6 @@ typedef enum VkVideoEncodeH264OutputModeFlagBitsEXT { VK_VIDEO_ENCODE_H264_OUTPUT_MODE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkVideoEncodeH264OutputModeFlagBitsEXT; typedef VkFlags VkVideoEncodeH264OutputModeFlagsEXT; - -typedef enum VkVideoEncodeH264RateControlStructureFlagBitsEXT { - VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0, - VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_FLAT_BIT_EXT = 0x00000001, - VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_DYADIC_BIT_EXT = 0x00000002, - VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkVideoEncodeH264RateControlStructureFlagBitsEXT; -typedef VkFlags VkVideoEncodeH264RateControlStructureFlagsEXT; typedef struct VkVideoEncodeH264CapabilitiesEXT { VkStructureType sType; void* pNext; @@ -580,7 +556,7 @@ typedef struct VkVideoEncodeH264DpbSlotInfoEXT { const StdVideoEncodeH264ReferenceInfo* pStdReferenceInfo; } VkVideoEncodeH264DpbSlotInfoEXT; -typedef struct VkVideoEncodeH264ReferenceListsEXT { +typedef struct VkVideoEncodeH264ReferenceListsInfoEXT { VkStructureType sType; const void* pNext; uint8_t referenceList0EntryCount; @@ -588,48 +564,48 @@ typedef struct VkVideoEncodeH264ReferenceListsEXT { uint8_t referenceList1EntryCount; const VkVideoEncodeH264DpbSlotInfoEXT* pReferenceList1Entries; const StdVideoEncodeH264RefMemMgmtCtrlOperations* pMemMgmtCtrlOperations; -} VkVideoEncodeH264ReferenceListsEXT; +} VkVideoEncodeH264ReferenceListsInfoEXT; -typedef struct VkVideoEncodeH264NaluSliceEXT { - VkStructureType sType; - const void* pNext; - uint32_t mbCount; - const VkVideoEncodeH264ReferenceListsEXT* pReferenceFinalLists; - const StdVideoEncodeH264SliceHeader* pSliceHeaderStd; -} VkVideoEncodeH264NaluSliceEXT; +typedef struct VkVideoEncodeH264NaluSliceInfoEXT { + VkStructureType sType; + const void* pNext; + uint32_t mbCount; + const VkVideoEncodeH264ReferenceListsInfoEXT* pReferenceFinalLists; + const StdVideoEncodeH264SliceHeader* pSliceHeaderStd; +} VkVideoEncodeH264NaluSliceInfoEXT; typedef struct VkVideoEncodeH264VclFrameInfoEXT { - VkStructureType sType; - const void* pNext; - const VkVideoEncodeH264ReferenceListsEXT* pReferenceFinalLists; - uint32_t naluSliceEntryCount; - const VkVideoEncodeH264NaluSliceEXT* pNaluSliceEntries; - const StdVideoEncodeH264PictureInfo* pCurrentPictureInfo; + VkStructureType sType; + const void* pNext; + const VkVideoEncodeH264ReferenceListsInfoEXT* pReferenceFinalLists; + uint32_t naluSliceEntryCount; + const VkVideoEncodeH264NaluSliceInfoEXT* pNaluSliceEntries; + const StdVideoEncodeH264PictureInfo* pCurrentPictureInfo; } VkVideoEncodeH264VclFrameInfoEXT; -typedef struct VkVideoEncodeH264EmitPictureParametersEXT { +typedef struct VkVideoEncodeH264EmitPictureParametersInfoEXT { VkStructureType sType; const void* pNext; uint8_t spsId; VkBool32 emitSpsEnable; uint32_t ppsIdEntryCount; const uint8_t* ppsIdEntries; -} VkVideoEncodeH264EmitPictureParametersEXT; +} VkVideoEncodeH264EmitPictureParametersInfoEXT; -typedef struct VkVideoEncodeH264ProfileEXT { +typedef struct VkVideoEncodeH264ProfileInfoEXT { VkStructureType sType; const void* pNext; StdVideoH264ProfileIdc stdProfileIdc; -} VkVideoEncodeH264ProfileEXT; +} VkVideoEncodeH264ProfileInfoEXT; typedef struct VkVideoEncodeH264RateControlInfoEXT { - VkStructureType sType; - const void* pNext; - uint32_t gopFrameCount; - uint32_t idrPeriod; - uint32_t consecutiveBFrameCount; - VkVideoEncodeH264RateControlStructureFlagBitsEXT rateControlStructure; - uint8_t temporalLayerCount; + VkStructureType sType; + const void* pNext; + uint32_t gopFrameCount; + uint32_t idrPeriod; + uint32_t consecutiveBFrameCount; + VkVideoEncodeH264RateControlStructureEXT rateControlStructure; + uint8_t temporalLayerCount; } VkVideoEncodeH264RateControlInfoEXT; typedef struct VkVideoEncodeH264QpEXT { @@ -663,9 +639,16 @@ typedef struct VkVideoEncodeH264RateControlLayerInfoEXT { #define VK_EXT_video_encode_h265 1 #include "vk_video/vulkan_video_codec_h265std.h" #include "vk_video/vulkan_video_codec_h265std_encode.h" -#define VK_EXT_VIDEO_ENCODE_H265_SPEC_VERSION 7 +#define VK_EXT_VIDEO_ENCODE_H265_SPEC_VERSION 8 #define VK_EXT_VIDEO_ENCODE_H265_EXTENSION_NAME "VK_EXT_video_encode_h265" +typedef enum VkVideoEncodeH265RateControlStructureEXT { + VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0, + VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_FLAT_EXT = 1, + VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_DYADIC_EXT = 2, + VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_MAX_ENUM_EXT = 0x7FFFFFFF +} VkVideoEncodeH265RateControlStructureEXT; + typedef enum VkVideoEncodeH265CapabilityFlagBitsEXT { VK_VIDEO_ENCODE_H265_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT = 0x00000001, VK_VIDEO_ENCODE_H265_CAPABILITY_SCALING_LISTS_BIT_EXT = 0x00000002, @@ -729,14 +712,6 @@ typedef enum VkVideoEncodeH265TransformBlockSizeFlagBitsEXT { VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkVideoEncodeH265TransformBlockSizeFlagBitsEXT; typedef VkFlags VkVideoEncodeH265TransformBlockSizeFlagsEXT; - -typedef enum VkVideoEncodeH265RateControlStructureFlagBitsEXT { - VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0, - VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_FLAT_BIT_EXT = 0x00000001, - VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_DYADIC_BIT_EXT = 0x00000002, - VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkVideoEncodeH265RateControlStructureFlagBitsEXT; -typedef VkFlags VkVideoEncodeH265RateControlStructureFlagsEXT; typedef struct VkVideoEncodeH265CapabilitiesEXT { VkStructureType sType; void* pNext; @@ -789,7 +764,7 @@ typedef struct VkVideoEncodeH265DpbSlotInfoEXT { const StdVideoEncodeH265ReferenceInfo* pStdReferenceInfo; } VkVideoEncodeH265DpbSlotInfoEXT; -typedef struct VkVideoEncodeH265ReferenceListsEXT { +typedef struct VkVideoEncodeH265ReferenceListsInfoEXT { VkStructureType sType; const void* pNext; uint8_t referenceList0EntryCount; @@ -797,26 +772,26 @@ typedef struct VkVideoEncodeH265ReferenceListsEXT { uint8_t referenceList1EntryCount; const VkVideoEncodeH265DpbSlotInfoEXT* pReferenceList1Entries; const StdVideoEncodeH265ReferenceModifications* pReferenceModifications; -} VkVideoEncodeH265ReferenceListsEXT; +} VkVideoEncodeH265ReferenceListsInfoEXT; -typedef struct VkVideoEncodeH265NaluSliceSegmentEXT { - VkStructureType sType; - const void* pNext; - uint32_t ctbCount; - const VkVideoEncodeH265ReferenceListsEXT* pReferenceFinalLists; - const StdVideoEncodeH265SliceSegmentHeader* pSliceSegmentHeaderStd; -} VkVideoEncodeH265NaluSliceSegmentEXT; +typedef struct VkVideoEncodeH265NaluSliceSegmentInfoEXT { + VkStructureType sType; + const void* pNext; + uint32_t ctbCount; + const VkVideoEncodeH265ReferenceListsInfoEXT* pReferenceFinalLists; + const StdVideoEncodeH265SliceSegmentHeader* pSliceSegmentHeaderStd; +} VkVideoEncodeH265NaluSliceSegmentInfoEXT; typedef struct VkVideoEncodeH265VclFrameInfoEXT { - VkStructureType sType; - const void* pNext; - const VkVideoEncodeH265ReferenceListsEXT* pReferenceFinalLists; - uint32_t naluSliceSegmentEntryCount; - const VkVideoEncodeH265NaluSliceSegmentEXT* pNaluSliceSegmentEntries; - const StdVideoEncodeH265PictureInfo* pCurrentPictureInfo; + VkStructureType sType; + const void* pNext; + const VkVideoEncodeH265ReferenceListsInfoEXT* pReferenceFinalLists; + uint32_t naluSliceSegmentEntryCount; + const VkVideoEncodeH265NaluSliceSegmentInfoEXT* pNaluSliceSegmentEntries; + const StdVideoEncodeH265PictureInfo* pCurrentPictureInfo; } VkVideoEncodeH265VclFrameInfoEXT; -typedef struct VkVideoEncodeH265EmitPictureParametersEXT { +typedef struct VkVideoEncodeH265EmitPictureParametersInfoEXT { VkStructureType sType; const void* pNext; uint8_t vpsId; @@ -825,22 +800,22 @@ typedef struct VkVideoEncodeH265EmitPictureParametersEXT { VkBool32 emitSpsEnable; uint32_t ppsIdEntryCount; const uint8_t* ppsIdEntries; -} VkVideoEncodeH265EmitPictureParametersEXT; +} VkVideoEncodeH265EmitPictureParametersInfoEXT; -typedef struct VkVideoEncodeH265ProfileEXT { +typedef struct VkVideoEncodeH265ProfileInfoEXT { VkStructureType sType; const void* pNext; StdVideoH265ProfileIdc stdProfileIdc; -} VkVideoEncodeH265ProfileEXT; +} VkVideoEncodeH265ProfileInfoEXT; typedef struct VkVideoEncodeH265RateControlInfoEXT { - VkStructureType sType; - const void* pNext; - uint32_t gopFrameCount; - uint32_t idrPeriod; - uint32_t consecutiveBFrameCount; - VkVideoEncodeH265RateControlStructureFlagBitsEXT rateControlStructure; - uint8_t subLayerCount; + VkStructureType sType; + const void* pNext; + uint32_t gopFrameCount; + uint32_t idrPeriod; + uint32_t consecutiveBFrameCount; + VkVideoEncodeH265RateControlStructureEXT rateControlStructure; + uint8_t subLayerCount; } VkVideoEncodeH265RateControlInfoEXT; typedef struct VkVideoEncodeH265QpEXT { @@ -873,7 +848,7 @@ typedef struct VkVideoEncodeH265RateControlLayerInfoEXT { #define VK_EXT_video_decode_h264 1 #include "vk_video/vulkan_video_codec_h264std_decode.h" -#define VK_EXT_VIDEO_DECODE_H264_SPEC_VERSION 5 +#define VK_EXT_VIDEO_DECODE_H264_SPEC_VERSION 6 #define VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME "VK_EXT_video_decode_h264" typedef enum VkVideoDecodeH264PictureLayoutFlagBitsEXT { @@ -883,12 +858,12 @@ typedef enum VkVideoDecodeH264PictureLayoutFlagBitsEXT { VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkVideoDecodeH264PictureLayoutFlagBitsEXT; typedef VkFlags VkVideoDecodeH264PictureLayoutFlagsEXT; -typedef struct VkVideoDecodeH264ProfileEXT { +typedef struct VkVideoDecodeH264ProfileInfoEXT { VkStructureType sType; const void* pNext; StdVideoH264ProfileIdc stdProfileIdc; VkVideoDecodeH264PictureLayoutFlagsEXT pictureLayout; -} VkVideoDecodeH264ProfileEXT; +} VkVideoDecodeH264ProfileInfoEXT; typedef struct VkVideoDecodeH264CapabilitiesEXT { VkStructureType sType; @@ -922,11 +897,11 @@ typedef struct VkVideoDecodeH264PictureInfoEXT { const uint32_t* pSlicesDataOffsets; } VkVideoDecodeH264PictureInfoEXT; -typedef struct VkVideoDecodeH264MvcEXT { +typedef struct VkVideoDecodeH264MvcInfoEXT { VkStructureType sType; const void* pNext; const StdVideoDecodeH264Mvc* pStdMvc; -} VkVideoDecodeH264MvcEXT; +} VkVideoDecodeH264MvcInfoEXT; typedef struct VkVideoDecodeH264DpbSlotInfoEXT { VkStructureType sType; @@ -938,13 +913,13 @@ typedef struct VkVideoDecodeH264DpbSlotInfoEXT { #define VK_EXT_video_decode_h265 1 #include "vk_video/vulkan_video_codec_h265std_decode.h" -#define VK_EXT_VIDEO_DECODE_H265_SPEC_VERSION 3 +#define VK_EXT_VIDEO_DECODE_H265_SPEC_VERSION 4 #define VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME "VK_EXT_video_decode_h265" -typedef struct VkVideoDecodeH265ProfileEXT { +typedef struct VkVideoDecodeH265ProfileInfoEXT { VkStructureType sType; const void* pNext; StdVideoH265ProfileIdc stdProfileIdc; -} VkVideoDecodeH265ProfileEXT; +} VkVideoDecodeH265ProfileInfoEXT; typedef struct VkVideoDecodeH265CapabilitiesEXT { VkStructureType sType;