1
0
forked from ports/opt

ffmpeg: fixed build with newer vulkan

This commit is contained in:
Tim Biermann 2024-04-06 19:24:00 +02:00
parent c809e44ff9
commit c52d10ebfd
Signed by untrusted user: tb
GPG Key ID: 42F8B4E30B673606
3 changed files with 129 additions and 2 deletions

View File

@ -1,8 +1,9 @@
untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/SW+CNJ9zgstSKGRo9FPr1xox6UmkEy0bcgKm2OR4TLaCCTizn+8uabbRSOAW5qNHtn/r9ZhhazEHV6e3WKoSQo=
SHA256 (Pkgfile) = 043f0ba5c19a1c44bc74e8970cc0567475692fdc2a603d07aba24e01991357bb
RWSE3ohX2g5d/UkPVvvcmyNdRM1sOzkmA5oV3ZIw+afxdpvUlnPU4aJ5IZPPPu5bQ/ffEBu5zeD2tWxqQQGW/aVFljSI6ADpkAM=
SHA256 (Pkgfile) = 61f9356cb9b59df6c14a5aed9ac703789c985c0d8167981c2e7fb4229c41b6e0
SHA256 (.footprint) = b1e690d6bd3ac029cdf1c7a618e537405ea5e75ba964249d118f26d9a4d7abca
SHA256 (ffmpeg-6.1.1.tar.bz2) = 5e3133939a61ef64ac9b47ffd29a5ea6e337a4023ef0ad972094b4da844e3a20
SHA256 (add-av_stream_get_first_dts-for-chromium.patch) = 57e26caced5a1382cb639235f9555fc50e45e7bf8333f7c9ae3d49b3241d3f77
SHA256 (fef22c87ada4517441701e6e61e062c9f4399c8e.patch) = c2ef9c35082ed2e5989428d086b7bfef1dfe9e0a85e6d259daf46f369f115483
SHA256 (250471ea1745fc703eb346a2a662304536a311b1.patch) = 2105240e9280856ba0878d4daa54d9a6bdb891ccf5fbd12ef0976a3bfc14fbc4
SHA256 (ffmpeg-x264-10bit.sh) = dde9627c41800235fbcfe0f74d2181be96239a82cd2d0d277715dddb57eb9cb3

View File

@ -9,6 +9,7 @@ version=6.1.1
release=2
source=(https://ffmpeg.org/releases/$name-$version.tar.bz2
add-av_stream_get_first_dts-for-chromium.patch
fef22c87ada4517441701e6e61e062c9f4399c8e.patch
250471ea1745fc703eb346a2a662304536a311b1.patch
ffmpeg-x264-10bit.sh)
@ -70,6 +71,7 @@ build() {
prt-get isinst x265 && PKGMK_FFMPEG+=' --enable-libx265'
patch -Np1 -i $SRC/250471ea1745fc703eb346a2a662304536a311b1.patch
patch -Np1 -i $SRC/fef22c87ada4517441701e6e61e062c9f4399c8e.patch
patch -Np1 -i $SRC/add-av_stream_get_first_dts-for-chromium.patch
sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure

View File

@ -0,0 +1,124 @@
From fef22c87ada4517441701e6e61e062c9f4399c8e Mon Sep 17 00:00:00 2001
From: =?utf8?q?Jan=20Ekstr=C3=B6m?= <jeebjp@gmail.com>
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 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/tests/ref/fate/source b/tests/ref/fate/source
index c575789dd5..8bb58b61f1 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:
--
2.25.1