From 242130fde5c26daaa0e66f41f4c896b6ed8f8429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Tue, 14 Apr 2026 10:18:31 +0200 Subject: [PATCH] vulkan/video: Reject interlaced picture layout for H.264 baseline profile The H.264 baseline profile does not support interlaced content. Return VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR when a non-progressive picture layout is requested with a baseline profile. Reviewed-by: Hyunjun Ko Part-of: --- src/vulkan/runtime/vk_video.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vulkan/runtime/vk_video.c b/src/vulkan/runtime/vk_video.c index b0be11b348f..ea40eb8f524 100644 --- a/src/vulkan/runtime/vk_video.c +++ b/src/vulkan/runtime/vk_video.c @@ -3375,6 +3375,9 @@ vk_video_is_profile_supported(const VkVideoProfileInfoKHR *video_profile) case VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR: { const struct VkVideoDecodeH264ProfileInfoKHR *h264_profile = vk_find_struct_const(video_profile->pNext, VIDEO_DECODE_H264_PROFILE_INFO_KHR); + if (h264_profile->stdProfileIdc == STD_VIDEO_H264_PROFILE_IDC_BASELINE && + h264_profile->pictureLayout != VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_KHR) + return VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR; return is_h264_profile_supported(video_profile, h264_profile->stdProfileIdc); } case VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR: {