mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
radv/av1: limit profile and bit depth to supported values
Same as with other codecs. Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28143>
This commit is contained in:
parent
18df1a81a8
commit
ee476f3eda
1 changed files with 11 additions and 0 deletions
|
|
@ -549,6 +549,17 @@ radv_GetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, cons
|
|||
return VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR;
|
||||
struct VkVideoDecodeAV1CapabilitiesKHR *ext =
|
||||
vk_find_struct(pCapabilities->pNext, VIDEO_DECODE_AV1_CAPABILITIES_KHR);
|
||||
|
||||
const struct VkVideoDecodeAV1ProfileInfoKHR *av1_profile =
|
||||
vk_find_struct_const(pVideoProfile->pNext, VIDEO_DECODE_AV1_PROFILE_INFO_KHR);
|
||||
|
||||
if (av1_profile->stdProfile != STD_VIDEO_AV1_PROFILE_MAIN)
|
||||
return VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR;
|
||||
|
||||
if (pVideoProfile->lumaBitDepth != VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR &&
|
||||
pVideoProfile->lumaBitDepth != VK_VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR)
|
||||
return VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR;
|
||||
|
||||
pCapabilities->maxDpbSlots = 9;
|
||||
pCapabilities->maxActiveReferencePictures = STD_VIDEO_AV1_NUM_REF_FRAMES;
|
||||
pCapabilities->flags |= VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue