enable cuda (nv-codec-headers + pinned-picture fix); pkgrel 1.1, add .gitignore, regen .SRCINFO
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
pkgname=vmaf
|
||||
pkgver=3.2.0
|
||||
pkgrel=1
|
||||
pkgrel=1.1
|
||||
pkgdesc='Perceptual video quality assessment algorithm based on multi-method fusion'
|
||||
arch=('x86_64')
|
||||
url='https://github.com/Netflix/vmaf/'
|
||||
@@ -11,20 +11,32 @@ depends=(
|
||||
'glibc'
|
||||
'libgcc'
|
||||
'libstdc++')
|
||||
optdepends=('nvidia-utils: CUDA GPU acceleration')
|
||||
makedepends=(
|
||||
'cuda'
|
||||
'gcc15'
|
||||
'meson'
|
||||
'nasm')
|
||||
checkdepends=(
|
||||
'vim')
|
||||
source=("https://github.com/Netflix/vmaf/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
|
||||
sha256sums=('a28f93f3b4fa65601be324587072e32a6a704a304ba7b1aec9b70b3f709bc1dc')
|
||||
_nvcodec_commit='1b5a81ada8874efb2af0534ffe74049c557e212d'
|
||||
source=("https://github.com/Netflix/vmaf/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz"
|
||||
"nv-codec-headers-${_nvcodec_commit}.tar.gz::https://code.ffmpeg.org/FFmpeg/nv-codec-headers/archive/${_nvcodec_commit}.tar.gz"
|
||||
'0001-fix-cuda-pinned-picture-null-state.patch')
|
||||
sha256sums=('a28f93f3b4fa65601be324587072e32a6a704a304ba7b1aec9b70b3f709bc1dc'
|
||||
'SKIP'
|
||||
'SKIP')
|
||||
|
||||
prepare() {
|
||||
patch -p1 -d "${pkgname}-${pkgver}" < 0001-fix-cuda-pinned-picture-null-state.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
local _jobs
|
||||
local _max_jobs='20'
|
||||
|
||||
|
||||
_jobs="$(nproc)"
|
||||
|
||||
|
||||
# may fail to compile on a high core count system
|
||||
# https://github.com/Netflix/vmaf/issues/1541
|
||||
if [ "$_jobs" -ge "$_max_jobs" ]
|
||||
@@ -32,17 +44,25 @@ build() {
|
||||
_jobs="$_max_jobs"
|
||||
printf '%s\n' "limiting the compilation jobs to ${_jobs}"
|
||||
fi
|
||||
|
||||
arch-meson -Denable_avx512='false' "${pkgname}-${pkgver}/libvmaf" build
|
||||
|
||||
export PATH="/opt/cuda/bin:$PATH"
|
||||
export CUDA_HOST_COMPILER=/usr/bin/gcc-15
|
||||
# install bundled nv-codec-headers (system package lacks cuMemFreeAsync/cuMemAllocAsync)
|
||||
make -C "nv-codec-headers" PREFIX="${srcdir}/nvcodec-prefix" install
|
||||
export C_INCLUDE_PATH="${srcdir}/nvcodec-prefix/include:${C_INCLUDE_PATH}"
|
||||
# cd into libvmaf so nvcc's hardcoded relative include paths (../src, ../include)
|
||||
# resolve correctly when the build dir is a subdirectory of the source
|
||||
cd "${pkgname}-${pkgver}/libvmaf"
|
||||
arch-meson -Denable_avx512='false' -Denable_cuda='true' -Denable_nvcc='true' . build
|
||||
meson compile -C build --jobs "$_jobs"
|
||||
}
|
||||
|
||||
check() {
|
||||
meson test -C build
|
||||
meson test -C "${pkgname}-${pkgver}/libvmaf/build"
|
||||
}
|
||||
|
||||
package() {
|
||||
meson install -C build --destdir "$pkgdir"
|
||||
meson install -C "${pkgname}-${pkgver}/libvmaf/build" --destdir "$pkgdir"
|
||||
install -D -m644 "${pkgname}-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
cp -dr --no-preserve='ownership' "${pkgname}-${pkgver}/model" "${pkgdir}/usr/share"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user