diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2024-05-28 18:08:19 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2024-05-28 21:36:00 +0200 |
commit | bd0f6e74cb495743b6b39868d11437c1ca32d549 (patch) | |
tree | 03f681f3c1c78aca0489f8c9676bdf978fc3eec2 /source/l | |
parent | 6602af83e2296cba3a6e204805b890d725d0f750 (diff) | |
download | current-bd0f6e74cb495743b6b39868d11437c1ca32d549.tar.gz current-bd0f6e74cb495743b6b39868d11437c1ca32d549.tar.xz |
Tue May 28 18:08:19 UTC 202420240528180819
a/sysvinit-scripts-15.1-noarch-17.txz: Rebuilt.
rc.S: enable swapping on a ZRAM device, configurable in /etc/default/zram.
rc.S, rc.6: Don't use mount -n option.
l/adwaita-icon-theme-46.2-noarch-1.txz: Upgraded.
l/adwaita-icon-theme-legacy-20240517_7642b10-noarch-1.txz: Added.
Thanks to reddog83.
l/enchant-2.8.0-x86_64-1.txz: Upgraded.
l/ffmpeg-6.1.1-x86_64-3.txz: Rebuilt.
Patched to fix AV1 VA-API dropping frames. Thanks to fulalas.
l/python-zipp-3.19.0-x86_64-1.txz: Upgraded.
xap/mozilla-firefox-126.0.1-x86_64-1.txz: Upgraded.
This is a bugfix release.
For more information, see:
https://www.mozilla.org/en-US/firefox/126.0.1/releasenotes/
isolinux/initrd.img: Rebuilt.
Add /sbin/zramctl.
rc.S: Set up some swap on a ZRAM device.
SeTpartitions: Support installing to bcachefs filesystems.
SeTpartitions: quit offering reiserfs which will be gone in Linux 6.10.
usb-and-pxe-installers/usbboot.img: Rebuilt.
Add /sbin/zramctl.
rc.S: Set up some swap on a ZRAM device.
SeTpartitions: Support installing to bcachefs filesystems.
SeTpartitions: quit offering reiserfs which will be gone in Linux 6.10.
Diffstat (limited to 'source/l')
10 files changed, 782 insertions, 54 deletions
diff --git a/source/l/adwaita-icon-theme-legacy/adwaita-icon-theme-legacy.SlackBuild b/source/l/adwaita-icon-theme-legacy/adwaita-icon-theme-legacy.SlackBuild new file mode 100755 index 000000000..6ecf9d94a --- /dev/null +++ b/source/l/adwaita-icon-theme-legacy/adwaita-icon-theme-legacy.SlackBuild @@ -0,0 +1,149 @@ +#!/bin/bash + +# Copyright 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PKGNAM=adwaita-icon-theme-legacy +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-1} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$(uname -m) ;; + esac + export ARCH +fi + +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-noarch-$BUILD.txz" + exit 0 +fi + +NUMJOBS=${NUMJOBS:-" -j $(expr $(nproc) + 1) "} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "armv7hl" ]; then + SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16" + LIBDIRSUFFIX="" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +TMP=${TMP:-/tmp} +PKG=$TMP/package-$PKGNAM + +rm -rf $PKG +mkdir -p $TMP $PKG + +cd $TMP +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1 +cd $PKGNAM-$VERSION || exit 1 + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \+ -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \+ + +# Configure, build, and install: +export CFLAGS="$SLKCFLAGS" +export CXXFLAGS="$SLKCFLAGS" +mkdir meson-build +cd meson-build +meson setup \ + --prefix=/usr \ + --libdir=lib${LIBDIRSUFFIX} \ + --libexecdir=/usr/libexec \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --includedir=/usr/include \ + --datadir=/usr/share \ + --mandir=/usr/man \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --buildtype=release \ + .. || exit 1 + "${NINJA:=ninja}" $NUMJOBS || exit 1 + DESTDIR=$PKG $NINJA install || exit 1 +cd .. + +# Add some extra icons that are missing for Xfce. +# Copy from the main tree and back to make sure that we +# don't overwrite these if they eventally appear. +( cd $PKG + mkdir tmpicons + cd tmpicons + tar xf $CWD/adwaita-xfce-icons-0.6.tar.xz + rm -f README + mv usr/share/icons/Adwaita usr/share/icons/AdwaitaLegacy + rsync -lprvt --progress ../usr/ usr/ + # Then sync back: + rsync -lprvt --progress usr/ ../usr/ + # And remove the leftovers: + cd .. + rm -r tmpicons +) + +# It's a bad idea to ship these in the packages. If they aren't kept +# updated, there will be missing icons. Let the user create them if +# they care to. +find $PKG -name icon-theme.cache -exec rm "{}" \+ +find $PKG -name .icon-theme.cache -exec rm "{}" \; +find $PKG -name .placeholder -exec rm "{}" \; +find $PKG -name .empty -exec rm "{}" \; + +# Add a documentation directory: +mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION +cp -a \ + COPYING* NEWS* README* \ + $PKG/usr/doc/${PKGNAM}-$VERSION + +mv $PKG/usr/share/licenses/*/* $PKG/usr/doc/$PKGNAM-$VERSION +rm -rf $PKG/usr/share/licenses + +mkdir -p $PKG/install +zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-noarch-$BUILD.txz diff --git a/source/l/adwaita-icon-theme-legacy/adwaita-icon-theme-legacy.url b/source/l/adwaita-icon-theme-legacy/adwaita-icon-theme-legacy.url new file mode 100644 index 000000000..a18ce55fc --- /dev/null +++ b/source/l/adwaita-icon-theme-legacy/adwaita-icon-theme-legacy.url @@ -0,0 +1 @@ +https://gitlab.gnome.org/jimmac/adwaita-icon-theme-legacy diff --git a/source/l/adwaita-icon-theme-legacy/doinst.sh b/source/l/adwaita-icon-theme-legacy/doinst.sh new file mode 100644 index 000000000..be9e95b4f --- /dev/null +++ b/source/l/adwaita-icon-theme-legacy/doinst.sh @@ -0,0 +1,6 @@ +if [ -e /usr/share/icons/AdwaitaLegacy/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache /usr/share/icons/AdwaitaLegacy 1> /dev/null 2> /dev/null + fi +fi + diff --git a/source/l/adwaita-icon-theme-legacy/fetch-adwaita-icon-theme-legacy.sh b/source/l/adwaita-icon-theme-legacy/fetch-adwaita-icon-theme-legacy.sh new file mode 100755 index 000000000..9c6307ea4 --- /dev/null +++ b/source/l/adwaita-icon-theme-legacy/fetch-adwaita-icon-theme-legacy.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +# Copyright 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +PKGNAM=adwaita-icon-theme-legacy + +# Pull a stable branch + patches +BRANCH=${1:-master} + +# Clear download area: +rm -rf ${PKGNAM} + +# Clone repository: +git clone https://gitlab.gnome.org/jimmac/adwaita-icon-theme-legacy + +# checkout $BRANCH: +( cd ${PKGNAM} + git checkout $BRANCH || exit 1 +) + +HEADISAT="$( cd ${PKGNAM} && git log -1 --format=%h )" +DATE="$( cd ${PKGNAM} && git log -1 --format=%cd --date=format:%Y%m%d )" +LONGDATE="$( cd ${PKGNAM} && git log -1 --format=%cd --date=format:%c )" +# Cleanup. We're not packing up the whole git repo. +( cd ${PKGNAM} && find . -type d -name ".git*" -exec rm -rf {} \; 2> /dev/null ) +mv ${PKGNAM} ${PKGNAM}-${DATE}_${HEADISAT} +tar cf ${PKGNAM}-${DATE}_${HEADISAT}.tar ${PKGNAM}-${DATE}_${HEADISAT} +plzip -9 -f ${PKGNAM}-${DATE}_${HEADISAT}.tar +rm -rf ${PKGNAM}-${DATE}_${HEADISAT} +touch -d "$LONGDATE" ${PKGNAM}-${DATE}_${HEADISAT}.tar.lz +echo +echo "${PKGNAM} branch $BRANCH with HEAD at $HEADISAT packaged as ${PKGNAM}-${DATE}_${HEADISAT}.tar.lz" +echo diff --git a/source/l/adwaita-icon-theme-legacy/slack-desc b/source/l/adwaita-icon-theme-legacy/slack-desc new file mode 100644 index 000000000..4912be9ed --- /dev/null +++ b/source/l/adwaita-icon-theme-legacy/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +adwaita-icon-theme-legacy: adwaita-icon-theme-legacy (fallback icons from old Adwaita theme) +adwaita-icon-theme-legacy: +adwaita-icon-theme-legacy: AdwaitaLegacy theme that provides fallback icons that have been +adwaita-icon-theme-legacy: removed from the main Adwaita theme. +adwaita-icon-theme-legacy: +adwaita-icon-theme-legacy: Homepage: https://gitlab.gnome.org/jimmac/adwaita-icon-theme-legacy +adwaita-icon-theme-legacy: +adwaita-icon-theme-legacy: +adwaita-icon-theme-legacy: +adwaita-icon-theme-legacy: +adwaita-icon-theme-legacy: diff --git a/source/l/adwaita-icon-theme/adwaita-icon-theme.SlackBuild b/source/l/adwaita-icon-theme/adwaita-icon-theme.SlackBuild index 6264cd83e..4a5b44147 100755 --- a/source/l/adwaita-icon-theme/adwaita-icon-theme.SlackBuild +++ b/source/l/adwaita-icon-theme/adwaita-icon-theme.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2008, 2009, 2010, 2012, 2013, 2018, 2023 Patrick Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2010, 2012, 2013, 2018, 2023, 2024 Patrick Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=adwaita-icon-theme VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} @@ -92,51 +92,13 @@ meson setup \ DESTDIR=$PKG $NINJA install || exit 1 cd .. -# Add some extra icons that have gone missing since adwaita-icon-theme-41.0 -# to ensure complete coverage of the FDo icon theme specification. -# Copy from the main tree and back to make sure that we -# don't overwrite these if they eventally appear. -( cd $PKG - mkdir tmpicons - cd tmpicons - tar xvf $CWD/41/adwaita-icon-theme-41.0.tar.xz || exit 1 - cd adwaita-icon-theme-41.0 - # Configure, build, and install: - export CFLAGS="$SLKCFLAGS" - export CXXFLAGS="$SLKCFLAGS" - ./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --build=$ARCH-slackware-linux || exit 1 - make $NUMJOBS || make || exit 1 - make install DESTDIR=$PKG/tmpicons || exit 1 - rsync -lprvt --progress ../usr/ usr/ - # Then sync back: - rsync -lprvt --progress usr/ ../usr/ - # And remove the leftovers: - cd .. - rm -r tmpicons -) - -# Add some extra icons that are missing for Xfce. -# Copy from the main tree and back to make sure that we -# don't overwrite these if they eventally appear. -( cd $PKG - mkdir tmpicons - cd tmpicons - tar xf $CWD/adwaita-xfce-icons-0.6.tar.xz - rm -f README - rsync -lprvt --progress ../usr/ usr/ - # Then sync back: - rsync -lprvt --progress usr/ ../usr/ - # And remove the leftovers: - cd .. - rm -r tmpicons -) - +# It's a bad idea to ship these in the packages. If they aren't kept +# updated, there will be missing icons. Let the user create them if +# they care to. +find $PKG -name icon-theme.cache -exec rm "{}" \+ find $PKG -name .icon-theme.cache -exec rm "{}" \; +find $PKG -name .placeholder -exec rm "{}" \; +find $PKG -name .empty -exec rm "{}" \; mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a \ @@ -147,10 +109,8 @@ if [ -r ChangeLog ]; then touch -r ChangeLog $PKG/usr/doc/$PKGNAM/ChangeLog fi -# It's a bad idea to ship these in the packages. If they aren't kept -# updated, there will be missing icons. Let the user create them if -# they care to. -find $PKG -name icon-theme.cache -exec rm "{}" \+ +mv $PKG/usr/share/licenses/*/* $PKG/usr/doc/$PKGNAM-$VERSION +rm -rf $PKG/usr/share/licenses mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc @@ -158,4 +118,3 @@ zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-noarch-$BUILD.txz - diff --git a/source/l/enchant/enchant.url b/source/l/enchant/enchant.url index a89b5411e..2d56e310c 100644 --- a/source/l/enchant/enchant.url +++ b/source/l/enchant/enchant.url @@ -1,2 +1,2 @@ https://github.com/AbiWord/enchant -https://github.com/AbiWord/enchant/releases/download/v2.7.3/enchant-2.7.3.tar.gz +https://github.com/AbiWord/enchant/releases/download/v2.8.0/enchant-2.8.0.tar.gz diff --git a/source/l/ffmpeg/FFmpeg-devel-v2-1-2-lavc-vaapi_decode-Make-it-possible-to-send-multiple-slice-params-buffers.patch b/source/l/ffmpeg/FFmpeg-devel-v2-1-2-lavc-vaapi_decode-Make-it-possible-to-send-multiple-slice-params-buffers.patch new file mode 100644 index 000000000..f801f2dd6 --- /dev/null +++ b/source/l/ffmpeg/FFmpeg-devel-v2-1-2-lavc-vaapi_decode-Make-it-possible-to-send-multiple-slice-params-buffers.patch @@ -0,0 +1,305 @@ +From patchwork Wed May 8 07:11:11 2024 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: David Rosca <nowrep@gmail.com> +X-Patchwork-Id: 48663 +Delivered-To: ffmpegpatchwork2@gmail.com +Received: by 2002:a05:6a20:9c8f:b0:1af:cdee:28c5 with SMTP id mj15csp25621pzb; + Wed, 8 May 2024 00:13:15 -0700 (PDT) +X-Forwarded-Encrypted: i=2; + AJvYcCWCijb8ZSk/y8BcczxdaxTNBz7xLlmGjenN9PJh0RzaUJGrdvM2Z+GAPh5e5kTeJCYeN8HiQuAyRm6Zzig7PSUIzb8PhAA2sq2Yzw== +X-Google-Smtp-Source: + AGHT+IHdqdMZBAjvbqLRYHa7Md6t9fwRSoJZl7CE/0w7QXsoqw/TDzXZ6Mpbl7AURm+q/U0l6qor +X-Received: by 2002:a50:8713:0:b0:572:689f:6380 with SMTP id + 4fb4d7f45d1cf-5731d9a29d8mr1644806a12.3.1715152394950; + Wed, 08 May 2024 00:13:14 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1715152394; cv=none; + d=google.com; s=arc-20160816; + b=B6jZA/nq8Ym26kz7+ZsenrfiE6wW++e7SnAGUHwNm/gWod3Yl4PNnHvyeR8S5Zmw9O + 3V09Yv3C5LTean+x2RVayPx0AGzKudIRJyy5IM8OhUNm2W7gc1dSif9DZDSaAXZB+TU/ + ZDXUltX0Mb5q2WOCZvHtP97HInDnGH2/v+H17UVTJrGq3BCsV6G2RfHLMkyA1Bw2Kbvb + JDY0R7esCGVoOeTw60KvlRCJZ4nl8rusR1F0ejIiy2T1+peYjxyBVTlcJSRp9qUKq2vx + qi3YZo7KEJ4GvpWU6gaW+OR2j5IYi9hmTa6I2MBAC9MSaoPTY02I/45L5g8oHpwZSYhs + voxw== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; + s=arc-20160816; + h=sender:errors-to:content-transfer-encoding:cc:reply-to + :list-subscribe:list-help:list-post:list-archive:list-unsubscribe + :list-id:precedence:subject:mime-version:message-id:date:to:from + :dkim-signature:delivered-to; + bh=QyukGgEk1XAr25k9qbILTx4kdg6yKzLRJ3F+p3y8b8E=; + fh=mbb85L8FZ404unHdLI+iF4ZFmTMGr6nZHIcfO/oKEvw=; + b=0c8ndpLDPBOwZFnv/cS4Jq7WKrDe+E5pfeQvSMzpmBQnyQCuM4A1kVjtLtnmezYmBb + FwKv+qTrH+qYcoDuDOhMc9q3xAU2PES61rIZZ6wCOxObyaI3I08j4Y717BOHqa6horAH + yWxZwZ/AZVa3WjmYDVCGnYi1BVn2y7fDmeAP9Cm2eGBI96bqRZDFgI+ADa7grssNAyUP + jY8IDHQXDbtIPR7YtOhvJQt9dkZrTuyGyz5hpeUbvxNvFj8uYJo2KOLsvbCBF7IVxj5+ + UxfiIJCu4qGBbz9nYGID0GXtK1+fJfRIk15S62z0pDULbeUHylcXJcXb3eMgWp9KtdnG + 8+ug==; + dara=google.com +ARC-Authentication-Results: i=1; mx.google.com; + dkim=neutral (body hash did not verify) header.i=@gmail.com + header.s=20230601 header.b=O+XtIIZD; + spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org + designates 79.124.17.100 as permitted sender) + smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; + dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com +Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> +Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) + by mx.google.com with ESMTP id + w18-20020a056402269200b00571b9f2bd09si7128266edd.34.2024.05.08.00.13.14; + Wed, 08 May 2024 00:13:14 -0700 (PDT) +Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org + designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; +Authentication-Results: mx.google.com; + dkim=neutral (body hash did not verify) header.i=@gmail.com + header.s=20230601 header.b=O+XtIIZD; + spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org + designates 79.124.17.100 as permitted sender) + smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; + dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com +Received: from [127.0.1.1] (localhost [127.0.0.1]) + by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id ED92D68D4CA; + Wed, 8 May 2024 10:13:10 +0300 (EEST) +X-Original-To: ffmpeg-devel@ffmpeg.org +Delivered-To: ffmpeg-devel@ffmpeg.org +Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com + [209.85.167.44]) + by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0F82168D48B + for <ffmpeg-devel@ffmpeg.org>; Wed, 8 May 2024 10:13:04 +0300 (EEST) +Received: by mail-lf1-f44.google.com with SMTP id + 2adb3069b0e04-51fea3031c3so5148511e87.0 + for <ffmpeg-devel@ffmpeg.org>; Wed, 08 May 2024 00:13:04 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=gmail.com; s=20230601; t=1715152383; x=1715757183; darn=ffmpeg.org; + h=content-transfer-encoding:mime-version:message-id:date:subject:cc + :to:from:from:to:cc:subject:date:message-id:reply-to; + bh=ffXg2XQu2Z246T8u+pR5mw8scM+kCnRnc2DEIwGVp5Y=; + b=O+XtIIZD3mEw83APJDrBeFsRuzwVt3Kyyg3FuAhCXFxtdsjvkBCUAr7QxcnMv6WelI + 9waHWdeZ3Gr3gKWpesLlrvATXFJ0NXsZu78H9ddX0YWj/zrCU3bafwiQw8YqmuSxvQku + tt2FxjepsnsddQ4Rd9xQQbixME7L88FlPIc5cUbSLO6kWAHWg4yrZ83OgHyoX3y+9tRE + cAZq2q+ieBkSd58/Fi/bIad1FrvE2rHNjD2eC0z84uNjH46OiynFFdJZMBvwEoydjAYs + FPch8HkUBtEcMFbY772efPUD1fUua4ZoJYkMJsU9wweRXf6fzWVs144L8UzMXffVJF7V + /CuA== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20230601; t=1715152383; x=1715757183; + h=content-transfer-encoding:mime-version:message-id:date:subject:cc + :to:from:x-gm-message-state:from:to:cc:subject:date:message-id + :reply-to; + bh=ffXg2XQu2Z246T8u+pR5mw8scM+kCnRnc2DEIwGVp5Y=; + b=WORFsv2dMz6yM+ahOJTkfqEjGb37TOSJqIw2Nl55aCSFQOKvma/C8aKz4A1UlIeD6Y + 2QYcGwrGFxynBdkMT9+Sl1fZyhOdcYpYQwFMFtCvLJxUFlDWujzhk4lVjO/XSqJJMV1E + rnMWVOlrkIuwmPnpa6yK8c+10Sq3stzeeOL2+oFcYVWZE6kQhEdEvFyCGAsdhNH0gDlm + LwdTocOaNoI42/FrGVexOMgdRBEpfkrvPJILJR3AFDCwCJD0nFFx5lOh+soX09XC8l7Q + RzaoeGq8qE2OR7TZKOBJiAXKPLFdAUm9Y1DNmS2jW5U3ndmVH/K7C3GbPfOGbICYcle6 + bpHg== +X-Gm-Message-State: AOJu0YxS6mZKvl8CFJt92+Sq4Bu0Q1qCEj4mRz+D6PCG+tLwamYoFb78 + 7SVtiAxsN4Dvyx9PVifcgIXTj1m0AYmwl2tkchF4F+m3SH+lQHxh6Q6bpA== +X-Received: by 2002:ac2:4a71:0:b0:519:e878:9385 with SMTP id + 2adb3069b0e04-5217c5671a9mr1284790e87.18.1715152382619; + Wed, 08 May 2024 00:13:02 -0700 (PDT) +Received: from mitsuki.. (ip-78-45-35-87.bb.vodafone.cz. [78.45.35.87]) + by smtp.gmail.com with ESMTPSA id + t16-20020a170906609000b00a59d7505366sm2872828ejj.62.2024.05.08.00.13.02 + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Wed, 08 May 2024 00:13:02 -0700 (PDT) +From: David Rosca <nowrep@gmail.com> +To: ffmpeg-devel@ffmpeg.org +Date: Wed, 8 May 2024 09:11:11 +0200 +Message-ID: <20240508071247.133615-2-nowrep@gmail.com> +X-Mailer: git-send-email 2.45.0 +MIME-Version: 1.0 +Subject: [FFmpeg-devel] [PATCH v2 1/2] lavc/vaapi_decode: Make it possible + to send multiple slice params buffers +X-BeenThere: ffmpeg-devel@ffmpeg.org +X-Mailman-Version: 2.1.29 +Precedence: list +List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> +List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, + <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> +List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> +List-Post: <mailto:ffmpeg-devel@ffmpeg.org> +List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> +List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, + <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> +Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> +Cc: David Rosca <nowrep@gmail.com> +Errors-To: ffmpeg-devel-bounces@ffmpeg.org +Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> +X-TUID: CXdjf/rnNjyo + +--- +v2: No changes + + libavcodec/vaapi_av1.c | 2 +- + libavcodec/vaapi_decode.c | 3 ++- + libavcodec/vaapi_decode.h | 1 + + libavcodec/vaapi_h264.c | 2 +- + libavcodec/vaapi_hevc.c | 4 ++-- + libavcodec/vaapi_mjpeg.c | 2 +- + libavcodec/vaapi_mpeg2.c | 2 +- + libavcodec/vaapi_mpeg4.c | 2 +- + libavcodec/vaapi_vc1.c | 2 +- + libavcodec/vaapi_vp8.c | 2 +- + libavcodec/vaapi_vp9.c | 2 +- + 11 files changed, 13 insertions(+), 11 deletions(-) + +diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c +index 1f563483b9..4a90db1e09 100644 +--- a/libavcodec/vaapi_av1.c ++++ b/libavcodec/vaapi_av1.c +@@ -409,7 +409,7 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx, + .tg_end = s->tg_end, + }; + +- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, ++ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1, + sizeof(VASliceParameterBufferAV1), + buffer, + size); +diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c +index 21b273cd0f..8e9f647c20 100644 +--- a/libavcodec/vaapi_decode.c ++++ b/libavcodec/vaapi_decode.c +@@ -63,6 +63,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx, + int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, + VAAPIDecodePicture *pic, + const void *params_data, ++ int nb_params, + size_t params_size, + const void *slice_data, + size_t slice_size) +@@ -88,7 +89,7 @@ int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, + + vas = vaCreateBuffer(ctx->hwctx->display, ctx->va_context, + VASliceParameterBufferType, +- params_size, 1, (void*)params_data, ++ params_size, nb_params, (void*)params_data, + &pic->slice_buffers[index]); + if (vas != VA_STATUS_SUCCESS) { + av_log(avctx, AV_LOG_ERROR, "Failed to create slice " +diff --git a/libavcodec/vaapi_decode.h b/libavcodec/vaapi_decode.h +index 6beda14e52..702171e108 100644 +--- a/libavcodec/vaapi_decode.h ++++ b/libavcodec/vaapi_decode.h +@@ -73,6 +73,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx, + int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, + VAAPIDecodePicture *pic, + const void *params_data, ++ int nb_params, + size_t params_size, + const void *slice_data, + size_t slice_size); +diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c +index 55cf5a05ee..b47531ce1c 100644 +--- a/libavcodec/vaapi_h264.c ++++ b/libavcodec/vaapi_h264.c +@@ -375,7 +375,7 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx, + slice_param.chroma_offset_l1); + + err = ff_vaapi_decode_make_slice_buffer(avctx, pic, +- &slice_param, sizeof(slice_param), ++ &slice_param, 1, sizeof(slice_param), + buffer, size); + if (err) { + ff_vaapi_decode_cancel(avctx, pic); +diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c +index 3bdd2dd1b8..3937b7574a 100644 +--- a/libavcodec/vaapi_hevc.c ++++ b/libavcodec/vaapi_hevc.c +@@ -353,7 +353,7 @@ static int vaapi_hevc_end_frame(AVCodecContext *avctx) + if (pic->last_size) { + last_slice_param->LongSliceFlags.fields.LastSliceOfPic = 1; + ret = ff_vaapi_decode_make_slice_buffer(avctx, &pic->pic, +- &pic->last_slice_param, slice_param_size, ++ &pic->last_slice_param, 1, slice_param_size, + pic->last_buffer, pic->last_size); + if (ret < 0) + goto fail; +@@ -471,7 +471,7 @@ static int vaapi_hevc_decode_slice(AVCodecContext *avctx, + + if (!sh->first_slice_in_pic_flag) { + err = ff_vaapi_decode_make_slice_buffer(avctx, &pic->pic, +- &pic->last_slice_param, slice_param_size, ++ &pic->last_slice_param, 1, slice_param_size, + pic->last_buffer, pic->last_size); + pic->last_buffer = NULL; + pic->last_size = 0; +diff --git a/libavcodec/vaapi_mjpeg.c b/libavcodec/vaapi_mjpeg.c +index 5b8d47bb2a..9557cf5f9b 100644 +--- a/libavcodec/vaapi_mjpeg.c ++++ b/libavcodec/vaapi_mjpeg.c +@@ -131,7 +131,7 @@ static int vaapi_mjpeg_decode_slice(AVCodecContext *avctx, + sp.components[i].ac_table_selector = s->ac_index[i]; + } + +- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), buffer, size); ++ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), buffer, size); + if (err) + goto fail; + +diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c +index eeb4e87321..171a742c7f 100644 +--- a/libavcodec/vaapi_mpeg2.c ++++ b/libavcodec/vaapi_mpeg2.c +@@ -162,7 +162,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer + }; + + err = ff_vaapi_decode_make_slice_buffer(avctx, pic, +- &slice_param, sizeof(slice_param), ++ &slice_param, 1, sizeof(slice_param), + buffer, size); + if (err < 0) { + ff_vaapi_decode_cancel(avctx, pic); +diff --git a/libavcodec/vaapi_mpeg4.c b/libavcodec/vaapi_mpeg4.c +index 363b686e42..612de10cd7 100644 +--- a/libavcodec/vaapi_mpeg4.c ++++ b/libavcodec/vaapi_mpeg4.c +@@ -169,7 +169,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer + }; + + err = ff_vaapi_decode_make_slice_buffer(avctx, pic, +- &slice_param, sizeof(slice_param), ++ &slice_param, 1, sizeof(slice_param), + buffer, size); + if (err < 0) { + ff_vaapi_decode_cancel(avctx, pic); +diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c +index 5594118a69..abbe877dd8 100644 +--- a/libavcodec/vaapi_vc1.c ++++ b/libavcodec/vaapi_vc1.c +@@ -490,7 +490,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, + }; + + err = ff_vaapi_decode_make_slice_buffer(avctx, pic, +- &slice_param, sizeof(slice_param), ++ &slice_param, 1, sizeof(slice_param), + buffer, size); + if (err < 0) { + ff_vaapi_decode_cancel(avctx, pic); +diff --git a/libavcodec/vaapi_vp8.c b/libavcodec/vaapi_vp8.c +index 31137a45bd..66fdde1f39 100644 +--- a/libavcodec/vaapi_vp8.c ++++ b/libavcodec/vaapi_vp8.c +@@ -209,7 +209,7 @@ static int vaapi_vp8_decode_slice(AVCodecContext *avctx, + for (i = 0; i < 8; i++) + sp.partition_size[i+1] = s->coeff_partition_size[i]; + +- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), data, data_size); ++ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), data, data_size); + if (err) + goto fail; + +diff --git a/libavcodec/vaapi_vp9.c b/libavcodec/vaapi_vp9.c +index b8e760c807..a28fc75a59 100644 +--- a/libavcodec/vaapi_vp9.c ++++ b/libavcodec/vaapi_vp9.c +@@ -158,7 +158,7 @@ static int vaapi_vp9_decode_slice(AVCodecContext *avctx, + } + + err = ff_vaapi_decode_make_slice_buffer(avctx, pic, +- &slice_param, sizeof(slice_param), ++ &slice_param, 1, sizeof(slice_param), + buffer, size); + if (err) { + ff_vaapi_decode_cancel(avctx, pic); diff --git a/source/l/ffmpeg/FFmpeg-devel-v2-2-2-lavc-vaapi_av1-Avoid-sending-the-same-slice-buffer-multiple-times.patch b/source/l/ffmpeg/FFmpeg-devel-v2-2-2-lavc-vaapi_av1-Avoid-sending-the-same-slice-buffer-multiple-times.patch new file mode 100644 index 000000000..11beb8791 --- /dev/null +++ b/source/l/ffmpeg/FFmpeg-devel-v2-2-2-lavc-vaapi_av1-Avoid-sending-the-same-slice-buffer-multiple-times.patch @@ -0,0 +1,233 @@ +From patchwork Wed May 8 07:11:13 2024 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: David Rosca <nowrep@gmail.com> +X-Patchwork-Id: 48664 +Delivered-To: ffmpegpatchwork2@gmail.com +Received: by 2002:a05:6a20:9c8f:b0:1af:cdee:28c5 with SMTP id mj15csp25694pzb; + Wed, 8 May 2024 00:13:24 -0700 (PDT) +X-Forwarded-Encrypted: i=2; + AJvYcCUU0WAejd+vI8Md/fk24xz5o+Vf/o8BRW6HaRPRrGxjq6S//PLkmyUZRPzd+gHeFBzdlMsfYeq9DopcaKEGU11Y8gnU172C7IbtRw== +X-Google-Smtp-Source: + AGHT+IG3oXW6Btb0nOsLsgP/8AeKUJDwzM/PSxrC5jUdm6vhgOZQDuI+wXt7iXGX4rN6ViSYQ3D/ +X-Received: by 2002:a17:906:6b9a:b0:a59:bae0:b12f with SMTP id + a640c23a62f3a-a59fb9ce9d9mr94975366b.57.1715152404530; + Wed, 08 May 2024 00:13:24 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1715152404; cv=none; + d=google.com; s=arc-20160816; + b=TyPiCxBIX4CkQJzb/tN61GGUtaed+8YXJp0fMtMCWRLhJtQcyPEGQfgMMxf8ud7SjV + XasOofP00bXz6aA/3IDgRNOOR8W9kwSTI6uLYm67idB/vFjKHziHELvkE8reWyYGGUnm + 3Wac/MdE30bLkfj5e5xLKTuAjS+tfDiqPQoY+x0bVErkuGZ5kvsVFBY36zForQQI6gI6 + 7KRKgu69eooP/7GjdfgBJDpRoV5cOimWHTnOrFicoplIhvkiGya3wLg8ewhvYd0FvEPl + mV9jr2J4EkZvwXU6mU0H4kfz3XnZ5lm3VcvN1/7IyVvb2vbUar5H/YpFy/Egakk6kZDq + E2WA== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; + s=arc-20160816; + h=sender:errors-to:content-transfer-encoding:cc:reply-to + :list-subscribe:list-help:list-post:list-archive:list-unsubscribe + :list-id:precedence:subject:mime-version:references:in-reply-to + :message-id:date:to:from:dkim-signature:delivered-to; + bh=lG1MGLor19Gww/xCmlAJWXZbhpue6ooFmY8SVpcxzoo=; + fh=mbb85L8FZ404unHdLI+iF4ZFmTMGr6nZHIcfO/oKEvw=; + b=Gf3+xGKpwkxLAdDWLnNlyqQItLga7dBAeke4JLFO0nfgfO9y88/lSZaHMQrNLrFA22 + vJ95hHGS2oaiaJcDbE1P6tmZrp0qjDqKSW02GplFORvI92l80hmqZfUjnZ7Ck72ZMj8e + 3xPxoevI40uz1A0v7kgYvTpMvHezDaOOn3/p6/lEDhWNieas1xoZv8/EUvXGVMyyslOJ + BjLbxoV90InDYTDuDSJyFBl91A/gqOWEATTQJk/mABJhXpbljeejfWyg7jaWnbViIoUD + eIDt7wsyJYmNQkCISpWuISkqBrWXlKxkQvB6MihxwIdtPcYmQ6ra6rKNRI924EX2VAEK + yXVA==; + dara=google.com +ARC-Authentication-Results: i=1; mx.google.com; + dkim=neutral (body hash did not verify) header.i=@gmail.com + header.s=20230601 header.b=OypvhYGi; + spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org + designates 79.124.17.100 as permitted sender) + smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; + dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com +Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> +Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) + by mx.google.com with ESMTP id + b27-20020a170906151b00b00a59befed255si3984295ejd.576.2024.05.08.00.13.24; + Wed, 08 May 2024 00:13:24 -0700 (PDT) +Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org + designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; +Authentication-Results: mx.google.com; + dkim=neutral (body hash did not verify) header.i=@gmail.com + header.s=20230601 header.b=OypvhYGi; + spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org + designates 79.124.17.100 as permitted sender) + smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; + dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com +Received: from [127.0.1.1] (localhost [127.0.0.1]) + by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6258868D5D8; + Wed, 8 May 2024 10:13:16 +0300 (EEST) +X-Original-To: ffmpeg-devel@ffmpeg.org +Delivered-To: ffmpeg-devel@ffmpeg.org +Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com + [209.85.218.42]) + by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8ED3B68D5C6 + for <ffmpeg-devel@ffmpeg.org>; Wed, 8 May 2024 10:13:09 +0300 (EEST) +Received: by mail-ej1-f42.google.com with SMTP id + a640c23a62f3a-a59a934ad50so920836666b.1 + for <ffmpeg-devel@ffmpeg.org>; Wed, 08 May 2024 00:13:09 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=gmail.com; s=20230601; t=1715152388; x=1715757188; darn=ffmpeg.org; + h=content-transfer-encoding:mime-version:references:in-reply-to + :message-id:date:subject:cc:to:from:from:to:cc:subject:date + :message-id:reply-to; + bh=2gr9y0ycJUz7g/8locnNp/xbvm4Xt9bm5oGOJk63n1Q=; + b=OypvhYGiEgVBtlATeDRoSQ8uoRlMpZj4OZFdaLx8eHWuZ+dnUTUL04V8v+psg5iqL9 + A53WZ9lLffgZpj3KrBtoMKXb4wdW7gf4xM5/PKTx5VPQdK6BRLXEKVLSaRzFBWHFu/9b + bkQfxnsTF+tKwKnuxomZEnZKdtxK9GzoMx5uPJnT27LqxU6DGSWe4OY9or5BO4iRGThe + suvUHkZ7K3MRjncUVtPcm2CF8wIXlbDsD2MROp/GnG7UWUwCZlVIwNiyDlfrygvGSqrb + 5hToNlkEs+yKgcH3mQsYQQOOS7zPWj3OZ+3xHufHNmYxXvwlf/l2NVxED2RpgPFHLTIe + mYEQ== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20230601; t=1715152388; x=1715757188; + h=content-transfer-encoding:mime-version:references:in-reply-to + :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc + :subject:date:message-id:reply-to; + bh=2gr9y0ycJUz7g/8locnNp/xbvm4Xt9bm5oGOJk63n1Q=; + b=Bd1s9ViPxXl4TdTBYOfQAT9wrkmI1uBRar/MUyJEIHHv1GVO6yy0mGvKXzK9dA7JRf + ADq8nqUSLuJm7HVqX03X8vNl8lhQzOHeq0lnTNP8OWU3WLn+8vgINDqrg7u2TBhVJChu + fk0aAuG361EckiGCujtlnjWPmUmjaCyWwVqDoPGJQW31L8jqPklOKIEr2Le6Zc7+eX67 + 1tU4u4MMWZqo4UPVdhYopV1em2EVLvq9eu3PdqK9Bx4Q+DwCYyC3KPxZEJm5xt9EAir0 + b4k642TSP4uTtbQCPt/qDI32CsnA+nvz1p5iCJIS3n6WWrKBha+I+Bl1nvtLwQCRCRSP + Ap5A== +X-Gm-Message-State: AOJu0YyCCVm0AjHkgA3h1/7JMutpn1Aexcggxj5vAwjMMJVANDxR5Prh + oeODe3Hr6qmpyzUfxgYYzOINyE0APs4dadLz45mg5zgYptS+BHmNCBegTQ== +X-Received: by 2002:a17:906:80c2:b0:a55:5e89:a158 with SMTP id + a640c23a62f3a-a59fb9e7628mr98238166b.68.1715152388430; + Wed, 08 May 2024 00:13:08 -0700 (PDT) +Received: from mitsuki.. (ip-78-45-35-87.bb.vodafone.cz. [78.45.35.87]) + by smtp.gmail.com with ESMTPSA id + t16-20020a170906609000b00a59d7505366sm2872828ejj.62.2024.05.08.00.13.07 + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Wed, 08 May 2024 00:13:08 -0700 (PDT) +From: David Rosca <nowrep@gmail.com> +To: ffmpeg-devel@ffmpeg.org +Date: Wed, 8 May 2024 09:11:13 +0200 +Message-ID: <20240508071247.133615-4-nowrep@gmail.com> +X-Mailer: git-send-email 2.45.0 +In-Reply-To: <20240508071247.133615-2-nowrep@gmail.com> +References: <20240508071247.133615-2-nowrep@gmail.com> +MIME-Version: 1.0 +Subject: [FFmpeg-devel] [PATCH v2 2/2] lavc/vaapi_av1: Avoid sending the + same slice buffer multiple times +X-BeenThere: ffmpeg-devel@ffmpeg.org +X-Mailman-Version: 2.1.29 +Precedence: list +List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> +List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, + <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> +List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> +List-Post: <mailto:ffmpeg-devel@ffmpeg.org> +List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> +List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, + <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> +Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> +Cc: David Rosca <nowrep@gmail.com> +Errors-To: ffmpeg-devel-bounces@ffmpeg.org +Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> +X-TUID: q0qvq9b+ZBYX + +When there are multiple tiles in one slice buffer, use multiple slice +params to avoid sending the same slice buffer multiple times and thus +increasing the bitstream size the driver will need to upload to hw. +--- +v2: Avoid allocations every slice. + + libavcodec/vaapi_av1.c | 47 +++++++++++++++++++++++++++++------------- + 1 file changed, 33 insertions(+), 14 deletions(-) + +diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c +index 4a90db1e09..4ee33a3ae3 100644 +--- a/libavcodec/vaapi_av1.c ++++ b/libavcodec/vaapi_av1.c +@@ -19,6 +19,7 @@ + */ + + #include "libavutil/frame.h" ++#include "libavutil/mem.h" + #include "hwaccel_internal.h" + #include "vaapi_decode.h" + #include "internal.h" +@@ -42,6 +43,9 @@ typedef struct VAAPIAV1DecContext { + */ + VAAPIAV1FrameRef ref_tab[AV1_NUM_REF_FRAMES]; + AVFrame *tmp_frame; ++ ++ int nb_slice_params; ++ VASliceParameterBufferAV1 *slice_params; + } VAAPIAV1DecContext; + + static VASurfaceID vaapi_av1_surface_id(AV1Frame *vf) +@@ -97,6 +101,8 @@ static int vaapi_av1_decode_uninit(AVCodecContext *avctx) + for (int i = 0; i < FF_ARRAY_ELEMS(ctx->ref_tab); i++) + av_frame_free(&ctx->ref_tab[i].frame); + ++ av_freep(&ctx->slice_params); ++ + return ff_vaapi_decode_uninit(avctx); + } + +@@ -393,13 +399,24 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx, + { + const AV1DecContext *s = avctx->priv_data; + VAAPIDecodePicture *pic = s->cur_frame.hwaccel_picture_private; +- VASliceParameterBufferAV1 slice_param; +- int err = 0; ++ VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data; ++ int err, nb_params; ++ ++ nb_params = s->tg_end - s->tg_start + 1; ++ if (ctx->nb_slice_params < nb_params) { ++ ctx->slice_params = av_realloc_array(ctx->slice_params, ++ nb_params, ++ sizeof(*ctx->slice_params)); ++ if (!ctx->slice_params) { ++ ctx->nb_slice_params = 0; ++ err = AVERROR(ENOMEM); ++ goto fail; ++ } ++ ctx->nb_slice_params = nb_params; ++ } + + for (int i = s->tg_start; i <= s->tg_end; i++) { +- memset(&slice_param, 0, sizeof(VASliceParameterBufferAV1)); +- +- slice_param = (VASliceParameterBufferAV1) { ++ ctx->slice_params[i - s->tg_start] = (VASliceParameterBufferAV1) { + .slice_data_size = s->tile_group_info[i].tile_size, + .slice_data_offset = s->tile_group_info[i].tile_offset, + .slice_data_flag = VA_SLICE_DATA_FLAG_ALL, +@@ -408,18 +425,20 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx, + .tg_start = s->tg_start, + .tg_end = s->tg_end, + }; +- +- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1, +- sizeof(VASliceParameterBufferAV1), +- buffer, +- size); +- if (err) { +- ff_vaapi_decode_cancel(avctx, pic); +- return err; +- } + } + ++ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, ctx->slice_params, nb_params, ++ sizeof(VASliceParameterBufferAV1), ++ buffer, ++ size); ++ if (err) ++ goto fail; ++ + return 0; ++ ++fail: ++ ff_vaapi_decode_cancel(avctx, pic); ++ return err; + } + + const FFHWAccel ff_av1_vaapi_hwaccel = { diff --git a/source/l/ffmpeg/ffmpeg.SlackBuild b/source/l/ffmpeg/ffmpeg.SlackBuild index b66afc46d..078b1bef7 100755 --- a/source/l/ffmpeg/ffmpeg.SlackBuild +++ b/source/l/ffmpeg/ffmpeg.SlackBuild @@ -30,7 +30,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=ffmpeg VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -60,7 +60,7 @@ else fi # GCC 14 "fix": -SLKCFLAGS="$SLKCFLAGS -Wno-error=int-conversion" +SLKCFLAGS="$SLKCFLAGS -Wno-error=int-conversion -Wno-error=incompatible-pointer-types" # If PulseAudio is not found, use the _alsa $TAG and disable it in the build: if [ ! -r /usr/lib${LIBDIRSUFFIX}/pkgconfig/libpulse.pc ]; then @@ -219,6 +219,10 @@ zcat $CWD/250471ea1745fc703eb346a2a662304536a311b1.patch | patch -p1 --verbose | # Patch for recent nv-codec-headers: zcat $CWD/0004-support-nv-codec-headers-12.2.patch.gz | patch -p1 --verbose || exit 1 +# Work with recent Mesa: +zcat $CWD/FFmpeg-devel-v2-1-2-lavc-vaapi_decode-Make-it-possible-to-send-multiple-slice-params-buffers.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/FFmpeg-devel-v2-2-2-lavc-vaapi_av1-Avoid-sending-the-same-slice-buffer-multiple-times.patch.gz | patch -p1 --verbose || exit 1 + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ |