add libvvenc

Signed-off-by: BtbN <btbn@btbn.de>
This commit is contained in:
MartinEesmaa 2024-07-25 18:41:41 +10:00 committed by BtbN
parent 18e2e53c23
commit 9b36476158
2 changed files with 63 additions and 0 deletions

36
scripts.d/50-vvenc.sh Normal file
View File

@ -0,0 +1,36 @@
#!/bin/bash
SCRIPT_REPO="https://github.com/fraunhoferhhi/vvenc.git"
SCRIPT_COMMIT="c306b2cfaca7a4da50b6d6195f277430524b1a7d"
ffbuild_enabled() {
(( $(ffbuild_ffver) > 700 )) || return -1
return 0
}
ffbuild_dockerbuild() {
mkdir build && cd build
local armsimd=()
if [[ $TARGET == *arm* ]]; then
armsimd+=( -DVVENC_ENABLE_ARM_SIMD=ON )
export CFLAGS="$CFLAGS -fpermissive -Wno-error=uninitialized -Wno-error=maybe-uninitialized"
export CXXFLAGS="$CXXFLAGS -fpermissive -Wno-error=uninitialized -Wno-error=maybe-uninitialized"
fi
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF "${armsimd[@]}" ..
make -j$(nproc)
make install
}
ffbuild_configure() {
echo --enable-libvvenc
}
ffbuild_unconfigure() {
(( $(ffbuild_ffver) > 700 )) || return 0
echo --disable-libvvenc
}

View File

@ -37,6 +37,33 @@ BASE_IMAGE="${REGISTRY}/${REPO}/base:latest"
TARGET_IMAGE="${REGISTRY}/${REPO}/base-${TARGET}:latest"
IMAGE="${REGISTRY}/${REPO}/${TARGET}-${VARIANT}${ADDINS_STR:+-}${ADDINS_STR}:latest"
ffbuild_ffver() {
case "$ADDINS_STR" in
*4.4*)
echo 404
;;
*5.0*)
echo 500
;;
*5.1*)
echo 501
;;
*6.0*)
echo 600
;;
*6.1*)
echo 601
;;
*7.0*)
echo 700
;;
*)
echo 99999999
;;
esac
}
ffbuild_dockerstage() {
if [[ -n "$SELFCACHE" ]]; then
to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=${SELFCACHE},dst=/cache.tar.xz run_stage /stage.sh"