Skip to content

Commit

Permalink
Update CmakeLists and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TianZerL committed May 6, 2020
1 parent 3c0457c commit 63c23a1
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Anime4KCore/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project(Anime4KCore)
project(Anime4KCPPCore)

aux_source_directory(src SOURCE)

Expand Down
4 changes: 3 additions & 1 deletion CLI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ aux_source_directory(src SOURCE)

include_directories(../Anime4KCore/include ../ThirdParty/include ${OpenCL_INCLUDE_DIRS})

add_compile_definitions(COMPILER="${CMAKE_CXX_COMPILER_ID}")

add_executable(${PROJECT_NAME} ${SOURCE})
target_link_libraries(${PROJECT_NAME} Anime4KCore)
target_link_libraries(${PROJECT_NAME} Anime4KCPPCore)
10 changes: 5 additions & 5 deletions CLI/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ CODEC string2Codec(const std::string& codec)

inline void showVersionInfo()
{
std::cerr
<< "Anime4KCLI" << std::endl
std::cerr
<< "Anime4KCPPCLI" << std::endl
<< "Anime4KCPP core version: " << ANIME4KCPP_CORE_VERSION << std::endl
<< "Build date: " << __DATE__ << " " << __TIME__ << std::endl
<< "Compiler: " << COMPILER << std::endl
Expand Down Expand Up @@ -250,9 +250,9 @@ hevc(not support in Windowds), av01(not support in Windowds)", false, "mp4v");
{
std::cout << err << std::endl;
return 0;
}
}

delete anime4k;

return 0;
}
2 changes: 1 addition & 1 deletion GUI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ include_directories(${OpenCV_INCLUDE_DIRS} ${OpenCL_INCLUDE_DIRS})

target_link_libraries(Anime4KCPP_GUI PRIVATE Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} PRIVATE ${OpenCV_LIBS})
target_link_libraries(${PROJECT_NAME} PRIVATE Anime4KCore)
target_link_libraries(${PROJECT_NAME} PRIVATE Anime4KCPPCore)

qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
8 changes: 4 additions & 4 deletions GUI/src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ void MainWindow::initTextBrowser()
"----------------------------------------------\n"
" Welcome to Anime4KCPP GUI \n"
"----------------------------------------------\n"+
QString(" Anime4K GUI v%1 \n"
" Anime4K Core v%2 \n"
QString(" Anime4KCPP GUI v%1 \n"
" Anime4KCPP Core v%2 \n"
"----------------------------------------------\n").arg(ANIME4KCPP_GUI_VERSION,
ANIME4KCPP_CORE_VERSION)
);
Expand Down Expand Up @@ -948,8 +948,8 @@ void MainWindow::on_actionAbout_triggered()
QMessageBox::information(this,
tr("About"),
QString("Anime4KCPP GUI\n\n"
"Anime4K GUI v%1\n"
"Anime4K Core v%2\n\n"
"Anime4KCPP GUI v%1\n"
"Anime4KCPP core v%2\n\n"
"Build on %3 %4\n\n"
"GitHub: https://github.com/TianZerL/Anime4KCPP\n\n"
"Copyright (c) 2020 TianZerL").arg(ANIME4KCPP_GUI_VERSION,
Expand Down
16 changes: 11 additions & 5 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Anime4KCPP现已支持GPU加速,通过原生OpenCL实现,可提供高性能
CPU: AMD Ryzen 3500U
GPU: AMD Vege 8 Graphics
RAM: 16G
Anime4KCPP 版本 : 1.6.0
Anime4KCPP 版本 : 1.7.0
Anime4KCPP 设置: 平衡

CPU:
Expand All @@ -34,17 +34,17 @@ Anime4KCPP 设置: 平衡
1080P -> 4k: 0.650秒

视频(长度: 1 分 32 秒):
480P -> 1080P : 3 分 13 秒
1080P -> 4K : 19 分 09
480P -> 1080P : 03 分 13 秒
1080P -> 4K : 19 分 09 秒

GPU:
图像:
256x256 -> 512x512: 0.006秒
1080P -> 4k: 0.090秒

视频(长度: 1 分 32 秒):
480P -> 1080P : 0 分 31
1080P -> 4K : 3 分 00
480P -> 1080P : 00 分 29
1080P -> 4K : 02 分 55

# GUI
Anime4KCPP支持GUI,您可以更轻松的处理您的图像与视频!
Expand Down Expand Up @@ -90,6 +90,8 @@ Anime4KCPP支持GUI,您可以更轻松的处理您的图像与视频!
-l, --listGPUs 列出GPU平台与设备
-h, --platformID 指定平台ID (unsigned int [=0])
-d, --deviceID 指定设备ID (unsigned int [=0])
-C, --codec 指定编码器,包括 mp4v(推荐用于Windows), dxva(仅支持Windows), avc1(H264, 推荐用于Linux), vp09(非常慢), hevc(不支持Windows), av01(不支持Windows) (string [=mp4v])
-V, --version 显示版本信息
-?, --help 显示帮助信息

## GPU加速相关
Expand Down Expand Up @@ -141,5 +143,9 @@ CAS是AMD开源的自适应锐化技术。
- Rust
- [andraantariksa/Anime4K-rs](https://github.com/andraantariksa/Anime4K-rs)

# 使用Anime4KCPP的项目
- [AaronFeng753/Waifu2x-Extension-GUI](https://github.com/AaronFeng753/Waifu2x-Extension-GUI)
- [k4yt3x/video2x](https://github.com/k4yt3x/video2x)

# 致谢
项目中引用的所有动漫图像均由我的朋友 ***King of learner*** 绘制并授权使用,请勿在未经许可的情况下使用它们。
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Anime4KCPP now supports GPU acceleration, which is implemented by original OpenC
CPU: AMD Ryzen 3500U
GPU: AMD Vege 8 Graphics
RAM: 16G
Anime4KCPP Version : 1.6.0
Anime4KCPP Version : 1.7.0
Anime4KCPP Settings: balance

CPU:
Expand All @@ -37,7 +37,7 @@ Anime4KCPP Settings: balance
1080P -> 4k: 0.650s

Video(Length: 1 min 32 seconds):
480P -> 1080P : 3 min 13 seconds
480P -> 1080P : 03 min 13 seconds
1080P -> 4K : 19 min 09 seconds

GPU:
Expand All @@ -46,8 +46,8 @@ Anime4KCPP Settings: balance
1080P -> 4k: 0.090s

Video(Length: 1 min 32 seconds):
480P -> 1080P : 0 min 31 seconds
1080P -> 4K : 3 min 00 seconds
480P -> 1080P : 00 min 29 seconds
1080P -> 4K : 02 min 55 seconds

# GUI
Anime4KCPP now provides a GUI interface, upscale your image or video by an easier way!
Expand Down Expand Up @@ -85,15 +85,18 @@ This project uses [cmake](https://cmake.org) to build.
-f, --fastMode Faster but maybe low quality
-v, --videoMode Video process
-s, --preview Preview image
-b, --preProcessing Enable pre processing
-a, --postProcessing Enable post processing
-b, --preprocessing Enable preprocessing
-a, --postprocessing Enable postprocessing
-r, --preFilters Enhancement filter, only working when preProcessing is true,there are 5 options by binary:Median blur=0000001, Mean blur=0000010, CAS Sharpening=0000100, Gaussian blur weak=0001000, Gaussian blur=0010000, Bilateral filter=0100000, Bilateral filter faster=1000000, you can freely combine them, eg: Gaussian blur weak + Bilateral filter = 0001000 | 0100000 = 0101000 = 40(D) (unsigned int [=4])
-e, --postFilters Enhancement filter, only working when postProcessing is true,there are 5 options by binary:Median blur=0000001, Mean blur=0000010, CAS Sharpening=0000100, Gaussian blur weak=0001000, Gaussian blur=0010000, Bilateral filter=0100000, Bilateral filter faster=1000000, you can freely combine them, eg: Gaussian blur weak + Bilateral filter = 0001000 | 0100000 = 0101000 = 40(D), so you can put 40 to enable Gaussian blur weak and Bilateral filter, which also is what I recommend for image that < 1080P, 48 for image that >= 1080P, and for performance I recommend to use 72 for video that < 1080P, 80 for video that >=1080P (unsigned int [=40])
-q, --GPUMode Enable GPU acceleration
-l, --listGPUs list GPUs
-h, --platformID Specify the platform ID (unsigned int [=0])
-d, --deviceID Specify the device ID (unsigned int [=0])
-C, --codec Specify the codec for encoding from mp4v(recommended in Windows), dxva(for Windows), avc1(H264, recommended in Linux), vp09(very slow), hevc(not support in Windowds), av01(not support in Windowds) (string [=mp4v])
-V, --version print version information
-?, --help print this message

## About GPU acceleration
Use ```-q``` to enable GPU acceleration, and then use ```-l``` to list the platform ids and device ids, ```-h``` for specifying platform id, ```-d``` for specifying device id.
## Filters
Expand Down Expand Up @@ -142,5 +145,9 @@ CAS is an adaptive sharpening technology which is open source by AMD, simple but
- Rust
- [andraantariksa/Anime4K-rs](https://github.com/andraantariksa/Anime4K-rs)

# Projects that use Anime4KCPP
- [AaronFeng753/Waifu2x-Extension-GUI](https://github.com/AaronFeng753/Waifu2x-Extension-GUI)
- [k4yt3x/video2x](https://github.com/k4yt3x/video2x)

# Acknowledgement
All images are drawn by my friend ***King of learner*** and authorized to use, only for demonstration, do not use without permission.

0 comments on commit 63c23a1

Please sign in to comment.