diff --git a/build.yaml b/build.yaml index a03e56f88e..8a7ea3d750 100644 --- a/build.yaml +++ b/build.yaml @@ -1,7 +1,7 @@ --- # We just wrap `build` so this is really it name: "jellyfin-ffmpeg" -version: "5.1.3-2" +version: "5.1.3-3" packages: - buster-amd64 - buster-armhf diff --git a/builder/scripts.d/10-mingw.sh b/builder/scripts.d/10-mingw.sh index a50413c618..6163e6ca06 100755 --- a/builder/scripts.d/10-mingw.sh +++ b/builder/scripts.d/10-mingw.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://git.code.sf.net/p/mingw-w64/mingw-w64.git" -SCRIPT_COMMIT="d78ef3552df8cdbfd1a275296921787975573d54" +SCRIPT_COMMIT="d7877cbd2e080ffb77070cc08033efde9e034f13" ffbuild_enabled() { [[ $TARGET == win* ]] || return -1 diff --git a/builder/scripts.d/20-libxml2.sh b/builder/scripts.d/20-libxml2.sh index f72107a22b..81b7bb6c83 100755 --- a/builder/scripts.d/20-libxml2.sh +++ b/builder/scripts.d/20-libxml2.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/GNOME/libxml2.git" -SCRIPT_COMMIT="6273df6c6d84b6be8a62a62abf1d9b79cc2035f8" +SCRIPT_COMMIT="884474477284474e0151280aaa275a18e3d7a036" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/25-freetype.sh b/builder/scripts.d/25-freetype.sh index 13a3b2a9dd..bf1d9abcc6 100755 --- a/builder/scripts.d/25-freetype.sh +++ b/builder/scripts.d/25-freetype.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.freedesktop.org/freetype/freetype.git" -SCRIPT_COMMIT="7bed7a02f4bfbfe2a47efb4d06b9c02fdb83b758" +SCRIPT_COMMIT="e4586d960f339cf75e2e0b34aee30a0ed8353c0d" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/25-gmp.sh b/builder/scripts.d/25-gmp.sh index 926f71520c..23bbeb4e9f 100755 --- a/builder/scripts.d/25-gmp.sh +++ b/builder/scripts.d/25-gmp.sh @@ -1,17 +1,18 @@ #!/bin/bash -SCRIPT_REPO="https://gmplib.org/repo/gmp/" -SCRIPT_HGREV="614a1cd8bb1d" +SCRIPT_VERSION="6.2.1" +SCRIPT_SHA512="c99be0950a1d05a0297d65641dd35b75b74466f7bf03c9e8a99895a3b2f9a0856cd17887738fa51cf7499781b65c049769271cbcb77d057d2e9f1ec52e07dd84" +SCRIPT_URL="https://ftp.gnu.org/gnu/gmp/gmp-${SCRIPT_VERSION}.tar.xz" ffbuild_enabled() { return 0 } ffbuild_dockerbuild() { - retry-tool sh -c "rm -rf gmp && hg clone -r '$SCRIPT_HGREV' -u '$SCRIPT_HGREV' '$SCRIPT_REPO' gmp" - cd gmp + retry-tool check-wget "gmp.tar.xz" "$SCRIPT_URL" "$SCRIPT_SHA512" - ./.bootstrap + tar xaf "gmp.tar.xz" + cd "gmp-$SCRIPT_VERSION" local myconf=( --prefix="$FFBUILD_PREFIX" diff --git a/builder/scripts.d/25-xz.sh b/builder/scripts.d/25-xz.sh index 4f02f986c1..f5412c5ddd 100755 --- a/builder/scripts.d/25-xz.sh +++ b/builder/scripts.d/25-xz.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/xz-mirror/xz.git" -SCRIPT_COMMIT="1dbe12b90cff79bb51923733ac0840747b4b4131" +SCRIPT_COMMIT="dbb3a536ed9873ffa0870321f6873e564c6a9da8" ffbuild_enabled() { return 0 @@ -11,7 +11,7 @@ ffbuild_dockerbuild() { git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" xz cd xz - ./autogen.sh --no-po4a + ./autogen.sh --no-po4a --no-doxygen local myconf=( --prefix="$FFBUILD_PREFIX" diff --git a/builder/scripts.d/35-fontconfig.sh b/builder/scripts.d/35-fontconfig.sh index efe25c57dd..6d2bdec3ec 100755 --- a/builder/scripts.d/35-fontconfig.sh +++ b/builder/scripts.d/35-fontconfig.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.freedesktop.org/fontconfig/fontconfig.git" -SCRIPT_COMMIT="ff037052bc27ae1c0e97879fd7333d3afdf2566e" +SCRIPT_COMMIT="7e2a1b2577e8d90ea5be3f14091e809ac7742438" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/45-harfbuzz.sh b/builder/scripts.d/45-harfbuzz.sh index 2f1ee27afc..2832a5aa61 100755 --- a/builder/scripts.d/45-harfbuzz.sh +++ b/builder/scripts.d/45-harfbuzz.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/harfbuzz/harfbuzz.git" -SCRIPT_COMMIT="efefec13ccedc1461867544e2066e2042e86c66f" +SCRIPT_COMMIT="d4bbe3f48663944385f25f608438e1eb678fc4b7" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/45-x11/10-xproto.sh b/builder/scripts.d/45-x11/10-xproto.sh index 5447eeef40..b79c2deaaf 100755 --- a/builder/scripts.d/45-x11/10-xproto.sh +++ b/builder/scripts.d/45-x11/10-xproto.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/proto/xorgproto.git" -SCRIPT_COMMIT="6b1012c29c2eee95c6ea2ef63b0e5dc628a6cb7f" +SCRIPT_COMMIT="766967322209f2dcb72e6a8edea0c651f586201d" ffbuild_enabled() { [[ $TARGET != linux* ]] && return -1 diff --git a/builder/scripts.d/45-x11/40-libx11.sh b/builder/scripts.d/45-x11/40-libx11.sh index a0a05685cb..abd0ae4d65 100755 --- a/builder/scripts.d/45-x11/40-libx11.sh +++ b/builder/scripts.d/45-x11/40-libx11.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libx11.git" -SCRIPT_COMMIT="71b08b8af20474bb704a11affaa8ea39b06d5ddf" +SCRIPT_COMMIT="ab0442d3fa835ce16559b29532ac7f674f8557f4" ffbuild_enabled() { [[ $TARGET != linux* ]] && return -1 diff --git a/builder/scripts.d/50-dav1d.sh b/builder/scripts.d/50-dav1d.sh index ab454f9372..319eb393ac 100755 --- a/builder/scripts.d/50-dav1d.sh +++ b/builder/scripts.d/50-dav1d.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://code.videolan.org/videolan/dav1d.git" -SCRIPT_COMMIT="8b419c16bf1e37bc98044089da58f06824462cb9" +SCRIPT_COMMIT="2373fda303d46489c1ec269dc66369a31663cb25" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/50-libopus.sh b/builder/scripts.d/50-libopus.sh index 5b6ab88a0e..9cc7ec7fea 100755 --- a/builder/scripts.d/50-libopus.sh +++ b/builder/scripts.d/50-libopus.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/xiph/opus.git" -SCRIPT_COMMIT="5023249b5c935545fb02dbfe845cae996ecfc8bb" +SCRIPT_COMMIT="9fc8fc4cf432640f284113ba502ee027268b0d9f" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/50-libvpx.sh b/builder/scripts.d/50-libvpx.sh index b3e3f73601..0c13af67d3 100755 --- a/builder/scripts.d/50-libvpx.sh +++ b/builder/scripts.d/50-libvpx.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://chromium.googlesource.com/webm/libvpx" -SCRIPT_COMMIT="575bd73f6118a88c5a0cf1d27a8ec9b5bda8c278" +SCRIPT_COMMIT="14e52008edbf2e91386423fdd53310fe49654991" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/50-libwebp.sh b/builder/scripts.d/50-libwebp.sh index fb21cdb2a3..b0ba227383 100755 --- a/builder/scripts.d/50-libwebp.sh +++ b/builder/scripts.d/50-libwebp.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://chromium.googlesource.com/webm/libwebp" -SCRIPT_COMMIT="46bc4fc9d981b1760def26dd64b9c80ccbad9f6f" +SCRIPT_COMMIT="08d60d60066eb30ab8e0e3ccfa0cd0b68f8cccc6" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/50-openmpt.sh b/builder/scripts.d/50-openmpt.sh index d8fbbf3886..6bb161dbd0 100755 --- a/builder/scripts.d/50-openmpt.sh +++ b/builder/scripts.d/50-openmpt.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://source.openmpt.org/svn/openmpt/trunk/OpenMPT" -SCRIPT_REV="19366" +SCRIPT_REV="19439" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/50-srt.sh b/builder/scripts.d/50-srt.sh index 7807899c0b..9b809d47a6 100755 --- a/builder/scripts.d/50-srt.sh +++ b/builder/scripts.d/50-srt.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/Haivision/srt.git" -SCRIPT_COMMIT="3cefedefe91fca543083d260d1ed32efd2e7cba5" +SCRIPT_COMMIT="9448e26fcd7602098b4bf9cd7fe535136e89e10b" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/50-svtav1.sh b/builder/scripts.d/50-svtav1.sh index b2b86c57bf..34d2931e91 100755 --- a/builder/scripts.d/50-svtav1.sh +++ b/builder/scripts.d/50-svtav1.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.com/AOMediaCodec/SVT-AV1.git" -SCRIPT_COMMIT="6f3651c76d30c7564f9cbd2db8523a5bbaf2cee1" +SCRIPT_COMMIT="08c18ba0768ed3dbbff0903adc326fb3a7549bd9" ffbuild_enabled() { [[ $TARGET == win32 ]] && return -1 diff --git a/builder/scripts.d/50-vaapi/50-libva.sh b/builder/scripts.d/50-vaapi/50-libva.sh index e44719ed95..7de3784c96 100755 --- a/builder/scripts.d/50-vaapi/50-libva.sh +++ b/builder/scripts.d/50-vaapi/50-libva.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/intel/libva.git" -SCRIPT_COMMIT="f4c4c0370df2b756bd201f25b1ed7942475d44e0" +SCRIPT_COMMIT="1c58941b93ba5013c68e8370a408efd630275c9c" ffbuild_enabled() { [[ $TARGET != linux* ]] && return -1 diff --git a/builder/scripts.d/50-vulkan/50-shaderc.sh b/builder/scripts.d/50-vulkan/50-shaderc.sh index 1ebda3597b..e254cca3b8 100755 --- a/builder/scripts.d/50-vulkan/50-shaderc.sh +++ b/builder/scripts.d/50-vulkan/50-shaderc.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/google/shaderc.git" -SCRIPT_COMMIT="4dc596ddc2702092c670e828745dc3e0338d83c1" +SCRIPT_COMMIT="e31c4c2e41544d63d90be28c46e4a4793a624240" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/50-vulkan/55-spirv-cross.sh b/builder/scripts.d/50-vulkan/55-spirv-cross.sh index f4c9de8744..02f8f8d346 100755 --- a/builder/scripts.d/50-vulkan/55-spirv-cross.sh +++ b/builder/scripts.d/50-vulkan/55-spirv-cross.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/KhronosGroup/SPIRV-Cross.git" -SCRIPT_COMMIT="12542fc6fc05000e04742daf93892a0b10edbe80" +SCRIPT_COMMIT="2d3a152081ca6e6bea7093940d0f81088fe4d01c" ffbuild_enabled() { return 0 diff --git a/debian/changelog b/debian/changelog index 2e76e77edf..d4e3bb8281 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +jellyfin-ffmpeg (5.1.3-3) unstable; urgency=medium + + * Allow VA-API import DRM prime2 planar formats + * Fix the slow VPP tone-mapping on ADL-S and ADL-N + * Fix a potential memory leak in QSV + * Update dependencies + + -- nyanmisaka Thu, 15 Jun 2023 23:12:48 +0800 + jellyfin-ffmpeg (5.1.3-2) unstable; urgency=medium * Update deprecated params for SVT-AV1 encoder diff --git a/debian/patches/0052-backport-upstream-qsvenc-fixes.patch b/debian/patches/0052-backport-upstream-qsvenc-fixes.patch index fece558017..b71900b278 100644 --- a/debian/patches/0052-backport-upstream-qsvenc-fixes.patch +++ b/debian/patches/0052-backport-upstream-qsvenc-fixes.patch @@ -183,3 +183,23 @@ Index: jellyfin-ffmpeg/libavcodec/qsvenc.c } if ((avctx->codec_id == AV_CODEC_ID_H264 || +Index: jellyfin-ffmpeg/libavutil/hwcontext_qsv.c +=================================================================== +--- jellyfin-ffmpeg.orig/libavutil/hwcontext_qsv.c ++++ jellyfin-ffmpeg/libavutil/hwcontext_qsv.c +@@ -1689,6 +1689,15 @@ static int qsv_device_derive(AVHWDeviceC + AVDictionary *opts, int flags) + { + mfxIMPL impl; ++ QSVDevicePriv *priv; ++ ++ priv = av_mallocz(sizeof(*priv)); ++ if (!priv) ++ return AVERROR(ENOMEM); ++ ++ ctx->user_opaque = priv; ++ ctx->free = qsv_device_free; ++ + impl = choose_implementation("hw_any", child_device_ctx->type); + return qsv_device_derive_from_child(ctx, impl, + child_device_ctx, flags); diff --git a/debian/patches/0053-allow-vaapi-import-drm-prime2-planar-formats.patch b/debian/patches/0053-allow-vaapi-import-drm-prime2-planar-formats.patch new file mode 100644 index 0000000000..b45820f129 --- /dev/null +++ b/debian/patches/0053-allow-vaapi-import-drm-prime2-planar-formats.patch @@ -0,0 +1,51 @@ +Index: jellyfin-ffmpeg/libavutil/hwcontext_vaapi.c +=================================================================== +--- jellyfin-ffmpeg.orig/libavutil/hwcontext_vaapi.c ++++ jellyfin-ffmpeg/libavutil/hwcontext_vaapi.c +@@ -1015,6 +1015,7 @@ static const struct { + DRM_MAP(NV12, 1, DRM_FORMAT_NV12), + #if defined(VA_FOURCC_P010) && defined(DRM_FORMAT_R16) + DRM_MAP(P010, 2, DRM_FORMAT_R16, DRM_FORMAT_RG1616), ++ DRM_MAP(P010, 2, DRM_FORMAT_R16, DRM_FORMAT_GR1616), + #endif + DRM_MAP(BGRA, 1, DRM_FORMAT_ARGB8888), + DRM_MAP(BGRX, 1, DRM_FORMAT_XRGB8888), +@@ -1081,12 +1082,6 @@ static int vaapi_map_from_drm(AVHWFrames + + desc = (AVDRMFrameDescriptor*)src->data[0]; + +- if (desc->nb_objects != 1) { +- av_log(dst_fc, AV_LOG_ERROR, "VAAPI can only map frames " +- "made from a single DRM object.\n"); +- return AVERROR(EINVAL); +- } +- + va_fourcc = 0; + for (i = 0; i < FF_ARRAY_ELEMS(vaapi_drm_format_map); i++) { + if (desc->nb_layers != vaapi_drm_format_map[i].nb_layer_formats) +@@ -1195,6 +1190,12 @@ static int vaapi_map_from_drm(AVHWFrames + } + }; + ++ if (desc->nb_objects != 1) { ++ av_log(dst_fc, AV_LOG_ERROR, "VAAPI can only map frames " ++ "made from a single DRM object.\n"); ++ return AVERROR(EINVAL); ++ } ++ + buffer_handle = desc->objects[0].fd; + buffer_desc.pixel_format = va_fourcc; + buffer_desc.width = src_fc->width; +@@ -1226,6 +1227,12 @@ static int vaapi_map_from_drm(AVHWFrames + buffer_attrs, FF_ARRAY_ELEMS(buffer_attrs)); + } + #else ++ if (desc->nb_objects != 1) { ++ av_log(dst_fc, AV_LOG_ERROR, "VAAPI can only map frames " ++ "made from a single DRM object.\n"); ++ return AVERROR(EINVAL); ++ } ++ + buffer_handle = desc->objects[0].fd; + buffer_desc.pixel_format = va_fourcc; + buffer_desc.width = src_fc->width; diff --git a/debian/patches/series b/debian/patches/series index 34631920b2..eb0490a4dc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -50,3 +50,4 @@ 0050-fix-the-empty-output-in-webvtt-transcoding.patch 0051-update-deprecated-params-for-svt-av1-encoder.patch 0052-backport-upstream-qsvenc-fixes.patch +0053-allow-vaapi-import-drm-prime2-planar-formats.patch diff --git a/docker-build-win64.sh b/docker-build-win64.sh index b0de0fcef9..3f12a762de 100755 --- a/docker-build-win64.sh +++ b/docker-build-win64.sh @@ -159,9 +159,9 @@ popd popd # LZMA -git clone -b v5.4.1 --depth=1 https://github.com/xz-mirror/xz.git +git clone -b v5.4.3 --depth=1 https://github.com/xz-mirror/xz.git pushd xz -./autogen.sh --no-po4a +./autogen.sh --no-po4a --no-doxygen ./configure \ --prefix=${FF_DEPS_PREFIX} \ --host=${FF_TOOLCHAIN} \ @@ -322,7 +322,7 @@ popd # OPENMPT mkdir mpt pushd mpt -mpt_ver="0.7.1" +mpt_ver="0.7.2" mpt_link="https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${mpt_ver}+release.autotools.tar.gz" wget ${mpt_link} -O mpt.tar.gz tar xaf mpt.tar.gz @@ -456,7 +456,7 @@ popd popd # SVT-AV1 -git clone -b v1.5.0 --depth=1 https://gitlab.com/AOMediaCodec/SVT-AV1.git +git clone -b v1.6.0 --depth=1 https://gitlab.com/AOMediaCodec/SVT-AV1.git pushd SVT-AV1 mkdir build pushd build diff --git a/docker-build.sh b/docker-build.sh index c33c162db6..0f3a448bb5 100755 --- a/docker-build.sh +++ b/docker-build.sh @@ -141,7 +141,7 @@ prepare_extra_amd64() { NASM_PATH=/usr/lib/nasm-mozilla/bin/nasm fi pushd ${SOURCE_DIR} - git clone -b v1.5.0 --depth=1 https://gitlab.com/AOMediaCodec/SVT-AV1.git + git clone -b v1.6.0 --depth=1 https://gitlab.com/AOMediaCodec/SVT-AV1.git pushd SVT-AV1 mkdir build pushd build @@ -242,7 +242,7 @@ prepare_extra_amd64() { # GMMLIB pushd ${SOURCE_DIR} - git clone -b intel-gmmlib-22.3.5 --depth=1 https://github.com/intel/gmmlib.git + git clone -b intel-gmmlib-22.3.7 --depth=1 https://github.com/intel/gmmlib.git pushd gmmlib mkdir build && pushd build cmake -DCMAKE_INSTALL_PREFIX=${TARGET_DIR} .. @@ -276,7 +276,7 @@ prepare_extra_amd64() { # Provides VPL runtime (libmfx-gen.so.1.2) for 11th Gen Tiger Lake and newer # Both MSDK and VPL runtime can be loaded by MFX dispatcher (libmfx.so.1) pushd ${SOURCE_DIR} - git clone -b intel-onevpl-23.2.2 --depth=1 https://github.com/oneapi-src/oneVPL-intel-gpu.git + git clone -b intel-onevpl-23.2.3 --depth=1 https://github.com/oneapi-src/oneVPL-intel-gpu.git pushd oneVPL-intel-gpu mkdir build && pushd build cmake -DCMAKE_INSTALL_PREFIX=${TARGET_DIR} \ @@ -302,6 +302,8 @@ prepare_extra_amd64() { wget -q -O - https://github.com/intel/media-driver/commit/cbbd676f.patch | git apply # Correct AV1 supported tx mode caps for the AV1 VA-API encoder wget -q -O - https://github.com/intel/media-driver/commit/89201eaa.patch | git apply + # Fix the slow VPP tone-mapping on ADL-S and ADL-N + wget -q -O - https://github.com/intel/media-driver/commit/1097e39b.patch | git apply mkdir build && pushd build cmake -DCMAKE_INSTALL_PREFIX=${TARGET_DIR} \ -DENABLE_KERNELS=ON \ @@ -380,19 +382,7 @@ prepare_extra_amd64() { if [[ ${LLVM_VER} -ge 11 ]]; then apt-get install -y llvm-${LLVM_VER}-dev libudev-dev pushd ${SOURCE_DIR} - git clone https://gitlab.freedesktop.org/mesa/mesa.git - pushd mesa - git reset --hard "cf323446" - popd - # disable the broken hevc packed header - MESA_VA_PIC="mesa/src/gallium/frontends/va/picture.c" - MESA_VA_CONF="mesa/src/gallium/frontends/va/config.c" - sed -i 's|handleVAEncPackedHeaderParameterBufferType(context, buf);||g' ${MESA_VA_PIC} - sed -i 's|handleVAEncPackedHeaderDataBufferType(context, buf);||g' ${MESA_VA_PIC} - sed -i 's|if (u_reduce_video_profile(ProfileToPipe(profile)) == PIPE_VIDEO_FORMAT_HEVC)|if (0)|g' ${MESA_VA_CONF} - # force reporting all packed headers are supported - sed -i 's|value = VA_ENC_PACKED_HEADER_NONE;|value = 0x0000001f;|g' ${MESA_VA_CONF} - sed -i 's|if (attrib_list\[i\].type == VAConfigAttribEncPackedHeaders)|if (0)|g' ${MESA_VA_CONF} + git clone -b llvm11 --depth=1 https://gitlab.freedesktop.org/nyanmisaka/mesa.git meson setup mesa mesa_build \ --prefix=${TARGET_DIR} \ --libdir=lib \