Home

Awesome

<div align="center"> <img src="./images/Logo.png"> </div>

Anime4KCPP v3

Anime4KCPP is a high performance anime upscaler.

Anime4KCPP v3 uses CNN based algorithm, and aims to be simple and efficient.

Build

Dependency

To build Anime4KCPP v3 you need CMake and a C++17 compiler, and most dependencies will be resolved automatically by CMake if you have internet.

List of dependencies that need to be prepared by yourself:

DependencyCMake optionModule
CUDA ToolkitAC_CORE_WITH_CUDAcore(CUDA)
libavcodecAC_BUILD_VIDEOvideo
libavformatAC_BUILD_VIDEOvideo
libavutilAC_BUILD_VIDEOvideo
QtAC_BUILD_GUIgui

List of dependencies that can be resolved automatically:

DependencyCMake optionModule
Avisynth SDKAC_BUILD_FILTER_AVISYNTHfilter(avisynth)
CLI11AC_BUILD_CLIcli
DirectShow base classesAC_BUILD_FILTER_DIRECTSHOWfilter(directshow)
Eigen3AC_CORE_WITH_EIGEN3core(eigen3)
OpenCL SDKAC_CORE_WITH_OPENCLcore(opencl)
pybind11AC_BUILD_BINDING_PYTHONbinding(python)
ruapuN/Acore
stbN/Acore
VapourSynth SDKAC_BUILD_FILTER_VAPOURSYNTHfilter(vapoursynth)

Platform

Windows

Tested with MinGW-w64 and MSVC.

Build with MinGW-w64:

mkdir build; cd build
cmake -G "MinGW Makefiles" .. -DAC_ENABLE_STATIC_CRT=ON
cmake --build . --config Release -j8
cd bin
./ac_cli -v

To setup ffmpeg's libav for building video module on Windows, it is recommended to add an AC_PATH_FFMPEG variable to CMake, but you can also use pkg-config for Windows. AC_PATH_FFMPEG should be a path to the ffmpeg's root folder witch contains lib and include.

To add AC_PATH_FFMPEG to CMake, click Add Entry button in cmake-gui or use -DAC_PATH_FFMPEG="path/to/ffmpeg/root" in terminal.

You can download ffmpeg with sdk from BtBN (ffmpeg-master-latest-win64-gpl-shared.zip or ffmpeg-master-latest-win64-lgpl-shared.zip) or gyan.dev (ffmpeg-release-full-shared.7z) for Windows.

You need MSVC to build directshow filter, witch is only available on Windows.

Linux

Tested with gcc and clang.

mkdir build && cd build
cmake ..
cmake --build . --config Release -j8
cd bin
./ac_cli -v

Termux

To build with opencl support, you need install ocl-icd package, OpenCL SDK from Khronos seems not to be worked with termux.

pkg install cmake clang ocl-icd opencl-clhpp opencl-headers
mkdir build && cd build
cmake .. -DAC_CORE_WITH_OPENCL=ON
cmake --build . --config Release -j8
cd bin
LD_LIBRARY_PATH=/vendor/lib64:$PREFIX/lib ./ac_cli -l

WASM

Only tested with Emscripten. See wasm test.

Mac OS

Untested. If you do, please provide feedback.

CMake options

OptionDescriptionDefault
AC_SHARED_LIBbuild as a shared libraryOFF
AC_CORE_WITH_EIGEN3build core with eigen3OFF
AC_CORE_WITH_SSEbuild core with x86 sseAuto detect
AC_CORE_WITH_AVXbuild core with x86 avxAuto detect
AC_CORE_WITH_FMAbuild core with x86 fma and avxAuto detect
AC_CORE_WITH_NEONbuild core with arm neonAuto detect
AC_CORE_WITH_WASM_SIMD128build core with wasm simd128Auto detect
AC_CORE_WITH_OPENCLbuild core with openclOFF
AC_CORE_WITH_CUDAbuild core with cudaOFF
AC_CORE_ENABLE_FAST_MATHenable fast math for coreOFF
AC_CORE_ENABLE_IMAGE_IOenable image file read and write for coreON
AC_BUILD_CLIbuild cliON
AC_BUILD_GUIbuild guiOFF
AC_BUILD_VIDEObuild video moduleOFF
AC_BUILD_FILTER_AVISYNTHbuild avisynth filterOFF
AC_BUILD_FILTER_VAPOURSYNTHbuild vapoursynth filterOFF
AC_BUILD_FILTER_DIRECTSHOWbuild directshow filter (Windows MSVC only)OFF
AC_BUILD_FILTER_AVISYNTH_VAPOURSYNTHbuild an avisynth and vapoursynth universal filterOFF
AC_BUILD_BINDING_Cbuild c binding for coreOFF
AC_BUILD_BINDING_PYTHONbuild python binding for coreOFF
AC_TOOLS_BENCHMARKbuild benchmarkOFF
AC_TEST_UTILbuild util module testOFF
AC_TEST_VIDEObuild video module testOFF
AC_TEST_WASMbuild wasm test (Emscripten only)OFF
AC_ENABLE_LTOenable LTOOFF
AC_ENABLE_STATIC_CRTenable static link crtOFF
AC_DISABLE_RTTIdisable rttiOFF
AC_DISABLE_EXCEPTIONdisable exceptionOFF
AC_DISABLE_PICdisable pic or pieOFF

There are some convenient presets:

AC_PRESET_RELEASE

LICENSE

The video module is under GPLv3, any module built with the video module are also under GPLv3, others under MIT. For example, if cli build with video module, it is under GPLv3, otherwise, it is under MIT.