Skip to content

Bring PS5 GTA6 to 120FPS with DLSS 5. An advanced Windows video player and capture enhancement tool featuring real-time preview for videos, images, and capture card sources. Combine AI-powered Super Resolution, DLSS5 image enhancement, and Frame Generation to deliver a next-generation visual experience.

C++

2.0.0 hotfix: stabiliser freeze, capture audio resume, load gauge, colour effects, capture-crash hints, taskbar minimise, Xbox SDP reason

Veyra Goal Agentf7c2384a39af
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c76734fd..b0e0823b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -272,6 +272,10 @@ endif()
veyra_add_compute_shader(veyra_shader_yuv_to_rgb YuvToLinearRgb)
veyra_add_compute_shader(veyra_shader_rgb_to_linear RgbToLinear)
veyra_add_compute_shader(veyra_shader_color_grade ColorGradePass)
+# 纹理 / 清晰度 / 去朦胧: block statistics, blur, apply (ColorDetailPass).
+veyra_add_compute_shader(veyra_shader_color_detail_reduce ColorDetailReduce)
+veyra_add_compute_shader(veyra_shader_color_detail_blur ColorDetailBlur)
+veyra_add_compute_shader(veyra_shader_color_detail_apply ColorDetailApply)
veyra_add_compute_shader(veyra_shader_yuy2_to_linear Yuy2ToLinear)
veyra_add_compute_shader(veyra_shader_packed_capture PackedCaptureToLinear)
add_dependencies(veyra_shader_rgb_to_linear veyra_shader_yuy2_to_linear)
@@ -354,6 +358,7 @@ add_library(veyra_pipeline STATIC
src/pipeline/ResetCoordinator.cpp
src/pipeline/ColorGradeTables.cpp
src/pipeline/ColorGradeInstance.cpp
+ src/pipeline/ColorDetailPass.cpp
src/pipeline/NrInstance.cpp
)
veyra_apply_warnings(veyra_pipeline)
@@ -365,7 +370,7 @@ target_compile_definitions(veyra_pipeline PUBLIC
VEYRA_SHADER_DIR="${CMAKE_BINARY_DIR}/shaders")
target_include_directories(veyra_pipeline PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_link_libraries(veyra_pipeline PUBLIC veyra_base veyra_gfx d3d12 dxgi dxguid d3dcompiler)
-add_dependencies(veyra_pipeline veyra_shader_color_grade)
+add_dependencies(veyra_pipeline veyra_shader_color_grade veyra_shader_color_detail_reduce veyra_shader_color_detail_blur veyra_shader_color_detail_apply)
add_executable(veyra_pipeline_tests
tests/unit/PipelineContractTests.cpp
diff --git a/README.md b/README.md
index e342eecc..b2f7c63e 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,12 @@
<p align="center"><img src="assets/veyra-app-icon.png" alt="Veyra" width="160"></p>
+<p align="center">
+ <a href="https://github.com/Likely7/Veyra-NRVideo/blob/main/assets/veyra-2.0.0-promo.mp4">
+ <img src="assets/veyra-2.0.0-promo.webp" alt="Veyra 2.0 宣传动画(点击播放视频)" width="960">
+ </a>
+</p>
+
简体中文 | [English](README_EN.md)
<p align="center"><img src="docs/images/2.0.0/professional-mode.png" alt="Veyra 2.0.0 专业模式" width="1200"></p>
diff --git a/README_EN.md b/README_EN.md
index f212e76b..98351399 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -2,6 +2,12 @@
<p align="center"><img src="assets/veyra-app-icon.png" alt="Veyra" width="160"></p>
+<p align="center">
+ <a href="https://github.com/Likely7/Veyra-NRVideo/blob/main/assets/veyra-2.0.0-promo.mp4">
+ <img src="assets/veyra-2.0.0-promo.webp" alt="Veyra 2.0 promo (click to play the video)" width="960">
+ </a>
+</p>
+
[简体中文](README.md) | English
<p align="center"><img src="docs/images/2.0.0/professional-mode.png" alt="Veyra 2.0.0 professional mode" width="1200"></p>
diff --git a/apps/veyra-qml/main.cpp b/apps/veyra-qml/main.cpp
index 8a6b4f24..03dc8479 100644
--- a/apps/veyra-qml/main.cpp
+++ b/apps/veyra-qml/main.cpp
@@ -51,6 +51,7 @@
#include "veyra/RuntimePaths.h"
#include "veyra/engine/EngineController.h"
#include "veyra/engine/ExportJobManager.h"
+#include "veyra/gfx/PresentationHooks.h"
#include "veyra/ui/QmlDataDirectory.h"
#include "veyra/ui/QmlPlayerBridge.h"
#include "veyra/ui/ThumbnailProvider.h"
@@ -360,6 +361,17 @@ LONG WINAPI crashFilter(EXCEPTION_POINTERS* info) {
} else {
veyra::log::error("crash", std::format("minidump open failed error={}", GetLastError()));
}
+ // What crashed and which known-risky injected components were loaded, for the next
+ // start to explain (QmlPlayerBridge reads and deletes it).
+ const std::wstring note = L"crash " + std::filesystem::path(moduleName).filename().wstring() + L"\n" +
+ veyra::gfx::riskyInjections() + L"\n";
+ HANDLE marker = CreateFileW((std::filesystem::path(g_crashDumpDirectory) / L"veyra-last-failure.txt").c_str(),
+ GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
+ if (marker != INVALID_HANDLE_VALUE) {
+ DWORD written = 0;
+ WriteFile(marker, note.data(), DWORD(note.size() * sizeof(wchar_t)), &written, nullptr);
+ CloseHandle(marker);
+ }
veyra::Logger::instance().flush();
return EXCEPTION_CONTINUE_SEARCH;
}
@@ -678,6 +690,21 @@ static int runApplication(int argc, char** argv, QString& restartProgram, QStrin
veyra::log::info("qml-window", std::format("taskbar fullscreen mark={} hr=0x{:X}", full, unsigned(marked)));
});
+ // Clicking the taskbar button minimises a window only when it has a minimise box;
+ // Qt's frameless window is a bare WS_POPUP, so the click did nothing (field report).
+ // The two bits add no frame or caption. Qt may rebuild the style on a fullscreen
+ // switch, so it is put back on every visibility change.
+ const auto allowTaskbarMinimise = [window] {
+ const HWND hwnd = reinterpret_cast<HWND>(window->winId());
+ const LONG_PTR style = GetWindowLongPtrW(hwnd, GWL_STYLE);
+ const LONG_PTR wanted = style | WS_MINIMIZEBOX | WS_SYSMENU;
+ if (wanted == style) return;
+ SetWindowLongPtrW(hwnd, GWL_STYLE, wanted);
+ veyra::log::info("qml-window", std::format("taskbar minimise enabled style=0x{:X}", static_cast<unsigned long long>(wanted)));
+ };
+ allowTaskbarMinimise();
+ QObject::connect(window, &QWindow::visibilityChanged, &app, [allowTaskbarMinimise](QWindow::Visibility) { allowTaskbarMinimise(); });
+
// Closing the window must run the engine's own teardown, not just end the loop.
// A test harness that hard-kills the process (Stop-Process -Force) loses every
// log line still in the file sink's 64 KB buffer - including the ones a test is
diff --git a/assets/veyra-2.0.0-promo.mp4 b/assets/veyra-2.0.0-promo.mp4
new file mode 100644
index 00000000..3b728980
Binary files /dev/null and b/assets/veyra-2.0.0-promo.mp4 differ
diff --git a/assets/veyra-2.0.0-promo.webp b/assets/veyra-2.0.0-promo.webp
new file mode 100644
index 00000000..4b9988f1
Binary files /dev/null and b/assets/veyra-2.0.0-promo.webp differ
diff --git a/docs/HOTFIX_2.0.0_2026-10-02.md b/docs/HOTFIX_2.0.0_2026-10-02.md
new file mode 100644
index 00000000..1f7d2739
--- /dev/null
+++ b/docs/HOTFIX_2.0.0_2026-10-02.md
@@ -0,0 +1,31 @@
+# 2.0.0 修复更新(2026-10-02 晚)
+
+用户要求修复以下反馈并替换 GitHub 上 2.0.0 的包(不发新版本号),同时把 5 秒宣传动画放到 README 顶部。
+
+## 修复
+
+| 反馈 | 原因 | 改动 | 验证 |
+|---|---|---|---|
+| 输出稳定器·抗闪烁开了再关,画面定住只有声音 | 关闭后管线重建,但 `EnhanceGraph::createComputePasses` 只在强度 > 0 时才重建稳定器,`shutdown` 也不释放它;旧的 `NrHoldPass` 留在新图里,每帧把它最后一张结果拷回 `residualRgba_`(还持有旧图已释放纹理的裸指针) | 总是调用 `createNrHoldPass()`(强度 0 时只做释放);`shutdown` 释放 | `scripts/ui-check/stabiliser-toggle.qml` 关闭后每秒截图:修前连续 0 差异(画面静止),修后每张都有变化;SR+NR、SR+NR+FG 两组 |
+| 首页"继续上次"采集卡没有声音,要去采集面板重选 | 继续上次(查询 kind 2)只恢复设备/格式/色彩,没有恢复音频输入和帧率,连接时 audio=-1(现场日志 1 次 audio=0 后每次 audio=-1) | 抽出 `restoreRememberedAudio`,面板和继续上次共用 | 本机无采集卡,**未实机验证** |
+| 性能球(负载)多层 NR 只算一层,已满载仍显示绿色 | 每层 NR 都写同一个 `GpuStage::Nr` 计时槽,只剩最后一层;总耗时 `enhancementProcessingMs` 只看这个槽。稳定器开启时还用第二对 `Residual` 时间戳覆盖了残差合成 | 总耗时并入 `NrLayer0..3` 各层区间(重叠只算一次);稳定器在残差区间内收尾 | `veyra_repair_contract_tests` 243/243(单层、重叠区间、缺测阶段等原有用例不变) |
+| 调色"效果"组的纹理/清晰度/去朦胧没效果 | 三个滑块只存值,着色器从未实现(注释写着留到 P2) | 新增 `ColorDetailPass`(`ColorDetailReduce/Blur/Apply.hlsl`):约 1/8 块统计 log 亮度与暗通道最小值 → 可分离高斯 → 全尺寸应用。纹理=细节环,清晰度=中间调局部对比,去朦胧=暗通道去雾(按像素自身暗通道封顶防光晕)/负值加雾。列表模式接在输入转换(融合调色)之后,节点调色接在 `ColorGradeInstance` 之后;全为 0 时不分配不调度,改值不重建 | `scripts/ui-check/colour-effects.qml` 暂停同一帧截图对比:清晰度 ± 使亮度标准差 26.7→29.7/24.9,纹理 + 27.3,去朦胧 + 层次加深无黑边,− 均匀雾 |
+| 选择采集后卡死(4070 SUPER,改 scRGB 后好了) | 开始出画面约 60 ms 后整个进程的 GPU 设备被移除(0x887A002B),Qt 界面设备一起丢失;进程内注入了 RTSS 与 NVIDIA 叠加层。日志里输出是 SDR,HDR 输出格式只在 HDR 输出时生效,代码上找不到 scRGB 起作用的依据 | 不能替用户关驱动/叠加层功能:失败提示点名注入组件并给出关闭位置;同时写 `veyra-last-failure.txt`,下次启动再提示一次 | 编译;提示路径**未实机触发** |
+| 点击开始采集后卡死(5080,logs.7z) | 两次 GPU 挂起(nvlddmkm 153)时进程里有 NVIDIA 呈现层(Smooth Motion);两次崩溃在 `nvppex.dll`(NVIDIA App 的 RTX HDR / Smooth Motion / 动态鲜艳度插件) | 同上;崩溃处理器记录崩溃模块和已注入组件,下次启动提示 | 同上 |
+| 点击任务栏图标不能最小化 | Qt 无边框窗口是裸 `WS_POPUP`,没有最小化框,任务栏点击不处理 | 主窗口加 `WS_MINIMIZEBOX | WS_SYSMENU`(不加边框/标题),每次可见性变化后补回 | 日志确认样式 `0x960A0000`;任务栏实际点击**需用户确认** |
+| Xbox 串流 SDP 交换失败 `type must be string, but is null` | `getExchange` 用 `json::value()` 读 `exchangeResponse` / `errorDetails.code`,服务器给 null 时直接抛异常,真实原因被吞 | 只读字符串字段;空应答时记录完整应答(不含凭据)并报"主机拒绝(原因)" | `veyra_xbox_tests` 72/72;真实失败原因要等用户下一份日志 |
+| 抗闪烁两个滑块 QML 报错 | `onMoved` 用了已弃用的参数注入 | 改为形式参数(顺带音量、音频延迟两处) | QML quick 29/29 |
+
+## 未处理 / 未验证
+
+- **闪烁(3070 Ti 笔记本,logs.rar)**:日志中没有对应"闪烁"的错误;两次崩溃在 NVIDIA 驱动 `nvwgf2umx.dll`(一次窗口缩放、一次关闭 XeSS 补帧交换链)。需要用户说明闪烁的样子(整屏黑闪/局部/只在补帧时)或录屏,暂不盲改。
+- 采集卡音频恢复、注入提示、任务栏最小化、Xbox 新日志都需要实机。
+- 清晰度/去朦胧的强度系数是本机按 1080p 画面调的,HDR 工作域仅按单位换算,未在 HDR 显示器上看过。
+- 多层 NR 的负载数值未在实机多层场景下截图核对(单测与编译通过)。
+
+## 构建与测试
+
+- 构建:`E:/项目/Veyra/tmp/main-merge-20261002/build.py`,日志 `E:/项目/Veyra/logs/main-merge-20261002/hotfix-build*.log`。
+- 测试产物:`E:/项目/Veyra/tests/hotfix-2.0.0-20261002/`(stab*/hold*/colour*/final-hold)。
+- 现场日志副本:`E:/项目/Veyra/tmp/hotfix-2.0.0-20261002/field/`。
+- `scripts/ui-check/ui-check.py`:日志尾部未写完的半行不再算已读(之前会丢截图指令)。
diff --git a/docs/WORKLOG.md b/docs/WORKLOG.md
index d7ba21f4..9d02039c 100644
--- a/docs/WORKLOG.md
+++ b/docs/WORKLOG.md
@@ -1,5 +1,12 @@
# Veyra 工作记录
+## 2026-10-02 晚 2.0.0 修复更新(替换 Release 包,不改版本号)
+
+- 用户授权修复并替换 GitHub 2.0.0 的包、README 顶部加 5 秒宣传动画。详情与验证见 docs/HOTFIX_2.0.0_2026-10-02.md。
+- 修复:抗闪烁关闭后画面定住(旧 NrHoldPass 残留);继续上次采集无声(音频选择未恢复);性能球多层 NR 只算一层;调色纹理/清晰度/去朦胧实现(ColorDetailPass);采集时 GPU 设备丢失/崩溃点名 NVIDIA App 插件与 RTSS 并在下次启动提示;任务栏点击最小化;Xbox SDP 应答 null 字段吞掉原因;ProPage 滑块参数注入报错。
+- 未处理:3070 Ti 笔记本"闪烁"日志无对应错误(驱动 nvwgf2umx 两次崩溃),等用户描述/录屏。采集音频、注入提示、任务栏、Xbox 均待实机。
+- 构建/测试/日志:E:/项目/Veyra/build|tests|logs/main-merge-20261002 与 tests/hotfix-2.0.0-20261002;现场日志 tmp/hotfix-2.0.0-20261002/field。
+
## 2026-10-02 GitHub 2.0.0 发布
用户授权提交/发布 2.0.0,重写双语 README 与操作教程、重点节点模式和新版架构;Release 中文后英文、先新功能后修复。新 Logo、专业模式截图、新群码入文档,赞助图及 220px 保留。新增依赖源码及 Qt 官方源码材料已归档核验,运行库不变;公开执行与证据路径见 RELEASE_2.0.0_PUBLIC_2026-10-02.md。实际发布回执保存在 releases/2.0.0-final-20261002/publish-receipt.json。旧阶段“不发布”限制被当前用户授权取代,硬件未验项不变。
diff --git a/i18n/catalog.json b/i18n/catalog.json
index 81faa139..693a0c49 100644
--- a/i18n/catalog.json
+++ b/i18n/catalog.json
@@ -1043,6 +1043,13 @@
"en": "NVIDIA driver-level AI frame interpolation; use it or the in-app frame generation, not both",
"ja": "NVIDIA ドライバーレベルの AI フレーム補間。アプリ内のフレーム生成とはどちらか一方を使います"
},
+ {
+ "zh": "OBS 游戏采集兼容",
+ "src": "qml/SettingsPage.qml",
+ "zh-TW": "OBS 遊戲擷取相容",
+ "en": "OBS Game Capture compatibility",
+ "ja": "OBS ゲームキャプチャ互換"
+ },
{
"zh": "PC 串流",
"src": "qml/CineBar.qml",
@@ -1624,6 +1631,13 @@
"en": "Last",
"ja": "前回"
},
+ {
+ "zh": "上次 Veyra 异常退出(崩溃在 %1)",
+ "src": "src/ui/QmlPlayerBridge.cpp",
+ "zh-TW": "上次 Veyra 異常結束(當機於 %1)",
+ "en": "Veyra closed unexpectedly last time (crash in %1)",
+ "ja": "前回 Veyra が異常終了しました(%1 でクラッシュ)"
+ },
{
"zh": "上次格式已不可用,请重新选择格式。",
"src": "src/ui/QmlPlayerBridge.cpp",
@@ -1645,6 +1659,13 @@
"en": "The last capture format is not available; choose again in the capture card panel",
"ja": "前回のキャプチャーフォーマットは使用できません。キャプチャーカードのパネルで選び直してください"
},
+ {
+ "zh": "上次采集时显卡设备丢失",
+ "src": "src/ui/QmlPlayerBridge.cpp",
+ "zh-TW": "上次擷取時顯示卡裝置遺失",
+ "en": "The GPU device was lost during the last capture",
+ "ja": "前回のキャプチャ中に GPU デバイスが失われました"
+ },
{
"zh": "上次采集设备未连接。插回后刷新,或手动选择其他设备。",
"src": "src/ui/QmlPlayerBridge.cpp",
@@ -2226,6 +2247,13 @@
"en": "View only",
"ja": "視聴のみ"
},
+ {
+ "zh": "仅采集视频;界面软件绘制,部分阴影与模糊简化",
+ "src": "qml/SettingsPage.qml",
+ "zh-TW": "僅擷取影片;介面以軟體繪製,部分陰影與模糊簡化",
+ "en": "Captures video only; software UI with simpler shadows and blur",
+ "ja": "映像のみキャプチャ。UI はソフトウェア描画になり、一部の影・ぼかしを簡略化"
+ },
{
"zh": "今天看点什么?",
"src": "qml/HomePage.qml",
@@ -3606,6 +3634,13 @@
"en": "Back / forward 5 seconds",
"ja": "5 秒戻る / 進む"
},
+ {
+ "zh": "否",
+ "src": "qml/SettingsPage.qml",
+ "zh-TW": "否",
+ "en": "No",
+ "ja": "いいえ"
+ },
{
"zh": "启动窗口大小",
"src": "qml/SettingsPage.qml",
@@ -6939,6 +6974,13 @@
"en": "Lightness change",
"ja": "明度の変化"
},
+ {
+ "zh": "是",
+ "src": "qml/SettingsPage.qml",
+ "zh-TW": "是",
+ "en": "Yes",
+ "ja": "はい"
+ },
{
"zh": "显卡、驱动或运行库不支持所选功能",
"src": "include/veyra/engine/BackendRecovery.h",
@@ -7597,6 +7639,20 @@
"en": "A Dolby Vision RPU was found but the base layer's compatibility signalling is missing, so the colors cannot be confirmed; stopped",
"ja": "Dolby Vision RPU を検出しましたが、ベースレイヤーの互換宣言がなく色を確認できないため停止しました"
},
+ {
+ "zh": "检测到 NVIDIA App 的画面插件(RTX HDR / 智能平滑运动 / RTX 动态鲜艳度)注入了 Veyra,它已知会在采集开始时让显卡设备丢失或让程序崩溃。请在 NVIDIA App → 图形 → 程序设置里为 Veyra 关闭这几项后再试",
+ "src": "src/ui/QmlPlayerBridge.cpp",
+ "zh-TW": "偵測到 NVIDIA App 的畫面外掛(RTX HDR / 智慧平滑運動 / RTX 動態鮮豔度)注入了 Veyra,已知它會在擷取開始時造成顯示卡裝置遺失或程式當機。請在 NVIDIA App → 圖形 → 程式設定中為 Veyra 關閉這幾項後再試",
+ "en": "NVIDIA App's picture plug-in (RTX HDR / Smooth Motion / RTX Dynamic Vibrance) is injected into Veyra; it is known to lose the GPU device or crash Veyra when a capture starts. Turn these off for Veyra in NVIDIA App → Graphics → Program Settings and try again",
+ "ja": "NVIDIA App の画面プラグイン(RTX HDR / Smooth Motion / RTX Dynamic Vibrance)が Veyra に挿入されています。キャプチャ開始時に GPU デバイスの喪失やクラッシュを起こすことが確認されています。NVIDIA App → グラフィックス → プログラム設定で Veyra に対してこれらをオフにしてから再試行してください"
+ },
+ {
+ "zh": "检测到 RivaTuner(小飞机 OSD)注入了 Veyra,请在 RTSS 里为 veyra_qml_ui.exe 关闭检测(Application detection level 设为 None)后再试",
+ "src": "src/ui/QmlPlayerBridge.cpp",
+ "zh-TW": "偵測到 RivaTuner(RTSS OSD)注入了 Veyra,請在 RTSS 中為 veyra_qml_ui.exe 關閉偵測(Application detection level 設為 None)後再試",
+ "en": "RivaTuner (RTSS on-screen display) is injected into Veyra; set Application detection level to None for veyra_qml_ui.exe in RTSS and try again",
+ "ja": "RivaTuner(RTSS の OSD)が Veyra に挿入されています。RTSS で veyra_qml_ui.exe の Application detection level を None にしてから再試行してください"
+ },
{
"zh": "模型参数",
"src": "qml/NrLayerEditor.qml",
@@ -10173,6 +10229,27 @@
"en": "Settings failed and the old resources could not be restored; stopped",
"ja": "設定に失敗し、元のリソースも復元できなかったため停止しました"
},
+ {
+ "zh": "设置已保存,但自动重启失败。请重新打开软件。\nSettings saved. Automatic restart failed; please reopen Veyra.",
+ "src": "apps/veyra-qml/main.cpp",
+ "zh-TW": "",
+ "en": "",
+ "ja": ""
+ },
+ {
+ "zh": "设置已保存,请等待导出结束后重启软件",
+ "src": "src/ui/QmlPlayerBridge.cpp",
+ "zh-TW": "設定已儲存,請等待匯出結束後重新啟動軟體",
+ "en": "Settings saved. Restart after the export finishes.",
+ "ja": "設定を保存しました。書き出し完了後に再起動してください。"
+ },
+ {
+ "zh": "设置已保存,重启后生效。现在重启吗?当前播放或串流将停止。",
+ "src": "qml/SettingsPage.qml",
+ "zh-TW": "設定已儲存,重新啟動後生效。現在重新啟動嗎?目前播放或串流將停止。",
+ "en": "Settings saved. Restart to apply them. Restart now? Current playback or streaming will stop.",
+ "ja": "設定を保存しました。適用するには再起動が必要です。今すぐ再起動しますか?再生やストリーミングは停止します。"
+ },
{
"zh": "设置应用失败,已恢复上一套参数",
"src": "src/engine/EngineController.cpp",
@@ -11944,6 +12021,13 @@
"en": "Real values need system display events; shows Not measured when they are unavailable",
"ja": "実際の値にはシステムの表示イベントが必要です。取得できない場合は「未計測」と表示します"
},
+ {
+ "zh": "需要重启软件",
+ "src": "qml/SettingsPage.qml",
+ "zh-TW": "需要重新啟動軟體",
+ "en": "Restart required",
+ "ja": "再起動が必要です"
+ },
{
"zh": "静态最稳、光流为默认、低频保留高频细节",
"src": "qml/NrLayerEditor.qml",
@@ -13000,55 +13084,6 @@
"zh-TW": ";本次匯出使用 AMD FSR 超解析",
"en": "; this export uses AMD FSR super resolution",
"ja": ";今回の書き出しは AMD FSR 超解像を使用します"
- },
- {
- "zh": "OBS 游戏采集兼容",
- "src": "qml/Veyra/SettingsPage.qml",
- "zh-TW": "OBS 遊戲擷取相容",
- "en": "OBS Game Capture compatibility",
- "ja": "OBS ゲームキャプチャ互換"
- },
- {
- "zh": "仅采集视频;界面软件绘制,部分阴影与模糊简化",
- "src": "qml/Veyra/SettingsPage.qml",
- "zh-TW": "僅擷取影片;介面以軟體繪製,部分陰影與模糊簡化",
- "en": "Captures video only; software UI with simpler shadows and blur",
- "ja": "映像のみキャプチャ。UI はソフトウェア描画になり、一部の影・ぼかしを簡略化"
- },
- {
- "zh": "需要重启软件",
- "zh-TW": "需要重新啟動軟體",
- "en": "Restart required",
- "ja": "再起動が必要です",
- "src": "qml/Veyra/SettingsPage.qml"
- },
- {
- "zh": "设置已保存,重启后生效。现在重启吗?当前播放或串流将停止。",
- "zh-TW": "設定已儲存,重新啟動後生效。現在重新啟動嗎?目前播放或串流將停止。",
- "en": "Settings saved. Restart to apply them. Restart now? Current playback or streaming will stop.",
- "ja": "設定を保存しました。適用するには再起動が必要です。今すぐ再起動しますか?再生やストリーミングは停止します。",
- "src": "qml/Veyra/SettingsPage.qml"
- },
- {
- "zh": "设置已保存,请等待导出结束后重启软件",
- "zh-TW": "設定已儲存,請等待匯出結束後重新啟動軟體",
- "en": "Settings saved. Restart after the export finishes.",
- "ja": "設定を保存しました。書き出し完了後に再起動してください。",
- "src": "src/ui/QmlPlayerBridge.cpp"
- },
- {
- "zh": "是",
- "zh-TW": "是",
- "en": "Yes",
- "ja": "はい",
- "src": "qml/Veyra/SettingsPage.qml"
- },
- {
- "zh": "否",
- "zh-TW": "否",
- "en": "No",
- "ja": "いいえ",
- "src": "qml/Veyra/SettingsPage.qml"
}
]
}
diff --git a/include/veyra/diagnostics/EnhancementProcessingTime.h b/include/veyra/diagnostics/EnhancementProcessingTime.h
index 745c25ff..228fb90c 100644
--- a/include/veyra/diagnostics/EnhancementProcessingTime.h
+++ b/include/veyra/diagnostics/EnhancementProcessingTime.h
@@ -13,7 +13,10 @@ namespace veyra::diagnostics {
inline std::optional<double> enhancementProcessingMs(const GpuFrameTiming& frame) {
// Presenter records only contain Blit. Never let them add zero samples.
if(frame.gpu[size_t(GpuStage::Color)].state!=SampleState::Measured)return {};
- constexpr GpuStage stages[]={GpuStage::Flow,GpuStage::Sr,GpuStage::Nr,GpuStage::Residual,GpuStage::FgBatch};
+ // Every NR layer marks the shared Nr slot, so it only holds the last layer;
+ // the per-layer spans carry the others (several layers read as one, 2026-10-02).
+ constexpr GpuStage stages[]={GpuStage::Flow,GpuStage::Sr,GpuStage::Nr,GpuStage::NrLayer0,GpuStage::NrLayer1,
+ GpuStage::NrLayer2,GpuStage::NrLayer3,GpuStage::Residual,GpuStage::FgBatch};
struct Interval {uint64_t begin,end;};
std::array<Interval,std::size(stages)> intervals{};
size_t count=0;uint64_t frequency=0;
diff --git a/include/veyra/gfx/PresentationHooks.h b/include/veyra/gfx/PresentationHooks.h
index 8d8813e5..81525e83 100644
--- a/include/veyra/gfx/PresentationHooks.h
+++ b/include/veyra/gfx/PresentationHooks.h
@@ -27,6 +27,25 @@ inline constexpr PresentationHook kPresentationHooks[] = {
{L"GameTracker64.dll", "GamePP"},
};
+// Injected components that field logs tie to the GPU device being removed, or to a crash,
+// within seconds of a capture preview starting (2026-10-02): NVIDIA App's presentation
+// plug-in nvppex.dll (it carries RTX HDR, Smooth Motion and RTX Dynamic Vibrance; two
+// crashes inside it on an RTX 5080), the driver's present layer, and RTSS (device removed
+// with ACCESS_DENIED on an RTX 4070 SUPER). Veyra cannot switch them off; it can name them.
+inline constexpr PresentationHook kRiskyInjections[] = {
+ {L"nvppex.dll", "NVIDIA App presentation plug-in"},
+ {L"NvPresent64.dll", "NVIDIA present layer"},
+ {L"RTSSHooks64.dll", "RivaTuner Statistics Server"},
+};
+
+// The risky components loaded now, as "nvppex.dll,RTSSHooks64.dll" (empty when none).
+inline std::wstring riskyInjections() {
+ std::wstring out;
+ for (const auto& hook : kRiskyInjections)
+ if (GetModuleHandleW(hook.module)) { if (!out.empty()) out += L','; out += hook.module; }
+ return out;
+}
+
// The first injected overlay found, or nullptr.
inline const PresentationHook* injectedPresentationHook() {
for (const auto& hook : kPresentationHooks)
diff --git a/include/veyra/pipeline/ColorDetailPass.h b/include/veyra/pipeline/ColorDetailPass.h
new file mode 100644
index 00000000..15bd8f00
--- /dev/null
+++ b/include/veyra/pipeline/ColorDetailPass.h
@@ -0,0 +1,35 @@
+#pragma once
+#include "veyra/engine/ColorSettings.h"
+#include "veyra/pipeline/GpuPassUtils.h"
+
+namespace veyra::pipeline {
+// The colour panel's 效果 group: 纹理 (texture), 清晰度 (clarity) and 去朦胧
+// (dehaze). They need the neighbourhood of a pixel, which the per-pixel grade
+// (ColorGrade.hlsli, fused into input conversion or ColorGradePass) cannot see,
+// so they run as a separate in-place pass right after the grade. Until
+// 2026-10-02 the three sliders were stored but nothing read them.
+//
+// Three small dispatches: block statistics at about 1/8 of the extent, a
+// separable blur of those, then the full-size apply against a copy of the
+// graded image. Nothing is allocated or recorded while all three are zero; the
+// first non-zero value allocates (live edits need no graph rebuild).
+class ColorDetailPass {
+public:
+ static bool wanted(const engine::ColorSettings& settings) {
+ return settings.enabled && (settings.texture != 0 || settings.clarity != 0 || settings.dehaze != 0);
+ }
+ // `target` is an RGBA16F texture the grade just wrote; it is read and
+ // rewritten in place. `hdrWorking` selects scRGB working units.
+ bool run(ID3D12GraphicsCommandList* list, StateTracker& tracker, ID3D12Resource* target,
+ const engine::ColorSettings& settings, bool hdrWorking);
+ void close();
+
+private:
+ bool prepare(ID3D12Device* device, ID3D12Resource* target);
+ ComputePass reduce_, blur_, apply_;
+ ComPtr<ID3D12Resource> copy_, lowA_, lowB_;
+ ID3D12Resource* target_ = nullptr;
+ uint32_t width_ = 0, height_ = 0, lowWidth_ = 0, lowHeight_ = 0, block_ = 8;
+ bool failed_ = false; // one log line, then no retries until close()
+};
+}
diff --git a/include/veyra/pipeline/ColorGradeInstance.h b/include/veyra/pipeline/ColorGradeInstance.h
index fb393d7f..708a29d3 100644
--- a/include/veyra/pipeline/ColorGradeInstance.h
+++ b/include/veyra/pipeline/ColorGradeInstance.h
@@ -1,4 +1,5 @@
#pragma once
+#include "veyra/pipeline/ColorDetailPass.h"
#include "veyra/pipeline/ColorGradeTables.h"
#include "veyra/pipeline/GpuPassUtils.h"
@@ -19,6 +20,7 @@ public:
bool identity()const{return tables_.identity;}
private:
ComputePass pass_;
+ ColorDetailPass detail_; // 纹理 / 清晰度 / 去朦胧 on output_, after the grade
ColorGradeTables tables_;
engine::ColorSettings settings_;
std::array<ComPtr<ID3D12Resource>,3> textures_;
diff --git a/include/veyra/pipeline/EnhanceGraph.h b/include/veyra/pipeline/EnhanceGraph.h
index 63a1fea3..269ebe29 100644
--- a/include/veyra/pipeline/EnhanceGraph.h
+++ b/include/veyra/pipeline/EnhanceGraph.h
@@ -682,6 +682,8 @@ private:
// setting is non-zero; a default (0) session never allocates it and the
// dispatch is skipped, so the disabled path is unchanged.
std::unique_ptr<NrHoldPass> nrHoldPass_;
+ // 纹理 / 清晰度 / 去朦胧 of the list grade fused into input conversion (srcRgba_).
+ ColorDetailPass colorDetail_;
// The texture the rest of the graph reads as "the NR result". Without the
// stabiliser this is residualRgba_; with it, the stabilised copy the pass
// produces. Set once per frame, read by the SR/FG/tail bindings below.
diff --git a/qml/Veyra/ProPage.qml b/qml/Veyra/ProPage.qml
index bcf54de7..e9eafdc0 100644
--- a/qml/Veyra/ProPage.qml
+++ b/qml/Veyra/ProPage.qml
@@ -1346,7 +1346,7 @@ VPage {
objectName: "list-hold-strength"
from: 0.1; to: 1.0
value: veyra.nrHoldStrength
- onMoved: veyra.nrHoldStrength = value
+ onMoved: value => veyra.nrHoldStrength = value
}
}
VRow {
@@ -1357,7 +1357,7 @@ VPage {
objectName: "list-hold-tolerance"
from: 0.005; to: 0.10
value: veyra.nrHoldTolerance
- onMoved: veyra.nrHoldTolerance = value
+ onMoved: value => veyra.nrHoldTolerance = value
}
}
}
@@ -1585,7 +1585,7 @@ VPage {
VSlider {
implicitWidth: 150
from: 0; to: 1; value: veyra.volume; inputScale: 100
- onMoved: veyra.volume = value
+ onMoved: value => veyra.volume = value
}
}
VRow {
@@ -1613,7 +1613,7 @@ VPage {
implicitWidth: 150
center: true
from: -250; to: 250; value: veyra.audioOffsetMs; enabledControl: veyra.audioSyncMode === 1
- onMoved: veyra.audioOffsetMs = Math.round(value)
+ onMoved: value => veyra.audioOffsetMs = Math.round(value)
}
}
}
diff --git a/scripts/package-qml-release.py b/scripts/package-qml-release.py
index 193f0130..147179fe 100644
--- a/scripts/package-qml-release.py
+++ b/scripts/package-qml-release.py
@@ -256,7 +256,7 @@ foreach($f in $lock.files) {
copy(ROOT / name, name)
copy(ROOT / 'README.md', 'README.md')
copy(ROOT / 'README_EN.md', 'README_EN.md')
- for name in ('veyra-app-icon.png',):
+ for name in ('veyra-app-icon.png', 'veyra-2.0.0-promo.webp'):
copy(ROOT / 'assets' / name, 'assets/' + name)
for name in ('RUNTIME_COMPONENTS_2.0.0.md', 'BUILD.md', 'BUILD_2.0.0.md', 'RELEASE_NOTES_2.0.0.md'):
copy(ROOT / 'docs' / name, 'docs/' + name)
diff --git a/scripts/ui-check/colour-effects.qml b/scripts/ui-check/colour-effects.qml
new file mode 100644
index 00000000..8b265523
--- /dev/null
+++ b/scripts/ui-check/colour-effects.qml
@@ -0,0 +1,26 @@
+ // ---- colour 效果 group: texture / clarity / dehaze must change the picture (field report 2026-10-02) ----
+ // Paused on one frame, so a screenshot difference can only come from the setting.
+ Timer { interval: 150; running: true; repeat: true; onTriggered: veyra.logUi("uitest-tick", "") }
+ Timer {
+ interval: 1200; running: true; repeat: true
+ property int ticks: 0
+ readonly property var steps: [
+ ["base", "", 0], ["clarity+", "clarity", 100], ["clarity-", "clarity", -100],
+ ["texture+", "texture", 100], ["dehaze+", "dehaze", 100], ["dehaze-", "dehaze", -100], ["base2", "", 0]]
+ onTriggered: {
+ ++ticks
+ if (ticks === 2) veyra.openUrl("@VIDEO@")
+ if (ticks === 4) { root.goPage("pro"); veyra.colorEnabled = true }
+ if (ticks === 5) { veyra.seekTo(12); if (!veyra.paused) veyra.togglePlayPause() }
+ const k = ticks - 7
+ if (k >= 0 && k < steps.length * 2) {
+ const s = steps[Math.floor(k / 2)]
+ if (k % 2 === 0) {
+ for (const n of ["clarity", "texture", "dehaze"]) veyra.setColourParameter(n, 0)
+ if (s[1]) veyra.setColourParameter(s[1], s[2])
+ veyra.logUi("uitest", "UITEST_NOTE " + s[0] + " paused=" + veyra.paused + " clarity=" + veyra.colourParameter("clarity"))
+ } else veyra.logUi("uitest", "UITEST_SHOT " + s[0])
+ }
+ if (k === steps.length * 2 + 2) { veyra.logUi("uitest", "UITEST_DONE"); running = false }
+ }
+ }
diff --git a/scripts/ui-check/stabiliser-toggle.qml b/scripts/ui-check/stabiliser-toggle.qml
new file mode 100644
index 00000000..890f7dec
--- /dev/null
+++ b/scripts/ui-check/stabiliser-toggle.qml
@@ -0,0 +1,29 @@
+ // ---- output stabiliser on then off: the picture must keep moving (field report 2026-10-02) ----
+ Timer { interval: 150; running: true; repeat: true; onTriggered: veyra.logUi("uitest-tick", "") }
+ Timer {
+ interval: 1000; running: true; repeat: true
+ property int ticks: 0
+ property string failure: ""
+ property real lastPos: -1
+ function note(what) {
+ veyra.logUi("uitest", "UITEST_NOTE " + what + " pos=" + veyra.position.toFixed(2) + " fps=" + veyra.displayFps.toFixed(1)
+ + " hold=" + veyra.nrHoldStrength)
+ }
+ function moving(what) {
+ note(what)
+ if (lastPos >= 0 && veyra.position - lastPos < 0.5 && !failure) failure = what + ": position stuck at " + veyra.position.toFixed(2)
+ lastPos = veyra.position
+ }
+ onTriggered: {
+ ++ticks
+ if (ticks === 2) veyra.openUrl("@VIDEO@")
+ if (ticks === 4) { root.goPage("pro"); if (@NR@) { if (veyra.nrLayers.length === 0) veyra.addEffect("nr"); veyra.setAllNrEnabled(true) } @EXTRA@ }
+ if (ticks === 6) moving("before")
+ if (ticks === 7) { @ON@; note("on") }
+ if (ticks === 9) { note("stabiliser on"); veyra.logUi("uitest", "UITEST_SHOT on-9") }
+ if (ticks === 10) { note("stabiliser on 2"); veyra.logUi("uitest", "UITEST_SHOT on-10") }
+ if (ticks === 11) { @OFF@; note("off") }
+ if (ticks >= 13 && ticks <= 22) { moving("stabiliser off " + ticks); veyra.logUi("uitest", "UITEST_SHOT off-" + ticks) }
+ if (ticks === 23) { veyra.logUi("uitest", failure ? "UITEST_FAIL " + failure : "UITEST_DONE"); running = false }
+ }
+ }
diff --git a/scripts/ui-check/ui-check.py b/scripts/ui-check/ui-check.py
index a170845f..e0a7c0ac 100644
--- a/scripts/ui-check/ui-check.py
+++ b/scripts/ui-check/ui-check.py
@@ -153,7 +153,12 @@ try:
deadline = time.time() + 290
while time.time() < deadline and verdict is None:
time.sleep(0.1)
- lines = log.read_text(encoding='utf8', errors='replace').splitlines() if log.exists() else []
+ text = log.read_text(encoding='utf8', errors='replace') if log.exists() else ''
+ lines = text.splitlines()
+ # A line still being written is read again next time; counting it as seen
+ # dropped a command that arrived in two pieces.
+ if text and not text.endswith('\n'):
+ lines = lines[:-1]
for line in lines[seen:]:
if 'UITEST_SHOT ' in line:
name = line.split('UITEST_SHOT ')[1].strip()
diff --git a/shaders/ColorDetailApply.hlsl b/shaders/ColorDetailApply.hlsl
new file mode 100644
index 00000000..17194ab4
--- /dev/null
+++ b/shaders/ColorDetailApply.hlsl
@@ -0,0 +1,79 @@
+// Colour effects, step 3 of 3, Lightroom's 效果 group:
+// 纹理 texture - fine detail: log luminance against an 8-tap ring a few pixels wide;
+// 清晰度 clarity - midtone local contrast against the blurred block base;
+// 去朦胧 dehaze - dark-channel haze removal (positive) or a uniform veil (negative).
+// Detail is changed as a luminance ratio, so hue and saturation of each pixel stay;
+// the step is limited to 1.5 stops so a hard edge cannot ring into a black or
+// white halo. Values are scene-referred (1.0 = SDR white) inside the shader.
+cbuffer Params : register(b0) {
+ uint width; uint height; uint lowWidth; uint lowHeight;
+ float block; float workingToScene; float textureAmount; float clarityAmount;
+ float dehazeAmount; float ringRadius; float pad0; float pad1;
+};
+Texture2D<float4> source : register(t0);
+Texture2D<float4> low : register(t1);
+RWTexture2D<float4> target : register(u0);
+
+float logLuma(float3 c) {
+ return log2(max(dot(max(c, 0.0), float3(0.2126, 0.7152, 0.0722)), 1e-4));
+}
+
+float4 lowAt(uint2 p) {
+ // Bilinear between the four block centres around this pixel.
+ const float2 g = (float2(p) + 0.5) / block - 0.5;
+ const float2 f = frac(g);
+ const int2 i0 = int2(floor(g));
+ const int2 hi = int2(lowWidth - 1, lowHeight - 1);
+ const float4 a = low[clamp(i0, int2(0, 0), hi)];
+ const float4 b = low[clamp(i0 + int2(1, 0), int2(0, 0), hi)];
+ const float4 c = low[clamp(i0 + int2(0, 1), int2(0, 0), hi)];
+ const float4 d = low[clamp(i0 + int2(1, 1), int2(0, 0), hi)];
+ return lerp(lerp(a, b, f.x), lerp(c, d, f.x), f.y);
+}
+
+[numthreads(16,16,1)]
+void main(uint3 id : SV_DispatchThreadID) {
+ if (id.x >= width || id.y >= height) return;
+ const float4 original = source[id.xy];
+ float3 c = original.rgb * workingToScene;
+ const float lum = logLuma(c);
+ float delta = 0.0;
+
+ if (textureAmount != 0.0) {
+ const int r = int(ringRadius);
+ const int2 taps[8] = {int2(-r, 0), int2(r, 0), int2(0, -r), int2(0, r),
+ int2(-r, -r), int2(r, r), int2(-r, r), int2(r, -r)};
+ const int2 hi = int2(width - 1, height - 1);
+ float ring = 0.0;
+ [unroll] for (int k = 0; k < 8; ++k)
+ ring += logLuma(source[clamp(int2(id.xy) + taps[k], int2(0, 0), hi)].rgb * workingToScene);
+ delta += textureAmount * 0.9 * (lum - ring / 8.0);
+ }
+ const float4 base = lowAt(id.xy);
+ if (clarityAmount != 0.0) {
+ // Midtones carry clarity; deep shadows and highlights are left alone.
+ const float m = saturate((lum + 8.0) / 9.0);
+ const float midtone = saturate(1.0 - (2.0 * m - 1.0) * (2.0 * m - 1.0));
+ delta += clarityAmount * 0.7 * (lum - base.x) * midtone;
+ }
+ c *= exp2(clamp(delta, -1.5, 1.5));
+
+ if (dehazeAmount > 0.0) {
+ // Remove a veil v against airlight at diffuse white: (c - v) / (1 - v).
+ // v comes from the blurred dark channel (the haze), plus a small constant so
+ // a clear picture still gains some depth. It is capped at half of this
+ // pixel's own darkest channel: a dark pixel beside a bright region (the
+ // block minimum there is high) cannot be crushed into a black halo.
+ const float own = min(c.r, min(c.g, c.b));
+ const float v = dehazeAmount * min(0.9 * saturate(base.y) + 0.03, 0.5 * max(own, 0.0));
+ // Values above diffuse white (HDR highlights) keep their excess unchanged.
+ const float3 clipped = min(c, 1.0);
+ c = (clipped - v) / (1.0 - v) + (c - clipped);
+ } else if (dehazeAmount < 0.0) {
+ // A flat veil at a fifth of diffuse white. Linear light, so at -100 black
+ // lifts to roughly a quarter of the display range.
+ const float t = 1.0 + 0.3 * dehazeAmount;
+ c = c * t + 0.2 * (1.0 - t);
+ }
+ target[id.xy] = float4(max(c, 0.0) / workingToScene, original.a);
+}
diff --git a/shaders/ColorDetailBlur.hlsl b/shaders/ColorDetailBlur.hlsl
new file mode 100644
index 00000000..c22af8b0
--- /dev/null
+++ b/shaders/ColorDetailBlur.hlsl
@@ -0,0 +1,26 @@
+// Colour effects, step 2 of 3: one direction of a separable Gaussian (sigma 2.5
+// low-resolution texels) over the block statistics. Run horizontally, then
+// vertically. At about 135 texel rows the base spans roughly 2-3 % of the
+// picture height, the scale clarity works at.
+cbuffer Params : register(b0) {
+ uint width; uint height; int stepX; int stepY;
+ float pad0; float pad1; float pad2; float pad3;
+};
+Texture2D<float4> source : register(t0);
+RWTexture2D<float4> target : register(u0);
+
+[numthreads(8,8,1)]
+void main(uint3 id : SV_DispatchThreadID) {
+ if (id.x >= width || id.y >= height) return;
+ static const float weights[5] = {0.1974, 0.1747, 0.1210, 0.0656, 0.0278};
+ float4 sum = source[id.xy] * weights[0];
+ float total = weights[0];
+ for (int i = 1; i < 5; ++i) {
+ const int2 offset = int2(stepX, stepY) * i;
+ const int2 a = clamp(int2(id.xy) + offset, int2(0, 0), int2(width - 1, height - 1));
+ const int2 b = clamp(int2(id.xy) - offset, int2(0, 0), int2(width - 1, height - 1));
+ sum += (source[a] + source[b]) * weights[i];
+ total += 2.0 * weights[i];
+ }
+ target[id.xy] = sum / total;
+}
diff --git a/shaders/ColorDetailReduce.hlsl b/shaders/ColorDetailReduce.hlsl
new file mode 100644
index 00000000..6d616f45
--- /dev/null
+++ b/shaders/ColorDetailReduce.hlsl
@@ -0,0 +1,30 @@
+// Colour effects (texture / clarity / dehaze), step 1 of 3: one low-resolution
+// texel per block of the graded image, holding the mean log2 luminance (the
+// large-scale base clarity lifts detail against) and the block minimum of the
+// dark channel (min of R, G, B): the dark-channel prior, near zero in a clear
+// picture however dark it is, so dehaze leaves clear shadows alone. Scene-referred units.
+cbuffer Params : register(b0) {
+ uint srcWidth; uint srcHeight; uint lowWidth; uint lowHeight;
+ uint block; float workingToScene; float pad0; float pad1;
+};
+Texture2D<float4> source : register(t0);
+RWTexture2D<float4> low : register(u0);
+
+[numthreads(8,8,1)]
+void main(uint3 id : SV_DispatchThreadID) {
+ if (id.x >= lowWidth || id.y >= lowHeight) return;
+ // A 4x4 grid inside the block is plenty for a base that is blurred afterwards.
+ const uint step = max(1u, block / 4u);
+ const uint2 origin = id.xy * block;
+ float sumLog = 0.0, minDark = 1e9, count = 0.0;
+ for (uint y = step / 2; y < block; y += step) {
+ for (uint x = step / 2; x < block; x += step) {
+ const uint2 p = min(origin + uint2(x, y), uint2(srcWidth - 1, srcHeight - 1));
+ const float3 c = max(source[p].rgb * workingToScene, 0.0);
+ sumLog += log2(max(dot(c, float3(0.2126, 0.7152, 0.0722)), 1e-4));
+ minDark = min(minDark, min(c.r, min(c.g, c.b)));
+ count += 1.0;
+ }
+ }
+ low[id.xy] = float4(sumLog / count, minDark, 0.0, 1.0);
+}
diff --git a/src/pipeline/ColorDetailPass.cpp b/src/pipeline/ColorDetailPass.cpp
new file mode 100644
index 00000000..121ee511
--- /dev/null
+++ b/src/pipeline/ColorDetailPass.cpp
@@ -0,0 +1,117 @@
+#include "veyra/pipeline/ColorDetailPass.h"
+#include <algorithm>
+#include <bit>
+
+namespace veyra::pipeline {
+namespace {
+constexpr DXGI_FORMAT kFormat = DXGI_FORMAT_R16G16B16A16_FLOAT;
+}
+
+bool ColorDetailPass::prepare(ID3D12Device* device, ID3D12Resource* target)
+{
+ const auto desc = target->GetDesc();
+ if (target == target_ && copy_ && uint32_t(desc.Width) == width_ && desc.Height == height_) return true;
+ close();
+ if (desc.Format != kFormat) {
+ veyra::log::warn("color-detail", std::format("target format {} is not RGBA16F; texture/clarity/dehaze skipped", unsigned(desc.Format)));
+ return false;
+ }
+ width_ = uint32_t(desc.Width);
+ height_ = desc.Height;
+ // About 135 block rows whatever the extent, so the clarity radius is a
+ // fixed share of the picture (8 px blocks at 1080p, 16 px at 2160p).
+ block_ = std::clamp<uint32_t>(height_ / 135u, 4u, 32u);
+ lowWidth_ = (width_ + block_ - 1) / block_;
+ lowHeight_ = (height_ + block_ - 1) / block_;
+ copy_ = makeTexture(device, width_, height_, kFormat, false);
+ lowA_ = makeTexture(device, lowWidth_, lowHeight_, kFormat, true);
+ lowB_ = makeTexture(device, lowWidth_, lowHeight_, kFormat, true);
+ if (!copy_ || !lowA_ || !lowB_) { close(); return false; }
+ std::vector<uint8_t> cs;
+ // reduce: t0 copy, u0 lowA. blur: (t0 lowA, u0 lowB) then (t0 lowB, u0 lowA).
+ // apply: t0 copy, t1 lowA, u0 target.
+ if (!reduce_.loadShader("ColorDetailReduce.dxil", cs) || !reduce_.create(device, cs, 2, 1, 1) ||
+ !blur_.loadShader("ColorDetailBlur.dxil", cs) || !blur_.create(device, cs, 4, 1, 1) ||
+ !apply_.loadShader("ColorDetailApply.dxil", cs) || !apply_.create(device, cs, 3, 2, 1, 12)) {
+ close();
+ return false;
+ }
+ makeSrv(device, copy_.Get(), kFormat, cpuHandleOf(reduce_, 0));
+ makeUav(device, lowA_.Get(), kFormat, cpuHandleOf(reduce_, 1));
+ makeSrv(device, lowA_.Get(), kFormat, cpuHandleOf(blur_, 0));
+ makeUav(device, lowB_.Get(), kFormat, cpuHandleOf(blur_, 1));
+ makeSrv(device, lowB_.Get(), kFormat, cpuHandleOf(blur_, 2));
+ makeUav(device, lowA_.Get(), kFormat, cpuHandleOf(blur_, 3));
+ makeSrv(device, copy_.Get(), kFormat, cpuHandleOf(apply_, 0));
+ makeSrv(device, lowA_.Get(), kFormat, cpuHandleOf(apply_, 1));
+ makeUav(device, target, kFormat, cpuHandleOf(apply_, 2));
+ target_ = target;
+ veyra::log::info("color-detail", std::format("texture/clarity/dehaze pass {}x{} block={} low={}x{}",
+ width_, height_, block_, lowWidth_, lowHeight_));
+ return true;
+}
+
+bool ColorDetailPass::run(ID3D12GraphicsCommandList* list, StateTracker& tracker, ID3D12Resource* target,
+ const engine::ColorSettings& settings, bool hdrWorking)
+{
+ if (!wanted(settings) || !list || !target || failed_) return true;
+ ComPtr<ID3D12Device> device;
+ if (FAILED(list->GetDevice(IID_PPV_ARGS(&device))) || !prepare(device.Get(), target)) {
+ // The grade itself is already written; the picture continues without the effects.
+ failed_ = true;
+ veyra::log::error("color-detail", "texture/clarity/dehaze pass unavailable; continuing without it");
+ return false;
+ }
+ const float workingToScene = hdrWorking ? 80.0f / 203.0f : 1.0f;
+
+ tracker.transition(list, target, D3D12_RESOURCE_STATE_COPY_SOURCE);
+ tracker.transition(list, copy_.Get(), D3D12_RESOURCE_STATE_COPY_DEST);
+ list->CopyResource(copy_.Get(), target);
+ tracker.transition(list, copy_.Get(), D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE);
+
+ tracker.transition(list, lowA_.Get(), D3D12_RESOURCE_STATE_UNORDERED_ACCESS);
+ const float reduce[8] = {std::bit_cast<float>(width_), std::bit_cast<float>(height_),
+ std::bit_cast<float>(lowWidth_), std::bit_cast<float>(lowHeight_), std::bit_cast<float>(block_), workingToScene, 0, 0};
+ reduce_.bind(list, reduce, gpuHandleOf(reduce_, 0).ptr, gpuHandleOf(reduce_, 1).ptr);
+ list->Dispatch((lowWidth_ + 7) / 8, (lowHeight_ + 7) / 8, 1);
+ tracker.uavBarrier(list, lowA_.Get());
+
+ for (int pass = 0; pass < 2; ++pass) {
+ auto* from = pass == 0 ? lowA_.Get() : lowB_.Get();
+ auto* to = pass == 0 ? lowB_.Get() : lowA_.Get();
+ tracker.transition(list, from, D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE);
+ tracker.transition(list, to, D3D12_RESOURCE_STATE_UNORDERED_ACCESS);
+ const float blur[8] = {std::bit_cast<float>(lowWidth_), std::bit_cast<float>(lowHeight_),
+ std::bit_cast<float>(pass == 0 ? 1 : 0), std::bit_cast<float>(pass == 0 ? 0 : 1), 0, 0, 0, 0};
+ blur_.bind(list, blur, gpuHandleOf(blur_, UINT(pass * 2)).ptr, gpuHandleOf(blur_, UINT(pass * 2 + 1)).ptr);
+ list->Dispatch((lowWidth_ + 7) / 8, (lowHeight_ + 7) / 8, 1);
+ tracker.uavBarrier(list, to);
+ }
+
+ tracker.transition(list, lowA_.Get(), D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE);
+ tracker.transition(list, target, D3D12_RESOURCE_STATE_UNORDERED_ACCESS);
+ const float ring = float(std::max(1u, (height_ + 540u) / 1080u)) * 2.0f;
+ const float apply[12] = {std::bit_cast<float>(width_), std::bit_cast<float>(height_),
+ std::bit_cast<float>(lowWidth_), std::bit_cast<float>(lowHeight_), float(block_), workingToScene,
+ std::clamp(settings.texture / 100.0f, -1.0f, 1.0f), std::clamp(settings.clarity / 100.0f, -1.0f, 1.0f),
+ std::clamp(settings.dehaze / 100.0f, -1.0f, 1.0f), ring, 0, 0};
+ apply_.bind(list, apply, gpuHandleOf(apply_, 0).ptr, gpuHandleOf(apply_, 2).ptr);
+ list->Dispatch((width_ + 15) / 16, (height_ + 15) / 16, 1);
+ tracker.uavBarrier(list, target);
+ return true;
+}
+
+void ColorDetailPass::close()
+{
+ reduce_ = {};
+ blur_ = {};
+ apply_ = {};
+ copy_.Reset();
+ lowA_.Reset();
+ lowB_.Reset();
+ target_ = nullptr;
+ width_ = height_ = lowWidth_ = lowHeight_ = 0;
+ failed_ = false;
+}
+
+} // namespace veyra::pipeline
diff --git a/src/pipeline/ColorGradeInstance.cpp b/src/pipeline/ColorGradeInstance.cpp
index f71de234..58bba722 100644
--- a/src/pipeline/ColorGradeInstance.cpp
+++ b/src/pipeline/ColorGradeInstance.cpp
@@ -111,6 +111,7 @@ bool ColorGradeInstance::dispatch(ID3D12GraphicsCommandList* list,StateTracker&
pass_.bind(list,c,gpuHandleOf(pass_,0).ptr,gpuHandleOf(pass_,1).ptr,gpuHandleOf(pass_,8).ptr);
list->Dispatch((width+15)/16,(height+15)/16,1);
tracker.uavBarrier(list,output_);
+ (void)detail_.run(list,tracker,output_,settings_,hdrWorking);
tracker.transition(list,output_,D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE);
return true;
}
diff --git a/src/pipeline/EnhanceGraph.cpp b/src/pipeline/EnhanceGraph.cpp
index 6899a975..021be655 100644
--- a/src/pipeline/EnhanceGraph.cpp
+++ b/src/pipeline/EnhanceGraph.cpp
@@ -1392,7 +1392,10 @@ bool EnhanceGraph::createComputePasses()
// Stage-5 output stabiliser. Only allocated when the setting is non-zero:
// a default session never pays for it and the dispatch is skipped below, so
// the disabled path stays byte-identical to a build without this pass.
- if(desc_.nrHoldStrength>0.0f&&!createNrHoldPass())return false;
+ // Always called: with the stabiliser off this releases a pass left by the
+ // previous graph, which otherwise kept copying its last frame over the
+ // live output (picture frozen after turning it off, 2026-10-02).
+ if(!createNrHoldPass())return false;
// Keep the legacy ingress root signature when no independent colour grade
// needs the FP32 side output. The extra UAV is part of the R5.3 contract
// only for graphs that actually allocate preGradeRgba_.
@@ -2093,6 +2096,8 @@ bool EnhanceGraph::process(const AVFrame* frame, double ptsMs, bool reset, Frame
}
if(preGradeRgba_&&!colorActive_)convertInput(false,preGradeRgba_.Get(),1);
else convertInput(colorActive_,srcRgba_.Get(),0);
+ // A failure only drops the effects (logged once); the graded picture continues.
+ if(colorActive_)(void)colorDetail_.run(list,tracker_,srcRgba_.Get(),desc_.color,desc_.hdrWorking());
if(additionalColorActiveCount_){
for(size_t i=0;i<additionalColorInstances_.size();++i)if(auto& instance=additionalColorInstances_[i]){
// additionalColorInstances_[i] is Color parameter i+1.
@@ -2551,7 +2556,9 @@ bool EnhanceGraph::process(const AVFrame* frame, double ptsMs, bool reset, Frame
}
tracker_.transition(list,residualRgba_.Get(),D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE);
}
- gpuTimer_.mark(list,GpuStage::Residual,true);
+ // The stabiliser below closes this span: a second Residual pair would
+ // overwrite the composite's timestamps and drop its time from the load.
+ if(!nrHoldPass_)gpuTimer_.mark(list,GpuStage::Residual,true);
}
// 5b. Output stabiliser (anti-flicker, default off). Runs after the last NR
@@ -2560,7 +2567,7 @@ bool EnhanceGraph::process(const AVFrame* frame, double ptsMs, bool reset, Frame
// the result is copied back into residualRgba_, which deliberately leaves
// every downstream binding (SR, FG, tail colour, diagnostics) untouched.
if(nrHoldPass_){
- gpuTimer_.mark(list,GpuStage::Residual);
+ if(!(nrEnabled_&&nrCreated()))gpuTimer_.mark(list,GpuStage::Residual);
nrHoldPass_->run(list,tracker_,reset,desc_.nrHoldStrength,desc_.nrHoldTolerance);
if(nrHoldPass_->active()&&nrHoldPass_->result()!=residualRgba_.Get()){
auto* stabilised=nrHoldPass_->result();
@@ -3075,6 +3082,8 @@ void EnhanceGraph::shutdown()
proxyTex_.Reset();
for(auto& r:sourceReferences_)r.Reset();for(auto& r:baseReferences_)r.Reset();workRgba_.Reset();
preGradeRgba_.Reset();srcRgba_.Reset();videoSrInput_.Reset();videoSrOutput_.Reset();
+ nrHoldPass_.reset();
+ colorDetail_.close();
chromaTex_.Reset();
lumaTex_.Reset();
upZeroMotion_.Reset();
diff --git a/src/ui/QmlPlayerBridge.cpp b/src/ui/QmlPlayerBridge.cpp
index 1748a395..8842fa41 100644
--- a/src/ui/QmlPlayerBridge.cpp
+++ b/src/ui/QmlPlayerBridge.cpp
@@ -107,6 +107,23 @@ namespace veyra::ui {
namespace {
QString utf8Of(std::string_view s) { return QString::fromUtf8(s.data(), int(s.size())); }
QString utf8Of(const std::wstring& w) { return QString::fromWCharArray(w.c_str(), int(w.size())); }
+
+// Where crash and device-loss hints go: next to the log, where the crash handler in
+// apps/veyra-qml/main.cpp writes them too.
+QString lastFailurePath() {
+ return QFileInfo(qApp->property("veyraLogFile").toString()).absolutePath() + QStringLiteral("/veyra-last-failure.txt");
+}
+
+// What the user can switch off, for the injected components named in `modules`
+// ("nvppex.dll,RTSSHooks64.dll", see gfx::riskyInjections). Empty when none is known.
+QString injectionAdvice(const QString& modules) {
+ QStringList parts;
+ if (modules.contains(QStringLiteral("nvppex.dll"), Qt::CaseInsensitive) || modules.contains(QStringLiteral("NvPresent64.dll"), Qt::CaseInsensitive))
+ parts << QCoreApplication::translate("QmlPlayerBridge", "检测到 NVIDIA App 的画面插件(RTX HDR / 智能平滑运动 / RTX 动态鲜艳度)注入了 Veyra,它已知会在采集开始时让显卡设备丢失或让程序崩溃。请在 NVIDIA App → 图形 → 程序设置里为 Veyra 关闭这几项后再试");
+ if (modules.contains(QStringLiteral("RTSSHooks64.dll"), Qt::CaseInsensitive))
+ parts << QCoreApplication::translate("QmlPlayerBridge", "检测到 RivaTuner(小飞机 OSD)注入了 Veyra,请在 RTSS 里为 veyra_qml_ui.exe 关闭检测(Application detection level 设为 None)后再试");
+ return parts.join(QStringLiteral(";"));
+}
// Messages and fixed table labels shown to the user, in the interface language
// (UiLanguage.h). Data that only passes through the UI - paths, device, preset and
// LUT names - keeps utf8Of(), and so do log lines.
@@ -948,7 +965,16 @@ QmlPlayerBridge::QmlPlayerBridge(engine::EngineController& engine, std::filesyst
if (had && !wasFailed && s.failed && (s.capture || s.remotePlay)) {
const QString why = veyra::ui::i18n::text(s.status);
veyra::log::warn("ui-live-failed", std::format("remote={} status={}", s.remotePlay, utf8Of(s.status).toStdString()));
- emit notice(why.isEmpty() ? (s.remotePlay ? tr("PS5 串流没有连上") : tr("采集没有开始")) : why, true);
+ QString text = why.isEmpty() ? (s.remotePlay ? tr("PS5 串流没有连上") : tr("采集没有开始")) : why;
+ // The interface itself may be gone with the device (Qt loses it too), so
+ // the hint is also left for the next start.
+ const QString injected = utf8Of(gfx::riskyInjections());
+ if (const QString advice = injectionAdvice(injected); !advice.isEmpty()) {
+ text += QStringLiteral(";") + advice;
+ QFile marker(lastFailurePath());
+ if (marker.open(QIODevice::WriteOnly)) marker.write((QStringLiteral("device\n") + injected + QStringLiteral("\n")).toUtf8());
+ }
+ emit notice(text, true);
if (impl_->currentPage == QLatin1String("min")) emit navigate(QStringLiteral("home"));
}
emit snapshotChanged();
@@ -994,6 +1020,28 @@ QmlPlayerBridge::QmlPlayerBridge(engine::EngineController& engine, std::filesyst
if (GetTickCount64() - started > 120000 && hookTimer->interval() < 10000) hookTimer->setInterval(10000);
});
hookTimer->start(2000);
+ // The previous run crashed or lost the GPU with a known-risky component injected:
+ // say so once the window is up (the crash handler cannot show anything itself).
+ QTimer::singleShot(2500, this, [this] {
+ QFile marker(lastFailurePath());
+ if (!marker.exists()) return;
+ QByteArray raw;
+ if (marker.open(QIODevice::ReadOnly)) raw = marker.readAll();
+ marker.close();
+ marker.remove();
+ // The crash handler writes UTF-16 (no allocation in the filter); the bridge UTF-8.
+ const QString text = raw.size() > 1 && raw.at(1) == 0
+ ? QString::fromUtf16(reinterpret_cast<const char16_t*>(raw.constData()), raw.size() / 2) : QString::fromUtf8(raw);
+ const QStringList lines = text.split(QLatin1Char('\n'));
+ const QString kind = lines.value(0), modules = lines.value(1);
+ QString advice = injectionAdvice(kind + QLatin1Char(',') + modules);
+ veyra::log::info("overlay-hooks", std::format("previous run: {} injected={}", kind.toStdString(), modules.toStdString()));
+ if (advice.isEmpty()) return;
+ const QString head = kind.startsWith(QStringLiteral("crash"))
+ ? tr("上次 Veyra 异常退出(崩溃在 %1)").arg(kind.mid(6).trimmed())
+ : tr("上次采集时显卡设备丢失");
+ emit notice(head + QStringLiteral(";") + advice, true);
+ });
// A saved FSR 4 ML choice on a non-AMD GPU crashed at the first open; move it on.
if (settings().frameGenerationBackend == engine::FrameGenerationBackend::Fsr4 && !fsr4Possible()) {
auto s = settings();
@@ -1661,6 +1709,21 @@ void QmlPlayerBridge::tickCapture() {
auto q = i.captureQuery.get();
i.captureBusy = false;
if (q.kind == 0 || q.kind == 2) { i.captureVideo = std::move(q.video); i.captureAudio = std::move(q.audio); i.captureListed = true; }
+ // The remembered rate and audio input, matched against the inputs listed now. Both the
+ // panel (kind 0) and 继续上次 (kind 2) need it: the resume path skipped it and connected
+ // without sound until the panel was opened once (field report 2026-10-02).
+ const auto restoreRememberedAudio = [&i] {
+ i.captureFps = i.capturePrefs.requestedFps;
+ const int mode = i.capturePrefs.audioMode;
+ if (mode == source::kCaptureAudioFromVideoDevice) i.captureAudioChoice = mode;
+ else if (!i.capturePrefs.audioPath.empty()) {
+ i.captureAudioChoice = source::kCaptureAudioDisabled;
+ for (size_t k = 0; k < i.captureAudio.size(); ++k)
+ if (i.captureAudio[k].path == i.capturePrefs.audioPath &&
+ i.captureAudio[k].wasapi == (mode == source::kCaptureAudioWasapi)) i.captureAudioChoice = int(k);
+ } else i.captureAudioChoice = source::kCaptureAudioDisabled;
+ };
+ if (q.kind == 2 && q.device == i.capturePrefs.videoPath) restoreRememberedAudio();
if (q.kind == 0) {
veyra::log::info("capture-ui", std::format("devices video={} audio={}", i.captureVideo.size(), i.captureAudio.size()));
// Restore the remembered device; otherwise the first one. Never guess audio.
@@ -1672,17 +1735,7 @@ void QmlPlayerBridge::tickCapture() {
if (!pick.empty()) {
i.captureDevice.clear();
setCaptureDeviceId(utf8Of(pick));
- if (pick == i.capturePrefs.videoPath) {
- i.captureFps = i.capturePrefs.requestedFps;
- const int mode = i.capturePrefs.audioMode;
- if (mode == source::kCaptureAudioFromVideoDevice) i.captureAudioChoice = mode;
- else if (!i.capturePrefs.audioPath.empty()) {
- i.captureAudioChoice = source::kCaptureAudioDisabled;
- for (size_t k = 0; k < i.captureAudio.size(); ++k)
- if (i.captureAudio[k].path == i.capturePrefs.audioPath &&
- i.captureAudio[k].wasapi == (mode == source::kCaptureAudioWasapi)) i.captureAudioChoice = int(k);
- } else i.captureAudioChoice = source::kCaptureAudioDisabled;
- }
+ if (pick == i.capturePrefs.videoPath) restoreRememberedAudio();
}
emit captureChanged();
return;
diff --git a/src/xbox/StreamApi.cpp b/src/xbox/StreamApi.cpp
index 7c7b7858..94a60d22 100644
--- a/src/xbox/StreamApi.cpp
+++ b/src/xbox/StreamApi.cpp
@@ -110,9 +110,25 @@ std::string StreamApi::getExchange(const std::string& path) {
const HttpsResponse response = call("GET", path, "");
if (response.status != 204 && !response.body.empty()) {
const json j = parse(response, path);
- if (j.contains("errorDetails") && j["errorDetails"].is_object() && j["errorDetails"].value("code", "") != "")
- throw std::runtime_error(path + ": " + j["errorDetails"].value("message", j["errorDetails"].value("code", "")));
- return j.value("exchangeResponse", "");
+ // json::value() throws on a null field ("type must be string, but is null"):
+ // the service sends null exchangeResponse / error fields on a refusal, and the
+ // exception text hid the reason (field log 2026-10-02). Read only strings.
+ const auto text = [](const json& o, const char* key) {
+ return o.contains(key) && o[key].is_string() ? o[key].get<std::string>() : std::string();
+ };
+ std::string why;
+ if (j.contains("errorDetails") && j["errorDetails"].is_object()) {
+ const std::string code = text(j["errorDetails"], "code"), message = text(j["errorDetails"], "message");
+ why = message.empty() ? code : code.empty() ? message : code + " / " + message;
+ }
+ const std::string exchange = text(j, "exchangeResponse");
+ if (!why.empty() || exchange.empty()) {
+ log::warn("xbox", "exchange " + path.substr(path.rfind('/')) + " answered without a response: " + j.dump());
+ if (why.empty()) why = text(j, "status");
+ throw std::runtime_error(path.substr(path.rfind('/') + 1) + ": the console refused (" +
+ (why.empty() ? std::string("no reason given") : why) + ")");
+ }
+ return exchange;
}
std::this_thread::sleep_for(std::chrono::milliseconds(retryDelayMs_));
}