mirror of
https://github.com/YACReader/yacreader
synced 2025-07-19 05:24:57 -04:00
Implement lanczos for upscaling to get crispier images
This commit is contained in:
@ -10,7 +10,23 @@ DEFINES += YACREADER
|
||||
|
||||
#load default build flags
|
||||
include (../config.pri)
|
||||
|
||||
CONFIG(7zip) {
|
||||
include(../compressed_archive/wrapper.pri)
|
||||
} else:CONFIG(unarr) {
|
||||
include(../compressed_archive/unarr/unarr-wrapper.pri)
|
||||
} else:CONFIG(libarchive) {
|
||||
include(../compressed_archive/libarchive/libarchive-wrapper.pri)
|
||||
} else {
|
||||
error(No compression backend specified. Did you mess with the build system?)
|
||||
}
|
||||
|
||||
include(../custom_widgets/custom_widgets_yacreader.pri)
|
||||
include(../image_processing/image_processing.pri)
|
||||
include (../dependencies/pdf_backend.pri)
|
||||
include(../shortcuts_management/shortcuts_management.pri)
|
||||
|
||||
include(../third_party/QsLog/QsLog.pri)
|
||||
|
||||
CONFIG(force_angle) {
|
||||
contains(QMAKE_TARGET.arch, x86_64) {
|
||||
@ -30,7 +46,7 @@ CONFIG(force_angle) {
|
||||
}
|
||||
}
|
||||
|
||||
SOURCES += main.cpp
|
||||
SOURCES += main.cpp \
|
||||
|
||||
INCLUDEPATH += ../common \
|
||||
../custom_widgets
|
||||
@ -55,6 +71,14 @@ win32 {
|
||||
msvc {
|
||||
QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT /GL
|
||||
QMAKE_LFLAGS_RELEASE += /LTCG
|
||||
|
||||
# Enable AVX and AVX2 support
|
||||
QMAKE_CXXFLAGS += /arch:AVX
|
||||
DEFINES += __AVX__
|
||||
|
||||
# Enable AVX2 if supported
|
||||
win32:QMAKE_CXXFLAGS += /arch:AVX2
|
||||
DEFINES += __AVX2__
|
||||
}
|
||||
CONFIG -= embed_manifest_exe
|
||||
}
|
||||
@ -67,7 +91,27 @@ macx {
|
||||
lessThan(QT_MAJOR_VERSION, 6): QT += macextras
|
||||
}
|
||||
|
||||
QT += network widgets core multimedia svg
|
||||
unix|mingw {
|
||||
# Enable general SIMD optimizations
|
||||
QMAKE_CXXFLAGS += -msse2 # Baseline for x86
|
||||
|
||||
# Architecture-specific optimizations (adjust as needed)
|
||||
contains(QMAKE_TARGET.arch, x86_64) {
|
||||
QMAKE_CXXFLAGS += -mavx2 -mfma
|
||||
DEFINES += __AVX__ __AVX2__
|
||||
} else { # Assuming x86 (32-bit)
|
||||
QMAKE_CXXFLAGS += -msse4.2
|
||||
DEFINES += __SSE4_2__
|
||||
}
|
||||
|
||||
# ARM
|
||||
contains(QMAKE_HOST.arch, arm) {
|
||||
QMAKE_CXXFLAGS += -mfpu=neon -mfloat-abi=hard
|
||||
DEFINES += __ARM_NEON__
|
||||
}
|
||||
}
|
||||
|
||||
QT += network widgets core multimedia svg concurrent
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 5): QT += openglwidgets core5compat
|
||||
|
||||
@ -106,7 +150,7 @@ HEADERS += ../common/comic.h \
|
||||
../common/exit_check.h \
|
||||
../common/scroll_management.h \
|
||||
../common/opengl_checker.h \
|
||||
../common/pdf_comic.h
|
||||
../common/pdf_comic.h \
|
||||
|
||||
!CONFIG(no_opengl) {
|
||||
HEADERS += ../common/gl/yacreader_flow_gl.h \
|
||||
@ -143,31 +187,16 @@ SOURCES += ../common/comic.cpp \
|
||||
../common/yacreader_global_gui.cpp \
|
||||
../common/exit_check.cpp \
|
||||
../common/scroll_management.cpp \
|
||||
../common/opengl_checker.cpp
|
||||
../common/opengl_checker.cpp \
|
||||
|
||||
!CONFIG(no_opengl) {
|
||||
SOURCES += ../common/gl/yacreader_flow_gl.cpp \
|
||||
goto_flow_gl.cpp
|
||||
}
|
||||
|
||||
include(../custom_widgets/custom_widgets_yacreader.pri)
|
||||
|
||||
CONFIG(7zip) {
|
||||
include(../compressed_archive/wrapper.pri)
|
||||
} else:CONFIG(unarr) {
|
||||
include(../compressed_archive/unarr/unarr-wrapper.pri)
|
||||
} else:CONFIG(libarchive) {
|
||||
include(../compressed_archive/libarchive/libarchive-wrapper.pri)
|
||||
} else {
|
||||
error(No compression backend specified. Did you mess with the build system?)
|
||||
}
|
||||
include(../shortcuts_management/shortcuts_management.pri)
|
||||
|
||||
RESOURCES += yacreader_images.qrc \
|
||||
yacreader_files.qrc
|
||||
|
||||
include(../third_party/QsLog/QsLog.pri)
|
||||
|
||||
RC_FILE = icon.rc
|
||||
|
||||
macx {
|
||||
|
Reference in New Issue
Block a user