View Issue Details

IDProjectCategoryView StatusLast Update
0000656Cinelerra-GG[All Projects] Bugpublic2024-05-12 21:54
Reportermehw Assigned ToPhyllisSmith  
PrioritynormalSeveritytrivialReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000656: FFmpeg v6.1 compilation fails with latest Vulkan header files v1.3.280.0
DescriptionFFmpeg v6.1 compilation fails with errors like the following:

In file included from libavcodec/vulkan_av1.c:21:
libavcodec/vulkan_decode.h:31:5: error: unknown type name VkVideoDecodeAV1ProfileInfoMESA
   31 | VkVideoDecodeAV1ProfileInfoMESA av1_profile;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/vulkan_av1.c:38:5: error: unknown type name StdVideoAV1MESATile
   38 | StdVideoAV1MESATile tiles[MAX_TILES];
      | ^~~~~~~~~~~~~~~~~~~
libavcodec/vulkan_av1.c:39:5: error: unknown type name StdVideoAV1MESATileList
   39 | StdVideoAV1MESATileList tile_list;
      | ^~~~~~~~~~~~~~~~~~~~~~~
libavcodec/vulkan_av1.c:43:5: error: unknown type name VkVideoDecodeAV1DpbSlotInfoMESA
   43 | VkVideoDecodeAV1DpbSlotInfoMESA vkav1_ref;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/vulkan_av1.c:44:5: error: unknown type name StdVideoAV1MESAFrameHeader
   44 | StdVideoAV1MESAFrameHeader av1_frame_header;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/vulkan_av1.c:45:5: error: unknown type name VkVideoDecodeAV1PictureInfoMESA
   45 | VkVideoDecodeAV1PictureInfoMESA av1_pic_info;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/vulkan_av1.c:49:5: error: unknown type name VkVideoDecodeAV1DpbSlotInfoMESA
   49 | VkVideoDecodeAV1DpbSlotInfoMESA vkav1_refs[AV1_NUM_REF_FRAMES];
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/vulkan_av1.c:58:29: error: unknown type name VkVideoDecodeAV1DpbSlotInfoMESA; did you mean VkVideoDecodeAV1DpbSlotInfoKHR?
   58 | VkVideoDecodeAV1DpbSlotInfoMESA *vkav1_ref, /* Goes in ^ */
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | VkVideoDecodeAV1DpbSlotInfoKHR
Steps To ReproduceCompile from source Cinelerra-GG commit 9d8a344b33ecbb4fccc1c029605650d31207463c with Vulkan header files v1.3.280.0 installed in the system.

Tested on Gentoo GNU/Linux.
Additional InformationFFmpeg v6.1 compilation with latest Vulkan header files had been fixed upstream: https://github.com/FFmpeg/FFmpeg/commit/fef22c87ada4517441701e6e61e062c9f4399c8e

The attached patch creates the file `thirdparty/src/ffmpeg-6.1.patchE` (aforementioned upstream patch).

After applying the patch, the compilation concludes fine.
TagsFFmpeg, Vulkan

Activities

PhyllisSmith

PhyllisSmith

2024-05-12 21:54

manager   ~0005628

No problems reported so closing.
mehw

mehw

2024-05-09 09:12

reporter   ~0005627

Thanks!
PhyllisSmith

PhyllisSmith

2024-05-09 02:24

manager   ~0005626

Last edited: 2024-05-09 02:24

View 2 revisions

Patch checked into GIT for ffmpeg 6.1. Andrew stated/checked that "patch appeared 18 feb ...so hopefully it already part of ffmpeg 7.0". Will mark resolved in a few days and then close.

mehw

mehw

2024-05-08 17:47

reporter   ~0005624

You're welcome ;)
PhyllisSmith

PhyllisSmith

2024-05-08 15:17

manager   ~0005622

Will be testing today on other operating systems to ensure no impact. Thank you very much for the patch!
mehw

mehw

2024-05-08 10:18

reporter  

ffmpeg-6.1-vulkan-headers.patch (7,774 bytes)
In file included from libavcodec/vulkan_av1.c:21:
libavcodec/vulkan_decode.h:31:5: error: unknown type name VkVideoDecodeAV1ProfileInfoMESA
   31 |     VkVideoDecodeAV1ProfileInfoMESA av1_profile;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/vulkan_av1.c:38:5: error: unknown type name StdVideoAV1MESATile
   38 |     StdVideoAV1MESATile            tiles[MAX_TILES];
      |     ^~~~~~~~~~~~~~~~~~~
libavcodec/vulkan_av1.c:39:5: error: unknown type name StdVideoAV1MESATileList
   39 |     StdVideoAV1MESATileList        tile_list;
      |     ^~~~~~~~~~~~~~~~~~~~~~~
