From: Lynne <code@ffmpeg.org> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH] Keep compatibility with old Vulkan headers (PR #20177) Date: Fri, 8 Aug 2025 16:14:46 +0300 (EEST) Message-ID: <20250808131446.9485468BB4E@ffbox0-bg.ffmpeg.org> (raw) PR #20177 opened by Lynne URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20177 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20177.patch This allows to compile the Vulkan code with headers from January 2023 (debian stable). From caf46528f92c1d616322274a609e24f77c4a18d1 Mon Sep 17 00:00:00 2001 From: Lynne <dev@lynne.ee> Date: Fri, 8 Aug 2025 21:15:56 +0900 Subject: [PATCH 1/2] vulkan_decode: add ifdefs around the profile struct and privatize The struct is not referenced anywhere else. --- libavcodec/vulkan_decode.c | 19 +++++++++++++++++++ libavcodec/vulkan_decode.h | 10 ---------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c index a62ad5bc90..0056838d04 100644 --- a/libavcodec/vulkan_decode.c +++ b/libavcodec/vulkan_decode.c @@ -68,6 +68,25 @@ static const FFVulkanDecodeDescriptor *dec_descs[] = { #endif }; +typedef struct FFVulkanDecodeProfileData { +#if CONFIG_H264_VULKAN_HWACCEL + VkVideoDecodeH264ProfileInfoKHR h264_profile; +#endif +#if CONFIG_HEVC_VULKAN_HWACCEL + VkVideoDecodeH265ProfileInfoKHR h265_profile; +#endif +#if CONFIG_VP9_VULKAN_HWACCEL + VkVideoDecodeVP9ProfileInfoKHR vp9_profile; +#endif +#if CONFIG_AV1_VULKAN_HWACCEL + VkVideoDecodeAV1ProfileInfoKHR av1_profile; +#endif + + VkVideoDecodeUsageInfoKHR usage; + VkVideoProfileInfoKHR profile; + VkVideoProfileListInfoKHR profile_list; +} FFVulkanDecodeProfileData; + static const FFVulkanDecodeDescriptor *get_codecdesc(enum AVCodecID codec_id) { for (size_t i = 0; i < FF_ARRAY_ELEMS(dec_descs); i++) diff --git a/libavcodec/vulkan_decode.h b/libavcodec/vulkan_decode.h index bf51d5a170..96c330bdc9 100644 --- a/libavcodec/vulkan_decode.h +++ b/libavcodec/vulkan_decode.h @@ -35,16 +35,6 @@ typedef struct FFVulkanDecodeDescriptor { VkExtensionProperties ext_props; } FFVulkanDecodeDescriptor; -typedef struct FFVulkanDecodeProfileData { - VkVideoDecodeH264ProfileInfoKHR h264_profile; - VkVideoDecodeH265ProfileInfoKHR h265_profile; - VkVideoDecodeVP9ProfileInfoKHR vp9_profile; - VkVideoDecodeAV1ProfileInfoKHR av1_profile; - VkVideoDecodeUsageInfoKHR usage; - VkVideoProfileInfoKHR profile; - VkVideoProfileListInfoKHR profile_list; -} FFVulkanDecodeProfileData; - typedef struct FFVulkanDecodeShared { FFVulkanContext s; FFVkVideoCommon common; -- 2.49.1 From b278c29c19c947b71d531ba32a1330f336c37577 Mon Sep 17 00:00:00 2001 From: Lynne <dev@lynne.ee> Date: Fri, 8 Aug 2025 22:12:57 +0900 Subject: [PATCH 2/2] configure: enable Vulkan VP9 decoding and AV1 encoding if the headers support it --- configure | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 6d8ad94b57..638c4d96f8 100755 --- a/configure +++ b/configure @@ -2660,6 +2660,7 @@ CONFIG_EXTRA=" tpeldsp vaapi_1 vaapi_encode + vulkan_1_4 vc1dsp videodsp vp3dsp @@ -3330,7 +3331,7 @@ vp9_vdpau_hwaccel_deps="vdpau VdpPictureInfoVP9" vp9_vdpau_hwaccel_select="vp9_decoder" vp9_videotoolbox_hwaccel_deps="videotoolbox" vp9_videotoolbox_hwaccel_select="vp9_decoder" -vp9_vulkan_hwaccel_deps="vulkan" +vp9_vulkan_hwaccel_deps="vulkan vulkan_1_4" vp9_vulkan_hwaccel_select="vp9_decoder" vvc_vaapi_hwaccel_deps="vaapi VAPictureParameterBufferVVC" vvc_vaapi_hwaccel_select="vvc_decoder" @@ -3352,6 +3353,7 @@ qsvdec_select="qsv" qsvenc_select="qsv" qsvvpp_select="qsv" vaapi_encode_deps="vaapi" +vulkan_1_4_deps="vulkan" vulkan_encode_deps="vulkan" v4l2_m2m_deps="linux_videodev2_h sem_timedwait" @@ -3404,6 +3406,7 @@ av1_qsv_encoder_deps="libvpl" av1_qsv_encoder_select="qsvenc" av1_vaapi_encoder_deps="VAEncPictureParameterBufferAV1" av1_vaapi_encoder_select="cbs_av1 vaapi_encode" +av1_vulkan_encoder_deps="vulkan_1_4" av1_vulkan_encoder_select="cbs_av1 vulkan_encode" h263_v4l2m2m_decoder_deps="v4l2_m2m h263_v4l2_m2m" h263_v4l2m2m_encoder_deps="v4l2_m2m h263_v4l2_m2m" @@ -7515,6 +7518,9 @@ fi if disabled vulkan; then disable libglslang libshaderc spirv_compiler +elif + check_pkg_config_header_only vulkan_1_4 "vulkan >= 1.4.317" "vulkan/vulkan.h" "defined VK_VERSION_1_4" || + check_cpp_condition vulkan_1_4 "vulkan/vulkan.h" "defined(VK_VERSION_1_5) || (defined(VK_VERSION_1_4) && VK_HEADER_VERSION >= 317)" fi if enabled x86; then -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
reply other threads:[~2025-08-08 13:14 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20250808131446.9485468BB4E@ffbox0-bg.ffmpeg.org \ --to=code@ffmpeg.org \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git