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++

Prepare 2.0.4 with NR controls, Xbox recovery and Claude UI fixes

Veyra Goal Agent270aaaae9ed6
diff --git a/AGENTS.md b/AGENTS.md
index 8d99b2de..b278ccac 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -1,5 +1,7 @@
# Veyra 项目 Agent 执行规则
+> **2026-10-05 2.0.4 整合与测试包授权**:用户要求检查其他分支及 Claude 刚完成的修复,与 NR 强度/三风格画面调控、采集/Xbox 修复整合到本地 main,打包 2.0.4 给用户测试并准备正式发布。工作树 `E:/项目/Veyra/worktrees/release-2.0.4-20261005`,分支 `codex/release-2.0.4-20261005`;按 `docs/RELEASE_2.0.4_PLAN_2026-10-05.md` 执行。本轮允许存档、提交、标签、本地 main 合并、必要版本/打包/翻译/定向验收及发现的整合缺陷修复;仅合入已审查的产品改动,不复活历史撤回实验。Claude UI 工作树的 18 份未提交文件已逐字节封存并复制,原工作区/桌面/用户配置保持。新 guard 为 `scripts/acceptance/release-2.0.4-control.py`,不可变 start 与全引用 bundle 在本轮 E 盘 archives。继续 NVIDIA/AMD 同源码分包,保留 patched FFmpeg、libass、原组件身份;不派 Agent、不跑压力或竞争负载。测试每进程≤300秒、构建≤900秒。此次是本地测试交付及发布准备,未请求新的 push/GitHub Release/上传或关机;HDR/Dolby PR13/14仍暂缓。本条覆盖此次整合所需的旧 main/分支冻结,不扩大无关算法或运行库改动范围。
+
> **2026-10-05 当前采集/Xbox现场反馈**:用户提交 `logs(4).7z`,最后明确 `veyra-qml(28).log` 为“xbox问题”。按 `docs/CAPTURE_XBOX_FIELD_PLAN_2026-10-05.md` 在 E 盘 `capture-xbox-field-20261005` / `codex/capture-xbox-field-20261005` 从 `33d6685` 隔离排查修复。这次仅涉及 Xbox 视频错误/丢AU后的关键帧恢复、有界硬解重开与必要软件回退、采集时间线诊断标签、定向测试/文档/本地候选;覆盖这些接点的历史冻结,不改 NR/颜色/补帧算法或串流协议。每轮先运行 `py -3.11 -B scripts/acceptance/capture-xbox-control.py`,不可变基线独立于旧 guards;main、其它 18 个工作区、用户配置和已有包保留。无新 merge/push/Release、压力测试、关机或子 Agent 授权;所有产物 E 盘,真实 Xbox/AMD 效果未实测不得称通过。
> **2026-10-05 NR 强度与画面调控授权**:用户明确要求“自动调控做为开关,在NR里,也可以选择手动调节,然后保留原版的强度5,开始吧搞定他”。仅在 `E:/项目/Veyra/worktrees/nr-strength-protection-20261005` / `codex/nr-strength-protection-20261005` 从本地 main `de18fc4` 隔离实施。按 `docs/NR_STRENGTH_PROTECTION_PLAN_2026-10-05.md` 修改共享 NR settings/预设/会话、graph/时域接点、残差 shader、QML bridge/逐层面板、翻译、来源 notice、必要 CMake/定向测试与本地打包;此明确范围覆盖历史 UI-only 冻结。默认调控关闭,保留原有路径及总变化量 0–5;自动和手动设置分别保存,不更换、修改或下载 NR DLL,不改采集/解码/音频/补帧/旧 Win32。允许本轮必要 commit/tag/源码 bundle 存档和完整本地候选交付,不包含新 merge/push/Release/关机,不派 Agent。所有产物 E 盘,测试每进程≤300秒、构建≤900秒,不制造 GPU 压力。每轮先运行 `py -3.11 -B scripts/acceptance/nr-protection-control.py guard`;旧 guard/baseline 保留,当前不可变基线独立保存。
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dcda029b..ad27eb79 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.24)
-project(veyra VERSION 2.0.3 LANGUAGES CXX RC)
+project(veyra VERSION 2.0.4 LANGUAGES CXX RC)
# Shown in the EXE's version resource and in the package name. CMake versions
# must be numeric, so the beta marker lives here instead.
-set(VEYRA_DISPLAY_VERSION "2.0.3" CACHE STRING "Human-readable version string")
+set(VEYRA_DISPLAY_VERSION "2.0.4" CACHE STRING "Human-readable version string")
# The cache keeps the first value it ever saw, so a release that bumps
# project(VERSION) used to ship an EXE still stamped with the previous display
# string. Re-align it whenever the cached label does not start with the project
diff --git a/README.md b/README.md
index 94712eae..58c460da 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,8 @@ A Windows enhancement player for videos, images, capture cards and streaming. Su
[Download 2.0.3 portable](https://github.com/Likely7/Veyra-NRVideo/releases/tag/v2.0.3) · [Full changelog: English / 中文](docs/RELEASE_NOTES_2.0.3.md) · [Issues](https://github.com/Likely7/Veyra-NRVideo/issues)
+**2.0.4 testing, 2026-10-05:** the local candidate combines the later performance/field fixes, NR strength 5 and style-specific automatic/manual picture control, bounded Xbox decoder recovery and Claude's latest UI repairs. List panels can be resized, slider numbers can be typed, floating mode buttons avoid picture clicks, and the complete frame-generation tab can be saved as a preset. GPU scheduling defaults to Realtime when no choice is saved; existing choices remain. [2.0.4 changes and test limits](docs/RELEASE_NOTES_2.0.4.md). The public download remains 2.0.3 until field testing and publication.
+
**Local development, 2026-10-05:** this branch includes later RTSS restart, custom playback rate, subtitle, UI refresh, Professional layout and fullscreen restoration repairs; public 2.0.3 assets do not include them. Every local NR optimization node now has a measured retain/reject decision: core reuse, single-NR caching, idle prewarming, paused-frame reuse, narrowly admitted compute queues and NVENC export scheduling are retained. Auto NR and coarse-to-fine sizes remain optional and change the image. Normal matched runs measured about 6.1 ms for native single-layer NR; the dual-NR/SR4K/DLSS2X pipeline improved 3.52%, with nearly unchanged submission P99. [The execution record](docs/PERF_EXECUTION_NR_2026-10-04.md) and [local regression evidence](docs/PERF_R0_ACCEPTANCE_2026-10-05.md) distinguish measurements and limitations. Severe background frame loss remains unresolved; reliable OBS Game Capture uses the existing compatibility mode, while GPU UI capture is unstable even in the sealed baseline. HDR/Dolby PRs remain deferred. [Current project status](docs/CURRENT_STATUS.md) distinguishes published, local and unverified work.
## Highlights
diff --git a/README_CN.md b/README_CN.md
index 31710824..9641c9d1 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -16,6 +16,8 @@ Windows 视频、图片、采集卡与串流增强工具。在同一处理链组
[下载 2.0.3 免安装版](https://github.com/Likely7/Veyra-NRVideo/releases/tag/v2.0.3) · [完整更新(English / 中文)](docs/RELEASE_NOTES_2.0.3.md) · [反馈](https://github.com/Likely7/Veyra-NRVideo/issues)
+**2.0.4 测试,2026-10-05:** 本地候选整合此前性能/现场修复、NR 强度5与三种风格自动/手动画面调控、Xbox 解码恢复和 Claude 最新 UI 修复。列表参数面板可拖动宽度,滑条数字可点击输入,浮窗切模式避免误触视频,补帧页全部参数可保存为预设。未保存选择时 GPU 优先级默认实时,旧选择保持。详见 [2.0.4 更新与测试边界](docs/RELEASE_NOTES_2.0.4.md)。用户测试和发布前,公开下载仍为2.0.3。
+
**本地开发进度,2026-10-05:** 此分支另含RTSS重启、自定义倍速、字幕、UI刷新、专业布局和全屏恢复修复,公开2.0.3包尚未包含。本机全部NR优化节点已有实测保留/拒绝处置:保留核心复用、单NR缓存、空闲预热、暂停复用、限定COMPUTE和NVENC导出调度;自动NR及先粗后细会改画面,只作可选。正常匹配对照单层原生NR约6.1ms,双NR+SR4K+DLSS2X整链减少3.52%,软件提交P99几乎未变。[执行账本](docs/PERF_EXECUTION_NR_2026-10-04.md)和[最终回归记录](docs/PERF_R0_ACCEPTANCE_2026-10-05.md)列明数据与限制。严重后台掉帧仍未确认根因;OBS游戏采集使用现有兼容模式,GPU界面捕获在封存基线也不稳定。HDR/杜比PR继续暂缓。
## 2.0.0 重点
diff --git a/docs/BRANCH_MAP_2026-10-05.md b/docs/BRANCH_MAP_2026-10-05.md
new file mode 100644
index 00000000..eb430adb
--- /dev/null
+++ b/docs/BRANCH_MAP_2026-10-05.md
@@ -0,0 +1,39 @@
+# 分支审查 2026-10-05 / 2.0.4
+
+统计相对整合前 main de18fc4;前列是 main 独有提交,后列是分支独有提交。用户其他工作树保留,不删除分支。
+
+| 分支 | main独有/分支独有 | 处理 |
+|---|---:|---|
+| claude/field-fixes-20261005 | 2/0 | 已在main历史内,保留分支 |
+| claude/rtss-compat-20261003 | 150/2 | 仅218c983/460aea9历史性能计划;已由PERF最终账本覆盖,不回退新版文档 |
+| claude/ui-fixes-20261005 | 0/2 | 两条NR提交9eb3b1c/33d6685纳入;另有18份未提交UI文件已存档并移植 |
+| codex/avermedia-51-switch-20260917 | 437/1 | 历史存档/诊断/撤回实验,非当前产品修复,不合入 |
+| codex/beta-latency-ab-20260918 | 393/1 | 历史存档/诊断/撤回实验,非当前产品修复,不合入 |
+| codex/capture-xbox-field-20261005 | 0/3 | 两条NR提交及Xbox恢复81b755b全部纳入 |
+| codex/export-page-20261002 | 205/0 | 已在main历史内,保留分支 |
+| codex/field-2.0.1-20261002 | 151/0 | 已在main历史内,保留分支 |
+| codex/field-issues-20260930 | 207/0 | 已在main历史内,保留分支 |
+| codex/field-upgrade-20261003 | 142/0 | 已在main历史内,保留分支 |
+| codex/github-source-archive | 791/2 | 历史存档/诊断/撤回实验,非当前产品修复,不合入 |
+| codex/minimal-edge-hdr-review-20261004 | 133/0 | 已在main历史内,保留分支 |
+| codex/nr-strength-protection-20261005 | 0/2 | 两条NR提交9eb3b1c/33d6685全部纳入 |
+| codex/obs-resize-20261002 | 158/0 | 已在main历史内;OBS工作树残留patch已由main较新实现覆盖,不重复移植 |
+| codex/perf-nr-20261004 | 3/0 | 已在main历史内,保留分支 |
+| codex/playback-smoothness-20261004 | 120/0 | 已在main历史内,保留分支 |
+| codex/player-startup-speed-20261003 | 148/0 | 已在main历史内,保留分支 |
+| codex/release-2.0.0-20261002 | 155/0 | 已在main历史内,保留分支 |
+| codex/release-2.0.2-20261003 | 145/0 | 已在main历史内,保留分支 |
+| codex/release-2.0.3-20261004 | 125/0 | 已在main历史内,保留分支 |
+| codex/release-2.0.4-20261005 | 0/3 | 本轮整合分支;含capture/Xbox+NR,复制Claude UI原字节 |
+| codex/rtss-restart-loop-20261004 | 123/0 | 已在main历史内,保留分支 |
+| codex/runtime-size-20261004 | 131/0 | 已在main历史内,保留分支 |
+| codex/smooth-motion-experiment | 591/1 | 历史存档/诊断/撤回实验,非当前产品修复,不合入 |
+| codex/ui-overlay-release-20261002 | 158/0 | 已在main历史内,保留分支 |
+| codex/ui-qml-migration-20260925 | 209/0 | 已在main历史内,保留分支 |
+| codex/vfg-integration-20261003 | 134/0 | 已在main历史内,保留分支 |
+| codex/vfg-research-20261003 | 141/0 | 已在main历史内,保留分支 |
+| main | 0/0 | de18fc4起点;本轮合并目标 |
+
+Claude最新用户授权与完成消息来自本地会话d79d2036-17a9-402a-8925-f9b9e0335fb2(2026-10-05 21:50–22:19 Asia/Taipei);UI源头HEAD33d6685,未提交文件18项。原始工作区未修改,其补丁、文件ZIP及逐SHA在本轮archives。
+
+旧OBS兼容已在main的apps/veyra-qml/main.cpp、bridge和SettingsPage实现并进一步加入RTSS重启策略。保留其未提交文件作历史,不覆盖现代版本。其余排除项包括AverMedia未完成诊断、1.4.2beta latency probe、最初源码存档及后来撤回的强制互斥Smooth Motion实验。HDR/Dolby PR13/14保持暂缓。
diff --git a/docs/CURRENT_STATUS.md b/docs/CURRENT_STATUS.md
index 9c905e7f..db32f756 100644
--- a/docs/CURRENT_STATUS.md
+++ b/docs/CURRENT_STATUS.md
@@ -1,5 +1,11 @@
# 当前项目状态 / Current Status
+## 2026-10-06 2.0.4 本地整合与发布准备
+
+已审查其他分支及Claude最新18份未提交UI修复,纳入当前NR强度5/三风格九参数调控、Xbox解码恢复,并保留main已有性能/计时/AMD NR/字幕/RTSS/倍速/布局修复。原桌面、Claude与其他工作区修改均完整保留;不把旧诊断/撤回实验重新合入。生产版本2.0.4构建与针对性回归通过,实际补帧切换、完整预设恢复/非法值拒绝、两层NR及HEVC4K60帧导出、Qt50项、两包独立启动/ASS和默认D3D12通过。最终EXE SHA dadb7cd28022a4ebff9291b4fc6b282e6253bad397fff7ae6f81ff2bf069322d。
+
+本地main合并与完整NVIDIA/AMD测试包封存按 [2.0.4验收](RELEASE_2.0.4_ACCEPTANCE_2026-10-05.md) 执行;最终commit、包大小/CRC/SHA与干净解压启动结果以E:/项目/Veyra同任务archives/main-merge.json、test-packages/DELIVERY.json、logs/cold-verify-results.json为准。公开版本仍2.0.3,未执行新push/Release。受影响Xbox/RX9070XT、RX9000 NR、RTX20/30/40、采集后台长稳与物理显示仍待对应用户实测;HDR/Dolby PR13/14继续暂缓。以下为历史阶段记录,不覆盖本轮事实。
+
## 2026-10-05 性能优化及 Claude 现场修复已合入本地 main
用户明确要求先合并再处理其他修复。已在 `E:/项目/Veyra/worktrees/main-merge-20261002` 完成本地 `--no-ff` 合并:合并前 main `354b1c6`,继承修复提交 `6e9d827`,合并提交 `f7ced91`。包含 NR 性能分支的完整历史、Claude 六组现场修复以及本轮接管验证记录;合并无冲突,合并树与已复测分支的 Git 树完全相同,后续仅更新合并文档。
diff --git a/docs/RELEASE_2.0.4_ACCEPTANCE_2026-10-05.md b/docs/RELEASE_2.0.4_ACCEPTANCE_2026-10-05.md
new file mode 100644
index 00000000..4acd349d
--- /dev/null
+++ b/docs/RELEASE_2.0.4_ACCEPTANCE_2026-10-05.md
@@ -0,0 +1,64 @@
+# 2.0.4 本地整合验收
+
+2026-10-05 开工,2026-10-06 凌晨完成生产程序回归。本轮整合 Claude 最新 UI、NR 三风格调控与 Xbox 恢复,既有 main 性能/现场修复保留。公开版本仍为 2.0.3,未执行新 push/Release。起点及所有分支判断见 RELEASE_2.0.4_PLAN_2026-10-05.md、BRANCH_MAP_2026-10-05.md。
+
+所有新产物按用途写入 `E:/项目/Veyra/{build,tests,logs,tmp,test-packages,verify,archives}/release-2.0.4-20261005/`。下述命令从该任务 worktree 执行,日志为同任务 logs 内对应 label.log/.json。每个测试进程有≤300秒超时,构建≤900秒;GPU工作串行,无压力负载。
+
+## 构建及实际身份
+
+- `py -3.11 -B scripts/acceptance/release-2.0.4-control.py`:其余19个已有工作树 HEAD/status/patch/未提交文件字节不变,原桌面及 Claude 修改保留;main 仅接受本轮 merge 回执所记状态。全引用 before bundle 已 verify,SHA256 `41787718148cee716ab790a4d12386a61409547eb260b60dc0d893f33491bf85`;start.json SHA256 `d7e95a9341a90b1550f5764246fe18376d01785727b383bc53a5038135f007f8`。
+- `py -3.11 -B scripts/acceptance/release-2.0.4-build.py build1`:518步/exit0,生产及测试目标构建成功。build2 修正补帧预设返回值,10步/exit0;build3 修正导出布局及补齐翻译,7步/exit0。使用已验 patched FFmpeg+dav1d、Qt6.8.3、静态 libass 及既有 SDK,不下载新运行库。
+- 最终主程序 SHA256 **`dadb7cd28022a4ebff9291b4fc6b282e6253bad397fff7ae6f81ff2bf069322d`**,FileVersion/ProductVersion 均 **2.0.4**。下述生产 app 用例均实跑该 EXE;后续只改验收文档/脚本,不改变产品输入。源码冻结哈希见外置 `logs/.../tested-inputs.json`。
+- `py -3.11 -B scripts/i18n/extract.py --check`:2010条,zh-TW/en/ja 缺失均0,placeholder problems=0;编译后的 i18n2 同时退出0。
+
+## 本轮实际通过
+
+测试命令格式:`py -3.11 -B scripts/acceptance/release-2.0.4-tests.py LABEL CASE [FIXTURE_OR_APP]`。APP 为 `E:/项目/Veyra/test-packages/release-2.0.4-20261005/Veyra-2.0.4-NVIDIA-win64-portable`;AMD 用对应 AMD 目录。
+
+| Label / CASE | 实际结果 |
+|---|---|
+| xbox1 / xbox | 97检查、0失败;本地协议/恢复测试,不连接远端账号/主机 |
+| scene1 / scene | 18检查、0失败 |
+| timing1 / timing | 78 PASS,采集真实PTS/节奏/断点及期限等回归 |
+| repair1 / repair | 246检查、0失败 |
+| chain1 / chain;preset1 / preset | 退出0,处理图与完整预设往返 |
+| legacy2 / legacy | 退出0,schema1–21/当前NR参数/容量/损坏保护等往返 |
+| i18n2 / i18n | 退出0,最终编译目录翻译 |
+| hardware1 / hardware | 56检查、0失败 |
+| vfgsettings1 / vfg-settings | 331检查、0失败 |
+| audio1 / audio | Xbox float、独立RTP原点、250音频块通过;非真实Xbox连接 |
+| codec1/codec2 / codec | 真实H.264软/硬解(无B/B2)、坏包flush/等待未来IDR、丢包像素/PTS、重开及软件替换、旧D3D12帧lease全部通过 |
+| temporal1 / temporal | 实际GPU时域回归通过 |
+| correction1 / correction;correctionfp161 / correction-fp16 | FP32/FP16各45检查:原始0/1/2/5一致、三风格、独立控制/HDR边界、debug错误/警告0 |
+| qml2 / qml | 50 passed、0 failed、0 skipped;真实Qt鼠标/键盘,含新数字输入/边界/小数/百分比/Enter/Esc/失焦,以及已有导出四窗口布局等 |
+| ui2 / ui | 6.141秒PASS;完整补帧预设保存/应用/重复拒绝/删除,模式与列表宽度/播放进展;GPU请求5、实际5/实时 |
+| uirestore2 / ui-restore | 3.641秒PASS;第二进程恢复并逐字段核对,故意加入flowQuality=99后拒绝完整成功并提示部分未生效,最后清理测试预设 |
+| hot2 / hot | FSR3.1→XeSS→DLSS→FSR3.1→关闭,各实际active后继续出帧;两层原版NR强度5,风格1自动/2手动,继续播放及PNG通过 |
+| nrexport2 / nr-export | 35.766秒PASS;原始5/自动/手动/关闭、四张PNG、列表/节点、预设/复制/重置、HEVC NVENC D3D12 4K导出;ffprobe确认60帧、3840×2160、HEVC |
+| nrrestore2 / nr-restore | 第二进程恢复列表/节点九项控制及力度,PASS |
+| smokeAMD1、smokeNVIDIA1 / smoke | 各Windows-only依赖PATH、隔离profile启动/播放/退出通过;libass内嵌5事件、1字体附件 |
+| smokeNative1 / smoke-native | 默认D3D12 UI(日志明确renderer=d3d12)、播放/字幕/退出通过;无强制软件渲染参数 |
+
+codec1/2 使用 `E:/项目/Veyra/tests/capture-xbox-field-20261005/media` 下无B及B2夹具;完整实际 argv 和 fixture SHA 见各 JSON。应用测试只临时向本任务候选 Main.qml 注入受控夹具,finally 原字节还原;用户配置、原包及其他工作树不改。
+
+## 失败与整合修复
+
+- legacy1 首次使用没有父目录的 `legacy-presets.v1`;既有保存接口创建空父路径失败,造成后续往返失败。测试改为隔离目录内 ASCII 相对路径 `presets/legacy-presets.v1`,legacy2 通过;不修改产品来迁就夹具。
+- nrexport1 的旧 MPEG4 人工 AVI 先触发既有硬解 -22 回退;同时真实导出过程中发现 Claude 新滚动条布局依赖 `visible`,宽度/换行高度/滚动条状态形成重排循环。保留失败日志,改为固定滚动条留白;使用新2秒/60帧H.264无B夹具后,nrexport2 正常导出且无错误/重排循环。不把 -22 隐藏为通过。
+- Claude 原补帧预设仅凭后端名称判断成功,其他字段拒绝或倍率截断仍会返回true。本轮逐字段核对实际设置;跨进程注入非法值的 uirestore2 已证实返回false与错误提示。
+- qml2 有继承测试 stub 缺少 exportStopsPlayback/playbackRate 属性的告警及焦点告警;50项均通过。生产 app 的上述用例没有对应 TypeError/ReferenceError/错误,不将测试告警说成产品全部无告警。
+- export-worker 将日志写到候选运行目录。仅将本任务新候选内的 export-worker 日志完整移到 `logs/.../candidate-worker-logs/`,记录原位置、目标和SHA;不进入交付包,不动旧包或用户文件。
+
+## 主线、组件与封存核验
+
+NVIDIA/AMD 使用同一最终 EXE;stage/refresh 的逐文件SHA、PE直接/delay imports与依赖闭包、厂商边界均通过。NVIDIA 215项、AMD 694项既有组件文件原字节保持(计数含许可证/manifest/模型,非DLL数量)。AMD包括此前补齐的8份libass许可证;不新增/修改运行二进制,不混入SDK/驱动、配置、测试媒体、日志/PDB/LIB。
+
+生产回归通过后才做本地 main 合并与封存。最终 sourceCommit、mainAfter/mainMerge、Git树一致性与 before/after 信息以 `archives/.../main-merge.json` 为准;源码ZIP仅含受版本控制的应用源码,最终 bundle 单独 verify。封存时要求源树/main干净,所有必要结果passed且app用例EXE SHA与最终EXE一致。
+
+ZIP大小/全SHA/CRC与每项载荷哈希的实际结论见 `test-packages/.../DELIVERY.json`(zipCrcAndAllPayloadHashesPassed);独立干净解压启动见 `logs/.../cold-verify-results.json`(两个passed)。后者仅用Windows系统PATH,并逐个核对实际加载Qt/FFmpeg模块来自刚解压目录,不依赖研发环境PATH。只有对应实际回执才构成封存验收,不能用本文件替代未执行的最后步骤。
+
+## 未验证边界
+
+真实RX9070XT+Xbox错误触发/恢复、RX9000 NR推理与画质、RTX20/30/40、受影响采集卡及后台长稳、用户616.92驱动、物理显示事件/端到端延迟未新增实机验收。采集日志输入60.009/s而处理54.453/s,不能说原增强组合已达到60处理FPS;Xbox底层 -22 触发器也未在本机复制。软件解码回退可能增加CPU/延迟。
+
+GPU实时档的系统拒绝/高档回退未在拒绝环境实测;原生HDR整套旧失败没有因本轮标为通过,HDR/Dolby PR13/14仍暂缓。暂停后才接入OBS的真人场景仍有缺口。不改用户驱动/配置,不派Agent或制造竞争负载,不执行公开push/Release/资产上传/关机。
diff --git a/docs/RELEASE_2.0.4_PLAN_2026-10-05.md b/docs/RELEASE_2.0.4_PLAN_2026-10-05.md
new file mode 100644
index 00000000..b779a2d2
--- /dev/null
+++ b/docs/RELEASE_2.0.4_PLAN_2026-10-05.md
@@ -0,0 +1,27 @@
+# 2.0.4 分支整合、用户测试与正式发布准备
+
+用户要求:检查其他分支和 Claude 新修复,与当前修复合并 main,打包 2.0.4 给用户测试,准备正式发布。此次执行到本地 main 与完整测试包;公开上传等用户实际测试结论。
+
+## 起点、隔离与保存
+
+- main 起点 `de18fc4f71843049dc7fd691898598c17af308f0`,已包含性能优化 `2dbf26c` 与 Claude 现场修复 `6e9d827`。
+- 当前 Xbox/采集修复 tip `81b755bf012fe7e0af55fb42e7ea1c3e8ed31ed3`,包含 NR 强度/画面调控 `9eb3b1c`、三风格续修 `33d6685`。新分支 `codex/release-2.0.4-20261005` 从该 tip 创建。
+- 工作树 `E:/项目/Veyra/worktrees/release-2.0.4-20261005`;所有产物按用途在 E:/项目/Veyra 的同名 build/tests/logs/tmp/test-packages/verify/archives 目录。
+- 全引用 `source-before.bundle` 已 verify,SHA256 `41787718148cee716ab790a4d12386a61409547eb260b60dc0d893f33491bf85`;不可变 start SHA256 `d7e95a9341a90b1550f5764246fe18376d01785727b383bc53a5038135f007f8`,在 archives 同任务目录。
+- 存档 20 个既有 worktree 的 HEAD、status、index/working binary patch、全部未提交/未跟踪文件原字节及哈希。main 之外的 19 个 checkout 保持原样;新 guard 每阶段复核。
+
+## 其他分支和 Claude 改动
+
+已读取最新 Claude 会话 `d79d2036-17a9-402a-8925-f9b9e0335fb2` 的真实用户指令与完成记录,逐项审查 `claude/ui-fixes-20261005` 的 18 份未提交文件,复制存档原字节到本分支,不替其工作树提交或覆盖。保留用户指定的默认 GPU 实时档及系统拒绝时高档回退;旧用户已保存的档位不改变。
+
+包括可拖拽列表面板/视频区域跟随、卡片间距和导出滚动条、调色开关窄列布局、滑条数字输入、胶囊切模式点击穿透防护、补帧页完整预设。旧 OBS 未提交改动已在 main 同等或更新实现,不重复移植。其余尚未并入的历史诊断/撤回实验不是本次产品修复;分支清单与判断记录在 BRANCH_MAP_2026-10-05.md。HDR/Dolby PR13/14继续暂缓。
+
+## 验证与交付顺序
+
+1. 最小整合、版本资源/CMake 2.0.4、双语说明/Release 草稿,构建生产目标与涉及的 CPU/GPU/Qt 测试。
+2. 新数字输入通过真实 Qt 输入验证范围、百分比/小数、Enter/Esc/失焦;实际桥接测试补帧预设保存/应用/删除/跨进程恢复,列表宽度与播放切页;同时回归 NR 原版强度5风格1/2、计时热切换、Xbox 错误恢复/真实软硬解、特效字幕、视频导出。
+3. NVIDIA/AMD 使用同一生产 EXE,继承已经核验的 streamfix1 两包组件原字节,只更新 EXE、QML、生成 shader 与文档;不复制原包后来产生的配置/日志。执行 PE 直接/delay imports、逐文件 manifest、厂商边界审计。
+4. 本地 main --no-ff 合并完整整合分支,最终 source tree 与实跑构建身份一致;源码 ZIP 独立,依赖对应源码和 libass 许可证保持。无新的 SDK/DLL/模型入源码。
+5. 最终包 ZIP CRC/全 payload SHA 与干净解压启动验证;保留准确大小/SHA/源码 commit、main 合并与 bundle 回执。用户先测试现场,再正式发布。
+
+每测试进程≤300秒,构建≤900秒,GPU工作串行且无压力/竞争负载。真实 RX9070XT+Xbox、RX9000 NR、20/30/40系列、用户采集卡/系统、物理显示节奏和主观画质未新增实机验证,不用本机5070结果替代。
diff --git a/docs/RELEASE_NOTES_2.0.4.md b/docs/RELEASE_NOTES_2.0.4.md
new file mode 100644
index 00000000..38959a14
--- /dev/null
+++ b/docs/RELEASE_NOTES_2.0.4.md
@@ -0,0 +1,39 @@
+# Veyra 2.0.4
+
+本地发布前测试候选 / local candidate for testing before publication. Public assets remain at 2.0.3.
+
+## 中文
+
+- **NR 画面调控:** 总变化强度最高5,保留关闭调控的原始效果;自动分别适配风格0/1/2,并可调力度。手动提供九项色彩、亮度、高光和时域保护。每层独立,列表/节点、会话/预设与导出使用同一设置。
+- **Xbox 恢复:** H.264 解码报错或压缩输入丢包后清理参考历史、等待关键帧;连续失败时每会话有界重开硬解,再失败回退软解;仍无法恢复时明确结束并保留失败原因。恢复首帧带时间线断点,音频不靠停声制造同步。
+- **UI:** 列表画面与参数面板之间可拖动,记忆宽度、双击还原,视频窗口随面板同步;滑条旁数字支持点击输入、Enter/失焦确认、Esc取消;修复极简浮窗切模式误触播放/暂停、调色开关窄列溢出、NR卡片间距与导出滚动条。
+- **补帧预设:** 独立保存/应用/删除补帧页倍率、方式、质量、运动、光流与内容节奏等完整配置,跨进程保留。逐字段核对实际设置,不可用或部分未生效时明确提示。
+- **播放与性能:** 整合已验证的核心/单NR缓存、暂停复用及限定队列/导出调度,自定义0.25–4倍速、布局/全屏恢复、RTSS重启兼容;预热默认关闭。GPU优先级无保存值时默认实时,系统拒绝时尝试高档并显示实际状态,用户旧选择保持。
+- **现场修复与字幕:** 采集跳帧不再错误地反馈为低源节奏/频繁清历史;播放期间请求退出进程电源节流,停止恢复系统策略。每次图重建恢复GPU耗时采样;AMD NR不再被非NVIDIA规范化逻辑关闭。libass渲染外挂/内嵌ASS特效和字体附件,普通SRT/VTT保持原样。
+
+分别提供完整 NVIDIA / AMD 包,两个包同一EXE,运行组件和模型原字节保持,保留 patched FFmpeg 和 libass 许可证。新文件夹解压运行 `veyra_qml_ui.exe`,不用下载SDK或源码才能运行。ZIP可用Windows或7-Zip解压。
+
+本机RTX5070的短测不能代替真实Xbox/RX9070XT、RX9000 NR、RTX20/30/40、受影响采集卡及后台系统场景。采集输入仍约60Hz,原NR+4K SR+3X组合实际消费约55–57fps,未宣称本版本该组合必达60fps。Xbox日志的硬解Invalid argument触发器尚未在AMD实机复制,恢复路径修复不等于驱动/补帧根因已查明。软件回退可能增加CPU与解码延迟,实时GPU优先级可能影响同时运行的其他程序,可在设置改为高/普通。可选Auto NR/先粗后细会改变画面;HDR/Dolby PR13/14继续暂缓。详见 [验收记录](RELEASE_2.0.4_ACCEPTANCE_2026-10-05.md)。
+
+## English
+
+- NR total strength reaches 5 with optional, per-layer automatic/manual picture control. Styles 0/1/2 have separate automatic defaults; nine manual controls and an amount slider are shared by sessions, presets and exports. Disabling control preserves the original residual behavior.
+- Xbox decoder recovery flushes reference history after hard errors or compressed-input loss, waits for a keyframe, and permits one hardware reopen followed by one software fallback per session. Persistent failures end with a preserved error; the first recovered frame resets enhancement history.
+- Professional panels are resizable and remember their width. Slider numbers accept typed values. Floating mode controls avoid unintended playback clicks; card spacing, narrow colour controls and the export scrollbar are repaired.
+- Frame-generation presets save the complete tab and survive restart. Applied values are checked individually, with an explicit message for unavailable or partially applied settings.
+- Includes later NR performance work, custom playback rate, RTSS compatibility and fullscreen/layout repairs. Prewarming defaults off. An unset GPU scheduling preference now requests Realtime, with an explicit High fallback when refused; saved preferences remain unchanged.
+- Includes capture cadence/drop recovery, measured GPU timing after graph rebuilds, AMD NR enablement and libass animated/embedded ASS subtitles with font attachments.
+
+Choose the NVIDIA or AMD portable ZIP for the active GPU. Both use one production EXE, unchanged audited runtimes, patched FFmpeg and libass notices. Local RTX5070 regression is not actual Xbox/RX9070XT, RX9000 inference, other RTX hardware, capture-card or physical-display certification. Software decoding can add CPU/latency; GPU priority can be changed in Settings. The original demanding capture combination is not guaranteed to reach 60 processed fps. HDR/Dolby PR13/14 remain deferred.
+
+## 支持与反馈 / Support & feedback
+
+<p align="center">
+ <img src="https://raw.githubusercontent.com/Likely7/Veyra-NRVideo/v1.4.0/docs/images/1.4.0/donate-wechat.jpg" alt="微信赞助" width="220">
+ &nbsp;&nbsp;&nbsp;&nbsp;
+ <img src="https://raw.githubusercontent.com/Likely7/Veyra-NRVideo/v2.0.0/docs/images/2.0.0/community-group.png" alt="Veyra 交流群 4" width="220">
+</p>
+
+左:微信赞助(自愿,不影响功能);右:交流群。群码按图片标注于 **2026-10-09 前**有效,过期请查看仓库更新。
+
+Left: optional donation; right: community group. QR valid before 2026-10-09.
diff --git a/docs/UI_FIXES_2026-10-05.md b/docs/UI_FIXES_2026-10-05.md
new file mode 100644
index 00000000..7be4cfc4
--- /dev/null
+++ b/docs/UI_FIXES_2026-10-05.md
@@ -0,0 +1,24 @@
+# UI 修复 2026-10-05(claude/ui-fixes-20261005)
+
+基于 `33d6685`(NR 强度 / 画面调控),独立工作树 `worktrees/ui-fixes-20261005`,未改 Codex 正在修改的采集 / Xbox 文件。
+
+| # | 现场问题 | 原因 | 修改 |
+|---|---|---|---|
+| 1 | 列表模式参数面板宽度固定 376px | `ProPage` 与 `Main.videoRect()` 都写死 376 | 画面与面板之间 10px 间隙可拖动(`pro-inspector-split`),宽度存偏好 `listInspectorWidth`(376–4000,QML 再按窗口限制:画面至少 640px),双击还原;原生视频窗口随宽度同步;画面列变窄时“信号”卡先隐藏,“GPU 阶段耗时”去掉条形与预算字样 |
+| 2 | NR 层标题与“复制此层”行贴在一起 | `VAccordion` 内容区无顶部间距 | 全部折叠卡内容区顶部 +8px;`VGroup` 首/尾不是 `VRow`(说明文字、按钮)时补 10px(导出页“音轨”卡同类问题) |
+| 3 | 有滚动条时“调色”开关超出卡片 | 工具行全文宽度 > 可用宽度,布局按最小宽度撑开整列,开关被推出;100% 已超 3px,125–150% 更明显 | 放不下时“一键还原”只留图标(悬停提示) |
+| 4 | 滑条数值不能直接输入 | 只有双击滑条可输入 | 新组件 `VSliderValue`:点击数字原位输入,Enter/失焦应用,Esc 取消;`VRow`、调色、混色器、节点页、串流码率、稳定器均接入;稳定强度/变化容差补上数值 |
+| 5 | 极简模式切到其他模式时视频被暂停/播放 | 顶部胶囊在画面上方,窗口级“点画面暂停”与胶囊按钮同时收到这次点击 | 按下点落在任何 `videoCover`(胶囊、弹出层、提示)上时,画面点击/双击/串流抓取都忽略 |
+| 6 | GPU 优先级默认“普通” | — | 未设置时默认“实时”;系统拒绝实时时自动退到“高”并显示“系统未接受设置,当前:高” |
+| 7 | 补帧页设置不能存预设 | 整链预设只带倍率/后端/VFG 质量/运动来源 | 补帧页新增“补帧预设”(同“颜色预设”):保存/应用/删除补帧方式、倍率、VFG 质量、运动来源、光流算法、AMD 性能档、运动估算质量、内容节奏、严格节奏、低延迟队列;存于界面偏好 `fgPresets`(最多 32 个),应用时逐项走原控件的校验 |
+
+附带:导出页设置列滚动条原先停在左上角(自定义 ScrollBar 没有位置),已放到右侧并留出间距。
+
+## 验证(RTX 5070,本机)
+
+- 构建:`tmp/ui-fixes-20261005/build.py` → `build/ui-fixes-20261005/B`,通过。
+- Qt Quick 组件测试 40/40 通过(`tmp/ui-fixes-20261005/quick.py`)。
+- 截图核对(`tmp/ui-fixes-20261005/shot.py`,PostMessage 模拟点击,不动真实鼠标):150% 缩放下调色开关在卡内;NR 层间距;点击“0.00”输入 1.5 回车生效;拖动分隔条宽度保存并且播放中视频窗口跟随;补帧预设保存→修改→应用(3X、严格节奏、质量、采集 60→30)全部生效;导出页 150%。
+- 极简→专业:旧 `Main.qml` 点胶囊“专业模式”日志出现 `[ui-transport] pause`,新版本无此记录且已切到专业页。
+- GPU 优先级:本机非管理员 `requested=5 actual=5 state=1`(实时生效)。其他机器若拒绝会回落“高”,未在拒绝环境实测。
+- 翻译:新增 14 条,zh-TW 自动转换,en/ja 手写(未经母语审校)。
diff --git a/docs/WORKLOG.md b/docs/WORKLOG.md
index 182af998..a3d43c9b 100644
--- a/docs/WORKLOG.md
+++ b/docs/WORKLOG.md
@@ -1,5 +1,15 @@
# Veyra 工作记录
+## 2026-10-05~06 2.0.4 分支整合与发布前测试
+
+用户明确授权检查各分支/Claude最新修复、整合当前修复到main并打包2.0.4测试。本轮从81b755b建隔离release-2.0.4-20261005;整合前main de18fc4已含性能及Claude现场修复6e9d827。审查29分支/20既有worktree,完整before bundle已verify,全部未提交/未跟踪文件原字节/补丁/hash保存;其余19工作树和原桌面保持。Claude最新21:50~22:19会话18份未提交UI文件从封存ZIP移植,保留原分支和未提交状态;旧OBS等价实现已在main,不重复覆盖,旧诊断/撤回实验不混入产品。
+
+生产build1 518步/0,补帧预设实际参数核对build2 10步/0,固定导出滚动条留白及Xbox缺失翻译build3 7步/0。最终EXE dadb7cd28022a4ebff9291b4fc6b282e6253bad397fff7ae6f81ff2bf069322d,版本资源2.0.4。所有命令/结果/失败与边界见 RELEASE_2.0.4_ACCEPTANCE_2026-10-05.md:Xbox97/0、scene18/0、timing78、repair246/0、能力56/0、VFG331/0、旧/新预设、250Xbox音频块、两组真实软硬解、时域GPU、FP32/FP16各45、Qt50/0、FG完整预设恢复与非法值拒绝、真实FSR/XeSS/DLSS切换及两层原版NR5、HEVC4K完整60帧导出/恢复、两包隔离启动/ASS与默认D3D12均通过。保留legacy1夹具空父目录和nrexport1旧MPEG4回退/真实QML重排循环失败证据,修复后的结果单列。
+
+全部新产物在 E:/项目/Veyra/{build,tests,logs,tmp,test-packages,verify,archives}/release-2.0.4-20261005。NVIDIA/AMD同EXE、215/694既有组件文件(含许可证/manifest/模型)原字节不变,不新增runtime/SDK入Git。源码与组件物理分离,候选worker日志移到同任务logs并留SHA。生产输入冻结、本地主线合并、最终源码/ZIP/CRC/载荷hash与独立解压启动分别以tested-inputs.json、main-merge.json、DELIVERY.json和cold-verify-results.json为准,不能以计划或旧记录冒充完成。
+
+真实Xbox/RX9070XT、RX9000 NR、20/30/40、受影响采集卡/后台长稳、驱动616.92、物理显示/端到端延迟未验;本版本未承诺原NR+4K+3X组合60处理FPS或底层Xbox驱动/FG故障根因已确定。无新公开push/Release/资产上传,未改用户配置/驱动,无压力/竞争程序、子Agent或关机。用户先测试后再正式发布,正式Release双width220二维码草稿保留。
+
## 2026-10-05 采集60→55–57FPS与Xbox补帧冻结:开工证据
当前以用户最终更正的28日志处理Xbox,不拿26本地HEVC/AMD NR日志代替。已安全解包7z并复制/hash输入到 `E:/项目/Veyra/logs/capture-xbox-field-20261005/input`,64,005行采集日志和17,076行Xbox日志;归档内容只作证据。采集callback/PTS60Hz,rev16 GPU完成FPS中位55/输入60,实际mailbox丢帧;不能伪改输入数字或承诺全部增强固定60。Xbox 487次D3D12VA send_packet EINVAL,FG重建附近开始、音频继续;缺少错误后的flush及输入AU丢失的参考链reset,SDK/driver根因尚不能确定。
diff --git a/i18n/catalog.json b/i18n/catalog.json
index 7225d933..f1ce74f9 100644
--- a/i18n/catalog.json
+++ b/i18n/catalog.json
@@ -1624,6 +1624,13 @@
"en": "The Xbox sent no decodable picture; reconnect.",
"ja": "Xbox からデコード可能な映像が届きません。再接続してください。"
},
+ {
+ "zh": "Xbox 视频解码连续失败,恢复后仍无法出画。请重连,并保留日志。",
+ "src": "src/source/XboxSessionSource.cpp",
+ "zh-TW": "Xbox 影片解碼連續失敗,恢復後仍無法顯示畫面。請重新連線,並保留日誌。",
+ "en": "Xbox video decoding failed repeatedly and could not recover a picture. Reconnect and keep the logs.",
+ "ja": "Xbox の映像デコードが連続して失敗し、復旧後も映像を表示できませんでした。再接続し、ログを保存してください。"
+ },
{
"zh": "Xbox 登录已失效,请重新登录。",
"src": "src/source/XboxSessionSource.cpp",
@@ -2618,6 +2625,13 @@
"en": "The saved capture format is no longer available; choose the resolution, frame rate and pixel format again.",
"ja": "保存したキャプチャーフォーマットは使用できません。解像度、フレームレート、ピクセル形式を選び直してください。"
},
+ {
+ "zh": "保存补帧页全部设置",
+ "src": "qml/ProPage.qml",
+ "zh-TW": "儲存補幀頁全部設定",
+ "en": "Saves every setting on the Frame Gen tab",
+ "ja": "フレーム生成タブの設定をすべて保存します"
+ },
{
"zh": "保存超时",
"src": "src/ui/QmlPlayerBridge.cpp",
@@ -3347,6 +3361,13 @@
"en": "Delete node",
"ja": "ノードを削除"
},
+ {
+ "zh": "删除补帧预设失败",
+ "src": "src/ui/QmlPlayerBridge.cpp",
+ "zh-TW": "刪除補幀預設失敗",
+ "en": "Could not delete the frame generation preset",
+ "ja": "フレーム生成プリセットを削除できませんでした"
+ },
{
"zh": "删除这一层",
"src": "qml/ProPage.qml",
@@ -5447,6 +5468,13 @@
"en": "Saved device (not connected)",
"ja": "保存済みのデバイス(未接続)"
},
+ {
+ "zh": "已保存补帧预设:%1",
+ "src": "src/ui/QmlPlayerBridge.cpp",
+ "zh-TW": "已儲存補幀預設:%1",
+ "en": "Frame generation preset saved: %1",
+ "ja": "フレーム生成プリセットを保存しました:%1"
+ },
{
"zh": "已保存颜色预设:%1",
"src": "src/ui/QmlPlayerBridge.cpp",
@@ -5615,6 +5643,13 @@
"en": "Color settings copied",
"ja": "カラー設定をコピーしました"
},
+ {
+ "zh": "已存在同名补帧预设",
+ "src": "src/ui/QmlPlayerBridge.cpp",
+ "zh-TW": "已存在同名補幀預設",
+ "en": "A frame generation preset with this name already exists",
+ "ja": "同じ名前のフレーム生成プリセットがすでにあります"
+ },
{
"zh": "已存在同名颜色预设",
"src": "src/ui/QmlPlayerBridge.cpp",
@@ -5664,6 +5699,20 @@
"en": "Color preset exported",
"ja": "カラープリセットを書き出しました"
},
+ {
+ "zh": "部分补帧设置未被当前显卡或组件接受:%1",
+ "src": "src/ui/QmlPlayerBridge.cpp",
+ "zh-TW": "部分補幀設定未被目前顯卡或元件接受:%1",
+ "en": "Some frame generation settings were not accepted by the current GPU or components: %1",
+ "ja": "現在のGPUまたはコンポーネントで一部のフレーム生成設定を適用できませんでした:%1"
+ },
+ {
+ "zh": "已应用补帧预设:%1",
+ "src": "src/ui/QmlPlayerBridge.cpp",
+ "zh-TW": "已應用補幀預設:%1",
+ "en": "Frame generation preset applied: %1",
+ "ja": "フレーム生成プリセットを適用しました:%1"
+ },
{
"zh": "已开启",
"src": "qml/ProPage.qml",
@@ -6756,6 +6805,13 @@
"en": "Drag to an input port to connect, or click and then click an input port; right-click to disconnect",
"ja": "入力ポートへドラッグして接続、またはクリック後に入力ポートをクリック。右クリックで切断"
},
+ {
+ "zh": "拖动调整参数面板宽度 · 双击还原",
+ "src": "qml/ProPage.qml",
+ "zh-TW": "拖曳調整參數面板寬度 · 雙擊還原",
+ "en": "Drag to resize the settings panel · double-click to reset",
+ "ja": "ドラッグで設定パネルの幅を変更 · ダブルクリックで元に戻す"
+ },
{
"zh": "按下新按键…",
"src": "qml/SettingsPage.qml",
@@ -7674,6 +7730,13 @@
"en": "No timing for this node yet",
"ja": "このノードの計測はまだありません"
},
+ {
+ "zh": "暂无补帧预设",
+ "src": "qml/ProPage.qml",
+ "zh-TW": "暫無補幀預設",
+ "en": "No frame generation presets yet",
+ "ja": "フレーム生成プリセットはまだありません"
+ },
{
"zh": "暂无颜色预设",
"src": "qml/ColourPanel.qml",
@@ -10579,6 +10642,13 @@
"en": "FG off",
"ja": "フレーム生成オフ"
},
+ {
+ "zh": "补帧关闭",
+ "src": "src/ui/QmlPlayerBridge.cpp",
+ "zh-TW": "補幀關閉",
+ "en": "Frame generation off",
+ "ja": "フレーム生成オフ"
+ },
{
"zh": "补帧只能放在链路最后",
"src": "src/engine/EffectChain.cpp",
@@ -10663,6 +10733,41 @@
"en": "The frame generation choice was not accepted; previous setting kept. Check the multiplier and backend capability",
"ja": "フレーム生成の選択が受け付けられなかったため、元の設定のままです。倍率と方式の対応範囲を確認してください"
},
+ {
+ "zh": "补帧预设",
+ "src": "qml/ProPage.qml",
+ "zh-TW": "補幀預設",
+ "en": "Frame generation presets",
+ "ja": "フレーム生成プリセット"
+ },
+ {
+ "zh": "补帧预设不存在",
+ "src": "src/ui/QmlPlayerBridge.cpp",
+ "zh-TW": "補幀預設不存在",
+ "en": "The frame generation preset does not exist",
+ "ja": "フレーム生成プリセットが存在しません"
+ },
+ {
+ "zh": "补帧预设保存失败",
+ "src": "src/ui/QmlPlayerBridge.cpp",
+ "zh-TW": "補幀預設儲存失敗",
+ "en": "Could not save the frame generation preset",
+ "ja": "フレーム生成プリセットを保存できませんでした"
+ },
+ {
+ "zh": "补帧预设名称需为 1–48 个字符",
+ "src": "src/ui/QmlPlayerBridge.cpp",
+ "zh-TW": "補幀預設名稱需為 1–48 個字符",
+ "en": "Frame generation preset names must be 1–48 characters",
+ "ja": "フレーム生成プリセット名は 1–48 文字にしてください"
+ },
+ {
+ "zh": "补帧预设最多保存 32 个",
+ "src": "src/ui/QmlPlayerBridge.cpp",
+ "zh-TW": "補幀預設最多儲存 32 個",
+ "en": "Up to 32 frame generation presets can be saved",
+ "ja": "フレーム生成プリセットは 32 個まで保存できます"
+ },
{
"zh": "裁剪范围超出画面",
"src": "src/source/ScreenCaptureSource.cpp",
@@ -13925,13 +14030,6 @@
"en": "; temporary file kept: ",
"ja": ";一時ファイルを保持しました:"
},
- {
- "zh": ";切到后台卡顿时可试“高”,“实时”可能拖慢其他程序",
- "src": "qml/SettingsPage.qml",
- "zh-TW": ";切到背景卡頓時可試「高」,「即時」可能拖慢其他程式",
- "en": "; if playback stutters in the background try \"High\"; \"Realtime\" can slow other apps",
- "ja": ";バックグラウンドでカクつく場合は「高」を試してください。「リアルタイム」は他のアプリを遅くすることがあります"
- },
{
"zh": ";各段文件已保留:",
"src": "src/engine/VideoExportJob.cpp",
@@ -13966,6 +14064,13 @@
"zh-TW": ";本次匯出使用 AMD FSR 超解析",
"en": "; this export uses AMD FSR super resolution",
"ja": ";今回の書き出しは AMD FSR 超解像を使用します"
+ },
+ {
+ "zh": ";默认“实时”,同时运行游戏或其他重负载程序变慢时可改为“高”或“普通”",
+ "src": "qml/SettingsPage.qml",
+ "zh-TW": ";預設“即時”,同時執行遊戲或其他重負載程式變慢時可改為“高”或“普通”",
+ "en": "; Realtime by default. If a game or other heavy program running alongside slows down, choose High or Normal",
+ "ja": ";既定は「リアルタイム」。同時に動かすゲームや重い処理が遅くなる場合は「高」か「通常」に変更してください"
}
]
}
diff --git a/include/veyra/ui/QmlPlayerBridge.h b/include/veyra/ui/QmlPlayerBridge.h
index ee749f79..c69e0594 100644
--- a/include/veyra/ui/QmlPlayerBridge.h
+++ b/include/veyra/ui/QmlPlayerBridge.h
@@ -457,6 +457,11 @@ class QmlPlayerBridge : public QObject {
// node's settings, separate from the whole-chain presets.
Q_PROPERTY(QVariantList lutLibrary READ lutLibrary NOTIFY colourLibraryChanged)
Q_PROPERTY(QVariantList colourLooks READ colourLooks NOTIFY colourLibraryChanged)
+ // 补帧预设 (field request 2026-10-05): the whole 补帧 tab - backend, multiplier,
+ // motion source, optical flow, flow quality, content cadence, strict pacing and
+ // the low-latency queue - kept in the shell preferences, apart from the
+ // whole-chain presets (which carry only the multiplier and backend).
+ Q_PROPERTY(QVariantList fgPresets READ fgPresets NOTIFY fgPresetsChanged)
public:
bool amdNrGpu() const;
@@ -941,6 +946,10 @@ public:
Q_INVOKABLE bool importColourLook(const QString& path);
Q_INVOKABLE void exportColourLookDialog(int index);
Q_INVOKABLE bool exportColourLook(int index, const QString& path);
+ QVariantList fgPresets() const;
+ Q_INVOKABLE bool saveFgPreset(const QString& name, bool replace);
+ Q_INVOKABLE bool applyFgPreset(int index);
+ Q_INVOKABLE bool deleteFgPreset(int index);
// The native HWND the engine presents into. The UI creates it as a child
// window of the QML window and hands it over; the bridge never draws QML
@@ -1048,6 +1057,7 @@ signals:
void subtitleTextChanged();
void preferencesChanged();
void colourLibraryChanged();
+ void fgPresetsChanged();
// Emitted only when the underlying snapshot actually changed, so QML
// bindings do not re-evaluate 60 times a second for nothing.
void snapshotChanged();
diff --git a/qml/Veyra/ColourMixer.qml b/qml/Veyra/ColourMixer.qml
index 0e9297af..0a7639a5 100644
--- a/qml/Veyra/ColourMixer.qml
+++ b/qml/Veyra/ColourMixer.qml
@@ -64,6 +64,7 @@ ColumnLayout {
elide:Text.ElideRight
}
VSlider {
+ id:mixerSlider
resettable:true;defaultValue:0
valueFromModel:true
objectName:"colour-mixer-"+modelData.key
@@ -74,13 +75,12 @@ ColumnLayout {
value:root.state[modelData.key][root.band]
onMoved:value=>root.edited(modelData.key+"."+root.band,Math.round(value))
}
- Text {
+ VSliderValue {
objectName:"colour-mixer-value-"+modelData.key
Layout.minimumWidth:40;Layout.maximumWidth:40;Layout.preferredWidth:40
+ slider:mixerSlider
readonly property int amount:Math.round(root.state[modelData.key][root.band])
- text:(amount>0?"+":"")+String(amount);color:Theme.t1
- font.family:Theme.fontMono;font.pixelSize:Theme.fsSmall
- horizontalAlignment:Text.AlignRight
+ text:(amount>0?"+":"")+String(amount)
}
}
}
diff --git a/qml/Veyra/ColourPanel.qml b/qml/Veyra/ColourPanel.qml
index 1284d0b2..9773ef96 100644
--- a/qml/Veyra/ColourPanel.qml
+++ b/qml/Veyra/ColourPanel.qml
@@ -106,6 +106,7 @@ ColumnLayout {
elide:Text.ElideRight
}
VSlider {
+ id:paramSlider
objectName:"colour-param-"+key
valueFromModel:true
resettable:true;defaultValue:spec.defaultValue
@@ -119,11 +120,10 @@ ColumnLayout {
key==="calibrationHue.1"?greenCalibrationTrack:key==="calibrationHue.2"?blueCalibrationTrack:null
onMoved:value=>panel.api.setColourParameter(key,Math.round(value/spec.step)*spec.step)
}
- Text {
+ VSliderValue {
Layout.minimumWidth:40;Layout.maximumWidth:40;Layout.preferredWidth:40
- text:panel.valueFor(key).toFixed(spec.step<1?2:0);color:Theme.t1
- font.family:Theme.fontMono;font.pixelSize:Theme.fsSmall
- horizontalAlignment:Text.AlignRight
+ slider:paramSlider
+ text:panel.valueFor(key).toFixed(spec.step<1?2:0)
}
}
}
@@ -142,6 +142,13 @@ ColumnLayout {
border.color:Theme.stroke
property real motionDy:0
transform:Translate {y:colourTop.motionDy}
+ // The tool row at its full labels. A layout whose children need more than
+ // its width grows past its anchors, which pushed the 调色 switch out of the
+ // card once the inspector scrollbar took its gutter (field report 2026-10-05,
+ // 125-150 % scale); narrower than this, 一键还原 keeps only its icon.
+ TextMetrics {id:holdMetrics;font.family:Theme.fontUi;font.pixelSize:Theme.fsBody;font.weight:Font.Medium;text:qsTr("按住看原图")}
+ TextMetrics {id:resetMetrics;font.family:Theme.fontUi;font.pixelSize:Theme.fsBody;font.weight:Font.Medium;text:qsTr("一键还原")}
+ readonly property bool compactTools:topCol.width<4*28+5*2+holdMetrics.advanceWidth+resetMetrics.advanceWidth+2*47+8
ColumnLayout {
id:topCol
anchors.left:parent.left;anchors.right:parent.right;anchors.top:parent.top
@@ -215,7 +222,11 @@ ColumnLayout {
VButton {
objectName:"colour-reset-all"
implicitHeight:28
- ghost:true;iconName:"reset";text:qsTr("一键还原")
+ ghost:true;iconName:"reset"
+ icon:colourTop.compactTools
+ text:icon?"":qsTr("一键还原")
+ tip:icon?qsTr("一键还原"):""
+ Accessible.name:qsTr("一键还原")
onClicked:panel.api.resetColourGroup(-1)
}
}
diff --git a/qml/Veyra/DialogHost.qml b/qml/Veyra/DialogHost.qml
index 8970f9f8..b7b2c731 100644
--- a/qml/Veyra/DialogHost.qml
+++ b/qml/Veyra/DialogHost.qml
@@ -862,12 +862,11 @@ Item {
value: mlDialog.cfg.bitrate || 150
onMoved: v => mlDialog.ml.set("bitrate", Math.max(5, Math.round(v / 5) * 5))
}
- Text {
+ VSliderValue {
Layout.preferredWidth: 72
+ slider: bitrateSlider
+ horizontalAlignment: Text.AlignLeft
text: Math.max(5, Math.round((bitrateSlider.dragging ? bitrateSlider.dragValue : bitrateSlider.value) / 5) * 5) + " Mbps"
- color: Theme.t1
- font.family: Theme.fontMono
- font.pixelSize: Theme.fsSmall
}
}
}
diff --git a/qml/Veyra/ExportPage.qml b/qml/Veyra/ExportPage.qml
index 362e506e..0e2dc4c4 100644
--- a/qml/Veyra/ExportPage.qml
+++ b/qml/Veyra/ExportPage.qml
@@ -227,10 +227,20 @@ VPage {
anchors.fill: parent; anchors.margins: 12
contentWidth: availableWidth
clip: true
- ScrollBar.vertical: ExportScrollBar {}
+ // A ScrollView's own bar is placed by the style; a replacement must place
+ // itself, or it sits at the top-left corner under 输出设置 (2026-10-05).
+ ScrollBar.vertical: ExportScrollBar {
+ id: settingsBar
+ parent: settingsScroll
+ x: settingsScroll.mirrored ? 0 : settingsScroll.width - width
+ y: settingsScroll.topPadding
+ height: settingsScroll.availableHeight
+ }
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ColumnLayout {
- width: settingsScroll.availableWidth
+ // Keep a stable gutter: changing width with the bar's visibility
+ // changes wrapped height and can toggle the bar in a polish loop.
+ width: Math.max(1, settingsScroll.availableWidth - settingsBar.width - 2)
spacing: 10
VH2 { text: qsTr("输出设置"); font.pixelSize: 14 }
VRow { label: qsTr("类型"); VSeg { options: [{id: "video", label: qsTr("视频")}, {id: "image", label: qsTr("图片")}]; current: root.exportKind; onPicked: id => root.exportKind = id } }
diff --git a/qml/Veyra/Main.qml b/qml/Veyra/Main.qml
index b27b8948..f006c9ff 100644
--- a/qml/Veyra/Main.qml
+++ b/qml/Veyra/Main.qml
@@ -219,9 +219,10 @@ Window {
// .pro grid: 1fr 376px, gap 10, padding 14. The video wrap is column
// 1 row 2; .meters below it is a fixed 172px; .pro-head is 32; and the
// card's own .vbar is 36px at its foot, which the picture must not cover.
+ // The inspector column can be widened by its splitter (inspectorWidth).
return { x: 14,
y: 14 + 32 + 10,
- width: Math.max(1, width - 376 - 14 * 2 - 10 - 14),
+ width: Math.max(1, width - proPage.inspectorWidth - 14 * 2 - 10 - 14),
height: Math.max(1, height - 14 * 2 - 32 - 10 - 172 - 10 - 36) }
case "node":
// .nodeview padding 14; .nv-top (330px by default, the splitter under
@@ -258,6 +259,8 @@ Window {
ProPage {
id: proPage
pageId: "pro"
+ // The splitter moves the picture's right edge with it.
+ onInspectorWidthChanged: if (root.page === "pro" && !root.fullscreen) videoHost.syncRect()
home: pages
overlay: root.quickPanelShown
onRequestFullscreen: root.toggleFullscreen()
@@ -465,11 +468,31 @@ Window {
return p.x >= videoHost.x && p.y >= videoHost.y && p.x <= videoHost.x + videoHost.width
&& p.y <= videoHost.y + videoHost.height
}
+ // Anything floating over the picture is cut out of the video window (videoCover:
+ // the dock, popovers, tips). A click on it belongs to it, never to the picture:
+ // the window-wide handlers below used to see the dock's 专业模式 click too, so
+ // leaving 极简 also paused or resumed the film (field report 2026-10-05).
+ function overVideoCover(scenePoint) {
+ const visit = item => {
+ if (!item || !item.visible || item.opacity <= 0) return false
+ if (item.objectName === "videoCover" || item.videoCover === true) {
+ const q = item.mapFromItem(null, scenePoint.x, scenePoint.y)
+ if (q.x >= 0 && q.y >= 0 && q.x <= item.width && q.y <= item.height) return true
+ }
+ for (let i = 0; i < item.children.length; ++i) if (visit(item.children[i])) return true
+ return false
+ }
+ return visit(root.contentItem.parent ? root.contentItem.parent : root.contentItem)
+ }
TapHandler {
id: pictureTap
enabled: !root.fullLocked
+ // Judged where the press landed: by the release the page may already have changed.
+ property bool pressOnCover: false
+ onPressedChanged: if (pressed) pressOnCover = root.overVideoCover(point.scenePosition)
onTapped: (eventPoint, button) => {
const p = eventPoint.position
+ if (pressOnCover) return
if (root.page !== "min" && root.page !== "pro" && root.page !== "node" && !root.fullscreen) return
if (dialogs.dialog !== "" || !veyra.hasSource) return
if (root.fullscreen && root.quickPanelShown && proPage.overlayContains(p.x, p.y)) return
@@ -482,8 +505,11 @@ Window {
}
TapHandler {
enabled: !root.fullLocked
+ property bool pressOnCover: false
+ onPressedChanged: if (pressed) pressOnCover = root.overVideoCover(point.scenePosition)
onDoubleTapped: (eventPoint, button) => {
const p = eventPoint.position
+ if (pressOnCover) return
if (root.fullscreen) {
if (root.quickPanelShown && proPage.overlayContains(p.x, p.y)) return
root.toggleFullscreen()
@@ -501,8 +527,11 @@ Window {
// (Ctrl+Alt+Shift+Z). While captured the clicks belong to the host and never get here.
TapHandler {
enabled: veyra.moonlight && veyra.moonlight.state.streaming === true && !veyra.moonlightCaptured && dialogs.dialog === ""
+ property bool pressOnCover: false
+ onPressedChanged: if (pressed) pressOnCover = root.overVideoCover(point.scenePosition)
onTapped: eventPoint => {
const p = eventPoint.position
+ if (pressOnCover) return
if (root.page !== "min" && root.page !== "pro" && root.page !== "node") return
if (p.x < videoHost.x || p.y < videoHost.y || p.x > videoHost.x + videoHost.width
|| p.y > videoHost.y + videoHost.height) return
diff --git a/qml/Veyra/NodePage.qml b/qml/Veyra/NodePage.qml
index 05fb9b72..60585f29 100644
--- a/qml/Veyra/NodePage.qml
+++ b/qml/Veyra/NodePage.qml
@@ -676,12 +676,13 @@ VPage {
Layout.fillWidth: true; spacing: 6
VIcon { name: "vol"; size: 14; color: Theme.t2 }
VSlider {
+ id: nodeVolume
objectName: "node-out-volume"
Layout.fillWidth: true
from: 0; to: 1; value: veyra.volume; inputScale: 100
onMoved: value => veyra.volume = value
}
- Text { text: Math.round(veyra.volume * 100) + "%"; color: Theme.t2; font.family: Theme.fontMono; font.pixelSize: 10 }
+ VSliderValue { slider: nodeVolume; text: Math.round(veyra.volume * 100) + "%"; color: Theme.t2; pixelSize: 10 }
VSwitch { objectName: "node-out-mute"; checked: !veyra.muted; onToggled: checked => veyra.muted = !checked }
}
VSeg {
@@ -696,12 +697,13 @@ VPage {
visible: veyra.audioSyncMode === 1
Text { text: qsTr("偏移"); color: Theme.t3; font.family: Theme.fontUi; font.pixelSize: 10 }
VSlider {
+ id: nodeOffset
Layout.fillWidth: true
center: true
from: -250; to: 250; value: veyra.audioOffsetMs
onMoved: value => veyra.audioOffsetMs = Math.round(value)
}
- Text { text: veyra.audioOffsetMs + " ms"; color: Theme.t2; font.family: Theme.fontMono; font.pixelSize: 10 }
+ VSliderValue { slider: nodeOffset; text: veyra.audioOffsetMs + " ms"; color: Theme.t2; pixelSize: 10 }
}
Text {
Layout.fillWidth: true
@@ -764,16 +766,18 @@ VPage {
onToggled: checked => veyra.nrHoldStrength = checked ? 0.8 : 0
}
VSlider {
+ id: nodeHoldStrength
objectName: "node-out-hold-strength"
Layout.fillWidth: true
visible: veyra.nrHoldStrength > 0
- from: 0.1; to: 1.0; value: veyra.nrHoldStrength
+ from: 0.1; to: 1.0; value: veyra.nrHoldStrength; inputScale: 100
onMoved: value => veyra.nrHoldStrength = value
}
- Text {
+ VSliderValue {
visible: veyra.nrHoldStrength > 0
+ slider: nodeHoldStrength
text: Math.round(veyra.nrHoldStrength * 100) + "%"
- color: Theme.t2; font.family: Theme.fontMono; font.pixelSize: 10
+ color: Theme.t2; pixelSize: 10
}
}
}
diff --git a/qml/Veyra/ProPage.qml b/qml/Veyra/ProPage.qml
index 9314a492..17e832a1 100644
--- a/qml/Veyra/ProPage.qml
+++ b/qml/Veyra/ProPage.qml
@@ -450,7 +450,7 @@ VPage {
anchors.leftMargin: 14
anchors.top: head.bottom
anchors.topMargin: 10
- width: root.width - 376 - 14 * 2 - 10
+ width: root.width - insp.width - 14 * 2 - 10
height: root.height - 14 - head.height - 10 - 172 - 10 - 14
radius: Theme.rCard
color: Theme.card
@@ -694,8 +694,11 @@ VPage {
spacing: 10
// Card 1: signal chain. Reported values only.
+ // A narrow picture column (wide inspector, small window) drops this card
+ // first, so the stage timings beside it keep room to read.
Rectangle {
id: meter1
+ visible: meters.width >= 760
Layout.fillWidth: true
Layout.fillHeight: true
Layout.preferredWidth: 1.05
@@ -754,6 +757,9 @@ VPage {
Rectangle {
id: meter2
objectName: "pro-meter-stages"
+ // Too narrow for label, bar and value side by side in two columns: the
+ // bars and the budget note go, the values stay.
+ readonly property bool narrow: width < 380
clip: true
Layout.fillWidth: true
Layout.fillHeight: true
@@ -770,6 +776,7 @@ VPage {
Layout.fillWidth: true
VEyebrow { text: qsTr("GPU 阶段耗时 · 最近一秒平均"); Layout.fillWidth: true }
Text {
+ visible: !meter2.narrow
text: qsTr("预算 ") + veyra.stageBudgetMs.toFixed(1) + qsTr(" ms / 源帧")
color: Theme.t3
font.family: Theme.fontMono
@@ -816,6 +823,7 @@ VPage {
}
Item {
Layout.fillWidth: true
+ visible: !meter2.narrow
implicitHeight: 5
Rectangle {
anchors.verticalCenter: parent.verticalCenter
@@ -837,6 +845,7 @@ VPage {
}
Text {
Layout.preferredWidth: 48
+ Layout.fillWidth: meter2.narrow
text: modelData.measured ? modelData.ms.toFixed(1) + " ms" : qsTr("未测量")
HoverHandler { id: stageValueHover }
ToolTip.visible: stageValueHover.hovered && modelData.measured
@@ -965,7 +974,63 @@ VPage {
}
}
- // --- inspector (376px, rows 2-3) --------------------------------------
+ // --- inspector (376px by default, rows 2-3) ----------------------------
+ // The panel can be widened by dragging the gap between it and the picture
+ // (field request 2026-10-05); the width is remembered, a double click on the
+ // gap returns to the design's 376px. It never goes narrower than that, and
+ // the picture keeps at least 640px, where the meters under it still read.
+ readonly property real inspectorMax: Math.max(376, root.width - 14 * 2 - 10 - 640)
+ property real inspectorDrag: -1
+ readonly property real inspectorWidth: Math.max(376, Math.min(inspectorMax,
+ inspectorDrag >= 0 ? inspectorDrag : Number(veyra.preferences.listInspectorWidth || 376)))
+ MouseArea {
+ id: inspectorSplit
+ objectName: "pro-inspector-split"
+ visible: !root.overlay
+ x: insp.x - 10
+ y: insp.y
+ width: 10
+ height: insp.height
+ cursorShape: Qt.SplitHCursor
+ hoverEnabled: true
+ preventStealing: true
+ property real pressX: 0
+ property real pressWidth: 0
+ onPressed: mouse => {
+ pressX = mapToItem(root, mouse.x, 0).x
+ pressWidth = root.inspectorWidth
+ root.inspectorDrag = pressWidth
+ }
+ onPositionChanged: mouse => {
+ if (!pressed) return
+ root.inspectorDrag = Math.max(376, Math.min(root.inspectorMax, pressWidth - (mapToItem(root, mouse.x, 0).x - pressX)))
+ }
+ onReleased: {
+ const width = Math.round(root.inspectorWidth)
+ root.inspectorDrag = -1
+ veyra.setPreference("listInspectorWidth", width)
+ }
+ onCanceled: root.inspectorDrag = -1
+ onDoubleClicked: veyra.setPreference("listInspectorWidth", 376)
+ // A hairline handle while the pointer is on the gap.
+ Rectangle {
+ anchors.centerIn: parent
+ width: 3
+ height: 36
+ radius: 1.5
+ color: inspectorSplit.pressed ? Theme.accent : Qt.rgba(1, 1, 1, 0.28)
+ opacity: inspectorSplit.containsMouse || inspectorSplit.pressed ? 1 : 0
+ Behavior on opacity { NumberAnimation { duration: Theme.d(150) } }
+ }
+ // Beside the pointer: the attached tip sat at the top of this full-height strip.
+ ToolTip {
+ visible: inspectorSplit.containsMouse && !inspectorSplit.pressed
+ delay: 600
+ x: -implicitWidth - 6
+ y: inspectorSplit.mouseY + 16
+ text: qsTr("拖动调整参数面板宽度 · 双击还原")
+ }
+ }
// Performance orbs beside the quick-adjust panel (fullscreen only).
Rectangle {
id: quickOrbs
@@ -1006,7 +1071,7 @@ VPage {
anchors.topMargin: 10
anchors.bottom: parent.bottom
anchors.bottomMargin: 14
- width: 376
+ width: root.overlay ? 376 : root.inspectorWidth
radius: Theme.rCard
color: Theme.card
border.width: 1
@@ -1406,9 +1471,11 @@ VPage {
label: qsTr("稳定强度")
hint: qsTr("越高越稳,过高会显得发闷")
visible: veyra.nrHoldStrength > 0
+ value: Math.round(veyra.nrHoldStrength * 100) + "%"
VSlider {
objectName: "list-hold-strength"
- from: 0.1; to: 1.0
+ implicitWidth: 110
+ from: 0.1; to: 1.0; inputScale: 100
value: veyra.nrHoldStrength
onMoved: value => veyra.nrHoldStrength = value
}
@@ -1417,8 +1484,11 @@ VPage {
label: qsTr("变化容差")
hint: qsTr("越小越敏感,越大稳得越多")
visible: veyra.nrHoldStrength > 0
+ value: Number(veyra.nrHoldTolerance).toFixed(3)
VSlider {
objectName: "list-hold-tolerance"
+ implicitWidth: 110
+ inputDecimals: 3
from: 0.005; to: 0.10
value: veyra.nrHoldTolerance
onMoved: value => veyra.nrHoldTolerance = value
@@ -1518,6 +1588,57 @@ VPage {
visible: root.tab === "fg"
objectName: "list-fg-group"
+ // 补帧预设 (field request 2026-10-05): this whole tab by name - 补帧方式,
+ // 倍率, 运动来源, 光流算法, 运动估算质量, 内容节奏, 严格节奏 and
+ // 低延迟队列 - beside the whole-chain presets, as 颜色预设 is on 色彩.
+ VGroup {
+ objectName: "list-fg-presets"
+ VRow {
+ label: qsTr("补帧预设")
+ hint: qsTr("保存补帧页全部设置")
+ VSelect {
+ objectName: "fg-preset-select"
+ implicitWidth: 170
+ value: veyra.fgPresets.length ? qsTr("应用预设…") : qsTr("暂无补帧预设")
+ options: veyra.fgPresets.map(p => ({ id: String(p.index), label: p.name, note: p.note }))
+ onPicked: id => veyra.applyFgPreset(Number(id))
+ }
+ }
+ RowLayout {
+ Layout.fillWidth: true
+ spacing: 6
+ DialogHost.VTextField {
+ id: fgPresetName
+ objectName: "fg-preset-name"
+ Layout.fillWidth: true
+ placeholder: qsTr("新预设名称")
+ }
+ VButton {
+ objectName: "fg-preset-save"
+ text: qsTr("保存")
+ enabled: fgPresetName.text.trim().length > 0
+ onClicked: {
+ const name = fgPresetName.text.trim()
+ const exists = veyra.fgPresets.some(p => p.name === name)
+ if (veyra.saveFgPreset(name, exists)) fgPresetName.text = ""
+ }
+ }
+ VButton {
+ id: fgPresetMore
+ objectName: "fg-preset-more"
+ text: qsTr("管理"); ghost: true
+ enabled: veyra.fgPresets.length > 0
+ onClicked: fgPresetMenu.openAt(fgPresetMore, "down")
+ }
+ VMenu {
+ id: fgPresetMenu
+ title: qsTr("补帧预设")
+ items: veyra.fgPresets.map(p => ({ act: "delete", index: p.index, label: qsTr("删除「") + p.name + "」", note: p.note, icon: "trash" }))
+ onPicked: (i, item) => veyra.deleteFgPreset(item.index)
+ }
+ }
+ }
+
VAccordion {
id: fgCard
objectName: "list-fg-card"
diff --git a/qml/Veyra/SettingsPage.qml b/qml/Veyra/SettingsPage.qml
index 4b14170e..83cd3efc 100644
--- a/qml/Veyra/SettingsPage.qml
+++ b/qml/Veyra/SettingsPage.qml
@@ -480,11 +480,11 @@ VPage {
VGroup {
VRow {
label: qsTr("GPU 优先级")
- hint: veyra.gpuPriorityStatus + qsTr(";切到后台卡顿时可试“高”,“实时”可能拖慢其他程序")
+ hint: veyra.gpuPriorityStatus + qsTr(";默认“实时”,同时运行游戏或其他重负载程序变慢时可改为“高”或“普通”")
VSeg {
objectName: "set-gpu-priority"
options: [{ id: "normal", label: qsTr("普通") }, { id: "high", label: qsTr("高") }, { id: "realtime", label: qsTr("实时") }]
- current: veyra.preferences.gpuPriority || "normal"
+ current: veyra.preferences.gpuPriority || "realtime"
onPicked: id => veyra.setPreference("gpuPriority", id)
}
}
diff --git a/qml/Veyra/VAccordion.qml b/qml/Veyra/VAccordion.qml
index 5385ae70..86a8ee48 100644
--- a/qml/Veyra/VAccordion.qml
+++ b/qml/Veyra/VAccordion.qml
@@ -86,7 +86,11 @@ Rectangle {
property bool bypassed: false
readonly property int headerHeight: compactHeader ? 42 : 48
- implicitHeight: headerHeight + (open ? body.implicitHeight + 8 : 0)
+ // Space between the header's hairline and the first body row: a body that
+ // starts with buttons or text (NR 层's 复制此层 row) sat on the line itself
+ // (field report 2026-10-05).
+ readonly property int bodyTopGap: 8
+ implicitHeight: headerHeight + (open ? body.implicitHeight + bodyTopGap + 8 : 0)
radius: 12
color: Theme.card2
border.width: 1
@@ -198,6 +202,7 @@ Rectangle {
Layout.fillWidth: true
Layout.leftMargin: 12 + (acc.compactHeader ? acc.border.width : 0)
Layout.rightMargin: 12 + (acc.compactHeader ? acc.border.width : 0)
+ Layout.topMargin: acc.bodyTopGap
Layout.bottomMargin: 10
spacing: 2
visible: acc.open || acc.height > acc.headerHeight
diff --git a/qml/Veyra/VGroup.qml b/qml/Veyra/VGroup.qml
index 9b317f4c..6c692bed 100644
--- a/qml/Veyra/VGroup.qml
+++ b/qml/Veyra/VGroup.qml
@@ -22,7 +22,21 @@ Rectangle {
color: Theme.card2
border.width: 1
border.color: Theme.stroke
- implicitHeight: inner2.height + 6
+ // Rows carry their own vertical padding. A note, button or plain layout at
+ // either end of the card does not, and sat on its border (导出 音轨 card,
+ // field report 2026-10-05), so those ends get the padding a row would have.
+ function edgeIsRow(last) {
+ const kids = inner2.children
+ for (let n = 0; n < kids.length; ++n) {
+ const c = kids[last ? kids.length - 1 - n : n]
+ if (c instanceof Repeater || !c.visible) continue
+ return c instanceof VRow
+ }
+ return true
+ }
+ readonly property int topPad: edgeIsRow(false) ? 3 : 10
+ readonly property int bottomPad: edgeIsRow(true) ? 3 : 10
+ implicitHeight: inner2.height + topPad + bottomPad
ColumnLayout {
id: inner2
@@ -31,7 +45,7 @@ Rectangle {
anchors.leftMargin: 14
anchors.rightMargin: 14
anchors.top: parent.top
- anchors.topMargin: 3
+ anchors.topMargin: group.topPad
spacing: 0
}
}
diff --git a/qml/Veyra/VRow.qml b/qml/Veyra/VRow.qml
index 3e6e4bfd..8310524f 100644
--- a/qml/Veyra/VRow.qml
+++ b/qml/Veyra/VRow.qml
@@ -10,6 +10,14 @@ Item {
// whole row instead of being squeezed beside the control.
property bool hintBelow: false
default property alias control: slot.data
+ // The row's slider, when its control is one (typed values beside the number).
+ readonly property Item valueSlider: {
+ for (let i = 0; i < slot.children.length; ++i) {
+ const c = slot.children[i]
+ if (c && c.commitValue !== undefined && c.inputDecimals !== undefined) return c
+ }
+ return null
+ }
// The layout reads Layout.preferredHeight. `height` is deliberately NOT set: a
// layout-managed item that sets its own height is undefined behaviour, and this
@@ -54,14 +62,12 @@ Item {
Layout.preferredWidth: childrenRect.width
Layout.preferredHeight: childrenRect.height
}
- Text {
+ // A row whose control is a slider: its number can be clicked and typed.
+ VSliderValue {
visible: row.value.length > 0
text: row.value
- color: Theme.t1
- font.family: Theme.fontMono
- font.pixelSize: Theme.fsSmall
+ slider: row.valueSlider
Layout.minimumWidth: 40
- horizontalAlignment: Text.AlignRight
}
}
Text {
diff --git a/qml/Veyra/VSliderValue.qml b/qml/Veyra/VSliderValue.qml
new file mode 100644
index 00000000..da64b09f
--- /dev/null
+++ b/qml/Veyra/VSliderValue.qml
@@ -0,0 +1,94 @@
+// The number beside a slider. A click turns it into a text field in place
+// (field request 2026-10-05: "所有的调整参数的滑条,要可以点击数字直接输入"):
+// Enter or leaving the field applies the typed value through the slider, so the
+// range clamp, inputScale and the owner's onMoved are the slider's own; Esc cancels.
+import QtQuick
+
+Item {
+ id: valueText
+ // The VSlider this number belongs to; without one the text is plain.
+ property Item slider: null
+ property string text: ""
+ property color color: Theme.t1
+ property int pixelSize: Theme.fsSmall
+ property int horizontalAlignment: Text.AlignRight
+ readonly property bool editable: slider !== null && slider.editable !== false && slider.enabledControl !== false
+ readonly property bool editing: editor.visible
+ implicitWidth: label.implicitWidth
+ implicitHeight: Math.max(label.implicitHeight, 20)
+
+ function openEditor() {
+ if (!editable) return
+ input.text = Number((slider.value * slider.inputScale).toFixed(slider.inputDecimals)).toString()
+ editor.visible = true
+ input.forceActiveFocus()
+ input.selectAll()
+ }
+ function closeEditor(apply) {
+ if (!editor.visible) return
+ editor.visible = false
+ if (apply) {
+ const raw = input.text.trim().replace(",", ".")
+ const typed = Number(raw)
+ if (raw.length > 0 && isFinite(typed)) {
+ const lo = Math.min(slider.from, slider.to), hi = Math.max(slider.from, slider.to)
+ slider.commitValue(Math.max(lo, Math.min(hi, typed / slider.inputScale)))
+ }
+ }
+ }
+
+ Text {
+ id: label
+ objectName: "vslider-value"
+ anchors.fill: parent
+ visible: !editor.visible
+ text: valueText.text
+ color: valueText.color
+ font.family: Theme.fontMono
+ font.pixelSize: valueText.pixelSize
+ horizontalAlignment: valueText.horizontalAlignment
+ verticalAlignment: Text.AlignVCenter
+ font.underline: valueText.editable && hover.hovered
+ }
+ HoverHandler { id: hover; enabled: valueText.editable; cursorShape: Qt.IBeamCursor }
+ TapHandler {
+ enabled: valueText.editable
+ gesturePolicy: TapHandler.WithinBounds
+ onTapped: valueText.openEditor()
+ }
+ Rectangle {
+ id: editor
+ objectName: "vslider-value-editor"
+ visible: false
+ z: 10
+ // At least wide enough for "-250.00"; grows to the left over the slider.
+ width: Math.max(valueText.width, 58)
+ height: 24
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ radius: 6
+ color: Theme.dialog
+ border.width: 1
+ border.color: Theme.accent
+ TextInput {
+ id: input
+ objectName: "vslider-value-input"
+ anchors.fill: parent
+ anchors.leftMargin: 6; anchors.rightMargin: 6
+ verticalAlignment: TextInput.AlignVCenter
+ horizontalAlignment: TextInput.AlignRight
+ color: Theme.t1
+ font.family: Theme.fontMono
+ font.pixelSize: Theme.fsSmall
+ selectByMouse: true
+ clip: true
+ inputMethodHints: Qt.ImhFormattedNumbersOnly
+ Keys.onReturnPressed: valueText.closeEditor(true)
+ Keys.onEnterPressed: valueText.closeEditor(true)
+ Keys.onEscapePressed: valueText.closeEditor(false)
+ // Typing must not reach the window's seek / volume shortcuts.
+ Keys.onShortcutOverride: event => event.accepted = true
+ onActiveFocusChanged: if (!activeFocus && editor.visible) valueText.closeEditor(true)
+ }
+ }
+}
diff --git a/qml/Veyra/qmldir b/qml/Veyra/qmldir
index 69314fb6..ff17b1cb 100644
--- a/qml/Veyra/qmldir
+++ b/qml/Veyra/qmldir
@@ -21,6 +21,7 @@ VRow 1.0 VRow.qml
VSeg 1.0 VSeg.qml
VSelect 1.0 VSelect.qml
VSlider 1.0 VSlider.qml
+VSliderValue 1.0 VSliderValue.qml
VSwitch 1.0 VSwitch.qml
VTag 1.0 VTag.qml
Main 1.0 Main.qml
diff --git a/scripts/acceptance/release-2.0.4-audit.py b/scripts/acceptance/release-2.0.4-audit.py
new file mode 100644
index 00000000..4ed4c4af
--- /dev/null
+++ b/scripts/acceptance/release-2.0.4-audit.py
@@ -0,0 +1,52 @@
+"""Independent complete payload hashes, vendor boundaries and PE import closure."""
+import hashlib, json, os, sys
+from pathlib import Path
+import pefile
+
+BASE=Path('E:/项目/Veyra'); TASK='release-2.0.4-20261005'
+app=Path(sys.argv[1]).resolve(); flavor=sys.argv[2]; label=sys.argv[3]
+assert app.is_relative_to(BASE.resolve()) and flavor in ('NVIDIA','AMD')
+out=BASE/'logs'/TASK/(label+'.json'); assert not out.exists()
+manifest=json.loads((app/'package-manifest.json').read_text(encoding='utf8'))
+names={f.relative_to(app).as_posix():f for f in app.rglob('*') if f.is_file()}
+expected={r['path'] for r in manifest['files']}|{'package-manifest.json'}
+assert set(names)==expected, {'unexpected':list(set(names)-expected),'missing':list(expected-set(names))}
+for row in manifest['files']:
+ f=names[row['path']]
+ with f.open('rb') as stream: sha=hashlib.file_digest(stream,'sha256').hexdigest()
+ assert f.stat().st_size==row['size'] and sha==row['sha256'],row['path']
+assert not any(f.suffix.lower() in ('.pdb','.lib','.pyd','.whl','.addon64') for f in names.values())
+drivers={'nvcuda.dll','nvopticalflow64.dll','amdhip64.dll','amdhip64_6.dll','amdhip64_7.dll'}
+assert not drivers & {f.name.lower() for f in names.values()}
+if flavor=='NVIDIA':
+ assert not any(n.startswith('runtime/amd-nr/') for n in names)
+ vfg={f.name for n,f in names.items() if n.startswith('runtime/nvidia-vfg/')}
+ assert vfg=={'NVVideoEffects.dll','nvVFXVideoFrameGeneration.dll','NVCVImage.dll','cudart64_12.dll','nvngxruntime.dll'},vfg
+else:
+ assert not any(f.name.lower().startswith(('nvngx','nvvideoeffects','cudart','npp','nvcv')) for f in names.values())
+ assert 'runtime/amd-nr/LmxxfNrRuntime.dll' in names
+fsr={f.name for n,f in names.items() if n.startswith('runtime_local/amd/fidelityfx/')}
+assert fsr=={'amd_fidelityfx_loader_dx12.dll','amd_fidelityfx_upscaler_dx12.dll','amd_fidelityfx_framegeneration_dx12.dll'}
+runtime=json.loads((app/'release-runtime-manifest.json').read_text(encoding='utf8'))
+assert runtime==json.loads((app/'runtime/experimental/release-runtime-manifest.json').read_text(encoding='utf8'))
+assert {n for n,f in names.items() if n.startswith(('runtime/','runtime_local/')) and f.suffix.lower() not in ('.json','.md','.txt')} <= {r['path'] for r in runtime['files']}
+packaged={f.name.lower() for f in names.values() if f.suffix.lower()=='.dll'}
+system=Path(os.environ['WINDIR'])/'System32'; imports=[]; missing=[]
+for name,f in names.items():
+ if f.suffix.lower() not in ('.dll','.exe'):continue
+ pe=pefile.PE(str(f),fast_load=True)
+ pe.parse_data_directories(directories=[pefile.DIRECTORY_ENTRY['IMAGE_DIRECTORY_ENTRY_IMPORT'],pefile.DIRECTORY_ENTRY['IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT']])
+ direct=[i.dll.decode().lower() for i in getattr(pe,'DIRECTORY_ENTRY_IMPORT',[])]
+ delay=[i.dll.decode().lower() for i in getattr(pe,'DIRECTORY_ENTRY_DELAY_IMPORT',[])]
+ pe.close()
+ assert not any(n.startswith('npp') for n in direct+delay),(name,direct,delay)
+ for dll in direct+delay:
+ if dll in packaged or dll.startswith(('api-ms-','ext-ms-')) or (system/dll).is_file():continue
+ missing.append({'file':name,'dependency':dll,'delay':dll in delay})
+ imports.append({'file':name,'direct':direct,'delay':delay})
+assert not missing,missing
+result=dict(flavor=flavor,app=str(app),payloadFiles=len(manifest['files']),payloadBytes=sum(r['size'] for r in manifest['files']),
+ sourceCommit=manifest.get('baseCommit'),releaseReady=manifest.get('releaseReady'),runtimeFiles=len(runtime['files']),
+ peFiles=len(imports),imports=imports,missing=missing,fsrException=True)
+out.write_text(json.dumps(result,ensure_ascii=False,indent=2),encoding='utf8')
+print('PACKAGE AUDIT PASS',flavor,result['payloadFiles'],result['payloadBytes'],out,flush=True)
diff --git a/scripts/acceptance/release-2.0.4-build.py b/scripts/acceptance/release-2.0.4-build.py
new file mode 100644
index 00000000..8d5b0ac8
--- /dev/null
+++ b/scripts/acceptance/release-2.0.4-build.py
@@ -0,0 +1,38 @@
+"""Build merged production and regression targets without replacing dependencies."""
+from pathlib import Path
+import hashlib,json,os,subprocess,sys
+ROOT=Path(__file__).resolve().parents[2];BASE=Path('E:/项目/Veyra');TASK='release-2.0.4-20261005'
+label=sys.argv[1];assert label.replace('-','').isalnum()
+BUILD=BASE/'build'/TASK;TMP=BASE/'tmp'/TASK/'build';LOG=BASE/'logs'/TASK/(label+'.log')
+for p in (BUILD,TMP,LOG.parent):p.mkdir(parents=True,exist_ok=True)
+guard=[sys.executable,'-B',str(ROOT/'scripts/acceptance/release-2.0.4-control.py')]
+subprocess.run(guard,check=True)
+settings=[];cache=BASE/'build/capture-xbox-field-20261005/CMakeCache.txt'
+for line in cache.read_text(encoding='utf8').splitlines():
+ if ':' not in line or '=' not in line or line.startswith(('#','//')):continue
+ keytype,value=line.split('=',1);key,kind=keytype.split(':',1)
+ if kind in ('INTERNAL','STATIC') or key=='VEYRA_DISPLAY_VERSION':continue
+ if key.startswith('VEYRA_') or key in ('CMAKE_PREFIX_PATH','CMAKE_MAKE_PROGRAM','PROTOC','PKG_CONFIG_EXECUTABLE'):
+ if key=='VEYRA_LIBASS_ROOT':assert (Path(value)/'include/ass/ass.h').is_file()
+ settings.append(f'set({key} [[{value}]] CACHE {kind} "Accepted dependencies" FORCE)')
+assert any('VEYRA_LIBASS_ROOT' in line for line in settings)
+settings.append('set(VEYRA_DISPLAY_VERSION [[2.0.4]] CACHE STRING "2.0.4 test candidate" FORCE)')
+(TMP/'dependencies.cmake').write_text('\n'.join(settings),encoding='utf8')
+targets=sys.argv[2:] or ['veyra_qml_ui','veyra_xbox_tests','veyra_capture_compressed_tests','veyra_scene_tests',
+ 'veyra_live_timing_tests','veyra_qml_quick_tests','veyra_ui_i18n_tests','veyra_effect_chain_tests',
+ 'veyra_repair_contract_tests','veyra_preset_library_tests','veyra_repair_preset_tests',
+ 'veyra_nr_temporal_gpu_tests','veyra_nr_correction_gpu_tests','veyra_effect_availability_tests',
+ 'veyra_vfg_settings_tests','veyra_capture_audio_tests']
+assert all(t.replace('_','').isalnum() for t in targets)
+cmd=TMP/'build.cmd'
+cmd.write_text('@echo off\nchcp 65001 >nul\ncall "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat" >nul 2>&1\nif errorlevel 1 exit /b 4\n"%TASK_CMAKE%" --preset x64-release -S "%TASK_ROOT%" -B "%TASK_BUILD%" -C "%TASK_TMP%\\dependencies.cmake"\nif errorlevel 1 exit /b 5\n"%TASK_CMAKE%" --build "%TASK_BUILD%" --parallel 6 --target '+' '.join(targets)+'\nexit /b %errorlevel%\n',encoding='ascii')
+env=os.environ.copy();env.update(TEMP=str(TMP),TMP=str(TMP),VSLANG='1033',TASK_ROOT=str(ROOT),TASK_BUILD=str(BUILD),TASK_TMP=str(TMP),
+ TASK_CMAKE='C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe')
+with LOG.open('x',encoding='utf8') as out:
+ try:rc=subprocess.run(['cmd.exe','/d','/c',str(cmd)],cwd=ROOT,env=env,stdout=out,stderr=subprocess.STDOUT,timeout=890).returncode
+ except subprocess.TimeoutExpired:rc=124
+receipt={'exit':rc,'log':str(LOG),'targets':targets,'sourceHead':subprocess.check_output(['git','-C',str(ROOT),'rev-parse','HEAD'],text=True).strip(),
+ 'dependencyCacheSha256':hashlib.sha256(cache.read_bytes()).hexdigest()}
+LOG.with_suffix('.json').write_text(json.dumps(receipt,ensure_ascii=False,indent=2),encoding='utf8')
+print('BUILD',rc,LOG);print('\n'.join(LOG.read_text(encoding='utf8',errors='replace').splitlines()[-18:]))
+subprocess.run(guard,check=True);raise SystemExit(rc)
diff --git a/scripts/acceptance/release-2.0.4-cold.py b/scripts/acceptance/release-2.0.4-cold.py
new file mode 100644
index 00000000..7da4d457
--- /dev/null
+++ b/scripts/acceptance/release-2.0.4-cold.py
@@ -0,0 +1,67 @@
+from pathlib import Path, PurePosixPath
+import ctypes, hashlib, json, os, stat, subprocess, time, zipfile
+
+BASE=Path('E:/项目/Veyra'); TASK='release-2.0.4-20261005'
+PACK=BASE/'test-packages'/TASK; LOG=BASE/'logs'/TASK
+receipt=json.loads((PACK/'DELIVERY.json').read_text(encoding='utf8'))
+results=[]
+for row in receipt:
+ vendor=row['vendor']; destination=BASE/'verify'/TASK/vendor
+ assert destination.resolve().is_relative_to((BASE/'verify'/TASK).resolve()) and not destination.exists()
+ archive=Path(row['archive']); assert hashlib.sha256(archive.read_bytes()).hexdigest()==row['archiveSha256']
+ with zipfile.ZipFile(archive) as z:
+ assert len(z.infolist())<5000 and sum(i.file_size for i in z.infolist())<5*1024**3
+ for entry in z.infolist():
+ path=PurePosixPath(entry.filename)
+ assert not path.is_absolute() and '..' not in path.parts and ':' not in entry.filename
+ assert not stat.S_ISLNK(entry.external_attr>>16)
+ assert (destination/entry.filename).resolve().is_relative_to(destination.resolve())
+ z.extractall(destination)
+ app=destination/Path(row['candidate']).name
+ manifest=json.loads((app/'package-manifest.json').read_text(encoding='utf8'))
+ for item in manifest['files']:
+ assert hashlib.sha256((app/item['path']).read_bytes()).hexdigest()==item['sha256'],item['path']
+ out=BASE/'tests'/TASK/('cold-'+vendor); tmp=BASE/'tmp'/TASK/('cold-'+vendor)
+ for p in (out,tmp):p.mkdir(parents=True,exist_ok=False)
+ engine=LOG/('cold-'+vendor+'-engine.log'); console=LOG/('cold-'+vendor+'.log')
+ env={k:v for k,v in os.environ.items() if not k.upper().startswith(('VEYRA_','QT_','QSG_'))}
+ windows=Path(env['WINDIR'])
+ env.update(TEMP=str(tmp),TMP=str(tmp),CUDA_CACHE_PATH=str(tmp/'cuda-cache'),VEYRA_LOG_FILE=str(engine),
+ QML_DISABLE_DISK_CACHE='1',QT_FORCE_STDERR_LOGGING='1',
+ PATH=os.pathsep.join(map(str,(windows/'System32',windows,windows/'System32/Wbem'))))
+ args=[str(app/'veyra_qml_ui.exe'),'--data-dir',str(out/'profile'),'--page','pro','--size','1280x800',
+ '--obs-game-capture','--exit-after','8000',str(BASE/'tests/field-fixes-20261005/media/fx-embedded.mkv')]
+ begin=time.monotonic(); modules=[]
+ with console.open('xb') as log:
+ process=subprocess.Popen(args,cwd=app,env=env,stdout=log,stderr=subprocess.STDOUT)
+ try:
+ time.sleep(3)
+ kernel=ctypes.WinDLL('kernel32',use_last_error=True); psapi=ctypes.WinDLL('psapi',use_last_error=True)
+ kernel.OpenProcess.argtypes=[ctypes.c_ulong,ctypes.c_int,ctypes.c_ulong];kernel.OpenProcess.restype=ctypes.c_void_p
+ kernel.CloseHandle.argtypes=[ctypes.c_void_p]
+ psapi.EnumProcessModulesEx.argtypes=[ctypes.c_void_p,ctypes.POINTER(ctypes.c_void_p),ctypes.c_ulong,ctypes.POINTER(ctypes.c_ulong),ctypes.c_ulong]
+ psapi.GetModuleFileNameExW.argtypes=[ctypes.c_void_p,ctypes.c_void_p,ctypes.c_wchar_p,ctypes.c_ulong]
+ handle=kernel.OpenProcess(0x0410,False,process.pid);assert handle
+ try:
+ items=(ctypes.c_void_p*512)(); needed=ctypes.c_ulong()
+ assert psapi.EnumProcessModulesEx(handle,items,ctypes.sizeof(items),ctypes.byref(needed),3)
+ for i in range(min(512,needed.value//ctypes.sizeof(ctypes.c_void_p))):
+ buffer=ctypes.create_unicode_buffer(32768)
+ if psapi.GetModuleFileNameExW(handle,items[i],buffer,len(buffer)):
+ path=Path(buffer.value)
+ if path.name.startswith(('Qt6','avcodec-','avformat-','avutil-','swscale-','swresample-')):
+ assert path.resolve().is_relative_to(app.resolve()),str(path)
+ modules.append(str(path))
+ finally:kernel.CloseHandle(handle)
+ rc=process.wait(timeout=50)
+ except BaseException:
+ process.kill();process.wait(timeout=10);raise
+ text=engine.read_text(encoding='utf8',errors='replace')+'\n'+console.read_text(encoding='utf8',errors='replace')
+ bad=[line for line in text.splitlines() if any(word in line for word in ('[ERROR]','[FATAL]','ReferenceError:','TypeError:','no root object'))]
+ assert rc==0 and not bad and len(modules)>10 and 'track ready events=5' in text and 'fonts configured container=1' in text,bad[:12]
+ result={'vendor':vendor,'passed':True,'exit':rc,'seconds':round(time.monotonic()-begin,3),'app':str(app),
+ 'args':args,'archiveSha256':row['archiveSha256'],'executableSha256':row['exeSha256'],
+ 'ownQtAndCodecModulePaths':modules,'console':str(console),'engine':str(engine)}
+ results.append(result);print('COLD ZIP START PASS',vendor,len(modules),'modules from extracted app',flush=True)
+ (LOG/'cold-verify-results.json').write_text(json.dumps(results,ensure_ascii=False,indent=2)+'\n',encoding='utf8')
+subprocess.run(['py','-3.11','-B','scripts/acceptance/release-2.0.4-control.py'],cwd=BASE/'worktrees'/TASK,check=True)
diff --git a/scripts/acceptance/release-2.0.4-control.py b/scripts/acceptance/release-2.0.4-control.py
new file mode 100644
index 00000000..3d92f1f9
--- /dev/null
+++ b/scripts/acceptance/release-2.0.4-control.py
@@ -0,0 +1,40 @@
+"""Preserve every other checkout and keep the 2.0.4 integration auditable."""
+from pathlib import Path
+import hashlib,json,subprocess
+ROOT=Path(__file__).resolve().parents[2]
+BASE=Path('E:/项目/Veyra');TASK='release-2.0.4-20261005';ARCH=BASE/'archives'/TASK
+def git(root,*args):return subprocess.check_output(['git','-c','core.safecrlf=false','-C',str(root),*args],stderr=subprocess.PIPE)
+def sha(data):return hashlib.sha256(data).hexdigest()
+data=(ARCH/'start.json').read_bytes()
+assert sha(data)==(ARCH/'start.sha256').read_text().strip(),'Immutable start changed'
+start=json.loads(data);assert ROOT.resolve()==Path(start['root']).resolve()
+assert git(ROOT,'branch','--show-current').decode().strip()=='codex/release-2.0.4-20261005'
+assert git(ROOT,'merge-base','HEAD',start['codeBase']).decode().strip()==start['codeBase']
+ui=next(r for r in start['worktrees'] if Path(r['path']).name=='ui-fixes-20261005')
+allowed=set(ui['files'])|{'AGENTS.md','CMakeLists.txt','README.md','README_CN.md','README_EN.md',
+ 'docs/WORKLOG.md','docs/CURRENT_STATUS.md','docs/RELEASE_2.0.4_PLAN_2026-10-05.md',
+ 'docs/RELEASE_2.0.4_ACCEPTANCE_2026-10-05.md','docs/RELEASE_NOTES_2.0.4.md',
+ 'docs/BRANCH_MAP_2026-10-05.md','scripts/acceptance/release-2.0.4-control.py',
+ 'scripts/acceptance/release-2.0.4-build.py','scripts/acceptance/release-2.0.4-tests.py',
+ 'scripts/acceptance/release-2.0.4-package.py','scripts/acceptance/release-2.0.4-cold.py','scripts/acceptance/release-2.0.4-audit.py',
+ 'scripts/acceptance/release-2.0.4-ui.qml','tests/qml/quick/tst_slider_value.qml'}
+changed=set(git(ROOT,'diff','--name-only',start['codeBase']).decode('utf8').splitlines())
+changed.update(p for p in git(ROOT,'ls-files','--others','--exclude-standard','-z').decode('utf8').split('\0') if p)
+assert changed<=allowed,sorted(changed-allowed)
+assert not any(Path(p).suffix.lower() in {'.dll','.exe','.lib','.pdb','.onnx','.f16','.f32','.hsaco','.ptx','.addon64','.whl'} for p in changed)
+for r in start['worktrees']:
+ path=Path(r['path'])
+ if path.resolve()==Path(start['mainPath']).resolve():
+ receipt=ARCH/'main-merge.json'
+ expected=json.loads(receipt.read_text(encoding='utf8'))['mainAfter'] if receipt.exists() else start['mainBefore']
+ assert git(path,'rev-parse','HEAD').decode().strip()==expected,'Unexpected main modification'
+ assert not git(path,'status','--porcelain').strip(),'Main must stay clean'
+ continue
+ assert git(path,'rev-parse','HEAD').decode().strip()==r['head'],f'Protected HEAD changed: {path}'
+ for args,key in [(('status','--porcelain=v1','--untracked-files=all'),'statusSha256'),
+ (('diff','--binary'),'workingDiffSha256'),(('diff','--cached','--binary'),'indexDiffSha256')]:
+ assert sha(git(path,*args))==r[key],f'Protected {key} changed: {path}'
+ for rel,digest in r['files'].items():
+ p=path/rel
+ assert (p.is_file() and sha(p.read_bytes())==digest) if digest else not p.exists(),str(p)
+print('2.0.4 GUARD PASS',len(changed),'integration paths;',len(start['worktrees'])-1,'other worktrees unchanged')
diff --git a/scripts/acceptance/release-2.0.4-package.py b/scripts/acceptance/release-2.0.4-package.py
new file mode 100644
index 00000000..b01cb385
--- /dev/null
+++ b/scripts/acceptance/release-2.0.4-package.py
@@ -0,0 +1,124 @@
+"""Create the two 2.0.4 candidates from audited payload lists and one production EXE."""
+from pathlib import Path
+import hashlib,json,shutil,subprocess,sys,zipfile
+ROOT=Path(__file__).resolve().parents[2];BASE=Path('E:/项目/Veyra');TASK='release-2.0.4-20261005';VERSION='2.0.4'
+PACK=BASE/'test-packages'/TASK;BUILD=BASE/'build'/TASK;LOG=BASE/'logs'/TASK;ARCH=BASE/'archives'/TASK
+mode=sys.argv[1];assert mode in ('stage','refresh','finalize')
+label=sys.argv[2] if len(sys.argv)>2 else mode
+assert label.replace('-','').isalnum()
+guard=[sys.executable,'-B',str(ROOT/'scripts/acceptance/release-2.0.4-control.py')]
+subprocess.run(guard,check=True)
+def sha(p):
+ with p.open('rb') as f:return hashlib.file_digest(f,'sha256').hexdigest()
+def save(p,obj):p.write_text(json.dumps(obj,ensure_ascii=False,indent=2)+'\n',encoding='utf8')
+def git(*args):return subprocess.check_output(['git','-C',str(ROOT),*args],encoding='utf8',stderr=subprocess.PIPE).strip()
+def private(rel):return any(part.startswith('user-data-') for part in Path(rel).parts) or rel.startswith(('logs/','tmp/','outputs/','screenshots/','profile/'))
+def component(rel):return rel.startswith(('runtime/','runtime_local/','models/','licenses/')) or Path(rel).suffix.lower()=='.dll' or rel in ('release-runtime-manifest.json','vfg-runtime-manifest.json')
+head=git('rev-parse','HEAD');dirty=bool(git('status','--porcelain'))
+sourcezip=PACK/f'Veyra-{VERSION}-veyra-source.zip'
+if mode=='finalize':
+ assert not dirty,'Validated source must be committed before final packaging'
+ frozen=json.loads((LOG/'tested-inputs.json').read_text(encoding='utf8'))
+ assert frozen['executableSha256']==sha(BUILD/'veyra_qml_ui.exe')
+ for rel,digest in frozen['productInputs'].items():assert sha(ROOT/rel)==digest,'Tested product changed: '+rel
+ for name,digest in frozen['testReceipts'].items():assert sha(LOG/(name+'.json'))==digest,'Test receipt changed: '+name
+ merge=json.loads((ARCH/'main-merge.json').read_text(encoding='utf8'))
+ main=Path(merge['mainPath'])
+ assert subprocess.check_output(['git','-C',str(main),'diff','--name-only',head,'HEAD'],text=True).strip()==''
+ names=['xbox1','scene1','timing1','repair1','chain1','preset1','legacy2','i18n2','hardware1','vfgsettings1','audio1',
+ 'codec1','codec2','temporal1','correction1','correctionfp161','qml2','ui2','uirestore2','hot2','nrexport2','nrrestore2','smokeAMD1','smokeNVIDIA1','smokeNative1']
+ for name in names:
+ result=json.loads((LOG/(name+'.json')).read_text(encoding='utf8'));assert result['passed'],name
+ if name.startswith(('ui','hot','nr','smoke')):assert result['exeSha256']==sha(BUILD/'veyra_qml_ui.exe'),name
+ assert not sourcezip.exists()
+ files=[f for f in subprocess.check_output(['git','-C',str(ROOT),'ls-files','-z']).decode('utf8').split('\0') if f]
+ with zipfile.ZipFile(sourcezip,'x',zipfile.ZIP_DEFLATED,compresslevel=6) as z:
+ for rel in sorted(files):
+ assert not rel.startswith(('runtime/','runtime_local/','third_party_local/','models/'))
+ assert Path(rel).suffix.lower() not in ('.dll','.exe','.lib','.pdb','.addon64','.onnx','.bin','.hsaco','.ptx','.f16','.f32')
+ z.write(ROOT/rel,arcname=f'Veyra-{VERSION}-source/'+rel)
+ with zipfile.ZipFile(sourcezip) as z:
+ assert z.testzip() is None
+ for rel in files:assert hashlib.sha256(z.read(f'Veyra-{VERSION}-source/'+rel)).hexdigest()==sha(ROOT/rel)
+ bundle=ARCH/'source-final.bundle';assert not bundle.exists()
+ subprocess.run(['git','-C',str(ROOT),'bundle','create',str(bundle),'HEAD'],check=True)
+ with (LOG/'source-final-verify.log').open('xb') as out:subprocess.run(['git','-C',str(ROOT),'bundle','verify',str(bundle)],stdout=out,stderr=subprocess.STDOUT,check=True)
+delivery=[]
+for vendor in ('AMD','NVIDIA'):
+ source=BASE/'test-packages/capture-xbox-field-20261005'/f'Veyra-2.0.3-streamfix1-{vendor}-win64-portable'
+ app=PACK/f'Veyra-{VERSION}-{vendor}-win64-portable'
+ manifest=json.loads((source/'package-manifest.json').read_text(encoding='utf8'))
+ sourcepaths=[];immutable={}
+ for row in manifest['files']:
+ rel=row['path'];p=source/rel
+ assert not private(rel) and p.resolve().is_relative_to(source.resolve())
+ assert p.is_file() and p.stat().st_size==row['size'] and sha(p)==row['sha256'],str(p)
+ sourcepaths.append(rel)
+ if component(rel):immutable[rel]=row['sha256']
+ if mode=='stage':
+ assert not app.exists();app.mkdir(parents=True)
+ for rel in sourcepaths:
+ target=app/rel;target.parent.mkdir(parents=True,exist_ok=True);shutil.copy2(source/rel,target)
+ assert app.is_dir()
+ # The export subprocess writes under its runtime even when the parent log
+ # is redirected. Preserve only this task's candidate logs outside the pack.
+ workerlogs=app/'logs'
+ if workerlogs.exists():
+ target=LOG/'candidate-worker-logs'/(vendor+'-'+label)
+ assert workerlogs.resolve().is_relative_to(PACK.resolve()) and not workerlogs.is_symlink()
+ assert target.resolve().is_relative_to(LOG.resolve()) and not target.exists()
+ assert all(p.is_file() and not p.is_symlink() and p.name.startswith('export-worker-') and p.suffix=='.log' for p in workerlogs.iterdir())
+ target.parent.mkdir(parents=True,exist_ok=True)
+ preserved=[{'file':p.name,'sha256':sha(p)} for p in workerlogs.iterdir()]
+ shutil.move(str(workerlogs),str(target))
+ save(target.with_suffix('.json'),{'from':str(workerlogs),'to':str(target),'files':preserved})
+ if mode in ('stage','refresh'):
+ shutil.copy2(BUILD/'veyra_qml_ui.exe',app/'veyra_qml_ui.exe')
+ shutil.copytree(ROOT/'qml',app/'qml',dirs_exist_ok=True)
+ shutil.copytree(BUILD/'shaders',app/'shaders',dirs_exist_ok=True)
+ for name in ('README.md','README_CN.md','README_EN.md','THIRD_PARTY_NOTICES.md'):shutil.copy2(ROOT/name,app/name)
+ for name in ('RELEASE_2.0.4_PLAN_2026-10-05.md','RELEASE_2.0.4_ACCEPTANCE_2026-10-05.md','RELEASE_NOTES_2.0.4.md','BRANCH_MAP_2026-10-05.md'):
+ p=ROOT/'docs'/name
+ if p.is_file():shutil.copy2(p,app/'docs'/name)
+ (app/'TEST_2.0.4.md').write_text('Veyra 2.0.4 本地测试候选 / local test candidate\n\n'
+ '整合 NR 强度5及三风格自动/手动调控、Xbox解码错误恢复、Claude UI修复、性能/计时/AMD NR/字幕及此前本地修复。'
+ '公开版本仍为2.0.3,本包用于发布前测试。请先在新目录解压,不复制旧配置目录或混装DLL。\n\n'
+ '重点复测:真实Xbox补帧热切换、采集60帧及后台播放、RX9000 NR、数字输入/列表宽度/补帧预设。'
+ '本机RTX5070短测不能代替对应显卡或主机实测,软件解码回退可能增加CPU与延迟;默认GPU优先级为实时,旧选择保留。\n\n'
+ '详见docs/RELEASE_NOTES_2.0.4.md和docs/RELEASE_2.0.4_ACCEPTANCE_2026-10-05.md。\n',encoding='utf8')
+ assert sha(app/'veyra_qml_ui.exe')==sha(BUILD/'veyra_qml_ui.exe')
+ for p in (ROOT/'qml').rglob('*'):
+ if p.is_file():assert sha(app/'qml'/p.relative_to(ROOT/'qml'))==sha(p)
+ for rel,digest in immutable.items():assert sha(app/rel)==digest,rel
+ expected=set(sourcepaths)|{'package-manifest.json','TEST_2.0.4.md',
+ 'docs/RELEASE_2.0.4_PLAN_2026-10-05.md','docs/RELEASE_2.0.4_ACCEPTANCE_2026-10-05.md','docs/RELEASE_NOTES_2.0.4.md','docs/BRANCH_MAP_2026-10-05.md'}
+ expected.update('qml/'+p.relative_to(ROOT/'qml').as_posix() for p in (ROOT/'qml').rglob('*') if p.is_file())
+ expected.update('shaders/'+p.relative_to(BUILD/'shaders').as_posix() for p in (BUILD/'shaders').rglob('*') if p.is_file())
+ actual={p.relative_to(app).as_posix() for p in app.rglob('*') if p.is_file()}
+ assert not actual-expected,sorted(actual-expected)
+ assert not any(private(rel) or (app/rel).is_symlink() or Path(rel).suffix.lower() in ('.pdb','.lib','.addon64','.log','.dmp','.pyc','.whl') for rel in actual)
+ records=[{'path':rel,'size':(app/rel).stat().st_size,'sha256':sha(app/rel)} for rel in sorted(actual-{'package-manifest.json'})]
+ manifest.update(version=VERSION,candidate=VERSION,displayVersion=VERSION,sourceCommit=head,sourceArchiveCommit=head,
+ baseCommit=head,worktreeDirty=dirty,localOnly=True,releaseReady=False,executableSha256=sha(app/'veyra_qml_ui.exe'),
+ validationRecord='docs/RELEASE_2.0.4_ACCEPTANCE_2026-10-05.md',files=records,
+ hardwareValidation='RTX5070 local regression only; actual Xbox/RX9070XT, RX9000 NR, RTX20/30/40 and affected capture card remain unverified')
+ if mode=='finalize':manifest['correspondingSource'].update(application='../'+sourcezip.name,applicationSha256=sha(sourcezip),displayVersionOverride='-DVEYRA_DISPLAY_VERSION=2.0.4')
+ save(app/'package-manifest.json',manifest)
+ receipt={'vendor':vendor,'candidate':str(app),'exeSha256':sha(app/'veyra_qml_ui.exe'),'fileCount':len(records)+1,
+ 'unchangedComponentCount':len(immutable),'sourceCommit':head,'mainCommit':json.loads((ARCH/'main-merge.json').read_text(encoding='utf8'))['mainAfter'] if (ARCH/'main-merge.json').exists() else None}
+ subprocess.run([sys.executable,'-B',str(ROOT/'scripts/acceptance/release-2.0.4-audit.py'),str(app),vendor,label+'-'+vendor],check=True)
+ if mode=='finalize':
+ archive=PACK/(app.name+'.zip');assert not archive.exists()
+ print('ARCHIVE',vendor,flush=True)
+ with zipfile.ZipFile(archive,'x',zipfile.ZIP_DEFLATED,compresslevel=6) as z:
+ for rel in sorted(actual):z.write(app/rel,arcname=app.name+'/'+rel)
+ with zipfile.ZipFile(archive) as z:
+ assert z.testzip() is None
+ for row in records:assert hashlib.sha256(z.read(app.name+'/'+row['path'])).hexdigest()==row['sha256']
+ assert hashlib.sha256(z.read(app.name+'/package-manifest.json')).hexdigest()==sha(app/'package-manifest.json')
+ receipt.update(archive=str(archive),archiveBytes=archive.stat().st_size,archiveSha256=sha(archive),
+ sourceZip=str(sourcezip),sourceZipSha256=sha(sourcezip),packageManifestSha256=sha(app/'package-manifest.json'),zipCrcAndAllPayloadHashesPassed=True)
+ delivery.append(receipt);print(json.dumps(receipt,ensure_ascii=False),flush=True)
+save(LOG/('packages-'+label+'.json'),delivery)
+if mode=='finalize':save(PACK/'DELIVERY.json',delivery)
+subprocess.run(guard,check=True)
diff --git a/scripts/acceptance/release-2.0.4-tests.py b/scripts/acceptance/release-2.0.4-tests.py
new file mode 100644
index 00000000..0a80b5e8
--- /dev/null
+++ b/scripts/acceptance/release-2.0.4-tests.py
@@ -0,0 +1,247 @@
+"""2.0.4 regression using the existing field-test fixtures; no live Xbox login."""
+from pathlib import Path
+import hashlib, json, os, re, shutil, subprocess, sys, time
+
+ROOT = Path(__file__).resolve().parents[2]
+BASE = Path('E:/项目/Veyra'); TASK = 'release-2.0.4-20261005'
+label = sys.argv[1]; case = sys.argv[2]
+assert label.replace('-', '').isalnum()
+if case == 'qml':
+ app=BASE/'test-packages'/TASK/'Veyra-2.0.4-NVIDIA-win64-portable'
+ qt=Path('C:/veyra-deps/qt-veyra/6.8.3/msvc2022_64')
+ out=BASE/'tests'/TASK/label;tmp=BASE/'tmp'/TASK/label;log=BASE/'logs'/TASK/(label+'.log')
+ for p in (out,tmp):p.mkdir(parents=True,exist_ok=False)
+ for p in app.glob('Qt6*.dll'):shutil.copy2(p,out/p.name)
+ for name in ('Qt6Test.dll','Qt6QuickTest.dll'):shutil.copy2(qt/'bin'/name,out/name)
+ shutil.copy2(BASE/'build'/TASK/'veyra_qml_quick_tests.exe',out/'veyra_qml_quick_tests.exe')
+ shutil.copytree(app/'qml',out/'qml');shutil.copytree(qt/'qml/QtTest',out/'qml/QtTest')
+ shutil.copytree(ROOT/'tests/qml/quick',out/'qml-tests')
+ env=os.environ.copy();env.update(TEMP=str(tmp),TMP=str(tmp),QML_DISABLE_DISK_CACHE='1',QT_FORCE_STDERR_LOGGING='1',
+ QT_QPA_PLATFORM='offscreen',QT_QUICK_BACKEND='software',QT_QUICK_CONTROLS_STYLE='Basic',
+ QT_QPA_PLATFORM_PLUGIN_PATH=str(qt/'plugins/platforms'),VEYRA_EXPORT_TEST_ARTIFACTS=str(out/'artifacts'),PATH=str(out)+os.pathsep+str(qt/'bin')+os.pathsep+env.get('PATH',''))
+ (out/'artifacts').mkdir()
+ args=[str(out/'veyra_qml_quick_tests.exe'),'-input',str(out/'qml-tests')]
+ with log.open('xb') as console:
+ try:rc=subprocess.run(args,cwd=out,env=env,stdout=console,stderr=subprocess.STDOUT,timeout=290).returncode
+ except subprocess.TimeoutExpired:rc=124
+ content=log.read_text(encoding='utf8',errors='replace')
+ passed=rc==0 and '0 failed' in content and 'SliderNumberInput::test_' in content
+ log.with_suffix('.json').write_text(json.dumps({'passed':passed,'exit':rc,'args':args,'log':str(log)},ensure_ascii=False,indent=2),encoding='utf8')
+ print(content[-5000:]);raise SystemExit(0 if passed else 1)
+if case in ('smoke','smoke-native','hot','ui','ui-restore','nr-export','nr-restore'):
+ is_smoke=case.startswith('smoke')
+ app=Path(sys.argv[3]).resolve()
+ assert app.is_relative_to((BASE/'test-packages'/TASK).resolve()) and (app/'veyra_qml_ui.exe').is_file()
+ log=BASE/'logs'/TASK/(label+'.log'); engine_log=log.with_name(label+'-engine.log')
+ out=BASE/'tests'/TASK/label; tmp=BASE/'tmp'/TASK/label
+ for p in (out,tmp):p.mkdir(parents=True,exist_ok=False)
+ (out/'screenshots').mkdir()
+ guard=[sys.executable,'-B',str(ROOT/'scripts/acceptance/release-2.0.4-control.py')]
+ subprocess.run(guard,check=True)
+ env={k:v for k,v in os.environ.items() if not k.upper().startswith(('VEYRA_','QT_','QSG_'))}
+ windows=Path(env['WINDIR'])
+ env.update(TEMP=str(tmp),TMP=str(tmp),CUDA_CACHE_PATH=str(tmp/'cuda-cache'),
+ VEYRA_LOG_FILE=str(engine_log),QML_DISABLE_DISK_CACHE='1',QT_FORCE_STDERR_LOGGING='1',
+ PATH=os.pathsep.join(map(str,(app,windows/'System32',windows,windows/'System32/Wbem'))))
+ args=[str(app/'veyra_qml_ui.exe'),'--data-dir',str(out/'profile'),'--page','pro',
+ '--size','1280x900','--obs-game-capture','--exit-after','250000' if case.startswith('nr-') else '8000' if is_smoke else '190000']
+ if case=='smoke-native':args.remove('--obs-game-capture')
+ main=app/'qml/Veyra/Main.qml'; original=main.read_bytes()
+ assert original==(ROOT/'qml/Veyra/Main.qml').read_bytes()
+ if is_smoke:
+ media=BASE/'tests/field-fixes-20261005/media/fx-embedded.mkv';assert media.is_file()
+ args.append(str(media))
+ elif case in ('ui','ui-restore','nr-export','nr-restore'):
+ is_nr=case.startswith('nr-');restore=case.endswith('restore')
+ media=BASE/'tests'/TASK/'nr-fixture.mp4' if is_nr else BASE/'tests/hotfix-2.0.0-20261002/media/gta6-1080p30-60s.mp4'
+ assert media.is_file()
+ profile_receipt=BASE/'logs'/TASK/('nr-profile.json' if is_nr else 'ui-profile.json')
+ if restore:
+ profile=Path(json.loads(profile_receipt.read_text(encoding='utf8'))['profile'])
+ args[args.index('--data-dir')+1]=str(profile)
+ if not is_nr:
+ prefs=profile/'qml-preferences.v1.json'
+ values=json.loads(prefs.read_text(encoding='utf8'))
+ assert len(values['fgPresets'])==1
+ rejected=dict(values['fgPresets'][0]);rejected.update(name='204 rejected field',flowQuality=99)
+ values['fgPresets'].append(rejected)
+ prefs.write_text(json.dumps(values,ensure_ascii=False,indent=2),encoding='utf8')
+ else:profile_receipt.write_text(json.dumps({'profile':str(out/'profile')}),encoding='utf8')
+ if is_nr:
+ (out/'outputs').mkdir()
+ args += ['--export-out',str(out/'outputs')]
+ source_file=ROOT/'scripts/acceptance/nr-protection-ui.qml'
+ properties='item.media='+json.dumps(str(media))+';item.evidence='+json.dumps(str(out))+';item.resume='+str(restore).lower()+';item.multi=false;item.visual=false;item.styleFollowup=true'
+ else:
+ source_file=ROOT/'scripts/acceptance/release-2.0.4-ui.qml'
+ properties='item.media='+json.dumps(str(media))+';item.restore='+str(restore).lower()
+ injection='\nLoader { anchors.fill: parent; source: '+json.dumps(source_file.as_uri())+'; onLoaded: { '+properties+' } }\n'
+ source=original.decode('utf8');at=source.rfind('}');assert at>0
+ main.write_text(source[:at]+injection+source[at:],encoding='utf8')
+ else:
+ media=BASE/'tests/hotfix-2.0.0-20261002/media/gta6-1080p30-60s.mp4';assert media.is_file()
+ injection=r'''
+ Timer {
+ interval:250;running:true;repeat:true
+ property int stage:0
+ property int ticks:0
+ property int total:0
+ property int current:0
+ property int readyTicks:0
+ property double beforePosition:0
+ property double readyPosition:0
+ property var cases:["fsr3","xess","dlss","fsr3"]
+ function require(ok,why){if(!ok)throw new Error(why)}
+ function next(value){stage=value;ticks=0}
+ function startCase(){
+ beforePosition=veyra.position
+ veyra.fgBackendName=cases[current];veyra.fgMultiplier=2;veyra.fgEnabled=true
+ readyTicks=0
+ next(2)
+ }
+ onTriggered:{try{
+ ++ticks;++total
+ require(total<720,"180s bounded deadline stage="+stage)
+ require(!veyra.failed,"playback failed "+veyra.statusText)
+ if(stage===0){
+ if(ticks<8)return
+ veyra.muted=true;veyra.nodeMode=0;veyra.nrEnabled=false;veyra.srEnabled=false;veyra.fgEnabled=false
+ veyra.openPath(__MEDIA__);next(1)
+ }else if(stage===1){
+ if(!veyra.running||veyra.applying||veyra.position<.5)return
+ startCase()
+ }else if(stage===2){
+ if(veyra.applying||!veyra.fgActive){readyTicks=0;return}
+ if(!readyTicks){readyPosition=veyra.position;readyTicks=1;return}
+ if(++readyTicks<16)return
+ require(veyra.running&&veyra.fgActive,"FG not active "+cases[current])
+ require(veyra.fgBackendName===cases[current]&&veyra.fgMultiplier===2,"backend not applied")
+ require(veyra.position>readyPosition+1,"source stopped after ready "+cases[current])
+ console.log("STREAM_FIX_FG_CASE",cases[current],veyra.position,veyra.submitFps,veyra.fgProviderText)
+ ++current
+ if(current<cases.length){startCase();return}
+ beforePosition=veyra.position;veyra.fgEnabled=false;next(3)
+ }else if(stage===3){
+ if(ticks<12||veyra.applying)return
+ require(veyra.running&&!veyra.fgActive&&veyra.position>beforePosition+.5,"FG disable stopped playback")
+ veyra.nrEnabled=true
+ const first=veyra.nrLayers[0].index
+ require(veyra.setNrLayerParameter(first,"runtime",3),"original NR selection")
+ require(veyra.setNrLayerParameter(first,"style",1),"NR style 1")
+ require(veyra.setNrLayerParameter(first,"total",5),"NR strength 5")
+ require(veyra.setNrLayerParameter(first,"correctionEnabled",1),"NR protection")
+ require(veyra.duplicateNrLayer(first)>=0,"second NR layer")
+ const second=veyra.nrLayers[1].index
+ require(veyra.setNrLayerParameter(second,"style",2),"second NR style 2")
+ require(veyra.setNrLayerParameter(second,"correctionAuto",0),"second manual NR")
+ beforePosition=veyra.position;readyTicks=0;next(4)
+ }else if(stage===4){
+ if(veyra.applying||!veyra.nrActive){readyTicks=0;return}
+ if(!readyTicks){readyPosition=veyra.position;readyTicks=1;return}
+ if(++readyTicks<16)return
+ require(veyra.running&&veyra.nrActive&&veyra.nrLayers.length===2,"two-layer NR inactive")
+ require(veyra.position>readyPosition+.5,"NR preview stopped after ready")
+ require(veyra.setPreference("screenshotDir",__SCREENSHOTS__),"screenshot directory")
+ veyra.takeScreenshot()
+ console.log("STREAM_FIX_NR_CASE",JSON.stringify(veyra.nrLayers));next(5)
+ }else if(stage===5){
+ if(ticks<8)return
+ console.log("STREAM_FIX_HOT_PASS");Qt.quit()
+ }
+ }catch(e){console.error("STREAM_FIX_HOT_FAIL",e.message);Qt.quit()}}
+ }
+'''.replace('__MEDIA__',json.dumps(str(media))).replace('__SCREENSHOTS__',json.dumps(str(out/'screenshots')))
+ source=original.decode('utf8'); at=source.rfind('}');assert at>0
+ main.write_text(source[:at]+injection+source[at:],encoding='utf8')
+ begin=time.monotonic()
+ try:
+ with log.open('xb') as console:
+ try:rc=subprocess.run(args,cwd=app,env=env,stdout=console,stderr=subprocess.STDOUT,timeout=270).returncode
+ except subprocess.TimeoutExpired:rc=124
+ finally:main.write_bytes(original)
+ console=log.read_text(encoding='utf8',errors='replace')
+ text=engine_log.read_text(encoding='utf8',errors='replace') if engine_log.exists() else ''
+ bad=[line for line in (text+'\n'+console).splitlines() if any(word in line for word in ('[ERROR]','[FATAL]','ReferenceError:','TypeError:','no root object','STREAM_FIX_HOT_FAIL'))]
+ ass=[line for line in text.splitlines() if '[libass]' in line]
+ passed=rc==0 and not bad
+ if is_smoke:passed=passed and any('track ready events=5' in line for line in ass) and any('fonts configured container=1' in line for line in ass)
+ elif case in ('ui','ui-restore','nr-export','nr-restore'):
+ marker={'ui':'RELEASE_204_UI_PASS','ui-restore':'RELEASE_204_UI_RESTORE_PASS','nr-export':'NR_CONTROLS_UI_PASS','nr-restore':'NR_CONTROLS_RESTORE_PASS'}[case]
+ passed=passed and marker in console and 'RELEASE_204_UI_FAIL' not in console and 'NR_CONTROLS_UI_FAIL' not in console
+ if case=='ui':passed=passed and 'RELEASE_204_FG_PRESET_PASS' in console
+ if case=='ui-restore':passed=passed and 'RELEASE_204_FG_REJECT_PASS' in console
+ if case=='nr-export':
+ outputs=list((out/'outputs').glob('*.mp4'))
+ passed=passed and len(outputs)==1 and len(list((out/'screenshots').glob('*.png')))>=4
+ if outputs:
+ probe_exe=shutil.which('ffprobe');assert probe_exe,'ffprobe is required'
+ probe=json.loads(subprocess.check_output([probe_exe,'-v','error','-count_frames','-show_streams','-of','json',str(outputs[0])],timeout=30))
+ stream=next(s for s in probe['streams'] if s['codec_type']=='video')
+ passed=passed and stream['codec_name']=='hevc' and int(stream['nb_read_frames'])==60 and (int(stream['width']),int(stream['height']))==(3840,2160)
+ (out/'export-probe.json').write_text(json.dumps(probe,indent=2),encoding='utf8')
+ else:
+ passed=passed and 'STREAM_FIX_HOT_PASS' in console and console.count('STREAM_FIX_FG_CASE')==4 and 'STREAM_FIX_NR_CASE' in console and bool(list((out/'screenshots').glob('*.png')))
+ assert main.read_bytes()==original
+ result={'passed':passed,'exit':rc,'seconds':round(time.monotonic()-begin,3),'args':args,
+ 'exeSha256':hashlib.sha256((app/'veyra_qml_ui.exe').read_bytes()).hexdigest(),
+ 'mainQmlSha256':hashlib.sha256(original).hexdigest(),'log':str(log),'engineLog':str(engine_log),
+ 'libass':ass[:8],'errors':bad[:20]}
+ log.with_suffix('.json').write_text(json.dumps(result,ensure_ascii=False,indent=2),encoding='utf8')
+ print('LOCAL APP',case,'PASS' if passed else 'FAIL',log)
+ print('\n'.join(bad[:12] or [line for line in console.splitlines() if any(marker in line for marker in ('STREAM_FIX_','RELEASE_204_','NR_CONTROLS_'))]))
+ subprocess.run(guard,check=True)
+ raise SystemExit(0 if passed else 1)
+BUILD = BASE/'build'/TASK
+APP = BASE/'test-packages/release-2.0.4-20261005/Veyra-2.0.4-NVIDIA-win64-portable'
+cases = {'xbox': 'veyra_xbox_tests', 'scene': 'veyra_scene_tests',
+ 'timing': 'veyra_live_timing_tests', 'codec': 'veyra_capture_compressed_tests',
+ 'repair': 'veyra_repair_contract_tests', 'chain': 'veyra_effect_chain_tests',
+ 'preset': 'veyra_preset_library_tests', 'legacy': 'veyra_repair_preset_tests',
+ 'i18n': 'veyra_ui_i18n_tests', 'hardware': 'veyra_effect_availability_tests',
+ 'vfg-settings': 'veyra_vfg_settings_tests', 'audio': 'veyra_capture_audio_tests',
+ 'temporal': 'veyra_nr_temporal_gpu_tests', 'correction': 'veyra_nr_correction_gpu_tests',
+ 'correction-fp16': 'veyra_nr_correction_gpu_tests'}
+assert case in cases
+LOG = BASE/'logs'/TASK/(label+'.log'); TMP = BASE/'tmp'/TASK/label
+OUT = BASE/'tests'/TASK/label
+for p in (LOG.parent, TMP, OUT): p.mkdir(parents=True, exist_ok=True)
+guard = [sys.executable, '-B', str(ROOT/'scripts/acceptance/release-2.0.4-control.py')]
+subprocess.run(guard, check=True)
+exe = BUILD/(cases[case]+'.exe'); assert exe.is_file()
+args = [str(exe)]
+fixture = None
+if case == 'legacy':args.append('presets/legacy-presets.v1')
+if case == 'vfg-settings':args.append(str(OUT/'vfg-settings'))
+if case == 'audio':args.append('--xbox-float-rtp')
+if case.startswith('correction'):
+ args += [str(BASE/'tests/nr-strength-protection-20261005/baseline/NrResidualComposite.dxil'),str(OUT/'shader')]
+ if case.endswith('fp16'):args.append('--fp16')
+if case == 'codec':
+ fixture = Path(sys.argv[3]); assert fixture.resolve().is_relative_to(BASE.resolve()) and fixture.is_file()
+ # The inherited main(char**) fixture loader is ANSI on Windows. Run from
+ # the isolated Unicode directory with an ASCII relative media argument.
+ local_fixture = OUT/('input'+fixture.suffix)
+ assert not local_fixture.exists()
+ shutil.copy2(fixture, local_fixture)
+ assert hashlib.sha256(local_fixture.read_bytes()).digest() == hashlib.sha256(fixture.read_bytes()).digest()
+ args.append(local_fixture.name)
+env = {k:v for k,v in os.environ.items() if not k.upper().startswith('VEYRA_')}
+env.update(TEMP=str(TMP), TMP=str(TMP), VEYRA_LOG_FILE=str(OUT/'product.log'),
+ PATH=str(APP)+os.pathsep+env.get('PATH', ''))
+begin = time.monotonic()
+with LOG.open('xb') as log:
+ try:
+ rc = subprocess.run(args, cwd=OUT, env=env, stdout=log,
+ stderr=subprocess.STDOUT, timeout=290).returncode
+ except subprocess.TimeoutExpired:
+ rc = 124
+content = LOG.read_text(encoding='utf8', errors='replace')
+passed = rc == 0 and not re.search(r'^(?:FAIL\b|FAILURES\b|SKIP\b)', content, re.MULTILINE)
+result = {'passed':passed, 'exit':rc, 'seconds':round(time.monotonic()-begin, 3),
+ 'args':args, 'exeSha256':hashlib.sha256(exe.read_bytes()).hexdigest(), 'log':str(LOG)}
+if fixture: result['fixtureSha256'] = hashlib.sha256(fixture.read_bytes()).hexdigest()
+LOG.with_suffix('.json').write_text(json.dumps(result, ensure_ascii=False, indent=2), encoding='utf8')
+lines=[line for line in content.splitlines() if re.match(r'^(?:\[?(?:PASS|FAIL)\b|ALL PASS\b|FAILURES\b|SKIP\b|xbox tests:|SCENE-TESTS:|hardware frames=|software frames=)',line)]
+print('\n'.join(lines[-90:])); print('LOCAL TEST', case, 'PASS' if passed else 'FAIL', LOG)
+subprocess.run(guard, check=True)
+raise SystemExit(0 if passed else 1)
diff --git a/scripts/acceptance/release-2.0.4-ui.qml b/scripts/acceptance/release-2.0.4-ui.qml
new file mode 100644
index 00000000..d1c4f4c4
--- /dev/null
+++ b/scripts/acceptance/release-2.0.4-ui.qml
@@ -0,0 +1,78 @@
+import QtQuick
+
+Item {
+ id: test
+ property string media: ""
+ property bool restore: false
+ property int phase: 0
+ property int ticks: 0
+ property double startPosition: 0
+ property var expected: ({})
+ function require(ok,why) { if (!ok) throw new Error(why) }
+ function values() {
+ return {backend:veyra.fgBackendName,multiplier:veyra.fgMultiplier,
+ vfgQuality:veyra.vfgQuality,motion:veyra.fgMotionSource,
+ opticalFlow:veyra.opticalFlowChoice,amdHalf:veyra.amdFlowHalf,
+ flowQuality:veyra.flowQuality,contentRate:veyra.contentRate,
+ strict:veyra.fgStrict,lowQueue:veyra.fgLowQueue}
+ }
+ function check(want) {
+ const got=values()
+ for (const key in want) require(got[key]===want[key],key+" expected="+want[key]+" got="+got[key])
+ }
+ Timer {
+ interval:250;running:true;repeat:true
+ onTriggered: { try {
+ ++test.ticks
+ test.require(test.ticks<400,"100s UI deadline phase="+test.phase)
+ test.require(!veyra.failed,"playback failed "+veyra.statusText)
+ if (test.phase===0) {
+ if(test.ticks<8)return
+ test.require(veyra.setPreference("listInspectorWidth",480),"panel width preference")
+ test.require(Number(veyra.preferences.listInspectorWidth)===480,"panel width not applied")
+ test.require(!veyra.setPreference("listInspectorWidth",1),"invalid panel width accepted")
+ test.require(veyra.preferences.gpuPriority===undefined||veyra.preferences.gpuPriority==="realtime","fresh profile default")
+ test.require(veyra.gpuPriorityStatus.length>0,"GPU priority status missing")
+ veyra.nodeMode=0;veyra.muted=true;veyra.nrEnabled=false;veyra.srEnabled=false;veyra.fgEnabled=false
+ if(test.restore) {
+ const rows=veyra.fgPresets
+ test.require(rows.length===2&&rows[0].name==="204 persisted FG","FG preset did not survive restart")
+ test.require(veyra.applyFgPreset(rows[0].index),"restore apply failed")
+ test.check({backend:"dlss",multiplier:2,opticalFlow:0,amdHalf:true,flowQuality:0,contentRate:3,strict:true,lowQueue:true})
+ test.require(!veyra.applyFgPreset(rows[1].index),"rejected field incorrectly reported as a complete preset")
+ test.require(veyra.flowQuality===0,"rejected field replaced the last valid setting")
+ console.log("RELEASE_204_FG_REJECT_PASS")
+ test.require(veyra.deleteFgPreset(1)&&veyra.deleteFgPreset(0)&&veyra.fgPresets.length===0,"delete persisted preset")
+ console.log("RELEASE_204_UI_RESTORE_PASS",JSON.stringify(test.values()));Qt.quit();return
+ }
+ veyra.fgBackendName="dlss";veyra.fgMultiplier=2;veyra.vfgQuality=2
+ veyra.fgMotionSource=1;veyra.setOpticalFlowChoice(0);veyra.amdFlowHalf=true;veyra.flowQuality=0;veyra.contentRate=3
+ veyra.fgStrict=true;veyra.fgLowQueue=true
+ test.expected=test.values()
+ test.require(veyra.saveFgPreset("204 persisted FG",false),"FG save")
+ test.require(!veyra.saveFgPreset("204 persisted FG",false),"duplicate save silently accepted")
+ test.require(veyra.saveFgPreset("204 temporary",false),"second FG save")
+ test.require(veyra.fgPresets.length===2,"saved FG count")
+ veyra.fgEnabled=false;veyra.flowQuality=2;veyra.contentRate=0;veyra.amdFlowHalf=false;veyra.fgStrict=false;veyra.fgLowQueue=false
+ test.require(veyra.applyFgPreset(0),"FG apply")
+ test.check(test.expected)
+ test.require(veyra.deleteFgPreset(1)&&veyra.fgPresets.length===1,"FG delete")
+ console.log("RELEASE_204_FG_PRESET_PASS",JSON.stringify(test.values()))
+ veyra.fgEnabled=false;veyra.openPath(test.media);test.phase=1
+ } else if(test.phase===1) {
+ if(!veyra.running||veyra.applying||veyra.position<.5)return
+ test.startPosition=veyra.position
+ veyra.setPreference("listInspectorWidth",540)
+ veyra.page="min";veyra.page="pro"
+ test.phase=2
+ } else if(test.phase===2) {
+ if(veyra.position<test.startPosition+1)return
+ test.require(veyra.running,"width/page change stopped playback")
+ test.require(Number(veyra.preferences.listInspectorWidth)===540,"panel width changed unexpectedly")
+ test.require(veyra.gpuPriorityStatus.length>0,"GPU priority status missing during playback")
+ console.log("RELEASE_204_UI_PASS",veyra.position,veyra.gpuPriorityStatus)
+ veyra.stopPlayback();Qt.quit()
+ }
+ } catch(e) { console.error("RELEASE_204_UI_FAIL",e.message);Qt.quit() } }
+ }
+}
diff --git a/src/gfx/GpuSchedulingPriority.cpp b/src/gfx/GpuSchedulingPriority.cpp
index b5e86526..ba204579 100644
--- a/src/gfx/GpuSchedulingPriority.cpp
+++ b/src/gfx/GpuSchedulingPriority.cpp
@@ -32,8 +32,18 @@ void applyLocked(){
// WDDM has no process scheduling record before the first GPU context.
publish(uint32_t(query)==0xC000000Du?GpuPriorityState::Pending:GpuPriorityState::Rejected,-1,uint32_t(query));return;
}
- const auto set=api.set(GetCurrentProcess(),int(current.requested));
- const auto verify=api.get(GetCurrentProcess(),&after);
+ auto set=api.set(GetCurrentProcess(),int(current.requested));
+ auto verify=api.get(GetCurrentProcess(),&after);
+ // Realtime is the default (field request 2026-10-05). Where Windows refuses it
+ // for this process, High is the closest class it may still grant; the status
+ // then reports Rejected with High as the actual class.
+ if(current.requested==GpuPriority::Realtime&&(set<0||verify<0||after!=int(current.requested))){
+ const auto refused=set<0?set:verify;
+ set=api.set(GetCurrentProcess(),int(GpuPriority::High));
+ verify=api.get(GetCurrentProcess(),&after);
+ publish(GpuPriorityState::Rejected,verify>=0?after:before,uint32_t(refused));
+ return;
+ }
publish(set>=0&&verify>=0&&after==int(current.requested)?GpuPriorityState::Applied:GpuPriorityState::Rejected,
verify>=0?after:before,uint32_t(set<0?set:verify));
}
diff --git a/src/ui/QmlPlayerBridge.cpp b/src/ui/QmlPlayerBridge.cpp
index 9076f2b3..ca36c071 100644
--- a/src/ui/QmlPlayerBridge.cpp
+++ b/src/ui/QmlPlayerBridge.cpp
@@ -4755,7 +4755,9 @@ QRect QmlPlayerBridge::launchScreenAvailable() const {
bool QmlPlayerBridge::setPreference(const QString& key, const QVariant& value) {
static const QHash<QString, std::pair<int, int>> ranges{
{"subtitleSize", {16, 56}}, {"subtitleFont", {0, 5}}, {"subtitleOutline", {0, 3}},
- {"subtitleMargin", {0, 240}}, {"subtitleLines", {0, 8}}};
+ {"subtitleMargin", {0, 240}}, {"subtitleLines", {0, 8}},
+ // 列表模式 parameter panel width (ProPage splitter); QML clamps it to the window.
+ {"listInspectorWidth", {376, 4000}}};
static const QStringList flags{"subtitleEnabled", "subtitleBackground", "subtitleFit",
"subtitleSecondLanguage", "audioForceStereo", "holdCompare",
"magewellLowLatency", "cinePillHidden", "exportStopsPlayback", "obsGameCapture", "autoResume", "fullscreenMemoryProtection", "prewarmEnhancement"};
@@ -4842,8 +4844,9 @@ void QmlPlayerBridge::applyPreference(const QString& key) {
}
if(key==QLatin1String("gpuPriority")){
const auto value=impl_->prefString("gpuPriority");
- gfx::requestGpuPriority(value==QLatin1String("realtime")?gfx::GpuPriority::Realtime:
- value==QLatin1String("high")?gfx::GpuPriority::High:gfx::GpuPriority::Normal);
+ // Unset means the default, 实时 (field request 2026-10-05).
+ gfx::requestGpuPriority(value==QLatin1String("normal")?gfx::GpuPriority::Normal:
+ value==QLatin1String("high")?gfx::GpuPriority::High:gfx::GpuPriority::Realtime);
}
if(key==QLatin1String("fullscreenMemoryProtection")){impl_->engine.setFullscreenMemoryProtection(impl_->prefBool("fullscreenMemoryProtection",false));emit snapshotChanged();}
if (key == QLatin1String("audioDevice")) sink::setPreferredRenderEndpoint(impl_->prefString("audioDevice").toStdWString());
@@ -6089,6 +6092,111 @@ void QmlPlayerBridge::setContentRate(int value) {
emit settingsChanged();
}
+// --- 补帧预设 ------------------------------------------------------------------
+// The 补帧 tab saved by name in the shell preferences (field request 2026-10-05),
+// apart from the whole-chain presets. Applying one goes through the tab's own
+// setters, so every value meets the same availability checks and notices as a
+// click on that control would.
+QVariantList QmlPlayerBridge::fgPresets() const {
+ QVariantList out;
+ const auto saved=impl_->prefs.value(QStringLiteral("fgPresets")).toList();
+ const auto backends=fgBackendChoices();
+ for(int i=0;i<saved.size();++i){
+ const auto entry=saved[i].toMap();
+ const int multiplier=entry.value(QStringLiteral("multiplier"),1).toInt();
+ QString backend=entry.value(QStringLiteral("backend")).toString();
+ for(const auto& choice:backends)
+ if(choice.toMap().value(QStringLiteral("id")).toString()==backend)backend=choice.toMap().value(QStringLiteral("label")).toString();
+ out<<QVariantMap{{"index",i},{"name",entry.value(QStringLiteral("name")).toString()},
+ {"note",multiplier>1?QStringLiteral("%1X · %2").arg(multiplier).arg(backend):tr("补帧关闭")}};
+ }
+ return out;
+}
+bool QmlPlayerBridge::saveFgPreset(const QString& name, bool replace) {
+ const QString trimmed=name.trimmed();
+ if(trimmed.isEmpty()||trimmed.size()>48){emit notice(tr("补帧预设名称需为 1–48 个字符"),true);return false;}
+ auto saved=impl_->prefs.value(QStringLiteral("fgPresets")).toList();
+ int existing=-1;
+ for(int i=0;i<saved.size();++i)if(saved[i].toMap().value(QStringLiteral("name")).toString()==trimmed)existing=i;
+ if(existing>=0&&!replace){emit notice(tr("已存在同名补帧预设"),true);return false;}
+ if(existing<0&&saved.size()>=32){emit notice(tr("补帧预设最多保存 32 个"),true);return false;}
+ const auto s=settings();
+ const QVariantMap entry{{"name",trimmed},{"backend",fgBackendName()},{"multiplier",fgMultiplier()},
+ {"vfgQuality",int(s.vfgQuality)},{"motion",int(s.fgMotion)},{"opticalFlow",int(s.opticalFlowBackend)},
+ {"amdHalf",s.amdFlowHalfResolution},{"flowQuality",int(s.flow)},{"contentRate",int(s.content)},
+ {"strict",fgStrict()},{"lowQueue",fgLowQueue()}};
+ if(existing>=0)saved[existing]=entry;else saved<<entry;
+ const auto previous=impl_->prefs;
+ impl_->prefs[QStringLiteral("fgPresets")]=saved;
+ if(!impl_->savePrefs()){impl_->prefs=previous;emit notice(tr("补帧预设保存失败"),true);return false;}
+ veyra::log::info("ui-fg-preset",std::format("saved name={} backend={} multiplier={} flow={} content={}",trimmed.toStdString(),
+ fgBackendName().toStdString(),fgMultiplier(),int(s.opticalFlowBackend),int(s.content)));
+ emit fgPresetsChanged();
+ emit notice(tr("已保存补帧预设:%1").arg(trimmed),false);
+ return true;
+}
+bool QmlPlayerBridge::applyFgPreset(int index) {
+ const auto saved=impl_->prefs.value(QStringLiteral("fgPresets")).toList();
+ if(index<0||index>=saved.size()){emit notice(tr("补帧预设不存在"),true);return false;}
+ const auto p=saved[index].toMap();
+ const QString backend=p.value(QStringLiteral("backend")).toString();
+ if(!backend.isEmpty()&&backend!=fgBackendName())setFgBackendName(backend);
+ const bool backendApplied=backend.isEmpty()||backend==fgBackendName();
+ if(p.contains(QStringLiteral("vfgQuality")))setVfgQuality(p.value(QStringLiteral("vfgQuality")).toInt());
+ // A multiplier saved for another backend only follows when that backend did.
+ const int multiplier=p.value(QStringLiteral("multiplier"),1).toInt();
+ if(backendApplied){
+ if(multiplier>1){if(multiplier!=fgMultiplier())setFgMultiplier(std::min(multiplier,fgMaxMultiplier()));}
+ else if(fgEnabled())setFgEnabled(false);
+ }
+ if(p.contains(QStringLiteral("motion"))){
+ const int motion=p.value(QStringLiteral("motion")).toInt();
+ auto s=settings();
+ if(motion>=0&&motion<=int(engine::MotionSource::Automatic)&&int(s.fgMotion)!=motion){
+ s.fgMotion=engine::MotionSource(motion);
+ if(impl_->commit(std::move(s)))emit settingsChanged();
+ }
+ }
+ if(p.contains(QStringLiteral("opticalFlow")))setOpticalFlowChoice(p.value(QStringLiteral("opticalFlow")).toInt());
+ if(p.contains(QStringLiteral("amdHalf")))setAmdFlowHalf(p.value(QStringLiteral("amdHalf")).toBool());
+ if(p.contains(QStringLiteral("flowQuality")))setFlowQuality(p.value(QStringLiteral("flowQuality")).toInt());
+ if(p.contains(QStringLiteral("contentRate")))setContentRate(p.value(QStringLiteral("contentRate")).toInt());
+ if(p.contains(QStringLiteral("strict")))setFgStrict(p.value(QStringLiteral("strict")).toBool());
+ if(p.contains(QStringLiteral("lowQueue")))setFgLowQueue(p.value(QStringLiteral("lowQueue")).toBool());
+ // A setter can reject an unavailable or invalid field while the backend
+ // itself succeeds. Report the resulting state, rather than claiming the
+ // complete preset was applied solely because its backend was accepted.
+ const auto applied=settings();
+ bool complete=backendApplied&&fgMultiplier()==multiplier;
+ const auto matchesInt=[&](const char* key,int actual){
+ const auto name=QString::fromLatin1(key);
+ return !p.contains(name)||p.value(name).toInt()==actual;
+ };
+ const auto matchesBool=[&](const char* key,bool actual){
+ const auto name=QString::fromLatin1(key);
+ return !p.contains(name)||p.value(name).toBool()==actual;
+ };
+ complete=complete&&matchesInt("vfgQuality",int(applied.vfgQuality))
+ &&matchesInt("motion",int(applied.fgMotion))&&matchesInt("opticalFlow",int(applied.opticalFlowBackend))
+ &&matchesInt("flowQuality",int(applied.flow))&&matchesInt("contentRate",int(applied.content))
+ &&matchesBool("amdHalf",applied.amdFlowHalfResolution)&&matchesBool("strict",fgStrict())&&matchesBool("lowQueue",fgLowQueue());
+ const QString name=p.value(QStringLiteral("name")).toString();
+ veyra::log::info("ui-fg-preset",std::format("applied name={} backend={} backendApplied={} complete={}",name.toStdString(),backend.toStdString(),backendApplied,complete));
+ if(complete)emit notice(tr("已应用补帧预设:%1").arg(name),false);
+ else emit notice(tr("部分补帧设置未被当前显卡或组件接受:%1").arg(name),true);
+ return complete;
+}
+bool QmlPlayerBridge::deleteFgPreset(int index) {
+ auto saved=impl_->prefs.value(QStringLiteral("fgPresets")).toList();
+ if(index<0||index>=saved.size())return false;
+ saved.removeAt(index);
+ const auto previous=impl_->prefs;
+ impl_->prefs[QStringLiteral("fgPresets")]=saved;
+ if(!impl_->savePrefs()){impl_->prefs=previous;emit notice(tr("删除补帧预设失败"),true);return false;}
+ emit fgPresetsChanged();
+ return true;
+}
+
int QmlPlayerBridge::displaySync() const { return int(impl_->presentation.display); }
bool QmlPlayerBridge::fullscreenMemorySafe() const { return !impl_->prefBool("fullscreenMemoryProtection",false)||!impl_->snapshot.vramFullscreenUnsafe; }
void QmlPlayerBridge::setPresentationFullscreen(bool value) {
diff --git a/tests/qml/quick/tst_slider_value.qml b/tests/qml/quick/tst_slider_value.qml
new file mode 100644
index 00000000..eba6e462
--- /dev/null
+++ b/tests/qml/quick/tst_slider_value.qml
@@ -0,0 +1,71 @@
+import QtQuick
+import QtTest
+import Veyra
+
+Item {
+ id: root
+ width: 420; height: 180
+ property real amount: 1.25
+ VSlider {
+ id: slider
+ x: 20; y: 30; width: 220
+ from: 0; to: 5; value: root.amount
+ valueFromModel: true; inputDecimals: 2
+ onMoved: value => root.amount = value
+ }
+ VSliderValue {
+ id: number
+ x: 265; y: 28; width: 70; height: 24
+ slider: slider
+ text: root.amount.toFixed(2)
+ }
+ VButton { id: outside; x: 20; y: 90; width: 120; height: 30; text: "Other control"; onClicked: forceActiveFocus() }
+ TestCase {
+ name: "SliderNumberInput"
+ when: windowShown
+ function init() {
+ number.closeEditor(false)
+ root.amount = 1.25
+ slider.from = 0; slider.to = 5; slider.inputScale = 1; slider.inputDecimals = 2
+ slider.enabledControl = true
+ }
+ function type(text) {
+ mouseClick(number, 35, 12)
+ tryCompare(number, "editing", true)
+ const input = findChild(number, "vslider-value-input")
+ verify(input !== null && input.activeFocus)
+ keyClick(Qt.Key_A, Qt.ControlModifier)
+ for (let i = 0; i < text.length; ++i) keyClick(text[i])
+ }
+ function test_enter_data() {
+ return [{tag:"decimal",typed:"2.75",expected:2.75},
+ {tag:"upper-bound",typed:"9",expected:5},
+ {tag:"lower-bound",typed:"-1",expected:0},
+ {tag:"invalid",typed:"abc",expected:1.25}]
+ }
+ function test_enter(data) {
+ type(data.typed); keyClick(Qt.Key_Return)
+ compare(number.editing, false)
+ compare(root.amount, data.expected)
+ // The model binding must survive input so a later engine update is visible.
+ root.amount = 3.5; compare(slider.value, 3.5)
+ }
+ function test_percent() {
+ slider.to = 1; slider.inputScale = 100; slider.inputDecimals = 0; root.amount = .4
+ type("75"); keyClick(Qt.Key_Return); compare(root.amount, .75)
+ }
+ function test_escape() {
+ type("4"); keyClick(Qt.Key_Escape)
+ compare(root.amount, 1.25); compare(number.editing, false)
+ }
+ function test_focus_loss() {
+ type("3.25"); mouseClick(outside, 30, 15)
+ tryCompare(number, "editing", false); compare(root.amount, 3.25)
+ }
+ function test_disabled() {
+ slider.enabledControl = false
+ mouseClick(number, 35, 12)
+ compare(number.editing, false); compare(root.amount, 1.25)
+ }
+ }
+}