50-vvenc.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. SCRIPT_REPO="https://github.com/fraunhoferhhi/vvenc.git"
  3. SCRIPT_COMMIT="da540e6698d425451f23f775482d12706d72afd7"
  4. ffbuild_enabled() {
  5. [[ $TARGET != *32 ]] || return -1
  6. (( $(ffbuild_ffver) > 700 )) || return -1
  7. return 0
  8. }
  9. ffbuild_dockerbuild() {
  10. mkdir build && cd build
  11. local armsimd=()
  12. if [[ $TARGET == *arm* ]]; then
  13. armsimd+=( -DVVENC_ENABLE_ARM_SIMD=ON )
  14. if [[ "$CC" != *clang* ]]; then
  15. export CFLAGS="$CFLAGS -fpermissive -Wno-error=uninitialized -Wno-error=maybe-uninitialized"
  16. export CXXFLAGS="$CXXFLAGS -fpermissive -Wno-error=uninitialized -Wno-error=maybe-uninitialized"
  17. fi
  18. fi
  19. cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DCMAKE_BUILD_TYPE=Release \
  20. -DBUILD_SHARED_LIBS=OFF -DVVENC_LIBRARY_ONLY=ON -DVVENC_ENABLE_LINK_TIME_OPT=OFF -DEXTRALIBS="-lstdc++" "${armsimd[@]}" ..
  21. make -j$(nproc)
  22. make install
  23. }
  24. ffbuild_configure() {
  25. echo --enable-libvvenc
  26. }
  27. ffbuild_unconfigure() {
  28. (( $(ffbuild_ffver) > 700 )) || return 0
  29. echo --disable-libvvenc
  30. }