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++
Beauty node UI, export/node-order fixes, docs and acceptance
Veyra Goal Agenta078eb5b4cd8
diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.mdindex f9d21d46..4be62244 100644--- a/THIRD_PARTY_NOTICES.md+++ b/THIRD_PARTY_NOTICES.md@@ -1,5 +1,24 @@# Third-party dependencies+## Beauty node: face restore and skin smoothing (2026-10-18)++| Source | License | Veyra use |+|---|---|---|+| YuNet face detector, OpenCV Zoo `models/face_detection_yunet` at `47534e27`: `face_detection_yunet_2023mar.onnx` (232,589 bytes, SHA256 `8f2383e4dd3cfbb4553ea8718107fc0423210dc964f9f4280604804ed2552fa4`) and `face_detection_yunet_2026may.onnx` (229,738 bytes, SHA256 `ebafce4e3c118d6554634be5c27ab333b4c047a9a8c3faf1d7cf93101c22f0f0`); hashes match the Git LFS pointer oids | MIT, Copyright (c) 2020 Shiqi Yu | Weights only, loaded at run time from `runtime/models`, `runtime_local/models` or `models` next to the program; never in source Git. The network runs as Veyra's own D3D12 compute shaders (`shaders/BeautyYuNet*.hlsl`, `src/beauty/YuNetGpu.cpp`); `src/beauty/OnnxLite.cpp` reads the ONNX file. |+| SkinSoft, yasunari01/obs-filters `fd5690f`, `skinsoft-filter/data/effects/skinsoft.effect` | GPL-2.0-or-later | Skin selection (HSV hue distance, saturation / luma windows, shared softness), detail protection and texture restore, ported to `shaders/Beauty.hlsli` and `shaders/BeautyApply.hlsl` |+| GPUPixel, pixpark/gpupixel `ef552bf`, `BeautyFaceUnitFilter` | Apache-2.0 | The variance-adaptive skin blend, re-implemented as a fast guided filter (He & Sun 2015) in `shaders/BeautyStats.hlsl` / `BeautyBlur.hlsl`; no GPUPixel source or binary is included |+| OpenCV 5.0.0 `FaceDetectorYN` | Apache-2.0 | Test references only (`scripts/beauty/yunet-reference.py` writes the expected detector outputs); `shaders/BeautyTrack.hlsl` follows its non-maximum suppression rules (whole-pixel boxes, score order, IoU). OpenCV is neither linked nor shipped |++Veyra changes: the detector, the GPU face tracking (stable ids, alpha-beta+filter, grace and fade), the same-frame original restore, the region pass with+indirect dispatch and every UI / preset / export connection are Veyra's own.+Smoothing works on a perceptual copy relative to the SDR or 203-nit HDR white+and blends back in linear light; SkinSoft's sparse 9-tap blur is replaced by the+guided filter, and its saturation / luma floors are lowered for dim skin. The+test pictures (OpenCV samples, the OpenCV Zoo example, scikit-image's astronaut)+are used by local tests only and are not part of the source tree. No inference+runtime (ONNX Runtime, DirectML, WinML) is added.+## Spatial anti-aliasing: FXAA / SMAA / MLAA (#53, 2026-10-18)Ported from SAOG0721/Magpie (experimental branch), commitdiff --git a/docs/BEAUTY_IMPLEMENTATION_PLAN_2026-10-17.md b/docs/BEAUTY_IMPLEMENTATION_PLAN_2026-10-17.mdnew file mode 100644index 00000000..0f316d7d--- /dev/null+++ b/docs/BEAUTY_IMPLEMENTATION_PLAN_2026-10-17.md@@ -0,0 +1,101 @@+# 美颜节点:实施记录(2026-10-17 / 18,Claude,`claude/beauty-20261017`)++依据:Codex 方案 `docs/BEAUTY_NODE_PLAN_2026-10-16.md`(`codex/beauty-node-plan-20261016` `b3d95e3`)与协调计划+`reports/claude-plan-48-53-beauty-20261017/PLAN_48_53_BEAUTY_2026-10-17.md` 第 5 节的 10 条复审。分支基于 E0 + #53+抗锯齿(`claude/aa-53-20261017` `6571e5d`,已合入本分支)。本文件记录做了什么、与方案的偏差、实测结果和没有验证的部分;+没有合并 main、推送、发布或打包。++## 1. 功能++一个美颜节点有两个独立子功能,各自开关:++- **人脸原画保护**:在识别到的人脸内把本帧原画(任何效果之前的画面:调色、超分、各层 NR、更早的美颜节点都没作用过)+ 混回来:`P = lerp(C, O, 强度 × 人脸遮罩)`,遮罩为 1 处直接取原画像素(逐位相同)。范围可选整张脸 / 仅皮肤;+ 区域扩展 −10%…30%、边缘羽化 0…20%(相对人脸大小)。+- **磨皮**:在 P 上做 SkinSoft 式的肤色选择、细节保护与纹理保留,平滑本身换成快速导向滤波(GPUPixel 的方差自适应思路),+ 另有整体强度、磨皮程度、半径(1080p 像素,随画面缩放,0…12)、细节保护、纹理保留、提亮,范围仅人脸 / 全部肤色,+ 高级项为肤色范围(色相中心/范围、饱和度与亮度上下限、边界柔和)。两项共用人脸置信度门限和遮罩显示(导出时自动关闭)。++人脸识别由同一条链上的所有美颜节点共用(档位 性能 320 px·10 Hz / 均衡 512 px·15 Hz / 精细 640 px·30 Hz、最多人脸 1…8、+跟踪平滑 0…1),随链保存、导出时冻结。只有节点开关和实例数会重建处理图,其余全部是实时 uniform。++列表模式:画质页“美颜”卡(NR 组与保护之后、RTX Video HDR 之前),最多 6 层,层卡可复制、上下移动、恢复默认、删除,+组开关记住各层原状态;新层默认关闭(加层不改变画面),四个预设(自然磨皮 / 轻度磨皮 / 人脸原画保护 / 保护 + 自然磨皮)+一键打开。节点模式:目录项“美颜”,最多 6 个,编辑器与列表共用 `qml/Veyra/BeautyEditor.qml`。++## 2. 结构++| 部分 | 文件 |+|---|---|+| 设置、校验、预设编码 | `include/veyra/engine/BeautySettings.h`;`EnhancementSettings`、`EffectChain`(`toChain`/`fromChain`/节点顺序)、`GraphDescription`、`ExportFeaturePolicy` |+| 存储 | 预设库 v15、链会话 v10,写入独立的 `.beauty` 文件,旧文件逐字节不变;导出协议 11 |+| 人脸检测 | `src/beauty/OnnxLite.cpp`(只读解析 ONNX 权重)、`src/beauty/YuNetGpu.cpp` + `shaders/BeautyYuNet*.hlsl`(YuNet 全网络手写 D3D12 compute) |+| 跟踪 | `src/beauty/FaceTracker.cpp` + `shaders/BeautyTrack.hlsl`:GPU 上 NMS(与 OpenCV FaceDetectorYN 相同的整像素框规则)、α-β 滤波、稳定 id、丢失后宽限再淡出;画面路径不回读,只每槽读回 64 字节计数头给界面 |+| 节点 | `src/pipeline/BeautyPass.cpp` + `shaders/Beauty{Roi,Stats,Blur,Apply}.hlsl`、`Beauty.hlsli`、`BeautyFaces.hlsli` |+| 图 | `EnhanceGraph`:E0 插入槽(源尺寸 SourcePost、PreSr、PreNr、链尾 Tail),`bindSlotPassInput` 同时修正 NR 旁路时只重绑调色的问题 |+| 界面 | `QmlPlayerBridge` beauty*、`ProPage`、`NodePage`、`BeautyEditor.qml`,计时行“人脸识别”“美颜…美颜 6”(有样本才显示),84 条四语言翻译 |++执行:ROI pass 用一个线程算出本帧所有人脸外接圆的并集(全部肤色时为整帧),写 `ExecuteIndirect` 参数;输出先+`CopyResource(input)`,所以区域外逐位等于输入;磨皮在约 540 行的统计网格上做均值/方差(4 次可分离高斯),最后一个全分辨率+pass 合成。颜色:平滑在感知域(sRGB 曲线,白点以上对数延续,保留负值分量)进行,所有混合回线性;HDR 以 203 nit 为白。++原画来源在建图时确定:没有融合调色 → 直接用 `srcRgba_`(零成本);只有附加调色 → `preGradeRgba_`;有融合调色 →+`beautyOriginal_`,只在保护开启的帧多做一次未调色转换 + 拷贝。++## 3. P0 结论与偏差++1. **推理路线**:用手写 HLSL 跑 YuNet(约 5.3 万权重、45 层),不引入 ONNX Runtime / DirectML / WinML 新二进制+ (AGENTS 规则下新增运行库需逐项授权);与 OpenCV 5.0.0 FaceDetectorYN 在 8 张图 × 3 个尺寸、两个模型版本上结果一致+ (修正 NMS 为 OpenCV 的 `Rect2i` 截断后 30/31 张人脸的差异消失)。因此没有做 WinML / ORT 实测对照。+2. **磨皮算法**:SkinSoft 的稀疏 9 点模糊在大半径下有重影,改为快速导向滤波(He & Sun 2015);默认值按实测调整:+ lena 皮肤方差 0.002–0.007、眼部 0.016–0.029,得出 ε = 0.012 − 0.010 × 细节保护;夜间游戏画面皮肤亮度 0.03–0.17,+ 亮度下限 0.04、饱和度下限 0.08(SkinSoft 原为 0.12 / 0.18,会丢掉暗处的脸)。+3. **复审第 7 条(检测会话挂在引擎会话上)**:未照做。跟踪器随处理图创建,重建时重新解析模型并上传权重,实测约 40 ms+ (GUI 日志 `[beauty] instance=` → `face tracker ready`),只在节点开关/实例数变化时发生,实时参数不重建。+4. **复审第 9 条**(保护基准)保持方案语义:原画为本帧任何效果之前的画面,4K 输出时脸部回到放大前的源画面。+5. **未实现**:单节点“本节点前后对照”;暂停调参时没有美颜输入缓存(会重跑 NR);大图分块处理跳过美颜并在状态栏提示。++## 4. 实测(RTX 5070,本机,一次运行)++| 项 | 结果 |+|---|---|+| 关闭子功能的节点 = 无节点 | 逐位相同 |+| 全强度保护(调色之下) | 脸部核心 = 未调色原画、远处 = 调色结果,均逐位相同 |+| 50% 保护 | 最大差 1 级(剪切像素除外) |+| 两个节点(先磨皮再保护) | 脸部核心回到原画 |+| HDR(P010 PQ) | 检查块逐位不变,负值分量保留,峰值 12.547 |+| 跟踪(48 帧、每帧平移 3 px) | 12 次检测,最大中心误差 9.8 px / 脸宽 146 px,复位立即检测 |+| 磨皮(强档,原尺寸图) | 皮肤细纹理 −24.3% / 眼部 −5%(lena)、−16.1 / −7.6(astronaut)、−10.7 / −8.3(messi)、−21.3 / −13.1(夜间游戏 gta-f040) |+| 无模型 | 预览照常(提示“人脸模型文件缺失”),导出拒绝开始 |++耗时(节点中位数 + 检测均值,ms):++| | 1080p | 4K |+|---|---|---|+| 保护 + 磨皮,一张脸 | 0.093(P95 0.117)+ 0.13 | 0.321 + 0.16 |+| 检测帧总成本 | 约 0.43 | 约 0.52 |+| 仅保护 | 0.037 | 0.172 |+| 无人脸 | 0.034 | 0.123 |+| 多人脸 | 0.102 | 0.394 |++Codex 预算为 1080p 平均 ≤1 ms / P95 ≤2 ms、4K 平均 ≤2.5 ms / P95 ≤4 ms,均满足。实播放(720p 片段、GUI 验收):+人脸识别 0.23 ms、美颜 0.09 ms(最近一秒平均)。++回归:调色插入槽逐字节回归 12/12 与 main 基线相同;抗锯齿 GPU 17/17;效果链、预设库、管线契约、调色等套件全部通过;+最终汇总见 WORKLOG 当日条目。++## 5. 顺带修复++- **导出协议**:美颜提交把写端改为 11,但 worker 仍只认 10,导致本分支所有导出都会被拒(`ExportWorkflowTests beauty`+ 发现);改为两端共用 `Shared::kVersion`。+- **节点模式未改动的节点**:关闭且为默认值的抗锯齿 / 美颜节点在设置里没有实例(`toChain` 不写,保持旧预设格式),+ 节点顺序还原时因此拒绝整条链——新加的美颜节点(默认关闭)和关掉的默认抗锯齿节点都会触发;`restoreRuntimeOrder`+ 现在把它还原为同样的未改动节点(`EffectChainTests` 新增 4 项)。抗锯齿分支本身仍有此问题。+- 抗锯齿编辑器“强度”的繁中 / 日文翻译缺失。++## 6. 没有验证++- AMD / Intel 显卡;真实采集卡与真实游戏画面的肉眼评价(只用了公开测试图和 4 帧 GTA 截图);长时间运行与显存曲线;+ 2 / 6 节点下的耗时;CPU 渲染线程增量(预算 P95 ≤0.3 ms,未单独测);融合调色时额外转换的耗时。+- 打包脚本尚未把模型放到 `runtime/models`(运行时也查找 `runtime_local/models` 和程序目录下的 `models`),发布前要补。+- 撤销 / 重做对美颜参数的覆盖未单独测试。diff --git a/docs/WORKLOG.md b/docs/WORKLOG.mdindex 68ab3e04..568323d0 100644--- a/docs/WORKLOG.md+++ b/docs/WORKLOG.md@@ -9743,3 +9743,10 @@ Branch claude/aa-53-20261017 from main 26c0d61. Archive E:/项目/Veyra/archives- Fixed on the way (present on main 26c0d61): `TiledImageProcessor` carried the whole-image execution plan into the tiles, so the graph refused it and the six tiled colour cases of `veyra_image_dimension_tests` failed on main. The product path never passes a plan; tiles now drop it and run the list-order base (identical to the whole image, maxError8=0).- Final sweep (one staged build, fresh temp folder, logs/claude-aa-53-20261017/final-sweep-20261018-155900): 14 of 15 suites pass. image-dimension: all 11 size / tile cases pass; its NR tile case cannot find `runtime_local/config/ngx-local.json` because the test compiles the source root in as a narrow string and the `E:/项目` path does not survive (needs an ASCII-path build; unrelated). preset-library fails only when rerun in the same temp folder (sidecars from testDlssSrModels; main behaves the same). `veyra_amd_nr_graph_tests` compiled, not run.- Not verified: AMD / Intel hardware, real game / capture footage judged by eye (user), Switch material, long runs, temporal mode ghosting on real motion.++## 2026-10-18 美颜节点完成(Claude,`claude/beauty-20261017`)+- 合入 E0 + #53(`af415f3`)后实现人脸原画保护 + 磨皮两个独立子功能、共用的 GPU 人脸识别与跟踪(YuNet 手写 HLSL,不加新运行库)、列表“美颜”组(最多 6 层,新层默认关闭,四个预设)与节点(最多 6 个),预设库 v15 / 会话 v10 用 `.beauty` 文件,导出协议 11。设计、偏差、实测与未验证项:`docs/BEAUTY_IMPLEMENTATION_PLAN_2026-10-17.md`;来源与许可:THIRD_PARTY_NOTICES.md。+- 顺带修复:导出 worker 仍只认协议 10(本分支所有导出都会被拒,`ExportWorkflowTests beauty` 发现);节点模式里关闭且为默认值的抗锯齿 / 美颜节点让节点顺序还原失败(新加的美颜节点必现,抗锯齿分支仍有);NR 旁路时插入槽只重绑调色。+- 测试(RTX 5070,一次运行):检测器与 OpenCV 5.0.0 在 8 图 × 3 尺寸 × 2 模型上一致;`veyra_beauty_gpu_tests` 11 例(关闭即逐位相同、保护逐位回到原画、HDR、两节点、跟踪、无模型、四张图的磨皮);耗时 1080p 0.093 + 检测 0.13 ms、4K 0.321 + 0.16 ms;GUI 验收 `scripts/acceptance/beauty-gui.py` 59 项(实播放识别到人脸,实时参数不重建,日志无人脸坐标);`ExportWorkflowTests beauty`;QML 编辑器 10 项。+- 最终汇总(`logs/claude-beauty-20261017/final-sweep-20261018-210951`,同一构建、新临时目录):29 项中 28 项通过(含调色逐字节回归 12/12、抗锯齿 GPU 17/17、抗锯齿 GUI 39 项、QML 99 项);image-dimension 的尺寸 / 分块用例全部通过,只有 NR 分块用例因源码路径含非 ASCII 找不到 `ngx-local.json`(与 #53 汇总相同,需 ASCII 路径构建)。+- 没有验证:AMD / Intel、真实采集卡与游戏画面的肉眼评价、长时间运行、CPU 渲染线程增量;打包尚未把模型放进 `runtime/models`。没有合并 main、推送、发布或打包。diff --git a/i18n/catalog.json b/i18n/catalog.jsonindex bb02f6e3..4d912b06 100644--- a/i18n/catalog.json+++ b/i18n/catalog.json@@ -385,6 +385,13 @@"en": " ch","ja": " ch"},+ {+ "zh": " 层依次处理",+ "src": "qml/ProPage.qml",+ "zh-TW": " 層依次處理",+ "en": " layers in sequence",+ "ja": " 層を順に処理"+ },{"zh": " 层依次处理 · 每层参数独立","src": "qml/ProPage.qml",@@ -532,6 +539,13 @@"en": "+ Add NR layer","ja": "+ NR 層を追加"},+ {+ "zh": "+ 添加美颜层",+ "src": "qml/ProPage.qml",+ "zh-TW": "+ 添加美顏層",+ "en": "+ Add beauty layer",+ "ja": "+ 美顔層を追加"+ },{"zh": "0 = 不做高光滚降","src": "qml/ProPage.qml",@@ -595,6 +609,13 @@"en": "1080p · default","ja": "1080p · 既定"},+ {+ "zh": "1080p 像素,随画面尺寸缩放;越大越柔",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "1080p 像素,隨畫面尺寸縮放;越大越柔",+ "en": "In 1080p pixels, scaled with the picture size; larger is softer",+ "ja": "1080p 換算のピクセル数。画面サイズに合わせて変わり、大きいほど柔らかくなります"+ },{"zh": "2 项","src": "qml/ProPage.qml",@@ -616,6 +637,13 @@"en": "2X is the native path; 3X / 4X are experimental unlocks. See diagnostics for failures","ja": "2X はネイティブ動作、3X / 4X は実験的なアンロックです。失敗の理由は診断を参照してください"},+ {+ "zh": "320 像素,每秒 10 次,最省",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "320 像素,每秒 10 次,最省",+ "en": "320 px, 10 times a second, lightest",+ "ja": "320 px、毎秒 10 回、最も軽い"+ },{"zh": "4 项","src": "qml/ProPage.qml",@@ -630,6 +658,13 @@"en": "5 items","ja": "5 項目"},+ {+ "zh": "512 像素,每秒 15 次",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "512 像素,每秒 15 次",+ "en": "512 px, 15 times a second",+ "ja": "512 px、毎秒 15 回"+ },{"zh": "6 项","src": "qml/ProPage.qml",@@ -637,6 +672,13 @@"en": "6 items","ja": "6 項目"},+ {+ "zh": "640 像素,每秒 30 次,小脸也能识别",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "640 像素,每秒 30 次,小臉也能識別",+ "en": "640 px, 30 times a second, finds small faces too",+ "ja": "640 px、毎秒 30 回、小さな顔も検出"+ },{"zh": "8 位配对码","src": "qml/DialogHost.qml",@@ -2408,6 +2450,13 @@"en": "Recommend","ja": "おすすめ"},+ {+ "zh": "一键设定开关和数值,肤色范围与人脸识别保持不变",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "一鍵設定開關和數值,膚色範圍與人臉識別保持不變",+ "en": "Sets the switches and values in one go; the skin range and face detection stay as they are",+ "ja": "スイッチと数値をまとめて設定します。肌色範囲と顔検出はそのままです"+ },{"zh": "一键还原","src": "qml/ColourPanel.qml",@@ -2506,6 +2555,13 @@"en": "The last capture device is not connected. Plug it back in and refresh, or choose another device.","ja": "前回のキャプチャーデバイスが接続されていません。差し直して更新するか、別のデバイスを選んでください。"},+ {+ "zh": "上移",+ "src": "qml/ProPage.qml",+ "zh-TW": "上移",+ "en": "Move up",+ "ja": "上へ移動"+ },{"zh": "上限 %1 nit 未被触及(滚降区 %2% · 暗部提升区 %3%)","src": "qml/ProPage.qml",@@ -2548,6 +2604,13 @@"en": "Apply this preset automatically the next time the app starts","ja": "次回起動時にこのプリセットを自動適用"},+ {+ "zh": "下移",+ "src": "qml/ProPage.qml",+ "zh-TW": "下移",+ "en": "Move down",+ "ja": "下へ移動"+ },{"zh": "不使用 LUT","src": "qml/ColourPanel.qml",@@ -3122,6 +3185,20 @@"en": "Brightness change","ja": "明るさの変化"},+ {+ "zh": "亮度上限",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "亮度上限",+ "en": "Brightness max",+ "ja": "明るさの上限"+ },+ {+ "zh": "亮度下限",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "亮度下限",+ "en": "Brightness min",+ "ja": "明るさの下限"+ },{"zh": "亮度保持","src": "qml/NrLayerEditor.qml",@@ -3143,6 +3220,48 @@"en": "A brightness step above this counts as an edge; lower values treat more edges","ja": "輝度差がこれを超えるとエッジとみなします。低いほど多くのエッジを処理します"},+ {+ "zh": "人脸原画保护",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "人臉原畫保護",+ "en": "Original face restore",+ "ja": "顔のオリジナル保護"+ },+ {+ "zh": "人脸原画保护:在识别到的人脸里混回本帧原画(没有经过任何效果)。磨皮:柔化皮肤,保留眼睛、睫毛和嘴唇的细节。两项可分别开关。",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "人臉原畫保護:在識別到的人臉裡混回本幀原畫(沒有經過任何效果)。磨皮:柔化皮膚,保留眼睛、睫毛和嘴唇的細節。兩項可分別開關。",+ "en": "Original face restore: blends this frame's original (before any effect) back into the detected faces. Skin smoothing: softens skin and keeps the detail of eyes, lashes and lips. Each can be switched on its own.",+ "ja": "顔のオリジナル保護:検出した顔の中に、このフレームの元の画像(どの効果も通す前)を戻して合成します。美肌:目・まつ毛・唇のディテールを残したまま肌をなめらかにします。それぞれ個別にオン/オフできます。"+ },+ {+ "zh": "人脸置信度",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "人臉置信度",+ "en": "Face confidence",+ "ja": "顔の信頼度"+ },+ {+ "zh": "人脸识别",+ "src": "src/ui/QmlPlayerBridge.cpp",+ "zh-TW": "人臉識別",+ "en": "Face detection",+ "ja": "顔検出"+ },+ {+ "zh": "人脸识别 · 全部美颜节点共用",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "人臉識別 · 所有美顏節點共用",+ "en": "Face detection · shared by all beauty nodes",+ "ja": "顔検出 · すべての美顔ノードで共有"+ },+ {+ "zh": "仅人脸",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "僅人臉",+ "en": "Faces only",+ "ja": "顔のみ"+ },{"zh": "仅在游戏模式中接管按键;支持 Ctrl、Alt、Shift 组合","src": "qml/SettingsPage.qml",@@ -3164,6 +3283,20 @@"en": "Clear playlist; keep files on disk","ja": "リストのみクリア。ファイルは削除しません"},+ {+ "zh": "仅皮肤",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "僅皮膚",+ "en": "Skin only",+ "ja": "肌のみ"+ },+ {+ "zh": "仅皮肤:头发和背景保留效果",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "僅皮膚:頭髮和背景保留效果",+ "en": "Skin only: hair and background keep the effects",+ "ja": "肌のみ:髪と背景には効果が残ります"+ },{"zh": "仅美乐威 Pro Capture(PCIe 内置卡)可用;USB Capture 系列不支持","src": "qml/DialogHost.qml",@@ -3241,6 +3374,13 @@"en": "Low","ja": "低"},+ {+ "zh": "低于它的人脸不算;误识别时调高",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "低於它的人臉不計;誤識別時調高",+ "en": "Faces below it don't count; raise it when other things are taken for faces",+ "ja": "これ未満の顔は無視します。誤検出するときは上げてください"+ },{"zh": "低延迟","src": "include/veyra/source/CaptureFormatRank.h",@@ -3318,6 +3458,13 @@"en": "Headroom ","ja": "余裕 "},+ {+ "zh": "例如调色或增强后脸色不自然时,让人脸回到原画",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "例如調色或增強後臉色不自然時,讓人臉回到原畫",+ "en": "For example when grading or enhancement makes faces look wrong: they go back to the original",+ "ja": "色調整や強調で顔色が不自然になったときなどに、顔を元の画像に戻します"+ },{"zh": "例如:夜间游戏","src": "qml/DialogHost.qml",@@ -3416,6 +3563,20 @@"en": "Failed to save preset: %1","ja": "プリセットの保存に失敗しました:%1"},+ {+ "zh": "保护强度",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "保護強度",+ "en": "Restore strength",+ "ja": "保護の強さ"+ },+ {+ "zh": "保护范围",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "保護範圍",+ "en": "Restore area",+ "ja": "保護範囲"+ },{"zh": "保留全部","src": "qml/ExportPage.qml",@@ -3647,6 +3808,20 @@"en": "All GPUs","ja": "すべての GPU"},+ {+ "zh": "全部肤色",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "全部膚色",+ "en": "All skin",+ "ja": "すべての肌色"+ },+ {+ "zh": "全部肤色:不依赖人脸识别,画面中所有肤色区域都会处理",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "全部膚色:不依賴人臉識別,畫面中所有膚色區域都會處理",+ "en": "All skin: works without face detection; every skin-coloured area of the picture is smoothed",+ "ja": "すべての肌色:顔検出を使わず、画面内の肌色の部分をすべて処理します"+ },{"zh": "全部还原","src": "qml/SettingsPage.qml",@@ -4397,6 +4572,13 @@"en": "Excludes the area from every NR layer · list mode only","ja": "領域内をすべての NR 層から除外 · リストモードのみ"},+ {+ "zh": "区域扩展",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "區域擴展",+ "en": "Area expansion",+ "ja": "範囲の拡張"+ },{"zh": "半分辨率","src": "src/ui/QmlPlayerBridge.cpp",@@ -4544,6 +4726,20 @@"en": "Original / enhanced comparison","ja": "オリジナル / 補正後の比較"},+ {+ "zh": "原画保护 %1%",+ "src": "src/ui/QmlPlayerBridge.cpp",+ "zh-TW": "原畫保護 %1%",+ "en": "Original restore %1%",+ "ja": "オリジナル保護 %1%"+ },+ {+ "zh": "原画保护 + 自然磨皮",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "原畫保護 + 自然磨皮",+ "en": "Original restore + natural smoothing",+ "ja": "オリジナル保護 + 自然な美肌"+ },{"zh": "去专业模式管理预设…","src": "qml/CineBar.qml",@@ -5328,6 +5524,13 @@"en": "On the host, open the Sunshine web page (https://host-IP:47990), go to the PIN page, enter the number below and submit:","ja": "ホストで Sunshine の Web ページ(https://ホストIP:47990)を開き、「PIN」ページで下の数字を入力して送信してください:"},+ {+ "zh": "在原画保护之后执行",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "在原畫保護之後執行",+ "en": "Runs after the original restore",+ "ja": "オリジナル保護の後に実行"+ },{"zh": "在手机或浏览器打开 ","src": "qml/DialogHost.qml",@@ -5400,7 +5603,7 @@},{"zh": "均衡",- "src": "src/engine/PresetLibrary.cpp",+ "src": "qml/BeautyEditor.qml","zh-TW": "均衡","en": "Balanced","ja": "バランス"@@ -5650,6 +5853,13 @@"en": "Copy · reset · delete","ja": "コピー · リセット · 削除"},+ {+ "zh": "复制 · 移动 · 恢复默认 · 删除",+ "src": "qml/ProPage.qml",+ "zh-TW": "複製 · 移動 · 恢復預設 · 刪除",+ "en": "Copy · move · reset · delete",+ "ja": "コピー · 移動 · 既定に戻す · 削除"+ },{"zh": "复制为新层","src": "qml/ProPage.qml",@@ -5755,6 +5965,13 @@"en": "For multiple NR layers, try 720p first and 1080p last; for three layers, try 480p / 720p / 1080p. Lowering the earlier layers changes the image. Exports still use native dimensions.","ja": "複数の NR レイヤーでは前段を 720p、最終段を 1080p に、3 段では 480p / 720p / 1080p にする方法もあります。前段の解像度を下げると映像が変わります。書き出しは引き続きネイティブサイズで処理します。"},+ {+ "zh": "夜景或暗部的脸调低",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "夜景或暗部的臉調低",+ "en": "Lower it for faces at night or in shadow",+ "ja": "夜景や暗い場所の顔では下げてください"+ },{"zh": "夜里关灯看:柔和一点,同时保留暗部细节。","src": "qml/ProPage.qml",@@ -5783,6 +6000,13 @@"en": "Large image tiled enhancement failed; see diagnostics","ja": "大きな画像の分割補正に失敗しました。診断を確認してください"},+ {+ "zh": "大图分块处理不支持美颜,本图未应用美颜",+ "src": "src/engine/EngineControllerImage.cpp",+ "zh-TW": "大圖分塊處理不支援美顏,本圖未套用美顏",+ "en": "Beauty is not supported when a large image is processed in tiles; it was not applied to this image",+ "ja": "大きな画像のタイル処理は美顔に対応していないため、この画像には美顔を適用していません"+ },{"zh": "大图参数应用失败,已保留上一结果","src": "src/engine/EngineControllerImage.cpp",@@ -7641,9 +7865,9 @@{"zh": "强度","src": "qml/AntiAliasEditor.qml",- "zh-TW": "强度",+ "zh-TW": "強度","en": "Strength",- "ja": "Strength"+ "ja": "強度"},{"zh": "强度 ",@@ -7934,7 +8158,7 @@},{"zh": "性能",- "src": "qml/NodePage.qml",+ "src": "qml/BeautyEditor.qml","zh-TW": "性能","en": "Performance","ja": "パフォーマンス"@@ -8324,6 +8548,13 @@"en": "Use a window or a whole display as the source","ja": "ウィンドウまたはディスプレイ全体をソースにする"},+ {+ "zh": "把一部分皮肤纹理留回来,避免塑料感",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "把一部分皮膚紋理留回來,避免塑膠感",+ "en": "Brings part of the skin texture back to avoid a plastic look",+ "ja": "肌の質感の一部を戻して、プラスチックのような見た目を防ぎます"+ },{"zh": "把当前设置另存为预设…","src": "qml/NodePage.qml",@@ -8850,6 +9081,13 @@"en": "Overall brightness","ja": "全体の明るさ"},+ {+ "zh": "整体强度",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "整體強度",+ "en": "Overall strength",+ "ja": "全体の強さ"+ },{"zh": "整体观感","src": "qml/ProPage.qml",@@ -8864,6 +9102,13 @@"en": "The whole set of settings is invalid; nothing was applied","ja": "設定一式が無効なため、何も適用していません"},+ {+ "zh": "整张脸",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "整張臉",+ "en": "Whole face",+ "ja": "顔全体"+ },{"zh": "整档预设","src": "qml/ProPage.qml",@@ -9599,6 +9844,13 @@"en": "Display peak (nit)","ja": "ディスプレイのピーク(nit)"},+ {+ "zh": "显示遮罩",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "顯示遮罩",+ "en": "Show mask",+ "ja": "マスクを表示"+ },{"zh": "显示队列恢复失败 · ","src": "src/engine/VideoPresenter.cpp",@@ -9816,6 +10068,13 @@"en": "At most 4 protected areas; delete one first","ja": "保護領域は最大 4 個です。先に 1 つ削除してください"},+ {+ "zh": "最多人脸",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "最多人臉",+ "en": "Max faces",+ "ja": "最大顔数"+ },{"zh": "最多保存64套色彩预设","src": "src/engine/ColorLookStore.cpp",@@ -9921,6 +10180,13 @@"en": "Not enabled","ja": "無効"},+ {+ "zh": "未启用子功能",+ "src": "src/ui/QmlPlayerBridge.cpp",+ "zh-TW": "未啟用子功能",+ "en": "No function switched on",+ "ja": "機能がオンになっていません"+ },{"zh": "未启用:","src": "src/source/MagewellCapture.cpp",@@ -9991,6 +10257,13 @@"en": "Not playing","ja": "再生していません"},+ {+ "zh": "未检测到人脸",+ "src": "src/ui/QmlPlayerBridge.cpp",+ "zh-TW": "未偵測到人臉",+ "en": "No face detected",+ "ja": "顔が検出されていません"+ },{"zh": "未检测到手柄","src": "qml/DialogHost.qml",@@ -10033,6 +10306,13 @@"en": "No new items: files are already listed or no supported media was found.","ja": "新しい項目はありません。登録済みか、対応するメディアが見つかりませんでした。"},+ {+ "zh": "未添加美颜层 · 人脸原画保护与磨皮",+ "src": "qml/ProPage.qml",+ "zh-TW": "未添加美顏層 · 人臉原畫保護與磨皮",+ "en": "No beauty layer · original face restore and skin smoothing",+ "ja": "美顔層なし · 顔のオリジナル保護と美肌"+ },{"zh": "未登录","src": "qml/DialogHost.qml",@@ -10334,6 +10614,13 @@"en": "%1 detected","ja": "%1 を検出"},+ {+ "zh": "检测到 %1 张人脸",+ "src": "src/ui/QmlPlayerBridge.cpp",+ "zh-TW": "偵測到 %1 張人臉",+ "en": "%1 face(s) detected",+ "ja": "%1 人の顔を検出"+ },{"zh": "检测到 Dolby Vision RPU,但缺少基础层兼容声明,无法确认颜色,已停止","src": "src/source/MediaFileSource.cpp",@@ -11951,6 +12238,13 @@"en": "Correlation is only {:.2f}; no reliable offset found (the subtitles may not match the video)","ja": "相関が {:.2f} しかなく、信頼できるオフセットが見つかりません(字幕が動画と合っていない可能性があります)"},+ {+ "zh": "相对人脸大小;负值向内收",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "相對人臉大小;負值向內收",+ "en": "Relative to the face size; negative shrinks it",+ "ja": "顔の大きさに対する割合。負の値で内側に縮めます"+ },{"zh": "睡眠(可唤醒)","src": "src/ui/XboxModel.cpp",@@ -12007,6 +12301,41 @@"en": "OK","ja": "OK"},+ {+ "zh": "磨皮",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "磨皮",+ "en": "Skin smoothing",+ "ja": "美肌"+ },+ {+ "zh": "磨皮 %1%",+ "src": "src/ui/QmlPlayerBridge.cpp",+ "zh-TW": "磨皮 %1%",+ "en": "Smoothing %1%",+ "ja": "美肌 %1%"+ },+ {+ "zh": "磨皮半径",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "磨皮半徑",+ "en": "Smoothing radius",+ "ja": "美肌の半径"+ },+ {+ "zh": "磨皮程度",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "磨皮程度",+ "en": "Smoothing amount",+ "ja": "美肌の度合い"+ },+ {+ "zh": "磨皮范围",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "磨皮範圍",+ "en": "Smoothing area",+ "ja": "美肌の範囲"+ },{"zh": "离线","src": "qml/DialogHost.qml",@@ -12212,7 +12541,7 @@},{"zh": "精细",- "src": "qml/DialogHost.qml",+ "src": "qml/BeautyEditor.qml","zh-TW": "精細","en": "Fine","ja": "精細"@@ -12364,6 +12693,13 @@"en": "Texture","ja": "テクスチャ"},+ {+ "zh": "纹理保留",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "紋理保留",+ "en": "Texture kept",+ "ja": "質感の保持"+ },{"zh": "组件与许可","src": "qml/SettingsPage.qml",@@ -12378,6 +12714,13 @@"en": "Thin","ja": "細い"},+ {+ "zh": "细节保护",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "細節保護",+ "en": "Detail protection",+ "ja": "ディテール保護"+ },{"zh": "继续上次","src": "qml/HomePage.qml",@@ -12471,11 +12814,88 @@},{"zh": "美颜",- "src": "src/engine/EffectChain.cpp",+ "src": "qml/ProPage.qml","zh-TW": "美顏","en": "Beauty","ja": "美顔"},+ {+ "zh": "美颜 2",+ "src": "src/ui/QmlPlayerBridge.cpp",+ "zh-TW": "美顏 2",+ "en": "Beauty 2",+ "ja": "美顔 2"+ },+ {+ "zh": "美颜 3",+ "src": "src/ui/QmlPlayerBridge.cpp",+ "zh-TW": "美顏 3",+ "en": "Beauty 3",+ "ja": "美顔 3"+ },+ {+ "zh": "美颜 4",+ "src": "src/ui/QmlPlayerBridge.cpp",+ "zh-TW": "美顏 4",+ "en": "Beauty 4",+ "ja": "美顔 4"+ },+ {+ "zh": "美颜 5",+ "src": "src/ui/QmlPlayerBridge.cpp",+ "zh-TW": "美顏 5",+ "en": "Beauty 5",+ "ja": "美顔 5"+ },+ {+ "zh": "美颜 6",+ "src": "src/ui/QmlPlayerBridge.cpp",+ "zh-TW": "美顏 6",+ "en": "Beauty 6",+ "ja": "美顔 6"+ },+ {+ "zh": "美颜人脸识别设置超出范围",+ "src": "src/engine/EffectChain.cpp",+ "zh-TW": "美顏人臉識別設定超出範圍",+ "en": "Beauty face detection settings out of range",+ "ja": "美顔の顔検出設定が範囲外です"+ },+ {+ "zh": "美颜参数超出范围",+ "src": "src/engine/EffectChain.cpp",+ "zh-TW": "美顏參數超出範圍",+ "en": "Beauty settings out of range",+ "ja": "美顔の設定が範囲外です"+ },+ {+ "zh": "美颜层 ",+ "src": "qml/ProPage.qml",+ "zh-TW": "美顏層 ",+ "en": "Beauty layer ",+ "ja": "美顔層 "+ },+ {+ "zh": "美颜预设",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "美顏預設",+ "en": "Beauty presets",+ "ja": "美顔プリセット"+ },+ {+ "zh": "美颜:人脸模型文件缺失,人脸原画保护与人脸区域美颜暂不生效",+ "src": "src/pipeline/EnhanceGraph.cpp",+ "zh-TW": "美顏:人臉模型檔案缺失,人臉原畫保護與人臉區域美顏暫不生效",+ "en": "Beauty: the face model file is missing; original face restore and face-area beauty are not applied",+ "ja": "美顔:顔モデルファイルがないため、顔のオリジナル保護と顔の範囲の美顔は適用されません"+ },+ {+ "zh": "美颜:人脸识别初始化失败,人脸原画保护与人脸区域美颜暂不生效",+ "src": "src/pipeline/EnhanceGraph.cpp",+ "zh-TW": "美顏:人臉識別初始化失敗,人臉原畫保護與人臉區域美顏暫不生效",+ "en": "Beauty: face detection failed to start; original face restore and face-area beauty are not applied",+ "ja": "美顔:顔検出を開始できなかったため、顔のオリジナル保護と顔の範囲の美顔は適用されません"+ },{"zh": "羽化像素","src": "qml/ProPage.qml",@@ -12490,6 +12910,20 @@"en": "Flat older transfer","ja": "平坦な旧作"},+ {+ "zh": "肤色提亮",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "膚色提亮",+ "en": "Skin brightening",+ "ja": "肌を明るく"+ },+ {+ "zh": "肤色范围 · 高级",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "膚色範圍 · 高級",+ "en": "Skin range · advanced",+ "ja": "肌色範囲 · 詳細"+ },{"zh": "肤质 · 未证实","src": "qml/NrLayerEditor.qml",@@ -12805,6 +13239,13 @@"en": "Custom: adjusted with the sliders below.","ja": "カスタム:下のスライダーで調整済み。"},+ {+ "zh": "自然磨皮",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "自然磨皮",+ "en": "Natural smoothing",+ "ja": "自然な美肌"+ },{"zh": "自然饱和度","src": "src/ui/QmlPlayerBridge.cpp",@@ -12945,6 +13386,13 @@"en": "Hue","ja": "色相"},+ {+ "zh": "色相中心",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "色相中心",+ "en": "Hue centre",+ "ja": "色相の中心"+ },{"zh": "色相保护","src": "qml/NrLayerEditor.qml",@@ -12952,6 +13400,13 @@"en": "Hue protection","ja": "色相保護"},+ {+ "zh": "色相范围",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "色相範圍",+ "en": "Hue range",+ "ja": "色相の範囲"+ },{"zh": "色调","src": "src/ui/QmlPlayerBridge.cpp",@@ -13064,6 +13519,13 @@"en": "Node mode really runs in link order; offline export supports list mode only.","ja": "ノードモードは接続順に実際に処理します。オフラインの書き出しはリストモードのみ対応です。"},+ {+ "zh": "节点模式请用节点的复制",+ "src": "src/ui/QmlPlayerBridge.cpp",+ "zh-TW": "節點模式請用節點的複製",+ "en": "In node mode, copy the node instead",+ "ja": "ノードモードではノードのコピーを使ってください"+ },{"zh": "节点编辑文档类型或容量无效","src": "src/engine/EffectChain.cpp",@@ -13155,6 +13617,13 @@"en": "Blue","ja": "ブルー"},+ {+ "zh": "蓝色为原画保护区域,品红为磨皮区域;导出时自动关闭",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "藍色為原畫保護區域,洋紅為磨皮區域;匯出時自動關閉",+ "en": "Blue: original restore area; magenta: smoothing area. Turned off automatically for export",+ "ja": "青はオリジナル保護の範囲、マゼンタは美肌の範囲です。書き出し時は自動でオフになります"+ },{"zh": "补帧","src": "qml/ProPage.qml",@@ -13680,6 +14149,13 @@"en": "Detect 60 fps content","ja": "60fps コンテンツを判別"},+ {+ "zh": "识别档位",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "識別檔位",+ "en": "Detection level",+ "ja": "検出レベル"+ },{"zh": "诊断信息","src": "qml/SettingsPage.qml",@@ -14268,6 +14744,20 @@"en": "Smaller is more sensitive; larger holds more steady","ja": "小さいほど敏感、大きいほど安定させる範囲が広がります"},+ {+ "zh": "越高人脸区域越稳,快速移动时跟得越慢",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "越高人臉區域越穩,快速移動時跟得越慢",+ "en": "Higher keeps the face area steadier but follows fast movement more slowly",+ "ja": "高いほど顔の範囲が安定しますが、速い動きへの追従は遅くなります"+ },+ {+ "zh": "越高越保留五官和发丝",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "越高越保留五官和髮絲",+ "en": "Higher keeps more of the facial features and hair",+ "ja": "高いほど目鼻立ちや髪の毛を残します"+ },{"zh": "越高越平滑,运动拖影也越多","src": "qml/AntiAliasEditor.qml",@@ -14282,6 +14772,13 @@"en": "Higher is steadier; too high looks dull","ja": "高いほど安定しますが、高すぎるとこもった印象になります"},+ {+ "zh": "跟踪平滑",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "追蹤平滑",+ "en": "Tracking smoothing",+ "ja": "追跡の平滑化"+ },{"zh": "跟随","src": "qml/DialogHost.qml",@@ -14450,6 +14947,13 @@"en": "Light","ja": "弱"},+ {+ "zh": "轻度磨皮",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "輕度磨皮",+ "en": "Light smoothing",+ "ja": "軽い美肌"+ },{"zh": "轻微","src": "qml/ProPage.qml",@@ -14709,6 +15213,13 @@"en": "Output cap · follow display","ja": "出力制限 · ディスプレイに合わせる"},+ {+ "zh": "边界柔和",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "邊界柔和",+ "en": "Edge softness",+ "ja": "境界の柔らかさ"+ },{"zh": "边缘神盾","src": "qml/ProPage.qml",@@ -14723,6 +15234,13 @@"en": "Edge Aegis (XeSS anti-jelly)","ja": "エッジイージス(XeSS ゼリー対策)"},+ {+ "zh": "边缘羽化",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "邊緣羽化",+ "en": "Edge feather",+ "ja": "エッジのぼかし"+ },{"zh": "边缘阈值","src": "qml/AntiAliasEditor.qml",@@ -15164,6 +15682,13 @@"en": "Choose a source to start; picture presets and frame generation can be switched in the playback bar at any time","ja": "ソースを選んで開始します。画質プリセットとフレーム生成は再生バーでいつでも切り替えられます"},+ {+ "zh": "选择…",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "選擇…",+ "en": "Choose…",+ "ja": "選択…"+ },{"zh": "选择保存目录…","src": "qml/ExportPage.qml",@@ -15872,11 +16397,11 @@"ja": "ゼロモーションは時間方向の再構成を制限します。RTX ビデオ超解像はこの入力を使いません"},{- "zh": "需 1080p SDR 文件、SF 和 NVIDIA 光流;关闭超分、补帧、抗闪烁、调色及 HDR",+ "zh": "需 1080p SDR 文件、SF 和 NVIDIA 光流;关闭超分、补帧、抗闪烁、调色、美颜及 HDR","src": "src/ui/QmlPlayerBridge.cpp",- "zh-TW": "需 1080p SDR 檔案、SF 與 NVIDIA 光流;關閉超解析度、補幀、抗閃爍、調色及 HDR",- "en": "Requires a 1080p SDR file, SF and NVIDIA optical flow; turn off upscaling, frame generation, anti-flicker, grading and HDR",- "ja": "1080p SDR ファイル、SF、NVIDIA 光フローが必要です。超解像、フレーム生成、ちらつき抑制、色調整、HDR をオフにしてください"+ "zh-TW": "需 1080p SDR 檔案、SF 與 NVIDIA 光流;關閉超解析度、補幀、抗閃爍、調色、美顏及 HDR",+ "en": "Requires a 1080p SDR file, SF and NVIDIA optical flow; turn off upscaling, frame generation, anti-flicker, grading, beauty and HDR",+ "ja": "1080p SDR ファイル、SF、NVIDIA 光フローが必要です。超解像、フレーム生成、ちらつき抑制、色調整、美顔、HDR をオフにしてください"},{"zh": "需系统解码/转换",@@ -16214,6 +16739,13 @@"en": "The QR code in the project README","ja": "プロジェクトの README にある QR コード"},+ {+ "zh": "须低于上限",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "須低於上限",+ "en": "Must stay below the maximum",+ "ja": "上限より低くしてください"+ },{"zh": "预算 ","src": "qml/ProPage.qml",@@ -16265,7 +16797,7 @@},{"zh": "预设",- "src": "qml/CineBar.qml",+ "src": "qml/BeautyEditor.qml","zh-TW": "預設","en": "Presets","ja": "プリセット"@@ -16536,6 +17068,13 @@"en": "Preset library format or version not supported","ja": "プリセットライブラリの形式またはバージョンに対応していません"},+ {+ "zh": "预设库美颜人脸识别字段损坏",+ "src": "src/engine/PresetLibrary.cpp",+ "zh-TW": "預設庫美顏人臉識別欄位損壞",+ "en": "Preset library: beauty face detection fields damaged",+ "ja": "プリセットライブラリの美顔の顔検出項目が破損しています"+ },{"zh": "预设库节点取值超出范围","src": "src/engine/PresetLibrary.cpp",@@ -16557,6 +17096,13 @@"en": "Preset library: node anti-aliasing settings damaged","ja": "プリセットライブラリのノードのアンチエイリアス設定が破損しています"},+ {+ "zh": "预设库节点美颜参数损坏",+ "src": "src/engine/PresetLibrary.cpp",+ "zh-TW": "預設庫節點美顏參數損壞",+ "en": "Preset library: node beauty settings damaged",+ "ja": "プリセットライブラリのノードの美顔設定が破損しています"+ },{"zh": "预设库节点调色参数损坏","src": "src/engine/PresetLibrary.cpp",@@ -16795,6 +17341,20 @@"en": "Saturation","ja": "彩度"},+ {+ "zh": "饱和度上限",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "飽和度上限",+ "en": "Saturation max",+ "ja": "彩度の上限"+ },+ {+ "zh": "饱和度下限",+ "src": "qml/BeautyEditor.qml",+ "zh-TW": "飽和度下限",+ "en": "Saturation min",+ "ja": "彩度の下限"+ },{"zh": "首次使用:PS5 设置 → 系统 → 远程游玩 → 关联设备,填写账号 ID 与 8 位配对码后配对。","src": "src/ui/QmlPlayerBridge.cpp",@@ -17173,6 +17733,13 @@"en": " (MKV can keep more)","ja": "(MKV にするとより多く保持できます)"},+ {+ "zh": "(新层默认关闭 · 最多 6 层)",+ "src": "qml/ProPage.qml",+ "zh-TW": "(新層預設關閉 · 最多 6 層)",+ "en": " (new layers start off · max 6 layers)",+ "ja": "(新しい層はオフで追加 · 最大 6 層)"+ },{"zh": "(最多 4 层)","src": "qml/ProPage.qml",@@ -17180,6 +17747,13 @@"en": " (max 4 layers)","ja": "(最大 4 層)"},+ {+ "zh": "(最多 6 层)",+ "src": "qml/ProPage.qml",+ "zh-TW": "(最多 6 層)",+ "en": " (max 6 layers)",+ "ja": "(最大 6 層)"+ },{"zh": "(片源最亮 %1 nit、最亮帧平均 %2 nit)","src": "qml/ProPage.qml",diff --git a/include/veyra/engine/EngineController.h b/include/veyra/engine/EngineController.hindex 2e02cfab..bf032c32 100644--- a/include/veyra/engine/EngineController.h+++ b/include/veyra/engine/EngineController.h@@ -76,6 +76,11 @@ struct PlayerSnapshot {std::wstring sourceNotice;std::wstring colorStatus;std::wstring videoHdrStatus;+ // Beauty nodes: whether the graph runs any, the faces the shared tracker saw a+ // few frames ago, and a problem that keeps them from finding faces.+ bool beautyActive=false;+ uint32_t beautyFaces=0;+ std::wstring beautyNotice;sink::CaptureAudioState captureAudio;unsigned audioInputChannels=0,audioOutputChannels=0;std::vector<media::AudioTrack> audioTracks;diff --git a/include/veyra/ui/QmlPlayerBridge.h b/include/veyra/ui/QmlPlayerBridge.hindex 353f8ea0..118f7c25 100644--- a/include/veyra/ui/QmlPlayerBridge.h+++ b/include/veyra/ui/QmlPlayerBridge.h@@ -311,6 +311,12 @@ class QmlPlayerBridge : public QObject {Q_PROPERTY(QVariantMap videoHdrParams READ videoHdrParams NOTIFY videoHdrParamsChanged)// Spatial anti-aliasing (#53): the list card edits the first instance, created// on first use; node cards edit their own node by chain index.+ // Beauty nodes of the active chain in chain order (list mode: the group's layers).+ Q_PROPERTY(QVariantList beautyLayers READ beautyLayers NOTIFY beautyChanged)+ // The chain's shared face detection: quality, maxFaces, stability.+ Q_PROPERTY(QVariantMap beautyDetection READ beautyDetection NOTIFY beautyChanged)+ Q_PROPERTY(QString beautyStatus READ beautyStatus NOTIFY snapshotChanged)+ Q_PROPERTY(bool beautyAnyEnabled READ beautyAnyEnabled NOTIFY beautyChanged)Q_PROPERTY(bool antiAliasEnabled READ antiAliasEnabled WRITE setAntiAliasEnabled NOTIFY antiAliasChanged)Q_PROPERTY(QVariantMap antiAliasParams READ antiAliasParams NOTIFY antiAliasChanged)// Custom: static HDR output tuning (globals, every field live).@@ -951,6 +957,23 @@ public:void setAntiAliasEnabled(bool enabled);QVariantMap antiAliasParams() const;Q_INVOKABLE QVariantMap antiAliasParamsAt(int index) const;+ QVariantList beautyLayers() const;+ QVariantMap beautyDetection() const;+ QString beautyStatus() const;+ // `index` is the chain node index (node mode cards, list layers alike).+ Q_INVOKABLE QVariantMap beautyParamsAt(int index) const;+ Q_INVOKABLE bool setBeautyParameterAt(int index, const QString& key, double value);+ // List mode: a copy right behind the layer; a move within the beauty group.+ Q_INVOKABLE int duplicateBeautyLayer(int index);+ Q_INVOKABLE bool moveBeautyLayer(int index, int delta);+ // natural / light / restore / restoreNatural: the sub-switches and values they set.+ Q_INVOKABLE bool applyBeautyPreset(int index, const QString& preset);+ Q_INVOKABLE bool setBeautyDetection(const QString& key, double value);+ bool beautyAnyEnabled() const;+ // List group switch: every layer off, and on again the layers that were on.+ Q_INVOKABLE bool setAllBeautyEnabled(bool enabled);+ // Back to the defaults (both sub-functions off); the switch stays as it is.+ Q_INVOKABLE bool resetBeautyLayer(int index);Q_INVOKABLE bool setAntiAliasParameter(const QString& key, double value);Q_INVOKABLE bool setAntiAliasParameterAt(int index, const QString& key, double value);int nrStyle() const;@@ -1311,6 +1334,7 @@ signals:void nrLayersChanged();void videoHdrParamsChanged();void antiAliasChanged();+ void beautyChanged();void colourParamsChanged();void protectionChanged();void recentFilesChanged();diff --git a/qml/Veyra/BeautyEditor.qml b/qml/Veyra/BeautyEditor.qmlnew file mode 100644index 00000000..64acc3b1--- /dev/null+++ b/qml/Veyra/BeautyEditor.qml@@ -0,0 +1,241 @@+// One beauty node's parameters, shared by the list page's 美颜 layers and the+// node page's beauty node, so both edit the same values through the same bridge+// calls (as AntiAliasEditor does for anti-aliasing). Two independent sub-functions:+// 人脸原画保护 blends the frame's original back in inside the faces, 磨皮 smooths+// skin while keeping eyes, lashes and lips. The face detection is the chain's,+// shared by every beauty node.+import QtQuick+import QtQuick.Layouts++ColumnLayout {+ id: editor+ // veyra.beautyLayers[i] (list) or veyra.beautyParamsAt(index) (node).+ required property var params+ // veyra.beautyDetection and veyra.beautyStatus. The list page draws them once+ // for the whole group (its layers set showDetection false and one editor sets+ // detectionOnly); the node editor shows them in every node.+ property var detection: ({quality: 1, maxFaces: 4, stability: 0.5})+ property string status: ""+ property bool showDetection: true+ property bool detectionOnly: false+ property string namePrefix: "beauty"+ signal edited(string key, double amount)+ signal presetPicked(string preset)+ signal detectionEdited(string key, double amount)+ spacing: 6+ readonly property bool restoreOn: params.restore === true+ readonly property bool smoothOn: params.smooth === true+ readonly property var presets: [+ {id: "natural", label: qsTr("自然磨皮")}, {id: "light", label: qsTr("轻度磨皮")},+ {id: "restore", label: qsTr("人脸原画保护")}, {id: "restoreNatural", label: qsTr("原画保护 + 自然磨皮")}+ ]++ // A 0..1 value shown and typed as a percentage.+ component PercentRow: VRow {+ id: row+ required property string key+ property real from: 0+ property real to: 1+ property real defaultValue: 0+ property real step: 0.01+ value: Math.round(Number(editor.params[key] ?? defaultValue) * 100) + "%"+ VSlider {+ objectName: editor.namePrefix + "-" + row.key+ implicitWidth: 110+ valueFromModel: true+ resettable: true; defaultValue: row.defaultValue+ from: row.from; to: row.to; inputScale: 100+ value: editor.params[row.key] ?? row.defaultValue+ onMoved: value => editor.edited(row.key, Math.round(value / row.step) * row.step)+ }+ }++ // Every layer row sits in this column, so the shared panel hides them at once.+ ColumnLayout {+ Layout.fillWidth: true+ visible: !editor.detectionOnly+ spacing: 6+ Text {+ Layout.fillWidth: true+ text: qsTr("人脸原画保护:在识别到的人脸里混回本帧原画(没有经过任何效果)。磨皮:柔化皮肤,保留眼睛、睫毛和嘴唇的细节。两项可分别开关。")+ color: Theme.t3; font.family: Theme.fontUi; font.pixelSize: 11; wrapMode: Text.WordWrap+ }+ VRow {+ label: qsTr("预设")+ hint: qsTr("一键设定开关和数值,肤色范围与人脸识别保持不变")+ VSelect {+ objectName: editor.namePrefix + "-preset"+ title: qsTr("美颜预设")+ options: editor.presets+ value: qsTr("选择…")+ onPicked: id => editor.presetPicked(id)+ }+ }++ // --- 人脸原画保护 ------------------------------------------------+ VRow {+ label: qsTr("人脸原画保护")+ hint: qsTr("例如调色或增强后脸色不自然时,让人脸回到原画")+ VSwitch {+ objectName: editor.namePrefix + "-restore"+ checked: editor.restoreOn+ onToggled: checked => editor.edited("restore", checked ? 1 : 0)+ }+ }+ PercentRow {+ key: "restoreStrength"; label: qsTr("保护强度"); defaultValue: 1+ visible: editor.restoreOn+ }+ VRow {+ label: qsTr("保护范围")+ hint: qsTr("仅皮肤:头发和背景保留效果")+ visible: editor.restoreOn+ VSeg {+ objectName: editor.namePrefix + "-restoreScope"+ options: [{id: "0", label: qsTr("整张脸")}, {id: "1", label: qsTr("仅皮肤")}]+ current: String(editor.params.restoreScope ?? 0)+ onPicked: id => editor.edited("restoreScope", Number(id))+ }+ }+ PercentRow {+ key: "regionExpand"; label: qsTr("区域扩展"); from: -0.10; to: 0.30; defaultValue: 0.05+ hint: qsTr("相对人脸大小;负值向内收")+ visible: editor.restoreOn+ }+ PercentRow {+ key: "feather"; label: qsTr("边缘羽化"); from: 0; to: 0.20; defaultValue: 0.08+ visible: editor.restoreOn+ }++ // --- 磨皮 --------------------------------------------------------+ VRow {+ label: qsTr("磨皮")+ hint: qsTr("在原画保护之后执行")+ VSwitch {+ objectName: editor.namePrefix + "-smooth"+ checked: editor.smoothOn+ onToggled: checked => editor.edited("smooth", checked ? 1 : 0)+ }+ }+ PercentRow { key: "strength"; label: qsTr("整体强度"); defaultValue: 1; visible: editor.smoothOn }+ PercentRow { key: "smoothAmount"; label: qsTr("磨皮程度"); defaultValue: 0.5; visible: editor.smoothOn }+ VRow {+ label: qsTr("磨皮半径")+ hint: qsTr("1080p 像素,随画面尺寸缩放;越大越柔")+ visible: editor.smoothOn+ value: Number(editor.params.radius ?? 4).toFixed(1)+ VSlider {+ objectName: editor.namePrefix + "-radius"+ implicitWidth: 110+ valueFromModel: true+ resettable: true; defaultValue: 4+ from: 0; to: 12+ value: editor.params.radius ?? 4+ onMoved: value => editor.edited("radius", Math.round(value * 2) / 2)+ }+ }+ PercentRow {+ key: "detail"; label: qsTr("细节保护"); defaultValue: 0.65; visible: editor.smoothOn+ hint: qsTr("越高越保留五官和发丝")+ }+ PercentRow {+ key: "texture"; label: qsTr("纹理保留"); defaultValue: 0.3; visible: editor.smoothOn+ hint: qsTr("把一部分皮肤纹理留回来,避免塑料感")+ }+ PercentRow { key: "brighten"; label: qsTr("肤色提亮"); defaultValue: 0; visible: editor.smoothOn }+ VRow {+ label: qsTr("磨皮范围")+ hint: qsTr("全部肤色:不依赖人脸识别,画面中所有肤色区域都会处理")+ visible: editor.smoothOn+ VSeg {+ objectName: editor.namePrefix + "-scope"+ options: [{id: "0", label: qsTr("仅人脸")}, {id: "1", label: qsTr("全部肤色")}]+ current: String(editor.params.scope ?? 0)+ onPicked: id => editor.edited("scope", Number(id))+ }+ }+ VSubGroup {+ objectName: editor.namePrefix + "-skin-group"+ Layout.fillWidth: true+ visible: editor.restoreOn || editor.smoothOn+ label: qsTr("肤色范围 · 高级"); count: 7+ PercentRow { key: "hueCenter"; label: qsTr("色相中心"); defaultValue: 0.08 }+ PercentRow { key: "hueRange"; label: qsTr("色相范围"); from: 0.01; to: 0.5; defaultValue: 0.10 }+ PercentRow { key: "satMin"; label: qsTr("饱和度下限"); defaultValue: 0.08; hint: qsTr("须低于上限") }+ PercentRow { key: "satMax"; label: qsTr("饱和度上限"); defaultValue: 0.80 }+ PercentRow { key: "lumaMin"; label: qsTr("亮度下限"); defaultValue: 0.04; hint: qsTr("夜景或暗部的脸调低") }+ PercentRow { key: "lumaMax"; label: qsTr("亮度上限"); defaultValue: 0.95 }+ PercentRow { key: "softness"; label: qsTr("边界柔和"); defaultValue: 0.35 }+ }+ PercentRow {+ key: "minConfidence"; label: qsTr("人脸置信度"); from: 0.3; to: 0.95; defaultValue: 0.6+ hint: qsTr("低于它的人脸不算;误识别时调高")+ visible: editor.restoreOn || editor.smoothOn+ }+ VRow {+ label: qsTr("显示遮罩")+ hint: qsTr("蓝色为原画保护区域,品红为磨皮区域;导出时自动关闭")+ visible: editor.restoreOn || editor.smoothOn+ VSwitch {+ objectName: editor.namePrefix + "-showMask"+ checked: editor.params.showMask === true+ onToggled: checked => editor.edited("showMask", checked ? 1 : 0)+ }+ }+ }++ // --- 人脸识别(全部美颜节点共用) -----------------------------------------+ VSubGroup {+ objectName: editor.namePrefix + "-detection-group"+ Layout.fillWidth: true+ visible: editor.showDetection+ expanded: editor.detectionOnly+ label: qsTr("人脸识别 · 全部美颜节点共用"); count: 3+ VRow {+ label: qsTr("识别档位")+ hint: editor.detection.quality === 0 ? qsTr("320 像素,每秒 10 次,最省")+ : editor.detection.quality === 2 ? qsTr("640 像素,每秒 30 次,小脸也能识别")+ : qsTr("512 像素,每秒 15 次")+ VSeg {+ objectName: editor.namePrefix + "-quality"+ options: [{id: "0", label: qsTr("性能")}, {id: "1", label: qsTr("均衡")}, {id: "2", label: qsTr("精细")}]+ current: String(editor.detection.quality ?? 1)+ onPicked: id => editor.detectionEdited("quality", Number(id))+ }+ }+ VRow {+ label: qsTr("最多人脸")+ value: String(editor.detection.maxFaces ?? 4)+ VSlider {+ objectName: editor.namePrefix + "-maxFaces"+ implicitWidth: 110+ valueFromModel: true+ resettable: true; defaultValue: 4+ from: 1; to: 8; inputDecimals: 0+ value: editor.detection.maxFaces ?? 4+ onMoved: value => editor.detectionEdited("maxFaces", Math.round(value))+ }+ }+ VRow {+ label: qsTr("跟踪平滑")+ hint: qsTr("越高人脸区域越稳,快速移动时跟得越慢")+ value: Math.round(Number(editor.detection.stability ?? 0.5) * 100) + "%"+ VSlider {+ objectName: editor.namePrefix + "-stability"+ implicitWidth: 110+ valueFromModel: true+ resettable: true; defaultValue: 0.5+ from: 0; to: 1; inputScale: 100+ value: editor.detection.stability ?? 0.5+ onMoved: value => editor.detectionEdited("stability", Math.round(value * 100) / 100)+ }+ }+ }+ Text {+ objectName: editor.namePrefix + "-status"+ Layout.fillWidth: true+ visible: editor.showDetection && editor.status.length > 0+ text: editor.status+ color: Theme.t2; font.family: Theme.fontUi; font.pixelSize: 11; wrapMode: Text.WordWrap+ }+}diff --git a/qml/Veyra/NodePage.qml b/qml/Veyra/NodePage.qmlindex 126b6d73..a5471b5c 100644--- a/qml/Veyra/NodePage.qml+++ b/qml/Veyra/NodePage.qml@@ -81,6 +81,7 @@ VPage {case "color": return "#E0C341"case "sr": return "#4F7BFF"case "aa": return "#7FD4FF"+ case "beauty": return "#FF8FBF"case "nr": return "#FF8A3D"case "protection": return "#8A8A96"case "video-hdr": return "#FFB547"@@ -1460,6 +1461,7 @@ VPage {: card.node.type === "color" ? colourEditor: card.node.type === "sr" ? srEditor: card.node.type === "aa" ? aaEditor+ : card.node.type === "beauty" ? beautyEditor: card.node.type === "video-hdr" ? hdrEditor: card.node.type === "frame-generation" ? fgEditor : null}@@ -1544,6 +1546,19 @@ VPage {onEdited: (key, amount) => veyra.setAntiAliasParameterAt(card.node.index, key, amount)}}+ Component {+ id: beautyEditor+ BeautyEditor {+ objectName: "node-beauty-editor-" + card.node.id+ namePrefix: "node-beauty-" + card.node.id+ params: (veyra.chain, veyra.beautyLayers, veyra.beautyParamsAt(card.node.index))+ detection: veyra.beautyDetection+ status: veyra.beautyStatus+ onEdited: (key, amount) => veyra.setBeautyParameterAt(card.node.index, key, amount)+ onPresetPicked: preset => veyra.applyBeautyPreset(card.node.index, preset)+ onDetectionEdited: (key, amount) => veyra.setBeautyDetection(key, amount)+ }+ }Component {id: hdrEditorColumnLayout {diff --git a/qml/Veyra/ProPage.qml b/qml/Veyra/ProPage.qmlindex 535cc002..a68fc1e3 100644--- a/qml/Veyra/ProPage.qml+++ b/qml/Veyra/ProPage.qml@@ -67,8 +67,10 @@ VPage {// M30: the NR layer card that was just added pops in; the number is reset// shortly after so a later rebuild of the list does not pop it again.property int popLayer: -1- Timer { id: popReset; interval: 900; onTriggered: root.popLayer = -1 }+ property int popBeauty: -1+ Timer { id: popReset; interval: 900; onTriggered: { root.popLayer = -1; root.popBeauty = -1 } }function markPop(number) { popLayer = number; popReset.restart() }+ function markBeautyPop(number) { popBeauty = number; popReset.restart() }// Design's st.tab: quality / fg / color / audio / display.property string tab: "quality"@@ -92,6 +94,12 @@ VPage {else if (chip.type === "aa") target = "list-anti-alias"else if (chip.type === "video-hdr") target = "list-video-hdr"else if (chip.type === "protection") target = "list-global-protection"+ else if (chip.type === "beauty") {+ beautyStage.open = true+ let ordinal = 0+ for (const n of veyra.chain) { if (n.type === "beauty") ++ordinal; if (n.index === chip.index) break }+ target = "beauty-card-" + ordinal+ }else if (chip.type === "nr") {nrStage.open = truelet ordinal = 0@@ -413,6 +421,128 @@ VPage {}}+ // A beauty layer: the shared editor (BeautyEditor.qml) under a numbered header.+ component BeautyLayerCard: VAccordion {+ id: card+ required property var layerData+ property int layerNumber: 1+ objectName: "beauty-card-" + layerNumber+ Layout.fillWidth: true+ glyph: "heart"; hue: "#FF8FBF"+ compactHeader: true+ popIn: layerNumber === root.popBeauty+ title: qsTr("美颜层 ") + layerNumber+ headerLeadingActions: Rectangle {+ implicitWidth: 22; implicitHeight: 22; radius: 7+ color: Qt.rgba(1, 143 / 255, 191 / 255, 0.16)+ Text {+ anchors.centerIn: parent+ text: card.layerNumber+ color: "#FF8FBF"+ font.family: Theme.fontMono; font.pixelSize: 11+ font.weight: Font.DemiBold; font.variableAxes: Theme.axesDemiBold+ }+ }+ headerActions: VButton {+ objectName: "beauty-card-more-" + card.layerNumber+ icon: true; ghost: true; iconName: "dup"+ implicitWidth: 26; implicitHeight: 26+ tip: qsTr("复制 · 移动 · 恢复默认 · 删除")+ onClicked: { beautyLayerMenu.layer = card; beautyLayerMenu.openAt(this, "down") }+ }+ readonly property var timing: veyra.nodeTimings[String(layerData.index + 2)] || ({})+ readonly property string timingText: timing.state === "measured" ? timing.ms.toFixed(2) + " ms"+ : timing.state === "pending" ? qsTr("等待样本") : ""+ summary: layerData.summary + (layerData.enabled && timingText.length > 0 ? " · " + timingText : "")+ on: layerData.enabled+ onToggled: on => veyra.setBeautyParameterAt(layerData.index, "enabled", on ? 1 : 0)+ BeautyEditor {+ Layout.fillWidth: true+ namePrefix: "list-beauty-" + card.layerNumber+ params: card.layerData+ showDetection: false+ onEdited: (key, amount) => veyra.setBeautyParameterAt(card.layerData.index, key, amount)+ onPresetPicked: preset => veyra.applyBeautyPreset(card.layerData.index, preset)+ }+ }++ // .addlayer: the dashed button at the bottom of a layered stage (NR, beauty).+ component AddLayerButton: Rectangle {+ id: addLayer+ property string label: ""+ property string note: ""+ property bool full: false+ signal add()+ Layout.fillWidth: true+ Layout.topMargin: 4+ implicitHeight: 36+ radius: 10+ opacity: full ? 0.45 : 1+ color: addHover.hovered && !full ? Theme.accentSoft : "transparent"+ readonly property bool softwareRendering: (typeof vySoftwareUi !== "undefined" && vySoftwareUi)+ || GraphicsInfo.api === GraphicsInfo.Software+ readonly property color outline: addHover.hovered && !addLayer.full ? Theme.accent : Qt.rgba(1, 1, 1, 0.2)+ Image {+ anchors.fill: parent+ visible: addLayer.softwareRendering+ // Software Shape ignores empty clips. A cached image keeps+ // this dashed path inside the inspector like the icons.+ source: {+ if (!visible || width <= 1 || height <= 1) return ""+ const c = addLayer.outline+ const paint = "rgb(" + Math.round(c.r * 255) + "," + Math.round(c.g * 255) + "," + Math.round(c.b * 255) + ")"+ return "data:image/svg+xml;charset=utf-8," + encodeURIComponent(+ '<svg xmlns="http://www.w3.org/2000/svg" width="' + width + '" height="' + height + '">'+ + '<rect x="0.5" y="0.5" width="' + (width-1) + '" height="' + (height-1)+ + '" rx="10" fill="none" stroke="' + paint + '" stroke-opacity="' + c.a+ + '" stroke-width="1" stroke-dasharray="5 4"/></svg>')+ }+ sourceSize.width: Math.max(1, Math.ceil(width * Screen.devicePixelRatio))+ sourceSize.height: Math.max(1, Math.ceil(height * Screen.devicePixelRatio))+ cache: true+ }+ Shape {+ visible: !addLayer.softwareRendering+ anchors.fill: parent+ ShapePath {+ strokeWidth: 1+ strokeColor: addHover.hovered && !addLayer.full ? Theme.accent : Qt.rgba(1, 1, 1, 0.2)+ fillColor: "transparent"+ strokeStyle: ShapePath.DashLine+ dashPattern: [5, 4]+ PathRectangle {+ x: 0; y: 0+ width: addLayer.width+ height: addLayer.height+ radius: 10+ }+ }+ }+ Row {+ anchors.centerIn: parent+ spacing: 6+ Text {+ text: addLayer.label+ color: addHover.hovered && !addLayer.full ? Theme.accent : Theme.t2+ font.family: Theme.fontUi+ font.pixelSize: Theme.fsBody+ font.weight: Font.Medium+ }+ Text {+ anchors.baseline: parent.children[0].baseline+ text: addLayer.note+ color: Theme.t3+ font.family: Theme.fontUi+ font.pixelSize: 11+ }+ }+ HoverHandler { id: addHover; cursorShape: addLayer.full ? Qt.ArrowCursor : Qt.PointingHandCursor }+ TapHandler {+ enabled: !addLayer.full+ onTapped: addLayer.add()+ }+ }+// Source and output belong together; the transport stays clear for seeking.Item {id: head@@ -1503,78 +1633,12 @@ VPage {// .addlayer: dashed, inside the stage; list mode adds and// toggles layers, never reorders them.- Rectangle {- id: addLayer+ AddLayerButton {objectName: "list-nr-add"- Layout.fillWidth: true- Layout.topMargin: 4- implicitHeight: 36- radius: 10- readonly property bool full: veyra.nrLayers.length >= 4- opacity: full ? 0.45 : 1- color: addHover.hovered && !full ? Theme.accentSoft : "transparent"- readonly property bool softwareRendering: (typeof vySoftwareUi !== "undefined" && vySoftwareUi)- || GraphicsInfo.api === GraphicsInfo.Software- readonly property color outline: addHover.hovered && !addLayer.full ? Theme.accent : Qt.rgba(1, 1, 1, 0.2)- Image {- anchors.fill: parent- visible: addLayer.softwareRendering- // Software Shape ignores empty clips. A cached image keeps- // this dashed path inside the inspector like the icons.- source: {- if (!visible || width <= 1 || height <= 1) return ""- const c = addLayer.outline- const paint = "rgb(" + Math.round(c.r * 255) + "," + Math.round(c.g * 255) + "," + Math.round(c.b * 255) + ")"- return "data:image/svg+xml;charset=utf-8," + encodeURIComponent(- '<svg xmlns="http://www.w3.org/2000/svg" width="' + width + '" height="' + height + '">'- + '<rect x="0.5" y="0.5" width="' + (width-1) + '" height="' + (height-1)- + '" rx="10" fill="none" stroke="' + paint + '" stroke-opacity="' + c.a- + '" stroke-width="1" stroke-dasharray="5 4"/></svg>')- }- sourceSize.width: Math.max(1, Math.ceil(width * Screen.devicePixelRatio))- sourceSize.height: Math.max(1, Math.ceil(height * Screen.devicePixelRatio))- cache: true- }- Shape {- visible: !addLayer.softwareRendering- anchors.fill: parent- ShapePath {- strokeWidth: 1- strokeColor: addHover.hovered && !addLayer.full ? Theme.accent : Qt.rgba(1, 1, 1, 0.2)- fillColor: "transparent"- strokeStyle: ShapePath.DashLine- dashPattern: [5, 4]- PathRectangle {- x: 0; y: 0- width: addLayer.width- height: addLayer.height- radius: 10- }- }- }- Row {- anchors.centerIn: parent- spacing: 6- Text {- text: qsTr("+ 添加 NR 层")- color: addHover.hovered && !addLayer.full ? Theme.accent : Theme.t2- font.family: Theme.fontUi- font.pixelSize: Theme.fsBody- font.weight: Font.Medium- }- Text {- anchors.baseline: parent.children[0].baseline- text: addLayer.full ? qsTr("(最多 4 层)") : qsTr("(加在 NR ") + veyra.nrLayers.length + qsTr(" 之后 · 最多 4 层)")- color: Theme.t3- font.family: Theme.fontUi- font.pixelSize: 11- }- }- HoverHandler { id: addHover; cursorShape: addLayer.full ? Qt.ArrowCursor : Qt.PointingHandCursor }- TapHandler {- enabled: !addLayer.full- onTapped: { root.markPop(veyra.nrLayers.length + 1); root.selectedEffect = veyra.addEffect("nr") }- }+ full: veyra.nrLayers.length >= 4+ label: qsTr("+ 添加 NR 层")+ note: full ? qsTr("(最多 4 层)") : qsTr("(加在 NR ") + veyra.nrLayers.length + qsTr(" 之后 · 最多 4 层)")+ onAdd: { root.markPop(veyra.nrLayers.length + 1); root.selectedEffect = veyra.addEffect("nr") }}}@@ -1697,6 +1761,59 @@ VPage {}}+ // Beauty: face restore and skin smoothing, after the whole NR group+ // (and its protection). Layers run in order; one face detection+ // serves all of them.+ VAccordion {+ id: beautyStage+ objectName: "list-beauty-stage"+ Layout.fillWidth: true+ glyph: "heart"+ hue: "#FF8FBF"+ title: qsTr("美颜")+ summary: veyra.beautyLayers.length === 0 ? qsTr("未添加美颜层 · 人脸原画保护与磨皮")+ : !veyra.beautyAnyEnabled ? qsTr("已关闭")+ : veyra.beautyStatus.length > 0 ? veyra.beautyStatus+ : veyra.beautyLayers.length + qsTr(" 层依次处理")+ enabledSwitch: veyra.beautyLayers.length > 0+ switchObjectName: "list-beauty-master"+ on: veyra.beautyAnyEnabled+ bypassed: veyra.beautyLayers.length > 0 && !veyra.beautyAnyEnabled+ onToggled: on => veyra.setAllBeautyEnabled(on)+ headerActions: VTag { text: qsTr("实验"); kind: "exp" }+ Repeater {+ model: veyra.beautyLayers.length+ delegate: BeautyLayerCard {+ id: beautyCard+ required property int index+ Layout.topMargin: 4+ layerData: veyra.beautyLayers[index]+ layerNumber: index + 1+ }+ }+ AddLayerButton {+ objectName: "list-beauty-add"+ full: veyra.beautyLayers.length >= 6+ label: qsTr("+ 添加美颜层")+ note: full ? qsTr("(最多 6 层)") : qsTr("(新层默认关闭 · 最多 6 层)")+ onAdd: { root.markBeautyPop(veyra.beautyLayers.length + 1); root.selectedEffect = veyra.addEffect("beauty") }+ }+ // The detection every layer shares, drawn once for the group.+ BeautyEditor {+ id: beautyDetectionPanel+ Layout.fillWidth: true+ Layout.topMargin: 4+ visible: veyra.beautyLayers.length > 0+ namePrefix: "list-beauty-detection"+ // Only the detection rows: no layer's values here.+ params: ({})+ detection: veyra.beautyDetection+ status: veyra.beautyStatus+ detectionOnly: true+ onDetectionEdited: (key, amount) => veyra.setBeautyDetection(key, amount)+ }+ }+// A refused edit explains itself here rather than in a modal.Text {Layout.fillWidth: true@@ -2804,6 +2921,31 @@ VPage {}}+ // A beauty layer's "更多": copy, move within the group, back to defaults, remove.+ VMenu {+ id: beautyLayerMenu+ objectName: "beauty-layer-menu"+ property Item layer: null+ title: layer ? qsTr("美颜层 ") + layer.layerNumber : ""+ items: layer ? [+ { label: qsTr("复制为新层"), icon: "dup", act: "dup", disabled: veyra.beautyLayers.length >= 6 },+ { label: qsTr("上移"), icon: "left", act: "up", disabled: layer.layerNumber <= 1 },+ { label: qsTr("下移"), icon: "right", act: "down", disabled: layer.layerNumber >= veyra.beautyLayers.length },+ { label: qsTr("恢复默认"), icon: "reset", act: "reset" },+ { label: qsTr("删除这一层"), icon: "trash", act: "del" }+ ] : []+ onPicked: (i, o) => {+ const card = layer+ if (!card) return+ const nodeIndex = card.layerData.index+ if (o.act === "dup") { root.markBeautyPop(card.layerNumber + 1); root.selectedEffect = veyra.duplicateBeautyLayer(nodeIndex) }+ else if (o.act === "up") veyra.moveBeautyLayer(nodeIndex, -1)+ else if (o.act === "down") veyra.moveBeautyLayer(nodeIndex, 1)+ else if (o.act === "reset") veyra.resetBeautyLayer(nodeIndex)+ else if (o.act === "del") card.bye(() => veyra.removeEffect(nodeIndex))+ }+ }+// presets.js DIALOGS.toNode / toList: the two modes side by side, then what// switching means. Independent configurations; the node canvas starts empty// the first time and keeps its chain afterwards.diff --git a/qml/Veyra/qmldir b/qml/Veyra/qmldirindex 1f3c3d3e..0e36c018 100644--- a/qml/Veyra/qmldir+++ b/qml/Veyra/qmldir@@ -41,6 +41,7 @@ VScrollBar 1.0 VScrollBar.qmlVConfirm 1.0 VConfirm.qmlNrLayerEditor 1.0 NrLayerEditor.qmlAntiAliasEditor 1.0 AntiAliasEditor.qml+BeautyEditor 1.0 BeautyEditor.qmlVSpinner 1.0 VSpinner.qmlVEqBars 1.0 VEqBars.qmlVTelemetryValue 1.0 VTelemetryValue.qmldiff --git a/scripts/acceptance/aa-53-gui.py b/scripts/acceptance/aa-53-gui.pyindex 574030c7..251ed631 100644--- a/scripts/acceptance/aa-53-gui.py+++ b/scripts/acceptance/aa-53-gui.py@@ -1,6 +1,6 @@"""Anti-aliasing (#53) GUI acceptance: real QML card, bridge, engine and live player.-usage: py -3.11 -I scripts/acceptance/aa-53-gui.py <staged-app-name>+usage: py -3.11 -I scripts/acceptance/aa-53-gui.py <staged-app-name> [task-folder]Runs a private copy of the staged app (tests/claude-aa-53-20261017/<name>) with anisolated profile, injects aa-53-gui.qml into that copy's Main.qml (restored@@ -11,7 +11,7 @@ from pathlib import Pathimport json, os, re, subprocess, sys, timeROOT = Path(__file__).resolve().parents[2]-BASE = Path('E:/项目/Veyra'); TASK = 'claude-aa-53-20261017'+BASE = Path('E:/项目/Veyra'); TASK = sys.argv[2] if len(sys.argv) > 2 else 'claude-aa-53-20261017'APP = BASE / 'tests' / TASK / sys.argv[1]MEDIA = BASE / 'tests' / TASK / 'media' / 'aa-player-720p.mp4'LOG = BASE / 'logs' / TASK / ('gui-' + time.strftime('%Y%m%d-%H%M%S')); LOG.mkdir(parents=True)diff --git a/scripts/acceptance/aa-53-gui.qml b/scripts/acceptance/aa-53-gui.qmlindex 3f6a5913..64d41d26 100644--- a/scripts/acceptance/aa-53-gui.qml+++ b/scripts/acceptance/aa-53-gui.qml@@ -31,7 +31,7 @@ Item {if (test.ticks < 4) returntest.require(!veyra.antiAliasEnabled && p.present === false, "a fresh profile has no anti-aliasing node")const ids = veyra.effectCatalog.map(e => e.id)- test.require(ids.indexOf("aa") >= 0 && ids.indexOf("beauty") < 0, "catalog offers anti-aliasing, beauty stays hidden")+ test.require(ids.indexOf("aa") >= 0 && ids.indexOf("beauty") >= 0, "catalog offers anti-aliasing and beauty")veyra.volume = 0veyra.openPath(test.media)test.step = 1; returndiff --git a/scripts/acceptance/beauty-gui.py b/scripts/acceptance/beauty-gui.pynew file mode 100644index 00000000..1f86a68f--- /dev/null+++ b/scripts/acceptance/beauty-gui.py@@ -0,0 +1,72 @@+"""Beauty GUI acceptance: real QML group, bridge, engine and live player on a face clip.++usage: py -3.11 -I scripts/acceptance/beauty-gui.py <staged-app-name>++Runs a private copy of the staged app (tests/claude-beauty-20261017/<name>, with the+face model in its models/ folder) with an isolated profile, injects beauty-gui.qml+into that copy's Main.qml (restored afterwards), plays a clip with a face, and+checks the console and engine log: the node and the shared face tracker are created,+live values never rebuild them, and the log carries no face positions. Other Veyra+processes are left alone; nothing outside the task folders is written.+"""+from pathlib import Path+import json, os, re, subprocess, sys, time++ROOT = Path(__file__).resolve().parents[2]+BASE = Path('E:/项目/Veyra'); TASK = 'claude-beauty-20261017'+APP = BASE / 'tests' / TASK / sys.argv[1]+MEDIA = BASE / 'tests' / TASK / 'media' / 'beauty-player-720p.mp4'+LOG = BASE / 'logs' / TASK / ('gui-' + time.strftime('%Y%m%d-%H%M%S')); LOG.mkdir(parents=True)+profile = BASE / 'tests' / TASK / 'profiles' / LOG.name; profile.mkdir(parents=True)+(profile / 'qml-preferences.v1.json').write_text(json.dumps({'language': 'zh-CN', 'autoResume': False, 'rememberPosition': False,+ 'prewarmEnhancement': False, 'gpuPriority': 'normal', 'subtitleEnabled': False}), encoding='utf8')+tmp = BASE / 'tmp' / TASK / LOG.name; tmp.mkdir(parents=True)+assert MEDIA.is_file(), MEDIA+assert any((APP / 'models').glob('face_detection_yunet_*.onnx')), 'stage the face model into ' + str(APP / 'models')+main = APP / 'qml/Veyra/Main.qml'; saved = main.read_bytes()+shot = LOG / 'pro-quality-beauty.png'+loader = ('\nLoader { source: ' + json.dumps((ROOT / 'scripts/acceptance/beauty-gui.qml').as_uri()) ++ '; onLoaded: { item.media = ' + json.dumps(MEDIA.as_posix()) + '; item.shotPath = ' + json.dumps(shot.as_posix()) + ' } }\n')+text = saved.decode('utf8'); at = text.rfind('}'); assert at > 0+main.write_bytes((text[:at] + loader + text[at:]).encode('utf8'))+try:+ env = {k: v for k, v in os.environ.items() if not k.upper().startswith(('VEYRA_', 'QT_', 'QSG_'))}+ env.update(PATH=str(APP) + os.pathsep + env['PATH'], TEMP=str(tmp), TMP=str(tmp), CUDA_CACHE_PATH=str(tmp / 'cuda'),+ QML_DISK_CACHE_PATH=str(tmp / 'qml'), QT_FORCE_STDERR_LOGGING='1', VEYRA_LOG_FILE=str(LOG / 'engine.log'))+ command = [str(APP / 'veyra_qml_ui.exe'), '--data-dir', str(profile), '--page', 'pro', '--size', '1600x960', '--exit-after', '75000']+ start = time.monotonic()+ with (LOG / 'console.log').open('wb') as stream:+ run = subprocess.run(command, cwd=APP, env=env, stdout=stream, stderr=subprocess.STDOUT, timeout=90)+finally:+ main.write_bytes(saved)+console = (LOG / 'console.log').read_text(encoding='utf8', errors='replace')+engine = (LOG / 'engine.log').read_text(encoding='utf8', errors='replace') if (LOG / 'engine.log').exists() else ''+errors = [l for l in console.splitlines() if re.search(r'BEAUTY_UI_FAIL|ReferenceError:|TypeError:|\[ERROR\s*\]|\[FATAL\s*\]|D3D12 ERROR|Cannot assign|Binding loop', l)]+++def between(text, begin, end):+ return text.split(begin, 1)[-1].split(end, 1)[0] if begin in text else ''+++edits = between(engine, 'BEGIN beauty edits', 'END beauty edits')+live = between(engine, 'BEGIN live beauty values', 'END live beauty values')+created = re.findall(r'\[beauty\] instance=\d+ [^\r\n]*', edits)+tracker = re.findall(r'face tracker ready[^\r\n]*', edits)+rebuiltLive = re.findall(r'\[beauty\] instance=\d+ [^\r\n]*', live)+detectErrors = [l for l in engine.splitlines() if 'beauty-detect' in l and re.search(r'unavailable|failed|could not', l)]+# AGENTS.md: the log never records face crops, landmark tracks or pixels.+positions = [l for l in engine.splitlines() if 'beauty' in l and re.search(r'landmark|\bbox\b|\bcx=|\bcy=|score=', l)]+if not created: errors.append('the live player never created a beauty node')+if not tracker: errors.append('the shared face tracker never started')+if rebuiltLive: errors.append('live beauty values rebuilt the node: ' + rebuiltLive[0])+if detectErrors: errors.append('face detection reported a problem: ' + detectErrors[0])+if positions: errors.append('the log records face positions: ' + positions[0])+info = [l for l in console.splitlines() if 'BEAUTY_UI_INFO' in l]+row = {'command': command, 'exit': run.returncode, 'seconds': round(time.monotonic() - start, 1),+ 'passed': run.returncode == 0 and 'BEAUTY_UI_PASS' in console and not errors, 'errors': errors,+ 'checks': len(re.findall(r'BEAUTY_UI_CHECK', console)), 'nodesCreated': created, 'tracker': tracker[:1],+ 'info': info, 'screenshot': str(shot) if shot.exists() else None, 'mainRestored': main.read_bytes() == saved,+ 'profile': str(profile)}+(LOG / 'receipt.json').write_text(json.dumps(row, ensure_ascii=False, indent=2), encoding='utf8')+print(json.dumps(row, ensure_ascii=False, indent=1))+raise SystemExit(not (row['passed'] and row['mainRestored']))diff --git a/scripts/acceptance/beauty-gui.qml b/scripts/acceptance/beauty-gui.qmlnew file mode 100644index 00000000..f88e334b--- /dev/null+++ b/scripts/acceptance/beauty-gui.qml@@ -0,0 +1,186 @@+// Loaded into a private copy of Main.qml by beauty-gui.py: drives the real bridge,+// the list page's 美颜 group and the engine while a clip with a face plays.+import QtQuick+import QtQuick.Window+Item {+ id: test+ property string media: ""+ property string shotPath: ""+ property int step: 0+ property int ticks: 0+ property int layerIndex: -1+ property int nodeA: -1+ property int nodeB: -1+ property int waitFaces: 0+ property real beginPosition: 0+ function require(ok, message) {+ if (!ok) throw new Error(message)+ console.log("BEAUTY_UI_CHECK", message)+ }+ function chainTypes() { return veyra.chain.map(n => n.type) }+ function window() { return test.Window.window.contentItem }+ function find(item, name) {+ if (!item) return null+ if (item.objectName === name) return item+ for (let i = 0; i < item.children.length; ++i) { const r = find(item.children[i], name); if (r) return r }+ return null+ }+ // Scroll the inspector so `item` sits at its top.+ function reveal(item) {+ let flick = item.parent+ while (flick && flick.contentY === undefined) flick = flick.parent+ if (!flick) return+ const y = item.mapToItem(flick.contentItem, 0, 0).y - 4+ flick.contentY = Math.max(0, Math.min(y, Math.max(0, flick.contentHeight - flick.height)))+ }+ Timer {+ interval: 400; repeat: true; running: true+ onTriggered: { try {+ if (++test.ticks > 150) throw new Error("deadline step=" + test.step)+ if (test.step === 0) {+ if (test.ticks < 4) return+ test.require(veyra.beautyLayers.length === 0 && !veyra.beautyAnyEnabled, "a fresh profile has no beauty layer")+ const ids = veyra.effectCatalog.map(e => e.id)+ test.require(ids.indexOf("beauty") >= 0 && ids.indexOf("aa") >= 0, "the catalog offers beauty next to anti-aliasing")+ const stage = test.find(test.window(), "list-beauty-stage")+ test.require(stage && stage.visible && !stage.enabledSwitch, "the 美颜 group sits on the 画质 tab, without a switch while empty")+ veyra.volume = 0+ veyra.openPath(test.media)+ test.step = 1; return+ }+ test.require(!veyra.failed, "player has no error")+ if (test.step === 1) {+ if (!veyra.running || veyra.position < 0.5 || veyra.applying) return+ test.beginPosition = veyra.position+ veyra.logUi("beauty-gui", "BEGIN beauty edits")+ // Open the group, as a user does to reach its add button.+ test.find(test.window(), "list-beauty-stage").open = true+ test.step = 11; return+ }+ if (test.step === 11) {+ // The group's dashed add button, as a click sends it.+ const add = test.find(test.window(), "list-beauty-add")+ test.require(add && add.visible && !add.full, "the add button is offered")+ add.add()+ test.step = 2; return+ }+ if (veyra.applying) return+ if (test.step === 2) {+ test.require(veyra.beautyLayers.length === 1, "the add button creates one layer")+ const l = veyra.beautyLayers[0]+ test.layerIndex = l.index+ test.require(!l.enabled && !l.restore && !l.smooth, "a new layer arrives switched off with both sub-functions off")+ const types = test.chainTypes()+ const hdr = types.indexOf("video-hdr")+ test.require(hdr < 0 || types.indexOf("beauty") < hdr, "the layer sits in front of RTX Video HDR")+ test.require(test.find(test.window(), "beauty-card-1") !== null, "the layer card exists")+ test.require(veyra.applyBeautyPreset(test.layerIndex, "restoreNatural"), "preset: original restore + natural smoothing")+ test.step = 3; return+ }+ if (test.step === 3) {+ const l = veyra.beautyParamsAt(test.layerIndex)+ test.require(l.enabled && l.restore && l.smooth && Math.abs(l.smoothAmount - 0.6) < 1e-6 && l.radius === 5 &&+ Math.abs(l.restoreStrength - 1) < 1e-6, "the preset switches the layer and both sub-functions on")+ test.require(veyra.chain.find(n => n.type === "beauty").enabled, "the chip shows the layer on")+ test.step = 4; return+ }+ if (test.step === 4) {+ // The shared tracker reports the face within a few detections.+ if (veyra.beautyStatus.indexOf("检测到") !== 0) {+ if (++test.waitFaces < 30) return+ throw new Error("no face reported: '" + veyra.beautyStatus + "'")+ }+ test.require(true, "status: " + veyra.beautyStatus)+ const rows = veyra.stageTimings.filter(r => r.label === "美颜" || r.label === "人脸识别")+ console.log("BEAUTY_UI_INFO timing", JSON.stringify(rows.map(r => ({label: r.label, ms: r.ms, measured: r.measured}))))+ veyra.logUi("beauty-gui", "BEGIN live beauty values")+ test.require(veyra.setBeautyParameterAt(test.layerIndex, "smoothAmount", 0.8) &&+ Math.abs(veyra.beautyParamsAt(test.layerIndex).smoothAmount - 0.8) < 1e-6, "the smoothing amount is live")+ test.require(veyra.setBeautyParameterAt(test.layerIndex, "restoreStrength", 0.5), "the restore strength is live")+ test.require(veyra.setBeautyParameterAt(test.layerIndex, "scope", 1) && veyra.beautyParamsAt(test.layerIndex).scope === 1, "all-skin scope")+ test.require(veyra.setBeautyParameterAt(test.layerIndex, "scope", 0), "back to faces")+ test.require(!veyra.setBeautyParameterAt(test.layerIndex, "radius", 13), "an out-of-range radius is refused")+ test.require(!veyra.setBeautyParameterAt(test.layerIndex, "satMin", 0.9), "a saturation floor above the ceiling is refused")+ test.require(veyra.setBeautyDetection("quality", 2) && veyra.beautyDetection.quality === 2, "the detection level is live")+ test.require(veyra.setBeautyDetection("stability", 0.3) && Math.abs(veyra.beautyDetection.stability - 0.3) < 1e-6,+ "the tracking stability is live")+ test.step = 5; return+ }+ if (test.step === 5) {+ veyra.logUi("beauty-gui", "END live beauty values")+ test.require(veyra.beautyStatus.length > 0, "the status stays: " + veyra.beautyStatus)+ test.require(veyra.setBeautyParameterAt(test.layerIndex, "showMask", 1), "mask view on")+ test.step = 6; return+ }+ if (test.step === 6) {+ test.require(veyra.setBeautyParameterAt(test.layerIndex, "showMask", 0), "mask view off")+ const copy = veyra.duplicateBeautyLayer(test.layerIndex)+ test.require(copy === test.layerIndex + 1 && veyra.beautyLayers.length === 2, "copy as a new layer right behind it")+ test.require(veyra.setBeautyParameterAt(copy, "restoreStrength", 0.25), "the copy edits its own values")+ test.require(veyra.moveBeautyLayer(copy, -1), "move the copy up")+ test.require(Math.abs(veyra.beautyLayers[0].restoreStrength - 0.25) < 1e-6 &&+ Math.abs(veyra.beautyLayers[1].restoreStrength - 0.5) < 1e-6, "the layers traded places")+ test.require(!veyra.moveBeautyLayer(veyra.beautyLayers[0].index, -1), "the first layer cannot move up")+ test.step = 7; return+ }+ if (test.step === 7) {+ test.require(veyra.setBeautyParameterAt(veyra.beautyLayers[1].index, "enabled", 0), "switch layer 2 off")+ test.require(veyra.setAllBeautyEnabled(false) && !veyra.beautyAnyEnabled, "the group switch turns every layer off")+ test.step = 8; return+ }+ if (test.step === 8) {+ test.require(veyra.setAllBeautyEnabled(true), "group switch on again")+ test.require(veyra.beautyLayers[0].enabled && !veyra.beautyLayers[1].enabled, "on again brings back only the layer that was on")+ test.require(veyra.resetBeautyLayer(veyra.beautyLayers[1].index) && !veyra.beautyLayers[1].restore &&+ !veyra.beautyLayers[1].smooth, "reset turns the sub-functions off")+ test.require(veyra.removeEffect(veyra.beautyLayers[1].index) && veyra.beautyLayers.length === 1, "remove the second layer")+ test.step = 9; return+ }+ if (test.step === 9) {+ const stage = test.find(test.window(), "list-beauty-stage")+ const card = test.find(test.window(), "beauty-card-1")+ test.require(stage && card, "the group and its layer card")+ stage.open = true; card.open = true+ test.step = 91; return+ }+ if (test.step === 91) {+ test.reveal(test.find(test.window(), "list-beauty-stage"))+ test.step = 92; return+ }+ if (test.step === 92) {+ // grabToImage renders on a later frame: change nothing until it is saved.+ if (test.shotPath.length > 0)+ test.window().grabToImage(r => r.saveToFile(test.shotPath))+ test.step = 93; return+ }+ if (test.step === 93) {+ veyra.nodeMode = 1+ test.step = 10; return+ }+ if (test.step === 10) {+ test.nodeA = veyra.addEffect("beauty")+ test.require(test.nodeA >= 0 && !veyra.beautyParamsAt(test.nodeA).enabled, "a node-mode beauty node arrives switched off")+ test.require(veyra.applyBeautyPreset(test.nodeA, "natural") && veyra.beautyParamsAt(test.nodeA).enabled &&+ veyra.beautyParamsAt(test.nodeA).smooth && !veyra.beautyParamsAt(test.nodeA).restore, "the node takes a preset")+ test.require(veyra.duplicateBeautyLayer(test.nodeA) < 0, "node mode copies through the node menu instead")+ // An anti-aliasing node switched off at its defaults has no settings instance either.+ test.nodeB = veyra.addEffect("aa")+ test.require(test.nodeB >= 0 && veyra.setEffectEnabled(test.nodeB, false) && !veyra.antiAliasParamsAt(test.nodeB).enabled,+ "a node-mode anti-aliasing node switches off at its defaults")+ test.step = 12; return+ }+ if (test.step === 12) {+ test.require(veyra.removeEffect(Math.max(test.nodeA, test.nodeB)) && veyra.removeEffect(Math.min(test.nodeA, test.nodeB)),+ "remove the nodes")+ veyra.nodeMode = 0+ test.step = 13; return+ }+ test.require(veyra.nodeMode === 0 && veyra.beautyLayers.length === 1 && veyra.beautyLayers[0].enabled,+ "list mode keeps its own beauty layer")+ test.require(veyra.position > test.beginPosition + 2, "media time advances through the edits")+ veyra.logUi("beauty-gui", "END beauty edits")+ console.log("BEAUTY_UI_PASS")+ Qt.quit()+ } catch(e) { console.log("BEAUTY_UI_FAIL", String(e)); Qt.quit() } }+ }+}diff --git a/shaders/BeautyYuNetDecode.hlsl b/shaders/BeautyYuNetDecode.hlslindex 35e802e8..ddcbe500 100644--- a/shaders/BeautyYuNetDecode.hlsl+++ b/shaders/BeautyYuNetDecode.hlsl@@ -2,7 +2,8 @@// anchor: 0 cls, 1 obj, 2..5 box, 6..15 five landmarks (x,y pairs). Anchors whose// sqrt(sigmoid(cls) * sigmoid(obj)) reaches the threshold are appended to a// bounded candidate list (atomic counter in the first 16 bytes, then 64-byte-// records); the host reads the list back after the fence and runs NMS.+// records). The face tracker runs NMS on the GPU (BeautyTrack.hlsl); with+// readback (the detector test) the host reads the list back and runs it.// arg0 stride | arg1 capacity | arg2 threshold (float bits) | arg3 scale index// Record: x, y, w, h, 5 x (lx, ly), score, id (scale << 24 | anchor).#include "BeautyYuNet.hlsli"diff --git a/src/engine/EffectChain.cpp b/src/engine/EffectChain.cppindex aa64bf35..d0627205 100644--- a/src/engine/EffectChain.cpp+++ b/src/engine/EffectChain.cpp@@ -369,11 +369,25 @@ ChainValidation restoreRuntimeOrder(const EnhancementSettings& settings, const Crestored.fgStrictAdmission = source.fgStrictAdmission;restored.beautyDetection = source.beautyDetection;std::array<bool, kMaxChainNodes> used{};+ // An anti-aliasing or beauty node that is switched off with its default values+ // has no instance in the settings (toChain adds none, so older presets keep their+ // layout), yet the node graph still holds it: it comes back as that untouched node.+ bool untouchedAa = !settings.antiAlias.configured() && !settings.additionalAntiAliasCount;+ bool untouchedBeauty = !settings.beauty.configured() && !settings.additionalBeautyCount;for (uint32_t i = 0; i < order.nodeCount; ++i) {if (uint32_t(order.types[i]) >= effectTypeCount) return {false, "运行节点类型无效"};uint32_t index = 0;while (index < source.nodeCount && (used[index] || source.nodes[index].type != order.types[i])) ++index;- if (index == source.nodeCount) return {false, "运行节点顺序与实例参数数量不匹配"};+ if (index == source.nodeCount) {+ bool& untouched = order.types[i] == EffectType::AntiAliasing ? untouchedAa : untouchedBeauty;+ if ((order.types[i] != EffectType::AntiAliasing && order.types[i] != EffectType::Beauty) || !untouched)+ return {false, "运行节点顺序与实例参数数量不匹配"};+ untouched = false;+ restored.nodes[i] = ChainNode{};+ restored.nodes[i].type = order.types[i];+ restored.nodes[i].enabled = false;+ continue;+ }used[index] = true;restored.nodes[i] = source.nodes[index];}diff --git a/src/engine/EngineController.cpp b/src/engine/EngineController.cppindex 5e1e0e66..9a9b341f 100644--- a/src/engine/EngineController.cpp+++ b/src/engine/EngineController.cpp@@ -2682,6 +2682,8 @@ void EngineController::run(HWND window,std::wstring path,PlayerOptions options,spresenter.displayRefreshHz();++frames;{std::lock_guard lock(mutex_);snapshot_.metrics=measured;snapshot_.colorStatus=graph->videoHdrActive()?L"SDR → RTX Video HDR":options.settings.videoHdr.enabled&&!gd.hdrInput?L"SDR → SDR(HDR显示未启用)":gd.hdrOutput?(graph->hdr10Output()?L"HDR → HDR10 / PQ":L"HDR → scRGB / 浮点"):gd.hdrInput?L"HDR → SDR色调映射":L"SDR → SDR";snapshot_.position=(isCapture||isImage?pts:lastFilePresentedMs)/1000;snapshot_.frames=sourceFrames;snapshot_.generated=graphStats.fgGeneratedFrames;snapshot_.lateMs=lateness;snapshot_.lateP95Ms=presentReturnDeviation.p95();snapshot_.videoHdrActive=graph->videoHdrActive();+ snapshot_.beautyActive=graph->beautyNodesActive();snapshot_.beautyFaces=graph->beautyFaceCount();+ snapshot_.beautyNotice=graph->beautyNotice();snapshot_.videoHdrStatus=graph->videoHdrActive()?L"预览:SDR 转 HDR 已运行":!options.settings.videoHdr.enabled?L"RTX Video HDR 已关闭":gd.hdrInput?L"原生 HDR 输入,无需 SDR 转 HDR":diff --git a/src/engine/ExportJobManager.cpp b/src/engine/ExportJobManager.cppindex eaae4570..f0343c35 100644--- a/src/engine/ExportJobManager.cpp+++ b/src/engine/ExportJobManager.cpp@@ -30,7 +30,9 @@ struct Shared {// chain is fixed-capacity and trivially copyable, so it can cross the// process boundary; a worker that sees another version refuses the job// instead of reading a mismatched layout.- DWORD signature=magic,version=11,bytes=sizeof(Shared); // 10: 32-node chain with anti-aliasing; 11: beauty payloads and face detection+ // 10: 32-node chain with anti-aliasing; 11: beauty payloads and face detection.+ static constexpr DWORD kVersion=11;+ DWORD signature=magic,version=kVersion,bytes=sizeof(Shared);EnhancementSettings settings;EffectChain chain;wchar_t input[32768]{},output[32768]{},temporary[32768]{};@@ -263,7 +265,7 @@ int runExportWorker(HANDLE mapping){}UnmapViewOfFile(s);CloseHandle(mapping);return 1;};- if(s->signature!=magic||s->version!=10||s->bytes!=sizeof(Shared))return reject(L"导出任务通信协议不匹配");+ if(s->signature!=magic||s->version!=Shared::kVersion||s->bytes!=sizeof(Shared))return reject(L"导出任务通信协议不匹配");if(const auto error=s->settings.validate();!error.empty()){log::error("export-worker",std::format("invalid frozen settings: {}",error));return reject(L"导出任务的增强参数无效,请查看任务日志中的具体参数错误");diff --git a/src/ui/QmlPlayerBridge.cpp b/src/ui/QmlPlayerBridge.cppindex f080c9ab..3834b1de 100644--- a/src/ui/QmlPlayerBridge.cpp+++ b/src/ui/QmlPlayerBridge.cpp@@ -185,6 +185,7 @@ static ui::EffectGpu effectGpu();struct QmlPlayerBridge::Impl {// Per-layer on/off before the NR master switch turned them all off.std::vector<bool> nrMasterRestore;+ std::vector<bool> beautyMasterRestore; // the same for the beauty group switchQQmlEngine* qmlEngine = nullptr;engine::EngineController& engine;PlayerUiFacade facade;@@ -1766,6 +1767,13 @@ QVariantList QmlPlayerBridge::stageTimings() const {{"输入", Stage::Color, "#A8A8B8"},{"抗锯齿", Stage::AaNode0, "#7FD4FF"},{"抗锯齿 2", Stage::AaNode1, "#A9E2FF"},+ {"人脸识别", Stage::BeautyDetect, "#FFB3D1"},+ {"美颜", Stage::BeautyNode0, "#FF8FBF"},+ {"美颜 2", Stage::BeautyNode1, "#FF9DC7"},+ {"美颜 3", Stage::BeautyNode2, "#FFABCF"},+ {"美颜 4", Stage::BeautyNode3, "#FFB9D7"},+ {"美颜 5", Stage::BeautyNode4, "#FFC7DF"},+ {"美颜 6", Stage::BeautyNode5, "#FFD5E7"},{"超分", Stage::Sr, "#6EA8FF"},{"光流", Stage::Flow, "#9A85FF"},{"NR采样", Stage::Nr, "#FF8A3D"},@@ -1785,7 +1793,10 @@ QVariantList QmlPlayerBridge::stageTimings() const {static const char* const layerLabels[] = {"NR 第1层", "NR 第2层", "NR 第3层", "NR 第4层"};static const char* const layerColors[] = {"#FF8A3D", "#FFA866", "#FFC28F", "#FFD9B8"};for (const auto& r : rows) {- if ((r.stage == Stage::AaNode0 || r.stage == Stage::AaNode1) && s.metrics.flow.gpuTiming[size_t(r.stage)].samples == 0) continue;+ // Anti-aliasing and beauty rows appear only while those nodes run.+ const bool optional = r.stage == Stage::AaNode0 || r.stage == Stage::AaNode1 ||+ (r.stage >= Stage::BeautyNode0 && r.stage <= Stage::BeautyDetect);+ if (optional && s.metrics.flow.gpuTiming[size_t(r.stage)].samples == 0) continue;if (r.stage == Stage::Nr && measuredLayers >= 2) {for (unsigned i = 0; i < diagnostics::kTimedNrLayers; ++i)if (s.metrics.flow.gpuTiming[size_t(diagnostics::nrLayerStage(i))].samples > 0)@@ -1866,7 +1877,7 @@ QVariantMap QmlPlayerBridge::nodeTimings() const {for (const int i : path) onPath[size_t(i)] = true;for (uint32_t i = 0; i < c.nodeCount; ++i)if (!onPath[i]) publish(i, draft ? QStringLiteral("draft") : QStringLiteral("idle"), std::nullopt);- unsigned enabledNr = 0, colour = 0, antiAlias = 0;+ unsigned enabledNr = 0, colour = 0, antiAlias = 0, beauty = 0;for (const int index : path) {const auto i = uint32_t(index);const auto& n = c.nodes[i];@@ -1890,6 +1901,10 @@ QVariantMap QmlPlayerBridge::nodeTimings() const {if (antiAlias < diagnostics::kTimedAaNodes) stage = diagnostics::aaNodeStage(antiAlias);++antiAlias;break;+ case engine::EffectType::Beauty:+ if (beauty < diagnostics::kTimedBeautyNodes) stage = diagnostics::beautyNodeStage(beauty);+ ++beauty;+ break;case engine::EffectType::SuperResolution: stage = Stage::Sr; break;case engine::EffectType::VideoHdr:stage = Stage::VideoHdr;@@ -2130,6 +2145,7 @@ void QmlPlayerBridge::resetCurrentPage() {s.color = engine::ColorSettings{};s.additionalColors = {}; s.additionalColorCount = 0;s.antiAlias = engine::AntiAliasSettings{}; s.additionalAntiAlias = {}; s.additionalAntiAliasCount = 0;+ s.beauty = engine::BeautySettings{}; s.additionalBeauty = {}; s.additionalBeautyCount = 0; s.beautyDetection = {};s.videoHdr = engine::VideoHdrSettings{};const auto before=impl_->chain; const auto selected=impl_->selectedNr;const auto oldLayout = impl_->layout;@@ -5443,6 +5459,230 @@ bool QmlPlayerBridge::setAntiAliasParameterAt(int index, const QString& key, douelse emitParameterChanged(&QmlPlayerBridge::antiAliasChanged, wasValid);return accepted;}+namespace {+// Beauty nodes: one node's values for the editors, the edits they send and the presets.+QString beautySummary(const engine::BeautySettings& b, bool enabled) {+ if (!enabled) return QmlPlayerBridge::tr("已关闭");+ QStringList parts;+ if (b.restore) parts << QmlPlayerBridge::tr("原画保护 %1%").arg(std::lround(b.restoreStrength * 100.0f));+ if (b.smooth) parts << QmlPlayerBridge::tr("磨皮 %1%").arg(std::lround(b.smoothAmount * 100.0f));+ return parts.isEmpty() ? QmlPlayerBridge::tr("未启用子功能") : parts.join(QStringLiteral(" · "));+}+QVariantMap beautyMap(const engine::ChainNode* node, int index, int layer) {+ const engine::BeautySettings b = node ? node->beauty : engine::BeautySettings{};+ return {{"index", index}, {"layer", layer}, {"present", node != nullptr}, {"enabled", node && node->enabled},+ {"restore", b.restore}, {"restoreStrength", double(b.restoreStrength)}, {"restoreScope", int(b.restoreScope)},+ {"regionExpand", double(b.regionExpand)}, {"feather", double(b.feather)},+ {"smooth", b.smooth}, {"strength", double(b.strength)}, {"smoothAmount", double(b.smoothAmount)},+ {"radius", double(b.radius)}, {"detail", double(b.detail)}, {"texture", double(b.texture)},+ {"brighten", double(b.brighten)}, {"scope", int(b.scope)},+ {"hueCenter", double(b.hueCenter)}, {"hueRange", double(b.hueRange)}, {"satMin", double(b.satMin)},+ {"satMax", double(b.satMax)}, {"lumaMin", double(b.lumaMin)}, {"lumaMax", double(b.lumaMax)},+ {"softness", double(b.softness)}, {"minConfidence", double(b.minConfidence)}, {"showMask", b.showMask},+ {"summary", beautySummary(b, node && node->enabled)}};+}+bool applyBeautyKey(engine::BeautySettings& b, bool& enabled, const QString& key, double value) {+ if (!std::isfinite(value)) return false;+ const int whole = int(std::lround(value));+ if (key == "enabled") { enabled = value != 0; return true; }+ if (key == "restore") { b.restore = value != 0; return true; }+ if (key == "smooth") { b.smooth = value != 0; return true; }+ if (key == "showMask") { b.showMask = value != 0; return true; }+ if (key == "restoreScope") { if (whole < 0 || whole > 1) return false; b.restoreScope = engine::BeautyRestoreScope(whole); return true; }+ if (key == "scope") { if (whole < 0 || whole > 1) return false; b.scope = engine::BeautyScope(whole); return true; }+ const std::pair<const char*, float engine::BeautySettings::*> floats[] = {+ {"restoreStrength", &engine::BeautySettings::restoreStrength}, {"regionExpand", &engine::BeautySettings::regionExpand},+ {"feather", &engine::BeautySettings::feather}, {"strength", &engine::BeautySettings::strength},+ {"smoothAmount", &engine::BeautySettings::smoothAmount}, {"radius", &engine::BeautySettings::radius},+ {"detail", &engine::BeautySettings::detail}, {"texture", &engine::BeautySettings::texture},+ {"brighten", &engine::BeautySettings::brighten}, {"hueCenter", &engine::BeautySettings::hueCenter},+ {"hueRange", &engine::BeautySettings::hueRange}, {"satMin", &engine::BeautySettings::satMin},+ {"satMax", &engine::BeautySettings::satMax}, {"lumaMin", &engine::BeautySettings::lumaMin},+ {"lumaMax", &engine::BeautySettings::lumaMax}, {"softness", &engine::BeautySettings::softness},+ {"minConfidence", &engine::BeautySettings::minConfidence}};+ for (const auto& [name, field] : floats)+ if (key == QLatin1String(name)) { b.*field = float(value); return true; }+ return false;+}+// Starting points, tuned on lit photos and dark game footage; each names the+// sub-switches it changes and leaves the skin range and the detection alone.+bool applyBeautyPresetValues(engine::BeautySettings& b, const QString& preset) {+ const auto natural = [&] { b.smooth = true; b.strength = 1.0f; b.smoothAmount = 0.6f; b.radius = 5.0f; b.detail = 0.6f; b.texture = 0.3f; };+ if (preset == "natural") { natural(); b.restore = false; return true; }+ if (preset == "light") {+ b.smooth = true; b.restore = false; b.strength = 1.0f; b.smoothAmount = 0.35f; b.radius = 3.0f; b.detail = 0.75f; b.texture = 0.4f;+ return true;+ }+ if (preset == "restore") { b.restore = true; b.restoreStrength = 1.0f; b.smooth = false; return true; }+ if (preset == "restoreNatural") { b.restore = true; b.restoreStrength = 1.0f; natural(); return true; }+ return false;+}+}+QVariantList QmlPlayerBridge::beautyLayers() const {+ QVariantList out;+ int layer = 0;+ for (uint32_t i = 0; i < impl_->chain.nodeCount; ++i)+ if (impl_->chain.nodes[i].type == engine::EffectType::Beauty) out << beautyMap(&impl_->chain.nodes[i], int(i), layer++);+ return out;+}+QVariantMap QmlPlayerBridge::beautyDetection() const {+ const auto& d = impl_->chain.beautyDetection;+ return {{"quality", int(d.quality)}, {"maxFaces", int(d.maxFaces)}, {"stability", double(d.stability)}};+}+QString QmlPlayerBridge::beautyStatus() const {+ const auto& s = impl_->snapshot;+ if (!s.beautyActive) return {};+ if (!s.beautyNotice.empty()) return uiText(s.beautyNotice);+ return s.beautyFaces ? tr("检测到 %1 张人脸").arg(s.beautyFaces) : tr("未检测到人脸");+}+QVariantMap QmlPlayerBridge::beautyParamsAt(int index) const {+ const auto& c = impl_->chain;+ if (index < 0 || uint32_t(index) >= c.nodeCount || c.nodes[index].type != engine::EffectType::Beauty) return beautyMap(nullptr, -1, -1);+ int layer = 0;+ for (int i = 0; i < index; ++i) layer += c.nodes[i].type == engine::EffectType::Beauty;+ return beautyMap(&c.nodes[index], index, layer);+}+bool QmlPlayerBridge::setBeautyParameterAt(int index, const QString& key, double value) {+ auto& c = impl_->chain;+ if (index < 0 || uint32_t(index) >= c.nodeCount || c.nodes[index].type != engine::EffectType::Beauty) return false;+ auto& node = c.nodes[index];+ const auto before = node; const bool wasValid = chainValid();+ bool enabled = node.enabled;+ if (!applyBeautyKey(node.beauty, enabled, key, value)) return false;+ node.enabled = node.beauty.enabled = enabled;+ if (!node.beauty.validate().empty()) { node = before; return false; }+ if (node == before) return true;+ const bool accepted = impl_->revalidate(true);+ if (!accepted) { const auto error = impl_->validation.message; node = before; impl_->revalidate(); emit notice(uiText(error), true); }+ emit settingsChanged();+ // The switch also strikes the chip through; parameters notify only their group.+ if (before.enabled != node.enabled) emitChainChanged();+ else emitParameterChanged(&QmlPlayerBridge::beautyChanged, wasValid);+ return accepted;+}+int QmlPlayerBridge::duplicateBeautyLayer(int index) {+ auto& c = impl_->chain;+ if (index < 0 || uint32_t(index) >= c.nodeCount || c.nodes[index].type != engine::EffectType::Beauty) return -1;+ if (c.mode != engine::ChainMode::List) { emit notice(tr("节点模式请用节点的复制"), true); return -1; }+ if (c.countOf(engine::EffectType::Beauty) >= engine::kMaxBeautyInstances) {+ emit notice(tr("%1 最多 %2 个").arg(tr("美颜")).arg(engine::kMaxBeautyInstances), true); return -1;+ }+ if (c.nodeCount >= engine::kMaxChainNodes) { emit notice(tr("效果链已满"), true); return -1; }+ const auto before = std::make_unique<engine::EffectChain>(c);+ const int selected = impl_->selectedNr, colourSelected = impl_->selectedColour;+ const uint32_t at = uint32_t(index) + 1;+ for (uint32_t i = c.nodeCount; i > at; --i) c.nodes[i] = c.nodes[i - 1];+ c.nodes[at] = c.nodes[index]; ++c.nodeCount;+ if (impl_->selectedNr >= int(at)) ++impl_->selectedNr;+ if (impl_->selectedColour >= int(at)) ++impl_->selectedColour;+ if (!impl_->revalidate(true)) {+ const auto error = impl_->validation.message;+ c = *before; impl_->selectedNr = selected; impl_->selectedColour = colourSelected; impl_->revalidate();+ emit notice(uiText(error), true); return -1;+ }+ emit settingsChanged(); emitChainChanged();+ return int(at);+}+bool QmlPlayerBridge::moveBeautyLayer(int index, int delta) {+ auto& c = impl_->chain;+ if (index < 0 || uint32_t(index) >= c.nodeCount || c.nodes[index].type != engine::EffectType::Beauty || !delta) return false;+ int other = index;+ do other += delta < 0 ? -1 : 1;+ while (other >= 0 && uint32_t(other) < c.nodeCount && c.nodes[other].type != engine::EffectType::Beauty);+ if (other < 0 || uint32_t(other) >= c.nodeCount) return false;+ const auto before = std::make_unique<engine::EffectChain>(c);+ const auto viewA = std::pair{c.nodes[index].viewX, c.nodes[index].viewY};+ const auto viewB = std::pair{c.nodes[other].viewX, c.nodes[other].viewY};+ std::swap(c.nodes[index], c.nodes[other]);+ // Node mode keeps the canvas positions with the slot; only the parameters trade places.+ c.nodes[index].viewX = viewA.first; c.nodes[index].viewY = viewA.second;+ c.nodes[other].viewX = viewB.first; c.nodes[other].viewY = viewB.second;+ if (!impl_->revalidate(true)) {+ const auto error = impl_->validation.message; c = *before; impl_->revalidate();+ emit notice(uiText(error), true); return false;+ }+ emit settingsChanged(); emitChainChanged();+ return true;+}+bool QmlPlayerBridge::applyBeautyPreset(int index, const QString& preset) {+ auto& c = impl_->chain;+ if (index < 0 || uint32_t(index) >= c.nodeCount || c.nodes[index].type != engine::EffectType::Beauty) return false;+ auto& node = c.nodes[index];+ const auto before = node;+ if (!applyBeautyPresetValues(node.beauty, preset)) return false;+ node.enabled = node.beauty.enabled = true;+ if (!node.beauty.validate().empty()) { node = before; return false; }+ if (!impl_->revalidate(true)) {+ const auto error = impl_->validation.message; node = before; impl_->revalidate();+ emit notice(uiText(error), true); return false;+ }+ emit settingsChanged(); emitChainChanged();+ return true;+}+bool QmlPlayerBridge::setBeautyDetection(const QString& key, double value) {+ auto& c = impl_->chain;+ if (!std::isfinite(value)) return false;+ auto next = c.beautyDetection;+ const int whole = int(std::lround(value));+ if (key == "quality") next.quality = uint8_t(std::clamp(whole, 0, 2));+ else if (key == "maxFaces") next.maxFaces = uint8_t(std::clamp(whole, 1, 8));+ else if (key == "stability") next.stability = float(value);+ else return false;+ if (!next.validate().empty()) return false;+ if (next == c.beautyDetection) return true;+ const auto before = c.beautyDetection; const bool wasValid = chainValid();+ c.beautyDetection = next;+ if (!impl_->revalidate(true)) {+ const auto error = impl_->validation.message; c.beautyDetection = before; impl_->revalidate();+ emit notice(uiText(error), true); return false;+ }+ emit settingsChanged();+ emitParameterChanged(&QmlPlayerBridge::beautyChanged, wasValid);+ return true;+}+bool QmlPlayerBridge::beautyAnyEnabled() const {+ const auto& c = impl_->chain;+ for (uint32_t i = 0; i < c.nodeCount; ++i) if (c.nodes[i].type == engine::EffectType::Beauty && c.nodes[i].enabled) return true;+ return false;+}+bool QmlPlayerBridge::setAllBeautyEnabled(bool enabled) {+ auto& c = impl_->chain;+ const auto before = std::make_unique<engine::EffectChain>(c);+ std::vector<uint32_t> layers;+ for (uint32_t i = 0; i < c.nodeCount; ++i) if (c.nodes[i].type == engine::EffectType::Beauty) layers.push_back(i);+ if (layers.empty()) return false;+ auto& restore = impl_->beautyMasterRestore;+ if (!enabled) {+ restore.clear();+ for (const auto i : layers) { restore.push_back(c.nodes[i].enabled); c.nodes[i].enabled = c.nodes[i].beauty.enabled = false; }+ } else {+ // As the NR switch: layers added or removed meanwhile bring every layer back.+ const bool faithful = restore.size() == layers.size() && std::find(restore.begin(), restore.end(), true) != restore.end();+ for (size_t k = 0; k < layers.size(); ++k) c.nodes[layers[k]].enabled = c.nodes[layers[k]].beauty.enabled = faithful ? bool(restore[k]) : true;+ }+ if (!impl_->revalidate(true)) {+ const auto error = impl_->validation.message; c = *before; impl_->revalidate();+ emit notice(uiText(error), true); emitChainChanged(); return false;+ }+ veyra::log::info("ui-beauty", std::format("group switch {} layers={}", enabled ? "on" : "off", layers.size()));+ emitChainChanged(); emit settingsChanged();+ return true;+}+bool QmlPlayerBridge::resetBeautyLayer(int index) {+ auto& c = impl_->chain;+ if (index < 0 || uint32_t(index) >= c.nodeCount || c.nodes[index].type != engine::EffectType::Beauty) return false;+ auto& node = c.nodes[index];+ const auto before = node;+ node.beauty = engine::BeautySettings{};+ node.beauty.enabled = node.enabled;+ if (node == before) return true;+ if (!impl_->revalidate(true)) {+ const auto error = impl_->validation.message; node = before; impl_->revalidate();+ emit notice(uiText(error), true); return false;+ }+ emit settingsChanged(); emitChainChanged();+ return true;+}QVariantMap QmlPlayerBridge::videoHdrParams() const {for (uint32_t i = 0; i < impl_->chain.nodeCount; ++i)if (impl_->chain.nodes[i].type == engine::EffectType::VideoHdr) {@@ -5732,10 +5972,10 @@ QString QmlPlayerBridge::nrAutoSelectionReason(int index) const {}if(first!=index||count>2||otherAuto)return tr("自动 NR 仅支持一至两层列表的第一层");if(impl_->chain.mode!=engine::ChainMode::List||engine::currentNrRuntime(s.nrRuntime)!=engine::NrRuntime::Ampere||s.sr||s.multiplier>1||temporal||- s.nrHoldStrength>0||s.color.enabled||s.additionalColorCount||s.antiAlias.enabled||s.additionalAntiAliasCount||s.videoHdr.enabled||+ s.nrHoldStrength>0||s.color.enabled||s.additionalColorCount||s.antiAlias.enabled||s.additionalAntiAliasCount||s.beautyEnabled()||s.videoHdr.enabled||s.opticalFlowBackend!=engine::OpticalFlowBackend::Nvidia||s.nrMotion!=engine::MotionSource::OpticalFlow||snapshot.capture||snapshot.image||snapshot.sourceHdr||(snapshot.sourceWidth&& (snapshot.sourceWidth!=1920||snapshot.sourceHeight!=1080)))- return tr("需 1080p SDR 文件、SF 和 NVIDIA 光流;关闭超分、补帧、抗闪烁、调色及 HDR");+ return tr("需 1080p SDR 文件、SF 和 NVIDIA 光流;关闭超分、补帧、抗闪烁、调色、美颜及 HDR");return {};}@@ -5839,7 +6079,7 @@ QVariantList QmlPlayerBridge::effectCatalog() const {QString QmlPlayerBridge::chainError() const { return uiText(impl_->validation.message); }void QmlPlayerBridge::emitChainChanged() {emit chainChanged(); emit nrLayersChanged(); emit videoHdrParamsChanged();- emit antiAliasChanged(); emit colourParamsChanged(); emit protectionChanged();+ emit antiAliasChanged(); emit beautyChanged(); emit colourParamsChanged(); emit protectionChanged();}// Every chainChanged re-evaluated all chain-bound bindings on every page (the pro// and node pages stay loaded) and repainted the node wires: 65-80 ms of interface@@ -6996,7 +7236,8 @@ int QmlPlayerBridge::addEffect(const QString& type) {emit notice(tr("该类型节点已达上限(含禁用和未连接节点)"), true); return -1;}index = int(c.nodeCount++);- auto& node = c.nodes[index]; node = engine::ChainNode{}; node.type = info->type; node.enabled = true;+ auto& node = c.nodes[index]; node = engine::ChainNode{}; node.type = info->type;+ node.enabled = info->type != engine::EffectType::Beauty; // beauty starts switched offnode.viewX = float(index % 4) * 260; node.viewY = float(index / 4) * 300;if (info->type == engine::EffectType::NrEnhance) {node.nr.runtime = previous.nrRuntime; node.nr.lowLatencyPairing = previous.lowLatency;@@ -7080,7 +7321,7 @@ int QmlPlayerBridge::addEffect(const QString& type) {if (wanted != engine::EffectType::FrameGeneration) {for (uint32_t i = 0; i < c.nodeCount; ++i) {const auto& nodeInfo = engine::effectInfo(c.nodes[i].type);- if (nodeInfo.mustBeLast||(wanted==engine::EffectType::Color&&c.nodes[i].type==engine::EffectType::VideoHdr)||+ if (nodeInfo.mustBeLast||((wanted==engine::EffectType::Color||wanted==engine::EffectType::Beauty)&&c.nodes[i].type==engine::EffectType::VideoHdr)||(wanted==engine::EffectType::NrEnhance&&(c.nodes[i].type==engine::EffectType::Protection||c.nodes[i].type==engine::EffectType::VideoHdr))) { insertAt = i; break; }}@@ -7093,6 +7334,9 @@ int QmlPlayerBridge::addEffect(const QString& type) {// A new list-mode NR layer arrives switched off: adding a layer must not// change the picture until the user turns it on.c.nodes[insertAt].enabled = !(wanted == engine::EffectType::NrEnhance && c.mode == engine::ChainMode::List);+ // A beauty layer arrives with its switch and both sub-functions off: adding one+ // never changes the picture (its presets turn it on).+ if (wanted == engine::EffectType::Beauty) c.nodes[insertAt].enabled = false;if(wanted==engine::EffectType::Color)impl_->selectedColour=int(insertAt);if(wanted==engine::EffectType::NrEnhance){c.nodes[insertAt].nr.runtime=settings().nrRuntime;diff --git a/tests/integration/ExportWorkflowTests.cpp b/tests/integration/ExportWorkflowTests.cppindex 629889fc..3ddcdd54 100644--- a/tests/integration/ExportWorkflowTests.cpp+++ b/tests/integration/ExportWorkflowTests.cpp@@ -64,6 +64,14 @@ int wmain(int argc,wchar_t** argv){// worker's graph runs the pass (its log names the instance).const bool antiAlias=mode==L"aa"||mode==L"aa-mkv";if(antiAlias){settings.antiAlias.enabled=true;settings.antiAlias.method=AntiAliasMethod::Smaa;settings.antiAlias.quality=2;}+ // Beauty: the frozen settings cross the worker protocol with the mask view off,+ // and the worker creates the node and the face tracker (an export refuses to+ // start without the face model, which the staged app keeps in models/).+ const bool beauty=mode==L"beauty";+ if(beauty){+ settings.beauty.enabled=true;settings.beauty.restore=true;settings.beauty.restoreStrength=.8f;+ settings.beauty.smooth=true;settings.beauty.showMask=true;settings.beautyDetection.quality=2;+ }if(mode==L"queue"){std::filesystem::create_directories(output);ExportQueue queue(manager);@@ -181,6 +189,16 @@ int wmain(int argc,wchar_t** argv){// The log path may hold non-ASCII folders, which would fail the narrow console stream.std::wcout<<L"ANTI_ALIAS_EXPORT encoded="<<s.encoded<<L" passCreated=1\n";}+ if(beauty){+ auto expected=settings.beauty;expected.showMask=false;+ require(s.frozen.beauty==expected&&s.frozen.beautyDetection==settings.beautyDetection,+ "frozen job lost the beauty settings or kept the mask view");+ std::ifstream log(s.workerLog);const std::string text((std::istreambuf_iterator<char>(log)),{});+ require(text.find("[beauty] instance=0 ")!=std::string::npos,"export worker did not create the beauty node");+ require(text.find("face tracker ready")!=std::string::npos,"export worker did not start the face tracker");+ require(text.find("beauty-detect")==std::string::npos||text.find("unavailable")==std::string::npos,"export worker ran without faces");+ std::wcout<<L"BEAUTY_EXPORT encoded="<<s.encoded<<L" nodeCreated=1 tracker=1\n";+ }}passed=true;}catch(const std::exception& e){std::cerr<<"FAILED: "<<e.what()<<'\n';}diff --git a/tests/qml/quick/tst_beauty_editor.qml b/tests/qml/quick/tst_beauty_editor.qmlnew file mode 100644index 00000000..eae98976--- /dev/null+++ b/tests/qml/quick/tst_beauty_editor.qml@@ -0,0 +1,136 @@+import QtQuick+import QtTest+import Veyra++// The beauty editor shared by the list layers and the node card: rows follow the+// two sub-function switches, edits leave with the bridge's key names, and the+// shared face detection appears once per list group or in every node.+Item {+ id: root+ width: 520; height: 1400+ readonly property var off: ({index: 4, layer: 0, present: true, enabled: true, restore: false, restoreStrength: 1,+ restoreScope: 0, regionExpand: 0.05, feather: 0.08, smooth: false, strength: 1,+ smoothAmount: 0.5, radius: 4, detail: 0.65, texture: 0.3, brighten: 0, scope: 0,+ hueCenter: 0.08, hueRange: 0.1, satMin: 0.08, satMax: 0.8, lumaMin: 0.04, lumaMax: 0.95,+ softness: 0.35, minConfidence: 0.6, showMask: false, summary: ""})+ property var params: off+ property var edits: []+ property var presets: []+ property var detectionEdits: []+ BeautyEditor {+ id: editor+ x: 10; y: 10; width: 480+ params: root.params+ namePrefix: "t-beauty"+ detection: ({quality: 1, maxFaces: 4, stability: 0.5})+ status: "检测到 1 张人脸"+ onEdited: (key, amount) => { const next = root.edits.slice(); next.push({key: key, amount: amount}); root.edits = next }+ onPresetPicked: preset => { const next = root.presets.slice(); next.push(preset); root.presets = next }+ onDetectionEdited: (key, amount) => { const next = root.detectionEdits.slice(); next.push({key: key, amount: amount}); root.detectionEdits = next }+ }+ // The list group's shared panel: created detection-only, as ProPage does.+ BeautyEditor {+ id: shared+ x: 10; y: 900; width: 480+ params: ({})+ namePrefix: "t-shared"+ detectionOnly: true+ status: "未检测到人脸"+ }+ TestCase {+ name: "BeautyEditor"+ when: windowShown+ function init() {+ root.edits = []; root.presets = []; root.detectionEdits = []; root.params = root.off+ editor.showDetection = true; editor.detectionOnly = false+ }+ function withParams(changes) {+ const p = Object.assign({}, root.off)+ for (const k in changes) p[k] = changes[k]+ root.params = p+ }+ function child(name) { const c = findChild(editor, "t-beauty-" + name); verify(c !== null, name); return c }+ function test_both_off_shows_only_switches() {+ compare(child("preset").visible, true)+ compare(child("restore").visible, true)+ compare(child("smooth").visible, true)+ for (const key of ["restoreStrength", "restoreScope", "regionExpand", "feather", "strength", "smoothAmount",+ "radius", "detail", "texture", "brighten", "scope", "skin-group", "minConfidence", "showMask"])+ compare(child(key).visible, false, key)+ compare(child("detection-group").visible, true)+ compare(child("status").visible, true)+ }+ function test_restore_rows() {+ withParams({restore: true})+ for (const key of ["restoreStrength", "restoreScope", "regionExpand", "feather", "skin-group", "minConfidence", "showMask"])+ compare(child(key).visible, true, key)+ for (const key of ["strength", "smoothAmount", "radius", "detail", "texture", "brighten", "scope"])+ compare(child(key).visible, false, key)+ }+ function test_smooth_rows() {+ withParams({smooth: true, radius: 6.5, scope: 1})+ for (const key of ["strength", "smoothAmount", "radius", "detail", "texture", "brighten", "scope", "skin-group"])+ compare(child(key).visible, true, key)+ compare(child("restoreStrength").visible, false)+ compare(child("radius").value, 6.5)+ compare(child("scope").current, "1")+ }+ function test_switches_send_keys() {+ const restore = child("restore")+ mouseClick(restore, restore.width / 2, restore.height / 2)+ const smooth = child("smooth")+ mouseClick(smooth, smooth.width / 2, smooth.height / 2)+ compare(root.edits.length, 2)+ compare(root.edits[0].key, "restore"); compare(root.edits[0].amount, 1)+ compare(root.edits[1].key, "smooth"); compare(root.edits[1].amount, 1)+ }+ function test_slider_edits_round() {+ withParams({restore: true, smooth: true})+ child("smoothAmount").moved(0.4567)+ child("radius").moved(5.3)+ child("regionExpand").moved(-0.0449)+ compare(root.edits.length, 3)+ compare(root.edits[0].key, "smoothAmount"); fuzzyCompare(root.edits[0].amount, 0.46, 1e-9)+ compare(root.edits[1].key, "radius"); compare(root.edits[1].amount, 5.5)+ compare(root.edits[2].key, "regionExpand"); fuzzyCompare(root.edits[2].amount, -0.04, 1e-9)+ }+ function test_scope_and_preset() {+ withParams({restore: true})+ const scope = child("restoreScope")+ mouseClick(scope, scope.width - 14, scope.height / 2)+ compare(root.edits.length, 1)+ compare(root.edits[0].key, "restoreScope"); compare(root.edits[0].amount, 1)+ child("preset").picked("restoreNatural")+ compare(root.presets, ["restoreNatural"])+ }+ function test_detection_edits() {+ const group = child("detection-group")+ group.expanded = true+ const quality = child("quality")+ mouseClick(quality, quality.width - 14, quality.height / 2)+ child("maxFaces").moved(2.6)+ child("stability").moved(0.333)+ compare(root.detectionEdits.length, 3)+ compare(root.detectionEdits[0].key, "quality"); compare(root.detectionEdits[0].amount, 2)+ compare(root.detectionEdits[1].key, "maxFaces"); compare(root.detectionEdits[1].amount, 3)+ compare(root.detectionEdits[2].key, "stability"); fuzzyCompare(root.detectionEdits[2].amount, 0.33, 1e-9)+ compare(root.edits.length, 0)+ group.expanded = false+ }+ function test_list_layer_and_shared_panel() {+ // A list layer: no detection rows (the group draws them once).+ editor.showDetection = false+ compare(child("detection-group").visible, false)+ compare(child("status").visible, false)+ compare(child("preset").visible, true)+ // The group's shared panel: detection only, opened.+ const part = name => { const c = findChild(shared, "t-shared-" + name); verify(c !== null, name); return c }+ compare(part("preset").visible, false)+ compare(part("restore").visible, false)+ compare(part("detection-group").visible, true)+ compare(part("detection-group").expanded, true)+ compare(part("quality").visible, true)+ compare(part("status").visible, true)+ }+ }+}diff --git a/tests/unit/EffectChainTests.cpp b/tests/unit/EffectChainTests.cppindex faf787d7..4c0caab9 100644--- a/tests/unit/EffectChainTests.cpp+++ b/tests/unit/EffectChainTests.cpp@@ -1303,6 +1303,26 @@ __declspec(noinline) void testBeautySettingsChain() {check(desc->slotOfStep(desc->planStepOf(EffectType::Beauty, 0)) == Slot::SourcePost &&desc->slotOfStep(desc->planStepOf(EffectType::Beauty, 1)) == Slot::Tail && desc->validateFixedExecutionPlan().empty(),"beauty: node mode runs one instance at source size and one in the tail");+ // A node just added (beauty arrives switched off) or switched off at its defaults+ // has no settings instance; the node order still restores it, for AA too.+ auto fresh = std::make_unique<EffectChain>(); fresh->mode = ChainMode::Node;+ const auto addFresh = [&](EffectType type, bool enabled) { auto& n = fresh->nodes[fresh->nodeCount++]; n = ChainNode{}; n.type = type; n.enabled = enabled; };+ addFresh(EffectType::AntiAliasing, false); addFresh(EffectType::SuperResolution, true); addFresh(EffectType::Beauty, false);+ auto freshSettings = std::make_unique<EnhancementSettings>(); fromChain(*fresh, *freshSettings);+ check(!freshSettings->beauty.configured() && !freshSettings->antiAlias.configured(), "untouched nodes: no settings instance");+ const auto freshOrder = runtimeOrder(*fresh);+ auto freshRestored = std::make_unique<EffectChain>();+ check(restoreRuntimeOrder(*freshSettings, *freshOrder, *freshRestored).accepted && freshRestored->nodeCount == 3 &&+ freshRestored->nodes[0] == fresh->nodes[0] && freshRestored->nodes[2] == fresh->nodes[2],+ "untouched nodes: a switched-off default AA and beauty node keep their places in the node order");+ auto twice = *freshOrder; twice.types[twice.nodeCount++] = EffectType::AntiAliasing;+ check(!restoreRuntimeOrder(*freshSettings, twice, *freshRestored).accepted,+ "untouched nodes: an order asking for a second untouched instance is still refused");+ addFresh(EffectType::Beauty, false);+ fromChain(*fresh, *freshSettings);+ check(restoreRuntimeOrder(*freshSettings, *runtimeOrder(*fresh), *freshRestored).accepted &&+ freshRestored->countOf(EffectType::Beauty) == 2, "untouched nodes: two beauty nodes carry their own instances");+for (int i = 0; i < 6; ++i) add(EffectType::Beauty);check(!validateChain(*node).accepted, "beauty: more than six beauty nodes are refused");}