public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Dominik Mierzejewski <dominik@greysector.net>
To: git-commits@fedoraproject.org
Subject: [rpms/ffmpeg] epel9-next: Backport a fix to build with Vulkan headers >= 1.3.280.0
Date: Mon, 20 Jul 2026 17:31:21 GMT	[thread overview]
Message-ID: <178456868117.1.17223097022563277434.rpms-ffmpeg-16bba3567bf3@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/ffmpeg
Branch : epel9-next
Commit : 16bba3567bf3b2ab231853898ecc3cde28908845
Author : Dominik Mierzejewski <dominik@greysector.net>
Date   : 2024-04-27T23:06:08+02:00
Stats  : +102/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/ffmpeg/c/16bba3567bf3b2ab231853898ecc3cde28908845?branch=epel9-next

Log:
Backport a fix to build with Vulkan headers >= 1.3.280.0

---
diff --git a/ffmpeg-vulkan.patch b/ffmpeg-vulkan.patch
new file mode 100644
index 0000000..18a6bf3
--- /dev/null
+++ b/ffmpeg-vulkan.patch
@@ -0,0 +1,99 @@
+From: Jan Ekström <jeebjp@gmail.com>
+Date: Wed, 14 Feb 2024 20:40:54 +0000 (+0200)
+Subject: {avcodec,tests}: rename the bundled Mesa AV1 vulkan video headers
+X-Git-Url: http://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/fef22c87ada4517441701e6e61e062c9f4399c8e
+
+{avcodec,tests}: rename the bundled Mesa AV1 vulkan video headers
+
+This together with adjusting the inclusion define allows for the
+build to not fail with latest Vulkan-Headers that contain the
+stabilized Vulkan AV1 decoding definitions.
+
+Compilation fails currently as the AV1 header is getting included
+via hwcontext_vulkan.h -> <vulkan/vulkan.h> -> vulkan_core.h, which
+finally includes vk_video/vulkan_video_codec_av1std.h and the decode
+header, leading to the bundled header to never defining anything
+due to the inclusion define being the same.
+
+This fix is imperfect, as it leads to additional re-definition
+warnings for things such as
+VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION. , but it is
+not clear how to otherwise have the bundled version trump the
+actually standardized one for a short-term compilation fix.
+
+(cherry picked from commit e06ce6d2b45edac4a2df04f304e18d4727417d24)
+---
+
+diff --git a/libavcodec/Makefile b/libavcodec/Makefile
+index ec57e53e30..eb25707ef5 100644
+--- a/libavcodec/Makefile
++++ b/libavcodec/Makefile
+@@ -1284,7 +1284,7 @@ SKIPHEADERS                            += %_tablegen.h                  \
+                                           aacenc_quantization.h         \
+                                           aacenc_quantization_misc.h    \
+                                           bitstream_template.h          \
+-                                          vulkan_video_codec_av1std.h   \
++                                          vulkan_video_codec_av1std_mesa.h \
+                                           $(ARCH)/vpx_arith.h          \
+ 
+ SKIPHEADERS-$(CONFIG_AMF)              += amfenc.h
+@@ -1306,7 +1306,7 @@ SKIPHEADERS-$(CONFIG_XVMC)             += xvmc.h
+ SKIPHEADERS-$(CONFIG_VAAPI)            += vaapi_decode.h vaapi_hevc.h vaapi_encode.h
+ SKIPHEADERS-$(CONFIG_VDPAU)            += vdpau.h vdpau_internal.h
+ SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX)     += videotoolbox.h vt_internal.h
+-SKIPHEADERS-$(CONFIG_VULKAN)           += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode.h
++SKIPHEADERS-$(CONFIG_VULKAN)           += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode_mesa.h
+ SKIPHEADERS-$(CONFIG_V4L2_M2M)         += v4l2_buffers.h v4l2_context.h v4l2_m2m.h
+ SKIPHEADERS-$(CONFIG_ZLIB)             += zlib_wrapper.h
+ 
+diff --git a/libavcodec/vulkan_video.h b/libavcodec/vulkan_video.h
+index b28e3fe0bd..51f44dd543 100644
+--- a/libavcodec/vulkan_video.h
++++ b/libavcodec/vulkan_video.h
+@@ -23,8 +23,8 @@
+ #include "vulkan.h"
+ 
+ #include <vk_video/vulkan_video_codecs_common.h>
+-#include "vulkan_video_codec_av1std.h"
+-#include "vulkan_video_codec_av1std_decode.h"
++#include "vulkan_video_codec_av1std_mesa.h"
++#include "vulkan_video_codec_av1std_decode_mesa.h"
+ 
+ #define CODEC_VER_MAJ(ver) (ver >> 22)
+ #define CODEC_VER_MIN(ver) ((ver >> 12) & ((1 << 10) - 1))
+diff --git a/libavcodec/vulkan_video_codec_av1std_decode.h b/libavcodec/vulkan_video_codec_av1std_decode_mesa.h
+similarity index 89%
+rename from libavcodec/vulkan_video_codec_av1std_decode.h
+rename to libavcodec/vulkan_video_codec_av1std_decode_mesa.h
+index a697c00593..e2f37b4e6e 100644
+--- a/libavcodec/vulkan_video_codec_av1std_decode.h
++++ b/libavcodec/vulkan_video_codec_av1std_decode_mesa.h
+@@ -14,8 +14,8 @@
+  * limitations under the License.
+  */
+ 
+-#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_
+-#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ 1
++#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_MESA_H_
++#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_MESA_H_ 1
+ 
+ /*
+ ** This header is NOT YET generated from the Khronos Vulkan XML API Registry.
+diff --git a/libavcodec/vulkan_video_codec_av1std.h b/libavcodec/vulkan_video_codec_av1std_mesa.h
+similarity index 99%
+rename from libavcodec/vulkan_video_codec_av1std.h
+rename to libavcodec/vulkan_video_codec_av1std_mesa.h
+index c46236c457..c91589eee2 100644
+--- a/libavcodec/vulkan_video_codec_av1std.h
++++ b/libavcodec/vulkan_video_codec_av1std_mesa.h
+@@ -14,8 +14,8 @@
+  * limitations under the License.
+  */
+ 
+-#ifndef VULKAN_VIDEO_CODEC_AV1STD_H_
+-#define VULKAN_VIDEO_CODEC_AV1STD_H_ 1
++#ifndef VULKAN_VIDEO_CODEC_AV1STD_MESA_H_
++#define VULKAN_VIDEO_CODEC_AV1STD_MESA_H_ 1
+ 
+ /*
+ ** This header is NOT YET generated from the Khronos Vulkan XML API Registry.

diff --git a/ffmpeg.spec b/ffmpeg.spec
index e4ceace..dab0f97 100644
--- a/ffmpeg.spec
+++ b/ffmpeg.spec
@@ -130,6 +130,8 @@ Patch4:         0001-lavc-libopenh264-Drop-openh264-runtime-version-check.patch
 Patch5:         ffmpeg-c99.patch
 # Fix build with gcc14 (-Wint-conversion, -Wincompatible-pointer-types)
 Patch6:         ffmpeg-gcc14.patch
+# Fix build with Vulkan headers >= 1.3.280.0
+Patch7:         ffmpeg-vulkan.patch
 
 # Set up dlopen for openh264
 Patch1001:      ffmpeg-dlopen-openh264.patch
@@ -878,6 +880,7 @@ rm -rf %{buildroot}%{_datadir}/%{name}/examples
 %changelog
 * Tue Apr 23 2024 Kalev Lember <klember@redhat.com> - 6.1.1-12
 - Stop using bundled openh264 headers in F40+ and build against noopenh264
+- Backport a fix to build with Vulkan headers >= 1.3.280.0
 
 * Wed Mar 13 2024 Sérgio Basto <sergio@serjux.com> - 6.1.1-11
 - Rebuild for jpegxl (libjxl) 0.10.2

                 reply	other threads:[~2026-07-20 17:31 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=178456868117.1.17223097022563277434.rpms-ffmpeg-16bba3567bf3@fedoraproject.org \
    --to=dominik@greysector.net \
    --cc=git-commits@fedoraproject.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox