From 9221feaf792cfbffd9145174e791460c9caf3486 Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Tue, 31 Dec 2024 14:44:00 +0900 Subject: [PATCH] anv: define ANV_VIDEO_H264_MAX_DPB_SLOTS prep work for remapping slot ids for h264 decoding. Signed-off-by: Hyunjun Ko Reviewed-by: Dave Airlie Part-of: --- src/intel/vulkan/anv_private.h | 1 + src/intel/vulkan/anv_video.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 9f97e746986..179df1d4b10 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -6276,6 +6276,7 @@ struct anv_vid_mem { #define ANV_MB_WIDTH 16 #define ANV_MB_HEIGHT 16 +#define ANV_VIDEO_H264_MAX_DPB_SLOTS 17 #define ANV_VIDEO_H264_MAX_NUM_REF_FRAME 16 #define ANV_VIDEO_H265_MAX_NUM_REF_FRAME 16 #define ANV_VIDEO_H265_HCP_NUM_REF_FRAME 8 diff --git a/src/intel/vulkan/anv_video.c b/src/intel/vulkan/anv_video.c index c0c6bcc732d..2b57556d545 100644 --- a/src/intel/vulkan/anv_video.c +++ b/src/intel/vulkan/anv_video.c @@ -140,7 +140,7 @@ anv_GetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, if (pVideoProfile->lumaBitDepth != VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR) return VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR; - pCapabilities->maxDpbSlots = 17; + pCapabilities->maxDpbSlots = ANV_VIDEO_H264_MAX_DPB_SLOTS; pCapabilities->maxActiveReferencePictures = ANV_VIDEO_H264_MAX_NUM_REF_FRAME; pCapabilities->pictureAccessGranularity.width = ANV_MB_WIDTH; pCapabilities->pictureAccessGranularity.height = ANV_MB_HEIGHT;