vulkan/video: Add bit depth to session and session params

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32440>
This commit is contained in:
David Rosca
2025-06-10 12:15:45 +02:00
committed by Marge Bot
parent ee9ec055d9
commit ac935c18b2
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -43,6 +43,8 @@ vk_video_session_init(struct vk_device *device,
vid->ref_format = create_info->referencePictureFormat;
vid->max_dpb_slots = create_info->maxDpbSlots;
vid->max_active_ref_pics = create_info->maxActiveReferencePictures;
vid->luma_bit_depth = create_info->pVideoProfile->lumaBitDepth;
vid->chroma_bit_depth = create_info->pVideoProfile->chromaBitDepth;
switch (vid->op) {
case VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR: {
@@ -452,6 +454,8 @@ vk_video_session_parameters_init(struct vk_device *device,
vk_object_base_init(device, &params->base, VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR);
params->op = vid->op;
params->luma_bit_depth = vid->luma_bit_depth;
params->chroma_bit_depth = vid->chroma_bit_depth;
switch (vid->op) {
case VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR: {
+4
View File
@@ -81,6 +81,8 @@ struct vk_video_session {
struct vk_object_base base;
VkVideoSessionCreateFlagsKHR flags;
VkVideoCodecOperationFlagsKHR op;
VkVideoComponentBitDepthFlagsKHR luma_bit_depth;
VkVideoComponentBitDepthFlagsKHR chroma_bit_depth;
VkExtent2D max_coded;
VkFormat picture_format;
VkFormat ref_format;
@@ -112,6 +114,8 @@ struct vk_video_session {
struct vk_video_session_parameters {
struct vk_object_base base;
VkVideoCodecOperationFlagsKHR op;
VkVideoComponentBitDepthFlagsKHR luma_bit_depth;
VkVideoComponentBitDepthFlagsKHR chroma_bit_depth;
union {
struct {
uint32_t max_h264_sps_count;