Skip to content

DLSS 5 Neural Rendering for Images & Video with Frame Generation, RTX Video Super Resolution, HDR, and Color Grading

Add files via upload

Merserk1308c6c255bc
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9810dba..df9e690 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -187,6 +187,16 @@ if(BUILD_TESTING)
src/desktop/app.ico Merserk.VisualEnhancer.Tests)
add_executable(ve_vfx_storage_smoke "${VE_TEST_ROOT}/vfx_storage_smoke.cpp")
target_link_libraries(ve_vfx_storage_smoke PRIVATE ve_desktop)
+ add_executable(ve_media_resource_smoke "${VE_TEST_ROOT}/media_resource_smoke.cpp")
+ target_link_libraries(ve_media_resource_smoke PRIVATE ve_desktop Qt6::Test psapi)
+ add_executable(ve_desktop_memory_smoke "${VE_TEST_ROOT}/desktop_memory_smoke.cpp")
+ target_link_libraries(ve_desktop_memory_smoke PRIVATE ve_desktop Qt6::Test psapi)
+ add_executable(ve_process_stream_tests "${VE_TEST_ROOT}/process_stream_tests.cpp")
+ target_link_libraries(ve_process_stream_tests PRIVATE ve_core Qt6::Test psapi)
+ add_test(NAME process_stream_contracts COMMAND $<TARGET_FILE:ve_process_stream_tests> -o -,txt)
+ set_tests_properties(process_stream_contracts PROPERTIES
+ ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${VE_QT_RUNTIME_ROOT}/bin"
+ TIMEOUT 45)
add_executable(ve_cli_cancel_probe "${VE_TEST_ROOT}/cli_cancel_probe.cpp")
set_target_properties(ve_cli_cancel_probe PROPERTIES AUTOMOC OFF AUTORCC OFF)
target_compile_definitions(ve_cli_cancel_probe PRIVATE NOMINMAX WIN32_LEAN_AND_MEAN UNICODE _UNICODE)
diff --git a/src/desktop/qml/views/AboutView.qml b/src/desktop/qml/views/AboutView.qml
index 68f7885..3a4dc89 100644
--- a/src/desktop/qml/views/AboutView.qml
+++ b/src/desktop/qml/views/AboutView.qml
@@ -13,29 +13,47 @@ Rectangle {
id: aboutCol
width: Math.min(parent.width, 1120); anchors.centerIn: parent; spacing: 20
Column {
+ width: parent.width
anchors.horizontalCenter: parent.horizontalCenter; spacing: 4
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: "Visual Enhancer"; font.family: Theme.fontFamily; font.pixelSize: 22; font.weight: Font.Bold; color: Theme.textPrimary
}
Text {
+ width: parent.width
anchors.horizontalCenter: parent.horizontalCenter
text: qsTranslate("App", "Advanced neural image & video processing"); font.family: Theme.fontFamily; font.pixelSize: Theme.fontSizeLabel; color: Theme.textSecondary
+ horizontalAlignment: Text.AlignHCenter; wrapMode: Text.WordWrap
}
}
Row {
anchors.horizontalCenter: parent.horizontalCenter; spacing: 12
- AppButton { text: qsTranslate("App", "GitHub Repository"); iconName: "github"; onClicked: Qt.openUrlExternally("https://github.com/Merserk/dlss5-visual-enhancer") }
- AppButton { text: qsTranslate("App", "Support on Patreon"); iconName: "heart"; onClicked: Qt.openUrlExternally("https://www.patreon.com/Merserk") }
- AppButton { text: qsTranslate("App", "Third-Party Licenses"); onClicked: { if (root.appBridge) root.appBridge.openThirdPartyNotices() } }
+ AppButton { text: qsTranslate("App", "Visit Website"); iconName: "external_link"; onClicked: Qt.openUrlExternally("https://visual-enhancer.merserk.com/") }
+ AppButton { text: "GitHub"; iconName: "github"; onClicked: Qt.openUrlExternally("https://github.com/Merserk/dlss5-visual-enhancer") }
+ AppButton { text: qsTranslate("App", "Support Project"); iconName: "heart"; onClicked: Qt.openUrlExternally("https://www.patreon.com/Merserk") }
}
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: qsTranslate("App", "Uses Qt under LGPLv3. See Third-Party Licenses.")
- font.family: Theme.fontFamily; font.pixelSize: Theme.fontSizeSmall; color: Theme.textSecondary
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter; spacing: 16
+ Text {
+ text: qsTranslate("App", "Uses Qt under LGPLv3")
+ font.family: Theme.fontFamily; font.pixelSize: Theme.fontSizeSmall; color: Theme.textSecondary
+ }
+ Text {
+ text: "<a href='licenses'>" + qsTranslate("App", "Third-Party Licenses") + "</a>"
+ textFormat: Text.RichText; linkColor: Theme.accent
+ font.family: Theme.fontFamily; font.pixelSize: Theme.fontSizeSmall
+ activeFocusOnTab: true
+ Accessible.role: Accessible.Link
+ Accessible.name: qsTranslate("App", "Third-Party Licenses")
+ function openLicenses() { if (root.appBridge) root.appBridge.openThirdPartyNotices() }
+ onLinkActivated: openLicenses()
+ Keys.onReturnPressed: openLicenses()
+ Keys.onEnterPressed: openLicenses()
+ HoverHandler { cursorShape: Qt.PointingHandCursor }
+ }
}
- Text { anchors.horizontalCenter: parent.horizontalCenter; text: qsTranslate("App", "© 2026 Merserk. NVIDIA, DLSS, and RTX are trademarks of NVIDIA Corporation."); font.family: Theme.fontFamily; font.pixelSize: Theme.fontSizeSmall; color: Theme.textMuted }
+ Text { width: parent.width; anchors.horizontalCenter: parent.horizontalCenter; text: qsTranslate("App", "© 2026 Merserk. NVIDIA, DLSS, and RTX are trademarks of NVIDIA Corporation."); font.family: Theme.fontFamily; font.pixelSize: Theme.fontSizeSmall; color: Theme.textMuted; horizontalAlignment: Text.AlignHCenter; wrapMode: Text.WordWrap }
}
}
}
diff --git a/src/desktop/translations/app_ar.qm b/src/desktop/translations/app_ar.qm
index fbdfcca..b4cb360 100644
Binary files a/src/desktop/translations/app_ar.qm and b/src/desktop/translations/app_ar.qm differ
diff --git a/src/desktop/translations/app_ar.ts b/src/desktop/translations/app_ar.ts
index a4703ad..b562d77 100644
--- a/src/desktop/translations/app_ar.ts
+++ b/src/desktop/translations/app_ar.ts
@@ -3,6 +3,18 @@
<TS version="2.1" language="ar" sourcelanguage="en_US">
<context>
<name>App</name>
+ <message>
+ <source>Visit Website</source>
+ <translation>زيارة الموقع</translation>
+ </message>
+ <message>
+ <source>Support Project</source>
+ <translation>دعم المشروع</translation>
+ </message>
+ <message>
+ <source>Uses Qt under LGPLv3</source>
+ <translation>يستخدم Qt بموجب LGPLv3</translation>
+ </message>
<message>
<location filename="../qml/components/MediaViewport.qml" line="711" />
<source>
@@ -1005,11 +1017,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>GPU support and installed models are checked before processing.</source>
<translation>يُتحقق من دعم GPU والنماذج المثبتة قبل المعالجة.</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="29" />
- <source>GitHub Repository</source>
- <translation>مستودع GitHub</translation>
- </message>
<message>
<source>Good</source>
<translation>جيدة</translation>
@@ -2329,11 +2336,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>Style %1</source>
<translation>النمط %1</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="30" />
- <source>Support on Patreon</source>
- <translation>الدعم على Patreon</translation>
- </message>
<message>
<source>Switched to %1 mode. %2</source>
<translation>تم التحويل إلى وضع %1. %2</translation>
@@ -2476,11 +2478,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>Upscale Video(s)</source>
<translation>تكبير الفيديو</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="35" />
- <source>Uses Qt under LGPLv3. See Third-Party Licenses.</source>
- <translation>يستخدم Qt بموجب LGPLv3. راجع تراخيص الجهات الخارجية.</translation>
- </message>
<message>
<location filename="../qml/components/SuperResolutionControls.qml" line="15" />
<location filename="../qml/views/UpscaleView.qml" line="173" />
diff --git a/src/desktop/translations/app_de.qm b/src/desktop/translations/app_de.qm
index 79a9477..eb3c538 100644
Binary files a/src/desktop/translations/app_de.qm and b/src/desktop/translations/app_de.qm differ
diff --git a/src/desktop/translations/app_de.ts b/src/desktop/translations/app_de.ts
index 6c1eb6b..1a441e5 100644
--- a/src/desktop/translations/app_de.ts
+++ b/src/desktop/translations/app_de.ts
@@ -3,6 +3,18 @@
<TS version="2.1" language="de" sourcelanguage="en_US">
<context>
<name>App</name>
+ <message>
+ <source>Visit Website</source>
+ <translation>Website besuchen</translation>
+ </message>
+ <message>
+ <source>Support Project</source>
+ <translation>Projekt unterstützen</translation>
+ </message>
+ <message>
+ <source>Uses Qt under LGPLv3</source>
+ <translation>Verwendet Qt unter LGPLv3</translation>
+ </message>
<message>
<location filename="../qml/components/MediaViewport.qml" line="711" />
<source>
@@ -989,11 +1001,6 @@ Standbild angezeigt. Mit &lt; &gt; navigieren oder Datei extern öffnen.</transl
<source>GPU support and installed models are checked before processing.</source>
<translation>GPU-Unterstützung und installierte Modelle werden vor der Verarbeitung geprüft.</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="29" />
- <source>GitHub Repository</source>
- <translation>GitHub-Repository</translation>
- </message>
<message>
<source>Good</source>
<translation>Gut</translation>
@@ -2313,11 +2320,6 @@ Standbild angezeigt. Mit &lt; &gt; navigieren oder Datei extern öffnen.</transl
<source>Style %1</source>
<translation>Stil %1</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="30" />
- <source>Support on Patreon</source>
- <translation>Auf Patreon unterstützen</translation>
- </message>
<message>
<source>Switched to %1 mode. %2</source>
<translation>In Modus %1 gewechselt. %2</translation>
@@ -2460,11 +2462,6 @@ Standbild angezeigt. Mit &lt; &gt; navigieren oder Datei extern öffnen.</transl
<source>Upscale Video(s)</source>
<translation>Videos hochskalieren</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="35" />
- <source>Uses Qt under LGPLv3. See Third-Party Licenses.</source>
- <translation>Verwendet Qt unter LGPLv3. Siehe Drittanbieter-Lizenzen.</translation>
- </message>
<message>
<location filename="../qml/components/SuperResolutionControls.qml" line="15" />
<location filename="../qml/views/UpscaleView.qml" line="173" />
diff --git a/src/desktop/translations/app_es.qm b/src/desktop/translations/app_es.qm
index a43ce37..83f76bb 100644
Binary files a/src/desktop/translations/app_es.qm and b/src/desktop/translations/app_es.qm differ
diff --git a/src/desktop/translations/app_es.ts b/src/desktop/translations/app_es.ts
index 6cbf650..caa838e 100644
--- a/src/desktop/translations/app_es.ts
+++ b/src/desktop/translations/app_es.ts
@@ -3,6 +3,18 @@
<TS version="2.1" language="es" sourcelanguage="en_US">
<context>
<name>App</name>
+ <message>
+ <source>Visit Website</source>
+ <translation>Visitar sitio web</translation>
+ </message>
+ <message>
+ <source>Support Project</source>
+ <translation>Apoyar el proyecto</translation>
+ </message>
+ <message>
+ <source>Uses Qt under LGPLv3</source>
+ <translation>Utiliza Qt bajo LGPLv3</translation>
+ </message>
<message>
<location filename="../qml/components/MediaViewport.qml" line="711" />
<source>
@@ -989,11 +1001,6 @@ Se muestra un fotograma. Navega con &lt; &gt; o abre el archivo externamente.</t
<source>GPU support and installed models are checked before processing.</source>
<translation>La compatibilidad de la GPU y los modelos instalados se comprueban antes de procesar.</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="29" />
- <source>GitHub Repository</source>
- <translation>Repositorio de GitHub</translation>
- </message>
<message>
<source>Good</source>
<translation>Buena</translation>
@@ -2313,11 +2320,6 @@ Se muestra un fotograma. Navega con &lt; &gt; o abre el archivo externamente.</t
<source>Style %1</source>
<translation>Estilo %1</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="30" />
- <source>Support on Patreon</source>
- <translation>Apoyar en Patreon</translation>
- </message>
<message>
<source>Switched to %1 mode. %2</source>
<translation>Cambiado al modo %1. %2</translation>
@@ -2460,11 +2462,6 @@ Se muestra un fotograma. Navega con &lt; &gt; o abre el archivo externamente.</t
<source>Upscale Video(s)</source>
<translation>Escalar vídeos</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="35" />
- <source>Uses Qt under LGPLv3. See Third-Party Licenses.</source>
- <translation>Utiliza Qt bajo LGPLv3. Consulta las licencias de terceros.</translation>
- </message>
<message>
<location filename="../qml/components/SuperResolutionControls.qml" line="15" />
<location filename="../qml/views/UpscaleView.qml" line="173" />
diff --git a/src/desktop/translations/app_fr.qm b/src/desktop/translations/app_fr.qm
index 070ced2..24c7092 100644
Binary files a/src/desktop/translations/app_fr.qm and b/src/desktop/translations/app_fr.qm differ
diff --git a/src/desktop/translations/app_fr.ts b/src/desktop/translations/app_fr.ts
index 8d158d6..d1198b9 100644
--- a/src/desktop/translations/app_fr.ts
+++ b/src/desktop/translations/app_fr.ts
@@ -3,6 +3,18 @@
<TS version="2.1" language="fr" sourcelanguage="en_US">
<context>
<name>App</name>
+ <message>
+ <source>Visit Website</source>
+ <translation>Visiter le site web</translation>
+ </message>
+ <message>
+ <source>Support Project</source>
+ <translation>Soutenir le projet</translation>
+ </message>
+ <message>
+ <source>Uses Qt under LGPLv3</source>
+ <translation>Utilise Qt sous LGPLv3</translation>
+ </message>
<message>
<location filename="../qml/components/MediaViewport.qml" line="711" />
<source>
@@ -989,11 +1001,6 @@ Image fixe affichée. Parcourez avec &lt; &gt; ou ouvrez le fichier dans une app
<source>GPU support and installed models are checked before processing.</source>
<translation>La compatibilité du GPU et les modèles installés sont vérifiés avant le traitement.</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="29" />
- <source>GitHub Repository</source>
- <translation>Dépôt GitHub</translation>
- </message>
<message>
<source>Good</source>
<translation>Bonne</translation>
@@ -2313,11 +2320,6 @@ Image fixe affichée. Parcourez avec &lt; &gt; ou ouvrez le fichier dans une app
<source>Style %1</source>
<translation>Style %1</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="30" />
- <source>Support on Patreon</source>
- <translation>Soutenir sur Patreon</translation>
- </message>
<message>
<source>Switched to %1 mode. %2</source>
<translation>Passage au mode %1. %2</translation>
@@ -2460,11 +2462,6 @@ Image fixe affichée. Parcourez avec &lt; &gt; ou ouvrez le fichier dans une app
<source>Upscale Video(s)</source>
<translation>Agrandir les vidéos</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="35" />
- <source>Uses Qt under LGPLv3. See Third-Party Licenses.</source>
- <translation>Utilise Qt sous LGPLv3. Consultez les licences tierces.</translation>
- </message>
<message>
<location filename="../qml/components/SuperResolutionControls.qml" line="15" />
<location filename="../qml/views/UpscaleView.qml" line="173" />
diff --git a/src/desktop/translations/app_hi.qm b/src/desktop/translations/app_hi.qm
index ce77b2f..9731b0c 100644
Binary files a/src/desktop/translations/app_hi.qm and b/src/desktop/translations/app_hi.qm differ
diff --git a/src/desktop/translations/app_hi.ts b/src/desktop/translations/app_hi.ts
index 27ee6be..ce3530b 100644
--- a/src/desktop/translations/app_hi.ts
+++ b/src/desktop/translations/app_hi.ts
@@ -3,6 +3,18 @@
<TS version="2.1" language="hi" sourcelanguage="en_US">
<context>
<name>App</name>
+ <message>
+ <source>Visit Website</source>
+ <translation>वेबसाइट पर जाएँ</translation>
+ </message>
+ <message>
+ <source>Support Project</source>
+ <translation>परियोजना का समर्थन करें</translation>
+ </message>
+ <message>
+ <source>Uses Qt under LGPLv3</source>
+ <translation>LGPLv3 के अंतर्गत Qt का उपयोग करता है</translation>
+ </message>
<message>
<location filename="../qml/components/MediaViewport.qml" line="711" />
<source>
@@ -989,11 +1001,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>GPU support and installed models are checked before processing.</source>
<translation>प्रोसेसिंग से पहले GPU समर्थन और इंस्टॉल किए गए मॉडल की जाँच की जाती है।</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="29" />
- <source>GitHub Repository</source>
- <translation>GitHub रिपॉज़िटरी</translation>
- </message>
<message>
<source>Good</source>
<translation>अच्छा</translation>
@@ -2313,11 +2320,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>Style %1</source>
<translation>शैली %1</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="30" />
- <source>Support on Patreon</source>
- <translation>Patreon पर समर्थन करें</translation>
- </message>
<message>
<source>Switched to %1 mode. %2</source>
<translation>%1 मोड में बदला। %2</translation>
@@ -2460,11 +2462,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>Upscale Video(s)</source>
<translation>वीडियो अपस्केल करें</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="35" />
- <source>Uses Qt under LGPLv3. See Third-Party Licenses.</source>
- <translation>LGPLv3 के अंतर्गत Qt का उपयोग करता है। तृतीय-पक्ष लाइसेंस देखें।</translation>
- </message>
<message>
<location filename="../qml/components/SuperResolutionControls.qml" line="15" />
<location filename="../qml/views/UpscaleView.qml" line="173" />
diff --git a/src/desktop/translations/app_ja.qm b/src/desktop/translations/app_ja.qm
index a7d4b60..897b2cc 100644
Binary files a/src/desktop/translations/app_ja.qm and b/src/desktop/translations/app_ja.qm differ
diff --git a/src/desktop/translations/app_ja.ts b/src/desktop/translations/app_ja.ts
index 2720db0..eb17138 100644
--- a/src/desktop/translations/app_ja.ts
+++ b/src/desktop/translations/app_ja.ts
@@ -3,6 +3,18 @@
<TS version="2.1" language="ja" sourcelanguage="en_US">
<context>
<name>App</name>
+ <message>
+ <source>Visit Website</source>
+ <translation>ウェブサイトを見る</translation>
+ </message>
+ <message>
+ <source>Support Project</source>
+ <translation>プロジェクトを支援</translation>
+ </message>
+ <message>
+ <source>Uses Qt under LGPLv3</source>
+ <translation>LGPLv3 に基づき Qt を使用</translation>
+ </message>
<message>
<location filename="../qml/components/MediaViewport.qml" line="711" />
<source>
@@ -985,11 +997,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>GPU support and installed models are checked before processing.</source>
<translation>処理前にGPUの対応状況とインストール済みモデルを確認します。</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="29" />
- <source>GitHub Repository</source>
- <translation>GitHubリポジトリ</translation>
- </message>
<message>
<source>Good</source>
<translation>良好</translation>
@@ -2309,11 +2316,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>Style %1</source>
<translation>スタイル %1</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="30" />
- <source>Support on Patreon</source>
- <translation>Patreonで支援</translation>
- </message>
<message>
<source>Switched to %1 mode. %2</source>
<translation>%1モードに切り替えました。%2</translation>
@@ -2456,11 +2458,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>Upscale Video(s)</source>
<translation>動画をアップスケール</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="35" />
- <source>Uses Qt under LGPLv3. See Third-Party Licenses.</source>
- <translation>LGPLv3に基づきQtを使用しています。サードパーティーライセンスを参照してください。</translation>
- </message>
<message>
<location filename="../qml/components/SuperResolutionControls.qml" line="15" />
<location filename="../qml/views/UpscaleView.qml" line="173" />
diff --git a/src/desktop/translations/app_ko.qm b/src/desktop/translations/app_ko.qm
index cfbd41e..36ac9c5 100644
Binary files a/src/desktop/translations/app_ko.qm and b/src/desktop/translations/app_ko.qm differ
diff --git a/src/desktop/translations/app_ko.ts b/src/desktop/translations/app_ko.ts
index b1864ab..f1a55d6 100644
--- a/src/desktop/translations/app_ko.ts
+++ b/src/desktop/translations/app_ko.ts
@@ -3,6 +3,18 @@
<TS version="2.1" language="ko" sourcelanguage="en_US">
<context>
<name>App</name>
+ <message>
+ <source>Visit Website</source>
+ <translation>웹사이트 방문</translation>
+ </message>
+ <message>
+ <source>Support Project</source>
+ <translation>프로젝트 후원</translation>
+ </message>
+ <message>
+ <source>Uses Qt under LGPLv3</source>
+ <translation>LGPLv3에 따라 Qt 사용</translation>
+ </message>
<message>
<location filename="../qml/components/MediaViewport.qml" line="711" />
<source>
@@ -985,11 +997,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>GPU support and installed models are checked before processing.</source>
<translation>처리 전에 GPU 지원 여부와 설치된 모델을 확인합니다.</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="29" />
- <source>GitHub Repository</source>
- <translation>GitHub 저장소</translation>
- </message>
<message>
<source>Good</source>
<translation>좋음</translation>
@@ -2309,11 +2316,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>Style %1</source>
<translation>스타일 %1</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="30" />
- <source>Support on Patreon</source>
- <translation>Patreon에서 후원</translation>
- </message>
<message>
<source>Switched to %1 mode. %2</source>
<translation>%1 모드로 전환했습니다. %2</translation>
@@ -2456,11 +2458,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>Upscale Video(s)</source>
<translation>동영상 업스케일</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="35" />
- <source>Uses Qt under LGPLv3. See Third-Party Licenses.</source>
- <translation>LGPLv3에 따라 Qt를 사용합니다. 타사 라이선스를 확인하세요.</translation>
- </message>
<message>
<location filename="../qml/components/SuperResolutionControls.qml" line="15" />
<location filename="../qml/views/UpscaleView.qml" line="173" />
diff --git a/src/desktop/translations/app_pl.qm b/src/desktop/translations/app_pl.qm
index 4b7f3af..4a5a867 100644
Binary files a/src/desktop/translations/app_pl.qm and b/src/desktop/translations/app_pl.qm differ
diff --git a/src/desktop/translations/app_pl.ts b/src/desktop/translations/app_pl.ts
index b319bd2..7f52b19 100644
--- a/src/desktop/translations/app_pl.ts
+++ b/src/desktop/translations/app_pl.ts
@@ -3,6 +3,18 @@
<TS version="2.1" language="pl" sourcelanguage="en_US">
<context>
<name>App</name>
+ <message>
+ <source>Visit Website</source>
+ <translation>Odwiedź stronę</translation>
+ </message>
+ <message>
+ <source>Support Project</source>
+ <translation>Wesprzyj projekt</translation>
+ </message>
+ <message>
+ <source>Uses Qt under LGPLv3</source>
+ <translation>Korzysta z Qt na licencji LGPLv3</translation>
+ </message>
<message>
<location filename="../qml/components/MediaViewport.qml" line="711" />
<source>
@@ -993,11 +1005,6 @@ Wyświetlono klatkę. Użyj &lt; &gt; lub otwórz plik zewnętrznie.</translatio
<source>GPU support and installed models are checked before processing.</source>
<translation>Obsługa GPU i zainstalowane modele są sprawdzane przed przetwarzaniem.</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="29" />
- <source>GitHub Repository</source>
- <translation>Repozytorium GitHub</translation>
- </message>
<message>
<source>Good</source>
<translation>Dobra</translation>
@@ -2317,11 +2324,6 @@ Wyświetlono klatkę. Użyj &lt; &gt; lub otwórz plik zewnętrznie.</translatio
<source>Style %1</source>
<translation>Styl %1</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="30" />
- <source>Support on Patreon</source>
- <translation>Wesprzyj na Patreon</translation>
- </message>
<message>
<source>Switched to %1 mode. %2</source>
<translation>Przełączono na tryb %1. %2</translation>
@@ -2464,11 +2466,6 @@ Wyświetlono klatkę. Użyj &lt; &gt; lub otwórz plik zewnętrznie.</translatio
<source>Upscale Video(s)</source>
<translation>Skaluj wideo</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="35" />
- <source>Uses Qt under LGPLv3. See Third-Party Licenses.</source>
- <translation>Korzysta z Qt na licencji LGPLv3. Zobacz licencje stron trzecich.</translation>
- </message>
<message>
<location filename="../qml/components/SuperResolutionControls.qml" line="15" />
<location filename="../qml/views/UpscaleView.qml" line="173" />
diff --git a/src/desktop/translations/app_uk.qm b/src/desktop/translations/app_uk.qm
index 5149ef4..0ccc18d 100644
Binary files a/src/desktop/translations/app_uk.qm and b/src/desktop/translations/app_uk.qm differ
diff --git a/src/desktop/translations/app_uk.ts b/src/desktop/translations/app_uk.ts
index 095d808..87d7cb5 100644
--- a/src/desktop/translations/app_uk.ts
+++ b/src/desktop/translations/app_uk.ts
@@ -3,6 +3,18 @@
<TS version="2.1" language="uk" sourcelanguage="en_US">
<context>
<name>App</name>
+ <message>
+ <source>Visit Website</source>
+ <translation>Відвідати сайт</translation>
+ </message>
+ <message>
+ <source>Support Project</source>
+ <translation>Підтримати проєкт</translation>
+ </message>
+ <message>
+ <source>Uses Qt under LGPLv3</source>
+ <translation>Використовує Qt за ліцензією LGPLv3</translation>
+ </message>
<message>
<location filename="../qml/components/MediaViewport.qml" line="711" />
<source>
@@ -993,11 +1005,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>GPU support and installed models are checked before processing.</source>
<translation>Підтримка GPU та встановлені моделі перевіряються перед обробкою.</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="29" />
- <source>GitHub Repository</source>
- <translation>Репозиторій GitHub</translation>
- </message>
<message>
<source>Good</source>
<translation>Добра</translation>
@@ -2317,11 +2324,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>Style %1</source>
<translation>Стиль %1</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="30" />
- <source>Support on Patreon</source>
- <translation>Підтримати на Patreon</translation>
- </message>
<message>
<source>Switched to %1 mode. %2</source>
<translation>Перемкнуто в режим %1. %2</translation>
@@ -2464,11 +2466,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>Upscale Video(s)</source>
<translation>Масштабувати відео</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="35" />
- <source>Uses Qt under LGPLv3. See Third-Party Licenses.</source>
- <translation>Використовує Qt за LGPLv3. Див. ліцензії сторонніх компонентів.</translation>
- </message>
<message>
<location filename="../qml/components/SuperResolutionControls.qml" line="15" />
<location filename="../qml/views/UpscaleView.qml" line="173" />
diff --git a/src/desktop/translations/app_zh_CN.qm b/src/desktop/translations/app_zh_CN.qm
index 09b1503..a7f53ff 100644
Binary files a/src/desktop/translations/app_zh_CN.qm and b/src/desktop/translations/app_zh_CN.qm differ
diff --git a/src/desktop/translations/app_zh_CN.ts b/src/desktop/translations/app_zh_CN.ts
index c1cb3ec..3b69afd 100644
--- a/src/desktop/translations/app_zh_CN.ts
+++ b/src/desktop/translations/app_zh_CN.ts
@@ -3,6 +3,18 @@
<TS version="2.1" language="zh_CN" sourcelanguage="en_US">
<context>
<name>App</name>
+ <message>
+ <source>Visit Website</source>
+ <translation>访问网站</translation>
+ </message>
+ <message>
+ <source>Support Project</source>
+ <translation>支持项目</translation>
+ </message>
+ <message>
+ <source>Uses Qt under LGPLv3</source>
+ <translation>依据 LGPLv3 使用 Qt</translation>
+ </message>
<message>
<location filename="../qml/components/MediaViewport.qml" line="711" />
<source>
@@ -985,11 +997,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>GPU support and installed models are checked before processing.</source>
<translation>处理前将检查 GPU 支持情况和已安装的模型。</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="29" />
- <source>GitHub Repository</source>
- <translation>GitHub 仓库</translation>
- </message>
<message>
<source>Good</source>
<translation>良好</translation>
@@ -2309,11 +2316,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>Style %1</source>
<translation>风格 %1</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="30" />
- <source>Support on Patreon</source>
- <translation>在 Patreon 上支持</translation>
- </message>
<message>
<source>Switched to %1 mode. %2</source>
<translation>已切换至 %1 模式。%2</translation>
@@ -2456,11 +2458,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>Upscale Video(s)</source>
<translation>放大视频</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="35" />
- <source>Uses Qt under LGPLv3. See Third-Party Licenses.</source>
- <translation>使用 LGPLv3 授权的 Qt。请参阅第三方许可证。</translation>
- </message>
<message>
<location filename="../qml/components/SuperResolutionControls.qml" line="15" />
<location filename="../qml/views/UpscaleView.qml" line="173" />
diff --git a/src/desktop/translations/app_zh_TW.qm b/src/desktop/translations/app_zh_TW.qm
index 0c5cc12..fe23ada 100644
Binary files a/src/desktop/translations/app_zh_TW.qm and b/src/desktop/translations/app_zh_TW.qm differ
diff --git a/src/desktop/translations/app_zh_TW.ts b/src/desktop/translations/app_zh_TW.ts
index bc28b3c..78fd45d 100644
--- a/src/desktop/translations/app_zh_TW.ts
+++ b/src/desktop/translations/app_zh_TW.ts
@@ -3,6 +3,18 @@
<TS version="2.1" language="zh_TW" sourcelanguage="en_US">
<context>
<name>App</name>
+ <message>
+ <source>Visit Website</source>
+ <translation>造訪網站</translation>
+ </message>
+ <message>
+ <source>Support Project</source>
+ <translation>支持專案</translation>
+ </message>
+ <message>
+ <source>Uses Qt under LGPLv3</source>
+ <translation>依據 LGPLv3 使用 Qt</translation>
+ </message>
<message>
<location filename="../qml/components/MediaViewport.qml" line="711" />
<source>
@@ -985,11 +997,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>GPU support and installed models are checked before processing.</source>
<translation>處理前會檢查 GPU 支援情況與已安裝的模型。</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="29" />
- <source>GitHub Repository</source>
- <translation>GitHub 儲存庫</translation>
- </message>
<message>
<source>Good</source>
<translation>良好</translation>
@@ -2309,11 +2316,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>Style %1</source>
<translation>風格 %1</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="30" />
- <source>Support on Patreon</source>
- <translation>在 Patreon 上支持</translation>
- </message>
<message>
<source>Switched to %1 mode. %2</source>
<translation>已切換至 %1 模式。%2</translation>
@@ -2456,11 +2458,6 @@ Poster frame shown. Scrub with &lt; &gt; or open the file externally.</source>
<source>Upscale Video(s)</source>
<translation>放大影片</translation>
</message>
- <message>
- <location filename="../qml/views/AboutView.qml" line="35" />
- <source>Uses Qt under LGPLv3. See Third-Party Licenses.</source>
- <translation>使用 LGPLv3 授權的 Qt。請參閱第三方授權條款。</translation>
- </message>
<message>
<location filename="../qml/components/SuperResolutionControls.qml" line="15" />
<location filename="../qml/views/UpscaleView.qml" line="173" />
diff --git a/src/infrastructure/process.cpp b/src/infrastructure/process.cpp
index 9a79f2f..ee76a22 100644
--- a/src/infrastructure/process.cpp
+++ b/src/infrastructure/process.cpp
@@ -7,12 +7,19 @@
namespace ve {
namespace {
-void start(QProcess& process, const QString& program, const QStringList& arguments) {
+void start(QProcess& process, const QString& program, const QStringList& arguments, void* outputHandle=nullptr) {
#ifdef Q_OS_WIN
- process.setCreateProcessArgumentsModifier([](QProcess::CreateProcessArguments* arguments) {
+ process.setCreateProcessArgumentsModifier([outputHandle](QProcess::CreateProcessArguments* arguments) {
arguments->flags |= 0x08000000; // CREATE_NO_WINDOW: child tools never flash a console.
arguments->startupInfo->dwFlags |= STARTF_FORCEOFFFEEDBACK;
+ if (outputHandle) {
+ arguments->startupInfo->dwFlags |= STARTF_USESTDHANDLES;
+ arguments->startupInfo->hStdOutput = outputHandle;
+ arguments->inheritHandles = true;
+ }
});
+#else
+ Q_UNUSED(outputHandle);
#endif
process.setProgram(program);
process.setArguments(arguments);
@@ -63,8 +70,39 @@ ProcessResult runProcess(const QString& program, const QStringList& arguments, J
result.exitCode = process.exitStatus() == QProcess::NormalExit ? process.exitCode() : -1;
return result;
}
-PipeProcess::PipeProcess(const QString& program, const QStringList& arguments) {
- start(process_, program, arguments);
+struct PipeProcess::OutputPipe {
+#ifdef Q_OS_WIN
+ HANDLE reader=nullptr,writer=nullptr;
+ OutputPipe() {
+ SECURITY_ATTRIBUTES security{sizeof(SECURITY_ATTRIBUTES),nullptr,TRUE};
+ if (!CreatePipe(&reader,&writer,&security,1024*1024))
+ throw std::runtime_error("Cannot create bounded decoder output pipe.");
+ if (!SetHandleInformation(reader,HANDLE_FLAG_INHERIT,0)) {
+ CloseHandle(reader);CloseHandle(writer);reader=writer=nullptr;
+ throw std::runtime_error("Cannot protect decoder pipe read handle.");
+ }
+ }
+ void closeWriter() { if (writer) {CloseHandle(writer);writer=nullptr;} }
+ ~OutputPipe() {closeWriter();if(reader)CloseHandle(reader);}
+#endif
+};
+PipeProcess::PipeProcess(const QString& program, const QStringList& arguments, OutputMode outputMode) {
+ void* outputHandle=nullptr;
+#ifdef Q_OS_WIN
+ if (outputMode==OutputMode::Backpressured) {
+ outputPipe_=std::make_unique<OutputPipe>();
+ outputHandle=outputPipe_->writer;
+ // Avoid creating QWindowsPipeReader for stdout; its native callbacks
+ // keep buffering even while the application decoder thread is paused.
+ process_.setProcessChannelMode(QProcess::ForwardedOutputChannel);
+ }
+#else
+ Q_UNUSED(outputMode);
+#endif
+ start(process_, program, arguments,outputHandle);
+#ifdef Q_OS_WIN
+ if(outputPipe_)outputPipe_->closeWriter(); // Only the child may keep stdout open.
+#endif
}
PipeProcess::~PipeProcess() {
if (process_.state() != QProcess::NotRunning) {
@@ -76,7 +114,7 @@ QByteArray PipeProcess::readSome(qsizetype maximum, JobControl& control) {
while (true) {
control.checkpoint();
drainErrors();
- auto data = process_.read(maximum);
+ auto data = readOutput(maximum);
if (!data.isEmpty())
return data;
if (process_.state() == QProcess::NotRunning) {
@@ -84,18 +122,43 @@ QByteArray PipeProcess::readSome(qsizetype maximum, JobControl& control) {
throw std::runtime_error(error_.toStdString());
return {};
}
- process_.waitForReadyRead(25);
+ if(outputPipe_)process_.waitForFinished(2);
+ else process_.waitForReadyRead(25);
}
}
QByteArray PipeProcess::readAvailable(qsizetype maximum, JobControl& control) {
control.checkpoint();
- process_.waitForReadyRead(0);
+ if(outputPipe_)process_.waitForFinished(0);
+ else process_.waitForReadyRead(0);
drainErrors();
- auto result=process_.read(maximum);
+ auto result=readOutput(maximum);
if (result.isEmpty() && process_.state()==QProcess::NotRunning && process_.exitCode()!=0)
throw std::runtime_error(error_.toStdString());
return result;
}
+QByteArray PipeProcess::readOutput(qsizetype maximum) {
+#ifdef Q_OS_WIN
+ if(outputPipe_) {
+ if(maximum<=0)return {};
+ DWORD available=0;
+ if(!PeekNamedPipe(outputPipe_->reader,nullptr,0,nullptr,&available,nullptr)) {
+ const auto code=GetLastError();
+ if(code==ERROR_BROKEN_PIPE)return {};
+ throw std::runtime_error("Cannot inspect decoder output pipe: Windows error "+std::to_string(code));
+ }
+ if(!available)return {};
+ const auto amount=DWORD(std::min<qsizetype>({maximum,qsizetype(available),1024*1024}));
+ QByteArray data(amount,Qt::Uninitialized);DWORD received=0;
+ if(!ReadFile(outputPipe_->reader,data.data(),amount,&received,nullptr)) {
+ const auto code=GetLastError();
+ if(code==ERROR_BROKEN_PIPE)return {};
+ throw std::runtime_error("Cannot read decoder output pipe: Windows error "+std::to_string(code));
+ }
+ data.resize(received);return data;
+ }
+#endif
+ return process_.read(maximum);
+}
void PipeProcess::drainErrors() {
error_ += process_.readAllStandardError();
if (error_.size() > 1024 * 1024)
@@ -105,16 +168,9 @@ QByteArray PipeProcess::read(qsizetype size, JobControl& control) {
QByteArray data;
data.reserve(size);
while (data.size() < size) {
- control.checkpoint();
- data += process_.read(size - data.size());
- drainErrors();
- if (data.size() == size)
- break;
- if (process_.state() == QProcess::NotRunning) {
- data += process_.read(size - data.size());
- break;
- }
- process_.waitForReadyRead(25);
+ const auto next=readSome(size-data.size(),control);
+ if(next.isEmpty())break;
+ data+=next;
}
if (!data.isEmpty() && data.size() != size)
throw std::runtime_error("Decoder returned an incomplete video frame.");
@@ -123,6 +179,7 @@ QByteArray PipeProcess::read(qsizetype size, JobControl& control) {
return data;
}
void PipeProcess::write(const char* data, qsizetype size, JobControl& control) {
+ if(outputPipe_)throw std::logic_error("A backpressured decoder pipe is read-only.");
qsizetype offset = 0;
while (offset < size) {
control.checkpoint();
diff --git a/src/infrastructure/process.hpp b/src/infrastructure/process.hpp
index 5a04330..f2799e9 100644
--- a/src/infrastructure/process.hpp
+++ b/src/infrastructure/process.hpp
@@ -17,7 +17,12 @@ struct ProcessResult {
const QByteArray& input = {}, const std::function<void(const QByteArray&)>& outputReady = {});
class PipeProcess {
public:
- PipeProcess(const QString& program, const QStringList& arguments);
+ // Read-only producers must stop when the consumer stops. Windows QProcess
+ // otherwise drains stdout into an unlimited asynchronous memory buffer.
+ // Bidirectional filters retain buffered output so writes cannot deadlock.
+ enum class OutputMode { Buffered, Backpressured };
+ PipeProcess(const QString& program, const QStringList& arguments,
+ OutputMode outputMode = OutputMode::Buffered);
~PipeProcess();
PipeProcess(const PipeProcess&) = delete;
PipeProcess& operator=(const PipeProcess&) = delete;
@@ -30,8 +35,11 @@ class PipeProcess {
[[nodiscard]] QString error();
private:
+ struct OutputPipe;
+ std::unique_ptr<OutputPipe> outputPipe_;
QProcess process_;
QByteArray error_;
+ QByteArray readOutput(qsizetype maximum);
void drainErrors();
};
} // namespace ve
diff --git a/src/media/cuda_video.cpp b/src/media/cuda_video.cpp
index 30c2dea..f081486 100644
--- a/src/media/cuda_video.cpp
+++ b/src/media/cuda_video.cpp
@@ -339,11 +339,10 @@ struct CudaVideoEncoder::Impl {
// Native RGB output uses the delivery matrix, independently of
// the source YUV matrix used while decoding.
codec->colorspace = info.hdr ? AVCOL_SPC_BT2020_NCL : AVCOL_SPC_BT709;
- codec->color_primaries = info.primaries == "bt2020" ? AVCOL_PRI_BT2020
- : info.primaries == "unknown" ? AVCOL_PRI_UNSPECIFIED : AVCOL_PRI_BT709;
- codec->color_trc = info.transfer == "gamma22" || info.transfer == "bt470m" ? AVCOL_TRC_GAMMA22 : info.transfer == "smpte2084" ? AVCOL_TRC_SMPTE2084
- : info.transfer == "arib-std-b67" ? AVCOL_TRC_ARIB_STD_B67
- : info.transfer == "unknown" ? AVCOL_TRC_UNSPECIFIED : AVCOL_TRC_BT709;
+ const auto primaries=api.av_color_primaries_from_name(info.primaries.toUtf8().constData());
+ const auto transfer=api.av_color_transfer_from_name(info.transfer.toUtf8().constData());
+ codec->color_primaries=primaries<0 ? info.hdr ? AVCOL_PRI_BT2020 : AVCOL_PRI_UNSPECIFIED : AVColorPrimaries(primaries);
+ codec->color_trc=transfer<0 ? info.hdr ? AVCOL_TRC_SMPTE2084 : AVCOL_TRC_UNSPECIFIED : AVColorTransferCharacteristic(transfer);
const bool ten = name != "h264_nvenc" && (info.hdr || settings.hdr_mode ||
info.pixelFormat.contains("10") || info.pixelFormat.contains("12") || info.pixelFormat.contains("16") ||
info.pixelFormat.contains("64"));
diff --git a/src/media/video_delivery.cpp b/src/media/video_delivery.cpp
index 41d48a6..c2bc58f 100644
--- a/src/media/video_delivery.cpp
+++ b/src/media/video_delivery.cpp
@@ -61,9 +61,9 @@ void muxDelivery(const QString& video, const QString& destination, const RenderR
mux << "-colorspace" << "0" << "-color_range" << "pc";
const auto stages=settings.stages(true);
const bool convertedHdr=stages.contains("rtx_video_hdr");
- const bool rtxSdr=stages.contains("super_resolution")||(hasVfxStages(stages)&&!source.hdr);
+ const bool rtxSdr=stages.contains("super_resolution")&&!hasVfxStages(stages);
const auto primaries=convertedHdr ? QString("bt2020") : rtxSdr ? QString("bt709") : source.primaries;
- const auto transfer=convertedHdr ? QString("smpte2084") : hasVfxStages(stages)&&!source.hdr ? QString("bt470m") : rtxSdr ? QString("bt709") : source.transfer;
+ const auto transfer=convertedHdr ? QString("smpte2084") : rtxSdr ? QString("bt709") : source.transfer;
if (!primaries.isEmpty() && primaries!="unknown") mux << "-color_primaries" << primaries;
if (!transfer.isEmpty() && transfer!="unknown") mux << "-color_trc" << transfer;
}
diff --git a/src/presentation/preview_player.cpp b/src/presentation/preview_player.cpp
index 51ec94f..77882e6 100644
--- a/src/presentation/preview_player.cpp
+++ b/src/presentation/preview_player.cpp
@@ -247,7 +247,7 @@ void PreviewPlayer::decode(std::stop_token stop) {
"1",
"-pix_fmt",
"p010le",
- "pipe:1"});
+ "pipe:1"},PipeProcess::OutputMode::Backpressured);
FramePacketReader packets(decoder, *control, RawPixelFormat::P010);
while (!stop.stop_requested()) {
control->checkpoint();
diff --git a/src/processing/effects.cpp b/src/processing/effects.cpp
index 7bc9393..b5da606 100644
--- a/src/processing/effects.cpp
+++ b/src/processing/effects.cpp
@@ -618,7 +618,7 @@ VideoFilterStage::VideoFilterStage(QStringList stages, const MediaInfo& colors,
args << "-i" << source << "-map" << "0:v:0" << "-an" << "-vf" << filter << "-fps_mode" << "passthrough"
<< "-enc_time_base:v" << "demux" << "-c:v" << "rawvideo" << "-threads:v" << "1" << "-pix_fmt" << "gbrp10le"
<< "-f" << "nut" << "-write_index" << "0" << "-flush_packets" << "1" << "pipe:1";
- state.process = std::make_unique<PipeProcess>(Paths::instance().ffmpeg(), args);
+ state.process = std::make_unique<PipeProcess>(Paths::instance().ffmpeg(), args,PipeProcess::OutputMode::Backpressured);
state.reader = std::make_unique<FramePacketReader>(*state.process, control, RawPixelFormat::Gbrp10);
}
VideoFilterStage::~VideoFilterStage() = default;
diff --git a/src/processing/frame_stream.cpp b/src/processing/frame_stream.cpp
index 805892b..c6daa0d 100644
--- a/src/processing/frame_stream.cpp
+++ b/src/processing/frame_stream.cpp
@@ -51,7 +51,8 @@ struct Stage {
auto frame = normalizer ? normalizer->read() : source();
if (!frame)
return {};
- if (QStringList{"super_resolution", "rtx_video_hdr"}.contains(name) && !normalizer) {
+ const bool sharedVsr=name=="super_resolution"&&hasVfxStages(settings.stages(true));
+ if ((name=="rtx_video_hdr" || name=="super_resolution"&&!sharedVsr) && !normalizer) {
info.width = frame->image.width();
info.height = frame->image.height();
info.pixelFormat = rgb10Input ? "gbrp10le" : frame->image.depth() > 32 ? "rgba64le" : "rgba";
@@ -125,7 +126,6 @@ FrameStreamPipeline::FrameStreamPipeline(Settings settings, MediaInfo info, cons
};
}
auto size=vfxSpatialSize({info.width,info.height},selected);info.width=size.width();info.height=size.height();info.fps=vfxFrameRate(info.fps,selected);
- if(!info.hdr){info.primaries="bt709";info.transfer="bt470m";}
info.pixelFormat=info.hdr||info.precisionBits()>8?"gbrp10le":"rgba";info.colorSpace="gbr";info.range="pc";
continue;
}
@@ -148,9 +148,9 @@ FrameStreamPipeline::FrameStreamPipeline(Settings settings, MediaInfo info, cons
info.primaries = "bt2020";
info.transfer = "smpte2084";
}
- if (name == "super_resolution") {
+ if (name == "super_resolution" && !hasVfxStages(stages)) {
info.primaries = "bt709";
- info.transfer = hasVfxStages(stages) ? "bt470m" : "bt709";
+ info.transfer = "bt709";
}
if (QStringList{"scale_method", "coloring", "cas_sharpening", "grain", "super_resolution",
"rtx_video_hdr"}
diff --git a/src/processing/interpolation_video.cpp b/src/processing/interpolation_video.cpp
index 2e56647..0df3248 100644
--- a/src/processing/interpolation_video.cpp
+++ b/src/processing/interpolation_video.cpp
@@ -57,7 +57,7 @@ class InterpolationDelivery {
auto after=estimate.stages.mid(1);
output_=pixels_;
output_.width=estimate.width; output_.height=estimate.height; output_.hdr=estimate.hdr;
- if(hasVfxStages(after)){retainVfxPixelAspect(output_,pixels_);if(!output_.hdr){output_.primaries="bt709";output_.transfer="bt470m";}}
+ if(hasVfxStages(after))retainVfxPixelAspect(output_,pixels_);
if (after.contains("rtx_video_hdr")) { output_.primaries="bt2020"; output_.transfer="smpte2084"; output_.sourceBitDepth=10; }
if (cudaEncoding_ && !settings_.codec.contains("NVIDIA NVENC")) settings_.codec+=" (NVIDIA NVENC)";
neuralDelivery_=cudaEncoding_ && !after.isEmpty() && after.back()=="neural_model";
diff --git a/src/processing/pipeline.cpp b/src/processing/pipeline.cpp
index de9aeac..6668e25 100644
--- a/src/processing/pipeline.cpp
+++ b/src/processing/pipeline.cpp
@@ -684,7 +684,8 @@ std::vector<QImage> FramePipeline::processBatch(std::span<const QImage> input, J
remember();
continue;
}
- if (workingInfo.video && !state.rtxInputNormalized && (stage=="super_resolution" || stage=="rtx_video_hdr")) {
+ const bool sharedVsr=stage=="super_resolution"&&hasVfxStages(s.stages(true));
+ if (workingInfo.video && !state.rtxInputNormalized && (stage=="rtx_video_hdr" || stage=="super_resolution"&&!sharedVsr)) {
auto& normalizer=state.filters[size_t(index)];
if (!normalizer) {
auto colors=workingInfo;
@@ -755,7 +756,7 @@ std::vector<QImage> FramePipeline::processBatch(std::span<const QImage> input, J
shared.vfx_vsr_mode=s.upscale_vsr_quality;shared.vfx_vsr_strength=1;
const auto output=rtxOutputSize(image.size(),s,true);
shared.vfx_size_mode="Custom dimensions";shared.vfx_width=output.width();shared.vfx_height=output.height();shared.vfx_aspect_lock=false;
- auto colors=workingInfo;colors.width=image.width();colors.height=image.height();colors.hdr=false;colors.transfer="bt470m";colors.primaries="bt709";
+ auto colors=workingInfo;colors.width=image.width();colors.height=image.height();colors.hdr=false;
auto& effect=state.vfx[size_t(index)];if(!effect)effect=std::make_unique<VideoEffects>(shared,colors,control);
auto pixels=image.convertToFormat(image.depth()>32?QImage::Format_RGBA64:QImage::Format_RGBA8888);
image=effect->process(vfxDescriptor(pixels,colors),resetFrame).toHost(true);workingInfo=effect->outputInfo();
@@ -988,7 +989,7 @@ RenderResult Pipeline::render(const RenderRequest& request, JobControl& control,
decodeArgs << "-map" << "0:v:0" << "-an" << "-fps_mode" << "passthrough" << "-enc_time_base:v" << "demux"
<< "-c:v" << "rawvideo" << "-pix_fmt" << (sourceWide ? "rgba64le" : "rgba") << "-f" << "nut" << "-write_index" << "0"
<< "-flush_packets" << "1" << "pipe:1";
- decoder = std::make_unique<PipeProcess>(Paths::instance().ffmpeg(), decodeArgs);
+ decoder = std::make_unique<PipeProcess>(Paths::instance().ffmpeg(), decodeArgs,PipeProcess::OutputMode::Backpressured);
reader = std::make_unique<FramePacketReader>(*decoder, control, sourceWide ? RawPixelFormat::Rgba64 : RawPixelFormat::Rgba8);
}
const auto readSource = [&]() -> std::optional<TimedImage> {
@@ -1025,14 +1026,14 @@ RenderResult Pipeline::render(const RenderRequest& request, JobControl& control,
? fallback
: value;
};
- const bool vfxSdr=hasVfxStages(estimate.stages)&&!input.hdr;
+ const bool rtxSdr=estimate.stages.contains("super_resolution")&&!hasVfxStages(estimate.stages);
const auto primaries = estimate.stages.contains("rtx_video_hdr")
? QString("bt2020")
- : estimate.stages.contains("super_resolution")||vfxSdr ? QString("bt709")
+ : rtxSdr ? QString("bt709")
: known(input.primaries, estimate.hdr ? "bt2020" : "unknown");
const auto transfer = estimate.stages.contains("rtx_video_hdr")
? QString("smpte2084")
- : vfxSdr ? QString("bt470m") : estimate.stages.contains("super_resolution") ? QString("bt709")
+ : rtxSdr ? QString("bt709")
: known(input.transfer, estimate.hdr ? "smpte2084" : "unknown");
ScratchDirectory encodedTemporary(QStringLiteral("host-delivery-XXXXXX"));
if (!encodedTemporary.isValid()) throw std::runtime_error("Cannot create the host delivery directory.");
diff --git a/src/processing/preview_cache.hpp b/src/processing/preview_cache.hpp
index 6dcca41..74df2ee 100644
--- a/src/processing/preview_cache.hpp
+++ b/src/processing/preview_cache.hpp
@@ -147,6 +147,7 @@ inline QList<QByteArray> previewStageKeys(QByteArray identity, const Settings& s
if(stage=="dlss_ray_reconstruction")identity+="/rr-native-1x-abi2/rr-guides-v2/fixed-still-video/scene-v2/full-fingerprint/streamed-parked-32-v3/single-still/";
for (const auto& field : fields.value(stage)) relevant.insert(field,settings.value(field));
if(isVfxStage(stage)||(hasVfxStages(settings.stages(true))&&QStringList{"super_resolution","rtx_video_hdr"}.contains(stage))){
+ identity+="/vfx-source-colors-v2/";
identity+=info.metadata.value("sample_aspect_ratio").toString().toUtf8();
identity+=QByteArray::number(info.clockwiseRotation());
const auto values=settings.values();for(auto it=values.begin();it!=values.end();++it)if(it.key().startsWith("vfx_"))relevant.insert(it.key(),it.value());
diff --git a/src/processing/vfx_native.cpp b/src/processing/vfx_native.cpp
index d8ae84e..7b09be7 100644
--- a/src/processing/vfx_native.cpp
+++ b/src/processing/vfx_native.cpp
@@ -166,9 +166,13 @@ struct VideoEffects::State {
auto storage=std::make_shared<VfxSurface::Storage>();storage->metrics=metrics;Error error{};storage->handle=Api::get().vfx_surface_createFn(size.width(),size.height(),format,error.data(),int(error.size()));check(storage->handle!=nullptr,error);storage->desc=descriptor<VfxFrameDescV2>();check(Api::get().vfx_surface_frame_descFn(storage->handle,&storage->desc),error);buffers.push_back(storage);return VfxSurface(std::move(storage));
}
void account(const VfxFrameResultV2& r){metrics->account(r);}
- VfxSurface converted(const VfxFrameDescV2& source,QSize size,unsigned format,bool normalize=false){
- control.checkpoint();auto out=acquire(size,format);auto dst=out.descriptor();dst.reserved[1]=normalize?1u:0u;auto result=descriptor<VfxFrameResultV2>();convert(source,dst,&result);account(result);
- out.storage_->desc.color_primaries=normalize?1u:source.color_primaries;out.storage_->desc.color_transfer=normalize?2u:source.color_transfer;return out;
+ VfxSurface converted(const VfxFrameDescV2& source,QSize size,unsigned format){
+ control.checkpoint();auto out=acquire(size,format);auto& dst=out.storage_->desc;
+ // VFX consumes encoded RGB. Preserve the source gamut and transfer;
+ // converting BT.709 to gamma 2.2 here darkened even retained FG frames.
+ dst.color_matrix=source.color_matrix;dst.color_range=1;
+ dst.color_primaries=source.color_primaries;dst.color_transfer=source.color_transfer;
+ dst.reserved[1]=0;auto result=descriptor<VfxFrameResultV2>();convert(source,dst,&result);account(result);return out;
}
Effect& ensure(unsigned type,QSize in,QSize out,unsigned format){auto& p=effects[type];if(!p)p=std::make_unique<Effect>(effectDescriptor(type,in,out,format,settings));return *p;}
VfxSurface run(unsigned type,const VfxSurface& src,QSize out,bool reset=false,const VfxSurface& previous={},float timestep=.5f,bool cut=false){
@@ -177,12 +181,12 @@ struct VideoEffects::State {
auto prev=previous?previous.descriptor():VfxFrameDescV2{};
auto params=descriptor<VfxRunParamsV2>();params.reset=reset;params.shot_change=cut;params.timestep=timestep;auto result=descriptor<VfxFrameResultV2>();Error error{};
check(Api::get().vfx_process_frame_v2Fn(effect.handle,&input,previous?&prev:nullptr,&dst,&params,&result,error.data(),int(error.size())),error);account(result);
+ output.storage_->desc.color_matrix=input.color_matrix;output.storage_->desc.color_range=1;
output.storage_->desc.color_primaries=input.color_primaries;output.storage_->desc.color_transfer=input.color_transfer;return output;
}
};
VideoEffects::VideoEffects(Settings settings,MediaInfo input,JobControl& control):state_(std::make_unique<State>(std::move(settings),std::move(input),control)){
const auto& s=state_->settings;initialize(gpuOrdinal(s.ai_gpu_uuid));auto size=vfxSpatialSize({state_->input.width,state_->input.height},s);state_->spatialColors.width=size.width();state_->spatialColors.height=size.height();
- if(!state_->input.hdr){state_->spatialColors.primaries="bt709";state_->spatialColors.transfer="bt470m";}
state_->outputColors=state_->spatialColors;state_->outputColors.fps=vfxFrameRate(state_->input.fps,s);
if(s.vfx_frame_generation_enabled)state_->outputColors.variableFrameRate=false;
if(state_->input.hdr&&s.vfx_upscale_enabled)throw std::runtime_error("Selected VFX effects require SDR at this position.");
@@ -192,7 +196,7 @@ VfxSurface VideoEffects::spatial(const VfxFrameDescV2& input,bool reset){
auto& s=*state_;s.control.checkpoint();const auto& settings=s.settings;QSize inSize(s.input.width,s.input.height);
bool eight=settings.vfx_upscale_enabled;
auto format=(!eight&&(s.input.hdr||s.input.precisionBits()>8))?VFX_RGB10A2:VFX_RGBA8;
- auto current=s.converted(input,inSize,format,!s.input.hdr);
+ auto current=s.converted(input,inSize,format);
if(settings.vfx_vsr_enabled){QSize output=restores(settings)?inSize:vfxSpatialSize(inSize,settings);current=s.run(VFX_VSR,current,output,reset);}
if(settings.vfx_upscale_enabled)current=s.run(VFX_UPSCALE,current,vfxSpatialSize(inSize,settings),reset);
++s.metrics->frames;return current;
diff --git a/src/processing/vfx_video.cpp b/src/processing/vfx_video.cpp
index 6b83e70..61da647 100644
--- a/src/processing/vfx_video.cpp
+++ b/src/processing/vfx_video.cpp
@@ -113,7 +113,7 @@ bool renderVfxVideo(const RenderRequest& request,const MediaInfo& input,const Se
if(settings.vfx_frame_generation_enabled)outputInfo.variableFrameRate=false;
if(estimate.stages.contains("rtx_video_hdr")){
outputInfo.primaries="bt2020";outputInfo.transfer="smpte2084";outputInfo.sourceBitDepth=10;
- }else if(!input.hdr){outputInfo.primaries="bt709";outputInfo.transfer="bt470m";}
+ }
outputInfo.colorSpace=outputInfo.hdr?"bt2020nc":"bt709";outputInfo.range="tv";
if(request.preview){settings.codec="FFV1 Lossless RGB 10-bit";settings.container="MKV";}
ScratchDirectory directory(QStringLiteral("vfx-XXXXXX"));if(!directory.isValid())throw std::runtime_error("Cannot create VFX delivery directory.");
@@ -136,7 +136,6 @@ bool renderVfxVideo(const RenderRequest& request,const MediaInfo& input,const Se
auto clock=std::make_shared<VfxClock>(selected,stageColors,std::move(source),control);clocks.push_back(clock);
source=[clock]()->std::optional<SourceFrame>{auto frame=clock->read();if(!frame)return {};return SourceFrame{{},{},clock->outputInfo(),std::move(frame->pixels),frame->pts,frame->span,frame->base};};
const auto size=vfxSpatialSize({stageColors.width,stageColors.height},selected);stageColors.width=size.width();stageColors.height=size.height();stageColors.fps=vfxFrameRate(stageColors.fps,selected);
- if(!stageColors.hdr){stageColors.primaries="bt709";stageColors.transfer="bt470m";}
}
const auto clock=clocks.back();
const auto base=settings.vfx_frame_generation_enabled?clock->outputBase():decoder->timeBase();std::unique_ptr<CudaVideoEncoder> gpuEncoder;std::unique_ptr<CudaFramePool> pool;std::unique_ptr<HostVideoEncoder> hostEncoder;
diff --git a/src/processing/video_still_preview.cpp b/src/processing/video_still_preview.cpp
index 9337279..de3d635 100644
--- a/src/processing/video_still_preview.cpp
+++ b/src/processing/video_still_preview.cpp
@@ -166,13 +166,10 @@ QImage VideoStillPreview::process(const QImage &input, Settings settings, MediaI
info.pixelFormat = "gbrp10le";
else if (info.pixelFormat == "gbrp10le" && !stages.isEmpty())
info.pixelFormat = "rgba64le";
- if (stages.contains("super_resolution")) {
+ if (stages.contains("super_resolution") && !hasVfxStages(stages)) {
info.primaries = "bt709";
info.transfer = "bt709";
}
- if(hasVfxStages(stages)){
- if(!info.hdr){info.primaries="bt709";info.transfer="bt470m";}
- }
if(stages.contains("rtx_video_hdr")){info.hdr=true;info.primaries="bt2020";info.transfer="smpte2084";}
info.width = output->image.width();
info.height = output->image.height();