45-vmaf.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/bash
  2. SCRIPT_REPO="https://github.com/Netflix/vmaf.git"
  3. SCRIPT_COMMIT="e00fc5070a5a950e963da8c9b1a68bcfa7fac387"
  4. ffbuild_enabled() {
  5. return 0
  6. }
  7. ffbuild_dockerbuild() {
  8. # Kill build of unused and broken tools
  9. echo > libvmaf/tools/meson.build
  10. mkdir build && cd build
  11. local myconf=(
  12. --prefix="$FFBUILD_PREFIX"
  13. --buildtype=release
  14. --default-library=static
  15. -Dbuilt_in_models=true
  16. -Denable_tests=false
  17. -Denable_docs=false
  18. -Denable_avx512=true
  19. -Denable_float=true
  20. )
  21. if [[ $TARGET == win* || $TARGET == linux* ]]; then
  22. myconf+=(
  23. --cross-file=/cross.meson
  24. )
  25. else
  26. echo "Unknown target"
  27. return -1
  28. fi
  29. meson "${myconf[@]}" ../libvmaf || cat meson-logs/meson-log.txt
  30. ninja -j"$(nproc)"
  31. ninja install
  32. sed -i 's/Libs.private:/Libs.private: -lstdc++/; t; $ a Libs.private: -lstdc++' "$FFBUILD_PREFIX"/lib/pkgconfig/libvmaf.pc
  33. }
  34. ffbuild_configure() {
  35. [[ $ADDINS_STR == *4.4* ]] && return 0
  36. [[ $ADDINS_STR == *5.0* ]] && return 0
  37. echo --enable-libvmaf
  38. }
  39. ffbuild_unconfigure() {
  40. echo --disable-libvmaf
  41. }