From 271a1c7997a88b015fcb9bf699a4def9ba73d385 Mon Sep 17 00:00:00 2001 From: Owen Rafferty Date: Sat, 27 Apr 2024 20:19:45 -0500 Subject: [PATCH] ffmpeg: 7.0 --- extra/ffmpeg/build | 8 -- extra/ffmpeg/checksums | 4 +- ...av_stream_get_first_dts-for-chromium.patch | 29 ----- extra/ffmpeg/patches/fix-vulkan-headers.patch | 122 ------------------ extra/ffmpeg/sources | 4 +- extra/ffmpeg/version | 2 +- 6 files changed, 3 insertions(+), 166 deletions(-) delete mode 100644 extra/ffmpeg/patches/add-av_stream_get_first_dts-for-chromium.patch delete mode 100644 extra/ffmpeg/patches/fix-vulkan-headers.patch diff --git a/extra/ffmpeg/build b/extra/ffmpeg/build index 1cfcd4a1..899c4111 100755 --- a/extra/ffmpeg/build +++ b/extra/ffmpeg/build @@ -1,13 +1,5 @@ #!/bin/sh -e -mv libavcodec/vulkan_video_codec_av1std_decode.h \ - libavcodec/vulkan_video_codec_av1std_decode_mesa.h -mv libavcodec/vulkan_video_codec_av1std.h \ - libavcodec/vulkan_video_codec_av1std_mesa.h - -patch -p1 < add-av_stream_get_first_dts-for-chromium.patch -patch -p1 < fix-vulkan-headers.patch - ./configure \ --cc="$CC" \ --cxx="$CXX" \ diff --git a/extra/ffmpeg/checksums b/extra/ffmpeg/checksums index 2754e4c2..1953c4ca 100644 --- a/extra/ffmpeg/checksums +++ b/extra/ffmpeg/checksums @@ -1,3 +1 @@ -7d93a0ed1716fa513119affb102e4902fd25b66c14075b6e12615da17230ff6e4b -4f16712641b400498753572c0f2d1e30f28fa0df0ea8d0bd2da9d2d74f6613b3ee -fc334b30e70b1504b62bd2b58bc7796c72d959346fbc2ce35fbe302d5ac24d34f5 +ea416c0960c735e26cd115723bf7fed2f64b3cf9b06226e7c7937f840102c2f32c diff --git a/extra/ffmpeg/patches/add-av_stream_get_first_dts-for-chromium.patch b/extra/ffmpeg/patches/add-av_stream_get_first_dts-for-chromium.patch deleted file mode 100644 index 0dc9c509..00000000 --- a/extra/ffmpeg/patches/add-av_stream_get_first_dts-for-chromium.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/libavformat/avformat.h b/libavformat/avformat.h -index 1916aa2..43aa2dd 100644 ---- a/libavformat/avformat.h -+++ b/libavformat/avformat.h -@@ -1019,6 +1019,8 @@ attribute_deprecated - int64_t av_stream_get_end_pts(const AVStream *st); - #endif - -+int64_t av_stream_get_first_dts(const AVStream *st); -+ - #define AV_PROGRAM_RUNNING 1 - - /** -diff --git a/libavformat/mux_utils.c b/libavformat/mux_utils.c -index 3e63b80..758d985 100644 ---- a/libavformat/mux_utils.c -+++ b/libavformat/mux_utils.c -@@ -40,6 +40,11 @@ int64_t av_stream_get_end_pts(const AVStream *st) - } - #endif - -+int64_t av_stream_get_first_dts(const AVStream *st) -+{ -+ return cffstream(st)->first_dts; -+} -+ - int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id, - int std_compliance) - { diff --git a/extra/ffmpeg/patches/fix-vulkan-headers.patch b/extra/ffmpeg/patches/fix-vulkan-headers.patch deleted file mode 100644 index 2d508c64..00000000 --- a/extra/ffmpeg/patches/fix-vulkan-headers.patch +++ /dev/null @@ -1,122 +0,0 @@ -From e06ce6d2b45edac4a2df04f304e18d4727417d24 Mon Sep 17 00:00:00 2001 -From: =?utf8?q?Jan=20Ekstr=C3=B6m?= -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_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. ---- - 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 470d7cb9b1..09ae5270b3 100644 ---- a/libavcodec/Makefile -+++ b/libavcodec/Makefile -@@ -1262,7 +1262,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 -@@ -1285,7 +1285,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 --#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 - diff --git a/extra/ffmpeg/sources b/extra/ffmpeg/sources index 7152efb2..48c1ef32 100644 --- a/extra/ffmpeg/sources +++ b/extra/ffmpeg/sources @@ -1,3 +1 @@ -https://ffmpeg.org/releases/ffmpeg-6.1.1.tar.xz -patches/add-av_stream_get_first_dts-for-chromium.patch -patches/fix-vulkan-headers.patch +https://ffmpeg.org/releases/ffmpeg-7.0.tar.xz diff --git a/extra/ffmpeg/version b/extra/ffmpeg/version index 6c1f58bc..8e769697 100644 --- a/extra/ffmpeg/version +++ b/extra/ffmpeg/version @@ -1 +1 @@ -6.1.1 2 +7.0 1