libavcodec/vulkan_av1.c:43:5: error: unknown type name VkVideoDecodeAV1DpbSlotInfoMESA
   43 |     VkVideoDecodeAV1DpbSlotInfoMESA    vkav1_ref;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/vulkan_av1.c:44:5: error: unknown type name StdVideoAV1MESAFrameHeader
   44 |     StdVideoAV1MESAFrameHeader         av1_frame_header;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/vulkan_av1.c:45:5: error: unknown type name VkVideoDecodeAV1PictureInfoMESA
   45 |     VkVideoDecodeAV1PictureInfoMESA    av1_pic_info;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/vulkan_av1.c:49:5: error: unknown type name VkVideoDecodeAV1DpbSlotInfoMESA
   49 |     VkVideoDecodeAV1DpbSlotInfoMESA     vkav1_refs[AV1_NUM_REF_FRAMES];
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/vulkan_av1.c:58:29: error: unknown type name VkVideoDecodeAV1DpbSlotInfoMESA; did you mean VkVideoDecodeAV1DpbSlotInfoKHR?
   58 |                             VkVideoDecodeAV1DpbSlotInfoMESA *vkav1_ref, /* Goes in ^ */
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                             VkVideoDecodeAV1DpbSlotInfoKHR

diff -Nuar a/thirdparty/src/ffmpeg-6.1.patchE b/thirdparty/src/ffmpeg-6.1.patchE
--- a/thirdparty/src/ffmpeg-6.1.patchE	1970-01-01 01:00:00.000000000 +0100
+++ b/thirdparty/src/ffmpeg-6.1.patchE	2024-05-08 10:40:37.426541664 +0200
@@ -0,0 +1,121 @@
+From fef22c87ada4517441701e6e61e062c9f4399c8e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= <[email protected]>
+Date: Wed, 14 Feb 2024 22:40:54 +0200
+Subject: [PATCH] {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)
+---
+ libavcodec/Makefile                                           | 4 ++--
+ libavcodec/vulkan_video.h                                     | 4 ++--
+ ...v1std_decode.h => vulkan_video_codec_av1std_decode_mesa.h} | 4 ++--
+ ..._video_codec_av1std.h => vulkan_video_codec_av1std_mesa.h} | 4 ++--
+ tests/ref/fate/source                                         | 4 ++--
+ 5 files changed, 10 insertions(+), 10 deletions(-)
+ rename libavcodec/{vulkan_video_codec_av1std_decode.h => vulkan_video_codec_av1std_decode_mesa.h} (89%)
+ rename libavcodec/{vulkan_video_codec_av1std.h => vulkan_video_codec_av1std_mesa.h} (99%)
+
+diff --git a/libavcodec/Makefile b/libavcodec/Makefile
+index ec57e53e300f9..eb25707ef5db9 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 b28e3fe0bde85..51f44dd54314d 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 a697c00593c63..e2f37b4e6e0dc 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 c46236c457238..c91589eee2bfe 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/tests/ref/fate/source b/tests/ref/fate/source
+index c575789dd55e7..8bb58b61f144e 100644
+--- a/tests/ref/fate/source
++++ b/tests/ref/fate/source
+@@ -23,8 +23,8 @@ compat/djgpp/math.h
+ compat/float/float.h
+ compat/float/limits.h
+ libavcodec/bitstream_template.h
+-libavcodec/vulkan_video_codec_av1std.h
+-libavcodec/vulkan_video_codec_av1std_decode.h
++libavcodec/vulkan_video_codec_av1std_decode_mesa.h
++libavcodec/vulkan_video_codec_av1std_mesa.h
+ tools/decode_simple.h
+ Use of av_clip() where av_clip_uintp2() could be used:
+ Use of av_clip() where av_clip_intp2() could be used:

Issue History

Date Modified Username Field Change
2024-05-08 10:18 mehw New Issue
2024-05-08 10:18 mehw Tag Attached: FFmpeg
2024-05-08 10:18 mehw Tag Attached: Vulkan
2024-05-08 10:18 mehw File Added: ffmpeg-6.1-vulkan-headers.patch
2024-05-08 15:17 PhyllisSmith Assigned To => PhyllisSmith
2024-05-08 15:17 PhyllisSmith Status new => acknowledged
2024-05-08 15:17 PhyllisSmith Note Added: 0005622
2024-05-08 17:47 mehw Note Added: 0005624
2024-05-09 02:24 PhyllisSmith Note Added: 0005626
2024-05-09 02:24 PhyllisSmith Note Edited: 0005626 View Revisions
2024-05-09 09:12 mehw Note Added: 0005627
2024-05-12 21:54 PhyllisSmith Status acknowledged => closed
2024-05-12 21:54 PhyllisSmith Resolution open => fixed
2024-05-12 21:54 PhyllisSmith Note Added: 0005628