From 68e1aa6940e960b09abfc0a00fa63a283ed6bd02 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Tue, 22 Jul 2025 13:20:17 +0200 Subject: [PATCH] vulkan/video: Fix h265 level values From spec: "general_level_idc shall be set equal to a value of 30 times the level number." Fixes: 8243145f02c ("vulkan/video: add a h265 level translator.") Acked-by: Dave Airlie Part-of: (cherry picked from commit 2c3bb204a580c1cdec231e80e372a8ce7854ff39) --- .pick_status.json | 2 +- src/vulkan/runtime/vk_video.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index c921479c5f5..3fa44111a89 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -7324,7 +7324,7 @@ "description": "vulkan/video: Fix h265 level values", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "8243145f02c94315de898102f741edfb340c01b3", "notes": null diff --git a/src/vulkan/runtime/vk_video.c b/src/vulkan/runtime/vk_video.c index af0a766a124..8276f92aae0 100644 --- a/src/vulkan/runtime/vk_video.c +++ b/src/vulkan/runtime/vk_video.c @@ -1738,7 +1738,9 @@ vk_video_get_h265_nal_unit(const StdVideoEncodeH265PictureInfo *pic_info) return 0; } -static const uint8_t vk_video_h265_levels[] = {10, 20, 21, 30, 31, 40, 41, 50, 51, 52, 60, 61, 62}; +static const uint8_t vk_video_h265_levels[] = { + 30, 60, 63, 90, 93, 120, 123, 150, 153, 156, 180, 183, 186 +}; static uint8_t vk_video_get_h265_level(StdVideoH265LevelIdc level)