From 13222754ec136dc586a5821bf4dfcd023b5787f5 Mon Sep 17 00:00:00 2001 From: Daniel Bermond Date: Thu, 7 Nov 2024 19:44:45 -0300 Subject: [PATCH] Update to version 7.1 --- .SRCINFO | 23 ++++---- 031-ffmpeg-add-svt-vp9.patch | 54 +++++++++++++++++++ ...av_stream_get_first_dts-for-chromium.patch | 8 +-- ...fmpeg-fix-segfault-with-avisynthplus.patch | 10 ++-- ...-fix-nvidia-vulkan-decoding-segfault.patch | 2 +- PKGBUILD | 26 +++++---- 6 files changed, 93 insertions(+), 30 deletions(-) create mode 100644 031-ffmpeg-add-svt-vp9.patch diff --git a/.SRCINFO b/.SRCINFO index 618e11c..57402b7 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = ffmpeg-full pkgdesc = Complete solution to record, convert and stream audio and video (all possible features including libfdk-aac) - pkgver = 7.0.2 + pkgver = 7.1 pkgrel = 1 url = https://www.ffmpeg.org/ arch = x86_64 @@ -38,10 +38,11 @@ pkgbase = ffmpeg-full depends = kvazaar depends = ladspa depends = lame - depends = libavc1394 + depends = lcevcdec depends = lcms2 depends = lensfun-git depends = libass + depends = libavc1394 depends = libbluray depends = libbs2b depends = libcaca @@ -57,6 +58,7 @@ pkgbase = ffmpeg-full depends = libiec61883 depends = libilbc depends = libjxl + depends = liblc3 depends = libmodplug depends = libmysofa depends = libomxil-bellagio @@ -129,6 +131,7 @@ pkgbase = ffmpeg-full depends = shine depends = uavs3d-git depends = vo-amrwbenc + depends = vvenc depends = xavs depends = xavs2 depends = xevd @@ -145,26 +148,26 @@ pkgbase = ffmpeg-full provides = libswresample.so provides = ffmpeg conflicts = ffmpeg - source = https://ffmpeg.org/releases/ffmpeg-7.0.2.tar.xz - source = https://ffmpeg.org/releases/ffmpeg-7.0.2.tar.xz.asc + source = https://ffmpeg.org/releases/ffmpeg-7.1.tar.xz + source = https://ffmpeg.org/releases/ffmpeg-7.1.tar.xz.asc source = 010-ffmpeg-add-svt-hevc-ged80959.patch::https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/ed80959ebb5586aa7763c91a397d44be1798587c/ffmpeg_plugin/master-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch source = 020-ffmpeg-add-svt-hevc-docs-ged80959.patch::https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/ed80959ebb5586aa7763c91a397d44be1798587c/ffmpeg_plugin/0002-doc-Add-libsvt_hevc-encoder-docs.patch source = 030-ffmpeg-add-svt-vp9-g3b9a3fa.patch::https://raw.githubusercontent.com/OpenVisualCloud/SVT-VP9/3b9a3fa43da4cc5fe60c7d22afe2be15341392ea/ffmpeg_plugin/master-0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch + source = 031-ffmpeg-add-svt-vp9.patch source = 040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch source = 050-ffmpeg-fix-segfault-with-avisynthplus.patch source = 060-ffmpeg-fix-nvidia-vulkan-decoding-segfault.patch - source = 070-ffmpeg-xeve0.5.1-support.patch::https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/3e6c7948626f19c46c1a630c788ea6bbd9e7fbcb source = LICENSE validpgpkeys = FCF986EA15E6E293A5644F10B4322F04D67658D8 - sha256sums = 8646515b638a3ad303e23af6a3587734447cb8fc0a0c064ecdb8e95c4fd8b389 + sha256sums = 40973d44970dbc83ef302b0609f2e74982be2d85916dd2ee7472d30678a7abe6 sha256sums = SKIP sha256sums = 9047e18d34716812d4ea7eafc1d0fd8b376d922a4b6b4dc20237662fcaf0c996 sha256sums = a164ebdc4d281352bf7ad1b179aae4aeb33f1191c444bed96cb8ab333c046f81 sha256sums = 59da61f2b2c556fbe0cdbf84bcc00977ee3d2447085decb21f6298226559f2aa - sha256sums = 62509a98460d3d48afcb0ce26250def7dfed124b82acc95a3b84a2802910c1fa - sha256sums = b0ce071f0d9c7c5eff8e7e654e30c6f4377aa137797aeb54338c2c3a93d5472c - sha256sums = 4a8972bc6eae02ed9f473938b6e4d9dfa544274143dd735903073ca89633b721 - sha256sums = 9c76e4c5af11afed32c588d5d900f2eaf1ca43fc2611365f661df16acde912d0 + sha256sums = aa0daffc4d234b6621b63c298dc165d29522c5087f8905a923d23ee2d164e9ad + sha256sums = 57697441b8f3ff3be883a2444b4cb89eed452764d24965e74e7b101e6af7f70a + sha256sums = 26419f819d1f3e4d0534995b73d05a8195bc7c892b74c37c3880085af027515b + sha256sums = 5a3731d1410747703948c87e46bb3aef820c6038f7101ab37f9d072cd1d15d15 sha256sums = 04a7176400907fd7db0d69116b99de49e582a6e176b3bfb36a03e50a4cb26a36 pkgname = ffmpeg-full diff --git a/031-ffmpeg-add-svt-vp9.patch b/031-ffmpeg-add-svt-vp9.patch new file mode 100644 index 0000000..06b3f23 --- /dev/null +++ b/031-ffmpeg-add-svt-vp9.patch @@ -0,0 +1,54 @@ +--- a/configure ++++ b/configure +@@ -294,6 +294,7 @@ External library support: + --enable-libvorbis enable Vorbis en/decoding via libvorbis, + native implementation exists [no] + --enable-libvpx enable VP8 and VP9 de/encoding via libvpx [no] ++ --enable-libsvtvp9 enable VP9 encoding via svt [no] + --enable-libvvenc enable H.266/VVC encoding via vvenc [no] + --enable-libwebp enable WebP encoding via libwebp [no] + --enable-libx264 enable H.264 encoding via x264 [no] +@@ -1971,6 +1972,7 @@ EXTERNAL_LIBRARY_LIST=" + libvmaf + libvorbis + libvpx ++ libsvtvp9 + libvvenc + libwebp + libxevd +@@ -3577,6 +3579,7 @@ libvpx_vp8_decoder_deps="libvpx" + libvpx_vp8_encoder_deps="libvpx" + libvpx_vp9_decoder_deps="libvpx" + libvpx_vp9_encoder_deps="libvpx" ++libsvt_vp9_encoder_deps="libsvtvp9" + libvvenc_encoder_deps="libvvenc" + libwebp_encoder_deps="libwebp" + libwebp_anim_encoder_deps="libwebp" +@@ -7040,6 +7043,7 @@ enabled libvpx && { + fi + } + ++enabled libsvtvp9 && require_pkg_config libsvtvp9 SvtVp9Enc EbSvtVp9Enc.h eb_vp9_svt_init_handle + enabled libvvenc && require_pkg_config libvvenc "libvvenc >= 1.6.1" "vvenc/vvenc.h" vvenc_get_version + enabled libwebp && { + enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion +--- a/libavcodec/Makefile ++++ b/libavcodec/Makefile +@@ -1161,6 +1161,7 @@ OBJS-$(CONFIG_LIBVPX_VP8_DECODER) += libvpxdec.o + OBJS-$(CONFIG_LIBVPX_VP8_ENCODER) += libvpxenc.o + OBJS-$(CONFIG_LIBVPX_VP9_DECODER) += libvpxdec.o + OBJS-$(CONFIG_LIBVPX_VP9_ENCODER) += libvpxenc.o ++OBJS-$(CONFIG_LIBSVT_VP9_ENCODER) += libsvt_vp9.o + OBJS-$(CONFIG_LIBVVENC_ENCODER) += libvvenc.o + OBJS-$(CONFIG_LIBWEBP_ENCODER) += libwebpenc_common.o libwebpenc.o + OBJS-$(CONFIG_LIBWEBP_ANIM_ENCODER) += libwebpenc_common.o libwebpenc_animencoder.o +--- a/libavcodec/allcodecs.c ++++ b/libavcodec/allcodecs.c +@@ -800,6 +800,7 @@ extern const FFCodec ff_libvpx_vp8_encoder; + extern const FFCodec ff_libvpx_vp8_decoder; + extern FFCodec ff_libvpx_vp9_encoder; + extern const FFCodec ff_libvpx_vp9_decoder; ++extern const FFCodec ff_libsvt_vp9_encoder; + extern const FFCodec ff_libvvenc_encoder; + /* preferred over libwebp */ + extern const FFCodec ff_libwebp_anim_encoder; diff --git a/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch b/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch index 13c32d3..fa89a4c 100644 --- a/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch +++ b/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch @@ -1,6 +1,6 @@ --- a/libavformat/avformat.h +++ b/libavformat/avformat.h -@@ -1170,6 +1170,10 @@ typedef struct AVStreamGroup { +@@ -1202,6 +1202,10 @@ typedef struct AVStreamGroup { struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); @@ -13,9 +13,9 @@ /** --- a/libavformat/utils.c +++ b/libavformat/utils.c -@@ -56,6 +56,13 @@ int ff_unlock_avformat(void) - return ff_mutex_unlock(&avformat_mutex) ? -1 : 0; - } +@@ -44,6 +44,13 @@ + * various utility functions for use within FFmpeg + */ +// Chromium: We use the internal field first_dts vvv +int64_t av_stream_get_first_dts(const AVStream *st) diff --git a/050-ffmpeg-fix-segfault-with-avisynthplus.patch b/050-ffmpeg-fix-segfault-with-avisynthplus.patch index 70ccfdf..e184b05 100644 --- a/050-ffmpeg-fix-segfault-with-avisynthplus.patch +++ b/050-ffmpeg-fix-segfault-with-avisynthplus.patch @@ -1,11 +1,11 @@ --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c -@@ -143,7 +143,7 @@ static av_cold void avisynth_atexit_hand +@@ -120,7 +120,7 @@ typedef struct AviSynthContext { - static av_cold int avisynth_load_library(void) + static av_cold int avisynth_load_library(AviSynthContext *avs) { -- avs_library.library = dlopen(AVISYNTH_LIB, RTLD_NOW | RTLD_LOCAL); -+ avs_library.library = dlopen(AVISYNTH_LIB, RTLD_NOW | RTLD_DEEPBIND); - if (!avs_library.library) +- avs->avs_library.library = dlopen(AVISYNTH_LIB, RTLD_NOW | RTLD_LOCAL); ++ avs->avs_library.library = dlopen(AVISYNTH_LIB, RTLD_NOW | RTLD_DEEPBIND); + if (!avs->avs_library.library) return AVERROR_UNKNOWN; diff --git a/060-ffmpeg-fix-nvidia-vulkan-decoding-segfault.patch b/060-ffmpeg-fix-nvidia-vulkan-decoding-segfault.patch index bc10cbe..0ba6f75 100644 --- a/060-ffmpeg-fix-nvidia-vulkan-decoding-segfault.patch +++ b/060-ffmpeg-fix-nvidia-vulkan-decoding-segfault.patch @@ -1,6 +1,6 @@ --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c -@@ -606,6 +606,9 @@ int ff_vk_exec_add_dep_frame(FFVulkanCon +@@ -671,6 +671,9 @@ int ff_vk_exec_add_dep_frame(FFVulkanContext *s, FFVkExecContext *e, AVFrame *f, uint32_t *queue_family_dst; VkAccessFlagBits *access_dst; diff --git a/PKGBUILD b/PKGBUILD index 250ab63..3820be6 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ # Contributor: Iacopo Isimbaldi pkgname=ffmpeg-full -pkgver=7.0.2 +pkgver=7.1 pkgrel=1 _svt_hevc_ver='ed80959ebb5586aa7763c91a397d44be1798587c' _svt_vp9_ver='3b9a3fa43da4cc5fe60c7d22afe2be15341392ea' @@ -36,10 +36,11 @@ depends=( 'kvazaar' 'ladspa' 'lame' - 'libavc1394' + 'lcevcdec' 'lcms2' 'lensfun-git' 'libass' + 'libavc1394' 'libbluray' 'libbs2b' 'libcaca' @@ -55,6 +56,7 @@ depends=( 'libiec61883' 'libilbc' 'libjxl' + 'liblc3' 'libmodplug' 'libmysofa' 'libomxil-bellagio' @@ -128,6 +130,7 @@ depends=( 'shine' 'uavs3d-git' 'vo-amrwbenc' + 'vvenc' 'xavs' 'xavs2' 'xevd' @@ -154,20 +157,20 @@ source=("https://ffmpeg.org/releases/ffmpeg-${pkgver}.tar.xz"{,.asc} "010-ffmpeg-add-svt-hevc-g${_svt_hevc_ver:0:7}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/${_svt_hevc_ver}/ffmpeg_plugin/master-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch" "020-ffmpeg-add-svt-hevc-docs-g${_svt_hevc_ver:0:7}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/${_svt_hevc_ver}/ffmpeg_plugin/0002-doc-Add-libsvt_hevc-encoder-docs.patch" "030-ffmpeg-add-svt-vp9-g${_svt_vp9_ver:0:7}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-VP9/${_svt_vp9_ver}/ffmpeg_plugin/master-0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch" + "031-ffmpeg-add-svt-vp9.patch" '040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch' '050-ffmpeg-fix-segfault-with-avisynthplus.patch' '060-ffmpeg-fix-nvidia-vulkan-decoding-segfault.patch' - '070-ffmpeg-xeve0.5.1-support.patch'::'https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/3e6c7948626f19c46c1a630c788ea6bbd9e7fbcb' 'LICENSE') -sha256sums=('8646515b638a3ad303e23af6a3587734447cb8fc0a0c064ecdb8e95c4fd8b389' +sha256sums=('40973d44970dbc83ef302b0609f2e74982be2d85916dd2ee7472d30678a7abe6' 'SKIP' '9047e18d34716812d4ea7eafc1d0fd8b376d922a4b6b4dc20237662fcaf0c996' 'a164ebdc4d281352bf7ad1b179aae4aeb33f1191c444bed96cb8ab333c046f81' '59da61f2b2c556fbe0cdbf84bcc00977ee3d2447085decb21f6298226559f2aa' - '62509a98460d3d48afcb0ce26250def7dfed124b82acc95a3b84a2802910c1fa' - 'b0ce071f0d9c7c5eff8e7e654e30c6f4377aa137797aeb54338c2c3a93d5472c' - '4a8972bc6eae02ed9f473938b6e4d9dfa544274143dd735903073ca89633b721' - '9c76e4c5af11afed32c588d5d900f2eaf1ca43fc2611365f661df16acde912d0' + 'aa0daffc4d234b6621b63c298dc165d29522c5087f8905a923d23ee2d164e9ad' + '57697441b8f3ff3be883a2444b4cb89eed452764d24965e74e7b101e6af7f70a' + '26419f819d1f3e4d0534995b73d05a8195bc7c892b74c37c3880085af027515b' + '5a3731d1410747703948c87e46bb3aef820c6038f7101ab37f9d072cd1d15d15' '04a7176400907fd7db0d69116b99de49e582a6e176b3bfb36a03e50a4cb26a36') validpgpkeys=('FCF986EA15E6E293A5644F10B4322F04D67658D8') @@ -175,11 +178,11 @@ prepare() { rm -f "ffmpeg-${pkgver}/libavcodec/"libsvt_{hevc,vp9}.c patch -d "ffmpeg-${pkgver}" -Np1 -i "${srcdir}/010-ffmpeg-add-svt-hevc-g${_svt_hevc_ver:0:7}.patch" patch -d "ffmpeg-${pkgver}" -Np1 -i "${srcdir}/020-ffmpeg-add-svt-hevc-docs-g${_svt_hevc_ver:0:7}.patch" - patch -d "ffmpeg-${pkgver}" -Np1 -i "${srcdir}/030-ffmpeg-add-svt-vp9-g${_svt_vp9_ver:0:7}.patch" + patch -d "ffmpeg-${pkgver}" -Np1 -i "${srcdir}/031-ffmpeg-add-svt-vp9.patch" + patch -d "ffmpeg-${pkgver}" -Np1 -i <(filterdiff -i b/libavcodec/libsvt_vp9.c "030-ffmpeg-add-svt-vp9-g${_svt_vp9_ver:0:7}.patch") patch -d "ffmpeg-${pkgver}" -Np1 -i "${srcdir}/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch" patch -d "ffmpeg-${pkgver}" -Np1 -i "${srcdir}/050-ffmpeg-fix-segfault-with-avisynthplus.patch" patch -d "ffmpeg-${pkgver}" -Np1 -i "${srcdir}/060-ffmpeg-fix-nvidia-vulkan-decoding-segfault.patch" - patch -d "ffmpeg-${pkgver}" -Np1 -i <(filterdiff -x a/libavcodec/version.h "070-ffmpeg-xeve0.5.1-support.patch") } build() { @@ -248,6 +251,8 @@ build() { --enable-libjxl \ --enable-libklvanc \ --enable-libkvazaar \ + --enable-liblc3 \ + --enable-liblcevc-dec \ --enable-liblensfun \ --enable-libmodplug \ --enable-libmp3lame \ @@ -293,6 +298,7 @@ build() { --enable-libvo-amrwbenc \ --enable-libvorbis \ --enable-libvpx \ + --enable-libvvenc \ --enable-libwebp \ --enable-libx264 \ --enable-libx265 \