FFmpeg-Builds/scripts.d/50-xavs2.sh

56 lines
1.2 KiB
Bash
Raw Normal View History

2020-10-11 12:31:19 +00:00
#!/bin/bash
2022-07-12 15:54:12 +00:00
SCRIPT_REPO="https://github.com/pkuvcl/xavs2.git"
SCRIPT_COMMIT="eae1e8b9d12468059bdd7dee893508e470fa83d8"
2020-10-11 12:31:19 +00:00
ffbuild_enabled() {
2021-06-20 19:59:48 +00:00
[[ $VARIANT == lgpl* ]] && return -1
2020-10-19 22:56:50 +00:00
[[ $TARGET == win32 ]] && return -1
2022-05-09 22:15:31 +00:00
# xavs2 aarch64 support is broken
[[ $TARGET == linuxarm64 ]] && return -1
2020-10-11 12:31:19 +00:00
return 0
}
ffbuild_dockerbuild() {
2022-07-12 15:54:12 +00:00
git clone "$SCRIPT_REPO" xavs2
2020-10-11 12:31:19 +00:00
cd xavs2
2022-07-12 15:54:12 +00:00
git checkout "$SCRIPT_COMMIT"
2020-10-11 12:31:19 +00:00
cd build/linux
local myconf=(
--disable-cli
--enable-static
--enable-pic
--disable-avs
--disable-swscale
--disable-lavf
--disable-ffms
--disable-gpac
--disable-lsmash
2021-05-13 14:20:32 +00:00
--extra-asflags="-w-macro-params-legacy"
2020-10-11 12:31:19 +00:00
--prefix="$FFBUILD_PREFIX"
)
if [[ $TARGET == win* || $TARGET == linux* ]]; then
2020-10-11 12:31:19 +00:00
myconf+=(
--host="$FFBUILD_TOOLCHAIN"
--cross-prefix="$FFBUILD_CROSS_PREFIX"
)
else
2020-10-11 12:31:19 +00:00
echo "Unknown target"
return -1
fi
2021-04-04 21:20:31 +00:00
./configure "${myconf[@]}"
make -j$(nproc)
make install
2020-10-11 12:31:19 +00:00
}
ffbuild_configure() {
echo --enable-libxavs2
}
ffbuild_unconfigure() {
echo --disable-libxavs2
}