Anime4KCPP
A high performance anime upscaler
Install / Use
/learn @TianZerL/Anime4KCPPREADME
Anime4KCPP v3
Anime4KCPP is a high performance anime upscaler.
Anime4KCPP v3 uses CNN based algorithm, and aims to be simple and efficient.
Playground
Use Anime4KCPP Playground to upscale images in your browser with WebAssembly.
For the Microsoft Edge browser, to achieve optimal performance, you need to disable the Enhanced Security for the site.
Build
Dependency
Build tools:
- CMake
- A C++17 compatible compiler
Dependency handling:
- If you have internet access, CMake will automatically download and configure most required dependencies.
- You can also manually download dependencies.
Manual configuration (optional):
- Most dependencies are located via
find_package. Others may usepkg-configor require explicit path specification via CMake variables. - For certain dependencies, dedicated CMake variables (e.g.,
AC_PATH_XXX) are provided. - Setting these variables will:
- Direct CMake to search in your specified paths first
- Override default search locations
List of dependencies
| Dependency | CMake option | Module | Acquisition | Manual Configuration | | ------------------------------------------------------------------------------------------------------------------------------------ | --------------------------- | ------------------- | ----------- | ------------------------------------ | | CUDA Toolkit | AC_CORE_WITH_CUDA | core(CUDA) | Manual | find_package | | libavcodec | AC_BUILD_VIDEO | video | Manual | pkg-config / AC_PATH_FFMPEG | | libavformat | AC_BUILD_VIDEO | video | Manual | pkg-config / AC_PATH_FFMPEG | | libavutil | AC_BUILD_VIDEO | video | Manual | pkg-config / AC_PATH_FFMPEG | | libswscale | AC_BUILD_VIDEO | video | Manual | pkg-config / AC_PATH_FFMPEG | | Qt | AC_BUILD_GUI | gui | Manual | find_package | | Avisynth SDK | AC_BUILD_FILTER_AVISYNTH | filter(avisynth) | Automatic | AC_PATH_AVISYNTH_SDK | | CLI11 | AC_BUILD_CLI | cli | Automatic | find_package | | DirectShow BaseClasses | AC_BUILD_FILTER_DIRECTSHOW | filter(directshow) | Automatic | AC_PATH_DIRECTSHOW_BASECLASSES | | Eigen3 | AC_CORE_WITH_EIGEN3 | core(eigen3) | Automatic | find_package | | OpenCL SDK | AC_CORE_WITH_OPENCL | core(opencl) | Automatic | find_package | | pybind11 | AC_BUILD_BINDING_PYTHON | binding(python) | Automatic | find_package | | ruapu | N/A | core | Automatic | AC_PATH_RUAPU | | stb | N/A | core | Automatic | AC_PATH_STB | | VapourSynth SDK | AC_BUILD_FILTER_VAPOURSYNTH | filter(vapoursynth) | Automatic | pkg-config / AC_PATH_VAPOURSYNTH_SDK |
- The minimum tested version of the CUDA Toolkit is 11.
- The minimum version of FFmpeg libraries is FFmpeg 4.
- Both Qt5 and Qt6 should be OK.
- VapourSynth SDK 4 is required.
- For non MSVC compilers, a modified version of the DirectShow BaseClasses will be used.
Platform
Windows
Tested with MinGW-w64, Clang and MSVC.
DirectShow filter is only available on Windows, tested compilers include MinGW-w64, ClangCL and MSVC.
Build with MinGW-w64:
mkdir build; cd build
cmake -G "MinGW Makefiles" .. -DAC_CORE_WITH_OPENCL=ON -DAC_ENABLE_STATIC_CRT=ON
cmake --build . --config Release -j8
cd bin
./ac_cli -v
Build with MSVC:
mkdir build; cd build
cmake -G "Visual Studio 17 2022" .. -DAC_CORE_WITH_OPENCL=ON
cmake --build . --config Release -j8
cd bin/Release/
./ac_cli -v
To setup FFmpeg libraries 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.
Linux
Tested with gcc and Clang.
# Toolchain
sudo apt install cmake build-essential
# For video module:
sudo apt install pkg-config libavcodec-dev libavformat-dev libavutil-dev libswscale-dev
# For GUI:
sudo apt install qt6-base-dev qt6-tools-dev
# For python binding:
sudo apt install python3-dev
mkdir build && cd build
cmake .. -DAC_CORE_WITH_OPENCL=ON #-DAC_BUILD_VIDEO=ON -DAC_BUILD_GUI=ON
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
Tested with Emscripten. check Anime4KCPP-Playground.
Mac OS
Tested with Apple Clang via github actions, MACOSX_DEPLOYMENT_TARGET >= 10.12 is required.
CMake options
| Option | Description | Default | | ------------------------------------ | -------------------------------------------------- | ----------- | | AC_SHARED_LIB | build as a shared library | OFF | | AC_CORE_WITH_EIGEN3 | build core with eigen3 | OFF | | AC_CORE_WITH_SSE | build core with x86 sse | Auto detect | | AC_CORE_WITH_AVX | build core with x86 avx | Auto detect | | AC_CORE_WITH_FMA | build core with x86 fma and avx | Auto detect | | AC_CORE_WITH_NEON | build core with arm neon | Auto detect | | AC_CORE_WITH_WASM_SIMD128 | build core with wasm simd128 | Auto detect | | AC_CORE_WITH_OPENCL | build core with opencl | OFF | | AC_CORE_WITH_CUDA | build core with cuda | OFF | | AC_CORE_ENABLE_FAST_MATH | enable fast math for core | OFF | | AC_CORE_DISABLE_IMAGE_IO | disable image file read and write for core | OFF | | AC_BUILD_CLI | build cli | ON | | AC_BUILD_GUI | build gui | OFF | | AC_BUILD_VIDEO | build video module | OFF | | AC_BUILD_FILTER_AVISYNTH | build avisynth filter | OFF | | AC_BUILD_FILTER_VAPOURSYNTH | build vapoursynth filt
Related Skills
qqbot-channel
347.6kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
docs-writer
100.2k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
347.6kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
cursor-agent-tracking
134A repository that provides a structured system for maintaining context and tracking changes in Cursor's AGENT mode conversations through template files, enabling better continuity and organization of AI interactions.
