1- QT += core quick network quickcontrols2 svg
1+ QT += core quick network quickcontrols2 svg concurrent
22CONFIG += c++17
33
44unix :!macx {
@@ -141,7 +141,7 @@ unix:if(!macx|disable-prebuilts) {
141141 }
142142}
143143win32 {
144- LIBS += -llibssl -llibcrypto -lSDL2 -lSDL2_ttf -lavcodec -lavutil -lswscale -lopus -ldxgi -ld3d11 -llibplacebo
144+ LIBS += -llibssl -llibcrypto -lSDL2 -lSDL2_ttf -lavcodec -lavutil -lswscale -lopus -ldxgi -ld3d11 -ld3d12 -ldxguid - llibplacebo -ld3dcompiler -ldxcompiler
145145 CONFIG += ffmpeg libplacebo
146146}
147147win32 :!winrt {
@@ -153,7 +153,7 @@ macx {
153153 CONFIG += discord-rpc
154154 }
155155
156- LIBS += -lobjc -framework VideoToolbox -framework AVFoundation -framework CoreVideo -framework CoreGraphics -framework CoreMedia -framework AppKit -framework Metal -framework QuartzCore
156+ LIBS += -lobjc -framework VideoToolbox -framework AVFoundation -framework CoreVideo -framework CoreGraphics -framework CoreMedia -framework AppKit -framework Metal -framework MetalFx -framework MetalPerformanceShaders -framework QuartzCore
157157 CONFIG += ffmpeg
158158}
159159
@@ -196,6 +196,7 @@ SOURCES += \
196196 gui/sdlgamepadkeynavigation.cpp \
197197 streaming/video/overlaymanager.cpp \
198198 backend/systemproperties.cpp \
199+ streaming/video/videoenhancement.cpp \
199200 wm.cpp
200201
201202HEADERS += \
@@ -233,7 +234,8 @@ HEADERS += \
233234 settings/mappingmanager.h \
234235 gui/sdlgamepadkeynavigation.h \
235236 streaming/video/overlaymanager.h \
236- backend/systemproperties.h
237+ backend/systemproperties.h \
238+ streaming/video/videoenhancement.h
237239
238240# Platform-specific renderers and decoders
239241ffmpeg {
@@ -379,18 +381,134 @@ config_SL {
379381win32 {
380382 HEADERS += streaming/video/ffmpeg-renderers/dxutil.h
381383}
384+
385+ win32 :!winrt {
386+ message (NVIDIA VSR and TrueHDR technologies )
387+
388+ # Required by NVIDIA RTX Video SDK; compilation fails without these linker flags
389+ # as the SDK is compiled to work with Visual Studio initially
390+ # Note: '/guard:ehcont,no' disables some EH checks
391+ # For a standalone application without external modules, this poses virtually no risk
392+ QMAKE_LFLAGS += /guard:ehcont ,no
393+
394+ LIBS += -ladvapi32
395+
396+ OS_ARCHI = x64
397+ contains (QT_ARCH, arm64 ) {
398+ OS_ARCHI = arm64
399+ }
400+
401+ NGX_DLL_PATH_VSR = " $$PWD/../third-party/RTX_Video_SDK/bin/Windows/$${OS_ARCHI}/rel/nvngx_vsr.dll"
402+ NGX_DLL_PATH_HDR = " $$PWD/../third-party/RTX_Video_SDK/bin/Windows/$${OS_ARCHI}/rel/nvngx_truehdr.dll"
403+
404+ CONFIG (debug , debug |release ) {
405+ # Debug
406+ copy_vsr.commands = $$quote (copy /Y $$shell_path ($$NGX_DLL_PATH_VSR ) $$shell_path (" $$OUT_PWD/debug" ))
407+ copy_hdr.commands = $$quote (copy /Y $$shell_path ($$NGX_DLL_PATH_HDR ) $$shell_path (" $$OUT_PWD/debug" ))
408+ LIBS += -L $$PWD /../third-party/RTX_Video_SDK/lib/Windows/ $${OS_ARCHI } -lnvsdk_ngx_d_dbg
409+ }
410+
411+ CONFIG (release , debug |release ) {
412+ # Release
413+ copy_vsr.commands = $$quote (copy /Y $$shell_path ($$NGX_DLL_PATH_VSR ) $$shell_path (" $$OUT_PWD/release" ))
414+ copy_hdr.commands = $$quote (copy /Y $$shell_path ($$NGX_DLL_PATH_HDR ) $$shell_path (" $$OUT_PWD/release" ))
415+ LIBS += -L $$PWD /../third-party/RTX_Video_SDK/lib/Windows/ $${OS_ARCHI } -lnvsdk_ngx_d
416+ }
417+
418+ QMAKE_POST_LINK += $$copy_vsr.commands & $$copy_hdr.commands
419+
420+ INCLUDEPATH += $$PWD /../third-party/RTX_Video_SDK/include
421+ }
422+
423+ win32 :!winrt {
424+ message (AMD Upscaling technologies )
425+
426+ SOURCES += \
427+ ../third-party/AMF/amf/public/common/AMFFactory.cpp \
428+ ../third-party/AMF/amf/public/common/AMFSTL.cpp \
429+ ../third-party/AMF/amf/public/common/Thread.cpp \
430+ ../third-party/AMF/amf/public/common/TraceAdapter.cpp \
431+ ../third-party/AMF/amf/public/common/Windows/ThreadWindows.cpp
432+
433+ INCLUDEPATH += \
434+ $$PWD /../third-party/AMF/amf \
435+ $$PWD /shaders/enhancer/AMD
436+ }
437+
438+ win32 :!winrt {
439+ message (Intel VPL Upscaling technologies )
440+
441+ # IntelVPL already exists and is compiled for x64 architecture.
442+ # Uncomment if you need to rebuild IntelVPL locally.
443+ # Important: MSVC Build Tools for ARM64 and WinGet (https://github.com/microsoft/winget-cli/releases) are required,
444+
445+ # # Compile x64 architecture
446+ # vpl_build_x64.commands = \
447+ # cd $$shell_path($$PWD/../third-party/libvpl) && \
448+ # script\\bootstrap.bat && \
449+ # cmake -B _build_x64 -DCMAKE_INSTALL_PREFIX="$$PWD/../third-party/IntelVPL/x64" && \
450+ # cmake --build _build_x64 --config Release && \
451+ # cmake --install _build_x64 --config Release
452+ # vpl_build_x64.CONFIG += no_link
453+ # QMAKE_EXTRA_TARGETS += vpl_build_x64
454+ # PRE_TARGETDEPS += vpl_build_x64
455+
456+ # # Compile arm64 architecture
457+ # # Note: Intel does not provide a arm64 version of its library,
458+ # # but we need to compile it to avoid a build error, even if it is not used
459+ # vpl_build_arm64.commands = \
460+ # cd $$shell_path($$PWD/../third-party/libvpl) && \
461+ # script\\bootstrap.bat && \
462+ # cmake -B _build_arm64 -A ARM64 -T host=x64 -DCMAKE_INSTALL_PREFIX="$$PWD/../third-party/IntelVPL/arm64" && \
463+ # cmake --build _build_arm64 --config Release && \
464+ # cmake --install _build_arm64 --config Release
465+ # vpl_build_arm64.CONFIG += no_link
466+ # QMAKE_EXTRA_TARGETS += vpl_build_arm64
467+ # PRE_TARGETDEPS += vpl_build_arm64
468+
469+ OS_ARCHI = x64
470+ contains (QT_ARCH, arm64 ) {
471+ OS_ARCHI = arm64
472+ }
473+
474+ INCLUDEPATH += $$PWD /../third-party/IntelVPL/ $${OS_ARCHI }/include
475+ LIBS += -L $$PWD /../third-party/IntelVPL/ $${OS_ARCHI }/lib -lvpl
476+
477+ # IntelVPL is only available for the architecture x64
478+ contains (QT_ARCH, x86_64 ) {
479+ DEFINES += HAVE_INTEL_VPL
480+ }
481+ }
382482win32 :!winrt {
383- message (DXVA2 and D3D11VA renderers selected )
483+ message (NVIDIA Image Scaling )
484+
485+ INCLUDEPATH += $$PWD /../third-party/NVIDIAImageScaling/NIS
486+ }
487+ win32 :!winrt {
488+ message (Direct3D 12 headers )
489+
490+ INCLUDEPATH += $$PWD /../third-party/DirectX-Headers/include
491+ }
492+ win32 :!winrt {
493+ message ("DXVA2, D3D11renderers and D3D12renderers selected" )
384494
385495 SOURCES += \
386496 streaming/video/ffmpeg-renderers/dxva2.cpp \
387497 streaming/video/ffmpeg-renderers/d3d11va.cpp \
498+ streaming/video/ffmpeg-renderers/d3d12va.cpp \
499+ streaming/video/ffmpeg-renderers/d3d12va_shaders.cpp \
388500 streaming/video/ffmpeg-renderers/pacer/dxvsyncsource.cpp
389501
390502 HEADERS += \
391503 streaming/video/ffmpeg-renderers/dxva2.h \
392504 streaming/video/ffmpeg-renderers/d3d11va.h \
505+ streaming/video/ffmpeg-renderers/d3d12va.h \
506+ streaming/video/ffmpeg-renderers/d3d12va_shaders.h \
393507 streaming/video/ffmpeg-renderers/pacer/dxvsyncsource.h
508+
509+ CONFIG (debug , debug |release ) {
510+ INCLUDEPATH += $$PWD /../third-party/stb_image
511+ }
394512}
395513macx {
396514 message (VideoToolbox renderer selected )
0 commit comments