2025-01-08 00:00:00 +00:00
|
|
|
# Use PowerShell to run recipes on Windows
|
|
|
|
set windows-shell := ['pwsh', '-Command']
|
2025-01-08 00:00:00 +00:00
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
# Default build directory and C++ compiler
|
|
|
|
bindir := "build"
|
|
|
|
cxx_compiler := "clang++"
|
|
|
|
|
|
|
|
# Test video and output paths
|
|
|
|
test_video := "data/standard-test.mp4"
|
|
|
|
test_output := "data/output.mp4"
|
|
|
|
|
|
|
|
[unix]
|
|
|
|
[group('build')]
|
2025-01-08 00:00:00 +00:00
|
|
|
build:
|
2025-01-08 00:00:00 +00:00
|
|
|
cmake -G Ninja -S . -B {{bindir}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DCMAKE_CXX_COMPILER={{cxx_compiler}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX={{bindir}}/video2x-install \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DVIDEO2X_ENABLE_NATIVE=ON
|
2025-01-08 00:00:00 +00:00
|
|
|
cmake --build {{bindir}} --config Release --parallel --target install
|
|
|
|
cp {{bindir}}/compile_commands.json .
|
2025-01-08 00:00:00 +00:00
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[windows]
|
|
|
|
[group('build')]
|
|
|
|
build:
|
|
|
|
cmake -S . -B {{bindir}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX={{bindir}}/video2x-install \
|
|
|
|
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
|
|
|
|
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
|
|
|
|
-DVIDEO2X_USE_EXTERNAL_BOOST=OFF
|
|
|
|
cmake --build {{bindir}} --config Release --parallel --target install
|
|
|
|
|
|
|
|
[unix]
|
|
|
|
[group('build')]
|
|
|
|
static:
|
|
|
|
cmake -G Ninja -S . -B {{bindir}} \
|
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
|
|
|
-DCMAKE_CXX_COMPILER={{cxx_compiler}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DBUILD_SHARED_LIBS=OFF \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_INSTALL_PREFIX={{bindir}}/video2x-install \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
|
|
|
|
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
|
|
|
|
-DVIDEO2X_USE_EXTERNAL_BOOST=OFF
|
2025-01-08 00:00:00 +00:00
|
|
|
cmake --build {{bindir}} --config Release --parallel --target install
|
|
|
|
cp {{bindir}}/compile_commands.json .
|
2025-01-08 00:00:00 +00:00
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('build')]
|
2025-01-08 00:00:00 +00:00
|
|
|
debug:
|
2025-01-08 00:00:00 +00:00
|
|
|
cmake -G Ninja -S . -B {{bindir}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DCMAKE_CXX_COMPILER={{cxx_compiler}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=Debug
|
2025-01-08 00:00:00 +00:00
|
|
|
cmake --build {{bindir}} --config Debug --parallel
|
|
|
|
cp {{bindir}}/compile_commands.json .
|
2025-01-08 00:00:00 +00:00
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[windows]
|
|
|
|
[group('build')]
|
|
|
|
debug:
|
|
|
|
cmake -S . -B {{bindir}} \
|
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
|
|
|
-DCMAKE_BUILD_TYPE=Debug \
|
|
|
|
-DCMAKE_INSTALL_PREFIX={{bindir}}/video2x-install \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
|
|
|
|
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DVIDEO2X_USE_EXTERNAL_BOOST=OFF
|
|
|
|
cmake --build {{bindir}} --config Debug --parallel
|
2025-01-08 00:00:00 +00:00
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('build')]
|
2025-01-08 00:00:00 +00:00
|
|
|
debian:
|
|
|
|
apt-get update
|
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
build-essential cmake clang pkg-config ninja-build \
|
|
|
|
libavcodec-dev \
|
|
|
|
libavdevice-dev \
|
|
|
|
libavfilter-dev \
|
|
|
|
libavformat-dev \
|
|
|
|
libavutil-dev \
|
|
|
|
libswscale-dev \
|
|
|
|
libvulkan-dev \
|
|
|
|
glslang-tools \
|
|
|
|
libomp-dev \
|
|
|
|
libspdlog-dev \
|
|
|
|
libboost-program-options-dev
|
|
|
|
cmake -G Ninja -B /tmp/build -S . \
|
|
|
|
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DCMAKE_CXX_COMPILER={{cxx_compiler}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/tmp/install \
|
|
|
|
-DINSTALL_BIN_DESTINATION=. \
|
|
|
|
-DINSTALL_INCLUDE_DESTINATION=include \
|
|
|
|
-DINSTALL_LIB_DESTINATION=. \
|
|
|
|
-DINSTALL_MODEL_DESTINATION=.
|
|
|
|
cmake --build /tmp/build --config Release --target install --parallel
|
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('build')]
|
2025-01-08 00:00:00 +00:00
|
|
|
ubuntu2404:
|
|
|
|
apt-get update
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
|
|
build-essential cmake pkg-config ninja-build \
|
|
|
|
libavcodec-dev \
|
|
|
|
libavdevice-dev \
|
|
|
|
libavfilter-dev \
|
|
|
|
libavformat-dev \
|
|
|
|
libavutil-dev \
|
|
|
|
libswscale-dev \
|
|
|
|
libvulkan-dev \
|
|
|
|
glslang-tools \
|
|
|
|
libomp-dev \
|
|
|
|
libboost-program-options-dev
|
|
|
|
cmake -G Ninja -B build -S . \
|
|
|
|
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
|
|
|
|
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
|
|
|
|
-DCMAKE_CXX_COMPILER=g++ \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=video2x-linux-ubuntu-amd64/usr
|
|
|
|
cmake --build build --config Release --target install --parallel
|
|
|
|
mkdir -p video2x-linux-ubuntu-amd64/DEBIAN
|
|
|
|
cp packaging/debian/control.ubuntu2404 video2x-linux-ubuntu-amd64/DEBIAN/control
|
|
|
|
dpkg-deb --build video2x-linux-ubuntu-amd64
|
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('build')]
|
2025-01-08 00:00:00 +00:00
|
|
|
ubuntu2204:
|
|
|
|
apt-get update
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common
|
|
|
|
add-apt-repository -y ppa:ubuntuhandbook1/ffmpeg7
|
|
|
|
apt-get update
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
|
|
build-essential cmake ninja-build \
|
|
|
|
libavcodec-dev \
|
|
|
|
libavdevice-dev \
|
|
|
|
libavfilter-dev \
|
|
|
|
libavformat-dev \
|
|
|
|
libavutil-dev \
|
|
|
|
libswscale-dev \
|
|
|
|
libvulkan-dev \
|
|
|
|
glslang-tools \
|
|
|
|
libomp-dev \
|
|
|
|
libboost-program-options-dev
|
|
|
|
cmake -G Ninja -B build -S . \
|
|
|
|
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
|
|
|
|
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
|
|
|
|
-DCMAKE_CXX_COMPILER=g++ \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=video2x-linux-ubuntu-amd64/usr
|
|
|
|
cmake --build build --config Release --target install --parallel
|
|
|
|
mkdir -p video2x-linux-ubuntu-amd64/DEBIAN
|
|
|
|
cp packaging/debian/control.ubuntu2204 video2x-linux-ubuntu-amd64/DEBIAN/control
|
|
|
|
dpkg-deb --build video2x-linux-ubuntu-amd64
|
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('misc')]
|
|
|
|
clean:
|
|
|
|
rm -vrf {{bindir}} data/output*.* heaptrack*.zst valgrind.log
|
|
|
|
|
|
|
|
[windows]
|
|
|
|
[group('misc')]
|
2025-01-08 00:00:00 +00:00
|
|
|
clean:
|
2025-01-08 00:00:00 +00:00
|
|
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path build,data/output*.*
|
2025-01-08 00:00:00 +00:00
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('test')]
|
2025-01-08 00:00:00 +00:00
|
|
|
test-realesrgan:
|
2025-01-08 00:00:00 +00:00
|
|
|
LD_LIBRARY_PATH={{bindir}} {{bindir}}/video2x \
|
|
|
|
-i {{test_video}} -o {{test_output}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-p realesrgan -s 4 --realesrgan-model realesr-animevideov3
|
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('test')]
|
2025-01-08 00:00:00 +00:00
|
|
|
test-realcugan:
|
2025-01-08 00:00:00 +00:00
|
|
|
LD_LIBRARY_PATH={{bindir}} {{bindir}}/video2x \
|
|
|
|
-i {{test_video}} -o {{test_output}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-p realcugan -s 4 -n 0 --realcugan-model models-se
|
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('test')]
|
2025-01-08 00:00:00 +00:00
|
|
|
test-libplacebo:
|
2025-01-08 00:00:00 +00:00
|
|
|
LD_LIBRARY_PATH={{bindir}} {{bindir}}/video2x \
|
|
|
|
-i {{test_video}} -o {{test_output}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-p libplacebo -w 1920 -h 1080 --libplacebo-shader anime4k-v4-a
|
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('test')]
|
2025-01-08 00:00:00 +00:00
|
|
|
test-rife:
|
2025-01-08 00:00:00 +00:00
|
|
|
LD_LIBRARY_PATH={{bindir}} {{bindir}}/video2x \
|
|
|
|
-i {{test_video}} -o {{test_output}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-p rife -m 4 --rife-model rife-v4.6
|
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('test')]
|
2025-01-08 00:00:00 +00:00
|
|
|
memcheck-realesrgan:
|
2025-01-08 00:00:00 +00:00
|
|
|
LD_LIBRARY_PATH={{bindir}} valgrind \
|
2025-01-08 00:00:00 +00:00
|
|
|
--tool=memcheck \
|
|
|
|
--leak-check=full \
|
|
|
|
--show-leak-kinds=all \
|
|
|
|
--track-origins=yes \
|
|
|
|
--show-reachable=yes \
|
|
|
|
--verbose --log-file="valgrind.log" \
|
2025-01-08 00:00:00 +00:00
|
|
|
{{bindir}}/video2x \
|
|
|
|
-i {{test_video}} -o {{test_output}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-p realesrgan -s 2 --realesrgan-model realesr-animevideov3 \
|
|
|
|
-e preset=veryfast -e crf=30
|
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('test')]
|
2025-01-08 00:00:00 +00:00
|
|
|
memcheck-realcugan:
|
2025-01-08 00:00:00 +00:00
|
|
|
LD_LIBRARY_PATH={{bindir}} valgrind \
|
2025-01-08 00:00:00 +00:00
|
|
|
--tool=memcheck \
|
|
|
|
--leak-check=full \
|
|
|
|
--show-leak-kinds=all \
|
|
|
|
--track-origins=yes \
|
|
|
|
--show-reachable=yes \
|
|
|
|
--verbose --log-file="valgrind.log" \
|
2025-01-08 00:00:00 +00:00
|
|
|
{{bindir}}/video2x \
|
|
|
|
-i {{test_video}} -o {{test_output}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-p realcugan -s 2 -n 0 --realcugan-model models-se \
|
|
|
|
-e preset=veryfast -e crf=30
|
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('test')]
|
2025-01-08 00:00:00 +00:00
|
|
|
memcheck-libplacebo:
|
2025-01-08 00:00:00 +00:00
|
|
|
LD_LIBRARY_PATH={{bindir}} valgrind \
|
2025-01-08 00:00:00 +00:00
|
|
|
--tool=memcheck \
|
|
|
|
--leak-check=full \
|
|
|
|
--show-leak-kinds=all \
|
|
|
|
--track-origins=yes \
|
|
|
|
--show-reachable=yes \
|
|
|
|
--verbose --log-file="valgrind.log" \
|
2025-01-08 00:00:00 +00:00
|
|
|
{{bindir}}/video2x \
|
|
|
|
-i {{test_video}} -o {{test_output}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-p libplacebo -w 1920 -h 1080 --libplacebo-shader anime4k-v4-a \
|
|
|
|
-e preset=veryfast -e crf=30
|
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('test')]
|
2025-01-08 00:00:00 +00:00
|
|
|
memcheck-rife:
|
2025-01-08 00:00:00 +00:00
|
|
|
LD_LIBRARY_PATH={{bindir}} valgrind \
|
2025-01-08 00:00:00 +00:00
|
|
|
--tool=memcheck \
|
|
|
|
--leak-check=full \
|
|
|
|
--show-leak-kinds=all \
|
|
|
|
--track-origins=yes \
|
|
|
|
--show-reachable=yes \
|
|
|
|
--verbose --log-file="valgrind.log" \
|
2025-01-08 00:00:00 +00:00
|
|
|
{{bindir}}/video2x \
|
|
|
|
-i {{test_video}} -o {{test_output}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-p rife -m 4 --rife-model rife-v4.6 \
|
|
|
|
-e preset=veryfast -e crf=30
|
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('test')]
|
2025-01-08 00:00:00 +00:00
|
|
|
heaptrack-realesrgan:
|
2025-01-08 00:00:00 +00:00
|
|
|
LD_LIBRARY_PATH={{bindir}} HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack \
|
|
|
|
{{bindir}}/video2x \
|
|
|
|
-i {{test_video}} -o {{test_output}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-p realesrgan -s 4 --realesrgan-model realesr-animevideov3 \
|
|
|
|
-e preset=veryfast -e crf=30
|
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('test')]
|
2025-01-08 00:00:00 +00:00
|
|
|
heaptrack-realcugan:
|
2025-01-08 00:00:00 +00:00
|
|
|
LD_LIBRARY_PATH={{bindir}} HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack \
|
|
|
|
{{bindir}}/video2x \
|
|
|
|
-i {{test_video}} -o {{test_output}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-p realcugan -s 4 -n 0 --realcugan-model models-se \
|
|
|
|
-e preset=veryfast -e crf=30
|
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('test')]
|
2025-01-08 00:00:00 +00:00
|
|
|
heaptrack-libplacebo:
|
2025-01-08 00:00:00 +00:00
|
|
|
LD_LIBRARY_PATH={{bindir}} HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack \
|
|
|
|
{{bindir}}/video2x \
|
|
|
|
-i {{test_video}} -o {{test_output}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-p libplacebo -w 1920 -h 1080 --libplacebo-shader anime4k-v4-a \
|
|
|
|
-e preset=veryfast -e crf=30
|
|
|
|
|
2025-01-08 00:00:00 +00:00
|
|
|
[unix]
|
|
|
|
[group('test')]
|
2025-01-08 00:00:00 +00:00
|
|
|
heaptrack-rife:
|
2025-01-08 00:00:00 +00:00
|
|
|
LD_LIBRARY_PATH={{bindir}} HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack \
|
|
|
|
{{bindir}}/video2x \
|
|
|
|
-i {{test_video}} -o {{test_output}} \
|
2025-01-08 00:00:00 +00:00
|
|
|
-p rife -m 4 --rife-model rife-v4.6 \
|
|
|
|
-e preset=veryfast -e crf=30
|