比较提交
50
次代码提交
| 作者 | SHA1 | 提交日期 | |
|---|---|---|---|
|
|
58f09e5756 | ||
|
|
730d1755ca | ||
|
|
2f2c081980 | ||
|
|
2e79602761 | ||
|
|
13821366a5 | ||
|
|
189a5d7634 | ||
|
|
356683b41a | ||
|
|
bea9bdfc0a | ||
|
|
dffa547d92 | ||
|
|
acbe115c8a | ||
|
|
abaea2b1df | ||
|
|
788ba0d551 | ||
|
|
2f7702fa20 | ||
|
|
3c7261c3a8 | ||
|
|
5ac0e5833c | ||
|
|
696d5f39b3 | ||
|
|
906f770805 | ||
|
|
fcfd8b0ddc | ||
|
|
e9fddda5e1 | ||
|
|
a2e33e8e00 | ||
|
|
3f075922cb | ||
|
|
183bf0e4b2 | ||
|
|
2d3edcf0a2 | ||
|
|
53ce88dd15 | ||
|
|
3bb33818ea | ||
|
|
80f22e2285 | ||
|
|
f79d24eb01 | ||
|
|
f4c0d608a4 | ||
|
|
5793e3de49 | ||
|
|
9bebf68e3f | ||
|
|
ad54726b17 | ||
|
|
16525d62e5 | ||
|
|
1008651f6e | ||
|
|
a6551c334f | ||
|
|
abe97ed0cb | ||
|
|
ec22f1b2cf | ||
|
|
2a856c669a | ||
|
|
302dc20c0a | ||
|
|
e03e460a9b | ||
|
|
764994a1c4 | ||
|
|
77d386825c | ||
|
|
22cd96a772 | ||
|
|
71a583e306 | ||
|
|
d561537eed | ||
|
|
dd04a471e1 | ||
|
|
75a16835f2 | ||
|
|
2e59185b32 | ||
|
|
0310ca83ba | ||
|
|
e2803e727f | ||
|
|
f71826b64f |
没有与搜索条件相匹配的文件
+3
@@ -37,3 +37,6 @@ venv/
|
||||
|
||||
# Local reference binaries stay outside source history
|
||||
reference-binaries/
|
||||
|
||||
# Reviewed signed release installer (intentional distribution artifact)
|
||||
!releases/1.2.0/*.pkg
|
||||
二进制文件未显示。
|
之后 宽度: | 高度: | 大小: 2.6 MiB |
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 Dayu
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,28 +1,66 @@
|
||||
# PaintFCP FxPlug4
|
||||
# 大鱼人像美化 · beatygril
|
||||
|
||||
独立 FxPlug4 滤镜程序源码工程。修改前的 `beatygril` 是 Apple Tileable Remote Brightness 模板;在此基础上实现新的滤镜。第三方参考 APP、二进制和资源不进入仓库。
|
||||
基于本仓库的 FxPlug4 初始工程制作的人像美化滤镜,支持 Motion 和 Final Cut Pro。源码使用 Objective-C、Vision、Core Image 与 Metal。
|
||||
|
||||
## 工程
|
||||
代码由 OpenAI + Codex 全程编写,站长仅参与调试和测试。
|
||||
|
||||
- `beatygril/beatygril.xcodeproj`:Xcode 工程,`Wrapper Application` 与 `XPC Service` 两个 target。
|
||||
- `beatygril/beatygril/Plugin`:Objective-C `FxTileableEffect` 实现、Metal GPU shader 和设备缓存。
|
||||
- `beatygril/beatygril/Wrapper Application`:插件外层 APP 和沙盒 entitlement。
|
||||
- 原始参数:Brightness,默认 1.0,参数范围 0–100,滑块范围 0–10;RGB 乘亮度、Alpha 保持。
|
||||
功能包括磨皮、肤色、细节、牙齿美白、眼睛提亮、九类脸型调整、自动人脸跟随和多人处理。原版 MSE18V2 的静态分析依据、近似实现与尚未对齐的部分见 [分析说明](docs/analysis/REA-分析与复刻说明.md)。本版尚未完成原版逐像素与复杂运动跟踪对照。
|
||||
|
||||
## 本机依赖与构建入口
|
||||
## 使用
|
||||
|
||||
盘点环境:Xcode 27.1(27A9275),FxPlug.framework 4.3.4、PluginManager.framework 1.7.4;附加 SDK 为 `/Library/Developer/SDKs/FxPlug.sdk`。SDK 内含开发 headers,运行 framework 位于 `/Library/Developer/Frameworks`。项目初始最低部署目标为 macOS 27.2。
|
||||
正式安装路径为 `/Library/Plug-Ins/FxPlug/beatygril.app`。Motion 滤镜分类为「大鱼」,滤镜名「大鱼人像美化」。Final Cut Pro 在「效果 → 大鱼磨皮瘦脸 → 大鱼人像美化」中使用配套 Motion 效果,模板目录必须同时保留 `.moef` 与 `Drop Zone.tiff`。美化会随当前帧的人脸自动更新,不需要点击分析。界面以磨皮、美白、瘦脸三张卡片呈现,默认跟随主要人脸;多人模式对多脸变形。单项眼睛可暂时停用并保留数值,右侧箭头恢复默认;磨皮半径、饱和度、锐化和整体混合等收在「更多设置」。旧手动分析与调试参数仅保留隐藏兼容,实际输出统一使用实时自动跟随。
|
||||
|
||||
1.3.0 的磨皮卡片依次提供「磨皮程度、微细锐化、五官保护、非肤色区保护」。两种保护默认 100%;降低五官保护让五官区域参与更多磨皮,降低非肤色区保护则扩大磨皮范围,均不扩大肤色提亮范围。微细锐化在局部支持区域恢复纹理;旧全局磨皮和全局锐化仍保留在更多设置,旧工程的参数与归档继续兼容。迁移证据、实现边界与验证见[新版磨皮参数迁移](docs/analysis/新版磨皮参数迁移.md)。1.3.0(15)APP 已完成签名、公证及正式安装,1636 项自动检查通过;原生宿主效果由用户实测。1.2.0 下载链接仍对应原发行包,本次未更新文章或安装包。
|
||||
|
||||
## 开发和恢复
|
||||
|
||||
需要 Xcode 27.1、FxPlug SDK 4.3.4 与 PluginManager 1.7.4;最低运行系统 macOS 13。正式产物为 arm64/x86_64 通用版本。
|
||||
|
||||
```sh
|
||||
xcodebuild -list -project beatygril/beatygril.xcodeproj
|
||||
xcodebuild -project beatygril/beatygril.xcodeproj \
|
||||
-scheme 'Wrapper Application' -configuration Release \
|
||||
-derivedDataPath /tmp/paintfcp-build \
|
||||
CODE_SIGN_STYLE=Manual \
|
||||
CODE_SIGN_IDENTITY='Developer ID Application: zhong luo (B3W25FX5H5)' \
|
||||
DEVELOPMENT_TEAM=B3W25FX5H5 build
|
||||
./scripts/test.sh
|
||||
PAINTFCP_HOST_ASAN=1 ./scripts/test-host.sh
|
||||
PAINTFCP_OSC_ASAN=1 ./scripts/test-osc.sh
|
||||
xcodebuild -project beatygril/beatygril.xcodeproj -scheme 'Wrapper Application' -configuration Release -derivedDataPath /tmp/paintfcp-build -destination 'generic/platform=macOS' build
|
||||
```
|
||||
|
||||
初始工程复制并签名 FxPlug 与 PluginManager 两个 framework;正式交付必须依次完成 Release 构建、内到外签名、Apple 公证 Accepted、票据粘附与验证、唯一正式路径安装及宿主发现验证。初始基线仅核验工程可读取和依赖,不代表已完成构建或交付。
|
||||
工程从 `/Library/Developer/SDKs/FxPlug.sdk` 读取头文件与链接信息,从 `/Library/Developer/Frameworks` 嵌入可运行的 Apple 框架。构建默认使用团队 B3W25FX5H5 的 Developer ID Application 身份;正式交付使用 `python3 scripts/deliver.py` 完成公证、粘附和安装;安装前先关闭 Motion 与 FCP,脚本在检测到宿主仍运行时保留原安装版并停止。原生验收完成后继续脚本的清理阶段,清除临时注册与 APP 副本。
|
||||
|
||||
参考 [RECOVERY.md](RECOVERY.md) 恢复源码与依赖。签名证书、私钥和公证凭据均由本机钥匙串管理,不随源码保存。
|
||||
公开源码:[GitHub · FCP-BeatyGril](https://github.com/FAMEDaYu/FCP-BeatyGril)。大鱼站备份:`https://dayu.media/git/dayu/paintfcp-fxplug.git`。恢复入口见 [RECOVERY.md](RECOVERY.md),当前验证记录见 [验证记录](docs/验证记录.md)。原始模板保存在 `baseline-20261021` 标签。
|
||||
|
||||
继续开发或移交时先读[项目交接文档](docs/项目交接.md),包含当前发布状态、源码入口、坐标与交互约定、验收边界,以及签名打包和双远端保存流程。
|
||||
|
||||
## 1.0.5 瘦脸修复
|
||||
|
||||
瘦脸现固定使用Vision revision 3的76点配置,以17组轮廓到鼻部/瞳孔锚点的局部逆向采样替代脸框水平挤压,包含原版尺寸增益与滑块强度映射。完整点阵贯通实时稳定与离线存储;旧分析记录没有完整76点时跳过瘦脸,重新分析可补齐。其他脸型项仍使用原有近似实现,不能将本次对齐扩张为全部脸型逐像素等价。
|
||||
|
||||
离屏验证新增224项:含48组脸部投影/尺寸/歪头与独立17-pin数值场对照、数据恢复和缺点保护;完整回归604项通过。Motion/FCP界面由用户自测。可运行 `python3 scripts/deliver.py --wait-for-hosts --user-tests`,签名公证后只读等待宿主自然退出,安装验证与清理无需操作宿主界面。
|
||||
|
||||
## 1.0.6 下巴与图像坐标修复
|
||||
|
||||
下巴改为76点中68→38、67→37、66→36的三组局部位移,正值上收、负值延伸,保留原版正负不同系数及尺寸增益。Core Image/IOSurface输入输出移除按TOP_LEFT额外翻转,和原版图像链对齐。修复依据与离屏复现见[下巴与坐标分析](docs/analysis/下巴与坐标分析.md)。七类其余脸型项仍是近似实现。
|
||||
|
||||
旧版分析记录无法区分是否包含额外翻转,新版保留原字符串但暂用实时跟随;重新分析即可写入新坐标标记并恢复离线跟踪。最终Motion/FCP画面由用户自行测试。
|
||||
|
||||
1.0.6(8)已完成正式签名、Apple公证、票据、安装和模板同步。904项完整回归及独立远程恢复核验通过;最终宿主视觉由用户自测。交付回执在`docs/verification/v1.0.6/`,恢复标签为`v1.0.6`。
|
||||
|
||||
## 1.1.0 原生卡片面板
|
||||
|
||||
使用AppKit自绘卡片、滑块和开关,原生数值输入、肤色圆点、单项/分组启停及重置。FCP仅发布自定义面板210和两项版权信息,撤掉平铺参数与手动分析板块。新面板使用独立NSSecureCoding状态对象完整保存设置,支持复制、撤销数据和数值插值;未编辑时保持旧文档参数值。旧分析数据不参与实时渲染。
|
||||
|
||||
`./scripts/test-inspector.sh`验证参数路由、保存恢复、事务、绕过/重置和离屏布局;`python3 scripts/inspector-template.py audit Templates/大鱼人像美化/大鱼人像美化.moef`验证模板自定义数据和发布入口。离屏截图和模拟宿主检查不能替代Motion/FCP的实际嵌入、键盘/VoiceOver和工程重开验收,仍由用户自测。完整1039项回归通过,Inspector/宿主适配/OSC启用ASan。离屏演示图见[面板预览](docs/verification/v1.1.0/inspector-preview.png)。1.1.0(9)已完成通用Release正式签名、Apple公证、票据粘附、唯一正式目录安装及配套模板同步。签名源码`f79d24eb0185f31feaae58b83b632f92dcb3ca91`的111文件及16项必要资源已独立远端恢复核验,clone内134项Inspector ASan和模板审计通过。
|
||||
|
||||
正式安装回执见`docs/verification/v1.1.0/installed-verification.json`,恢复标签为`v1.1.0`。签名、票据、Gatekeeper、双架构身份、PluginKit正式路径及配套模板字节核验通过;已清理本次临时APP、旧APP备份和公证ZIP。有界扫描只发现正式路径的产品外层APP,未把该范围表述为所有卷的完整扫描。未操作Motion/FCP界面,实际面板嵌入与工程重开由用户自测。
|
||||
|
||||
## 1.1.2 面板交互与下半脸定位修复
|
||||
|
||||
面板改为先在真实视图的宿主 action 内取得读写接口,修复控件一直禁用的问题。短脸改用76点下半脸闭合区域和鼻梁位移轴,下颌骨改为六组相邻轮廓半径的局部位移,移除旧脸框近似场;详见[分析](docs/analysis/短脸与下颌骨分析.md)。其余五项脸型仍保留近似实现,不能将局部算法恢复视为全部效果逐像素一致。
|
||||
|
||||
1551项回归通过,含335项宿主适配、98项OSC和157项面板ASan检查;28种控制/原点组合均核验实际解剖位置,改变原点标签时逐字节一致。额外真实帧ASan专项886项通过,含重复基础用例。1.1.2(13)已完成正式签名、公证、票据、唯一正式路径安装及副本清理。Motion/FCP原生数值、重置和隔离画面响应已验证,Motion保存重开与撤销通过;用户于2026-10-22实测确认“拖动中已持续更新”;未指定测试宿主,不扩张为两个宿主分别完成动态排帧验收。连续步进在松手前提交已通过独立模拟宿主验证,不能将它等同于每个鼠标事件都排出一帧。
|
||||
|
||||
## 1.2.0 免费开源发布
|
||||
|
||||
采用 MIT 许可(第三方资源边界见 THIRD_PARTY_NOTICES.md)。安装包同时包含唯一正式 FxPlug4 APP 和 FCP 效果模板;自动注册,无需账号、激活码或付费激活。主 APP 显示古风说明图,窗口显示三秒后自动退出,不影响独立的宿主插件服务。封面人物是生成的宣传插画,非效果前后对比。
|
||||
|
||||
`large.png`(640×360)和 `small.png`(192×108)与 `.moef` 同目录,安装器安装后重新锁定。手动复制或从 Git 恢复模板时,需对这两个 PNG 重新执行 `chflags uchg`,不能锁定整个模板目录。FCP 当前分类为「大鱼磨皮瘦脸」,Motion 原生滤镜分类仍为「大鱼」。
|
||||
|
||||
GitHub 提供公开源码、提交历史和版本标签;[1.2.0 Release](https://github.com/FAMEDaYu/FCP-BeatyGril/releases/tag/v1.2.0) 提供正式签名公证安装包。大鱼站 Git 备份仍受站点登录与会员网关限制,发布文章另提供公开源码快照;安装包始终免费。
|
||||
+99
-3
@@ -1,9 +1,10 @@
|
||||
# 恢复说明
|
||||
|
||||
- 私有远程:`https://dayu.media/git/dayu/paintfcp-fxplug.git`
|
||||
- 大鱼备份远程(origin):`https://dayu.media/git/dayu/paintfcp-fxplug.git`
|
||||
- GitHub 公开远程(github):`https://github.com/FAMEDaYu/FCP-BeatyGril.git`
|
||||
- 本地项目根:`/Users/dayu/Documents/PaintFCP`
|
||||
- 工作分支:`main`
|
||||
- 修改前版本标签:`baseline-20261021`(完整 SHA 在后续恢复核验记录补充)
|
||||
- 修改前版本标签:`baseline-20261021`,完整 SHA:`1746f38398588e2367abb37a5c2b31cb64042429`
|
||||
- 无 Git LFS 或子模块;源码及必要 Xcode 工程资源均入库。
|
||||
- `/Applications/MSE18V2.app` 是只读参考目标,不属于本项目资源,不随仓库保存。
|
||||
|
||||
@@ -12,9 +13,104 @@
|
||||
```sh
|
||||
git clone https://dayu.media/git/dayu/paintfcp-fxplug.git
|
||||
cd paintfcp-fxplug
|
||||
git switch --detach baseline-20261021
|
||||
git switch --detach v1.2.0
|
||||
```
|
||||
|
||||
需要继续编辑时,基于该提交创建新分支。安装 Xcode 与 Apple FxPlug 4 SDK;盘点版本和构建入口见 README.md。SDK/framework 为 Apple 外部开发依赖,应重新安装匹配版本。证书、私钥和公证凭据需从独立加密备份恢复或重新申请;Git 不包含它们。
|
||||
|
||||
恢复承诺仅覆盖已成功推送且核验的提交与仓库内资源。大鱼服务当前只有手动服务端备份,不能据此承诺本机与服务器同时丢失后的恢复。
|
||||
|
||||
## 首次远端恢复核验(2026-10-21)
|
||||
|
||||
已在本任务创建的独立临时目录从远端克隆 `baseline-20261021`,核验 HEAD 为 `1746f38398588e2367abb37a5c2b31cb64042429`,并与本地该提交的 23 个受跟踪文件逐字节比对一致;恢复目录可通过 `xcodebuild -list` 读取两个 target / scheme。远端 `main` 与标签解引用 SHA 均回读一致。临时恢复目录已清理。
|
||||
|
||||
初始模板存在行尾空白,修改前基线保留原样。本次核验未执行初始 APP 编译、签名、公证、安装或宿主加载;这些将由最终实现阶段单独验证。
|
||||
|
||||
## 1.0.4 恢复入口
|
||||
|
||||
最终交付标签为 `v1.0.4`,工作分支为 `main`;本次实际编译和独立恢复测试的代码节点为完整 SHA `e03e460a9b3e5ad489aad24095485ba10ceb987d`。最终标签还包含验证文档。需要精确恢复已测试源码时可执行 `git switch --detach e03e460a9b3e5ad489aad24095485ba10ceb987d`。两者都保留初始模板及全部中间提交。
|
||||
|
||||
依赖:Xcode27.1、FxPlug SDK4.3.4、PluginManager1.7.4,系统最低macOS13;Metal与Vision由系统提供。SDK头文件/链接存根安装到 `/Library/Developer/SDKs/FxPlug.sdk/Library/Frameworks`,可执行运行框架在 `/Library/Developer/Frameworks`;不要把SDK链接存根当运行框架嵌入APP。两者属于需重新安装的Apple外部依赖,仓库不保存证书/私钥或登录凭据。
|
||||
|
||||
测试与通用Release构建命令见README。关闭Motion和FCP后,执行 `python3 scripts/deliver.py` 完成正式签名、公证、粘附、唯一目录安装与验收后的副本清理;签名团队为B3W25FX5H5,公证使用登录钥匙串profile `codex-dayu-notary-B3W25FX5H5`。新机器需要自行恢复凭据或重新签发,不要把凭据加入Git。
|
||||
|
||||
FCP模板从 `Templates/大鱼人像美化/` 恢复,将 `.moef` 和 `Drop Zone.tiff` 一起放入 `~/Movies/Motion Templates.localized/Effects.localized/大鱼/大鱼人像美化/`;只放 `.moef` 会缺少标准效果源输入资源。正式APP仅安装在 `/Library/Plug-Ins/FxPlug/beatygril.app`,不是从工作树或构建目录运行。没有LFS或子模块,必要工程资源、NASA测试人像及配套模板资源均在Git中。
|
||||
|
||||
用户用于宿主验收的外置卷视频及build内的验收工程/截图属于测试素材与可重建产物,不属于产品构建依赖,也没有远程上传。原MSE18V2 APP与原版MS模板仅为只读参考,不作为运行依赖。远端恢复记录及实际宿主测试范围见 `docs/验证记录.md`。
|
||||
|
||||
## 瘦脸与侧脸问题的分析节点
|
||||
|
||||
`v1.0.4`之后的分析提交包含`docs/analysis/脸型变形与转脸分析.md`、`slim-pose-report.json`、REA证据包及独立Vision离线检测工具`scripts/inspect-face-geometry.m`。产品源码与安装版没有因该分析改变;已查明的问题仍存在于1.0.4。复现检测工具的依赖与命令见分析文档,用户视频、完整人脸坐标和帧图保留本地,不是产品恢复依赖。
|
||||
|
||||
## 1.0.5 当前恢复入口
|
||||
|
||||
当前发布标签为 `v1.0.5`,APP版本1.0.5、build7。签名构建的完整源码SHA为 `abe97ed0cbd5a2b5ffda6ebdb486d3bff9170964`;最终标签还包含交付脚本恢复修正及验证记录,产品源码与该SHA一致。该节点已从独立远端克隆恢复,69文件及9项必要资源完整、389项核心测试通过。主工作区另通过604项完整回归及同一用户视频11帧的264项瘦脸ASan场景。
|
||||
|
||||
从最终标签恢复后,关闭Motion/FCP,运行 `python3 scripts/deliver.py --wait-for-hosts --user-tests` 可完成签名公证安装、只读宿主退出等待、静态发现及副本清理;它不会操作宿主界面。若上次因非产品错误在Accepted且stapled后停止,可加 `--resume-prepared`,脚本必须重新核对签名CDHash、版本、票据及产品源码未变才会继续。缺少原staging或回执时应完整重新构建,不能伪造回执。
|
||||
|
||||
1.0.5瘦脸需要完整76点;旧离线记录缺该字段时保留其余功能并跳过瘦脸。关闭使用跟踪数据可使用当前帧自动76点,或重新分析生成新记录。没有引入原版metallib或CoreML模型,运行只依赖本产品及Apple系统框架。最终安装、配套模板和扫描范围见验证记录。
|
||||
|
||||
## 1.0.6 恢复入口
|
||||
|
||||
本次签名构建源码SHA为`ad54726b17fabd11f46bc6121e664eac38960a23`,APP版本1.0.6、build8;最终发布标签为`v1.0.6`。恢复该SHA可重建相同产品源码,最终标签另包含交付文档与回执。Release恢复仍用上节同一构建/公证命令、固定Bundle ID和正式安装路径;用户自测模式不会操作Motion/FCP界面。
|
||||
|
||||
新增下巴三pin与图像适配轴修复;新分析档案使用`hostCoordinateSpace=iosurface-ci-y-up-v1`。旧未标记档案保留原字符串但回退实时跟随,重新分析后才能用于离线重放,不能直接补字段伪装成新档案。七类剩余脸型项及组合顺序仍有近似边界。
|
||||
|
||||
`ad54726b17fabd11f46bc6121e664eac38960a23`已独立从上述远程克隆,87文件的byte/blob/mode与14项资源一致,strict/full fsck和559项核心测试通过,无LFS、子模块或APP产物。临时恢复目录已清理,完整报告见`docs/verification/v1.0.6/recovery-ad54726.json`。
|
||||
|
||||
1.0.6已完成正式签名、公证(Accepted ab0271c8-0c4b-4b10-9474-cebe9b55385b)、票据粘附、唯一正式目录安装和配套模板同步;临时APP/旧备份APP/公证ZIP已清理。完整回执及有界副本扫描见`docs/verification/v1.0.6/installed-verification.json`。未操作Motion/FCP界面,最终视觉验收保留为用户自测。
|
||||
|
||||
## 1.1.0 面板与自动处理
|
||||
|
||||
1.1.0(9)使用自有原生卡片面板和PGInspectorState安全归档。源代码、面板资源(全部程序绘制)、Motion模板与自有自定义参数数据均在仓库;新增`./scripts/test-inspector.sh`及`scripts/inspector-template.py audit`验证入口。恢复时需完整保留`.moef`中的自定义参数210、实际dataValue/defaultVal和两项版权发布;不要删掉仍用于旧工程迁移的隐藏参数定义和组路径。不得拿其他插件的自定义归档替换本产品自己的归档。
|
||||
|
||||
新渲染统一实时自动人脸跟随,旧手动分析数据仍保存在旧文档中但不参与本版渲染;主界面不再显示前后分析、目标列表、蒙版调试与平铺控件。三张卡片之外的细调收在更多设置。自定义对象保存完整界面状态,首次编辑前兼容旧参数;数值、开关、启停mask按已测试的复制/插值规则恢复。真实宿主UI及工程重开仍需用户自测。
|
||||
|
||||
正式构建、公证、安装仍使用同一`python3 scripts/deliver.py --wait-for-hosts --user-tests`,保持固定Bundle ID与APP路径,仅在用户自行退出Motion/FCP后替换,最终版本节点与回执随交付记录补齐。
|
||||
|
||||
兼容边界:未编辑面板时读取旧文档原参数;首次编辑会把当前数值采集为完整面板状态。旧版各项独立关键帧曲线尚未自动迁移为新面板关键帧,不宣称编辑前后任意旧动画逐帧等价。面板本身的数值插值与开关保持已做离屏验证,实际宿主关键帧交互仍待用户测试。
|
||||
|
||||
1.1.0签名构建源码为完整SHA`f79d24eb0185f31feaae58b83b632f92dcb3ca91`,源码工作区在构建时干净。该节点已独立从大鱼远程克隆,111文件的bytes/blob/mode及16项必要资源一致,strict/full fsck、134项Inspector ASan和模板审计通过,无LFS或子模块,临时克隆已清理。报告见`docs/verification/v1.1.0/recovery-f79d24e.json`。Apple公证Accepted(ce26be63-9dcd-436a-bcb5-bd294fcc92a9)和票据验证已通过;安装前曾等待用户自行退出宿主,随后完成下述正式替换。
|
||||
|
||||
1.1.0(9)现已安装到固定正式路径;APP与嵌套插件为arm64/x86_64通用版本,Developer ID团队、可信时间戳、Hardened Runtime、严格签名、公证票据、Gatekeeper及PluginKit正式路径全部核验通过。配套`.moef` SHA256为`e1c0cff1dd3541ed97cab2cb39a76ad4f28dc659b3be7991cc7ac92dd8ea090b`,和TIFF一起同步到正式模板目录并逐字节核对。本次临时/旧APP及公证ZIP已清理;扫描范围和回执在`docs/verification/v1.1.0/`。最终恢复标签为`v1.1.0`,后续记录提交不改变签名产品源码f79d24e。原生UI和视觉仍由用户自测。
|
||||
|
||||
交付偏好(2026-10-21用户明确更新):后续本产品安装需释放Motion时,可直接结束Motion进程,不再重复请求保存退出;用户说明不在Motion里进行工作。保持不自动操作Motion/FCP界面的约定。本次检查时两个宿主已经退出,没有执行强退。
|
||||
|
||||
## 1.1.2 合并修复准备
|
||||
|
||||
版本1.1.2(13)合并面板action上下文修复和76点短脸/下颌骨局部场。构建/恢复依赖、正式路径、签名公证入口保持不变;自动检查1551项及额外886项真实帧ASan专项通过。原生验收使用build/native-112独立Motion副本,用户素材、截图和完整AX数据不随源码上传。用户已明确授权接手Motion/FCP进行测试;先前不操作界面的偏好已被本次授权更新。
|
||||
|
||||
## 1.1.2 正式恢复入口
|
||||
|
||||
发布标签`v1.1.2`,版本1.1.2(13),正式签名源码完整SHA为`a2e33e8e00a99b95dc29d67a819cb0897eda5756`;后续交付记录不改变产品源码。独立远程恢复核验149个文件的bytes/blob/mode、16项资源、strict/full fsck和157项Inspector ASan全部通过,无LFS或子模块。恢复依赖与构建入口同前文;`PAINTFCP_INSPECTOR_ASAN=1 ./scripts/test-inspector.sh`可运行新增数值焦点与每步预览检查。
|
||||
|
||||
正式Release已使用固定团队逐层签名,Apple公证Accepted `5f5ce378-8430-467b-ae97-048e6bc81573`,票据、Gatekeeper、通用架构和PluginKit正式路径全部通过。唯一正式安装APP为`/Library/Plug-Ins/FxPlug/beatygril.app`,模板moef SHA256为`e9fa97dc14323d0daa7d3d61b06a78ba4000a70ab9f5e67ebffd750d49df1e15`,TIFF逐字节一致。临时APP、旧APP和公证ZIP已清理,有界目录及现存Spotlight索引产品路径中仅发现正式APP,扫描错误0,不宣称扫描了所有卷。
|
||||
|
||||
Motion/FCP原生验收范围及未完成项见`docs/verification/v1.1.2/native-qa.json`:数值、重置、隔离短脸/下颌骨响应通过;Motion撤销和保存关闭重开通过。连续步进已改为每步完整宿主action,模拟宿主确认鼠标松开前可发布中间设置;用户于2026-10-22实测确认拖动中持续更新;未指定宿主,未测量逐事件排帧时序。后续人脸素材和全AX只保留本机build,不是产品依赖或上传资源。
|
||||
|
||||
最终标签`v1.1.2`完整提交SHA为`e9fddda5e13042f761755762fa39dfe090853c6a`,已独立从远端恢复,158文件的bytes/blob/mode与strict/full fsck通过,产品目录与签名源码a2e33e8逐字节一致,无LFS或子模块,恢复临时目录已清理。详见`docs/verification/v1.1.2/final-tag-recovery.json`;后续main仅补充恢复报告和用户验收记录,产品源码保持不变。
|
||||
|
||||
## 1.2.0 恢复入口
|
||||
|
||||
源码构建节点为 `696d5f39b30404ed5d1d4c25f61d17475c7fc91b`,版本1.2.0(14)。使用同一 Apple SDK、签名团队与正式安装路径;本次仅改变外层启动器、版本及宣传资源,渲染和面板保留1.1.2验收实现。最终安装包和验证记录随 `v1.2.0` 保存。无 LFS / 子模块。正式 APP 只保留 `/Library/Plug-Ins/FxPlug/beatygril.app`;源代码不包含私钥。
|
||||
|
||||
模板恢复到 `~/Movies/Motion Templates.localized/Effects.localized/大鱼磨皮瘦脸/大鱼人像美化/`,需同时保留 `.moef`、`Drop Zone.tiff`、`large.png`、`small.png`。Git 不保存 BSD 文件标志,手工复制后对两张 PNG 执行 `chflags uchg` 并核对 `ls -lO`;不要锁目录和工程。自动安装 PKG 会恢复这两个锁。
|
||||
|
||||
仓库已为公开属性,但当前网站 Git 网关仍执行登录 / 会员校验。匿名 `ls-remote` 未通过,不宣称无需登录的 Git 恢复已通过;认证的远端克隆和文章的公开源码快照分别核验。服务端备份边界与前文相同。
|
||||
|
||||
1.2.0 的最终标签完整 SHA 为 `3c7261c3a861b9f4704cfb36055d7b500c239dab`,已从认证远端独立克隆恢复并比对183个受跟踪文件,strict/full fsck、Xcode工程读取、恢复出的PKG签名和票据验证通过。正式PKG SHA-256 为 `5bd77c28b3a7e54f3d4060be1f16bcb145d9bc4d6b9cfb9eb137c01130440243`。后续main修正发布助手和补充文档,不改变已签名产品源码696d5f3或正式包。
|
||||
|
||||
公开文章:https://dayu.media/15593/ ,包含免费安装包、免登录源码快照与仓库链接。源码快照对应 `788ba0d5514595cf349af33074055d70b0754185`;它包含完整构建源码,排除PKG二进制,不包含Git历史。完整历史可从仓库恢复,仍需满足当前站点Git网关登录条件。
|
||||
|
||||
## GitHub 公开恢复副本
|
||||
|
||||
GitHub 远端 `https://github.com/FAMEDaYu/FCP-BeatyGril.git` 已完成完整历史与七个标签的推送,`origin` 及其 main 上游保持大鱼仓库。独立匿名克隆恢复节点为 `356683b41af702d6c0143ad7fa5f540d752d6e14`,197 文件逐字节核验、strict/full fsck 和全部标签回读通过。后续 main 补充发布说明与验证文档,产品源码保持相同。GitHub Release 的公证安装包已匿名下载核对哈希、签名和票据。详见 `docs/GitHub同步说明.md` 和 `docs/verification/github/`。
|
||||
|
||||
|
||||
## 1.3.0 新面板参数恢复
|
||||
|
||||
签名源码节点 `2f2c081980dc610ac810f8daf92da8966f310802` 已推送并读回核验 origin 与 github 的 `codex/new-beauty-controls` 分支。两个远端地址沿用本文既有配置。独立远端克隆与 strict/full fsck、205 个受跟踪文件逐字节比较通过,见 `docs/verification/v1.3.0/recovery-verification.json`。无 LFS、子模块;依赖与签名凭据仍需单独恢复。
|
||||
|
||||
本节点增加五官保护强度、非肤色区保护和局部微细锐化,PGBeautySettings v2 兼容旧 160 字节 v1 状态,面板归档仍为 schema 1。测试命令不变,1636 项通过。恢复签名源码时克隆并切换该分支,或 `git switch --detach 2f2c081980dc610ac810f8daf92da8966f310802`。
|
||||
|
||||
1.3.0(15)已正式安装到 `/Library/Plug-Ins/FxPlug/beatygril.app`。签名、通用架构、公证票据、Gatekeeper 和 PluginKit 正式路径均通过,已清理本次构建、旧 APP 备份和公证 ZIP。最终回执见 `docs/verification/v1.3.0/delivery-receipt.json`、`installed-verification.json`;`prepared-release.json` 保留安装前状态。`v1.3.0` 标签包含签名源码及后续交付文档。本次没有生成新 PKG 或更新文章,1.2.0 的公开发行资料继续有效;新滑杆的原生宿主视觉仍由用户测试。
|
||||
@@ -0,0 +1,12 @@
|
||||
# 第三方资料与许可边界
|
||||
|
||||
代码由 OpenAI + Codex 全程编写,站长仅参与调试和测试。项目代码、脚本及文档按根目录 MIT License 提供。署名 Dayu 不表示第三方代码、样本与 SDK 的版权转移。
|
||||
|
||||
- Apple FxPlug / PluginManager SDK 和随正式插件分发的运行框架属于 Apple;受 Apple 相应 SDK 与再分发条款约束,源码仓库不包含这些框架。编译需自行安装 Xcode 与 FxPlug SDK。macOS Vision、AppKit、CoreImage 属于系统组件。
|
||||
- `Templates/大鱼人像美化/Drop Zone.tiff` 是 Motion 工程的标准占位资源,随模板保留;不将其声明为 Dayu 原创作品或另行授予 MIT 权利。
|
||||
- `tests/fixtures/astronaut.png` 来源于 NASA 的 Eileen Collins 图像,经 scikit-image 样本分发,详见同目录 ATTRIBUTION.txt。相关分析预览由该公开样本生成。
|
||||
- `docs/analysis` 中的对照分析、符号和反汇编摘录是互操作研究材料,不包括目标商业 APP、模型或 metallib。MIT 不为其原权利人的内容重新授权。本项目不声称与目标商业插件的模型或画面逐像素一致。
|
||||
- `Assets/Artwork/portrait-cover.png`、APP 中 `LauncherInfo.png` 及两张模板缩略图由内置图像生成工具创作。人物为虚构成年古风人物,封面是宣传插画,不是真实滤镜前后效果对比;生成说明和提示词见 `docs/design`。未使用目标插件的宣传人像。
|
||||
- 不包含用户测试素材、用户工程、真实人脸坐标数据、签名私钥、公证密码或账号令牌。签名证书与公证凭据不属于源码恢复范围。
|
||||
|
||||
免费发布版本无需激活码、付费注册或联网授权。安装时执行系统插件注册;主 APP 打开后显示说明并在三秒后退出,宿主内的 FxPlug 服务独立运行。
|
||||
二进制文件未显示。
@@ -0,0 +1,657 @@
|
||||
{
|
||||
"version": "1.1.0",
|
||||
"pluginUUID": "FB14B0E6-59B2-4836-916F-CD0C559E9241",
|
||||
"filterObject": "510000005",
|
||||
"visiblePublished": 1,
|
||||
"parameters": [
|
||||
{
|
||||
"id": 210,
|
||||
"name": "",
|
||||
"channel": "./210",
|
||||
"kind": "custom-archive",
|
||||
"class": "PGInspectorState",
|
||||
"published": true,
|
||||
"hasEdits": false,
|
||||
"schema": 1,
|
||||
"templateFlags": "12901679104",
|
||||
"panelCards": [
|
||||
"磨皮",
|
||||
"美白",
|
||||
"瘦脸"
|
||||
],
|
||||
"secondarySection": "更多",
|
||||
"valueStorage": "Own secure keyed archive; Custom Data inside BlindDataObject, DataIsLegacy=false",
|
||||
"nativeLoadingValidation": "pending user"
|
||||
},
|
||||
{
|
||||
"id": 70,
|
||||
"name": "启用磨皮",
|
||||
"group": 100,
|
||||
"channel": "./100/70",
|
||||
"kind": "bool",
|
||||
"default": 1,
|
||||
"value": 1,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"name": "磨皮强度",
|
||||
"group": 100,
|
||||
"channel": "./100/1",
|
||||
"kind": "float",
|
||||
"default": 1,
|
||||
"value": 1,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": "中频磨皮",
|
||||
"group": 100,
|
||||
"channel": "./100/12",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0.5,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "磨皮半径",
|
||||
"group": 100,
|
||||
"channel": "./100/3",
|
||||
"kind": "float",
|
||||
"default": 8,
|
||||
"value": 8,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"name": "保护五官",
|
||||
"group": 100,
|
||||
"channel": "./100/30",
|
||||
"kind": "bool",
|
||||
"default": 1,
|
||||
"value": 1,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 71,
|
||||
"name": "启用肤色",
|
||||
"group": 101,
|
||||
"channel": "./101/71",
|
||||
"kind": "bool",
|
||||
"default": 1,
|
||||
"value": 1,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 42,
|
||||
"name": "肤色风格",
|
||||
"group": 101,
|
||||
"channel": "./101/42",
|
||||
"kind": "popup",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12901744656"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "肤色提亮",
|
||||
"group": 101,
|
||||
"channel": "./101/2",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"name": "肤色色相",
|
||||
"group": 101,
|
||||
"channel": "./101/14",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"name": "肤色饱和度",
|
||||
"group": 101,
|
||||
"channel": "./101/15",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 41,
|
||||
"name": "均匀肤色",
|
||||
"group": 101,
|
||||
"channel": "./101/41",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"name": "牙齿美白",
|
||||
"group": 101,
|
||||
"channel": "./101/31",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 32,
|
||||
"name": "眼睛提亮",
|
||||
"group": 101,
|
||||
"channel": "./101/32",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 73,
|
||||
"name": "启用细节",
|
||||
"group": 102,
|
||||
"channel": "./102/73",
|
||||
"kind": "bool",
|
||||
"default": 1,
|
||||
"value": 1,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"name": "高频细节平滑",
|
||||
"group": 102,
|
||||
"channel": "./102/17",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "锐化",
|
||||
"group": 102,
|
||||
"channel": "./102/4",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 72,
|
||||
"name": "启用脸型",
|
||||
"group": 103,
|
||||
"channel": "./103/72",
|
||||
"kind": "bool",
|
||||
"default": 1,
|
||||
"value": 1,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"name": "瘦脸",
|
||||
"group": 103,
|
||||
"channel": "./103/18",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 33,
|
||||
"name": "大眼",
|
||||
"group": 103,
|
||||
"channel": "./103/33",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"name": "短脸",
|
||||
"group": 103,
|
||||
"channel": "./103/22",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"name": "窄脸",
|
||||
"group": 103,
|
||||
"channel": "./103/23",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"name": "下巴",
|
||||
"group": 103,
|
||||
"channel": "./103/24",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"name": "V 脸",
|
||||
"group": 103,
|
||||
"channel": "./103/25",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"name": "下颌",
|
||||
"group": 103,
|
||||
"channel": "./103/26",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"name": "颧骨",
|
||||
"group": 103,
|
||||
"channel": "./103/27",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"name": "小头",
|
||||
"group": 103,
|
||||
"channel": "./103/28",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 29,
|
||||
"name": "小头范围",
|
||||
"group": 103,
|
||||
"channel": "./103/29",
|
||||
"kind": "float",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"name": "只处理选中人脸",
|
||||
"group": 104,
|
||||
"channel": "./104/20",
|
||||
"kind": "bool",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"name": "选脸位置",
|
||||
"group": 104,
|
||||
"channel": "./104/21",
|
||||
"kind": "point",
|
||||
"default": 0.5,
|
||||
"value": 0.5,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905943072"
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"name": "多人高速模式",
|
||||
"group": 104,
|
||||
"channel": "./104/39",
|
||||
"kind": "bool",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"name": "防跳脸范围",
|
||||
"group": 104,
|
||||
"channel": "./104/40",
|
||||
"kind": "float",
|
||||
"default": 1.8,
|
||||
"value": 1.8,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 45,
|
||||
"name": "使用跟踪数据",
|
||||
"group": 104,
|
||||
"channel": "./104/45",
|
||||
"kind": "bool",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 46,
|
||||
"name": "跟踪目标",
|
||||
"group": 104,
|
||||
"channel": "./104/46",
|
||||
"kind": "popup",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12901744656"
|
||||
},
|
||||
{
|
||||
"id": 50,
|
||||
"name": "向前分析",
|
||||
"group": 104,
|
||||
"channel": "./104/50",
|
||||
"kind": "button",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": null
|
||||
},
|
||||
{
|
||||
"id": 51,
|
||||
"name": "向后分析",
|
||||
"group": 104,
|
||||
"channel": "./104/51",
|
||||
"kind": "button",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": null
|
||||
},
|
||||
{
|
||||
"id": 52,
|
||||
"name": "清除当前目标",
|
||||
"group": 104,
|
||||
"channel": "./104/52",
|
||||
"kind": "button",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": null
|
||||
},
|
||||
{
|
||||
"id": 53,
|
||||
"name": "跟踪状态",
|
||||
"group": 104,
|
||||
"channel": "./104/53",
|
||||
"kind": "status",
|
||||
"default": "选择画面中的人脸后开始分析",
|
||||
"value": "选择画面中的人脸后开始分析",
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"name": "显示人脸框",
|
||||
"group": 104,
|
||||
"channel": "./104/19",
|
||||
"kind": "bool",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 35,
|
||||
"name": "显示跟踪框",
|
||||
"group": 104,
|
||||
"channel": "./104/35",
|
||||
"kind": "bool",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "蒙版阈值",
|
||||
"group": 105,
|
||||
"channel": "./105/7",
|
||||
"kind": "float",
|
||||
"default": 148,
|
||||
"value": 148,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "蒙版柔度",
|
||||
"group": 105,
|
||||
"channel": "./105/8",
|
||||
"kind": "float",
|
||||
"default": 0.6,
|
||||
"value": 0.6,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"name": "边缘保护",
|
||||
"group": 105,
|
||||
"channel": "./105/9",
|
||||
"kind": "float",
|
||||
"default": 0.4,
|
||||
"value": 0.4,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"name": "预览蒙版",
|
||||
"group": 105,
|
||||
"channel": "./105/10",
|
||||
"kind": "bool",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 43,
|
||||
"name": "反转蒙版",
|
||||
"group": 105,
|
||||
"channel": "./105/43",
|
||||
"kind": "bool",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 44,
|
||||
"name": "蒙版通道",
|
||||
"group": 105,
|
||||
"channel": "./105/44",
|
||||
"kind": "popup",
|
||||
"default": 0,
|
||||
"value": 0,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12901744656"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "整体混合",
|
||||
"group": 105,
|
||||
"channel": "./105/5",
|
||||
"kind": "float",
|
||||
"default": 1,
|
||||
"value": 1,
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 60,
|
||||
"name": "分析数据",
|
||||
"channel": "./60",
|
||||
"kind": "hidden-string",
|
||||
"value": "",
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 61,
|
||||
"name": "分析数据",
|
||||
"channel": "./61",
|
||||
"kind": "hidden-string",
|
||||
"value": "",
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
},
|
||||
{
|
||||
"id": 62,
|
||||
"name": "分析数据",
|
||||
"channel": "./62",
|
||||
"kind": "hidden-string",
|
||||
"value": "",
|
||||
"published": false,
|
||||
"hiddenCompatibility": true,
|
||||
"templateFlags": "12905938976"
|
||||
}
|
||||
],
|
||||
"effectSource": {
|
||||
"object": "510000004",
|
||||
"sourceMediaChannel": "./1/324/300",
|
||||
"clip": "510000006",
|
||||
"footage": "510000007",
|
||||
"type": 3,
|
||||
"dropZone": 1,
|
||||
"path": "Drop Zone.tiff",
|
||||
"resourceBundled": true
|
||||
},
|
||||
"informationalPublished": 2,
|
||||
"totalPublished": 3,
|
||||
"legacyDefinitionCount": 49,
|
||||
"legacyGroupsPreserved": [
|
||||
100,
|
||||
101,
|
||||
102,
|
||||
103,
|
||||
104,
|
||||
105
|
||||
],
|
||||
"nativeHiddenPolicy": "All legacy groups and parameters remain registered with SDK kFxParameterFlag_HIDDEN. Known scalar/point/string hidden XML flags are copied from observed native structures; group/popup/button private flags are preserved.",
|
||||
"publishSettings": [
|
||||
{
|
||||
"object": "510000011",
|
||||
"channel": "./2/100",
|
||||
"name": "FCP 版本作者→"
|
||||
},
|
||||
{
|
||||
"object": "510000012",
|
||||
"channel": "./2/100",
|
||||
"name": "更多模板浏览器访问→"
|
||||
},
|
||||
{
|
||||
"object": "510000005",
|
||||
"channel": "./210",
|
||||
"name": ""
|
||||
}
|
||||
],
|
||||
"defaults": {
|
||||
"legacyMidtoneDefault": 0,
|
||||
"legacyMidtoneValue": 0.5,
|
||||
"customStateHasEdits": false,
|
||||
"initialEffectiveMidtone": 0.5,
|
||||
"publishOSC": 0,
|
||||
"manualAnalysisVisible": false,
|
||||
"trackingMode": "automatic primary realtime follow"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
# 大鱼人像美化 FCP 效果模板
|
||||
|
||||
版本:1.1.2。滤镜 UUID:`FB14B0E6-59B2-4836-916F-CD0C559E9241`。需配套同版大鱼人像美化 FxPlug APP。
|
||||
|
||||
## 三卡片与自动跟随
|
||||
|
||||
FCP 发布列表仅保留作者、网站两个空绑定展示项,以及一个空名称的自定义面板入口 `./210`,共3项。面板内提供“磨皮、美白、瘦脸”三张卡片和“更多”附加设置。主体人脸由当前画面自动选择并实时跟随,无需手动前向/后向分析。多人模式、预览框、防跳脸与各项调节由插件自定义面板承载。
|
||||
|
||||
原有46个平铺功能入口已撤下。旧49个参数定义及六组路径仍保留供旧项目兼容,插件以 SDK 隐藏标记注册;旧手动分析按钮、跟踪目标/状态、选脸点和目标数据不再发布为界面入口。隐藏的目标数据60/61/62不删除。发布 OSC 初始为0;旧OSC类注册由插件保留。
|
||||
|
||||
## 默认与旧项目
|
||||
|
||||
模板首次应用时,旧原生“中频磨皮”仍保存 `default=0 / value=0.5`,即初始局部磨皮50%;直接添加裸插件时为0%。自定义 `PGInspectorState` 初始 `hasEdits=NO`,因此读取并保留旧原生参数,不会用面板归档中的默认0覆盖模板0.5或旧项目数值。面板经过编辑后由自定义状态持久保存调节值。此模板不预置任何人脸身份或跟踪记录。
|
||||
|
||||
## 自有状态归档
|
||||
|
||||
参数210使用本插件生成的 `PGInspectorState` 安全键控归档:内部 `Custom Data` 对象、外部 `BlindDataObject` 与 `DataIsLegacy=false`,再按已核对的Motion文本编码和长度封装。保存 `schema=1 / edited=false`,不使用原版私有数据、类名、品牌资源或空 `<dataValue>` 猜测初始化。默认和当前归档相同,可完整解码并往返核验。
|
||||
|
||||
该编码依据原生文件静态结构及独立Foundation归档检查;1.1.0自定义面板在Motion/FCP中的实际创建、显示、交互、撤销和关闭重开恢复仍待用户验收,不能以XML可解析或归档解码成功代替宿主加载通过。
|
||||
|
||||
## 输入、媒体与版权
|
||||
|
||||
输入链沿用已修复的标准 Effect Source(Type=3、Drop Zone=1):Source Media→clip `510000006`→footage `510000007`→相对文件 `Drop Zone.tiff`。该占位图随模板附带,420128字节,SHA256 `a7f8e3a2a431dbb3ce9e777040bb55e701cfe9ab9632e8cbb10359732bc8692e`。没有外部素材、示例人像或新动画。
|
||||
|
||||
作者与网站仍是同一个Rig下的两个无受控参数菜单:“FCP 版本作者→/大鱼先森Media”和“更多模板浏览器访问→/dayu.media”。仅展示信息,不改变渲染。
|
||||
|
||||
正式安装位置:`~/Movies/Motion Templates.localized/Effects.localized/大鱼/大鱼人像美化/`。1.1.0模板和占位TIFF已同步并逐字节核验,配套APP已正式签名、公证、安装;没有操作Motion/FCP界面,用户自测原生面板。
|
||||
|
||||
## 验证边界与历史修复
|
||||
|
||||
`PARAMETERS.json`记录新旧参数和3条发布路径;`VALIDATION.json`分开记录结构/归档核验与当前宿主待验项。内容选择状态保持为空,效果源、clip/footage、占位资源和版权绑定结构均保留。
|
||||
|
||||
早期模板曾误删clip/footage、将Source Media设为0,用户在FCP实测黑屏;随后恢复完整标准输入链,历史版本已实际出图。该历史结果只支持输入链,不能证明新1.1.0自定义面板已加载。1.0.5加入76点17组局部瘦脸;1.0.6移除IOSurface重复翻转并修复下巴三组局部位移。旧未标记坐标空间的跟踪数据保留但不重放,自动回退实时跟随。
|
||||
|
||||
## 可复现的只读核验
|
||||
|
||||
在仓库根目录执行:
|
||||
|
||||
```sh
|
||||
python3 scripts/inspector-template.py audit "Templates/大鱼人像美化/大鱼人像美化.moef"
|
||||
```
|
||||
|
||||
脚本可提取内外归档并核验自有类、schema、初始状态、3条发布和媒体引用;`encode --inner <本插件生成的Custom Data归档> --text-output <输出文件>` 可重新包装文本值,不启动宿主。其结果明确保留宿主加载待验状态。
|
||||
@@ -0,0 +1,225 @@
|
||||
{
|
||||
"version": "1.1.2",
|
||||
"sha256": "e9fa97dc14323d0daa7d3d61b06a78ba4000a70ab9f5e67ebffd750d49df1e15",
|
||||
"filterUUID": "FB14B0E6-59B2-4836-916F-CD0C559E9241",
|
||||
"publishedFunctionalControls": 1,
|
||||
"informationalControls": 2,
|
||||
"hiddenTrackingSlots": 3,
|
||||
"publishedPathsResolved": 3,
|
||||
"sourceType": 3,
|
||||
"sourceMedia": "510000006",
|
||||
"clip": "510000006",
|
||||
"footage": "510000007",
|
||||
"sourceResource": {
|
||||
"relativePath": "Drop Zone.tiff",
|
||||
"bytes": 420128,
|
||||
"sha256": "a7f8e3a2a431dbb3ce9e777040bb55e701cfe9ab9632e8cbb10359732bc8692e",
|
||||
"origin": "Apple Motion Ozone.framework standard placeholder; copied into this template for relative reference"
|
||||
},
|
||||
"inputChainRepair": {
|
||||
"previousTemplateSHA256": "3b7984e11a92487834ab67121fd3814bf13c22b77a70851298efa84206f91478",
|
||||
"previousSourceMedia": 0,
|
||||
"previousFootageCount": 0,
|
||||
"problem": "Previous generated template removed the standard source clip and could not establish the native effect-source input chain. XML/reference checks did not validate FCP timeline replacement.",
|
||||
"change": "Restored the user-owned reference template clip/footage skeleton with new unique IDs; restored the Source Media link; bundled standard Drop Zone.tiff; filter, publications and Type=3/Drop Zone=1 preserved."
|
||||
},
|
||||
"slimValidation": {
|
||||
"offlineFullChecks": 604,
|
||||
"slimChecks": 224,
|
||||
"extraRealVideoASanChecks": 264,
|
||||
"sampledVideoFrames": 11,
|
||||
"maxUVOracleError": 1.09828022e-05
|
||||
},
|
||||
"coordinateChinValidation": {
|
||||
"offlineFullChecks": 904,
|
||||
"thinChinChecks": 394,
|
||||
"hostAdapterChecksASan": 247,
|
||||
"oscChecksASan": 98,
|
||||
"extraRealVideoASanChecks": 494,
|
||||
"sampledVideoFrames": 11,
|
||||
"independentAnatomicalChecks": 12,
|
||||
"originCombinations": 16,
|
||||
"allOriginTagsPixelIdentical": true,
|
||||
"maxByteErrorVsIndependentCIReference": 2,
|
||||
"maxUVOracleError": 1.09828022e-05,
|
||||
"nativeVisualQA": "pending user"
|
||||
},
|
||||
"historicalHostValidation": {
|
||||
"date": "2026-10-21",
|
||||
"FCP": "Restored input-chain template shows supplied real video; effect parameters and forward analysis responded in independent QA project.",
|
||||
"Motion": "1.0.4 installed formal app loaded the real-video QA project and rendered brightness/geometry with a primary box at different playhead positions; offline tracking disabled.",
|
||||
"scope": "1.0.6 coordinate/chin repair native visual QA is reserved for user self-testing; no Motion/FCP UI operations. Historical host tests remain scoped to their versions.",
|
||||
"version105": "Formal 1.0.5 (7) signed/notarized/stapled/installed and PluginKit formal path verified. User closed hosts before replacement; no Motion/FCP UI operated. Native visual testing pending user.",
|
||||
"version106": "Formal 1.0.6 (8) universal Release signed/notarized/stapled/installed, identity/Gatekeeper/formal PluginKit path verified. User closed hosts; companion moef and TIFF synchronized and byte-verified. Generated outer APPs and notarization ZIP removed. No Motion/FCP UI operations; native visual QA pending user."
|
||||
},
|
||||
"totalPublished": 3,
|
||||
"hiddenCompatibilityParameters": 49,
|
||||
"legacyGroupPathsPreserved": true,
|
||||
"legacyValuesPreserved": true,
|
||||
"publishOSC": 0,
|
||||
"currentHostValidation": {
|
||||
"version": "1.1.2",
|
||||
"build": "13",
|
||||
"Motion": "pass: native number/reset/undo and save-close-reopen; isolated shape/profile images inspected with identical geometry source",
|
||||
"FCP": "pass: formal load, number/reset and same-frame isolated short/jaw render",
|
||||
"continuousPreview": "pass: user confirmed held-drag continuous preview on 2026-10-22 (Asia/Shanghai), version1.1.2 build13; host not specified, per-event frame timing not instrumented"
|
||||
},
|
||||
"customParameter": {
|
||||
"id": 210,
|
||||
"channel": "./210",
|
||||
"name": "",
|
||||
"flags": "12901679104",
|
||||
"flagsOrigin": "Observed original custom parameter native structure, without copying its data blob",
|
||||
"class": "PGInspectorState",
|
||||
"schema": 1,
|
||||
"hasEdits": false,
|
||||
"valueCount": 30,
|
||||
"disabledCount": 0,
|
||||
"classes": [
|
||||
"NSDictionary",
|
||||
"NSSet",
|
||||
"PGInspectorState"
|
||||
],
|
||||
"innerBytes": 935,
|
||||
"innerSHA256": "257540ac6079756a76f3d31dff1b9bca2b33393962057927791316965495ab60",
|
||||
"outerBytes": 1127,
|
||||
"outerSHA256": "95d5f1e2c35c40e9f1234b1480894bcc0ee68c0822c9bd3f7c04338062e6a26b",
|
||||
"encodedCharacters": 1516,
|
||||
"encodingAlphabet": "*-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
||||
"envelope": "8-byte big-endian outer archive length, byte 0x2a, outer NSKeyedArchiver payload, zero padding to 3-byte boundary, custom base64 alphabet",
|
||||
"outerTopKeys": [
|
||||
"BlindDataObject",
|
||||
"DataIsLegacy"
|
||||
],
|
||||
"innerTopKey": "Custom Data",
|
||||
"legacyFlag": false,
|
||||
"defaultEqualsCurrent": true,
|
||||
"exactEncodeDecodeRoundtrip": true,
|
||||
"outerSecureDecodeRoundtrip": true,
|
||||
"vendorClassesOrBlobReused": false,
|
||||
"emptyDataValueFallback": "not established and not relied upon",
|
||||
"nativeLoadStatus": "instantiated in Motion and FCP"
|
||||
},
|
||||
"publicationTransition": {
|
||||
"previousFunctionalControls": 46,
|
||||
"currentFunctionalControls": 1,
|
||||
"informationControls": 2,
|
||||
"manualAnalysisPublished": false,
|
||||
"retainedForCompatibility": [
|
||||
45,
|
||||
46,
|
||||
50,
|
||||
51,
|
||||
52,
|
||||
53,
|
||||
60,
|
||||
61,
|
||||
62
|
||||
],
|
||||
"oldParameterPathsUnchanged": true
|
||||
},
|
||||
"xmlFlagPolicy": {
|
||||
"scalarBooleanString": "12905938976; complete observed hidden native flags",
|
||||
"point": "12905943072; complete observed hidden native point flags",
|
||||
"groupPopupButton": "existing private XML flags retained; no guessed bit patch",
|
||||
"pluginHiddenRegistration": "verified in current source: kFxParameterFlag_HIDDEN for all legacy groups, numeric/point/popup/string parameters; commands additionally disabled"
|
||||
},
|
||||
"nonVisualAcceptance": {
|
||||
"XMLAndReferences": "pass: own codec audit and ae-to-motion audit_motion.py",
|
||||
"mediaClosure": "pass: Source Media/clip/footage/relative TIFF and media SHA256",
|
||||
"publications": "pass: exactly two copyright menus plus empty-name ./210",
|
||||
"copyrightBindings": "pass: complete Rig/widget trees unchanged from baseline, own audit resolves menus/publications",
|
||||
"selection": "pass: 0 selected content objects; project focus",
|
||||
"customArchiveStructure": "pass: exact inner bytes, own class/schema/values; Foundation outer secure decode",
|
||||
"customHostInstantiation": "pass: both native hosts"
|
||||
},
|
||||
"semanticPreservation": {
|
||||
"inverseDiffPassed": true,
|
||||
"allowedChanges": [
|
||||
"description/version",
|
||||
"46 native functional publications replaced by custom210",
|
||||
"custom210 own state archive",
|
||||
"observed scalar/point/string hidden flags",
|
||||
"publish OSC value 1 to 0"
|
||||
],
|
||||
"otherStructureAndLegacyValuesUnchanged": true
|
||||
},
|
||||
"reproducibleCodec": {
|
||||
"script": "../../scripts/inspector-template.py",
|
||||
"commands": [
|
||||
"python3 scripts/inspector-template.py audit \"Templates/大鱼人像美化/大鱼人像美化.moef\"",
|
||||
"python3 scripts/inspector-template.py encode --inner build/ui-analysis/PGInspectorState-default-inner.bplist --text-output build/ui-analysis/panel-value.txt"
|
||||
],
|
||||
"ownRoundtrip": "pass",
|
||||
"malformedOrVendorArchiveRejectionCases": 5,
|
||||
"foundationOuterSecureDecode": "pass",
|
||||
"innerClassDecode": "model generates own archive; structure decoded and exact generated bytes preserved; native host instantiation pending user"
|
||||
},
|
||||
"automatedInspectorValidation": {
|
||||
"scope": "offscreen AppKit inspector, real production controller and mocked host callbacks; no Motion/FCP UI",
|
||||
"fullChecks": 1551,
|
||||
"counts": {
|
||||
"beauty": 49,
|
||||
"face": 116,
|
||||
"thinChinJawShort": 796,
|
||||
"hostAdapterASan": 335,
|
||||
"oscASan": 98,
|
||||
"inspectorASan": 157
|
||||
},
|
||||
"nativeVisualQA": "See currentHostValidation and docs/verification/v1.1.2/native-qa.json",
|
||||
"manualAnalysisUI": "removed; legacy IDs hidden and buttons disabled",
|
||||
"renderMode": "realtime automatic follow; stored manual geometry never used",
|
||||
"templatePublishedEntries": 3,
|
||||
"offscreenWidths": [
|
||||
280,
|
||||
320,
|
||||
380,
|
||||
520
|
||||
],
|
||||
"independentViewChecks": 27,
|
||||
"fixedRegressions": [
|
||||
"shape group bypass clears face-box overlay",
|
||||
"disabled legacy detail effects stay disabled on first edit",
|
||||
"legacy global smoothing remains enabled when its old local group was off",
|
||||
"new gesture reads current host after immediate undo",
|
||||
"pending synchronization is bound to CMTime",
|
||||
"same-time host change refreshes without waiting",
|
||||
"explicit numeric input is never skipped due to stale UI cache"
|
||||
],
|
||||
"archives": "Own PGInspectorState secure payload; Foundation outer and inner decode and Motion alphabet roundtrip tested"
|
||||
},
|
||||
"installation": {
|
||||
"version": "1.1.2",
|
||||
"build": "13",
|
||||
"status": "Release signed, notarized, stapled, installed; generated copies cleaned",
|
||||
"previousInstalledVersion": "1.1.1 (interim)",
|
||||
"sourceCommit": "a2e33e8e00a99b95dc29d67a819cb0897eda5756",
|
||||
"notarization": "Accepted 5f5ce378-8430-467b-ae97-048e6bc81573",
|
||||
"uniqueAppInScannedScope": true,
|
||||
"scopeReport": "../../docs/verification/v1.1.2/installed-verification.json"
|
||||
},
|
||||
"shortJawValidation": {
|
||||
"version": "1.1.2",
|
||||
"build": "13",
|
||||
"total": 1551,
|
||||
"counts": {
|
||||
"beauty": 49,
|
||||
"face": 116,
|
||||
"thinChinJawShort": 796,
|
||||
"hostAdapterASan": 335,
|
||||
"oscASan": 98,
|
||||
"inspectorASan": 157
|
||||
},
|
||||
"allPassed": true,
|
||||
"extraRealFramesASan": {
|
||||
"checks": 886,
|
||||
"includedRepeatedBaseChecks": true,
|
||||
"addedToTotal": false
|
||||
},
|
||||
"originCombinations": 28,
|
||||
"originTagsExactlyByteIdentical": true,
|
||||
"maxByteDifferenceVsIndependentUprightReference": 2,
|
||||
"meanByteDifferenceLimit": 0.005,
|
||||
"nativeCombinedBuildQA": "pending"
|
||||
}
|
||||
}
|
||||
二进制文件未显示。
|
之后 宽度: | 高度: | 大小: 444 KiB |
二进制文件未显示。
|
之后 宽度: | 高度: | 大小: 44 KiB |
@@ -0,0 +1,410 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE ozxmlscene>
|
||||
<ozml version="5.13">
|
||||
<displayversion>5.6.7</displayversion>
|
||||
<factory id="1" uuid="46c844a813d311d8a438000a95af9f7e">
|
||||
<description>Channel</description>
|
||||
<manufacturer>Apple</manufacturer>
|
||||
<version>1</version>
|
||||
</factory>
|
||||
<factory id="2" uuid="65cb4dc9d4504fa281921f5f751fba06">
|
||||
<description>Widget</description>
|
||||
<manufacturer>Apple</manufacturer>
|
||||
<version>1</version>
|
||||
</factory>
|
||||
<factory id="3" uuid="66fc0d6af6a911d6a7a7000393670732">
|
||||
<description>Image</description>
|
||||
<manufacturer>Apple</manufacturer>
|
||||
<version>1</version>
|
||||
</factory>
|
||||
<factory id="4" uuid="7d468273c013498e9806a0d7bc32fddf">
|
||||
<description>Project</description>
|
||||
<manufacturer>Apple</manufacturer>
|
||||
<version>1</version>
|
||||
</factory>
|
||||
<factory id="5" uuid="dbca752470fd11d7980100039389b702">
|
||||
<description>Channel</description>
|
||||
<manufacturer>Apple</manufacturer>
|
||||
<version>1</version>
|
||||
</factory>
|
||||
<factory id="7" uuid="402246385249454b90e08b2ee1b6bf06">
|
||||
<description>绑定</description>
|
||||
<manufacturer>Apple</manufacturer>
|
||||
<version>1</version>
|
||||
</factory>
|
||||
<factory id="8" uuid="e35c74f01d5042f6b468eb530169bfb7">
|
||||
<description>小组件</description>
|
||||
<manufacturer>Apple</manufacturer>
|
||||
<version>1</version>
|
||||
</factory>
|
||||
<factory id="6" uuid="deca4859b16011d7a12d0003936f6f92">
|
||||
<description>ProPlugin Filter</description>
|
||||
<manufacturer>Apple</manufacturer>
|
||||
<version>1</version>
|
||||
</factory>
|
||||
<template>
|
||||
<flags>1</flags>
|
||||
</template>
|
||||
<build />
|
||||
<description>大鱼人像美化 1.1.2:磨皮、美白、瘦脸三卡片自定义面板,自动选择主体并实时跟随。模板局部磨皮默认为50%。</description>
|
||||
<scene>
|
||||
<sceneSettings>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
<duration>300</duration>
|
||||
<shouldOverrideFCDuration>0</shouldOverrideFCDuration>
|
||||
<frameRate>30</frameRate>
|
||||
<NTSC>0</NTSC>
|
||||
<pixelAspectRatio>1</pixelAspectRatio>
|
||||
<workingGamut>0</workingGamut>
|
||||
<viewGamut>-1</viewGamut>
|
||||
<optimizeForDisplay>0</optimizeForDisplay>
|
||||
<backgroundColor red="0" green="0" blue="0" alpha="1" />
|
||||
<audioChannels>2</audioChannels>
|
||||
<audioBitsPerSample>32</audioBitsPerSample>
|
||||
<fieldRenderingMode>0</fieldRenderingMode>
|
||||
<motionBlurSamples>8</motionBlurSamples>
|
||||
<motionBlurDuration>1</motionBlurDuration>
|
||||
<sharpScaling>0</sharpScaling>
|
||||
<startTimecode>0</startTimecode>
|
||||
<presetPath />
|
||||
<backgroundMode>0</backgroundMode>
|
||||
<reflectionRecursionLimit>2</reflectionRecursionLimit>
|
||||
<glyphOSCMode>0</glyphOSCMode>
|
||||
<animateFlag>0</animateFlag>
|
||||
<parameterColorSpaceID>3</parameterColorSpaceID>
|
||||
<savePreviewMovie>0</savePreviewMovie>
|
||||
<Object3DEnvironments>100</Object3DEnvironments>
|
||||
<DRTSupport>1</DRTSupport>
|
||||
<onHDRDisplay>0</onHDRDisplay>
|
||||
</sceneSettings>
|
||||
<publishSettings>
|
||||
<version>2</version>
|
||||
<target object="510000011" channel="./2/100" name="FCP 版本作者→" />
|
||||
<target object="510000012" channel="./2/100" name="更多模板浏览器访问→" />
|
||||
<target object="510000005" channel="./210" name="" />
|
||||
</publishSettings>
|
||||
<currentFrame>0 1 1 0</currentFrame>
|
||||
<currentObject>510000001</currentObject>
|
||||
<activeLayer>510000003</activeLayer>
|
||||
<timeRange offset="0 1 1 0" duration="10 1 1 0" />
|
||||
<playRange offset="0 1 1 0" duration="10 1 1 0" />
|
||||
<flags>1</flags>
|
||||
<audioTracks>0</audioTracks>
|
||||
<timemarkerset />
|
||||
<guideset />
|
||||
<curvesets selected="1" />
|
||||
<scenenode name="项目" id="510000001" factoryID="4" version="5">
|
||||
<scenenode name="Widget" id="510000002" factoryID="2" version="5">
|
||||
<flags>0</flags>
|
||||
<timing in="0 1 1 0" out="-4004 120000 1 0" offset="0 1 1 0" />
|
||||
<foldFlags>0</foldFlags>
|
||||
<baseFlags>16</baseFlags>
|
||||
<parameter name="Properties" id="1" flags="8589938704" />
|
||||
<parameter name="Object" id="2" flags="8589938704">
|
||||
<parameter name="Options" id="103" flags="8589938688" />
|
||||
<parameter name="Hidden" id="102" flags="8589934608" default="0" value="1" />
|
||||
<parameter name="Snapshots" id="101" flags="8589938706" />
|
||||
<parameter name="Widget" id="100" flags="8589934608" default="1.7777777777777777" value="1.7777777777777777" />
|
||||
</parameter>
|
||||
</scenenode>
|
||||
<flags>0</flags>
|
||||
<timing in="0 1 1 0" out="-4004 120000 1 0" offset="0 1 1 0" />
|
||||
<foldFlags>0</foldFlags>
|
||||
<baseFlags>268435473</baseFlags>
|
||||
<parameter name="Properties" id="1" flags="8589938704">
|
||||
<parameter name="HDR White Level" id="103" default="0.95" value="0.95" />
|
||||
</parameter>
|
||||
<parameter name="Object" id="2" flags="8589938705" />
|
||||
</scenenode>
|
||||
<scenenode name="绑定" id="510000010" factoryID="7" version="5">
|
||||
<scenenode name="弹出式菜单 1" id="510000012" factoryID="8" version="5">
|
||||
<affecting>2</affecting>
|
||||
<snapshot>3</snapshot>
|
||||
<flags>0</flags>
|
||||
<timing in="0 1 1 0" out="-2560 153600 1 0" offset="0 1 1 0" />
|
||||
<foldFlags>0</foldFlags>
|
||||
<baseFlags>16</baseFlags>
|
||||
<parameter name="属性" id="1" flags="8589938704" />
|
||||
<parameter name="对象" id="2" flags="8589938704">
|
||||
<parameter name="选项" id="103" flags="8589938688">
|
||||
<parameter name="初始值" id="106" flags="68736319504" default="0" value="0" />
|
||||
</parameter>
|
||||
<parameter name="Hidden" id="102" flags="8606711824" default="0" value="3" />
|
||||
<parameter name="快照" id="101" flags="8589938706">
|
||||
<parameter name="快照" id="3" flags="4112">
|
||||
<parameter name="值" id="1" flags="16" default="0" value="2" />
|
||||
<parameter name="插值" id="2" flags="65552" default="1" value="1" />
|
||||
</parameter>
|
||||
</parameter>
|
||||
<parameter name="弹出式菜单" id="100" flags="16842769" default="2" value="2">
|
||||
<entry name="dayu.media" tag="2" />
|
||||
</parameter>
|
||||
</parameter>
|
||||
</scenenode>
|
||||
<scenenode name="弹出式菜单" id="510000011" factoryID="8" version="5">
|
||||
<affecting>2</affecting>
|
||||
<snapshot>3</snapshot>
|
||||
<flags>0</flags>
|
||||
<timing in="0 1 1 0" out="-2560 153600 1 0" offset="0 1 1 0" />
|
||||
<foldFlags>0</foldFlags>
|
||||
<baseFlags>16</baseFlags>
|
||||
<parameter name="属性" id="1" flags="8589938704" />
|
||||
<parameter name="对象" id="2" flags="8589938704">
|
||||
<parameter name="选项" id="103" flags="8589938688">
|
||||
<parameter name="初始值" id="106" flags="68736319504" default="0" value="0" />
|
||||
</parameter>
|
||||
<parameter name="Hidden" id="102" flags="8606711824" default="0" value="3" />
|
||||
<parameter name="快照" id="101" flags="8589938706">
|
||||
<parameter name="快照" id="3" flags="4112">
|
||||
<parameter name="值" id="1" flags="16" default="0" value="2" />
|
||||
<parameter name="插值" id="2" flags="65552" default="1" value="1" />
|
||||
</parameter>
|
||||
</parameter>
|
||||
<parameter name="弹出式菜单" id="100" flags="16842768" default="2" value="2">
|
||||
<entry name="大鱼先森Media" tag="2" />
|
||||
</parameter>
|
||||
</parameter>
|
||||
</scenenode>
|
||||
<flags>0</flags>
|
||||
<timing in="0 1 1 0" out="-2560 153600 1 0" offset="0 1 1 0" />
|
||||
<foldFlags>0</foldFlags>
|
||||
<baseFlags>16</baseFlags>
|
||||
<parameter name="属性" id="1" flags="8589938704" />
|
||||
<parameter name="对象" id="2" flags="8589938704" />
|
||||
</scenenode>
|
||||
<layer name="大鱼人像美化" id="510000003">
|
||||
<scenenode name="Effect Source" id="510000004" factoryID="3" version="5">
|
||||
<validTracks>1</validTracks>
|
||||
<aspectRatio>1</aspectRatio>
|
||||
<flags>0</flags>
|
||||
<timing in="0 1 1 0" out="299 30 1 0" offset="0 1 1 0" />
|
||||
<foldFlags>16385</foldFlags>
|
||||
<baseFlags>524304</baseFlags>
|
||||
<parameter name="Properties" id="1" flags="8589938704">
|
||||
<parameter name="Cinematic" id="344" flags="8589938706">
|
||||
<foldFlags>131076</foldFlags>
|
||||
<parameter name="Depth of Field" id="346" flags="8589934608" default="1.3999999999999999" value="2" />
|
||||
<parameter name="Focus Point" id="348" flags="8589938706">
|
||||
<foldFlags>15</foldFlags>
|
||||
</parameter>
|
||||
</parameter>
|
||||
<parameter name="Lighting" id="230" flags="8589938706">
|
||||
<foldFlags>15</foldFlags>
|
||||
</parameter>
|
||||
<parameter name="Shadows" id="234" flags="8589938706">
|
||||
<foldFlags>15</foldFlags>
|
||||
</parameter>
|
||||
<parameter name="Reflection" id="223" flags="8589971474">
|
||||
<foldFlags>131087</foldFlags>
|
||||
</parameter>
|
||||
<parameter name="Color" id="243" flags="8589938688">
|
||||
<parameter name="Conversion Version" id="245" flags="8589934610" default="1" value="2" />
|
||||
<parameter name="Conversion Type" id="247" flags="8590032912" default="2" value="2" />
|
||||
</parameter>
|
||||
<parameter name="Media" id="324" flags="8589938704">
|
||||
<foldFlags>4</foldFlags>
|
||||
<parameter name="Source Media" id="300" flags="12901744656" default="510000006" value="510000006" />
|
||||
<parameter name="Source Media" id="325" flags="8590000146" />
|
||||
</parameter>
|
||||
<parameter name="Page Number" id="301" flags="8589934610" default="1" value="1" />
|
||||
<parameter name="Retime Value" id="304" flags="8590066066">
|
||||
<curve type="1" default="1" value="1" round="0" retimingExtrapolation="1">
|
||||
<numberOfKeypoints>2</numberOfKeypoints>
|
||||
<keypoint interpolation="1" flags="0">
|
||||
<time>0 1 1 0</time>
|
||||
<value>1</value>
|
||||
</keypoint>
|
||||
<keypoint interpolation="1" flags="0">
|
||||
<time>10 1 1 0</time>
|
||||
<value>301</value>
|
||||
</keypoint>
|
||||
</curve>
|
||||
</parameter>
|
||||
<parameter name="Retime Value Cache" id="319" flags="8590065810">
|
||||
<curve type="1" default="1" value="1">
|
||||
<numberOfKeypoints>2</numberOfKeypoints>
|
||||
<keypoint interpolation="1" flags="128">
|
||||
<time>0 1 1 0</time>
|
||||
<value>1</value>
|
||||
</keypoint>
|
||||
<keypoint interpolation="1" flags="128">
|
||||
<time>10 1 1 0</time>
|
||||
<value>301</value>
|
||||
</keypoint>
|
||||
</curve>
|
||||
</parameter>
|
||||
<parameter name="Duration Cache" id="320" flags="8589934610" default="0" value="300" />
|
||||
</parameter>
|
||||
<parameter name="Object" id="2" flags="8589938704">
|
||||
<parameter name="Drop Zone" id="311" flags="8589934738" default="0" value="1" />
|
||||
<parameter name="Type" id="321" flags="8590000146" default="0" value="3" />
|
||||
<parameter name="Pan" id="326" flags="77309415442">
|
||||
<foldFlags>15</foldFlags>
|
||||
</parameter>
|
||||
<parameter name="Scale" id="327" flags="77309415442">
|
||||
<foldFlags>15</foldFlags>
|
||||
</parameter>
|
||||
<parameter name="Fill Opaque" id="328" flags="8589934608" default="0" value="0" />
|
||||
<parameter name="Fill Color" id="329" flags="8589938704">
|
||||
<foldFlags>15</foldFlags>
|
||||
</parameter>
|
||||
<parameter name="Clear" id="315" flags="8606777360" default="0" value="0" />
|
||||
<parameter name="Width" id="313" flags="8589934610" default="1" value="1920" />
|
||||
<parameter name="Height" id="314" flags="8589934610" default="1" value="1080" />
|
||||
</parameter>
|
||||
<filter name="大鱼人像美化" id="510000005" factoryID="6" pluginUUID="FB14B0E6-59B2-4836-916F-CD0C559E9241" pluginVersion="1.1.2" pluginName="大鱼人像美化" pluginDynamicParams="0">
|
||||
<timing in="0 1 1 0" out="299 30 1 0" offset="0 1 1 0" />
|
||||
<baseFlags>8589934608</baseFlags>
|
||||
<parameter name="" id="210" flags="12901679104">
|
||||
<numberOfKeypoints>1</numberOfKeypoints>
|
||||
<keypoint>
|
||||
<time>0 0 0 0</time>
|
||||
<value />
|
||||
</keypoint>
|
||||
<defaultVal>********-4QeMb-gOLBoA11I*E61-*I4-klM75NZQbBdPqtN743mMqVdRaJmJ0FoPr-M74xWOaJXR5AG**44c3wE1otHGqJtNKF-QaBcOLNZQh660Ec9L2FVR437QolZNq3XSJwE1o7gOKtYF43oMIxWOaJXR6*0U*4X1EsDJGFiRKlgHl21dq7kP4ZnR1*kp*20*kE3-UQ8K0FqNL7nOKxiKGFVQaBcOLNZQZEYR4xkK0FjMadZMrFn2U*-Ve-T2*xCIohZSKJYEL7XO4ZqNL9F0*ZPErJnR4xh62FVR44**OwE8EgA3pZOKplRLZxUMK7XN4JaNqVdOahgPKtjQ53mQrFpRbRsSLdvUMG5JGFiRKlgpEoC1l*F2VAI3FNKRa3gRKJnJWFXP43nQpNZN4ZoNKFKQqBcNKpVK4FdQq3WP4JYU*8*8*UE*M*aolUN1VctK3RCImtfNLZnKYtH9axWOaJXR5Cj2-sP5-oS5m*V6WAY7GMb80Ye8mkh9WwkAH6nB1IqBnW**s*2U*K*-c*5U*W*0M*8U*i*16*BU*u*1s*EU-4*2c*HU-G*3M*KU-S*46*NU-e*4s*QU-q*5c*TU00j2-suCnguCncuCXd1CncuCXcuCXcuCncvCXcuCXdJCXe*6M*WU08*6M*WU04*6M*VU04*6s*WU04*6M*VU04*6M*VU04*6M*WU04*6c*VU04*6M*VU04*76*VU04*7F*d2-sEFl*P2*IE6l*M2*6E6-*c22ME2V*R2-cE1l*22-QE1-*e22UE5l*-20QE5-*F2-YE1V*1202E3WA**********0Azw********0AzzAnAk****0B*6********B7wTLtzKWFXP43nQqtVPKJM74BgMLBnNLBQHZB2OKBoOKxiML7tcbu*K2tHHq7eNKBooVYCUcCUU0TGT5q3VZJCIpBZR883UB7wTMW7Ll*EI2R7PbBkNKBoPr7HR43oNO88U3wE23-5GKtnQ4JXR4xmIrFVR4I*0**F*-c*7**d*16*Bk-7*2k*K*-O*6M*X*0L*7s*dE0g*9A*j*0y*A**kE11*AI*n*1I*Bw-**20*EE--U26*Ec-1*2C*F*-2U2I*FM-4*2O*Fk-5U2U*G6-7*2a*GU-8U2g*Gs-A*2m*HE-BU2s*Hc-D*3R*Jw-ME3X*KI-Nk3d*Kg-PE3j*L2-Qk3p*LQ-SE3v*Lo-Tk4-*MA-VE45*MY-Wk4B*Mw-YE4H*NI-Zk4N*Ng-bE4T*O2-ck4Z*OQ-eE4f*Oo-fk4l*PA-hE4r*PY-ik4x*Pw-kE51*QI-lk57*Qg-nE5D*R2-ok5J*RQ-s*5d*T6-yk6**Ug03*6V*WE09E6m*XA0BE6u*Y*0Ek76*Zg0LU********6-*********6g*******************7l0**6*-2*4U*Y*0Y*AU*r*2Y*HU-P*4o*Pk-l*5I*SkEa*********U2*********2*******************-0Q*</defaultVal>
|
||||
<dataValue>********-4QeMb-gOLBoA11I*E61-*I4-klM75NZQbBdPqtN743mMqVdRaJmJ0FoPr-M74xWOaJXR5AG**44c3wE1otHGqJtNKF-QaBcOLNZQh660Ec9L2FVR437QolZNq3XSJwE1o7gOKtYF43oMIxWOaJXR6*0U*4X1EsDJGFiRKlgHl21dq7kP4ZnR1*kp*20*kE3-UQ8K0FqNL7nOKxiKGFVQaBcOLNZQZEYR4xkK0FjMadZMrFn2U*-Ve-T2*xCIohZSKJYEL7XO4ZqNL9F0*ZPErJnR4xh62FVR44**OwE8EgA3pZOKplRLZxUMK7XN4JaNqVdOahgPKtjQ53mQrFpRbRsSLdvUMG5JGFiRKlgpEoC1l*F2VAI3FNKRa3gRKJnJWFXP43nQpNZN4ZoNKFKQqBcNKpVK4FdQq3WP4JYU*8*8*UE*M*aolUN1VctK3RCImtfNLZnKYtH9axWOaJXR5Cj2-sP5-oS5m*V6WAY7GMb80Ye8mkh9WwkAH6nB1IqBnW**s*2U*K*-c*5U*W*0M*8U*i*16*BU*u*1s*EU-4*2c*HU-G*3M*KU-S*46*NU-e*4s*QU-q*5c*TU00j2-suCnguCncuCXd1CncuCXcuCXcuCncvCXcuCXdJCXe*6M*WU08*6M*WU04*6M*VU04*6s*WU04*6M*VU04*6M*VU04*6M*WU04*6c*VU04*6M*VU04*76*VU04*7F*d2-sEFl*P2*IE6l*M2*6E6-*c22ME2V*R2-cE1l*22-QE1-*e22UE5l*-20QE5-*F2-YE1V*1202E3WA**********0Azw********0AzzAnAk****0B*6********B7wTLtzKWFXP43nQqtVPKJM74BgMLBnNLBQHZB2OKBoOKxiML7tcbu*K2tHHq7eNKBooVYCUcCUU0TGT5q3VZJCIpBZR883UB7wTMW7Ll*EI2R7PbBkNKBoPr7HR43oNO88U3wE23-5GKtnQ4JXR4xmIrFVR4I*0**F*-c*7**d*16*Bk-7*2k*K*-O*6M*X*0L*7s*dE0g*9A*j*0y*A**kE11*AI*n*1I*Bw-**20*EE--U26*Ec-1*2C*F*-2U2I*FM-4*2O*Fk-5U2U*G6-7*2a*GU-8U2g*Gs-A*2m*HE-BU2s*Hc-D*3R*Jw-ME3X*KI-Nk3d*Kg-PE3j*L2-Qk3p*LQ-SE3v*Lo-Tk4-*MA-VE45*MY-Wk4B*Mw-YE4H*NI-Zk4N*Ng-bE4T*O2-ck4Z*OQ-eE4f*Oo-fk4l*PA-hE4r*PY-ik4x*Pw-kE51*QI-lk57*Qg-nE5D*R2-ok5J*RQ-s*5d*T6-yk6**Ug03*6V*WE09E6m*XA0BE6u*Y*0Ek76*Zg0LU********6-*********6g*******************7l0**6*-2*4U*Y*0Y*AU*r*2Y*HU-P*4o*Pk-l*5I*SkEa*********U2*********2*******************-0Q*</dataValue>
|
||||
</parameter>
|
||||
<parameter name="磨皮" id="100" flags="8589938704">
|
||||
<parameter name="启用磨皮" id="70" flags="12905938976" default="1" value="1" />
|
||||
<parameter name="磨皮强度" id="1" flags="12905938976" default="1" value="1" />
|
||||
<parameter name="中频磨皮" id="12" flags="12905938976" default="0" value="0.5" />
|
||||
<parameter name="磨皮半径" id="3" flags="12905938976" default="8" value="8" />
|
||||
<parameter name="保护五官" id="30" flags="12905938976" default="1" value="1" />
|
||||
</parameter>
|
||||
<parameter name="肤色" id="101" flags="8589938704">
|
||||
<parameter name="启用肤色" id="71" flags="12905938976" default="1" value="1" />
|
||||
<parameter name="肤色风格" id="42" flags="12901744656" default="0" value="0" />
|
||||
<parameter name="肤色提亮" id="2" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="肤色色相" id="14" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="肤色饱和度" id="15" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="均匀肤色" id="41" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="牙齿美白" id="31" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="眼睛提亮" id="32" flags="12905938976" default="0" value="0" />
|
||||
</parameter>
|
||||
<parameter name="细节" id="102" flags="8589938704">
|
||||
<parameter name="启用细节" id="73" flags="12905938976" default="1" value="1" />
|
||||
<parameter name="高频细节平滑" id="17" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="锐化" id="4" flags="12905938976" default="0" value="0" />
|
||||
</parameter>
|
||||
<parameter name="脸型" id="103" flags="8589938704">
|
||||
<parameter name="启用脸型" id="72" flags="12905938976" default="1" value="1" />
|
||||
<parameter name="瘦脸" id="18" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="大眼" id="33" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="短脸" id="22" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="窄脸" id="23" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="下巴" id="24" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="V 脸" id="25" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="下颌" id="26" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="颧骨" id="27" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="小头" id="28" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="小头范围" id="29" flags="12905938976" default="0" value="0" />
|
||||
</parameter>
|
||||
<parameter name="人脸选择与跟踪" id="104" flags="8589938704">
|
||||
<parameter name="只处理选中人脸" id="20" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="选脸位置" id="21" flags="12905943072">
|
||||
<foldFlags>15</foldFlags>
|
||||
<parameter name="X" id="1" flags="12905938976" default="0.5" value="0.5" />
|
||||
<parameter name="Y" id="2" flags="12905938976" default="0.5" value="0.5" />
|
||||
</parameter>
|
||||
<parameter name="多人高速模式" id="39" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="防跳脸范围" id="40" flags="12905938976" default="1.8" value="1.8" />
|
||||
<parameter name="使用跟踪数据" id="45" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="跟踪目标" id="46" flags="12901744656" default="0" value="0" />
|
||||
<parameter name="向前分析" id="50" />
|
||||
<parameter name="向后分析" id="51" />
|
||||
<parameter name="清除当前目标" id="52" />
|
||||
<parameter name="跟踪状态" id="53" flags="12905938976">
|
||||
<text>选择画面中的人脸后开始分析</text>
|
||||
</parameter>
|
||||
<parameter name="显示人脸框" id="19" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="显示跟踪框" id="35" flags="12905938976" default="0" value="0" />
|
||||
</parameter>
|
||||
<parameter name="蒙版与输出" id="105" flags="8589938704">
|
||||
<parameter name="蒙版阈值" id="7" flags="12905938976" default="148" value="148" />
|
||||
<parameter name="蒙版柔度" id="8" flags="12905938976" default="0.6" value="0.6" />
|
||||
<parameter name="边缘保护" id="9" flags="12905938976" default="0.4" value="0.4" />
|
||||
<parameter name="预览蒙版" id="10" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="反转蒙版" id="43" flags="12905938976" default="0" value="0" />
|
||||
<parameter name="蒙版通道" id="44" flags="12901744656" default="0" value="0" />
|
||||
<parameter name="整体混合" id="5" flags="12905938976" default="1" value="1" />
|
||||
</parameter>
|
||||
<parameter name="分析数据" id="60" flags="12905938976">
|
||||
<text />
|
||||
</parameter>
|
||||
<parameter name="分析数据" id="61" flags="12905938976">
|
||||
<text />
|
||||
</parameter>
|
||||
<parameter name="分析数据" id="62" flags="12905938976">
|
||||
<text />
|
||||
</parameter>
|
||||
<parameter name="混合" id="10001" flags="12884901888" default="1" value="1" />
|
||||
<parameter name="Flip" id="10002" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="Input Points" id="10003" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="发布 OSC" id="10005" flags="12901679104" default="0" value="0" />
|
||||
</filter>
|
||||
</scenenode>
|
||||
<aspectRatio>1</aspectRatio>
|
||||
<flags>0</flags>
|
||||
<timing in="0 1 1 0" out="299 30 1 0" offset="0 1 1 0" />
|
||||
<foldFlags>0</foldFlags>
|
||||
<baseFlags>524304</baseFlags>
|
||||
<parameter name="Properties" id="1" flags="8589938704">
|
||||
<parameter name="Lighting" id="230" flags="8589938706">
|
||||
<foldFlags>15</foldFlags>
|
||||
</parameter>
|
||||
<parameter name="Shadows" id="234" flags="8589938706">
|
||||
<foldFlags>15</foldFlags>
|
||||
</parameter>
|
||||
<parameter name="Reflection" id="223" flags="8589971474">
|
||||
<foldFlags>131087</foldFlags>
|
||||
</parameter>
|
||||
</parameter>
|
||||
<parameter name="Object" id="2" flags="8589938704">
|
||||
<parameter name="Type" id="307" flags="12901679120" default="0" value="0" />
|
||||
<parameter name="Fixed Width" id="302" flags="12901679124" default="1920" value="1920" />
|
||||
<parameter name="Fixed Height" id="303" flags="12901679124" default="1080" value="1080" />
|
||||
<parameter name="Flatten" id="311" flags="8589934610" default="0" value="0" />
|
||||
<parameter name="Layer Order" id="305" flags="8589934610" default="0" value="0" />
|
||||
<parameter name="Aperture Width" id="312" flags="12884901906" default="1920" value="1920" />
|
||||
<parameter name="Aperture Height" id="313" flags="12884901906" default="1080" value="1080" />
|
||||
<parameter name="New Fixed Res Behavior" id="315" flags="8594194480" default="1" value="0" />
|
||||
</parameter>
|
||||
</layer>
|
||||
<footage name="效果源媒体" id="510000007">
|
||||
<clip name="Effect Source" id="510000006">
|
||||
<pathURL>Drop Zone.tiff</pathURL>
|
||||
<missingWidth>1200</missingWidth>
|
||||
<missingHeight>1200</missingHeight>
|
||||
<missingDuration>0.033333333333333333</missingDuration>
|
||||
<creationDuration>1</creationDuration>
|
||||
<mediaID />
|
||||
<flags>0</flags>
|
||||
<timing in="0 1 1 0" out="0 120000 1 0" offset="0 1 1 0" />
|
||||
<foldFlags>0</foldFlags>
|
||||
<baseFlags>524304</baseFlags>
|
||||
<parameter name="Properties" id="1" flags="8589938704" />
|
||||
<parameter name="Object" id="2" flags="8589938704">
|
||||
<parameter name="Pixel Aspect Ratio" id="104" flags="12884901888" default="1" value="1" />
|
||||
<parameter name="Frame Rate" id="107" flags="8589934592" default="0" value="30" />
|
||||
<parameter name="Fixed Width" id="114" flags="12884901888" default="600" value="600" />
|
||||
<parameter name="Fixed Height" id="115" flags="12884901888" default="600" value="600" />
|
||||
<parameter name="Use Background Color" id="116" flags="8589934594" default="0" value="0" />
|
||||
<parameter name="Background Color" id="117" flags="8589971458">
|
||||
<foldFlags>15</foldFlags>
|
||||
<parameter name="Red" id="1" flags="8589967376" default="1" value="1" />
|
||||
<parameter name="Green" id="2" flags="8589967376" default="1" value="1" />
|
||||
<parameter name="Blue" id="3" flags="8589967376" default="1" value="1" />
|
||||
</parameter>
|
||||
<parameter name="Missing Is Still" id="128" flags="8589934610" default="0" value="1" />
|
||||
</parameter>
|
||||
</clip>
|
||||
<flags>0</flags>
|
||||
<timing in="0 1 1 0" out="0 120000 1 0" offset="0 1 1 0" />
|
||||
<foldFlags>0</foldFlags>
|
||||
<baseFlags>524304</baseFlags>
|
||||
<parameter name="Properties" id="1" flags="8589938704" />
|
||||
<parameter name="Object" id="2" flags="8589938704" />
|
||||
</footage>
|
||||
</scene>
|
||||
</ozml>
|
||||
@@ -65,8 +65,11 @@
|
||||
Plugin/beatygrilPlugIn.m,
|
||||
Plugin/Info.plist,
|
||||
Plugin/main.m,
|
||||
Plugin/MetalDeviceCache.m,
|
||||
Plugin/TileableRemoteBrightness.metal,
|
||||
Plugin/PGBeautyRenderer.m,
|
||||
Plugin/PGFaceProcessor.m,
|
||||
Plugin/PGFaceSelectOSC.m,
|
||||
Plugin/PGInspectorState.m,
|
||||
Plugin/PGInspectorView.m,
|
||||
"Wrapper Application/Info.plist",
|
||||
);
|
||||
target = 6945FC8A3088B7220013E108 /* Wrapper Application */;
|
||||
@@ -79,6 +82,7 @@
|
||||
"/Localized: Wrapper Application/MainMenu.xib",
|
||||
Plugin/Info.plist,
|
||||
"Wrapper Application/AppDelegate.m",
|
||||
"Wrapper Application/Resources/LauncherInfo.png",
|
||||
"Wrapper Application/Info.plist",
|
||||
"Wrapper Application/main.m",
|
||||
);
|
||||
@@ -248,6 +252,7 @@
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
6945FC933088B7220013E108 /* Copy and Code Sign FxPlug.framework */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
name = "Copy and Code Sign FxPlug.framework";
|
||||
shellPath = /bin/sh;
|
||||
shellScript = (
|
||||
@@ -260,6 +265,7 @@
|
||||
};
|
||||
6945FC943088B7220013E108 /* Copy and Code Sign PluginManager.framework */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
name = "Copy and Code Sign PluginManager.framework";
|
||||
shellPath = /bin/sh;
|
||||
shellScript = (
|
||||
@@ -303,8 +309,11 @@
|
||||
6945FCCD3088B7220013E108 /* Debug configuration for PBXNativeTarget "XPC Service" */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CODE_SIGN_IDENTITY = "Developer ID Application";
|
||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEVELOPMENT_TEAM = B3W25FX5H5;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
INFOPLIST_FILE = beatygril/Plugin/Info.plist;
|
||||
@@ -313,7 +322,7 @@
|
||||
"@loader_path/../Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = mh_execute;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.dayu.beatygril.fxplug;
|
||||
PRODUCT_NAME = "beatygril $(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "beatygril/Plugin/XPC Service-Bridging-Header.h";
|
||||
WRAPPER_EXTENSION = pluginkit;
|
||||
@@ -323,8 +332,11 @@
|
||||
6945FCCE3088B7220013E108 /* Release configuration for PBXNativeTarget "XPC Service" */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CODE_SIGN_IDENTITY = "Developer ID Application";
|
||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEVELOPMENT_TEAM = B3W25FX5H5;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
INFOPLIST_FILE = beatygril/Plugin/Info.plist;
|
||||
@@ -333,7 +345,7 @@
|
||||
"@loader_path/../Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = mh_execute;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.dayu.beatygril.fxplug;
|
||||
PRODUCT_NAME = "beatygril $(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "beatygril/Plugin/XPC Service-Bridging-Header.h";
|
||||
WRAPPER_EXTENSION = pluginkit;
|
||||
@@ -344,12 +356,15 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_ENTITLEMENTS = "beatygril/Wrapper Application/SandboxEntitlements.entitlements";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
OTHER_LDFLAGS = ("$(inherited)", "-framework", CoreServices, );
|
||||
CODE_SIGN_IDENTITY = "Developer ID Application";
|
||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEVELOPMENT_TEAM = B3W25FX5H5;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
INFOPLIST_FILE = "beatygril/Wrapper Application/Info.plist";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.dayu.beatygril;
|
||||
PRODUCT_NAME = beatygril;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "beatygril/Wrapper Application/Wrapper Application-Bridging-Header.h";
|
||||
};
|
||||
@@ -359,12 +374,15 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_ENTITLEMENTS = "beatygril/Wrapper Application/SandboxEntitlements.entitlements";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
OTHER_LDFLAGS = ("$(inherited)", "-framework", CoreServices, );
|
||||
CODE_SIGN_IDENTITY = "Developer ID Application";
|
||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEVELOPMENT_TEAM = B3W25FX5H5;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
INFOPLIST_FILE = "beatygril/Wrapper Application/Info.plist";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.dayu.beatygril;
|
||||
PRODUCT_NAME = beatygril;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "beatygril/Wrapper Application/Wrapper Application-Bridging-Header.h";
|
||||
};
|
||||
@@ -375,12 +393,16 @@
|
||||
buildSettings = {
|
||||
ADDITIONAL_SDKS = /Library/Developer/SDKs/FxPlug.sdk;
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = (
|
||||
arm64,
|
||||
x86_64,
|
||||
);
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = NO;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
@@ -411,7 +433,7 @@
|
||||
ENABLE_TESTABILITY = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
/Library/Frameworks,
|
||||
/Library/Developer/SDKs/FxPlug.sdk/Library/Frameworks,
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
@@ -430,10 +452,10 @@
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 27.2;
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_VERSION = 5;
|
||||
};
|
||||
@@ -444,12 +466,16 @@
|
||||
buildSettings = {
|
||||
ADDITIONAL_SDKS = /Library/Developer/SDKs/FxPlug.sdk;
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = (
|
||||
arm64,
|
||||
x86_64,
|
||||
);
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = NO;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
@@ -480,7 +506,7 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
/Library/Frameworks,
|
||||
/Library/Developer/SDKs/FxPlug.sdk/Library/Frameworks,
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
@@ -493,9 +519,10 @@
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 27.2;
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_VERSION = 5;
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>beatygrilXPCService</string>
|
||||
<string>大鱼人像美化</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
@@ -17,9 +17,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XPC!</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<string>1.3.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<string>15</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
<key>PlugInKit</key>
|
||||
@@ -48,7 +48,7 @@
|
||||
<array>
|
||||
<dict>
|
||||
<key>groupName</key>
|
||||
<string>beatygril Group</string>
|
||||
<string>大鱼</string>
|
||||
<key>uuid</key>
|
||||
<string>0461C6B0-B8B7-4DE8-B882-03C635553ECB</string>
|
||||
</dict>
|
||||
@@ -59,19 +59,40 @@
|
||||
<key>className</key>
|
||||
<string>beatygrilPlugIn</string>
|
||||
<key>displayName</key>
|
||||
<string>beatygril::FxPlug Name</string>
|
||||
<string>大鱼人像美化</string>
|
||||
<key>group</key>
|
||||
<string>0461C6B0-B8B7-4DE8-B882-03C635553ECB</string>
|
||||
<key>infoString</key>
|
||||
<string>beatygril::FxPlug Description</string>
|
||||
<string>人像磨皮、肤色、脸型和人脸跟踪</string>
|
||||
<key>protocolNames</key>
|
||||
<array>
|
||||
<string>FxFilter</string>
|
||||
<string>FxAnalyzer</string>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>FB14B0E6-59B2-4836-916F-CD0C559E9241</string>
|
||||
<key>version</key>
|
||||
<string>1.0</string>
|
||||
<string>1.3.0</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>className</key>
|
||||
<string>PGFaceSelectOSC</string>
|
||||
<key>displayName</key>
|
||||
<string>人脸选择</string>
|
||||
<key>group</key>
|
||||
<string>0461C6B0-B8B7-4DE8-B882-03C635553ECB</string>
|
||||
<key>uuid</key>
|
||||
<string>E0E432C8-3D71-4ABA-B006-E7F519E06C87</string>
|
||||
<key>version</key>
|
||||
<string>1.3.0</string>
|
||||
<key>protocolNames</key>
|
||||
<array>
|
||||
<string>FxOnScreenControl</string>
|
||||
</array>
|
||||
<key>supportedPlugins</key>
|
||||
<array>
|
||||
<string>FB14B0E6-59B2-4836-916F-CD0C559E9241</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>XPCService</key>
|
||||
@@ -88,5 +109,7 @@
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>13.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,28 +0,0 @@
|
||||
//
|
||||
// MetalDeviceCache.h
|
||||
// beatygril
|
||||
//
|
||||
// Created by dayu on 2026/10/21.
|
||||
//
|
||||
|
||||
#import <Metal/Metal.h>
|
||||
#import <FxPlug/FxPlugSDK.h>
|
||||
|
||||
@class MetalDeviceCacheItem;
|
||||
|
||||
@interface MetalDeviceCache : NSObject
|
||||
{
|
||||
NSMutableArray<MetalDeviceCacheItem*>* deviceCaches;
|
||||
}
|
||||
|
||||
+ (MetalDeviceCache*)deviceCache;
|
||||
+ (MTLPixelFormat)MTLPixelFormatForImageTile:(FxImageTile*)imageTile;
|
||||
|
||||
- (id<MTLDevice>)deviceWithRegistryID:(uint64_t)registryID;
|
||||
- (id<MTLRenderPipelineState>)pipelineStateWithRegistryID:(uint64_t)registryID
|
||||
pixelFormat:(MTLPixelFormat)pixFormat;
|
||||
- (id<MTLCommandQueue>)commandQueueWithRegistryID:(uint64_t)registryID
|
||||
pixelFormat:(MTLPixelFormat)pixFormat;
|
||||
- (void)returnCommandQueueToCache:(id<MTLCommandQueue>)commandQueue;
|
||||
|
||||
@end
|
||||
@@ -1,339 +0,0 @@
|
||||
//
|
||||
// MetalDeviceCache.m
|
||||
// beatygril
|
||||
//
|
||||
// Created by dayu on 2026/10/21.
|
||||
//
|
||||
|
||||
#import "MetalDeviceCache.h"
|
||||
|
||||
const NSUInteger kMaxCommandQueues = 5;
|
||||
static NSString* kKey_InUse = @"InUse";
|
||||
static NSString* kKey_CommandQueue = @"CommandQueue";
|
||||
|
||||
static MetalDeviceCache* gDeviceCache = nil;
|
||||
|
||||
@interface MetalDeviceCacheItem : NSObject
|
||||
|
||||
@property (readonly) id<MTLDevice> gpuDevice;
|
||||
@property (readonly) id<MTLRenderPipelineState> pipelineState;
|
||||
@property (retain) NSMutableArray<NSMutableDictionary*>* commandQueueCache;
|
||||
@property (readonly) NSLock* commandQueueCacheLock;
|
||||
@property (readonly) MTLPixelFormat pixelFormat;
|
||||
|
||||
- (instancetype)initWithDevice:(id<MTLDevice>)device
|
||||
pixelFormat:(MTLPixelFormat)pixFormat;
|
||||
- (id<MTLCommandQueue>)getNextFreeCommandQueue;
|
||||
- (void)returnCommandQueue:(id<MTLCommandQueue>)commandQueue;
|
||||
- (BOOL)containsCommandQueue:(id<MTLCommandQueue>)commandQueue;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MetalDeviceCacheItem
|
||||
|
||||
- (instancetype)initWithDevice:(id<MTLDevice>)device
|
||||
pixelFormat:(MTLPixelFormat)pixFormat;
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
if (self != nil)
|
||||
{
|
||||
_gpuDevice = [device retain];
|
||||
|
||||
_commandQueueCache = [[NSMutableArray alloc] initWithCapacity:kMaxCommandQueues];
|
||||
for (NSUInteger i = 0; (_commandQueueCache != nil) && (i < kMaxCommandQueues); i++)
|
||||
{
|
||||
NSMutableDictionary* commandDict = [NSMutableDictionary dictionary];
|
||||
[commandDict setObject:[NSNumber numberWithBool:NO]
|
||||
forKey:kKey_InUse];
|
||||
|
||||
id<MTLCommandQueue> commandQueue = [_gpuDevice newCommandQueue];
|
||||
[commandDict setObject:commandQueue
|
||||
forKey:kKey_CommandQueue];
|
||||
|
||||
[_commandQueueCache addObject:commandDict];
|
||||
}
|
||||
|
||||
// Load all the shader files with a .metal file extension in the project
|
||||
id<MTLLibrary> defaultLibrary = [[_gpuDevice newDefaultLibrary] autorelease];
|
||||
|
||||
// Load the vertex function from the library
|
||||
id<MTLFunction> vertexFunction = [[defaultLibrary newFunctionWithName:@"vertexShader"] autorelease];
|
||||
|
||||
// Load the fragment function from the library
|
||||
id<MTLFunction> fragmentFunction = [[defaultLibrary newFunctionWithName:@"fragmentShader"] autorelease];
|
||||
|
||||
// Configure a pipeline descriptor that is used to create a pipeline state
|
||||
MTLRenderPipelineDescriptor *pipelineStateDescriptor = [[[MTLRenderPipelineDescriptor alloc] init] autorelease];
|
||||
pipelineStateDescriptor.label = @"Simple Pipeline";
|
||||
pipelineStateDescriptor.vertexFunction = vertexFunction;
|
||||
pipelineStateDescriptor.fragmentFunction = fragmentFunction;
|
||||
pipelineStateDescriptor.colorAttachments[0].pixelFormat = pixFormat;
|
||||
_pixelFormat = pixFormat;
|
||||
|
||||
NSError* error = nil;
|
||||
_pipelineState = [_gpuDevice newRenderPipelineStateWithDescriptor:pipelineStateDescriptor
|
||||
error:&error];
|
||||
if (error != nil)
|
||||
{
|
||||
NSLog (@"Error generating brightness pipeline state: %@", error);
|
||||
}
|
||||
|
||||
if (_commandQueueCache != nil)
|
||||
{
|
||||
_commandQueueCacheLock = [[NSLock alloc] init];
|
||||
}
|
||||
|
||||
if ((_gpuDevice == nil) || (_commandQueueCache == nil) || (_commandQueueCacheLock == nil) ||
|
||||
(_pipelineState == nil))
|
||||
{
|
||||
[self release];
|
||||
self = nil;
|
||||
}
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[_gpuDevice release];
|
||||
[_commandQueueCache release];
|
||||
[_commandQueueCacheLock release];
|
||||
[_pipelineState release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id<MTLCommandQueue>)getNextFreeCommandQueue
|
||||
{
|
||||
id<MTLCommandQueue> result = nil;
|
||||
|
||||
[_commandQueueCacheLock lock];
|
||||
NSUInteger index = 0;
|
||||
while ((result == nil) && (index < kMaxCommandQueues))
|
||||
{
|
||||
NSMutableDictionary* nextCommandQueue = [_commandQueueCache objectAtIndex:index];
|
||||
NSNumber* inUse = [nextCommandQueue objectForKey:kKey_InUse];
|
||||
if (![inUse boolValue])
|
||||
{
|
||||
[nextCommandQueue setObject:[NSNumber numberWithBool:YES]
|
||||
forKey:kKey_InUse];
|
||||
result = [nextCommandQueue objectForKey:kKey_CommandQueue];
|
||||
}
|
||||
index++;
|
||||
}
|
||||
[_commandQueueCacheLock unlock];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (void)returnCommandQueue:(id<MTLCommandQueue>)commandQueue
|
||||
{
|
||||
[_commandQueueCacheLock lock];
|
||||
|
||||
BOOL found = false;
|
||||
NSUInteger index = 0;
|
||||
while ((!found) && (index < kMaxCommandQueues))
|
||||
{
|
||||
NSMutableDictionary* nextCommandQueuDict = [_commandQueueCache objectAtIndex:index];
|
||||
id<MTLCommandQueue> nextCommandQueue = [nextCommandQueuDict objectForKey:kKey_CommandQueue];
|
||||
if (nextCommandQueue == commandQueue)
|
||||
{
|
||||
found = YES;
|
||||
[nextCommandQueuDict setObject:[NSNumber numberWithBool:NO]
|
||||
forKey:kKey_InUse];
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
[_commandQueueCacheLock unlock];
|
||||
}
|
||||
|
||||
- (BOOL)containsCommandQueue:(id<MTLCommandQueue>)commandQueue
|
||||
{
|
||||
BOOL found = NO;
|
||||
NSUInteger index = 0;
|
||||
while ((!found) && (index < kMaxCommandQueues))
|
||||
{
|
||||
NSMutableDictionary* nextCommandQueuDict = [_commandQueueCache objectAtIndex:index];
|
||||
id<MTLCommandQueue> nextCommandQueue = [nextCommandQueuDict objectForKey:kKey_CommandQueue];
|
||||
if (nextCommandQueue == commandQueue)
|
||||
{
|
||||
found = YES;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MetalDeviceCache
|
||||
|
||||
+ (MTLPixelFormat)MTLPixelFormatForImageTile:(FxImageTile*)imageTile
|
||||
{
|
||||
MTLPixelFormat result = MTLPixelFormatRGBA16Float;
|
||||
|
||||
switch (imageTile.ioSurface.pixelFormat)
|
||||
{
|
||||
case kCVPixelFormatType_128RGBAFloat:
|
||||
result = MTLPixelFormatRGBA32Float;
|
||||
break;
|
||||
|
||||
case kCVPixelFormatType_32BGRA:
|
||||
result = MTLPixelFormatBGRA8Unorm;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
+ (MetalDeviceCache*)deviceCache;
|
||||
{
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
gDeviceCache = [[MetalDeviceCache alloc] init];
|
||||
});
|
||||
|
||||
return gDeviceCache;
|
||||
}
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
if (self != nil)
|
||||
{
|
||||
NSArray<id<MTLDevice>>* devices = MTLCopyAllDevices();
|
||||
|
||||
deviceCaches = [[NSMutableArray alloc] initWithCapacity:devices.count];
|
||||
|
||||
for (id<MTLDevice> nextDevice in devices)
|
||||
{
|
||||
MetalDeviceCacheItem* newCacheItem = [[[MetalDeviceCacheItem alloc] initWithDevice:nextDevice
|
||||
pixelFormat:MTLPixelFormatRGBA16Float]
|
||||
autorelease];
|
||||
[deviceCaches addObject:newCacheItem];
|
||||
}
|
||||
|
||||
[devices release];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[deviceCaches release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id<MTLDevice>)deviceWithRegistryID:(uint64_t)registryID
|
||||
{
|
||||
for (MetalDeviceCacheItem* nextCacheItem in deviceCaches)
|
||||
{
|
||||
if (nextCacheItem.gpuDevice.registryID == registryID)
|
||||
{
|
||||
return nextCacheItem.gpuDevice;
|
||||
}
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id<MTLRenderPipelineState>)pipelineStateWithRegistryID:(uint64_t)registryID
|
||||
pixelFormat:(MTLPixelFormat)pixFormat
|
||||
{
|
||||
for (MetalDeviceCacheItem* nextCacheItem in deviceCaches)
|
||||
{
|
||||
if ((nextCacheItem.gpuDevice.registryID == registryID) &&
|
||||
(nextCacheItem.pixelFormat == pixFormat))
|
||||
{
|
||||
return nextCacheItem.pipelineState;
|
||||
}
|
||||
}
|
||||
// Didn't find one, so create one with the right settings
|
||||
NSArray<id<MTLDevice>>* devices = MTLCopyAllDevices();
|
||||
id<MTLDevice> device = nil;
|
||||
for (id<MTLDevice> nextDevice in devices)
|
||||
{
|
||||
if (nextDevice.registryID == registryID)
|
||||
{
|
||||
device = nextDevice;
|
||||
}
|
||||
}
|
||||
|
||||
id<MTLRenderPipelineState> result = nil;
|
||||
if (device != nil)
|
||||
{
|
||||
MetalDeviceCacheItem* newCacheItem = [[[MetalDeviceCacheItem alloc] initWithDevice:device
|
||||
pixelFormat:pixFormat]
|
||||
autorelease];
|
||||
if (newCacheItem != nil)
|
||||
{
|
||||
[deviceCaches addObject:newCacheItem];
|
||||
result = newCacheItem.pipelineState;
|
||||
}
|
||||
}
|
||||
[devices release];
|
||||
return result;
|
||||
}
|
||||
|
||||
- (id<MTLCommandQueue>)commandQueueWithRegistryID:(uint64_t)registryID
|
||||
pixelFormat:(MTLPixelFormat)pixFormat;
|
||||
{
|
||||
for (MetalDeviceCacheItem* nextCacheItem in deviceCaches)
|
||||
{
|
||||
if ((nextCacheItem.gpuDevice.registryID == registryID) &&
|
||||
(nextCacheItem.pixelFormat == pixFormat))
|
||||
{
|
||||
return [nextCacheItem getNextFreeCommandQueue];
|
||||
}
|
||||
}
|
||||
|
||||
// Didn't find one, so create one with the right settings
|
||||
NSArray<id<MTLDevice>>* devices = MTLCopyAllDevices();
|
||||
id<MTLDevice> device = nil;
|
||||
for (id<MTLDevice> nextDevice in devices)
|
||||
{
|
||||
if (nextDevice.registryID == registryID)
|
||||
{
|
||||
device = nextDevice;
|
||||
}
|
||||
}
|
||||
|
||||
id<MTLCommandQueue> result = nil;
|
||||
if (device != nil)
|
||||
{
|
||||
MetalDeviceCacheItem* newCacheItem = [[[MetalDeviceCacheItem alloc] initWithDevice:device
|
||||
pixelFormat:pixFormat]
|
||||
autorelease];
|
||||
if (newCacheItem != nil)
|
||||
{
|
||||
[deviceCaches addObject:newCacheItem];
|
||||
result = [newCacheItem getNextFreeCommandQueue];
|
||||
}
|
||||
}
|
||||
[devices release];
|
||||
return result;
|
||||
}
|
||||
|
||||
- (void)returnCommandQueueToCache:(id<MTLCommandQueue>)commandQueue;
|
||||
{
|
||||
for (MetalDeviceCacheItem* nextCacheItem in deviceCaches)
|
||||
{
|
||||
if ([nextCacheItem containsCommandQueue:commandQueue])
|
||||
{
|
||||
[nextCacheItem returnCommandQueue:commandQueue];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,27 @@
|
||||
#import <CoreImage/CoreImage.h>
|
||||
#import "PGBeautyTypes.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// Stateless, lazy Core Image graph. All masks use red=coverage and image coordinates.
|
||||
/// Caller owns face detection, geometric warping, tracking, and the CIContext/Metal device.
|
||||
/// showMask enables debugChannel 0=skin, 1=teeth, 2=eyes. invertMask affects each preview.
|
||||
/// If the caller blends geometry plus beauty against the original, pass settings.mix=1.
|
||||
@interface PGBeautyRenderer : NSObject
|
||||
- (nullable CIImage *)processImage:(CIImage *)image
|
||||
settings:(PGBeautySettings)settings
|
||||
skinMask:(nullable CIImage *)skinMask
|
||||
teethMask:(nullable CIImage *)teethMask
|
||||
eyeMask:(nullable CIImage *)eyeMask
|
||||
error:(NSError * _Nullable * _Nullable)error;
|
||||
/// Face-based callers supply uncut coverage for smoothly blended color changes.
|
||||
- (nullable CIImage *)processImage:(CIImage *)image
|
||||
settings:(PGBeautySettings)settings
|
||||
skinMask:(nullable CIImage *)skinMask
|
||||
colorMask:(nullable CIImage *)colorMask
|
||||
teethMask:(nullable CIImage *)teethMask
|
||||
eyeMask:(nullable CIImage *)eyeMask
|
||||
error:(NSError * _Nullable * _Nullable)error;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,310 @@
|
||||
#import "PGBeautyRenderer.h"
|
||||
#import <math.h>
|
||||
|
||||
// Original implementation reconstructed from observed processing stages, not vendor
|
||||
// resources. The learned segmentation model and LUTs are deliberately not embedded.
|
||||
static float PGClamp(float v, float lo, float hi) { return isfinite(v) ? fmaxf(lo, fminf(hi, v)) : lo; }
|
||||
static CIImage *PGBlur(CIImage *image, CGFloat radius, CGRect extent) {
|
||||
return [[[image imageByClampingToExtent] imageByApplyingFilter:@"CIGaussianBlur"
|
||||
withInputParameters:@{kCIInputRadiusKey:@(radius)}] imageByCroppingToRect:extent];
|
||||
}
|
||||
static CIColorKernel *PGKernel(NSString *body) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
return [CIColorKernel kernelWithString:body];
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
static CIImage *PGApply(CIColorKernel *kernel, CGRect extent, NSArray *arguments) {
|
||||
return [kernel applyWithExtent:extent arguments:arguments];
|
||||
}
|
||||
static NSDictionary<NSString *, CIColorKernel *> *PGKernels(void) {
|
||||
static NSDictionary *kernels;
|
||||
static dispatch_once_t once;
|
||||
dispatch_once(&once, ^{
|
||||
NSMutableDictionary *k = [NSMutableDictionary dictionary];
|
||||
// The fallback mask observes the shipped G/B overlay > Gaussian high-pass >
|
||||
// repeated hard-light stages. Semantic skin support is independently estimated.
|
||||
k[@"overlay"] = PGKernel(@
|
||||
"kernel vec4 pgGB(__sample p) { vec4 q=unpremultiply(p);"
|
||||
"float g=clamp(q.g*0.5,0.0,1.0); float b=clamp(q.b*0.5,0.0,1.0);"
|
||||
"float v=2.0*g*b; return vec4(v,v,v,1.0); }");
|
||||
k[@"candidate"] = PGKernel(@
|
||||
"kernel vec4 pgCandidate(__sample p,__sample g,__sample b) {"
|
||||
"vec3 c=clamp(unpremultiply(p).rgb,0.0,1.0);"
|
||||
"float y=dot(c,vec3(0.299,0.587,0.114));"
|
||||
"float cb=(c.b-y)*0.564+0.5; float cr=(c.r-y)*0.713+0.5;"
|
||||
"float chroma=exp(-pow((cb-0.415)/0.115,2.0)-pow((cr-0.565)/0.135,2.0));"
|
||||
"float h=clamp(g.r-b.r+0.5,0.0,1.0);"
|
||||
"h=mix(2.0*h*h,1.0-2.0*(1.0-h)*(1.0-h),step(0.5,h));"
|
||||
"h=mix(2.0*h*h,1.0-2.0*(1.0-h)*(1.0-h),step(0.5,h));"
|
||||
"h=mix(2.0*h*h,1.0-2.0*(1.0-h)*(1.0-h),step(0.5,h));"
|
||||
"float band=clamp((h-0.29411765)*2.86516854,0.0,1.0);"
|
||||
"float edges=1.0-smoothstep(0.06,0.26,abs(band-0.59));"
|
||||
"float value=clamp(chroma*smoothstep(0.025,0.15,y)*(0.8+0.2*edges),0.0,1.0);"
|
||||
"return vec4(value,value,value,1.0); }");
|
||||
k[@"mask"] = PGKernel(@
|
||||
"kernel vec4 pgMask(__sample raw,__sample feather,__sample p,__sample b,__sample eyes,__sample teeth,"
|
||||
"float threshold,float softness,float edge,float protection,float invert) {"
|
||||
"float m=clamp(mix(raw.r,feather.r,softness),0.0,1.0);"
|
||||
"float width=0.025+0.24*softness;"
|
||||
"m=smoothstep(max(0.0,threshold-width),min(1.0,threshold+width),m);"
|
||||
"m=mix(m,1.0-m,invert);"
|
||||
"vec3 c=unpremultiply(p).rgb; vec3 l=unpremultiply(b).rgb;"
|
||||
"float structure=length(c-l);"
|
||||
"m*=1.0-edge*smoothstep(0.025,0.19,structure);"
|
||||
"float features=clamp(max(eyes.r,teeth.r),0.0,1.0);"
|
||||
"m*=1.0-protection*features;"
|
||||
"return vec4(m,m,m,1.0); }");
|
||||
// Independent frequency separation: texture and structure bands are compressed
|
||||
// in luminance, with feature/edge attenuation, keeping chroma and alpha stable.
|
||||
k[@"detail"] = PGKernel(@
|
||||
"kernel vec4 pgDetail(__sample p,__sample fine,__sample broad,float strength,float protect) {"
|
||||
"vec4 src=unpremultiply(p); vec3 c=src.rgb;"
|
||||
"vec3 t=unpremultiply(fine).rgb; vec3 b=unpremultiply(broad).rgb;"
|
||||
"vec3 w=vec3(0.299,0.587,0.114);"
|
||||
"float y=dot(c,w); float yf=dot(t,w); float yb=dot(b,w);"
|
||||
"float f=y-yf; float mid=yf-yb; float structure=length(c-b);"
|
||||
"float middle=smoothstep(0.04,0.22,y)*(1.0-smoothstep(0.82,0.98,y));"
|
||||
"float texture=smoothstep(0.001,0.010,abs(f));"
|
||||
"float edge=1.0-smoothstep(0.08,0.26,structure);"
|
||||
"float dark=(1.0-smoothstep(0.16,0.42,y))*smoothstep(0.0015,0.018,abs(f)+0.35*abs(y-yb));"
|
||||
"float light=smoothstep(0.70,0.96,y)*smoothstep(0.0025,0.024,abs(f));"
|
||||
"float ridge=smoothstep(0.10,0.30,structure)*smoothstep(0.002,0.020,abs(f)+0.85*abs(y-yb));"
|
||||
"float feature=max(dark*0.96,max(light*0.52,ridge*0.84));"
|
||||
"float gain=clamp(strength*middle*mix(0.56,0.88,texture),0.0,1.05);"
|
||||
"gain*=1.0-protect*feature*mix(0.42,0.82,texture);"
|
||||
"float delta=-gain*(f*mix(0.18,0.76,edge)+mid*mix(0.08,0.30,edge));"
|
||||
"float target=clamp(y+delta,0.0,1.0); float ratio=clamp(target/max(y,0.001),0.82,1.18);"
|
||||
"vec3 outColor=c*mix(1.0,ratio,0.88);"
|
||||
"outColor+=vec3((target-dot(outColor,w))*0.08);"
|
||||
"return premultiply(vec4(clamp(outColor,0.0,1.0),src.a)); }");
|
||||
k[@"maskedMix"] = PGKernel(@
|
||||
"kernel vec4 pgMaskedMix(__sample source,__sample effect,__sample mask,float amount) {"
|
||||
"vec4 s=unpremultiply(source); vec4 e=unpremultiply(effect);"
|
||||
"return premultiply(vec4(mix(s.rgb,e.rgb,clamp(mask.r*amount,0.0,1.0)),s.a)); }");
|
||||
// Keep smoothing support separate from the exposure/color mask. The
|
||||
// two new controls independently release feature cutouts and background.
|
||||
k[@"smoothingSupport"] = PGKernel(@
|
||||
"kernel vec4 pgSmoothingSupport(__sample protectedMask,__sample baseMask,float featureProtection,float skinProtection) {"
|
||||
"float base=clamp(baseMask.r,0.0,1.0);float protectedValue=clamp(protectedMask.r,0.0,1.0);"
|
||||
"float value=mix(base,protectedValue,featureProtection);"
|
||||
"if(skinProtection<1.0){float extended=1.0-skinProtection*(1.0-base);"
|
||||
"float retention=base>0.00001?clamp(protectedValue/base,0.0,1.0):1.0;"
|
||||
"value=extended*mix(1.0,retention,featureProtection);}"
|
||||
"return vec4(value,value,value,1.0); }");
|
||||
k[@"microDetail"] = PGKernel(@
|
||||
"kernel vec4 pgMicroDetail(__sample processed,__sample original,__sample low,__sample coverage,float amount) {"
|
||||
"vec4 outPixel=unpremultiply(processed);vec3 src=unpremultiply(original).rgb;"
|
||||
"vec3 high=src-unpremultiply(low).rgb;vec3 weights=vec3(0.299,0.587,0.114);"
|
||||
"float y=dot(src,weights);float detailY=dot(high,weights);float size=length(high);"
|
||||
"float lightGate=smoothstep(0.07,0.22,y)*(1.0-smoothstep(0.86,0.99,y));"
|
||||
"float textureGate=smoothstep(0.0015,0.010,size)*(1.0-smoothstep(0.16,0.36,size));"
|
||||
"float gain=amount*clamp(coverage.r,0.0,1.0)*lightGate*textureGate*1.18;"
|
||||
"vec3 detail=vec3(detailY*0.92)+(high-vec3(detailY))*0.28;"
|
||||
"return premultiply(vec4(clamp(outPixel.rgb+detail*gain,0.0,1.0),outPixel.a)); }");
|
||||
k[@"colorCoverage"] = PGKernel(@
|
||||
"kernel vec4 pgColorCoverage(__sample coverage,__sample image,float invert) {"
|
||||
"vec3 c=unpremultiply(image).rgb; float y=dot(c,vec3(0.299,0.587,0.114));"
|
||||
"float cb=(c.b-y)*0.564+0.5; float cr=(c.r-y)*0.713+0.5;"
|
||||
"float likelihood=exp(-pow((cb-0.415)/0.115,2.0)-pow((cr-0.565)/0.135,2.0));"
|
||||
"float v=clamp(coverage.r,0.0,1.0)*smoothstep(0.05,0.60,likelihood);"
|
||||
"v=mix(v,1.0-v,invert); return vec4(v,v,v,1.0); }");
|
||||
k[@"even"] = PGKernel(@
|
||||
"kernel vec4 pgEven(__sample source,__sample broad,float amount) {"
|
||||
"vec4 s=unpremultiply(source); vec3 b=unpremultiply(broad).rgb;"
|
||||
"vec3 w=vec3(0.299,0.587,0.114); float y=dot(s.rgb,w); float yb=dot(b,w);"
|
||||
"vec3 baseChroma=s.rgb-vec3(y); vec3 smoothChroma=b-vec3(yb);"
|
||||
"float guard=1.0-smoothstep(0.12,0.35,length(s.rgb-b));"
|
||||
"vec3 c=vec3(y)+mix(baseChroma,smoothChroma,amount*0.78*guard);"
|
||||
"return premultiply(vec4(clamp(c,0.0,1.0),s.a)); }");
|
||||
// These six looks are newly authored color transforms, not the shipped LUTs.
|
||||
k[@"preset"] = PGKernel(@
|
||||
"kernel vec4 pgPreset(__sample source,float preset) {"
|
||||
"vec4 s=unpremultiply(source); vec3 c=s.rgb; float y=dot(c,vec3(0.299,0.587,0.114));"
|
||||
"if(preset<1.5){c=mix(vec3(y),c,0.91);c+=vec3(0.038,0.027,0.012)*(1.0-y);}"
|
||||
"else if(preset<2.5){c=mix(vec3(y),c,0.89);c+=vec3(0.003,0.020,0.038)*(1.0-y);}"
|
||||
"else if(preset<3.5){c=mix(vec3(y),c,1.04);c+=vec3(0.037,0.011,-0.018)*(1.0-y);}"
|
||||
"else if(preset<4.5){c=mix(vec3(y),c,0.94);c+=vec3(0.032,0.001,0.018)*(1.0-y);}"
|
||||
"else if(preset<5.5){c=pow(max(c,vec3(0.0)),vec3(1.08));c+=vec3(0.024,0.003,-0.018)*(1.0-y);}"
|
||||
"else{c=pow(max(c,vec3(0.0)),vec3(1.20));c=mix(vec3(dot(c,vec3(0.299,0.587,0.114))),c,1.06);"
|
||||
"c+=vec3(0.030,0.007,-0.022)*(1.0-y);}"
|
||||
"return premultiply(vec4(clamp(c,0.0,1.0),s.a)); }");
|
||||
k[@"teeth"] = PGKernel(@
|
||||
"kernel vec4 pgTeeth(__sample source,__sample mask,float amount) {"
|
||||
"vec4 s=unpremultiply(source);vec3 c=clamp(s.rgb,0.0,1.0);"
|
||||
"float y=dot(c,vec3(0.299,0.587,0.114));float hi=max(c.r,max(c.g,c.b));float lo=min(c.r,min(c.g,c.b));"
|
||||
"float sat=(hi-lo)/max(hi,0.0001);"
|
||||
"float gate=smoothstep(0.26,0.56,max(y,hi*0.86))*(1.0-smoothstep(0.52,0.86,sat));"
|
||||
"float weight=clamp(pow(max(0.0,smoothstep(0.08,0.92,mask.r)*gate*amount),0.90)*(1.02+0.18*amount),0.0,0.88);"
|
||||
"float yellow=max(0.0,(c.r+c.g)*0.5-c.b);"
|
||||
"vec3 neutral=mix(c,vec3(y),0.16+0.22*amount);"
|
||||
"neutral+=yellow*vec3(-0.070*amount,-0.028*amount,0.18+0.28*amount);"
|
||||
"neutral+=(vec3(1.0)-neutral)*(0.045+0.155*amount);"
|
||||
"return premultiply(vec4(mix(c,clamp(neutral,0.0,1.0),weight),s.a)); }");
|
||||
k[@"eyes"] = PGKernel(@
|
||||
"kernel vec4 pgEyes(__sample source,__sample mask,float amount) {"
|
||||
"vec4 s=unpremultiply(source);float y=dot(s.rgb,vec3(0.299,0.587,0.114));"
|
||||
"float weight=clamp(mask.r,0.0,1.0)*amount*smoothstep(0.08,0.32,y);"
|
||||
"vec3 c=s.rgb+(vec3(1.0)-s.rgb)*(0.18*weight);"
|
||||
"return premultiply(vec4(clamp(c,0.0,1.0),s.a)); }");
|
||||
k[@"debug"] = PGKernel(@
|
||||
"kernel vec4 pgDebug(__sample source,__sample mask,float invert) {"
|
||||
"vec4 s=unpremultiply(source);float m=clamp(mask.r,0.0,1.0);"
|
||||
"m=mix(m,1.0-m,invert);return premultiply(vec4(vec3(m),s.a)); }");
|
||||
kernels = [k copy];
|
||||
});
|
||||
return kernels;
|
||||
}
|
||||
|
||||
@implementation PGBeautyRenderer
|
||||
- (CIImage *)processImage:(CIImage *)image settings:(PGBeautySettings)s
|
||||
skinMask:(CIImage *)skinMask teethMask:(CIImage *)teethMask
|
||||
eyeMask:(CIImage *)eyeMask error:(NSError **)error {
|
||||
return [self processImage:image settings:s skinMask:skinMask colorMask:nil teethMask:teethMask eyeMask:eyeMask error:error];
|
||||
}
|
||||
- (CIImage *)processImage:(CIImage *)image settings:(PGBeautySettings)s
|
||||
skinMask:(CIImage *)skinMask colorMask:(CIImage *)colorMask
|
||||
teethMask:(CIImage *)teethMask eyeMask:(CIImage *)eyeMask error:(NSError **)error {
|
||||
if (error) *error = nil;
|
||||
CGRect extent = image.extent;
|
||||
if (!image || CGRectIsEmpty(extent) || CGRectIsInfinite(extent) ||
|
||||
!isfinite(extent.origin.x) || !isfinite(extent.origin.y) ||
|
||||
!isfinite(extent.size.width) || !isfinite(extent.size.height)) {
|
||||
if (error) *error = [NSError errorWithDomain:@"PGBeautyRenderer" code:1
|
||||
userInfo:@{NSLocalizedDescriptionKey:@"The source image needs a finite nonempty extent."}];
|
||||
return nil;
|
||||
}
|
||||
float mix = PGClamp(s.mix, 0, 1);
|
||||
if (mix == 0 && !s.showMask) return image;
|
||||
NSDictionary *k = PGKernels();
|
||||
if (k.count != 13) {
|
||||
if (error) *error = [NSError errorWithDomain:@"PGBeautyRenderer" code:2
|
||||
userInfo:@{NSLocalizedDescriptionKey:@"The beauty image kernels could not be compiled."}];
|
||||
return nil;
|
||||
}
|
||||
@try {
|
||||
float amount = PGClamp(s.amount,0,1);
|
||||
float local = PGClamp(s.midtoneDetail,0,2)*0.5f;
|
||||
float global = PGClamp(s.highPassDetail,0,1);
|
||||
float brightness = PGClamp(s.skinBrightness,0,1);
|
||||
float hue = PGClamp(s.skinHue,-30,30);
|
||||
float saturation = PGClamp(s.skinSaturation,-100,100);
|
||||
float even = PGClamp(s.skinEvenTone,0,1);
|
||||
float sharpness = PGClamp(s.sharpness,0,2);
|
||||
float teeth = PGClamp(s.teethWhitening,0,1);
|
||||
float eyes = PGClamp(s.eyeBrightening,0,1);
|
||||
float protection = s.featureProtection ? PGClamp(s.featureProtectionAmount,0,1) : 0;
|
||||
float skinProtection = PGClamp(s.nonSkinProtection,0,1);
|
||||
float micro = PGClamp(s.microDetail,0,1)*amount;
|
||||
BOOL needsSkin = local*amount>0 || micro>0 || brightness>0 || hue!=0 || saturation!=0 || even>0 ||
|
||||
(s.skinTonePreset>0 && s.skinTonePreset<=6) || (s.showMask && s.debugChannel==0);
|
||||
CIImage *black = [[CIImage imageWithColor:[CIColor colorWithRed:0 green:0 blue:0 alpha:1]] imageByCroppingToRect:extent];
|
||||
CIImage *teethInput = teethMask ? [teethMask imageByCroppingToRect:extent] : black;
|
||||
CIImage *eyeInput = eyeMask ? [eyeMask imageByCroppingToRect:extent] : black;
|
||||
CIImage *raw = skinMask ? [skinMask imageByCroppingToRect:extent] : black;
|
||||
CIImage *mask = black;
|
||||
CGFloat radius = PGClamp(s.radius,1,40);
|
||||
if (needsSkin) {
|
||||
if (!skinMask) {
|
||||
CIImage *gb = PGApply(k[@"overlay"],extent,@[image]);
|
||||
raw = PGApply(k[@"candidate"],extent,@[image,gb,PGBlur(gb,radius,extent)]);
|
||||
}
|
||||
float soft = PGClamp(s.maskSoftness,0,1);
|
||||
float threshold = PGClamp(s.maskThreshold,0,255)/255.f;
|
||||
mask = PGApply(k[@"mask"],extent,@[raw,PGBlur(raw,0.35+soft*radius*0.35,extent),
|
||||
image,PGBlur(image,1.5,extent),eyeInput,teethInput,
|
||||
@(threshold),@(soft),@(PGClamp(s.maskEdgeProtect,0,1)),
|
||||
@(s.featureProtection ? 1 : 0),@(s.invertMask ? 1 : 0)]);
|
||||
}
|
||||
if (s.showMask) {
|
||||
// Popup values select coverage source; changing the popup alone must
|
||||
// never enable a preview. Feature masks retain their supplied coverage.
|
||||
CIImage *preview = s.debugChannel==1 ? teethInput : (s.debugChannel==2 ? eyeInput : mask);
|
||||
float invert = s.debugChannel==1 || s.debugChannel==2 ? (s.invertMask ? 1 : 0) : 0;
|
||||
return PGApply(k[@"debug"],extent,@[image,preview,@(invert)]);
|
||||
}
|
||||
CIImage *smoothingMask=mask;
|
||||
if((local*amount>0 || micro>0) && (protection<1 || skinProtection<1)) {
|
||||
CIImage *baseRaw=colorMask ? [colorMask imageByCroppingToRect:extent] : raw;
|
||||
float soft=PGClamp(s.maskSoftness,0,1);
|
||||
CIImage *baseMask=PGApply(k[@"mask"],extent,@[baseRaw,PGBlur(baseRaw,0.35+soft*radius*0.35,extent),
|
||||
image,PGBlur(image,1.5,extent),eyeInput,teethInput,
|
||||
@(PGClamp(s.maskThreshold,0,255)/255.f),@(soft),@(PGClamp(s.maskEdgeProtect,0,1)),@0,@(s.invertMask?1:0)]);
|
||||
smoothingMask=PGApply(k[@"smoothingSupport"],extent,@[mask,baseMask,@(protection),@(skinProtection)]);
|
||||
}
|
||||
// Detail protection may contain small eye, brow, nose and lip cutouts.
|
||||
// Exposure and color must not reuse those holes or sharpen a face ellipse
|
||||
// with the detail threshold; that creates visible rings and islands.
|
||||
CIImage *toneMask=mask;
|
||||
BOOL changesColor=brightness>0 || hue!=0 || saturation!=0 || even>0 ||
|
||||
(s.skinTonePreset>0 && s.skinTonePreset<=6);
|
||||
if(!colorMask && changesColor && s.featureProtection) {
|
||||
// Standalone callers may not supply the separate uncut coverage.
|
||||
// At least keep our eye/teeth cutouts out of their color adjustment.
|
||||
float soft=PGClamp(s.maskSoftness,0,1);
|
||||
toneMask=PGApply(k[@"mask"],extent,@[raw,PGBlur(raw,0.35+soft*radius*0.35,extent),
|
||||
image,PGBlur(image,1.5,extent),eyeInput,teethInput,
|
||||
@(PGClamp(s.maskThreshold,0,255)/255.f),@(soft),@(PGClamp(s.maskEdgeProtect,0,1)),@0,@(s.invertMask?1:0)]);
|
||||
}
|
||||
if(colorMask && changesColor) {
|
||||
CGFloat feather=MAX(3,MIN(extent.size.width,extent.size.height)*0.03);
|
||||
CIImage *support=[colorMask imageByCroppingToRect:extent];
|
||||
toneMask=PGApply(k[@"colorCoverage"],extent,@[PGBlur(support,feather,extent),
|
||||
PGBlur(image,MAX(1,feather*0.15),extent),@(s.invertMask?1:0)]);
|
||||
}
|
||||
CIImage *result = image;
|
||||
if (local*amount>0) {
|
||||
// The shipped helper derives both blur scales from the detail strength.
|
||||
CGFloat fine = fmin(7.4,2.275+3.15*pow(local,0.72)+0.95*local);
|
||||
CGFloat broad = fmin(16,(2.55+0.45*local)*fine+1.1+1.3*local);
|
||||
float compression = 0.12+2.4*powf(local,2.15)+1.25*local;
|
||||
CIImage *detail = PGApply(k[@"detail"],extent,@[result,PGBlur(result,fine,extent),
|
||||
PGBlur(result,broad,extent),@(compression),@(protection)]);
|
||||
result = PGApply(k[@"maskedMix"],extent,@[result,detail,smoothingMask,@(amount)]);
|
||||
}
|
||||
if(micro>0) {
|
||||
CGFloat fine=fmin(7.4,2.275+3.15*pow(local,0.72)+0.95*local);
|
||||
result=PGApply(k[@"microDetail"],extent,@[result,image,PGBlur(image,fine,extent),smoothingMask,@(micro)]);
|
||||
}
|
||||
CIImage *color = result;
|
||||
if (brightness>0) {
|
||||
float shoulder = PGClamp((brightness-0.56f)/0.44f,0,1);
|
||||
float gain = 0.88f*powf(brightness,1.24f)+0.12f*shoulder*shoulder*(3-2*shoulder);
|
||||
color = [color imageByApplyingFilter:@"CIExposureAdjust" withInputParameters:@{kCIInputEVKey:@(gain*0.95f)}];
|
||||
}
|
||||
if (hue!=0) color = [color imageByApplyingFilter:@"CIHueAdjust" withInputParameters:@{kCIInputAngleKey:@(hue*M_PI/180.0)}];
|
||||
if (saturation!=0) color = [color imageByApplyingFilter:@"CIColorControls" withInputParameters:@{kCIInputSaturationKey:@(1+saturation/100.f)}];
|
||||
if (even>0) color = PGApply(k[@"even"],extent,@[color,PGBlur(color,radius*1.8,extent),@(even)]);
|
||||
if (color!=result) result = PGApply(k[@"maskedMix"],extent,@[result,color,toneMask,@1]);
|
||||
if (sharpness*amount>0) result = [result imageByApplyingFilter:@"CISharpenLuminance"
|
||||
withInputParameters:@{kCIInputSharpnessKey:@(sharpness*amount)}];
|
||||
if (s.skinTonePreset>0 && s.skinTonePreset<=6) {
|
||||
CIImage *preset = PGApply(k[@"preset"],extent,@[result,@(s.skinTonePreset)]);
|
||||
result = PGApply(k[@"maskedMix"],extent,@[result,preset,toneMask,@1]);
|
||||
}
|
||||
if (global>0) {
|
||||
CGFloat fine = fmin(7.4,2.275+3.15*pow(global,0.72)+0.95*global);
|
||||
CGFloat broad = fmin(16,(2.55+0.45*global)*fine+1.1+1.3*global);
|
||||
float compression = 0.12+2.4*powf(global,2.15)+1.25*global;
|
||||
result = PGApply(k[@"detail"],extent,@[result,PGBlur(result,fine,extent),
|
||||
PGBlur(result,broad,extent),@(compression),@0]);
|
||||
}
|
||||
if (teeth>0 && teethMask) result = PGApply(k[@"teeth"],extent,@[result,teethInput,@(teeth)]);
|
||||
if (eyes>0 && eyeMask) result = PGApply(k[@"eyes"],extent,@[result,eyeInput,@(eyes)]);
|
||||
if (mix<1) {
|
||||
CIImage *white = [[CIImage imageWithColor:[CIColor colorWithRed:1 green:1 blue:1 alpha:1]] imageByCroppingToRect:extent];
|
||||
result = PGApply(k[@"maskedMix"],extent,@[image,result,white,@(mix)]);
|
||||
}
|
||||
if (!result) {
|
||||
if (error) *error = [NSError errorWithDomain:@"PGBeautyRenderer" code:3
|
||||
userInfo:@{NSLocalizedDescriptionKey:@"Core Image could not construct the beauty render graph."}];
|
||||
return nil;
|
||||
}
|
||||
return [result imageByCroppingToRect:extent];
|
||||
} @catch (NSException *exception) {
|
||||
if (error) *error = [NSError errorWithDomain:@"PGBeautyRenderer" code:4
|
||||
userInfo:@{NSLocalizedDescriptionKey:exception.reason ?: @"Invalid Core Image render state."}];
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <math.h>
|
||||
|
||||
// Persisted FxPlug render state. Append fields and bump version for migrations.
|
||||
typedef struct {
|
||||
uint32_t version;
|
||||
float amount, skinBrightness, skinHue, skinSaturation, skinEvenTone;
|
||||
float midtoneDetail, highPassDetail, teethWhitening, eyeBrightening;
|
||||
float radius, sharpness, mix, maskThreshold, maskSoftness, maskEdgeProtect;
|
||||
float faceThin, faceBigEye, faceShort, faceNarrow, faceChin, faceV;
|
||||
float faceJaw, faceCheekbone, faceSmallHead, faceSmallHeadRange;
|
||||
float faceJumpGuardRange, selectionX, selectionY;
|
||||
uint32_t featureProtection, skinTonePreset, showMask, invertMask, debugChannel;
|
||||
uint32_t showFaceBoxes, showTrackBox, singleFace, fastMultiFace, trackingEnabled, targetIndex;
|
||||
// v2 keeps the entire 160-byte v1 prefix, including legacy bool/strength IDs.
|
||||
float featureProtectionAmount, nonSkinProtection, microDetail;
|
||||
} PGBeautySettings;
|
||||
|
||||
enum { PGBeautySettingsV1Size = 160, PGBeautySettingsVersion = 2 };
|
||||
_Static_assert(offsetof(PGBeautySettings,featureProtectionAmount)==PGBeautySettingsV1Size,
|
||||
"The v1 render-state prefix must remain stable");
|
||||
|
||||
static inline PGBeautySettings PGBeautyDefaults(void) {
|
||||
PGBeautySettings s = {0};
|
||||
s.version = PGBeautySettingsVersion;
|
||||
s.amount = 1.0f;
|
||||
s.radius = 8.0f;
|
||||
s.mix = 1.0f;
|
||||
s.maskThreshold = 148.0f;
|
||||
s.maskSoftness = 0.6f;
|
||||
s.maskEdgeProtect = 0.4f;
|
||||
s.featureProtection = 1;
|
||||
s.featureProtectionAmount = 1;
|
||||
s.nonSkinProtection = 1;
|
||||
s.faceJumpGuardRange = 1.8f;
|
||||
s.selectionX = s.selectionY = 0.5f;
|
||||
return s;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreImage/CoreImage.h>
|
||||
#import <CoreMedia/CoreMedia.h>
|
||||
#import <Vision/Vision.h>
|
||||
#import "PGBeautyTypes.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface PGFaceFrame : NSObject
|
||||
/// Vision observations in normalized, bottom-left image coordinates. Restored
|
||||
/// observations retain their bounding box; render geometry is stored separately.
|
||||
@property (nonatomic, copy, readonly) NSArray<VNFaceObservation *> *faces;
|
||||
/// Stable, normalized control geometry used for image and mask deformation.
|
||||
/// Default realtime processing deforms one primary face while faces/masks may
|
||||
/// cover all current detections. Explicit fast-multi mode deforms every face.
|
||||
@property (nonatomic, copy, readonly) NSArray<NSDictionary *> *deformationGeometry;
|
||||
@property (nonatomic, strong, readonly) CIImage *skinMask;
|
||||
/// Continuous face support before eye/nose/lip detail-protection cutouts.
|
||||
@property (nonatomic, strong, readonly) CIImage *colorMask;
|
||||
@property (nonatomic, strong, readonly) CIImage *teethMask;
|
||||
@property (nonatomic, strong, readonly) CIImage *eyeMask;
|
||||
@property (nonatomic, strong, readonly) CIImage *image;
|
||||
/// Transparent face/target outlines, for compositing after beauty processing.
|
||||
@property (nonatomic, strong, readonly) CIImage *overlayImage;
|
||||
@end
|
||||
|
||||
@interface PGFaceProcessor : NSObject
|
||||
- (nullable PGFaceFrame *)processImage:(CIImage *)image
|
||||
settings:(PGBeautySettings)settings
|
||||
time:(CMTime)time
|
||||
error:(NSError * _Nullable * _Nullable)error;
|
||||
- (BOOL)analyzeImage:(CIImage *)image
|
||||
settings:(PGBeautySettings)settings
|
||||
time:(CMTime)time
|
||||
error:(NSError * _Nullable * _Nullable)error;
|
||||
- (void)resetTracking;
|
||||
/// Targets are zero-based (0, 1, 2). Data is a versioned property-list archive,
|
||||
/// independent of Vision implementation classes. Only analysis writes these
|
||||
/// persisted frames; realtime geometry has a separate bounded, in-memory cache.
|
||||
- (nullable NSData *)trackingDataForTarget:(NSUInteger)target;
|
||||
- (void)setTrackingData:(nullable NSData *)data forTarget:(NSUInteger)target;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,752 @@
|
||||
// The source kernels remain available on the supported macOS 12+ range. This
|
||||
// keeps the processor self contained instead of requiring a separate metallib.
|
||||
#define CI_SILENCE_GL_DEPRECATION 1
|
||||
#import "PGFaceProcessor.h"
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
static NSString * const PGFaceErrorDomain = @"media.dayu.PaintFCP.Face";
|
||||
// Contour origin / internal anchor, in the reference's recovered pin order.
|
||||
// The unused middle entry of each reference triplet is intentionally omitted.
|
||||
static const uint8_t PGThinPins[17][2] = {
|
||||
{75,6},{59,13},{74,47},{60,47},{73,47},{61,47},
|
||||
{72,48},{62,48},{71,48},{63,48},{70,49},{64,49},
|
||||
{69,49},{65,49},{68,52},{66,52},{67,47}
|
||||
};
|
||||
static const uint8_t PGChinPins[3][2] = {{68,38},{67,37},{66,36}};
|
||||
// Origin and radius neighbour; all six directions point toward landmark 29.
|
||||
static const uint8_t PGJawPins[6][2] = {{72,71},{62,63},{71,70},{63,64},{70,71},{64,63}};
|
||||
|
||||
@interface PGFaceFrame ()
|
||||
@property (nonatomic, copy, readwrite) NSArray<VNFaceObservation *> *faces;
|
||||
@property (nonatomic, copy, readwrite) NSArray<NSDictionary *> *deformationGeometry;
|
||||
@property (nonatomic, strong, readwrite) CIImage *skinMask;
|
||||
@property (nonatomic, strong, readwrite) CIImage *colorMask;
|
||||
@property (nonatomic, strong, readwrite) CIImage *teethMask;
|
||||
@property (nonatomic, strong, readwrite) CIImage *eyeMask;
|
||||
@property (nonatomic, strong, readwrite) CIImage *image;
|
||||
@property (nonatomic, strong, readwrite) CIImage *overlayImage;
|
||||
@end
|
||||
@implementation PGFaceFrame
|
||||
@end
|
||||
|
||||
// All geometry in stored records is normalized to the full source image, with
|
||||
// Y increasing upward. Pixel size, render scale and tile order are not persisted.
|
||||
static NSString *PGTimeKey(CMTime time) {
|
||||
if (!CMTIME_IS_NUMERIC(time) || time.timescale <= 0) return nil;
|
||||
int64_t a = time.value, b = time.timescale;
|
||||
// Unsigned magnitude avoids overflow for the minimum signed integer.
|
||||
uint64_t u = a < 0 ? (uint64_t)(-(a + 1)) + 1 : (uint64_t)a;
|
||||
uint64_t v = (uint64_t)b;
|
||||
while (v) { uint64_t r = u % v; u = v; v = r; }
|
||||
int64_t divisor = (int64_t)(u ?: 1);
|
||||
return [NSString stringWithFormat:@"%lld/%lld/%lld", (long long)(a / divisor),
|
||||
(long long)(b / divisor), (long long)time.epoch];
|
||||
}
|
||||
|
||||
static float PGClamp(float value, float low, float high) {
|
||||
return isfinite(value) ? fminf(high, fmaxf(low, value)) : 0;
|
||||
}
|
||||
static NSArray *PGRectArray(CGRect rect) {
|
||||
return @[@(rect.origin.x), @(rect.origin.y), @(rect.size.width), @(rect.size.height)];
|
||||
}
|
||||
static CGRect PGArrayRect(NSArray *array) {
|
||||
if (![array isKindOfClass:NSArray.class] || array.count != 4) return CGRectZero;
|
||||
for (id value in array) if (![value isKindOfClass:NSNumber.class] || !isfinite([value doubleValue])) return CGRectZero;
|
||||
return CGRectMake([array[0] doubleValue], [array[1] doubleValue], [array[2] doubleValue], [array[3] doubleValue]);
|
||||
}
|
||||
static BOOL PGValidRect(CGRect rect) {
|
||||
return rect.size.width > 0.001 && rect.size.height > 0.001 &&
|
||||
rect.origin.x >= -0.1 && rect.origin.y >= -0.1 && CGRectGetMaxX(rect) <= 1.1 && CGRectGetMaxY(rect) <= 1.1;
|
||||
}
|
||||
static CGPoint PGCenter(CGRect rect) { return CGPointMake(CGRectGetMidX(rect), CGRectGetMidY(rect)); }
|
||||
static NSArray *PGRegion(VNFaceLandmarkRegion2D *region, CGRect box) {
|
||||
if (!region || region.pointCount == 0) return @[];
|
||||
NSMutableArray *points = [NSMutableArray arrayWithCapacity:region.pointCount];
|
||||
const CGPoint *p = region.normalizedPoints;
|
||||
if (!p) return @[];
|
||||
for (NSUInteger i = 0; i < MIN(region.pointCount, 256); i++) {
|
||||
if (isfinite(p[i].x) && isfinite(p[i].y)) {
|
||||
[points addObject:@[@(box.origin.x + p[i].x * box.size.width),
|
||||
@(box.origin.y + p[i].y * box.size.height)]];
|
||||
}
|
||||
}
|
||||
return points;
|
||||
}
|
||||
// This optional field has a fixed topology. Never remove an invalid point and
|
||||
// shift the remaining indices: the local pins refer to exact Vision 76 indices.
|
||||
static NSArray *PGSanitizedPoints76(id value) {
|
||||
if (![value isKindOfClass:NSArray.class] || [value count] != 76) return nil;
|
||||
NSMutableArray *points = [NSMutableArray arrayWithCapacity:76];
|
||||
for (id point in value) {
|
||||
if (![point isKindOfClass:NSArray.class] || [point count] != 2) return nil;
|
||||
for (id coordinate in point) {
|
||||
if (![coordinate isKindOfClass:NSNumber.class] || !isfinite([coordinate doubleValue]) || fabs([coordinate doubleValue]) > 2) return nil;
|
||||
}
|
||||
[points addObject:[point copy]];
|
||||
}
|
||||
return [points copy];
|
||||
}
|
||||
static NSArray *PGFullPoints76(VNFaceLandmarkRegion2D *region, CGRect box) {
|
||||
if (region.pointCount != 76 || !region.normalizedPoints) return nil;
|
||||
const CGPoint *raw = region.normalizedPoints;
|
||||
NSMutableArray *points = [NSMutableArray arrayWithCapacity:76];
|
||||
for (NSUInteger i=0; i<76; i++) {
|
||||
if (!isfinite(raw[i].x) || !isfinite(raw[i].y)) return nil;
|
||||
[points addObject:@[@(box.origin.x+raw[i].x*box.size.width),
|
||||
@(box.origin.y+raw[i].y*box.size.height)]];
|
||||
}
|
||||
return PGSanitizedPoints76(points);
|
||||
}
|
||||
static NSDictionary *PGGeometry(VNFaceObservation *observation) {
|
||||
CGRect box = observation.boundingBox;
|
||||
VNFaceLandmarks2D *lm = observation.landmarks;
|
||||
NSMutableDictionary *geometry = [@{@"box": PGRectArray(box),
|
||||
@"leftEye": PGRegion(lm.leftEye, box), @"rightEye": PGRegion(lm.rightEye, box),
|
||||
@"leftBrow": PGRegion(lm.leftEyebrow, box), @"rightBrow": PGRegion(lm.rightEyebrow, box),
|
||||
@"nose": PGRegion(lm.nose, box), @"lips": PGRegion(lm.outerLips, box),
|
||||
@"mouth": PGRegion(lm.innerLips, box), @"contour": PGRegion(lm.faceContour, box)} mutableCopy];
|
||||
NSArray *points = PGFullPoints76(lm.allPoints, box);
|
||||
if (points) geometry[@"points76"] = points;
|
||||
return [geometry copy];
|
||||
}
|
||||
static NSDictionary *PGSanitizedGeometry(id value) {
|
||||
if (![value isKindOfClass:NSDictionary.class]) return nil;
|
||||
CGRect box = PGArrayRect(value[@"box"]);
|
||||
if (!PGValidRect(box)) return nil;
|
||||
NSMutableDictionary *result = [NSMutableDictionary dictionaryWithObject:PGRectArray(box) forKey:@"box"];
|
||||
for (NSString *name in @[@"leftEye", @"rightEye", @"leftBrow", @"rightBrow", @"nose", @"lips", @"mouth", @"contour"]) {
|
||||
id raw = value[name];
|
||||
if (![raw isKindOfClass:NSArray.class] || [raw count] > 256) return nil;
|
||||
NSMutableArray *points = [NSMutableArray array];
|
||||
for (id point in raw) {
|
||||
if (![point isKindOfClass:NSArray.class] || [point count] != 2) return nil;
|
||||
for (id coordinate in point) if (![coordinate isKindOfClass:NSNumber.class] || !isfinite([coordinate doubleValue]) || fabs([coordinate doubleValue]) > 2) return nil;
|
||||
[points addObject:[point copy]];
|
||||
}
|
||||
result[name] = points;
|
||||
}
|
||||
// Old archives and partially detected faces remain usable by the other
|
||||
// controls. Missing or malformed full topology disables the recovered local
|
||||
// thin/chin/jaw/short fields without discarding otherwise usable old records.
|
||||
NSArray *points76 = PGSanitizedPoints76(value[@"points76"]);
|
||||
if (points76) result[@"points76"] = points76;
|
||||
return [result copy];
|
||||
}
|
||||
static CGRect PGRegionBounds(NSDictionary *geometry, NSString *name, CGRect fallback) {
|
||||
NSArray *points = geometry[name];
|
||||
if (points.count == 0) return fallback;
|
||||
CGFloat minX = 2, minY = 2, maxX = -1, maxY = -1;
|
||||
for (NSArray *point in points) {
|
||||
CGFloat x = [point[0] doubleValue], y = [point[1] doubleValue];
|
||||
minX = MIN(minX, x); minY = MIN(minY, y); maxX = MAX(maxX, x); maxY = MAX(maxY, y);
|
||||
}
|
||||
return CGRectMake(minX, minY, MAX(0.001, maxX - minX), MAX(0.001, maxY - minY));
|
||||
}
|
||||
static CGRect PGInFace(CGRect face, CGFloat x, CGFloat y, CGFloat w, CGFloat h) {
|
||||
return CGRectMake(face.origin.x + x * face.size.width, face.origin.y + y * face.size.height,
|
||||
w * face.size.width, h * face.size.height);
|
||||
}
|
||||
static CGRect PGToPixels(CGRect normalized, CGRect extent) {
|
||||
return CGRectMake(extent.origin.x + normalized.origin.x * extent.size.width,
|
||||
extent.origin.y + normalized.origin.y * extent.size.height,
|
||||
normalized.size.width * extent.size.width, normalized.size.height * extent.size.height);
|
||||
}
|
||||
static CIVector *PGVector(CGPoint point) { return [CIVector vectorWithX:point.x Y:point.y]; }
|
||||
static CIImage *PGBlack(CGRect extent) {
|
||||
return [[CIImage imageWithColor:[CIColor colorWithRed:0 green:0 blue:0 alpha:1]] imageByCroppingToRect:extent];
|
||||
}
|
||||
static CIImage *PGTransparent(CGRect extent) {
|
||||
return [[CIImage imageWithColor:[CIColor colorWithRed:0 green:0 blue:0 alpha:0]] imageByCroppingToRect:extent];
|
||||
}
|
||||
static CIImage *PGMaximum(CIImage *a, CIImage *b) {
|
||||
return [a imageByApplyingFilter:@"CIMaximumCompositing" withInputParameters:@{kCIInputBackgroundImageKey:b}];
|
||||
}
|
||||
|
||||
static CMTime PGRecordTime(NSDictionary *record) {
|
||||
return CMTimeMakeWithEpoch([record[@"value"] longLongValue], [record[@"scale"] intValue], [record[@"epoch"] longLongValue]);
|
||||
}
|
||||
static double PGSeedDistance(NSDictionary *record, PGBeautySettings settings) {
|
||||
return hypot([record[@"seedX"] doubleValue]-settings.selectionX, [record[@"seedY"] doubleValue]-settings.selectionY);
|
||||
}
|
||||
static NSArray<NSString *> *PGGeometryRegions(void) {
|
||||
return @[@"leftEye",@"rightEye",@"leftBrow",@"rightBrow",@"nose",@"lips",@"mouth",@"contour"];
|
||||
}
|
||||
static CGPoint PGRemapPoint(NSArray *point, CGRect old, CGRect current) {
|
||||
return CGPointMake(current.origin.x+([point[0] doubleValue]-old.origin.x)*current.size.width/old.size.width,
|
||||
current.origin.y+([point[1] doubleValue]-old.origin.y)*current.size.height/old.size.height);
|
||||
}
|
||||
static NSDictionary *PGStableGeometry(NSDictionary *current, NSDictionary *previous, double dt, BOOL stabilizePoints76) {
|
||||
CGRect old=PGArrayRect(previous[@"box"]),box=PGArrayRect(current[@"box"]);
|
||||
if(!PGValidRect(old) || !PGValidRect(box))return current;
|
||||
// Independent stabilization: translate/scale old landmarks into the current
|
||||
// detection box first, so normal head motion does not accumulate box lag.
|
||||
double weight=.9*fmin(1,fmax(0,dt/.03));
|
||||
CGPoint oldLE=PGCenter(PGRegionBounds(previous,@"leftEye",PGInFace(old,.16,.53,.25,.15)));
|
||||
CGPoint oldRE=PGCenter(PGRegionBounds(previous,@"rightEye",PGInFace(old,.59,.53,.25,.15)));
|
||||
CGPoint newLE=PGCenter(PGRegionBounds(current,@"leftEye",PGInFace(box,.16,.53,.25,.15)));
|
||||
CGPoint newRE=PGCenter(PGRegionBounds(current,@"rightEye",PGInFace(box,.59,.53,.25,.15)));
|
||||
double ox=oldRE.x-oldLE.x,oy=oldRE.y-oldLE.y,nx=newRE.x-newLE.x,ny=newRE.y-newLE.y;
|
||||
double oldLength=hypot(ox,oy),newLength=hypot(nx,ny);
|
||||
BOOL axisHold=oldLength>MAX(.003,.055*MIN(old.size.height,box.size.height)) &&
|
||||
newLength>MAX(.003,.055*MIN(old.size.height,box.size.height)) &&
|
||||
(ox*nx+oy*ny)/(oldLength*newLength)<-.18;
|
||||
NSMutableDictionary *stable=[NSMutableDictionary dictionaryWithObject:current[@"box"] forKey:@"box"];
|
||||
for(NSString *name in PGGeometryRegions()) {
|
||||
NSArray *a=previous[name],*b=current[name];
|
||||
if(!a.count || (!axisHold && a.count!=b.count)) {stable[name]=b;continue;}
|
||||
NSMutableArray *points=[NSMutableArray arrayWithCapacity:a.count];
|
||||
for(NSUInteger i=0;i<a.count;i++) {
|
||||
CGPoint p=PGRemapPoint(a[i],old,box);
|
||||
if(!axisHold) {p.x+=( [b[i][0] doubleValue]-p.x)*weight;p.y+=([b[i][1] doubleValue]-p.y)*weight;}
|
||||
[points addObject:@[@(p.x),@(p.y)]];
|
||||
}
|
||||
stable[name]=[points copy];
|
||||
}
|
||||
NSArray *current76 = PGSanitizedPoints76(current[@"points76"]);
|
||||
NSArray *previous76 = PGSanitizedPoints76(previous[@"points76"]);
|
||||
if (current76) {
|
||||
if (stabilizePoints76 && previous76) {
|
||||
NSMutableArray *points = [NSMutableArray arrayWithCapacity:76];
|
||||
for (NSUInteger i=0; i<76; i++) {
|
||||
CGPoint p = PGRemapPoint(previous76[i], old, box);
|
||||
if (!axisHold) {
|
||||
p.x += ([current76[i][0] doubleValue]-p.x)*weight;
|
||||
p.y += ([current76[i][1] doubleValue]-p.y)*weight;
|
||||
}
|
||||
[points addObject:@[@(p.x),@(p.y)]];
|
||||
}
|
||||
stable[@"points76"] = [points copy];
|
||||
} else {
|
||||
// Reacquired detections and changes from/to incomplete topology do
|
||||
// not borrow a held face's old projected pose or invent missing points.
|
||||
stable[@"points76"] = current76;
|
||||
}
|
||||
}
|
||||
return [stable copy];
|
||||
}
|
||||
|
||||
// This live selector is deliberately independent of _targets. Its past-only
|
||||
// .35s reference window is a documented project policy, not a recovered exact
|
||||
// vendor formula. Continuous held outputs advance time, so this is not a hold
|
||||
// timeout. Locks protect state, not global render-order equivalence: a cold seek
|
||||
// cannot reconstruct frames the host has never supplied.
|
||||
@interface PGRealtimeFaceTracker : NSObject {
|
||||
NSLock *_mutex;
|
||||
NSMutableArray<NSDictionary *> *_entries;
|
||||
NSUInteger _estimatedBytes;
|
||||
}
|
||||
- (NSDictionary *)resultForGeometry:(NSArray<NSDictionary *> *)raw settings:(PGBeautySettings)settings time:(CMTime)time extent:(CGRect)extent;
|
||||
- (void)reset;
|
||||
- (NSDictionary *)cacheStatistics;
|
||||
@end
|
||||
@implementation PGRealtimeFaceTracker
|
||||
- (instancetype)init {if((self=[super init])){_mutex=[NSLock new];_entries=[NSMutableArray new];}return self;}
|
||||
- (void)reset {[_mutex lock];[_entries removeAllObjects];_estimatedBytes=0;[_mutex unlock];}
|
||||
- (NSDictionary *)cacheStatistics {[_mutex lock];NSDictionary *stats=@{@"frames":@(_entries.count),@"estimatedBytes":@(_estimatedBytes)};[_mutex unlock];return stats;}
|
||||
- (NSDictionary *)resultForGeometry:(NSArray<NSDictionary *> *)input settings:(PGBeautySettings)s time:(CMTime)time extent:(CGRect)extent {
|
||||
NSMutableArray *valid=[NSMutableArray new];
|
||||
for(id item in input) {NSDictionary *g=PGSanitizedGeometry(item);if(g && valid.count<16)[valid addObject:g];}
|
||||
NSArray *raw=[valid copy];
|
||||
NSUInteger mode=s.fastMultiFace?2:(s.singleFace?1:0);
|
||||
NSString *key=PGTimeKey(time);
|
||||
NSString *context=[NSString stringWithFormat:@"%lu/%u/%lld/%.17g/%.17g/%.17g/%.17g/%.9g",(unsigned long)mode,s.targetIndex,
|
||||
(long long)time.epoch,extent.origin.x,extent.origin.y,extent.size.width,extent.size.height,s.faceJumpGuardRange];
|
||||
[_mutex lock];
|
||||
NSDictionary *head=nil;
|
||||
for(NSDictionary *record in _entries) if([record[@"context"] isEqual:context] &&
|
||||
(!head || CMTimeCompare(PGRecordTime(record),PGRecordTime(head))>=0)) head=record;
|
||||
NSString *scope=@"automatic";
|
||||
double seedX=PGClamp(s.selectionX,0,1),seedY=PGClamp(s.selectionY,0,1);
|
||||
if(mode==1) {
|
||||
// A real point change (> .01) starts a new identity scope. Older render
|
||||
// snapshots may use their own past scope, but never replace a newer head.
|
||||
NSDictionary *seedRecord=head;
|
||||
if(seedRecord && CMTimeCompare(time,PGRecordTime(seedRecord))<0) {
|
||||
seedRecord=nil;
|
||||
for(NSDictionary *record in _entries) if([record[@"context"] isEqual:context] && PGSeedDistance(record,s)<=.01 &&
|
||||
CMTimeCompare(PGRecordTime(record),time)<=0 && (!seedRecord || CMTimeCompare(PGRecordTime(record),PGRecordTime(seedRecord))>=0))seedRecord=record;
|
||||
}
|
||||
if(seedRecord && PGSeedDistance(seedRecord,s)<=.01) {
|
||||
scope=seedRecord[@"scope"];seedX=[seedRecord[@"seedX"] doubleValue];seedY=[seedRecord[@"seedY"] doubleValue];
|
||||
} else scope=[NSString stringWithFormat:@"%@/%.9g/%.9g",key?:@"invalid",seedX,seedY];
|
||||
}
|
||||
NSDictionary *reference=nil;
|
||||
if(key) for(NSDictionary *record in _entries) {
|
||||
if(![record[@"context"] isEqual:context] || ![record[@"scope"] isEqual:scope])continue;
|
||||
if([record[@"key"] isEqual:key] && [record[@"raw"] isEqual:raw]) {[_mutex unlock];return record;}
|
||||
CMTime stored=PGRecordTime(record);
|
||||
// Same-time changed detections recompute from an earlier frame, never
|
||||
// feed an already smoothed result into another pass at that same time.
|
||||
if(CMTimeCompare(stored,time)>=0)continue;
|
||||
double dt=CMTimeGetSeconds(CMTimeSubtract(time,stored));
|
||||
if(dt<=.35 && (!reference || CMTimeCompare(stored,PGRecordTime(reference))>0))reference=record;
|
||||
}
|
||||
NSArray *prior=reference[@"output"];
|
||||
NSDictionary *previous=prior.count?prior.firstObject:nil;
|
||||
CGRect previousBox=PGArrayRect(previous[@"box"]);
|
||||
NSInteger index=-1;double best=-DBL_MAX;
|
||||
if(mode!=2) for(NSUInteger i=0;i<raw.count;i++) {
|
||||
CGRect box=PGArrayRect(raw[i][@"box"]);CGPoint center=PGCenter(box);double score;
|
||||
if(PGValidRect(previousBox)) {
|
||||
CGFloat factor=PGClamp(s.faceJumpGuardRange,1,4);
|
||||
CGRect guard=CGRectIntersection(CGRectMake(0,0,1,1),CGRectInset(previousBox,-previousBox.size.width*(factor-1)*.5,-previousBox.size.height*(factor-1)*.5));
|
||||
if(center.x<CGRectGetMinX(guard)||center.x>CGRectGetMaxX(guard)||center.y<CGRectGetMinY(guard)||center.y>CGRectGetMaxY(guard))continue;
|
||||
CGPoint p=PGCenter(previousBox);score=-((center.x-p.x)*(center.x-p.x)+(center.y-p.y)*(center.y-p.y));
|
||||
} else if(mode==1) score=-((center.x-seedX)*(center.x-seedX)+(center.y-seedY)*(center.y-seedY));
|
||||
else {CGRect clipped=CGRectIntersection(box,CGRectMake(0,0,1,1));CGPoint p=PGCenter(clipped);
|
||||
score=1.8*fmin(1,clipped.size.width*clipped.size.height)+1.1*(1-fmin(1,hypot(p.x-.5,p.y-.5)/.72));}
|
||||
if(index<0 || score>best) {index=(NSInteger)i;best=score;}
|
||||
}
|
||||
NSArray *output;BOOL held=NO;
|
||||
if(mode==2) output=raw;
|
||||
else if(index>=0) {
|
||||
NSDictionary *current=raw[(NSUInteger)index];
|
||||
double dt=reference?CMTimeGetSeconds(CMTimeSubtract(time,PGRecordTime(reference))):0;
|
||||
output=@[previous?PGStableGeometry(current,previous,dt,![reference[@"held"] boolValue]):current];
|
||||
} else {output=prior?:@[];held=output.count>0;}
|
||||
NSMutableDictionary *record=[@{@"context":context,@"scope":scope,@"key":key?:@"invalid",@"value":@(time.value),@"scale":@(time.timescale),@"epoch":@(time.epoch),
|
||||
@"seedX":@(seedX),@"seedY":@(seedY),@"raw":raw,@"output":output,@"index":@(index),@"held":@(held),@"referenceKey":reference[@"key"]?:@""} mutableCopy];
|
||||
if(key) {
|
||||
NSData *serialized=[NSPropertyListSerialization dataWithPropertyList:record format:NSPropertyListBinaryFormat_v1_0 options:0 error:nil];
|
||||
NSUInteger bytes=serialized.length+512;
|
||||
record[@"bytes"]=@(bytes);
|
||||
// Replace changed raw geometry at the same timestamp rather than letting
|
||||
// callbacks grow history or make smoothing depend on redraw count.
|
||||
for(NSInteger i=(NSInteger)_entries.count-1;i>=0;i--) {
|
||||
NSDictionary *old=_entries[(NSUInteger)i];
|
||||
if([old[@"context"] isEqual:context] && [old[@"scope"] isEqual:scope] && [old[@"key"] isEqual:key]) {
|
||||
_estimatedBytes-=[old[@"bytes"] unsignedIntegerValue];[_entries removeObjectAtIndex:(NSUInteger)i];
|
||||
}
|
||||
}
|
||||
if(bytes<=16*1024*1024) {[_entries addObject:[record copy]];_estimatedBytes+=bytes;}
|
||||
while(_entries.count>1200 || _estimatedBytes>16*1024*1024) {
|
||||
_estimatedBytes-=[_entries.firstObject[@"bytes"] unsignedIntegerValue];[_entries removeObjectAtIndex:0];
|
||||
}
|
||||
}
|
||||
[_mutex unlock];return [record copy];
|
||||
}
|
||||
@end
|
||||
|
||||
@interface PGFaceProcessor () {
|
||||
NSLock *_lock;
|
||||
NSMutableArray<NSMutableDictionary<NSString *, NSDictionary *> *> *_targets;
|
||||
CIWarpKernel *_warp;
|
||||
CIColorKernel *_ellipse;
|
||||
CIColorKernel *_subtract;
|
||||
CIColorKernel *_box;
|
||||
PGRealtimeFaceTracker *_realtime;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation PGFaceProcessor
|
||||
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_lock = [[NSLock alloc] init];
|
||||
_realtime = [PGRealtimeFaceTracker new];
|
||||
_targets = [NSMutableArray arrayWithObjects:[NSMutableDictionary dictionary], [NSMutableDictionary dictionary], [NSMutableDictionary dictionary], nil];
|
||||
// Thin/chin/jaw/short reconstruct the recovered local coordinate math.
|
||||
// The other five controls retain this project's analytic approximation.
|
||||
// Recovered jaw -> chin -> short order follows the reference. The other
|
||||
// analytic body controls still precede jaw, so the full combined chain
|
||||
// (narrow/V/cheek/small-head/eyes) is not claimed reference-equivalent.
|
||||
// Each pin changes the sampling coordinate, with only one image resample.
|
||||
NSMutableString *source = [NSMutableString stringWithString:
|
||||
@"vec2 pgThinPin(vec2 q, vec4 control, float ratio) {"
|
||||
" vec2 direction=control.zw-control.xy; float radius=length(direction);"
|
||||
" if(radius<=0.0001) return q;"
|
||||
" float weight=clamp(1.0-length(q-control.xy)/radius,0.0,1.0);"
|
||||
" return clamp(q-direction*ratio*weight,vec2(0.0),vec2(1.0)); }"
|
||||
" vec2 pgJawPin(vec2 q, vec4 edge, vec2 anchor, float ratio) {"
|
||||
" float radius=length(edge.xy-edge.zw); if(radius<=0.0001) return q;"
|
||||
" float weight=clamp(1.0-length(q-edge.xy)/radius,0.0,1.0);"
|
||||
" return clamp(q-(anchor-edge.xy)*ratio*weight,vec2(0.0),vec2(1.0)); }"
|
||||
" vec2 pgShortEdge(vec2 q, vec2 a, vec2 b) {"
|
||||
" vec2 d=b-a; float squared=dot(d,d);"
|
||||
" float t=0.0; if(squared>0.000001) t=clamp(dot(q-a,d)/squared,0.0,1.0);"
|
||||
" float distance=length(q-(a+t*d)); float crossing=0.0;"
|
||||
" if((a.y>q.y && b.y<=q.y) || (b.y>q.y && a.y<=q.y)) {"
|
||||
" float dy=b.y-a.y; if(abs(dy)<=0.000001) dy=dy<0.0?-0.000001:0.000001;"
|
||||
" if(q.x<a.x+(b.x-a.x)*(q.y-a.y)/dy) crossing=1.0; }"
|
||||
" return vec2(distance,crossing); }"
|
||||
" kernel vec2 pgFaceWarp(vec2 c, vec2 size, vec2 le, vec2 re, vec2 er, float thinRatio, float bigEye, float shortRatio, float narrow, float chinRatio, float vFace, float jawRatio, float cheek, float smallHead, float headRange, vec2 imageOrigin, vec2 imageSize"];
|
||||
for (NSUInteger i=0; i<17; i++) [source appendFormat:@", vec4 pin%lu",(unsigned long)i];
|
||||
for (NSUInteger i=0; i<3; i++) [source appendFormat:@", vec4 chinPin%lu",(unsigned long)i];
|
||||
[source appendString:@", vec2 jawAnchor, vec2 shortAxis"];
|
||||
for (NSUInteger i=0; i<6; i++) [source appendFormat:@", vec4 jawPin%lu",(unsigned long)i];
|
||||
for (NSUInteger i=0; i<11; i++) [source appendFormat:@", vec2 shortPoint%lu",(unsigned long)i];
|
||||
[source appendString:@") { vec2 p=destCoord();"
|
||||
" if(thinRatio>0.000001) { vec2 q=(p-imageOrigin)/imageSize; q.y=1.0-q.y;"];
|
||||
for (NSUInteger i=0; i<17; i++) [source appendFormat:@" q=pgThinPin(q,pin%lu,thinRatio);",(unsigned long)i];
|
||||
[source appendString:@" q.y=1.0-q.y; p=imageOrigin+q*imageSize; }"
|
||||
" vec2 n = (p-c)/size;"
|
||||
" float body = 1.0-smoothstep(0.38,0.76,length(n*vec2(1.0,0.82)));"
|
||||
" float lower = (1.0-smoothstep(-0.12,0.27,n.y))*body;"
|
||||
" float sides = smoothstep(0.08,0.32,abs(n.x));"
|
||||
" float j=(n.y+0.23)/0.22; float jawBand = exp(-j*j)*body;"
|
||||
" float ch=(n.y-0.02)/0.19; float cheekBand = exp(-ch*ch)*body;"
|
||||
" float head = 1.0-smoothstep(0.38,0.75+0.32*headRange,length(n*vec2(0.9,0.65)));"
|
||||
" p += (p-c)*smallHead*0.18*head;"
|
||||
" p.x += size.x*n.x*(narrow*0.30*body + vFace*0.24*jawBand + cheek*0.18*cheekBand)*sides;"
|
||||
" p.y += size.y*(-vFace*0.025*lower);"
|
||||
" if(abs(jawRatio)>0.000001) { vec2 q=(p-imageOrigin)/imageSize; q.y=1.0-q.y;"];
|
||||
for (NSUInteger i=0; i<6; i++) [source appendFormat:@" q=pgJawPin(q,jawPin%lu,jawAnchor,jawRatio);",(unsigned long)i];
|
||||
[source appendString:@" q.y=1.0-q.y; p=imageOrigin+q*imageSize; }"
|
||||
" if(abs(chinRatio)>0.000001) { vec2 q=(p-imageOrigin)/imageSize; q.y=1.0-q.y;"];
|
||||
for (NSUInteger i=0; i<3; i++) [source appendFormat:@" q=pgThinPin(q,chinPin%lu,chinRatio);",(unsigned long)i];
|
||||
[source appendString:@" q.y=1.0-q.y; p=imageOrigin+q*imageSize; }"
|
||||
" if(abs(shortRatio)>0.000001 && length(shortAxis)>0.0001) {"
|
||||
" vec2 q=(p-imageOrigin)/imageSize; q.y=1.0-q.y;"
|
||||
" float nearest=10.0; float crossings=0.0;"];
|
||||
for (NSUInteger i=0; i<11; i++) [source appendFormat:@" { vec2 edge=pgShortEdge(q,shortPoint%lu,shortPoint%lu); nearest=min(nearest,edge.x); crossings+=edge.y; }",(unsigned long)i,(unsigned long)((i+1)%11)];
|
||||
[source appendString:@" float weight=mod(crossings,2.0)>0.5?1.0:clamp(1.0-nearest/length(shortAxis),0.0,1.0);"
|
||||
" q=clamp(q-shortAxis*shortRatio*weight,vec2(0.0),vec2(1.0));"
|
||||
" q.y=1.0-q.y; p=imageOrigin+q*imageSize; }"
|
||||
" vec2 dl = (p-le)/er; float wl = 1.0-smoothstep(0.0,1.0,length(dl));"
|
||||
" p -= (p-le)*bigEye*0.33*wl*wl;"
|
||||
" vec2 dr = (p-re)/er; float wr = 1.0-smoothstep(0.0,1.0,length(dr));"
|
||||
" p -= (p-re)*bigEye*0.33*wr*wr; return p; }"];
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
_warp = [CIWarpKernel kernelWithString:source];
|
||||
_ellipse = [CIColorKernel kernelWithString:@"kernel vec4 pgEllipse(vec2 c, vec2 r, float inner) { float v=1.0-smoothstep(inner,1.0,length((destCoord()-c)/max(r,vec2(0.001)))); return vec4(v,v,v,1.0); }"];
|
||||
_subtract = [CIColorKernel kernelWithString:@"kernel vec4 pgSubtract(__sample a, __sample b) { float v=max(0.0,a.r-b.r); return vec4(v,v,v,1.0); }"];
|
||||
_box = [CIColorKernel kernelWithString:@"kernel vec4 pgBox(vec4 b, float width, vec4 color) { vec2 p=destCoord(); float inside=step(b.x,p.x)*step(b.y,p.y)*step(p.x,b.z)*step(p.y,b.w); float edge=min(min(abs(p.x-b.x),abs(p.x-b.z)),min(abs(p.y-b.y),abs(p.y-b.w))); float a=inside*(1.0-smoothstep(width,width+1.0,edge)); return color*a; }"];
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSArray<VNFaceObservation *> *)observationsInImage:(CIImage *)image settings:(PGBeautySettings)settings error:(NSError **)error {
|
||||
CGRect extent = image.extent;
|
||||
CGFloat longest = MAX(extent.size.width, extent.size.height);
|
||||
CGFloat scale = MIN(1.0, (settings.fastMultiFace ? 720.0 : 1280.0) / longest);
|
||||
CIImage *prepared = [image imageByApplyingTransform:CGAffineTransformMakeTranslation(-extent.origin.x, -extent.origin.y)];
|
||||
prepared = [prepared imageByApplyingTransform:CGAffineTransformMakeScale(scale, scale)];
|
||||
VNDetectFaceLandmarksRequest *request = [[VNDetectFaceLandmarksRequest alloc] init];
|
||||
request.revision = VNDetectFaceLandmarksRequestRevision3;
|
||||
request.constellation = VNRequestFaceLandmarksConstellation76Points;
|
||||
// An image request handler is intentionally local to one invocation. A shared
|
||||
// sequence handler would make parallel / reverse render order observable.
|
||||
VNImageRequestHandler *handler = [[VNImageRequestHandler alloc] initWithCIImage:prepared options:@{}];
|
||||
if (![handler performRequests:@[request] error:error]) return nil;
|
||||
NSArray<VNFaceObservation *> *faces = request.results ?: @[];
|
||||
return [faces sortedArrayUsingComparator:^NSComparisonResult(VNFaceObservation *a, VNFaceObservation *b) {
|
||||
CGRect x = a.boundingBox, y = b.boundingBox;
|
||||
if (CGRectGetMidX(x) != CGRectGetMidX(y)) return CGRectGetMidX(x) < CGRectGetMidX(y) ? NSOrderedAscending : NSOrderedDescending;
|
||||
if (CGRectGetMidY(x) != CGRectGetMidY(y)) return CGRectGetMidY(x) < CGRectGetMidY(y) ? NSOrderedAscending : NSOrderedDescending;
|
||||
return x.size.width > y.size.width ? NSOrderedAscending : NSOrderedDescending;
|
||||
}];
|
||||
}
|
||||
|
||||
- (NSDictionary *)recordForTime:(CMTime)time target:(NSUInteger)target nearest:(BOOL)nearest {
|
||||
NSString *key = PGTimeKey(time);
|
||||
if (!key || target >= 3) return nil;
|
||||
[_lock lock];
|
||||
NSDictionary *record = _targets[target][key];
|
||||
if (nearest && [record[@"faces"] count] == 0) record = nil;
|
||||
if (!record && nearest) {
|
||||
// Pick a deterministic analyzed identity, retaining the last valid face
|
||||
// across lost detections. Only an explicit reset/reselection reacquires
|
||||
// a different identity; render ordering never updates this anchor.
|
||||
double distance = DBL_MAX;
|
||||
CMTime selectedTime = kCMTimeInvalid;
|
||||
for (NSDictionary *candidate in _targets[target].allValues) {
|
||||
if ([candidate[@"faces"] count] == 0) continue;
|
||||
CMTime stored = CMTimeMakeWithEpoch([candidate[@"value"] longLongValue], [candidate[@"scale"] intValue], [candidate[@"epoch"] longLongValue]);
|
||||
if (stored.epoch != time.epoch) continue;
|
||||
double delta = fabs(CMTimeGetSeconds(CMTimeSubtract(stored, time)));
|
||||
if (delta < distance || (delta == distance && CMTIME_IS_VALID(selectedTime) && CMTimeCompare(stored, selectedTime) < 0)) {
|
||||
record = candidate; distance = delta; selectedTime = stored;
|
||||
}
|
||||
}
|
||||
}
|
||||
[_lock unlock];
|
||||
return record;
|
||||
}
|
||||
|
||||
- (NSArray<NSDictionary *> *)geometryForObservations:(NSArray<VNFaceObservation *> *)observations
|
||||
settings:(PGBeautySettings)settings previous:(NSDictionary *)previous {
|
||||
BOOL selectOne = settings.singleFace || settings.trackingEnabled;
|
||||
if (!selectOne) {
|
||||
NSMutableArray *all = [NSMutableArray array];
|
||||
for (VNFaceObservation *face in observations) if (PGValidRect(face.boundingBox) && all.count < 16) [all addObject:PGGeometry(face)];
|
||||
return all;
|
||||
}
|
||||
CGPoint selection = CGPointMake(PGClamp(settings.selectionX, 0, 1), PGClamp(settings.selectionY, 0, 1));
|
||||
NSArray *previousFaces = previous[@"faces"];
|
||||
CGRect prior = previousFaces.count ? PGArrayRect(previousFaces.firstObject[@"box"]) : CGRectZero;
|
||||
BOOL guard = settings.faceJumpGuardRange > 0 && PGValidRect(prior);
|
||||
CGPoint reference = guard ? PGCenter(prior) : selection;
|
||||
VNFaceObservation *best = nil;
|
||||
double bestScore = DBL_MAX;
|
||||
for (VNFaceObservation *face in observations) {
|
||||
CGRect box = face.boundingBox;
|
||||
if (!PGValidRect(box)) continue;
|
||||
CGPoint center = PGCenter(box);
|
||||
double dx = (center.x - reference.x), dy = (center.y - reference.y);
|
||||
if (guard) {
|
||||
double radius = MAX(prior.size.width, prior.size.height) * PGClamp(settings.faceJumpGuardRange, 0.1, 8);
|
||||
double ratio = box.size.width / prior.size.width;
|
||||
if (hypot(dx, dy) > radius || ratio < 0.4 || ratio > 2.5) continue;
|
||||
}
|
||||
double score = dx * dx + dy * dy;
|
||||
if (!guard && CGRectContainsPoint(box, selection)) score -= 2;
|
||||
if (score < bestScore) { best = face; bestScore = score; }
|
||||
}
|
||||
return best ? @[PGGeometry(best)] : @[];
|
||||
}
|
||||
|
||||
- (BOOL)analyzeImage:(CIImage *)image settings:(PGBeautySettings)settings time:(CMTime)time error:(NSError **)error {
|
||||
NSString *key = PGTimeKey(time);
|
||||
if (!image || !key || CGRectIsInfinite(image.extent) || CGRectIsEmpty(image.extent)) {
|
||||
if (error) *error = [NSError errorWithDomain:PGFaceErrorDomain code:1 userInfo:@{NSLocalizedDescriptionKey:@"Face analysis requires a finite image and valid frame time."}];
|
||||
return NO;
|
||||
}
|
||||
NSArray *observations = [self observationsInImage:image settings:settings error:error];
|
||||
if (!observations) return NO;
|
||||
NSUInteger target = MIN((NSUInteger)settings.targetIndex, 2);
|
||||
NSDictionary *prior = [self recordForTime:time target:target nearest:YES];
|
||||
NSArray *geometry = [self geometryForObservations:observations settings:settings previous:prior];
|
||||
NSDictionary *record = @{@"value":@(time.value), @"scale":@(time.timescale), @"epoch":@(time.epoch), @"faces":geometry};
|
||||
[_lock lock];
|
||||
_targets[target][key] = record;
|
||||
[_lock unlock];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (CIImage *)ellipseInRect:(CGRect)rect extent:(CGRect)extent inner:(CGFloat)inner {
|
||||
return [_ellipse applyWithExtent:extent arguments:@[PGVector(PGCenter(rect)), [CIVector vectorWithX:rect.size.width * 0.5 Y:rect.size.height * 0.5], @(inner)]];
|
||||
}
|
||||
|
||||
- (CIImage *)warpImage:(CIImage *)image geometry:(NSArray<NSDictionary *> *)geometry settings:(PGBeautySettings)s extent:(CGRect)extent {
|
||||
if (!(s.faceThin || s.faceBigEye || s.faceShort || s.faceNarrow || s.faceChin || s.faceV || s.faceJaw || s.faceCheekbone || s.faceSmallHead)) return [image imageByCroppingToRect:extent];
|
||||
CIImage *result = image;
|
||||
for (NSDictionary *face in geometry) {
|
||||
CGRect box = PGArrayRect(face[@"box"]), pixels = PGToPixels(box, extent);
|
||||
NSArray *points76 = PGSanitizedPoints76(face[@"points76"]);
|
||||
float thinRatio = 0, chinRatio = 0, jawRatio = 0, shortRatio = 0;
|
||||
if (points76) {
|
||||
double width = hypot(([points76[75][0] doubleValue]-[points76[59][0] doubleValue])*extent.size.width,
|
||||
([points76[75][1] doubleValue]-[points76[59][1] doubleValue])*extent.size.height);
|
||||
double midX = ([points76[74][0] doubleValue]+[points76[60][0] doubleValue])*.5;
|
||||
double midY = ([points76[74][1] doubleValue]+[points76[60][1] doubleValue])*.5;
|
||||
double height = 2*hypot(([points76[67][0] doubleValue]-midX)*extent.size.width,
|
||||
([points76[67][1] doubleValue]-midY)*extent.size.height);
|
||||
double gain = fmin(2.25,fmax(1,280/fmax(1,fmax(width,height))));
|
||||
thinRatio = PGClamp(s.faceThin,0,1)*.025*gain;
|
||||
float chin = PGClamp(s.faceChin,-1,1);
|
||||
chinRatio = chin*(chin>0 ? .04 : .02)*gain;
|
||||
jawRatio = PGClamp(s.faceJaw,0,1)*.05*gain;
|
||||
shortRatio = PGClamp(s.faceShort,-1,1)*.25*gain;
|
||||
}
|
||||
BOOL otherControls = s.faceBigEye || s.faceNarrow || s.faceV || s.faceCheekbone || s.faceSmallHead;
|
||||
// No full topology means no guessed bbox thin/chin/jaw/short deformation. Legacy
|
||||
// archives using only those controls remain exact image/mask pass-through.
|
||||
if (thinRatio <= .000001 && fabsf(chinRatio) <= .000001 && fabsf(jawRatio) <= .000001 && fabsf(shortRatio) <= .000001 && !otherControls) continue;
|
||||
CGRect le = PGRegionBounds(face, @"leftEye", PGInFace(box, 0.16, 0.53, 0.25, 0.15));
|
||||
CGRect re = PGRegionBounds(face, @"rightEye", PGInFace(box, 0.59, 0.53, 0.25, 0.15));
|
||||
CGPoint left = PGCenter(PGToPixels(le, extent)), right = PGCenter(PGToPixels(re, extent));
|
||||
NSMutableArray *arguments = [@[PGVector(PGCenter(pixels)), [CIVector vectorWithX:pixels.size.width Y:pixels.size.height],
|
||||
PGVector(left), PGVector(right), [CIVector vectorWithX:MAX(2, pixels.size.width * 0.24) Y:MAX(2, pixels.size.height * 0.17)],
|
||||
@(thinRatio), @(PGClamp(s.faceBigEye, 0, 1)), @(shortRatio),
|
||||
@(PGClamp(s.faceNarrow, -1, 1)), @(chinRatio), @(PGClamp(s.faceV, 0, 1)),
|
||||
@(jawRatio), @(PGClamp(s.faceCheekbone, 0, 1)), @(PGClamp(s.faceSmallHead, 0, 1)), @(PGClamp(s.faceSmallHeadRange, 0, 1)),
|
||||
[CIVector vectorWithX:extent.origin.x Y:extent.origin.y], [CIVector vectorWithX:extent.size.width Y:extent.size.height]] mutableCopy];
|
||||
for (NSUInteger i=0; i<17; i++) {
|
||||
double ox=0,oy=0,ax=0,ay=0;
|
||||
if (points76) {
|
||||
NSArray *origin=points76[PGThinPins[i][0]],*anchor=points76[PGThinPins[i][1]];
|
||||
ox=[origin[0] doubleValue];oy=1-[origin[1] doubleValue];
|
||||
ax=[anchor[0] doubleValue];ay=1-[anchor[1] doubleValue];
|
||||
}
|
||||
[arguments addObject:[CIVector vectorWithX:ox Y:oy Z:ax W:ay]];
|
||||
}
|
||||
for (NSUInteger i=0; i<3; i++) {
|
||||
double ox=0,oy=0,ax=0,ay=0;
|
||||
if (points76) {
|
||||
NSArray *origin=points76[PGChinPins[i][0]],*anchor=points76[PGChinPins[i][1]];
|
||||
ox=[origin[0] doubleValue];oy=1-[origin[1] doubleValue];
|
||||
ax=[anchor[0] doubleValue];ay=1-[anchor[1] doubleValue];
|
||||
}
|
||||
[arguments addObject:[CIVector vectorWithX:ox Y:oy Z:ax W:ay]];
|
||||
}
|
||||
CGPoint anchor=CGPointZero,axis=CGPointZero;
|
||||
if(points76){
|
||||
anchor=CGPointMake([points76[29][0]doubleValue],1-[points76[29][1]doubleValue]);
|
||||
axis=CGPointMake([points76[46][0]doubleValue]-[points76[48][0]doubleValue],
|
||||
[points76[48][1]doubleValue]-[points76[46][1]doubleValue]);
|
||||
}
|
||||
[arguments addObject:PGVector(anchor)];[arguments addObject:PGVector(axis)];
|
||||
for(NSUInteger i=0;i<6;i++){
|
||||
double ox=0,oy=0,nx=0,ny=0;
|
||||
if(points76){NSArray *origin=points76[PGJawPins[i][0]],*neighbour=points76[PGJawPins[i][1]];
|
||||
ox=[origin[0]doubleValue];oy=1-[origin[1]doubleValue];nx=[neighbour[0]doubleValue];ny=1-[neighbour[1]doubleValue];}
|
||||
[arguments addObject:[CIVector vectorWithX:ox Y:oy Z:nx W:ny]];
|
||||
}
|
||||
for(NSUInteger i=62;i<=72;i++){
|
||||
CGPoint point=CGPointZero;if(points76)point=CGPointMake([points76[i][0]doubleValue],1-[points76[i][1]doubleValue]);
|
||||
[arguments addObject:PGVector(point)];
|
||||
}
|
||||
CIImage *input = [result imageByClampingToExtent];
|
||||
result = [_warp applyWithExtent:extent roiCallback:^CGRect(int index, CGRect rect) { (void)index; (void)rect; return extent; } inputImage:input arguments:arguments];
|
||||
if (!result) return nil;
|
||||
}
|
||||
return [result imageByCroppingToRect:extent];
|
||||
}
|
||||
|
||||
- (PGFaceFrame *)processImage:(CIImage *)image settings:(PGBeautySettings)settings time:(CMTime)time error:(NSError **)error {
|
||||
CGRect extent = image.extent;
|
||||
if (!image || CGRectIsInfinite(extent) || CGRectIsEmpty(extent) || !_ellipse || !_warp || !_box || !_subtract) {
|
||||
if (error) *error = [NSError errorWithDomain:PGFaceErrorDomain code:2 userInfo:@{NSLocalizedDescriptionKey:@"Unable to initialize face processing for this image."}];
|
||||
return nil;
|
||||
}
|
||||
NSDictionary *record = settings.trackingEnabled ? [self recordForTime:time target:MIN((NSUInteger)settings.targetIndex, 2) nearest:NO] : nil;
|
||||
NSArray<NSDictionary *> *geometry,*appearance;
|
||||
NSArray<VNFaceObservation *> *observations;
|
||||
if (record) {
|
||||
geometry = record[@"faces"];
|
||||
appearance = geometry;
|
||||
NSMutableArray *restored = [NSMutableArray array];
|
||||
for (NSDictionary *face in geometry) [restored addObject:[VNFaceObservation faceObservationWithRequestRevision:VNDetectFaceLandmarksRequestRevision3 boundingBox:PGArrayRect(face[@"box"]) roll:nil yaw:nil pitch:nil]];
|
||||
observations = restored;
|
||||
} else {
|
||||
NSArray *detected = [self observationsInImage:image settings:settings error:error];
|
||||
if (!detected) return nil;
|
||||
if(settings.trackingEnabled) {
|
||||
// Preserve the explicit offline-analysis contract. Its stored
|
||||
// identity fallback never reads or writes realtime temporal state.
|
||||
NSDictionary *anchor=[self recordForTime:time target:MIN((NSUInteger)settings.targetIndex,2) nearest:YES];
|
||||
geometry=[self geometryForObservations:detected settings:settings previous:anchor];
|
||||
appearance=geometry;
|
||||
NSMutableArray *selected=[NSMutableArray new];
|
||||
for(NSDictionary *face in geometry) for(VNFaceObservation *observation in detected)
|
||||
if(CGRectEqualToRect(observation.boundingBox,PGArrayRect(face[@"box"]))) {[selected addObject:observation];break;}
|
||||
observations=selected;
|
||||
} else {
|
||||
NSMutableArray *raw=[NSMutableArray new],*validObservations=[NSMutableArray new];
|
||||
for(VNFaceObservation *observation in detected) if(PGValidRect(observation.boundingBox) && raw.count<16) {
|
||||
[raw addObject:PGGeometry(observation)];[validObservations addObject:observation];
|
||||
}
|
||||
NSDictionary *live=[_realtime resultForGeometry:raw settings:settings time:time extent:extent];
|
||||
geometry=live[@"output"];
|
||||
if(settings.singleFace && !settings.fastMultiFace) {
|
||||
NSInteger index=[live[@"index"] integerValue];
|
||||
if(index>=0 && (NSUInteger)index<validObservations.count) {
|
||||
// Retain the selected original Vision observation. A stable
|
||||
// geometry box need not equal its unsmoothed detection box.
|
||||
observations=@[validObservations[(NSUInteger)index]];
|
||||
appearance=@[raw[(NSUInteger)index]];
|
||||
} else {
|
||||
appearance=geometry;
|
||||
NSMutableArray *held=[NSMutableArray new];
|
||||
for(NSDictionary *face in geometry) [held addObject:[VNFaceObservation faceObservationWithRequestRevision:VNDetectFaceLandmarksRequestRevision3 boundingBox:PGArrayRect(face[@"box"]) roll:nil yaw:nil pitch:nil]];
|
||||
observations=held;
|
||||
}
|
||||
} else {
|
||||
// Default single-primary geometry does not narrow the separate
|
||||
// skin/teeth/eyes support, which still covers the detected group.
|
||||
appearance=raw;observations=validObservations;
|
||||
}
|
||||
}
|
||||
}
|
||||
CIImage *skin = PGBlack(extent), *teeth = PGBlack(extent), *eyes = PGBlack(extent), *protection = PGBlack(extent), *overlay = PGTransparent(extent);
|
||||
for (NSDictionary *face in appearance) {
|
||||
CGRect box = PGArrayRect(face[@"box"]);
|
||||
CGRect skinRect = PGInFace(box, -0.10, -0.04, 1.20, 1.16);
|
||||
skin = PGMaximum(skin, [self ellipseInRect:PGToPixels(skinRect, extent) extent:extent inner:0.78]);
|
||||
NSArray *names = @[@"leftEye", @"rightEye", @"leftBrow", @"rightBrow", @"lips", @"nose"];
|
||||
NSArray<NSValue *> *fallbacks = @[[NSValue valueWithRect:PGInFace(box, 0.16, 0.53, 0.25, 0.15)],
|
||||
[NSValue valueWithRect:PGInFace(box, 0.59, 0.53, 0.25, 0.15)],
|
||||
[NSValue valueWithRect:PGInFace(box, 0.12, 0.72, 0.29, 0.08)],
|
||||
[NSValue valueWithRect:PGInFace(box, 0.59, 0.72, 0.29, 0.08)],
|
||||
[NSValue valueWithRect:PGInFace(box, 0.27, 0.16, 0.46, 0.18)],
|
||||
[NSValue valueWithRect:PGInFace(box, 0.39, 0.33, 0.22, 0.16)]];
|
||||
for (NSUInteger i = 0; i < names.count; i++) {
|
||||
CGRect region = PGToPixels(PGRegionBounds(face, names[i], fallbacks[i].rectValue), extent);
|
||||
CGRect expanded = CGRectInset(region, -region.size.width * 0.15, -region.size.height * 0.35);
|
||||
CIImage *mask = [self ellipseInRect:expanded extent:extent inner:0.45];
|
||||
protection = PGMaximum(protection, mask);
|
||||
if (i < 2) eyes = PGMaximum(eyes, [self ellipseInRect:region extent:extent inner:0.45]);
|
||||
}
|
||||
CGRect mouth = PGRegionBounds(face, @"mouth", PGInFace(box, 0.30, 0.20, 0.40, 0.08));
|
||||
teeth = PGMaximum(teeth, [self ellipseInRect:PGToPixels(mouth, extent) extent:extent inner:0.35]);
|
||||
if (settings.showFaceBoxes) {
|
||||
CGRect pixels = PGToPixels(box, extent);
|
||||
CGFloat inset = MAX(1, MIN(pixels.size.width, pixels.size.height) * 0.005);
|
||||
CIImage *outline = [_box applyWithExtent:extent arguments:@[[CIVector vectorWithX:CGRectGetMinX(pixels) Y:CGRectGetMinY(pixels) Z:CGRectGetMaxX(pixels) W:CGRectGetMaxY(pixels)], @(inset), [CIVector vectorWithX:0.12 Y:1.0 Z:0.35 W:0.95]]];
|
||||
overlay = [outline imageByCompositingOverImage:overlay];
|
||||
}
|
||||
}
|
||||
if(settings.showTrackBox) for(NSDictionary *face in geometry) {
|
||||
CGRect pixels=PGToPixels(PGArrayRect(face[@"box"]),extent);
|
||||
CGFloat inset=MAX(1,MIN(pixels.size.width,pixels.size.height)*.005);
|
||||
CIImage *outline=[_box applyWithExtent:extent arguments:@[[CIVector vectorWithX:CGRectGetMinX(pixels) Y:CGRectGetMinY(pixels) Z:CGRectGetMaxX(pixels) W:CGRectGetMaxY(pixels)],@(inset),[CIVector vectorWithX:1 Y:.8 Z:.2 W:.95]]];
|
||||
overlay=[outline imageByCompositingOverImage:overlay];
|
||||
}
|
||||
CIImage *colorCoverage=skin;
|
||||
if (settings.featureProtection) skin = [_subtract applyWithExtent:extent arguments:@[skin, protection]];
|
||||
PGFaceFrame *frame = [[PGFaceFrame alloc] init];
|
||||
frame.faces = observations ?: @[];
|
||||
frame.deformationGeometry=geometry?:@[];
|
||||
frame.image = [self warpImage:image geometry:geometry settings:settings extent:extent];
|
||||
frame.skinMask = [self warpImage:skin geometry:geometry settings:settings extent:extent];
|
||||
frame.colorMask = [self warpImage:colorCoverage geometry:geometry settings:settings extent:extent];
|
||||
frame.teethMask = [self warpImage:teeth geometry:geometry settings:settings extent:extent];
|
||||
frame.eyeMask = [self warpImage:eyes geometry:geometry settings:settings extent:extent];
|
||||
frame.overlayImage = [overlay imageByCroppingToRect:extent];
|
||||
if (!frame.image || !frame.skinMask || !frame.colorMask || !frame.teethMask || !frame.eyeMask) {
|
||||
if (error) *error = [NSError errorWithDomain:PGFaceErrorDomain code:3 userInfo:@{NSLocalizedDescriptionKey:@"Unable to apply face geometry."}];
|
||||
return nil;
|
||||
}
|
||||
return frame;
|
||||
}
|
||||
|
||||
- (void)resetTracking {
|
||||
[_lock lock];
|
||||
for (NSMutableDictionary *target in _targets) [target removeAllObjects];
|
||||
[_lock unlock];
|
||||
[_realtime reset];
|
||||
}
|
||||
|
||||
- (NSData *)trackingDataForTarget:(NSUInteger)target {
|
||||
if (target >= 3) return nil;
|
||||
[_lock lock];
|
||||
NSDictionary *frames = [_targets[target] copy];
|
||||
[_lock unlock];
|
||||
if (!frames.count) return nil;
|
||||
return [NSPropertyListSerialization dataWithPropertyList:@{@"version":@1, @"frames":frames} format:NSPropertyListBinaryFormat_v1_0 options:0 error:nil];
|
||||
}
|
||||
|
||||
- (void)setTrackingData:(NSData *)data forTarget:(NSUInteger)target {
|
||||
if (target >= 3) return;
|
||||
NSMutableDictionary *frames = [NSMutableDictionary dictionary];
|
||||
if (data.length && data.length <= 128 * 1024 * 1024) {
|
||||
NSDictionary *archive = [NSPropertyListSerialization propertyListWithData:data options:NSPropertyListImmutable format:nil error:nil];
|
||||
if ([archive isKindOfClass:NSDictionary.class] && [archive[@"version"] isEqual:@1] && [archive[@"frames"] isKindOfClass:NSDictionary.class] && [archive[@"frames"] count] <= 250000) {
|
||||
for (id key in archive[@"frames"]) {
|
||||
id raw = archive[@"frames"][key];
|
||||
if (![key isKindOfClass:NSString.class] || ![raw isKindOfClass:NSDictionary.class]) continue;
|
||||
NSNumber *value = raw[@"value"], *scale = raw[@"scale"], *epoch = raw[@"epoch"];
|
||||
if (![value isKindOfClass:NSNumber.class] || ![scale isKindOfClass:NSNumber.class] || ![epoch isKindOfClass:NSNumber.class] || scale.intValue <= 0) continue;
|
||||
CMTime time = CMTimeMakeWithEpoch(value.longLongValue, scale.intValue, epoch.longLongValue);
|
||||
if (![key isEqualToString:PGTimeKey(time)] || ![raw[@"faces"] isKindOfClass:NSArray.class] || [raw[@"faces"] count] > 16) continue;
|
||||
NSMutableArray *faces = [NSMutableArray array];
|
||||
BOOL valid = YES;
|
||||
for (id geometry in raw[@"faces"]) {
|
||||
NSDictionary *face = PGSanitizedGeometry(geometry);
|
||||
if (!face) { valid = NO; break; }
|
||||
[faces addObject:face];
|
||||
}
|
||||
if (valid) frames[key] = @{@"value":value, @"scale":scale, @"epoch":epoch, @"faces":[faces copy]};
|
||||
}
|
||||
}
|
||||
}
|
||||
[_lock lock];
|
||||
_targets[target] = frames;
|
||||
[_lock unlock];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,170 @@
|
||||
#import <FxPlug/FxPlugSDK.h>
|
||||
#import <CoreImage/CoreImage.h>
|
||||
#import <IOSurface/IOSurface.h>
|
||||
#import "PGParameterIDs.h"
|
||||
#include <math.h>
|
||||
|
||||
@interface PGFaceSelectOSC : NSObject <FxOnScreenControl_v4>
|
||||
@property (assign) id<PROAPIAccessing> apiManager;
|
||||
@property BOOL dragging;
|
||||
@property BOOL undoOpen;
|
||||
@property BOOL pointSetterUsesPixels;
|
||||
@property BOOL loggedCoordinates;
|
||||
@property BOOL loggedPointSetter;
|
||||
@end
|
||||
@implementation PGFaceSelectOSC
|
||||
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)api {
|
||||
if((self=[super init])) _apiManager=api; return self;
|
||||
}
|
||||
- (FxDrawingCoordinates)drawingCoordinates {return kFxDrawingCoordinates_CANVAS;}
|
||||
- (id<FxOnScreenControlAPI_v4>)oscAPI {return [_apiManager apiForProtocol:@protocol(FxOnScreenControlAPI_v4)];}
|
||||
- (BOOL)objectPointFromCanvasX:(double)x y:(double)y objectX:(double *)objectX objectY:(double *)objectY {
|
||||
id<FxOnScreenControlAPI_v4> api=[self oscAPI];
|
||||
if(!api || !objectX || !objectY || !isfinite(x) || !isfinite(y)) return NO;
|
||||
// Request CANVAS events explicitly, then let the host invert its current
|
||||
// zoom, pan and object transform. The conversion API has no success result;
|
||||
// untouched or nonfinite outputs must never become a parameter write.
|
||||
double nx=NAN,ny=NAN;
|
||||
[api convertPointFromSpace:kFxDrawingCoordinates_CANVAS fromX:x fromY:y
|
||||
toSpace:kFxDrawingCoordinates_OBJECT toX:&nx toY:&ny];
|
||||
if(!isfinite(nx) || !isfinite(ny)) return NO;
|
||||
*objectX=nx;*objectY=ny;return YES;
|
||||
}
|
||||
- (BOOL)selectionEnabledAtTime:(CMTime)time {
|
||||
BOOL selected=NO;id<FxParameterRetrievalAPI_v6> api=[_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
|
||||
return api && [api getBoolValue:&selected fromParameter:PGSingleFace atTime:time] && selected;
|
||||
}
|
||||
- (void)drawOSCWithWidth:(NSInteger)width height:(NSInteger)height activePart:(NSInteger)part destinationImage:(FxImageTile *)tile atTime:(CMTime)time {
|
||||
if(!tile.ioSurface||width<=0||height<=0) return;
|
||||
size_t surfaceW=IOSurfaceGetWidth((__bridge IOSurfaceRef)tile.ioSurface),surfaceH=IOSurfaceGetHeight((__bridge IOSurfaceRef)tile.ioSurface);
|
||||
if(!surfaceW||!surfaceH) return;
|
||||
CIImage *output=[[CIImage imageWithColor:CIColor.clearColor] imageByCroppingToRect:CGRectMake(0,0,surfaceW,surfaceH)];
|
||||
if([self selectionEnabledAtTime:time] && [self oscAPI]) {
|
||||
double x=.5,y=.5;
|
||||
id<FxParameterRetrievalAPI_v6> params=[_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
|
||||
BOOL valid=[params getXValue:&x YValue:&y fromParameter:PGSelection atTime:time] && isfinite(x) && isfinite(y);
|
||||
double canvasX=NAN,canvasY=NAN;
|
||||
// FxPlug OBJECT space is normalized 0..1, exactly like point parameters.
|
||||
// objectBounds is a pixel/document rectangle and must not be applied here.
|
||||
if(valid) [[self oscAPI] convertPointFromSpace:kFxDrawingCoordinates_OBJECT fromX:x fromY:y toSpace:kFxDrawingCoordinates_CANVAS toX:&canvasX toY:&canvasY];
|
||||
if(!_loggedCoordinates) {
|
||||
_loggedCoordinates=YES;
|
||||
CGRect objectBounds=[[self oscAPI] objectBounds];
|
||||
NSLog(@"PGFaceOSC coordinates selection=(%.9g,%.9g) objectBounds=(%.9g,%.9g,%.9g,%.9g) canvas=(%.9g,%.9g) surface=%zux%zu origin=%lu",
|
||||
x,y,objectBounds.origin.x,objectBounds.origin.y,objectBounds.size.width,objectBounds.size.height,
|
||||
canvasX,canvasY,surfaceW,surfaceH,(unsigned long)tile.imageOrigin);
|
||||
}
|
||||
// CANVAS coordinates address the OSC surface. Callback width/height can
|
||||
// describe the effect image and must not rescale the converted point.
|
||||
double backing=[[self oscAPI] backingScaleFactor];
|
||||
CGFloat scale=isfinite(backing)?MAX(1,backing):1;
|
||||
CGFloat radius=10*scale;
|
||||
if(valid && isfinite(canvasX) && isfinite(canvasY)) {
|
||||
CIColor *color=part?[CIColor colorWithRed:1 green:.8 blue:.2]:[CIColor colorWithRed:.1 green:.9 blue:.8];
|
||||
CIImage *ring=[CIFilter filterWithName:@"CIRadialGradient" withInputParameters:@{@"inputCenter":[CIVector vectorWithX:canvasX Y:canvasY],@"inputRadius0":@(radius-2),@"inputRadius1":@(radius),@"inputColor0":color,@"inputColor1":CIColor.clearColor}].outputImage;
|
||||
CIImage *hole=[CIFilter filterWithName:@"CIRadialGradient" withInputParameters:@{@"inputCenter":[CIVector vectorWithX:canvasX Y:canvasY],@"inputRadius0":@(radius-3),@"inputRadius1":@(radius-2),@"inputColor0":CIColor.blackColor,@"inputColor1":CIColor.whiteColor}].outputImage;
|
||||
ring=[ring imageByApplyingFilter:@"CIBlendWithMask" withInputParameters:@{kCIInputBackgroundImageKey:output,kCIInputMaskImageKey:hole}];
|
||||
CIImage *v=[[CIImage imageWithColor:color] imageByCroppingToRect:CGRectMake(canvasX-scale,canvasY-16*scale,2*scale,32*scale)];
|
||||
CIImage *h=[[CIImage imageWithColor:color] imageByCroppingToRect:CGRectMake(canvasX-16*scale,canvasY-scale,32*scale,2*scale)];
|
||||
output=[[h imageByCompositingOverImage:v] imageByCompositingOverImage:ring];
|
||||
}
|
||||
}
|
||||
CIContext *context=[CIContext contextWithOptions:@{kCIContextCacheIntermediates:@NO}];
|
||||
size_t w=IOSurfaceGetWidth((__bridge IOSurfaceRef)tile.ioSurface),h=IOSurfaceGetHeight((__bridge IOSurfaceRef)tile.ioSurface);
|
||||
if(tile.imageOrigin==kFxImageOrigin_TOP_LEFT) output=[output imageByApplyingTransform:CGAffineTransformMake(1,0,0,-1,0,h)];
|
||||
[context render:output toIOSurface:(__bridge IOSurfaceRef)tile.ioSurface bounds:CGRectMake(0,0,w,h) colorSpace:tile.colorSpace];
|
||||
}
|
||||
- (void)hitTestOSCAtMousePositionX:(double)x mousePositionY:(double)y activePart:(NSInteger *)part atTime:(CMTime)time {
|
||||
if(!part) return;*part=0;
|
||||
double nx=NAN,ny=NAN;
|
||||
if([self selectionEnabledAtTime:time] && [self objectPointFromCanvasX:x y:y objectX:&nx objectY:&ny] &&
|
||||
nx>=0 && nx<=1 && ny>=0 && ny<=1) *part=1;
|
||||
}
|
||||
- (BOOL)pointWrite:(id<FxParameterSettingAPI_v5>)setter x:(double)x y:(double)y time:(CMTime)time {
|
||||
return setter && isfinite(x) && isfinite(y) && [setter setXValue:x YValue:y toParameter:PGSelection atTime:time];
|
||||
}
|
||||
- (BOOL)readPoint:(id<FxParameterRetrievalAPI_v6>)reader x:(double *)x y:(double *)y time:(CMTime)time {
|
||||
return reader && [reader getXValue:x YValue:y fromParameter:PGSelection atTime:time] && isfinite(*x) && isfinite(*y);
|
||||
}
|
||||
- (BOOL)pointPixelSize:(CGSize *)size {
|
||||
id<FxOnScreenControlAPI_v4> api=[self oscAPI];if(!api || !size)return NO;
|
||||
CGRect bounds=[api objectBounds];
|
||||
if(!isfinite(bounds.size.width)||!isfinite(bounds.size.height)||bounds.size.width<=4||bounds.size.height<=4)return NO;
|
||||
*size=bounds.size;return YES;
|
||||
}
|
||||
- (void)setSelectionX:(double)x y:(double)y time:(CMTime)time update:(BOOL *)update {
|
||||
if(update) *update=NO;
|
||||
if(!isfinite(x)||!isfinite(y)) return;
|
||||
double nx=fmin(1,fmax(0,x)),ny=fmin(1,fmax(0,y));
|
||||
id<FxParameterSettingAPI_v5> setter=[_apiManager apiForProtocol:@protocol(FxParameterSettingAPI_v5)];
|
||||
id<FxParameterRetrievalAPI_v6> reader=[_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
|
||||
double previousX=NAN,previousY=NAN;
|
||||
if(!setter || ![self readPoint:reader x:&previousX y:&previousY time:time])return;
|
||||
CGSize pixels=CGSizeZero;
|
||||
if(_pointSetterUsesPixels && ![self pointPixelSize:&pixels])return;
|
||||
double rawX=_pointSetterUsesPixels ? (nx-.5)*pixels.width : nx;
|
||||
double rawY=_pointSetterUsesPixels ? (ny-.5)*pixels.height : ny;
|
||||
BOOL accepted=[self pointWrite:setter x:rawX y:rawY time:time];
|
||||
BOOL changed=accepted,pixelUnits=_pointSetterUsesPixels;
|
||||
double actualX=NAN,actualY=NAN;
|
||||
BOOL readBack=accepted && [self readPoint:reader x:&actualX y:&actualY time:time];
|
||||
const double tolerance=0.00001;
|
||||
BOOL verified=readBack && fabs(actualX-nx)<=tolerance && fabs(actualY-ny)<=tolerance;
|
||||
// Motion's FxPlug 4 bridge can normalize point reads while its setter still
|
||||
// writes centered pixel values directly to OZChannel2D. Detect that exact
|
||||
// response instead of choosing units from the app version or coordinate size.
|
||||
if(readBack && !verified && !_pointSetterUsesPixels && [self pointPixelSize:&pixels] &&
|
||||
fabs(actualX-(.5+nx/pixels.width))<=tolerance &&
|
||||
fabs(actualY-(.5+ny/pixels.height))<=tolerance) {
|
||||
pixelUnits=YES;
|
||||
rawX=(nx-.5)*pixels.width;rawY=(ny-.5)*pixels.height;
|
||||
accepted=[self pointWrite:setter x:rawX y:rawY time:time];changed=changed||accepted;
|
||||
actualX=actualY=NAN;
|
||||
readBack=accepted && [self readPoint:reader x:&actualX y:&actualY time:time];
|
||||
verified=readBack && fabs(actualX-nx)<=tolerance && fabs(actualY-ny)<=tolerance;
|
||||
if(verified)_pointSetterUsesPixels=YES;
|
||||
}
|
||||
if(!verified && changed) {
|
||||
// Restore the previous point when verification fails. A failure must not
|
||||
// look like a successful drag or silently retain the calibration point.
|
||||
double restoreX=pixelUnits ? (previousX-.5)*pixels.width : previousX;
|
||||
double restoreY=pixelUnits ? (previousY-.5)*pixels.height : previousY;
|
||||
[self pointWrite:setter x:restoreX y:restoreY time:time];
|
||||
}
|
||||
if(!_loggedPointSetter) {
|
||||
_loggedPointSetter=YES;
|
||||
NSLog(@"PGFaceOSC point-write desired=(%.9g,%.9g) setter=(%.9g,%.9g) readback=(%.9g,%.9g) mode=%@ verified=%d",
|
||||
nx,ny,rawX,rawY,actualX,actualY,_pointSetterUsesPixels?@"centered-pixels":@"normalized",verified);
|
||||
}
|
||||
if(update)*update=verified;
|
||||
}
|
||||
- (void)mouseDownAtPositionX:(double)x positionY:(double)y activePart:(NSInteger)part modifiers:(FxModifierKeys)keys forceUpdate:(BOOL *)update atTime:(CMTime)time {
|
||||
if(update) *update=NO;
|
||||
double nx=NAN,ny=NAN;
|
||||
if(part!=1 || ![self selectionEnabledAtTime:time] ||
|
||||
![self objectPointFromCanvasX:x y:y objectX:&nx objectY:&ny] || nx<0 || nx>1 || ny<0 || ny>1) return;
|
||||
id<FxUndoAPI> undo=[_apiManager apiForProtocol:@protocol(FxUndoAPI)];
|
||||
if(_undoOpen) [undo endUndoGroup];
|
||||
_undoOpen=[undo startUndoGroup:@"选择人脸"];
|
||||
BOOL changed=NO;[self setSelectionX:nx y:ny time:time update:&changed];
|
||||
_dragging=changed;
|
||||
if(!changed && _undoOpen) {[undo endUndoGroup];_undoOpen=NO;}
|
||||
if(update) *update=changed;
|
||||
}
|
||||
- (void)mouseDraggedAtPositionX:(double)x positionY:(double)y activePart:(NSInteger)part modifiers:(FxModifierKeys)keys forceUpdate:(BOOL *)update atTime:(CMTime)time {
|
||||
if(update) *update=NO;
|
||||
double nx=NAN,ny=NAN;
|
||||
if(_dragging && part==1 && [self selectionEnabledAtTime:time] &&
|
||||
[self objectPointFromCanvasX:x y:y objectX:&nx objectY:&ny]) [self setSelectionX:nx y:ny time:time update:update];
|
||||
}
|
||||
- (void)mouseUpAtPositionX:(double)x positionY:(double)y activePart:(NSInteger)part modifiers:(FxModifierKeys)keys forceUpdate:(BOOL *)update atTime:(CMTime)time {
|
||||
if(update) *update=NO;
|
||||
double nx=NAN,ny=NAN;
|
||||
if(_dragging && part==1 && [self selectionEnabledAtTime:time] &&
|
||||
[self objectPointFromCanvasX:x y:y objectX:&nx objectY:&ny]) [self setSelectionX:nx y:ny time:time update:update];
|
||||
_dragging=NO;
|
||||
if(_undoOpen) {id<FxUndoAPI> undo=[_apiManager apiForProtocol:@protocol(FxUndoAPI)];[undo endUndoGroup];_undoOpen=NO;}
|
||||
}
|
||||
- (void)keyDownAtPositionX:(double)x positionY:(double)y keyPressed:(unsigned short)key modifiers:(FxModifierKeys)modifiers forceUpdate:(BOOL *)update didHandle:(BOOL *)handled atTime:(CMTime)time {if(handled)*handled=NO;if(update)*update=NO;}
|
||||
- (void)keyUpAtPositionX:(double)x positionY:(double)y keyPressed:(unsigned short)key modifiers:(FxModifierKeys)modifiers forceUpdate:(BOOL *)update didHandle:(BOOL *)handled atTime:(CMTime)time {if(handled)*handled=NO;if(update)*update=NO;}
|
||||
@end
|
||||
@@ -0,0 +1,45 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <FxPlug/FxPlugSDK.h>
|
||||
#import "PGBeautyTypes.h"
|
||||
#import "PGParameterIDs.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// The descriptor list is shared by UI, persistence and render settings.
|
||||
/// Keys: id, name, section (smooth/color/shape/more), kind
|
||||
/// (slider/toggle/preset/master), min, max, default, format, bypass.
|
||||
FOUNDATION_EXPORT NSArray<NSDictionary *> *PGInspectorControls(void);
|
||||
FOUNDATION_EXPORT NSDictionary * _Nullable PGInspectorDescriptor(UInt32 identifier);
|
||||
|
||||
@interface PGInspectorState : NSObject <NSSecureCoding, NSCopying, FxCustomParameterInterpolation_v2>
|
||||
@property (nonatomic, copy, readonly) NSDictionary<NSNumber *, NSNumber *> *values;
|
||||
@property (nonatomic, copy, readonly) NSSet<NSNumber *> *disabledParameters;
|
||||
/// An untouched panel must not replace parameters from an existing document.
|
||||
@property (nonatomic, readonly) BOOL hasEdits;
|
||||
+ (instancetype)stateWithValues:(NSDictionary *)values disabledParameters:(NSSet *)disabled hasEdits:(BOOL)edited;
|
||||
- (double)valueForParameter:(UInt32)identifier;
|
||||
- (BOOL)isParameterEnabled:(UInt32)identifier;
|
||||
@end
|
||||
|
||||
FOUNDATION_EXPORT PGBeautySettings PGSettingsWithInspectorState(PGBeautySettings settings, PGInspectorState * _Nullable state);
|
||||
|
||||
/// All arbitrary-time FxPlug parameter access is bracketed by host actions.
|
||||
/// The published custom object owns the full UI state, so FCP save/undo does
|
||||
/// not depend on unpublished parameters being mirrored by the template.
|
||||
@interface PGInspectorController : NSObject
|
||||
@property (nonatomic, strong, readonly) PGInspectorState *state;
|
||||
@property (nonatomic, readonly) BOOL available;
|
||||
@property (nonatomic, copy, readonly) NSString *statusMessage;
|
||||
/// The actual custom inspector view identifies the action to the native host.
|
||||
@property (nonatomic, weak, nullable) NSView *actionSender;
|
||||
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager;
|
||||
- (void)refresh;
|
||||
- (void)documentDidChange;
|
||||
- (void)beginInteraction;
|
||||
- (void)endInteraction;
|
||||
- (BOOL)setValue:(double)value forParameter:(UInt32)identifier;
|
||||
- (BOOL)toggleEnabledForParameter:(UInt32)identifier;
|
||||
- (BOOL)resetParameter:(UInt32)identifier;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,291 @@
|
||||
#import "PGInspectorState.h"
|
||||
#import <math.h>
|
||||
#import <stddef.h>
|
||||
#import <os/log.h>
|
||||
|
||||
NSArray<NSDictionary *> *PGInspectorControls(void) {
|
||||
static NSArray *controls; static dispatch_once_t once;
|
||||
dispatch_once(&once, ^{
|
||||
PGBeautySettings defaults=PGBeautyDefaults();
|
||||
NSMutableArray *items=[NSMutableArray new];
|
||||
#define ITEM(ID,NAME,FIELD,SECTION,KIND,FORMAT,MIN,MAX,BYPASS,STORAGE) \
|
||||
[items addObject:@{@"id":@(ID),@"name":@NAME,@"section":@SECTION,@"kind":@KIND,@"format":@FORMAT,@"min":@(MIN),@"max":@(MAX),@"default":@(defaults.FIELD),@"bypass":@(BYPASS),@"offset":@(offsetof(PGBeautySettings,FIELD)),@"storage":@STORAGE}]
|
||||
ITEM(PGSmoothingEnabled,"磨皮",featureProtection,"smooth","master","integer",0,1,NO,"master");
|
||||
ITEM(PGMidtone,"磨皮程度",midtoneDetail,"smooth","slider","percent",0,1,YES,"float");
|
||||
ITEM(PGMicroDetail,"微细锐化",microDetail,"smooth","slider","percent",0,1,YES,"float");
|
||||
ITEM(PGFeatureProtectionAmount,"五官保护",featureProtectionAmount,"smooth","slider","percent",0,1,YES,"float");
|
||||
ITEM(PGNonSkinProtection,"非肤色区保护",nonSkinProtection,"smooth","slider","percent",0,1,YES,"float");
|
||||
ITEM(PGColorEnabled,"美白",featureProtection,"color","master","integer",0,1,NO,"master");
|
||||
ITEM(PGTonePreset,"肤色",skinTonePreset,"color","preset","integer",0,6,NO,"uint");
|
||||
NSMutableDictionary *preset=[items.lastObject mutableCopy];
|
||||
preset[@"options"]=@[@"原色",@"自然白",@"冷白",@"暖白",@"红润白",@"小麦",@"古铜"];items[items.count-1]=preset;
|
||||
ITEM(PGBrightness,"肤色亮度",skinBrightness,"color","slider","percent",0,1,YES,"float");
|
||||
ITEM(PGTeeth,"白牙",teethWhitening,"color","slider","percent",0,1,YES,"float");
|
||||
ITEM(PGHue,"皮肤色相",skinHue,"color","slider","degrees",-30,30,YES,"float");
|
||||
ITEM(PGShapeEnabled,"瘦脸",featureProtection,"shape","master","integer",0,1,NO,"master");
|
||||
ITEM(PGTrackBoxes,"检测框预览",showTrackBox,"shape","toggle","integer",0,1,NO,"uint");
|
||||
ITEM(PGFastMulti,"多人模式",fastMultiFace,"shape","toggle","integer",0,1,NO,"uint");
|
||||
NSMutableDictionary *multi=[items.lastObject mutableCopy];
|
||||
multi[@"tooltip"]=@"多人模式易抖动,请谨慎使用";items[items.count-1]=multi;
|
||||
ITEM(PGThin,"瘦脸",faceThin,"shape","slider","signed",0,1,YES,"float");
|
||||
ITEM(PGBigEye,"大眼",faceBigEye,"shape","slider","signed",0,1,YES,"float");
|
||||
ITEM(PGShort,"短脸",faceShort,"shape","slider","signed",-1,1,YES,"float");
|
||||
ITEM(PGNarrow,"窄脸",faceNarrow,"shape","slider","signed",-1,1,YES,"float");
|
||||
ITEM(PGChin,"下巴",faceChin,"shape","slider","signed",-1,1,YES,"float");
|
||||
ITEM(PGVFace,"V脸",faceV,"shape","slider","signed",0,1,YES,"float");
|
||||
ITEM(PGJaw,"下颌骨",faceJaw,"shape","slider","signed",0,1,YES,"float");
|
||||
ITEM(PGCheekbone,"颧骨",faceCheekbone,"shape","slider","signed",0,1,YES,"float");
|
||||
ITEM(PGSmallHead,"小头",faceSmallHead,"shape","slider","signed",0,1,YES,"float");
|
||||
ITEM(PGSmallHeadRange,"小头范围",faceSmallHeadRange,"shape","slider","percent",0,1,NO,"float");
|
||||
ITEM(PGAmount,"磨皮强度",amount,"more","slider","percent",0,1,YES,"float");
|
||||
ITEM(PGHighPass,"全局磨皮",highPassDetail,"more","slider","percent",0,1,YES,"float");
|
||||
ITEM(PGRadius,"磨皮半径",radius,"more","slider","radius",1,30,NO,"float");
|
||||
ITEM(PGSaturation,"肤色饱和度",skinSaturation,"more","slider","percent",-100,100,YES,"float");
|
||||
ITEM(PGEvenTone,"均匀肤色",skinEvenTone,"more","slider","percent",0,1,YES,"float");
|
||||
ITEM(PGEyeBright,"眼睛提亮",eyeBrightening,"more","slider","percent",0,1,YES,"float");
|
||||
ITEM(PGSharpness,"锐化",sharpness,"more","slider","percent",0,1,YES,"float");
|
||||
ITEM(PGJumpGuard,"防跳脸范围",faceJumpGuardRange,"more","slider","percent",1,4,NO,"float");
|
||||
ITEM(PGMix,"整体混合",mix,"more","slider","percent",0,1,NO,"float");
|
||||
#undef ITEM
|
||||
controls=[items copy];
|
||||
}); return controls;
|
||||
}
|
||||
NSDictionary *PGInspectorDescriptor(UInt32 identifier) {
|
||||
for(NSDictionary *d in PGInspectorControls()) if([d[@"id"] unsignedIntValue]==identifier) return d;
|
||||
return nil;
|
||||
}
|
||||
static double PGControlValue(id raw,NSDictionary *d) {
|
||||
double value=[raw isKindOfClass:NSNumber.class]?[raw doubleValue]:[d[@"default"] doubleValue];
|
||||
if(!isfinite(value)) value=[d[@"default"] doubleValue];
|
||||
value=fmin([d[@"max"] doubleValue],fmax([d[@"min"] doubleValue],value));
|
||||
if(![d[@"storage"] isEqual:@"float"]) value=round(value);
|
||||
return value;
|
||||
}
|
||||
@implementation PGInspectorState
|
||||
+ (BOOL)supportsSecureCoding {return YES;}
|
||||
+ (instancetype)stateWithValues:(NSDictionary *)values disabledParameters:(NSSet *)disabled hasEdits:(BOOL)edited {
|
||||
PGInspectorState *state=[self new]; NSMutableDictionary *safe=[NSMutableDictionary new];NSMutableSet *bypassed=[NSMutableSet new];
|
||||
for(NSDictionary *d in PGInspectorControls()) {
|
||||
NSNumber *key=d[@"id"];id raw=values[key];
|
||||
// Schema 1 documents stored five-feature protection as the legacy bool.
|
||||
// New numeric values win when present; old archives gain its exact 0/1.
|
||||
if(key.unsignedIntValue==PGFeatureProtectionAmount && !raw && [values[@(PGFeatureProtect)] isKindOfClass:NSNumber.class])
|
||||
raw=@([values[@(PGFeatureProtect)] boolValue]?1:0);
|
||||
safe[key]=@(PGControlValue(raw,d));
|
||||
if([d[@"bypass"] boolValue] && [disabled containsObject:key]) [bypassed addObject:key];
|
||||
}
|
||||
state->_values=[safe copy];state->_disabledParameters=[bypassed copy];state->_hasEdits=edited;return state;
|
||||
}
|
||||
- (instancetype)init {if((self=[super init])) {_values=@{};_disabledParameters=[NSSet set];}return self;}
|
||||
- (instancetype)initWithCoder:(NSCoder *)coder {
|
||||
NSInteger version=[coder decodeIntegerForKey:@"schema"];
|
||||
if(version!=1) return nil;
|
||||
NSSet *classes=[NSSet setWithObjects:NSDictionary.class,NSNumber.class,nil];
|
||||
NSDictionary *values=[coder decodeObjectOfClasses:classes forKey:@"values"];
|
||||
NSSet *disabled=[coder decodeObjectOfClasses:[NSSet setWithObjects:NSSet.class,NSNumber.class,nil] forKey:@"disabled"];
|
||||
return [PGInspectorState stateWithValues:values?:@{} disabledParameters:disabled?:[NSSet set] hasEdits:[coder decodeBoolForKey:@"edited"]];
|
||||
}
|
||||
- (void)encodeWithCoder:(NSCoder *)coder {
|
||||
[coder encodeInteger:1 forKey:@"schema"];[coder encodeObject:_values forKey:@"values"];
|
||||
[coder encodeObject:_disabledParameters forKey:@"disabled"];[coder encodeBool:_hasEdits forKey:@"edited"];
|
||||
}
|
||||
- (id)copyWithZone:(NSZone *)zone {return [PGInspectorState stateWithValues:_values disabledParameters:_disabledParameters hasEdits:_hasEdits];}
|
||||
- (double)valueForParameter:(UInt32)identifier {NSDictionary *d=PGInspectorDescriptor(identifier);return d?PGControlValue(_values[@(identifier)],d):0;}
|
||||
- (BOOL)isParameterEnabled:(UInt32)identifier {return ![_disabledParameters containsObject:@(identifier)];}
|
||||
- (BOOL)isEqual:(id)object {
|
||||
if(object==self)return YES;
|
||||
if(![object isKindOfClass:PGInspectorState.class])return NO;
|
||||
PGInspectorState *other=object;return _hasEdits==other.hasEdits && [_values isEqual:other.values] && [_disabledParameters isEqual:other.disabledParameters];
|
||||
}
|
||||
- (NSUInteger)hash {return _values.hash ^ _disabledParameters.hash ^ _hasEdits;}
|
||||
- (NSObject<NSSecureCoding,NSCopying> *)interpolateBetween:(NSObject<NSSecureCoding,NSCopying> *)rightValue withWeight:(float)weight {
|
||||
if(![rightValue isKindOfClass:PGInspectorState.class])return [self copy];
|
||||
PGInspectorState *right=(PGInspectorState *)rightValue;double t=isfinite(weight)?fmin(1,fmax(0,weight)):0;
|
||||
if(t==0)return [self copy];if(t==1)return [right copy];
|
||||
if(!_hasEdits || !right.hasEdits)return [self copy];
|
||||
NSMutableDictionary *values=[NSMutableDictionary new];
|
||||
for(NSDictionary *d in PGInspectorControls()) {
|
||||
UInt32 key=[d[@"id"] unsignedIntValue];double a=[self valueForParameter:key],b=[right valueForParameter:key];
|
||||
// Menus, switches and enable masks hold the preceding key until the
|
||||
// next key. Numeric slider values interpolate within their valid range.
|
||||
values[@(key)]=[d[@"storage"] isEqual:@"float"]?@(a+(b-a)*t):@(a);
|
||||
}
|
||||
return [PGInspectorState stateWithValues:values disabledParameters:_disabledParameters hasEdits:_hasEdits||right.hasEdits];
|
||||
}
|
||||
@end
|
||||
|
||||
PGBeautySettings PGSettingsWithInspectorState(PGBeautySettings s,PGInspectorState *state) {
|
||||
if(!state.hasEdits)return s;
|
||||
for(NSDictionary *d in PGInspectorControls()) {
|
||||
NSString *storage=d[@"storage"];if([storage isEqual:@"master"])continue;
|
||||
UInt32 key=[d[@"id"] unsignedIntValue];double value=[state valueForParameter:key];
|
||||
if(![state isParameterEnabled:key]) value=0;
|
||||
size_t offset=[d[@"offset"] unsignedIntegerValue];
|
||||
if([storage isEqual:@"float"]) *(float *)((uint8_t *)&s+offset)=value;
|
||||
else *(uint32_t *)((uint8_t *)&s+offset)=(uint32_t)value;
|
||||
}
|
||||
s.featureProtection=s.featureProtectionAmount>0;
|
||||
if(![state valueForParameter:PGSmoothingEnabled])s.amount=s.midtoneDetail=s.highPassDetail=s.microDetail=0;
|
||||
if(![state valueForParameter:PGColorEnabled]) {s.skinBrightness=s.skinHue=s.skinSaturation=s.skinEvenTone=s.teethWhitening=s.eyeBrightening=0;s.skinTonePreset=0;}
|
||||
if(![state valueForParameter:PGShapeEnabled]) {s.faceThin=s.faceBigEye=s.faceShort=s.faceNarrow=s.faceChin=s.faceV=s.faceJaw=s.faceCheekbone=s.faceSmallHead=0;s.showTrackBox=0;}
|
||||
return s;
|
||||
}
|
||||
|
||||
@interface PGInspectorController ()
|
||||
@property (nonatomic,strong,readwrite) PGInspectorState *state;
|
||||
@property (nonatomic,readwrite) BOOL available;
|
||||
@property (nonatomic,copy,readwrite) NSString *statusMessage;
|
||||
@property (nonatomic,strong) id<PROAPIAccessing> manager;
|
||||
@property (nonatomic,strong) id<FxCustomParameterActionAPI_v4> action;
|
||||
@property (nonatomic) BOOL interacting;
|
||||
@property (nonatomic) NSTimeInterval pendingUntil;
|
||||
@property (nonatomic) CMTime pendingTime;
|
||||
@property (nonatomic, strong) id activeSender;
|
||||
@property (nonatomic) BOOL reportedConnection;
|
||||
@property (nonatomic) BOOL reportedMissingAction;
|
||||
@end
|
||||
@implementation PGInspectorController
|
||||
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager {
|
||||
if((self=[super init])){_manager=manager;_state=[PGInspectorState stateWithValues:@{} disabledParameters:[NSSet set] hasEdits:NO];_statusMessage=@"";}
|
||||
return self;
|
||||
}
|
||||
- (BOOL)start {
|
||||
if(_interacting)return YES;
|
||||
_action=[_manager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];
|
||||
if(!_action){
|
||||
_available=NO;_statusMessage=@"等待宿主连接";
|
||||
if(!_reportedMissingAction){os_log(OS_LOG_DEFAULT,"PGInspector action API unavailable manager=%{public}d viewSender=%{public}d onMain=%{public}d",_manager!=nil,_actionSender!=nil,NSThread.isMainThread);_reportedMissingAction=YES;}
|
||||
return NO;
|
||||
}
|
||||
// A native host can expose parameter APIs only after the custom view's
|
||||
// action has established its document context. Never gate startAction on
|
||||
// those APIs being available before entering the action.
|
||||
BOOL readBefore=NO,writeBefore=NO;
|
||||
if(!_reportedConnection){
|
||||
readBefore=[_manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)]!=nil;
|
||||
writeBefore=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v5)]!=nil;
|
||||
}
|
||||
_activeSender=_actionSender ?: self;
|
||||
[_action startAction:_activeSender];_interacting=YES;
|
||||
@try {
|
||||
id retrieval=[_manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
|
||||
id setting=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v5)];
|
||||
_available=retrieval && setting;
|
||||
if(!_reportedConnection){
|
||||
os_log(OS_LOG_DEFAULT,"PGInspector connection readBefore=%{public}d writeBefore=%{public}d readInAction=%{public}d writeInAction=%{public}d viewSender=%{public}d onMain=%{public}d",readBefore,writeBefore,retrieval!=nil,setting!=nil,[_activeSender isKindOfClass:NSView.class],NSThread.isMainThread);
|
||||
_reportedConnection=YES;
|
||||
}
|
||||
if(!_available){_statusMessage=@"等待宿主连接";[self finish];return NO;}
|
||||
} @catch(NSException *exception) {[self finish];@throw exception;}
|
||||
return YES;
|
||||
}
|
||||
- (void)finish {if(_interacting){_interacting=NO;[_action endAction:_activeSender];_action=nil;_activeSender=nil;}}
|
||||
- (void)readAtTime:(CMTime)time {
|
||||
if(_pendingUntil && CMTimeCompare(time,_pendingTime)!=0)_pendingUntil=0;
|
||||
id<FxParameterRetrievalAPI_v6> api=[_manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
|
||||
NSObject *object=nil;[api getCustomParameterValue:&object fromParameter:PGInspectorPanel atTime:time];
|
||||
if([object isKindOfClass:PGInspectorState.class] && [(PGInspectorState *)object hasEdits]) {
|
||||
PGInspectorState *host=(PGInspectorState *)object;
|
||||
if([host isEqual:_state])_pendingUntil=0;
|
||||
if(!_pendingUntil || NSDate.timeIntervalSinceReferenceDate>=_pendingUntil)_state=[host copy];
|
||||
return;
|
||||
}
|
||||
if(_pendingUntil && NSDate.timeIntervalSinceReferenceDate<_pendingUntil)return;
|
||||
NSMutableDictionary *values=[NSMutableDictionary new];
|
||||
for(NSDictionary *d in PGInspectorControls()) {
|
||||
UInt32 key=[d[@"id"] unsignedIntValue];double value=[d[@"default"] doubleValue];
|
||||
if([d[@"kind"] isEqual:@"preset"]) {int menu=(int)value;if([api getIntValue:&menu fromParameter:key atTime:time])value=menu;}
|
||||
else if([d[@"kind"] isEqual:@"toggle"] || [d[@"kind"] isEqual:@"master"]) {BOOL on=value!=0;if([api getBoolValue:&on fromParameter:key atTime:time])value=on;}
|
||||
else [api getFloatValue:&value fromParameter:key atTime:time];
|
||||
values[@(key)]=@(value);
|
||||
}
|
||||
// The old bool can still disable protection. A true value must preserve a
|
||||
// numeric setting already read above; its registered default is one for
|
||||
// old documents that have no independently stored numeric parameter.
|
||||
BOOL legacyFeatureProtection=YES;
|
||||
if([api getBoolValue:&legacyFeatureProtection fromParameter:PGFeatureProtect atTime:time] && !legacyFeatureProtection)
|
||||
values[@(PGFeatureProtectionAmount)]=@0;
|
||||
BOOL legacyDetail=YES;[api getBoolValue:&legacyDetail fromParameter:PGDetailEnabled atTime:time];
|
||||
NSMutableSet *disabled=legacyDetail?[NSMutableSet set]:[NSMutableSet setWithObjects:@(PGHighPass),@(PGSharpness),nil];
|
||||
// Earlier versions put high-pass smoothing under a different group. Keep
|
||||
// its effective state when importing a document whose local-skin group was
|
||||
// off, rather than turning a still-active global effect off on first edit.
|
||||
if(![values[@(PGSmoothingEnabled)] boolValue] && legacyDetail && [values[@(PGHighPass)] doubleValue]>0) {
|
||||
values[@(PGSmoothingEnabled)]=@YES;
|
||||
[disabled addObject:@(PGMidtone)];[disabled addObject:@(PGAmount)];[disabled addObject:@(PGMicroDetail)];
|
||||
}
|
||||
_state=[PGInspectorState stateWithValues:values disabledParameters:disabled hasEdits:NO];
|
||||
}
|
||||
- (void)refresh {
|
||||
if(_interacting)return;
|
||||
if(![self start])return;
|
||||
@try {[self readAtTime:[_action currentTime]];_statusMessage=@"";} @finally {[self finish];}
|
||||
}
|
||||
- (void)documentDidChange {if(_interacting)return;_pendingUntil=0;[self refresh];}
|
||||
- (void)beginInteraction {
|
||||
if(_interacting)return;
|
||||
if([self start]) {
|
||||
// A new gesture starts from the authoritative document, including an
|
||||
// immediate undo. The short pending hold only prevents display flicker;
|
||||
// it must never resurrect an undone value in a subsequent edit.
|
||||
_pendingUntil=0;[self readAtTime:[_action currentTime]];
|
||||
}
|
||||
}
|
||||
- (void)endInteraction {[self finish];}
|
||||
- (BOOL)commit:(PGInspectorState *)next {
|
||||
if([next isEqual:_state] && _state.hasEdits)return YES;
|
||||
id<FxParameterSettingAPI_v5> api=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v5)];
|
||||
CMTime time=[_action currentTime];
|
||||
// The published object is authoritative. Only mirror after its write was
|
||||
// accepted; a rejected write must never leave half-applied hidden values.
|
||||
if(![api setCustomParameterValue:next toParameter:PGInspectorPanel atTime:time]){_statusMessage=@"参数未能保存,请重试";return NO;}
|
||||
for(NSDictionary *d in PGInspectorControls()) {
|
||||
UInt32 key=[d[@"id"] unsignedIntValue];double value=[next valueForParameter:key];
|
||||
if(![next isParameterEnabled:key])value=0;
|
||||
double previous=[_state isParameterEnabled:key]?[_state valueForParameter:key]:0;
|
||||
if(previous==value)continue;
|
||||
if([d[@"kind"] isEqual:@"preset"]) [api setIntValue:(int)value toParameter:key atTime:time];
|
||||
else if([d[@"kind"] isEqual:@"toggle"] || [d[@"kind"] isEqual:@"master"]) [api setBoolValue:value!=0 toParameter:key atTime:time];
|
||||
else [api setFloatValue:value toParameter:key atTime:time];
|
||||
}
|
||||
BOOL featureProtection=[next isParameterEnabled:PGFeatureProtectionAmount] && [next valueForParameter:PGFeatureProtectionAmount]>0;
|
||||
id<FxParameterRetrievalAPI_v6> reader=[_manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
|
||||
BOOL previousProtection=!featureProtection;
|
||||
if(![reader getBoolValue:&previousProtection fromParameter:PGFeatureProtect atTime:time] || previousProtection!=featureProtection)
|
||||
[api setBoolValue:featureProtection toParameter:PGFeatureProtect atTime:time];
|
||||
_state=next;_pendingUntil=NSDate.timeIntervalSinceReferenceDate+.35;_pendingTime=time;_statusMessage=@"";return YES;
|
||||
}
|
||||
- (BOOL)setValue:(double)value forParameter:(UInt32)identifier {
|
||||
NSDictionary *d=PGInspectorDescriptor(identifier);if(!d || !isfinite(value))return NO;
|
||||
BOOL owned=!_interacting;if(owned)[self beginInteraction];if(!_interacting)return NO;
|
||||
BOOL ok=NO;@try {
|
||||
NSMutableDictionary *values=[_state.values mutableCopy];values[@(identifier)]=@(PGControlValue(@(value),d));
|
||||
ok=[self commit:[PGInspectorState stateWithValues:values disabledParameters:_state.disabledParameters hasEdits:YES]];
|
||||
} @finally {if(owned)[self finish];}return ok;
|
||||
}
|
||||
- (BOOL)toggleEnabledForParameter:(UInt32)identifier {
|
||||
NSDictionary *d=PGInspectorDescriptor(identifier);if(!d)return NO;
|
||||
if([d[@"kind"] isEqual:@"master"] || [d[@"kind"] isEqual:@"toggle"]) {
|
||||
BOOL owned=!_interacting;if(owned)[self beginInteraction];if(!_interacting)return NO;
|
||||
BOOL ok=NO;@try {ok=[self setValue:![_state valueForParameter:identifier] forParameter:identifier];}
|
||||
@finally {if(owned)[self finish];}return ok;
|
||||
}
|
||||
if(![d[@"bypass"] boolValue])return NO;
|
||||
BOOL owned=!_interacting;if(owned)[self beginInteraction];if(!_interacting)return NO;
|
||||
BOOL ok=NO;@try {
|
||||
NSMutableSet *disabled=[_state.disabledParameters mutableCopy];NSNumber *key=@(identifier);
|
||||
if([disabled containsObject:key])[disabled removeObject:key];else [disabled addObject:key];
|
||||
ok=[self commit:[PGInspectorState stateWithValues:_state.values disabledParameters:disabled hasEdits:YES]];
|
||||
} @finally {if(owned)[self finish];}return ok;
|
||||
}
|
||||
- (BOOL)resetParameter:(UInt32)identifier {
|
||||
NSDictionary *d=PGInspectorDescriptor(identifier);if(!d)return NO;
|
||||
BOOL owned=!_interacting;if(owned)[self beginInteraction];if(!_interacting)return NO;
|
||||
BOOL ok=NO;@try {
|
||||
NSMutableDictionary *values=[_state.values mutableCopy];values[@(identifier)]=d[@"default"];
|
||||
NSMutableSet *disabled=[_state.disabledParameters mutableCopy];[disabled removeObject:@(identifier)];
|
||||
ok=[self commit:[PGInspectorState stateWithValues:values disabledParameters:disabled hasEdits:YES]];
|
||||
} @finally {if(owned)[self finish];}return ok;
|
||||
}
|
||||
- (void)dealloc {if(_interacting)[_action endAction:_activeSender];}
|
||||
@end
|
||||
@@ -0,0 +1,16 @@
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "PGInspectorState.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// Native inspector controls. Host access belongs exclusively to the controller.
|
||||
@interface PGInspectorView : NSView
|
||||
@property (nonatomic, strong, readonly) PGInspectorController *controller;
|
||||
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager;
|
||||
/// Also permits a deterministic controller in an offscreen preview or test.
|
||||
- (instancetype)initWithController:(PGInspectorController *)controller;
|
||||
- (void)refreshFromHost;
|
||||
- (void)hostParameterChanged;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,369 @@
|
||||
#import "PGInspectorView.h"
|
||||
#include <math.h>
|
||||
|
||||
static NSColor *PGUIColor(CGFloat r, CGFloat g, CGFloat b, CGFloat a) {
|
||||
return [NSColor colorWithSRGBRed:r green:g blue:b alpha:a];
|
||||
}
|
||||
static NSColor *PGUIText(void) { return PGUIColor(.88,.91,.95,1); }
|
||||
static NSColor *PGUIMuted(void) { return PGUIColor(.60,.65,.73,1); }
|
||||
static NSTextField *PGUILabel(NSString *text, CGFloat size, NSFontWeight weight) {
|
||||
NSTextField *label=[NSTextField labelWithString:text ?: @""];
|
||||
label.font=[NSFont systemFontOfSize:size weight:weight]; label.textColor=PGUIText();
|
||||
label.lineBreakMode=NSLineBreakByTruncatingTail; return label;
|
||||
}
|
||||
static CGFloat PGValueScale(NSDictionary *descriptor) {
|
||||
return [descriptor[@"format"] isEqual:@"percent"] && [descriptor[@"max"] doubleValue]<=10 ? 100 : 1;
|
||||
}
|
||||
static NSString *PGFormattedValue(NSDictionary *descriptor, double value) {
|
||||
NSString *format=descriptor[@"format"];
|
||||
if ([format isEqual:@"percent"]) return [NSString stringWithFormat:@"%.0f%%",value*PGValueScale(descriptor)];
|
||||
if ([format isEqual:@"degrees"]) return [NSString stringWithFormat:@"%+.0f°",value];
|
||||
if ([format isEqual:@"signed"]) return [NSString stringWithFormat:@"%.2f",value];
|
||||
if ([format isEqual:@"integer"]) return [NSString stringWithFormat:@"%.0f",value];
|
||||
return [NSString stringWithFormat:@"%.1f",value];
|
||||
}
|
||||
|
||||
@interface PGInspectorGlyphButton : NSButton
|
||||
@property (nonatomic, copy) NSString *glyph;
|
||||
@property (nonatomic, strong) NSColor *accent;
|
||||
@property (nonatomic, strong) NSColor *swatch;
|
||||
@end
|
||||
@implementation PGInspectorGlyphButton
|
||||
- (BOOL)isFlipped { return YES; }
|
||||
- (void)drawRect:(NSRect)dirtyRect {
|
||||
(void)dirtyRect; NSRect b=NSInsetRect(self.bounds,1,1);
|
||||
CGFloat opacity=self.enabled?1:.35;
|
||||
NSColor *accent=[self.accent colorWithAlphaComponent:opacity];
|
||||
BOOL on=self.state==NSControlStateValueOn;
|
||||
if ([self.glyph isEqual:@"swatch"]) {
|
||||
NSRect circle=NSInsetRect(b,3,3);
|
||||
[[(self.swatch ?: PGUIColor(.12,.19,.23,1)) colorWithAlphaComponent:opacity] setFill]; [[NSBezierPath bezierPathWithOvalInRect:circle] fill];
|
||||
[[PGUIText() colorWithAlphaComponent:.25*opacity] setStroke];
|
||||
NSBezierPath *ring=[NSBezierPath bezierPathWithOvalInRect:circle];ring.lineWidth=1;[ring stroke];
|
||||
if (!self.swatch) {
|
||||
[PGUIMuted() setStroke];NSBezierPath *slash=[NSBezierPath bezierPath];
|
||||
[slash moveToPoint:NSMakePoint(NSMinX(circle)+4,NSMinY(circle)+4)];[slash lineToPoint:NSMakePoint(NSMaxX(circle)-4,NSMaxY(circle)-4)];slash.lineWidth=1.5;[slash stroke];
|
||||
}
|
||||
if(on) { [accent setStroke];NSBezierPath *selection=[NSBezierPath bezierPathWithOvalInRect:NSInsetRect(b,.5,.5)];selection.lineWidth=1.5;[selection stroke]; }
|
||||
} else if ([self.glyph isEqual:@"switch"]) {
|
||||
NSRect pill=NSInsetRect(b,1,3);
|
||||
[(on?accent:PGUIColor(.20,.25,.34,opacity)) setFill];[[NSBezierPath bezierPathWithRoundedRect:pill xRadius:NSHeight(pill)/2 yRadius:NSHeight(pill)/2]fill];
|
||||
CGFloat diameter=NSHeight(pill)-4;CGFloat x=on?NSMaxX(pill)-diameter-2:NSMinX(pill)+2;
|
||||
[[NSColor colorWithWhite:.98 alpha:opacity]setFill];[[NSBezierPath bezierPathWithOvalInRect:NSMakeRect(x,NSMinY(pill)+2,diameter,diameter)]fill];
|
||||
} else {
|
||||
NSBezierPath *back=[NSBezierPath bezierPathWithRoundedRect:b xRadius:7 yRadius:7];
|
||||
[[self.accent colorWithAlphaComponent:([self.glyph isEqual:@"eye"]?.055:.13)*opacity]setFill];[back fill];
|
||||
if ([self.glyph isEqual:@"eye"]) {
|
||||
[[self.accent colorWithAlphaComponent:.35*opacity]setStroke];back.lineWidth=.7;[back stroke];
|
||||
NSPoint c=NSMakePoint(NSMidX(b),NSMidY(b));
|
||||
NSBezierPath *eye=[NSBezierPath bezierPath];[eye moveToPoint:NSMakePoint(c.x-6,c.y)];
|
||||
[eye curveToPoint:NSMakePoint(c.x+6,c.y) controlPoint1:NSMakePoint(c.x-3,c.y-5.5) controlPoint2:NSMakePoint(c.x+3,c.y-5.5)];
|
||||
[eye curveToPoint:NSMakePoint(c.x-6,c.y) controlPoint1:NSMakePoint(c.x+3,c.y+5.5) controlPoint2:NSMakePoint(c.x-3,c.y+5.5)];eye.lineWidth=1.3;[accent setStroke];[eye stroke];
|
||||
if(on){[accent setFill];[[NSBezierPath bezierPathWithOvalInRect:NSMakeRect(c.x-1.8,c.y-1.8,3.6,3.6)]fill];}
|
||||
else{NSBezierPath *slash=[NSBezierPath bezierPath];[slash moveToPoint:NSMakePoint(c.x-6,c.y+6)];[slash lineToPoint:NSMakePoint(c.x+6,c.y-6)];slash.lineWidth=1.2;[slash stroke];}
|
||||
} else {
|
||||
NSString *symbol=[self.glyph isEqual:@"disclosure"]?(on?@"⌄":@"›"):@"↻";
|
||||
NSFont *font=[NSFont systemFontOfSize:[self.glyph isEqual:@"disclosure"]?19:18 weight:NSFontWeightSemibold];
|
||||
NSDictionary *attributes=@{NSFontAttributeName:font,NSForegroundColorAttributeName:[self.accent colorWithAlphaComponent:(on?1:.58)*opacity]};
|
||||
NSSize size=[symbol sizeWithAttributes:attributes];[symbol drawAtPoint:NSMakePoint(NSMidX(b)-size.width/2,NSMidY(b)-size.height/2)withAttributes:attributes];
|
||||
}
|
||||
}
|
||||
if(self.window.firstResponder==self){[[self.accent colorWithAlphaComponent:.8]setStroke];NSBezierPath *focus=[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(self.bounds,.5,.5) xRadius:7 yRadius:7];focus.lineWidth=1;[focus stroke];}
|
||||
}
|
||||
- (void)setState:(NSControlStateValue)state { [super setState:state];self.needsDisplay=YES; }
|
||||
- (void)setEnabled:(BOOL)enabled { [super setEnabled:enabled];self.needsDisplay=YES; }
|
||||
@end
|
||||
static PGInspectorGlyphButton *PGUIButton(NSString *glyph, NSColor *accent, id target, SEL action) {
|
||||
PGInspectorGlyphButton *button=[[PGInspectorGlyphButton alloc]initWithFrame:NSZeroRect];
|
||||
button.glyph=glyph;button.accent=accent;button.bordered=NO;button.title=@"";
|
||||
[button setButtonType:([glyph isEqual:@"eye"]||[glyph isEqual:@"switch"]||[glyph isEqual:@"disclosure"]||[glyph isEqual:@"swatch"])?NSButtonTypePushOnPushOff:NSButtonTypeMomentaryPushIn];
|
||||
button.target=target;button.action=action;button.focusRingType=NSFocusRingTypeExterior;
|
||||
return button;
|
||||
}
|
||||
|
||||
@interface PGInspectorSliderCell : NSSliderCell
|
||||
@property (nonatomic, strong) NSColor *accent;
|
||||
@end
|
||||
@implementation PGInspectorSliderCell
|
||||
- (void)drawBarInside:(NSRect)rect flipped:(BOOL)flipped {
|
||||
(void)flipped;NSRect bar=NSMakeRect(NSMinX(rect),NSMidY(rect)-2,NSWidth(rect),4);
|
||||
[PGUIColor(.08,.13,.20,self.enabled?1:.5)setFill];NSBezierPath *track=[NSBezierPath bezierPathWithRoundedRect:bar xRadius:2 yRadius:2];[track fill];
|
||||
[[self.accent colorWithAlphaComponent:.18]setStroke];track.lineWidth=.7;[track stroke];
|
||||
double range=self.maxValue-self.minValue;if(range<=0)return;
|
||||
CGFloat from=self.minValue<0?(CGFloat)((0-self.minValue)/range):0;
|
||||
CGFloat to=(CGFloat)((self.doubleValue-self.minValue)/range);
|
||||
NSRect fill=NSMakeRect(NSMinX(bar)+MIN(from,to)*NSWidth(bar),NSMinY(bar),fabs(to-from)*NSWidth(bar),NSHeight(bar));
|
||||
[[self.accent colorWithAlphaComponent:self.enabled?.85:.23]setFill];[[NSBezierPath bezierPathWithRoundedRect:fill xRadius:2 yRadius:2]fill];
|
||||
}
|
||||
- (void)drawKnob:(NSRect)knobRect {
|
||||
CGFloat d=12;NSRect r=NSMakeRect(NSMidX(knobRect)-d/2,NSMidY(knobRect)-d/2,d,d);
|
||||
[[self.accent colorWithAlphaComponent:self.enabled?.22:.08]setFill];[[NSBezierPath bezierPathWithOvalInRect:NSInsetRect(r,-2,-2)]fill];
|
||||
[[NSColor colorWithWhite:.97 alpha:self.enabled?1:.5]setFill];NSBezierPath *knob=[NSBezierPath bezierPathWithOvalInRect:r];[knob fill];
|
||||
[[self.accent colorWithAlphaComponent:self.enabled?.85:.25]setStroke];knob.lineWidth=1;[knob stroke];
|
||||
}
|
||||
- (CGFloat)knobThickness { return 14; }
|
||||
@end
|
||||
@interface PGInspectorSlider : NSSlider
|
||||
@property (nonatomic, copy) void (^interactionBegan)(void);
|
||||
@property (nonatomic, copy) void (^interactionEnded)(void);
|
||||
@end
|
||||
@implementation PGInspectorSlider
|
||||
- (void)mouseDown:(NSEvent *)event {
|
||||
if(!self.enabled)return;if(self.interactionBegan)self.interactionBegan();
|
||||
@try{[super mouseDown:event];}@finally{if(self.interactionEnded)self.interactionEnded();}
|
||||
}
|
||||
- (void)keyDown:(NSEvent *)event {
|
||||
if(self.interactionBegan)self.interactionBegan();
|
||||
@try{[super keyDown:event];}@finally{if(self.interactionEnded)self.interactionEnded();}
|
||||
}
|
||||
@end
|
||||
|
||||
@interface PGInspectorNumberCell : NSTextFieldCell
|
||||
@end
|
||||
@implementation PGInspectorNumberCell
|
||||
- (NSRect)drawingRectForBounds:(NSRect)bounds {
|
||||
NSRect rect=[super drawingRectForBounds:bounds];CGFloat height=[self cellSizeForBounds:bounds].height;
|
||||
if(NSHeight(rect)>height){rect.origin.y+=(NSHeight(rect)-height)*.5;rect.size.height=height;}return rect;
|
||||
}
|
||||
@end
|
||||
@interface PGInspectorNumberField : NSTextField
|
||||
@end
|
||||
@implementation PGInspectorNumberField
|
||||
+ (Class)cellClass { return PGInspectorNumberCell.class; }
|
||||
@end
|
||||
|
||||
@class PGInspectorRow;
|
||||
@interface PGInspectorCard : NSView
|
||||
@property (nonatomic, strong) NSColor *accent;
|
||||
@property (nonatomic, copy) NSString *heading;
|
||||
@property (nonatomic, strong) NSTextField *titleLabel;
|
||||
@property (nonatomic, strong) PGInspectorGlyphButton *master;
|
||||
@property (nonatomic, copy) NSArray<PGInspectorRow *> *rows;
|
||||
@property (nonatomic) BOOL expanded;
|
||||
- (CGFloat)heightForWidth:(CGFloat)width;
|
||||
@end
|
||||
@interface PGInspectorView ()
|
||||
@property (nonatomic, strong, readwrite) PGInspectorController *controller;
|
||||
- (void)reloadControls;
|
||||
- (void)beginControlInteraction;
|
||||
- (void)endControlInteraction;
|
||||
- (void)writeValue:(double)value parameter:(UInt32)identifier;
|
||||
@end
|
||||
@interface PGInspectorRow : NSView <NSTextFieldDelegate>
|
||||
@property (nonatomic, weak) PGInspectorView *inspector;
|
||||
@property (nonatomic, copy) NSDictionary *descriptor;
|
||||
@property (nonatomic, strong) NSColor *accent;
|
||||
@property (nonatomic, strong) NSTextField *label;
|
||||
@property (nonatomic, strong) NSTextField *valueField;
|
||||
@property (nonatomic) BOOL numberHasUnsubmittedEdit;
|
||||
@property (nonatomic, strong) NSTextField *hint;
|
||||
@property (nonatomic, strong) PGInspectorSlider *slider;
|
||||
@property (nonatomic, strong) PGInspectorGlyphButton *eye;
|
||||
@property (nonatomic, strong) PGInspectorGlyphButton *reset;
|
||||
@property (nonatomic, strong) PGInspectorGlyphButton *toggle;
|
||||
@property (nonatomic, copy) NSArray<PGInspectorGlyphButton *> *swatches;
|
||||
- (instancetype)initWithDescriptor:(NSDictionary *)descriptor accent:(NSColor *)accent inspector:(PGInspectorView *)inspector;
|
||||
- (CGFloat)heightForWidth:(CGFloat)width;
|
||||
- (void)reloadState:(PGInspectorState *)state master:(BOOL)master available:(BOOL)available;
|
||||
@end
|
||||
@implementation PGInspectorRow
|
||||
- (BOOL)isFlipped { return YES; }
|
||||
- (instancetype)initWithDescriptor:(NSDictionary *)descriptor accent:(NSColor *)accent inspector:(PGInspectorView *)inspector {
|
||||
if((self=[super initWithFrame:NSZeroRect])) {
|
||||
_descriptor=[descriptor copy];_accent=accent;_inspector=inspector;
|
||||
self.identifier=[NSString stringWithFormat:@"pg.parameter.%@",descriptor[@"id"]];
|
||||
NSString *name=descriptor[@"name"];_label=PGUILabel(name,12,NSFontWeightSemibold);[self addSubview:_label];
|
||||
NSString *kind=descriptor[@"kind"];
|
||||
if([descriptor[@"bypass"]boolValue]){
|
||||
_eye=PGUIButton(@"eye",accent,self,@selector(toggleEnabled:));_eye.toolTip=[@"启用 / 停用 · " stringByAppendingString:name];_eye.accessibilityLabel=_eye.toolTip;[self addSubview:_eye];
|
||||
}
|
||||
if([kind isEqual:@"preset"]){
|
||||
NSArray *colors=@[NSNull.null,PGUIColor(.95,.87,.80,1),PGUIColor(.88,.88,.95,1),PGUIColor(1,.86,.72,1),PGUIColor(.99,.78,.75,1),PGUIColor(.76,.57,.39,1),PGUIColor(.48,.32,.22,1)];
|
||||
NSArray *options=descriptor[@"options"] ?: @[];NSMutableArray *buttons=[NSMutableArray new];
|
||||
for(NSUInteger i=0;i<7;i++){
|
||||
PGInspectorGlyphButton *button=PGUIButton(@"swatch",accent,self,@selector(selectPreset:));button.tag=i;button.swatch=i?colors[i]:nil;
|
||||
button.toolTip=i<options.count?options[i]:[NSString stringWithFormat:@"%@ %lu",name,(unsigned long)i];button.accessibilityLabel=button.toolTip;
|
||||
[self addSubview:button];[buttons addObject:button];
|
||||
}_swatches=[buttons copy];
|
||||
}else{
|
||||
_reset=PGUIButton(@"reset",accent,self,@selector(resetValue:));_reset.toolTip=[@"重置 · "stringByAppendingString:name];_reset.accessibilityLabel=_reset.toolTip;[self addSubview:_reset];
|
||||
if([kind isEqual:@"toggle"]){
|
||||
_toggle=PGUIButton(@"switch",accent,self,@selector(toggleValue:));_toggle.accessibilityLabel=name;[self addSubview:_toggle];
|
||||
_hint=PGUILabel(@"",10,NSFontWeightMedium);_hint.textColor=PGUIMuted();_hint.alignment=NSTextAlignmentRight;[self addSubview:_hint];
|
||||
_label.lineBreakMode=NSLineBreakByWordWrapping;_label.maximumNumberOfLines=2;
|
||||
}else{
|
||||
_slider=[[PGInspectorSlider alloc]initWithFrame:NSZeroRect];PGInspectorSliderCell *cell=[PGInspectorSliderCell new];cell.accent=accent;_slider.cell=cell;
|
||||
_slider.minValue=[descriptor[@"min"]doubleValue];_slider.maxValue=[descriptor[@"max"]doubleValue];_slider.continuous=YES;_slider.target=self;_slider.action=@selector(sliderChanged:);_slider.accessibilityLabel=name;
|
||||
__weak PGInspectorView *weakInspector=inspector;
|
||||
_slider.interactionBegan=^{[weakInspector beginControlInteraction];};_slider.interactionEnded=^{[weakInspector endControlInteraction];};[self addSubview:_slider];
|
||||
_valueField=[[PGInspectorNumberField alloc]initWithFrame:NSZeroRect];_valueField.font=[NSFont monospacedDigitSystemFontOfSize:11 weight:NSFontWeightSemibold];_valueField.textColor=PGUIText();_valueField.alignment=NSTextAlignmentCenter;
|
||||
_valueField.bordered=NO;_valueField.bezeled=NO;_valueField.drawsBackground=NO;_valueField.backgroundColor=PGUIColor(.14,.19,.26,1);_valueField.wantsLayer=YES;_valueField.layer.backgroundColor=_valueField.backgroundColor.CGColor;_valueField.layer.cornerRadius=7;_valueField.layer.borderWidth=.7;_valueField.layer.borderColor=[accent colorWithAlphaComponent:.24].CGColor;
|
||||
_valueField.target=self;_valueField.action=@selector(numberCommitted:);_valueField.delegate=self;_valueField.accessibilityLabel=[name stringByAppendingString:@"数值"];[self addSubview:_valueField];
|
||||
}
|
||||
}
|
||||
NSString *key=[descriptor[@"id"]stringValue];
|
||||
NSString *tooltip=descriptor[@"tooltip"];
|
||||
if(tooltip.length){self.toolTip=tooltip;_label.toolTip=tooltip;_toggle.toolTip=tooltip;_slider.toolTip=tooltip;_valueField.toolTip=tooltip;}
|
||||
_slider.identifier=[@"pg.value."stringByAppendingString:key];_valueField.identifier=[@"pg.number."stringByAppendingString:key];
|
||||
_toggle.identifier=[@"pg.toggle."stringByAppendingString:key];_eye.identifier=[@"pg.enable."stringByAppendingString:key];_reset.identifier=[@"pg.reset."stringByAppendingString:key];
|
||||
}return self;
|
||||
}
|
||||
- (CGFloat)heightForWidth:(CGFloat)width {
|
||||
if(_swatches)return 46;
|
||||
if(_toggle)return width<310 && [_descriptor[@"name"]length]>12 ? 48 : 36;
|
||||
return width<310?52:36;
|
||||
}
|
||||
- (void)layout {
|
||||
[super layout];CGFloat w=NSWidth(self.bounds),h=NSHeight(self.bounds);BOOL narrow=w<310;
|
||||
CGFloat labelX=_eye?25:0;
|
||||
_eye.frame=NSMakeRect(0,6,20,22);
|
||||
if(_swatches){
|
||||
_label.frame=NSMakeRect(labelX,14,33,20);CGFloat x=labelX+37;CGFloat d=MIN(28,MAX(12,(w-x-24)/7));CGFloat gap=MIN(8,MAX(0,(w-x-7*d)/6));
|
||||
for(NSUInteger i=0;i<_swatches.count;i++)_swatches[i].frame=NSMakeRect(x+i*(d+gap),7,d,d);return;
|
||||
}
|
||||
_reset.frame=NSMakeRect(w-23,6,23,23);
|
||||
if(_toggle){
|
||||
CGFloat switchX=w-76;_toggle.frame=NSMakeRect(switchX,4+(h-36)/2,46,28);_hint.frame=NSMakeRect(switchX-39,10+(h-36)/2,34,18);
|
||||
_label.frame=NSMakeRect(labelX,h>36?3:9,MAX(20,switchX-labelX-42),h>36?42:22);return;
|
||||
}
|
||||
CGFloat fieldW=49,fieldX=w-23-7-fieldW;_valueField.frame=NSMakeRect(fieldX,5,fieldW,25);
|
||||
if(narrow){_label.frame=NSMakeRect(labelX,8,MAX(20,fieldX-labelX-6),22);_slider.frame=NSMakeRect(labelX,29,MAX(20,w-labelX-30),18);}
|
||||
else{CGFloat labelW=MIN(116,MAX(71,w*.29));_label.frame=NSMakeRect(labelX,9,labelW,21);CGFloat start=labelX+labelW+5;_slider.frame=NSMakeRect(start,7,MAX(20,fieldX-start-8),22);}
|
||||
}
|
||||
- (void)reloadState:(PGInspectorState *)state master:(BOOL)master available:(BOOL)available {
|
||||
UInt32 identifier=[_descriptor[@"id"]unsignedIntValue];double value=[state valueForParameter:identifier];BOOL enabled=[state isParameterEnabled:identifier];
|
||||
_label.alphaValue=master&&enabled?1:.5;_eye.state=enabled?NSControlStateValueOn:NSControlStateValueOff;_eye.enabled=available&&master;
|
||||
_reset.enabled=available;_reset.state=fabs(value-[_descriptor[@"default"]doubleValue])>.000001?NSControlStateValueOn:NSControlStateValueOff;
|
||||
_slider.enabled=available&&master&&enabled;_slider.doubleValue=value;
|
||||
_valueField.enabled=available&&master&&enabled;if(!_valueField.currentEditor || !_numberHasUnsubmittedEdit)_valueField.stringValue=PGFormattedValue(_descriptor,value);
|
||||
_toggle.enabled=available&&master&&enabled;_toggle.state=value>.5?NSControlStateValueOn:NSControlStateValueOff;
|
||||
UInt32 identifierForHint=[_descriptor[@"id"]unsignedIntValue];
|
||||
_hint.stringValue=identifierForHint==PGFastMulti?(value>.5?@"多人":@"单人"):identifierForHint==PGTrackBoxes?(value>.5?@"预览中":@"隐藏"):(value>.5?@"开启":@"关闭");
|
||||
for(NSUInteger i=0;i<_swatches.count;i++){_swatches[i].enabled=available&&master&&enabled;_swatches[i].state=i==(NSUInteger)llround(value)?NSControlStateValueOn:NSControlStateValueOff;}
|
||||
}
|
||||
- (void)sliderChanged:(NSSlider *)sender { [_inspector writeValue:sender.doubleValue parameter:[_descriptor[@"id"]unsignedIntValue]]; }
|
||||
- (void)toggleValue:(NSButton *)sender { [_inspector writeValue:sender.state==NSControlStateValueOn?1:0 parameter:[_descriptor[@"id"]unsignedIntValue]]; }
|
||||
- (void)selectPreset:(NSButton *)sender { [_inspector writeValue:sender.tag parameter:[_descriptor[@"id"]unsignedIntValue]]; }
|
||||
- (void)toggleEnabled:(id)sender { (void)sender;[_inspector.controller toggleEnabledForParameter:[_descriptor[@"id"]unsignedIntValue]];[_inspector reloadControls]; }
|
||||
- (void)resetValue:(id)sender { (void)sender;[_inspector.controller resetParameter:[_descriptor[@"id"]unsignedIntValue]];[_inspector reloadControls]; }
|
||||
- (void)numberCommitted:(id)sender {
|
||||
// The explicit Return action and the subsequent end-editing notification
|
||||
// describe the same submission. Clear the dirty flag before host callbacks
|
||||
// so focus loss cannot write stale text over a reset or a host undo.
|
||||
_numberHasUnsubmittedEdit=NO;
|
||||
NSString *text=[_valueField.stringValue stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet];
|
||||
if([text hasSuffix:@"%"]||[text hasSuffix:@"°"])text=[text substringToIndex:text.length-1];
|
||||
NSNumber *number=nil;
|
||||
for(NSLocale *locale in @[NSLocale.currentLocale,[NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"]]){
|
||||
NSScanner *scanner=[NSScanner scannerWithString:text];scanner.locale=locale;double parsed;
|
||||
if([scanner scanDouble:&parsed]&&scanner.isAtEnd){number=@(parsed);break;}
|
||||
}
|
||||
if(number&&isfinite(number.doubleValue)){
|
||||
double value=number.doubleValue/PGValueScale(_descriptor);value=fmin([_descriptor[@"max"]doubleValue],fmax([_descriptor[@"min"]doubleValue],value));
|
||||
// Commit explicit input even when it equals our last displayed value:
|
||||
// the document may have changed while the field editor held focus.
|
||||
// The controller rereads the host and deduplicates the actual value.
|
||||
[_inspector writeValue:value parameter:[_descriptor[@"id"]unsignedIntValue]];
|
||||
}else NSBeep();
|
||||
_valueField.stringValue=PGFormattedValue(_descriptor,[_inspector.controller.state valueForParameter:[_descriptor[@"id"]unsignedIntValue]]);
|
||||
if(sender==_valueField) {
|
||||
[_valueField.window makeFirstResponder:nil];
|
||||
// A remote inspector can retain its field editor after the host has
|
||||
// consumed Return. End the already-submitted edit at the control too.
|
||||
[_valueField abortEditing];
|
||||
}
|
||||
}
|
||||
- (void)controlTextDidChange:(NSNotification *)notification { (void)notification;_numberHasUnsubmittedEdit=YES; }
|
||||
- (void)controlTextDidEndEditing:(NSNotification *)notification {
|
||||
(void)notification;
|
||||
if(_numberHasUnsubmittedEdit)[self numberCommitted:nil];
|
||||
[_inspector refreshFromHost];
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation PGInspectorCard
|
||||
- (BOOL)isFlipped { return YES; }
|
||||
- (CGFloat)heightForWidth:(CGFloat)width {
|
||||
if(!_expanded)return 44;CGFloat height=49;for(PGInspectorRow *row in _rows){height+=[row heightForWidth:MAX(0,width-24)];if([row.descriptor[@"id"]unsignedIntValue]==PGFastMulti)height+=8;}return height+7;
|
||||
}
|
||||
- (void)layout {
|
||||
[super layout];CGFloat w=NSWidth(self.bounds);_titleLabel.frame=NSMakeRect(25,13,MAX(70,w-80),22);_master.frame=NSMakeRect(w-39,10,25,25);
|
||||
CGFloat y=49;for(PGInspectorRow *row in _rows){row.hidden=!_expanded;if(!_expanded)continue;CGFloat h=[row heightForWidth:w-24];row.frame=NSMakeRect(12,y,w-24,h);y+=h;if([row.descriptor[@"id"]unsignedIntValue]==PGFastMulti)y+=8;}
|
||||
}
|
||||
- (void)drawRect:(NSRect)dirtyRect {
|
||||
(void)dirtyRect;NSBezierPath *shape=[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(self.bounds,.5,.5) xRadius:13 yRadius:13];
|
||||
[NSGraphicsContext saveGraphicsState];[shape addClip];NSGradient *gradient=[[NSGradient alloc]initWithStartingColor:[_accent blendedColorWithFraction:.87 ofColor:PGUIColor(.09,.14,.21,1)] endingColor:PGUIColor(.055,.085,.14,1)];[gradient drawInRect:self.bounds angle:90];[NSGraphicsContext restoreGraphicsState];
|
||||
[[_accent colorWithAlphaComponent:.22]setStroke];shape.lineWidth=.8;[shape stroke];
|
||||
NSRect pill=NSMakeRect(12,10,MAX(53,[_heading length]*13+20),25);[[_accent colorWithAlphaComponent:.10]setFill];NSBezierPath *p=[NSBezierPath bezierPathWithRoundedRect:pill xRadius:8 yRadius:8];[p fill];[[_accent colorWithAlphaComponent:.32]setStroke];p.lineWidth=.7;[p stroke];
|
||||
if(_expanded){[[PGUIMuted() colorWithAlphaComponent:.20]setStroke];NSBezierPath *line=[NSBezierPath bezierPath];[line moveToPoint:NSMakePoint(12,43)];[line lineToPoint:NSMakePoint(NSWidth(self.bounds)-12,43)];line.lineWidth=.5;[line stroke];
|
||||
for(PGInspectorRow *row in _rows)if([row.descriptor[@"id"]unsignedIntValue]==PGFastMulti){CGFloat y=NSMaxY(row.frame)+4;[line removeAllPoints];[line moveToPoint:NSMakePoint(12,y)];[line lineToPoint:NSMakePoint(NSWidth(self.bounds)-12,y)];[line stroke];}
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation PGInspectorView {
|
||||
NSArray<PGInspectorCard *> *_cards;
|
||||
PGInspectorCard *_more;
|
||||
NSTextField *_brand,*_website,*_status;
|
||||
NSTimer *_refreshTimer;
|
||||
NSUInteger _interactionDepth;
|
||||
}
|
||||
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager { return [self initWithController:[[PGInspectorController alloc]initWithAPIManager:manager]]; }
|
||||
- (instancetype)initWithController:(PGInspectorController *)controller {
|
||||
if((self=[super initWithFrame:NSMakeRect(0,0,320,100)])){
|
||||
_controller=controller;_controller.actionSender=self;self.appearance=[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
|
||||
NSArray *sections=@[@"smooth",@"color",@"shape",@"more"],*headings=@[@"磨皮",@"美白",@"瘦脸",@"更多设置"];
|
||||
NSArray *colors=@[PGUIColor(.28,.83,.96,1),PGUIColor(.34,.89,.84,1),PGUIColor(.59,.69,.98,1),PGUIColor(.54,.64,.76,1)];
|
||||
NSMutableArray *cards=[NSMutableArray new];
|
||||
for(NSUInteger index=0;index<sections.count;index++){
|
||||
NSString *section=sections[index];PGInspectorCard *card=[[PGInspectorCard alloc]initWithFrame:NSZeroRect];card.accent=colors[index];card.heading=headings[index];card.expanded=index<3;
|
||||
card.titleLabel=PGUILabel(headings[index],12,NSFontWeightSemibold);card.titleLabel.textColor=colors[index];[card addSubview:card.titleLabel];NSMutableArray *rows=[NSMutableArray new];
|
||||
for(NSDictionary *descriptor in PGInspectorControls()){
|
||||
if(![descriptor[@"section"]isEqual:section])continue;
|
||||
if([descriptor[@"kind"]isEqual:@"master"]){card.master=PGUIButton(@"eye",colors[index],self,@selector(masterChanged:));card.master.tag=[descriptor[@"id"]integerValue];card.master.identifier=[NSString stringWithFormat:@"pg.master.%@",descriptor[@"id"]];card.master.accessibilityLabel=descriptor[@"name"];card.master.toolTip=descriptor[@"name"];[card addSubview:card.master];continue;}
|
||||
PGInspectorRow *row=[[PGInspectorRow alloc]initWithDescriptor:descriptor accent:colors[index] inspector:self];[rows addObject:row];[card addSubview:row];
|
||||
}
|
||||
card.rows=rows;if(index==3){_more=card;card.master=PGUIButton(@"disclosure",colors[index],self,@selector(moreChanged:));card.master.identifier=@"pg.more";card.master.accessibilityLabel=@"展开更多设置";[card addSubview:card.master];}
|
||||
[self addSubview:card];[cards addObject:card];
|
||||
}_cards=[cards copy];
|
||||
_brand=PGUILabel(@"大鱼 · 人像美化",15,NSFontWeightSemibold);_brand.alignment=NSTextAlignmentCenter;[self addSubview:_brand];
|
||||
_website=PGUILabel(@"dayu.media",10,NSFontWeightMedium);_website.alignment=NSTextAlignmentCenter;_website.textColor=PGUIMuted();[self addSubview:_website];
|
||||
_status=PGUILabel(@"",10,NSFontWeightRegular);_status.textColor=PGUIMuted();_status.alignment=NSTextAlignmentCenter;[self addSubview:_status];
|
||||
[self reloadControls];[self setFrameSize:NSMakeSize(320,[self heightForWidth:320])];
|
||||
}return self;
|
||||
}
|
||||
- (BOOL)isFlipped { return YES; }
|
||||
- (CGFloat)heightForWidth:(CGFloat)width { CGFloat h=12;for(PGInspectorCard *card in _cards)h+=[card heightForWidth:MAX(0,width-20)]+10;return h+83; }
|
||||
- (NSSize)intrinsicContentSize { return NSMakeSize(NSViewNoIntrinsicMetric,[self heightForWidth:NSWidth(self.bounds)>0?NSWidth(self.bounds):320]); }
|
||||
- (NSSize)fittingSize { CGFloat w=NSWidth(self.bounds)>0?NSWidth(self.bounds):320;return NSMakeSize(w,[self heightForWidth:w]); }
|
||||
- (void)setFrameSize:(NSSize)newSize { if(_cards)newSize.height=[self heightForWidth:newSize.width];[super setFrameSize:newSize];[self invalidateIntrinsicContentSize];self.needsLayout=YES; }
|
||||
- (void)layout {
|
||||
[super layout];CGFloat w=NSWidth(self.bounds),y=12;for(PGInspectorCard *card in _cards){CGFloat h=[card heightForWidth:w-20];card.frame=NSMakeRect(10,y,MAX(0,w-20),h);y+=h+10;}
|
||||
_brand.frame=NSMakeRect(12,y+12,MAX(0,w-24),23);_website.frame=NSMakeRect(12,y+38,MAX(0,w-24),17);_status.frame=NSMakeRect(12,y+61,MAX(0,w-24),16);
|
||||
}
|
||||
- (void)drawRect:(NSRect)dirtyRect { [PGUIColor(.035,.060,.105,1)setFill];NSRectFill(dirtyRect); }
|
||||
- (void)reloadControls {
|
||||
PGInspectorState *state=_controller.state;BOOL available=_controller.available;
|
||||
for(PGInspectorCard *card in _cards){BOOL master=card==_more || [state valueForParameter:(UInt32)card.master.tag]>.5;
|
||||
if(card!=_more){card.master.state=master?NSControlStateValueOn:NSControlStateValueOff;card.master.enabled=available;}
|
||||
for(PGInspectorRow *row in card.rows)[row reloadState:state master:master available:available];
|
||||
}
|
||||
_status.stringValue=_controller.statusMessage.length?_controller.statusMessage:@"自动跟随 · 无需手动分析";_status.toolTip=_status.stringValue;
|
||||
}
|
||||
- (BOOL)hasActiveTextEditor { for(PGInspectorCard *card in _cards)for(PGInspectorRow *row in card.rows)if(row.valueField.currentEditor && row.numberHasUnsubmittedEdit)return YES;return NO; }
|
||||
- (void)refreshFromHost { if(_interactionDepth || [self hasActiveTextEditor])return;[_controller refresh];[self reloadControls]; }
|
||||
- (void)hostParameterChanged { if(_interactionDepth || [self hasActiveTextEditor])return;[_controller documentDidChange];[self reloadControls]; }
|
||||
- (void)writeValue:(double)value parameter:(UInt32)identifier { [_controller setValue:value forParameter:identifier];[self reloadControls]; }
|
||||
// Keep refreshes out of the tracking loop, but let writeValue own a complete
|
||||
// FxPlug action for each continuous step. Holding the action until mouse-up
|
||||
// prevents hosts that publish at endAction from previewing intermediate values.
|
||||
- (void)beginControlInteraction { _interactionDepth++; }
|
||||
- (void)endControlInteraction { if(!_interactionDepth)return;if(--_interactionDepth==0)[self refreshFromHost]; }
|
||||
- (void)masterChanged:(NSButton *)sender { [_controller setValue:sender.state==NSControlStateValueOn?1:0 forParameter:(UInt32)sender.tag];[self reloadControls]; }
|
||||
- (void)moreChanged:(NSButton *)sender { _more.expanded=sender.state==NSControlStateValueOn;sender.accessibilityLabel=_more.expanded?@"收起更多设置":@"展开更多设置";[_more setNeedsDisplay:YES];[self setFrameSize:self.frame.size]; }
|
||||
- (void)viewDidMoveToWindow {
|
||||
[super viewDidMoveToWindow];[_refreshTimer invalidate];_refreshTimer=nil;
|
||||
if(self.window){[self refreshFromHost];__weak PGInspectorView *weakSelf=self;_refreshTimer=[NSTimer timerWithTimeInterval:.65 repeats:YES block:^(NSTimer *timer){PGInspectorView *view=weakSelf;if(!view||!view.window){[timer invalidate];return;}[view refreshFromHost];}];[[NSRunLoop mainRunLoop]addTimer:_refreshTimer forMode:NSRunLoopCommonModes];}
|
||||
}
|
||||
- (void)dealloc { [_refreshTimer invalidate]; }
|
||||
@end
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
// Existing brightness sample ID 1 is migrated to the portrait amount control.
|
||||
enum {
|
||||
PGAmount=1, PGBrightness=2, PGRadius=3, PGSharpness=4, PGMix=5,
|
||||
PGThreshold=7, PGSoftness=8, PGEdgeProtect=9, PGShowMask=10,
|
||||
PGMidtone=12, PGHue=14, PGSaturation=15, PGHighPass=17, PGThin=18,
|
||||
PGFaceBoxes=19, PGSingleFace=20, PGSelection=21, PGShort=22,
|
||||
PGNarrow=23, PGChin=24, PGVFace=25, PGJaw=26, PGCheekbone=27,
|
||||
PGSmallHead=28, PGSmallHeadRange=29, PGFeatureProtect=30, PGTeeth=31,
|
||||
PGEyeBright=32, PGBigEye=33, PGTrackBoxes=35, PGFastMulti=39,
|
||||
PGJumpGuard=40, PGEvenTone=41, PGTonePreset=42, PGInvertMask=43,
|
||||
PGDebugChannel=44, PGTrackEnabled=45, PGTarget=46,
|
||||
PGAnalyzeForward=50, PGAnalyzeBackward=51, PGClearTrack=52, PGStatus=53,
|
||||
PGTrackData1=60, PGTrackData2=61, PGTrackData3=62,
|
||||
PGSmoothingEnabled=70, PGColorEnabled=71, PGShapeEnabled=72,
|
||||
PGDetailEnabled=73, PGHelp=74,
|
||||
PGFeatureProtectionAmount=75, PGNonSkinProtection=76, PGMicroDetail=77,
|
||||
PGInspectorPanel=210
|
||||
};
|
||||
@@ -1,83 +0,0 @@
|
||||
//
|
||||
// TileableRemoteBrightness.metal
|
||||
// beatygril
|
||||
//
|
||||
// Created by dayu on 2026/10/21.
|
||||
//
|
||||
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
#include "TileableRemoteBrightnessShaderTypes.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// The [[position]] attribute of this member indicates that this value is the clip space
|
||||
// position of the vertex when this structure is returned from the vertex function
|
||||
float4 clipSpacePosition [[position]];
|
||||
|
||||
// Since this member does not have a special attribute, the rasterizer interpolates
|
||||
// its value with the values of the other triangle vertices and then passes
|
||||
// the interpolated value to the fragment shader for each fragment in the triangle
|
||||
float2 textureCoordinate;
|
||||
|
||||
} RasterizerData;
|
||||
|
||||
vertex RasterizerData
|
||||
vertexShader(uint vertexID [[vertex_id]],
|
||||
constant Vertex2D *vertexArray [[buffer(BVI_Vertices)]],
|
||||
constant vector_uint2 *viewportSizePointer [[buffer(BVI_ViewportSize)]])
|
||||
{
|
||||
RasterizerData out;
|
||||
|
||||
// Index into our array of positions to get the current vertex
|
||||
// Our positions are specified in pixel dimensions (i.e. a value of 100 is 100 pixels from
|
||||
// the origin)
|
||||
float2 pixelSpacePosition = vertexArray[vertexID].position.xy;
|
||||
|
||||
// Get the size of the drawable so that we can convert to normalized device coordinates,
|
||||
float2 viewportSize = float2(*viewportSizePointer);
|
||||
|
||||
// The output position of every vertex shader is in clip space (also known as normalized device
|
||||
// coordinate space, or NDC). A value of (-1.0, -1.0) in clip-space represents the
|
||||
// lower-left corner of the viewport whereas (1.0, 1.0) represents the upper-right corner of
|
||||
// the viewport.
|
||||
|
||||
// In order to convert from positions in pixel space to positions in clip space we divide the
|
||||
// pixel coordinates by half the size of the viewport.
|
||||
out.clipSpacePosition.xy = pixelSpacePosition / (viewportSize / 2.0);
|
||||
|
||||
// Set the z component of our clip space position 0 (since we're only rendering in
|
||||
// 2-Dimensions for this sample)
|
||||
out.clipSpacePosition.z = 0.0;
|
||||
|
||||
// Set the w component to 1.0 since we don't need a perspective divide, which is also not
|
||||
// necessary when rendering in 2-Dimensions
|
||||
out.clipSpacePosition.w = 1.0;
|
||||
|
||||
// Pass our input textureCoordinate straight to our output RasterizerData. This value will be
|
||||
// interpolated with the other textureCoordinate values in the vertices that make up the
|
||||
// triangle.
|
||||
out.textureCoordinate = vertexArray[vertexID].textureCoordinate;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
// Fragment function
|
||||
fragment float4 fragmentShader(RasterizerData in [[stage_in]],
|
||||
texture2d<half> colorTexture [[ texture(BTI_InputImage) ]],
|
||||
constant float* brightness [[ buffer(BFI_Brightness) ]])
|
||||
{
|
||||
constexpr sampler textureSampler (mag_filter::linear,
|
||||
min_filter::linear);
|
||||
|
||||
// Sample the texture to obtain a color
|
||||
half4 colorSample = colorTexture.sample(textureSampler, in.textureCoordinate);
|
||||
const half hBrightness = static_cast<half>(*brightness);
|
||||
colorSample.rgb = colorSample.rgb * hBrightness;
|
||||
|
||||
// We return the color of the texture
|
||||
return float4(colorSample);
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
//
|
||||
// TileableRemoteBrightnessShaderTypes.h
|
||||
// beatygril
|
||||
//
|
||||
// Created by dayu on 2026/10/21.
|
||||
//
|
||||
|
||||
#ifndef TileableRemoteBrightnessShaderTypes_h
|
||||
#define TileableRemoteBrightnessShaderTypes_h
|
||||
|
||||
#import <simd/simd.h>
|
||||
|
||||
typedef enum BrightnessVertexInputIndex {
|
||||
BVI_Vertices = 0,
|
||||
BVI_ViewportSize = 1
|
||||
} BrightnessVertexInputIndex;
|
||||
|
||||
typedef enum BrightnessTextureIndex {
|
||||
BTI_InputImage = 0
|
||||
} BrightnessTextureIndex;
|
||||
|
||||
typedef enum BrightnessFragmentIndex {
|
||||
BFI_Brightness = 0
|
||||
} BrightnessFragmentIndex;
|
||||
|
||||
typedef struct Vertex2D {
|
||||
vector_float2 position;
|
||||
vector_float2 textureCoordinate;
|
||||
} Vertex2D;
|
||||
|
||||
|
||||
#endif /* TileableRemoteBrightnessShaderTypes_h */
|
||||
@@ -1,13 +1,11 @@
|
||||
//
|
||||
// beatygrilPlugIn.h
|
||||
// beatygril
|
||||
//
|
||||
// Created by dayu on 2026/10/21.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <FxPlug/FxPlugSDK.h>
|
||||
#import "PGBeautyTypes.h"
|
||||
|
||||
@interface beatygrilPlugIn : NSObject <FxTileableEffect>
|
||||
@property (assign) id<PROAPIAccessing> apiManager;
|
||||
@interface beatygrilPlugIn : NSObject <FxTileableEffect, FxAnalyzer, FxCustomParameterViewHost_v2>
|
||||
@property (nonatomic, assign) id<PROAPIAccessing> apiManager;
|
||||
- (PGBeautySettings)settingsAtTime:(CMTime)time;
|
||||
- (void)analyzeForward;
|
||||
- (void)analyzeBackward;
|
||||
- (void)clearTracking;
|
||||
@end
|
||||
@@ -1,320 +1,398 @@
|
||||
//
|
||||
// beatygrilPlugIn.m
|
||||
// beatygril
|
||||
//
|
||||
// Created by dayu on 2026/10/21.
|
||||
//
|
||||
|
||||
#import "beatygrilPlugIn.h"
|
||||
#import <IOSurface/IOSurfaceObjC.h>
|
||||
#import "TileableRemoteBrightnessShaderTypes.h"
|
||||
#import "MetalDeviceCache.h"
|
||||
#import "PGParameterIDs.h"
|
||||
#import "PGBeautyRenderer.h"
|
||||
#import "PGFaceProcessor.h"
|
||||
#import "PGInspectorState.h"
|
||||
#import "PGInspectorView.h"
|
||||
#import <Metal/Metal.h>
|
||||
#import <IOSurface/IOSurface.h>
|
||||
#import <stddef.h>
|
||||
#import <math.h>
|
||||
#import <os/log.h>
|
||||
|
||||
static os_log_t PGRenderLog(void) {
|
||||
static os_log_t log; static dispatch_once_t once;
|
||||
dispatch_once(&once, ^{ log=os_log_create("com.dayu.beatygril", "render"); });
|
||||
return log;
|
||||
}
|
||||
|
||||
typedef struct { UInt32 identifier; const char *name; size_t offset; float min, max, step; BOOL percent; } PGSlider;
|
||||
#define PGS(ID, NAME, FIELD, MIN, MAX, STEP, PERCENT) {ID, NAME, offsetof(PGBeautySettings, FIELD), MIN, MAX, STEP, PERCENT}
|
||||
static const PGSlider PGSliders[] = {
|
||||
PGS(PGAmount,"磨皮强度",amount,0,1,.01,YES),
|
||||
PGS(PGMidtone,"中频磨皮",midtoneDetail,0,1,.01,YES),
|
||||
PGS(PGRadius,"磨皮半径",radius,1,30,.5,NO),
|
||||
PGS(PGBrightness,"肤色提亮",skinBrightness,0,1,.01,YES),
|
||||
PGS(PGHue,"肤色色相",skinHue,-30,30,1,NO),
|
||||
PGS(PGSaturation,"肤色饱和度",skinSaturation,-100,100,1,NO),
|
||||
PGS(PGEvenTone,"均匀肤色",skinEvenTone,0,1,.01,YES),
|
||||
PGS(PGTeeth,"牙齿美白",teethWhitening,0,1,.01,YES),
|
||||
PGS(PGEyeBright,"眼睛提亮",eyeBrightening,0,1,.01,YES),
|
||||
PGS(PGHighPass,"高频细节平滑",highPassDetail,0,1,.01,YES),
|
||||
PGS(PGSharpness,"锐化",sharpness,0,1,.01,YES),
|
||||
PGS(PGFeatureProtectionAmount,"五官保护强度",featureProtectionAmount,0,1,.01,YES),
|
||||
PGS(PGNonSkinProtection,"非肤色区保护",nonSkinProtection,0,1,.01,YES),
|
||||
PGS(PGMicroDetail,"微细锐化",microDetail,0,1,.01,YES),
|
||||
PGS(PGThin,"瘦脸",faceThin,0,1,.01,YES),
|
||||
PGS(PGBigEye,"大眼",faceBigEye,0,1,.01,YES),
|
||||
PGS(PGShort,"短脸",faceShort,-1,1,.01,NO),
|
||||
PGS(PGNarrow,"窄脸",faceNarrow,-1,1,.01,NO),
|
||||
PGS(PGChin,"下巴",faceChin,-1,1,.01,NO),
|
||||
PGS(PGVFace,"V 脸",faceV,0,1,.01,YES),
|
||||
PGS(PGJaw,"下颌",faceJaw,0,1,.01,YES),
|
||||
PGS(PGCheekbone,"颧骨",faceCheekbone,0,1,.01,YES),
|
||||
PGS(PGSmallHead,"小头",faceSmallHead,0,1,.01,YES),
|
||||
PGS(PGSmallHeadRange,"小头范围",faceSmallHeadRange,0,1,.01,YES),
|
||||
PGS(PGThreshold,"蒙版阈值",maskThreshold,0,255,1,NO),
|
||||
PGS(PGSoftness,"蒙版柔度",maskSoftness,0,1,.01,YES),
|
||||
PGS(PGEdgeProtect,"边缘保护",maskEdgeProtect,0,1,.01,YES),
|
||||
PGS(PGJumpGuard,"防跳脸范围",faceJumpGuardRange,1,4,.05,NO),
|
||||
PGS(PGMix,"整体混合",mix,0,1,.01,YES),
|
||||
};
|
||||
#undef PGS
|
||||
|
||||
static BOOL PGFail(NSError **error, NSString *message) {
|
||||
os_log_error(PGRenderLog(), "%{public}@", message);
|
||||
if (error) *error = [NSError errorWithDomain:FxPlugErrorDomain code:kFxError_InvalidParameter
|
||||
userInfo:@{NSLocalizedDescriptionKey:message}];
|
||||
return NO;
|
||||
}
|
||||
static NSString * const PGHostCoordinateSpace = @"iosurface-ci-y-up-v1";
|
||||
static BOOL PGCompatibleHostTrack(NSData *data) {
|
||||
if (!data.length || data.length > 128*1024*1024) return NO;
|
||||
NSDictionary *archive = [NSPropertyListSerialization propertyListWithData:data options:NSPropertyListImmutable format:nil error:nil];
|
||||
return [archive isKindOfClass:NSDictionary.class] && [archive[@"hostCoordinateSpace"] isEqual:PGHostCoordinateSpace];
|
||||
}
|
||||
static NSData *PGMarkHostTrack(NSData *data) {
|
||||
if (!data) return nil;
|
||||
NSMutableDictionary *archive = [NSPropertyListSerialization propertyListWithData:data options:NSPropertyListMutableContainers format:nil error:nil];
|
||||
if (![archive isKindOfClass:NSMutableDictionary.class]) return nil;
|
||||
archive[@"hostCoordinateSpace"] = PGHostCoordinateSpace;
|
||||
return [NSPropertyListSerialization dataWithPropertyList:archive format:NSPropertyListBinaryFormat_v1_0 options:0 error:nil];
|
||||
}
|
||||
static CIImage *PGImageFromTile(FxImageTile *tile) {
|
||||
if (!tile.ioSurface) return nil;
|
||||
// The host already supplies video-gamma RGB. Keep those numeric values in
|
||||
// every stage; implicit Core Image linearization changes mask thresholds.
|
||||
NSDictionary *options = @{kCIImageColorSpace:NSNull.null};
|
||||
CIImage *image = [CIImage imageWithIOSurface:(__bridge IOSurfaceRef)tile.ioSurface options:options];
|
||||
// Match the reference's CI/IOSurface path. imageOrigin describes the host's
|
||||
// coordinate axes; it is not an instruction to reverse IOSurface scanlines.
|
||||
// An extra input/output flip can hide in passthrough while inverting faces
|
||||
// inside Vision and the analytic shape/mask stages.
|
||||
FxRect b = tile.tilePixelBounds;
|
||||
return [image imageByApplyingTransform:CGAffineTransformMakeTranslation(b.left,b.bottom)];
|
||||
}
|
||||
|
||||
@interface beatygrilPlugIn ()
|
||||
@property (strong) PGBeautyRenderer *beautyRenderer;
|
||||
@property (strong) PGFaceProcessor *faceProcessor;
|
||||
@property (strong) PGFaceProcessor *analysisFaceProcessor;
|
||||
@property (strong) NSMutableDictionary<NSNumber *,CIContext *> *contexts;
|
||||
@property PGBeautySettings analysisSettings;
|
||||
@property CMTime analysisTime;
|
||||
@property NSUInteger analyzedFrames;
|
||||
@property BOOL analyzing;
|
||||
@property BOOL analysisForward;
|
||||
@property (strong) NSArray<NSString *> *loadedTracks;
|
||||
@property BOOL reportedRender;
|
||||
@property (strong) NSHashTable<PGInspectorView *> *inspectorViews;
|
||||
@end
|
||||
|
||||
@implementation beatygrilPlugIn
|
||||
|
||||
//---------------------------------------------------------
|
||||
// initWithAPIManager:
|
||||
//
|
||||
// This method is called when a plug-in is first loaded, and
|
||||
// is a good point to conduct any checks for anti-piracy or
|
||||
// system compatibility. Returning NULL means that a plug-in
|
||||
// chooses not to be accessible for some reason.
|
||||
//---------------------------------------------------------
|
||||
|
||||
- (nullable instancetype)initWithAPIManager:(id<PROAPIAccessing>)newApiManager;
|
||||
{
|
||||
self = [super init];
|
||||
if (self != nil)
|
||||
{
|
||||
_apiManager = newApiManager;
|
||||
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager {
|
||||
if ((self=[super init])) {
|
||||
_apiManager=manager;
|
||||
_beautyRenderer=[PGBeautyRenderer new]; _faceProcessor=[PGFaceProcessor new];
|
||||
_analysisFaceProcessor=[PGFaceProcessor new];
|
||||
_contexts=[NSMutableDictionary new]; _analysisSettings=PGBeautyDefaults();
|
||||
_analysisTime=kCMTimeZero;
|
||||
_inspectorViews=[NSHashTable weakObjectsHashTable];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// properties
|
||||
//
|
||||
// This method should return an NSDictionary defining the
|
||||
// properties of the effect.
|
||||
//---------------------------------------------------------
|
||||
|
||||
- (BOOL)properties:(NSDictionary * _Nonnull *)properties
|
||||
error:(NSError * _Nullable *)error
|
||||
{
|
||||
*properties = @{
|
||||
kFxPropertyKey_MayRemapTime : [NSNumber numberWithBool:NO],
|
||||
kFxPropertyKey_PixelTransformSupport : [NSNumber numberWithInt:kFxPixelTransform_ScaleTranslate],
|
||||
kFxPropertyKey_VariesWhenParamsAreStatic : [NSNumber numberWithBool:NO]
|
||||
};
|
||||
|
||||
- (BOOL)properties:(NSDictionary **)properties error:(NSError **)error {
|
||||
if (!properties) return PGFail(error,@"宿主未提供属性输出位置。");
|
||||
*properties=@{kFxPropertyKey_MayRemapTime:@NO,
|
||||
kFxPropertyKey_PixelTransformSupport:@(kFxPixelTransform_ScaleTranslate),
|
||||
kFxPropertyKey_VariesWhenParamsAreStatic:@NO,
|
||||
@"NeedsFullBuffer":@YES, @"ChangesOutputSize":@NO,
|
||||
kFxPropertyKey_DesiredProcessingColorInfo:@(kFxImageColorInfo_RGB_GAMMA_VIDEO)};
|
||||
return YES;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// addParametersWithError
|
||||
//
|
||||
// This method is where a plug-in defines its list of parameters.
|
||||
//---------------------------------------------------------
|
||||
|
||||
- (BOOL)addParametersWithError:(NSError**)error
|
||||
{
|
||||
id<FxParameterCreationAPI_v5> paramAPI = [_apiManager apiForProtocol:@protocol(FxParameterCreationAPI_v5)];
|
||||
if (paramAPI == nil)
|
||||
{
|
||||
NSDictionary* userInfo = @{
|
||||
NSLocalizedDescriptionKey : @"Unable to obtain an FxPlug API Object"
|
||||
};
|
||||
if (error != NULL)
|
||||
*error = [NSError errorWithDomain:FxPlugErrorDomain
|
||||
code:kFxError_APIUnavailable
|
||||
userInfo:userInfo];
|
||||
|
||||
- (BOOL)addSlider:(UInt32)identifier api:(id<FxParameterCreationAPI_v5>)api {
|
||||
PGBeautySettings defaults=PGBeautyDefaults();
|
||||
for (NSUInteger i=0;i<sizeof(PGSliders)/sizeof(PGSlider);i++) {
|
||||
PGSlider spec=PGSliders[i]; if (spec.identifier!=identifier) continue;
|
||||
NSString *name=[NSString stringWithUTF8String:spec.name];
|
||||
float value=*(float *)((uint8_t *)&defaults+spec.offset);
|
||||
if (spec.percent) return [api addPercentSliderWithName:name parameterID:identifier defaultValue:value parameterMin:spec.min parameterMax:spec.max sliderMin:spec.min sliderMax:spec.max delta:spec.step parameterFlags:kFxParameterFlag_HIDDEN];
|
||||
return [api addFloatSliderWithName:name parameterID:identifier defaultValue:value parameterMin:spec.min parameterMax:spec.max sliderMin:spec.min sliderMax:spec.max delta:spec.step parameterFlags:kFxParameterFlag_HIDDEN];
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (![paramAPI addFloatSliderWithName:@"Brightness"
|
||||
parameterID:1
|
||||
defaultValue:1.0
|
||||
parameterMin:0.0
|
||||
parameterMax:100.0
|
||||
sliderMin:0.0
|
||||
sliderMax:10.0
|
||||
delta:0.1
|
||||
parameterFlags:kFxParameterFlag_DEFAULT])
|
||||
{
|
||||
NSDictionary* userInfo = @{
|
||||
NSLocalizedDescriptionKey : @"Unable to add brightness slider"
|
||||
};
|
||||
if (error != NULL)
|
||||
*error = [NSError errorWithDomain:FxPlugErrorDomain
|
||||
code:kFxError_InvalidParameter
|
||||
userInfo:userInfo];
|
||||
|
||||
return NO;
|
||||
- (BOOL)addParametersWithError:(NSError **)error {
|
||||
id<FxParameterCreationAPI_v5> api=[_apiManager apiForProtocol:@protocol(FxParameterCreationAPI_v5)];
|
||||
if (!api) return PGFail(error,@"无法取得 FxPlug 参数创建接口。");
|
||||
__block BOOL ok=YES;
|
||||
ok=[api addCustomParameterWithName:@"" parameterID:PGInspectorPanel
|
||||
defaultValue:[PGInspectorState stateWithValues:@{} disabledParameters:[NSSet set] hasEdits:NO]
|
||||
parameterFlags:kFxParameterFlag_CUSTOM_UI|kFxParameterFlag_USE_FULL_VIEW_WIDTH]&&ok;
|
||||
void (^slider)(UInt32)=^(UInt32 identifier){ok=[self addSlider:identifier api:api]&&ok;};
|
||||
void (^toggle)(NSString *,UInt32,BOOL)=^(NSString *name,UInt32 identifier,BOOL value){ok=[api addToggleButtonWithName:name parameterID:identifier defaultValue:value parameterFlags:kFxParameterFlag_HIDDEN]&&ok;};
|
||||
void (^group)(NSString *,UInt32)=^(NSString *name,UInt32 identifier){ok=[api startParameterSubGroup:name parameterID:identifier parameterFlags:kFxParameterFlag_HIDDEN]&&ok;};
|
||||
void (^end)(void)=^{ok=[api endParameterSubGroup]&&ok;};
|
||||
group(@"磨皮",100); toggle(@"启用磨皮",PGSmoothingEnabled,YES);
|
||||
slider(PGAmount); slider(PGMidtone); slider(PGRadius); toggle(@"保护五官",PGFeatureProtect,YES); end();
|
||||
group(@"磨皮保护与细节",106); slider(PGFeatureProtectionAmount); slider(PGNonSkinProtection); slider(PGMicroDetail); end();
|
||||
group(@"肤色",101); toggle(@"启用肤色",PGColorEnabled,YES);
|
||||
ok=[api addPopupMenuWithName:@"肤色风格" parameterID:PGTonePreset defaultValue:0 menuEntries:@[@"原色",@"自然白",@"冷白",@"暖白",@"红润白",@"小麦",@"古铜"] parameterFlags:kFxParameterFlag_HIDDEN]&&ok;
|
||||
slider(PGBrightness); slider(PGHue); slider(PGSaturation); slider(PGEvenTone); slider(PGTeeth); slider(PGEyeBright); end();
|
||||
group(@"细节",102); toggle(@"启用细节",PGDetailEnabled,YES); slider(PGHighPass); slider(PGSharpness); end();
|
||||
group(@"脸型",103); toggle(@"启用脸型",PGShapeEnabled,YES);
|
||||
UInt32 shape[]={PGThin,PGBigEye,PGShort,PGNarrow,PGChin,PGVFace,PGJaw,PGCheekbone,PGSmallHead,PGSmallHeadRange};
|
||||
for(NSUInteger i=0;i<sizeof(shape)/sizeof(UInt32);i++) slider(shape[i]); end();
|
||||
group(@"人脸选择与跟踪",104); toggle(@"只处理选中人脸",PGSingleFace,NO);
|
||||
ok=[api addPointParameterWithName:@"选脸位置" parameterID:PGSelection defaultX:.5 defaultY:.5 parameterFlags:kFxParameterFlag_HIDDEN]&&ok;
|
||||
toggle(@"多人高速模式",PGFastMulti,NO); slider(PGJumpGuard);
|
||||
toggle(@"使用跟踪数据",PGTrackEnabled,NO);
|
||||
ok=[api addPopupMenuWithName:@"跟踪目标" parameterID:PGTarget defaultValue:0 menuEntries:@[@"目标 1",@"目标 2",@"目标 3"] parameterFlags:kFxParameterFlag_NOT_ANIMATABLE|kFxParameterFlag_HIDDEN]&&ok;
|
||||
ok=[api addPushButtonWithName:@"向前分析" parameterID:PGAnalyzeForward selector:@selector(analyzeForward) parameterFlags:kFxParameterFlag_HIDDEN|kFxParameterFlag_DISABLED]&&ok;
|
||||
ok=[api addPushButtonWithName:@"向后分析" parameterID:PGAnalyzeBackward selector:@selector(analyzeBackward) parameterFlags:kFxParameterFlag_HIDDEN|kFxParameterFlag_DISABLED]&&ok;
|
||||
ok=[api addPushButtonWithName:@"清除当前目标" parameterID:PGClearTrack selector:@selector(clearTracking) parameterFlags:kFxParameterFlag_HIDDEN|kFxParameterFlag_DISABLED]&&ok;
|
||||
ok=[api addStringParameterWithName:@"跟踪状态" parameterID:PGStatus defaultValue:@"自动人脸跟随" parameterFlags:kFxParameterFlag_NOT_ANIMATABLE|kFxParameterFlag_DISABLED|kFxParameterFlag_HIDDEN]&&ok;
|
||||
toggle(@"显示人脸框",PGFaceBoxes,NO); toggle(@"显示跟踪框",PGTrackBoxes,NO); end();
|
||||
group(@"蒙版与输出",105); slider(PGThreshold); slider(PGSoftness); slider(PGEdgeProtect);
|
||||
toggle(@"预览蒙版",PGShowMask,NO); toggle(@"反转蒙版",PGInvertMask,NO);
|
||||
ok=[api addPopupMenuWithName:@"蒙版通道" parameterID:PGDebugChannel defaultValue:0 menuEntries:@[@"皮肤",@"牙齿",@"眼睛"] parameterFlags:kFxParameterFlag_HIDDEN]&&ok;
|
||||
slider(PGMix); end();
|
||||
for(UInt32 identifier=PGTrackData1;identifier<=PGTrackData3;identifier++)
|
||||
ok=[api addStringParameterWithName:@"分析数据" parameterID:identifier defaultValue:@"" parameterFlags:kFxParameterFlag_HIDDEN|kFxParameterFlag_NOT_ANIMATABLE]&&ok;
|
||||
return ok ? YES : PGFail(error,@"宿主未能创建完整的人像美化参数。");
|
||||
}
|
||||
|
||||
- (NSView *)createViewForParameterID:(UInt32)identifier {
|
||||
if(identifier!=PGInspectorPanel)return nil;
|
||||
PGInspectorView *view=[[PGInspectorView alloc] initWithAPIManager:_apiManager];
|
||||
@synchronized(_inspectorViews){[_inspectorViews addObject:view];}return view;
|
||||
}
|
||||
- (BOOL)parameterChanged:(UInt32)identifier atTime:(CMTime)time error:(NSError **)error {
|
||||
// The host callback covers undo and playhead-driven parameter changes. Hop
|
||||
// to AppKit's thread and avoid retaining remote inspector views in render.
|
||||
NSArray *views;@synchronized(_inspectorViews){views=_inspectorViews.allObjects;}
|
||||
for(PGInspectorView *view in views)dispatch_async(dispatch_get_main_queue(), ^{[view hostParameterChanged];});
|
||||
return YES;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// pluginState:atTime:quality:error
|
||||
//
|
||||
// Your plug-in should get its parameter values, do any calculations it needs to
|
||||
// from those values, and package up the result to be used later with rendering.
|
||||
// The host application will call this method before rendering. The
|
||||
// FxParameterRetrievalAPI* is valid during this call. Use it to get the values of
|
||||
// your plug-in's parameters, then put those values or the results of any calculations
|
||||
// you need to do with those parameters to render into an NSData that you return
|
||||
// to the host application. The host will pass it back to you during subsequent calls.
|
||||
// Do not re-use the NSData; always create a new one as this method may be called
|
||||
// on multiple threads at the same time.
|
||||
//---------------------------------------------------------
|
||||
|
||||
- (BOOL)pluginState:(NSData**)pluginState
|
||||
atTime:(CMTime)renderTime
|
||||
quality:(FxQuality)qualityLevel
|
||||
error:(NSError**)error
|
||||
{
|
||||
BOOL succeeded = NO;
|
||||
id<FxParameterRetrievalAPI_v6> paramGetAPI = [_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
|
||||
if (paramGetAPI != nil)
|
||||
{
|
||||
double brightness = 1.0;
|
||||
[paramGetAPI getFloatValue:&brightness
|
||||
fromParameter:1
|
||||
atTime:renderTime];
|
||||
|
||||
*pluginState = [NSData dataWithBytes:&brightness
|
||||
length:sizeof(brightness)];
|
||||
|
||||
if (*pluginState != nil)
|
||||
{
|
||||
succeeded = YES;
|
||||
- (Class)classForCustomParameterID:(UInt32)identifier {return identifier==PGInspectorPanel?PGInspectorState.class:Nil;}
|
||||
- (NSSet<Class> *)classesForCustomParameterID:(UInt32)identifier {
|
||||
return identifier==PGInspectorPanel?[NSSet setWithObjects:PGInspectorState.class,NSDictionary.class,NSNumber.class,NSSet.class,nil]:[NSSet set];
|
||||
}
|
||||
- (PGBeautySettings)settingsAtTime:(CMTime)time {
|
||||
PGBeautySettings s=PGBeautyDefaults();
|
||||
id<FxParameterRetrievalAPI_v6> api=[_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
|
||||
if(!api) return s;
|
||||
for(NSUInteger i=0;i<sizeof(PGSliders)/sizeof(PGSlider);i++) {
|
||||
PGSlider spec=PGSliders[i]; double value=*(float *)((uint8_t *)&s+spec.offset);
|
||||
if([api getFloatValue:&value fromParameter:spec.identifier atTime:time] && isfinite(value))
|
||||
*(float *)((uint8_t *)&s+spec.offset)=(float)fmin(spec.max,fmax(spec.min,value));
|
||||
}
|
||||
struct {UInt32 identifier;size_t offset;} toggles[]={
|
||||
{PGFeatureProtect,offsetof(PGBeautySettings,featureProtection)}, {PGShowMask,offsetof(PGBeautySettings,showMask)},
|
||||
{PGInvertMask,offsetof(PGBeautySettings,invertMask)}, {PGFaceBoxes,offsetof(PGBeautySettings,showFaceBoxes)},
|
||||
{PGTrackBoxes,offsetof(PGBeautySettings,showTrackBox)}, {PGSingleFace,offsetof(PGBeautySettings,singleFace)},
|
||||
{PGFastMulti,offsetof(PGBeautySettings,fastMultiFace)}, {PGTrackEnabled,offsetof(PGBeautySettings,trackingEnabled)}};
|
||||
for(NSUInteger i=0;i<sizeof(toggles)/sizeof(toggles[0]);i++) {
|
||||
BOOL value=*(uint32_t *)((uint8_t *)&s+toggles[i].offset)!=0;
|
||||
[api getBoolValue:&value fromParameter:toggles[i].identifier atTime:time];
|
||||
*(uint32_t *)((uint8_t *)&s+toggles[i].offset)=value;
|
||||
}
|
||||
int value=0; [api getIntValue:&value fromParameter:PGTonePreset atTime:time]; s.skinTonePreset=MIN(6,MAX(0,value));
|
||||
value=0; [api getIntValue:&value fromParameter:PGDebugChannel atTime:time]; s.debugChannel=MIN(2,MAX(0,value));
|
||||
value=0; [api getIntValue:&value fromParameter:PGTarget atTime:time]; s.targetIndex=MIN(2,MAX(0,value));
|
||||
double x=.5,y=.5; [api getXValue:&x YValue:&y fromParameter:PGSelection atTime:time];
|
||||
s.selectionX=isfinite(x)?fmin(1,fmax(0,x)):.5; s.selectionY=isfinite(y)?fmin(1,fmax(0,y)):.5;
|
||||
BOOL enabled=YES;
|
||||
[api getBoolValue:&enabled fromParameter:PGSmoothingEnabled atTime:time]; if(!enabled) s.amount=s.midtoneDetail=s.microDetail=0;
|
||||
enabled=YES; [api getBoolValue:&enabled fromParameter:PGColorEnabled atTime:time];
|
||||
if(!enabled) {s.skinBrightness=s.skinHue=s.skinSaturation=s.skinEvenTone=s.teethWhitening=s.eyeBrightening=0;s.skinTonePreset=0;}
|
||||
enabled=YES; [api getBoolValue:&enabled fromParameter:PGDetailEnabled atTime:time]; if(!enabled) s.highPassDetail=s.sharpness=0;
|
||||
enabled=YES; [api getBoolValue:&enabled fromParameter:PGShapeEnabled atTime:time];
|
||||
if(!enabled) s.faceThin=s.faceBigEye=s.faceShort=s.faceNarrow=s.faceChin=s.faceV=s.faceJaw=s.faceCheekbone=s.faceSmallHead=0;
|
||||
if(s.fastMultiFace) s.singleFace=0;
|
||||
NSObject *panel=nil;
|
||||
[api getCustomParameterValue:&panel fromParameter:PGInspectorPanel atTime:time];
|
||||
if([panel isKindOfClass:PGInspectorState.class])s=PGSettingsWithInspectorState(s,(PGInspectorState *)panel);
|
||||
// The current product follows faces automatically. Old manual-analysis and
|
||||
// debug values remain saved for document compatibility, but cannot silently
|
||||
// override live geometry or leave an invisible mask/selection mode active.
|
||||
s.trackingEnabled=0;s.singleFace=0;s.showMask=0;s.invertMask=0;s.debugChannel=0;s.showFaceBoxes=0;
|
||||
return s;
|
||||
}
|
||||
- (NSArray<NSString *> *)trackStrings {
|
||||
id<FxParameterRetrievalAPI_v6> api=[_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
|
||||
NSMutableArray *tracks=[NSMutableArray new];
|
||||
for(UInt32 identifier=PGTrackData1;identifier<=PGTrackData3;identifier++) {
|
||||
NSString *value=@"";[api getStringParameterValue:&value fromParameter:identifier];
|
||||
[tracks addObject:value?:@""];
|
||||
}
|
||||
return tracks;
|
||||
}
|
||||
- (BOOL)pluginState:(NSData **)state atTime:(CMTime)time quality:(FxQuality)quality error:(NSError **)error {
|
||||
if(!state) return PGFail(error,@"缺少渲染状态输出位置。");
|
||||
if(![_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)]) return PGFail(error,@"无法读取宿主参数。");
|
||||
PGBeautySettings s=[self settingsAtTime:time];
|
||||
*state=[NSPropertyListSerialization dataWithPropertyList:@{@"settings":[NSData dataWithBytes:&s length:sizeof(s)],@"tracks":@[@"",@"",@""]} format:NSPropertyListBinaryFormat_v1_0 options:0 error:error];
|
||||
return *state!=nil;
|
||||
}
|
||||
- (BOOL)destinationImageRect:(FxRect *)rect sourceImages:(NSArray<FxImageTile *> *)sources destinationImage:(FxImageTile *)destination pluginState:(NSData *)state atTime:(CMTime)time error:(NSError **)error {
|
||||
if(!rect||sources.count==0) return PGFail(error,@"缺少输入图像。");
|
||||
*rect=sources.firstObject.imagePixelBounds;return YES;
|
||||
}
|
||||
- (BOOL)sourceTileRect:(FxRect *)rect sourceImageIndex:(NSUInteger)index sourceImages:(NSArray<FxImageTile *> *)sources destinationTileRect:(FxRect)destinationRect destinationImage:(FxImageTile *)destination pluginState:(NSData *)state atTime:(CMTime)time error:(NSError **)error {
|
||||
if(!rect||index>=sources.count) return PGFail(error,@"输入图像索引无效。");
|
||||
*rect=sources[index].imagePixelBounds;return YES;
|
||||
}
|
||||
- (CIContext *)contextForTile:(FxImageTile *)tile {
|
||||
NSNumber *key=@(tile.deviceRegistryID);
|
||||
@synchronized(_contexts) {
|
||||
if(!_contexts[key]) {
|
||||
id<MTLDevice> device=nil;
|
||||
for(id<MTLDevice> candidate in MTLCopyAllDevices()) if(candidate.registryID==tile.deviceRegistryID) {device=candidate;break;}
|
||||
if(!device) device=MTLCreateSystemDefaultDevice();
|
||||
if(!device) return nil;
|
||||
_contexts[key]=[CIContext contextWithMTLDevice:device options:@{kCIContextCacheIntermediates:@NO,kCIContextWorkingColorSpace:NSNull.null,kCIContextOutputColorSpace:NSNull.null}];
|
||||
}
|
||||
return _contexts[key];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (error != NULL)
|
||||
*error = [NSError errorWithDomain:FxPlugErrorDomain
|
||||
code:kFxError_ThirdPartyDeveloperStart + 20
|
||||
userInfo:@{
|
||||
NSLocalizedDescriptionKey :
|
||||
@"Unable to retrieve FxParameterRetrievalAPI_v6 in \
|
||||
[-pluginStateAtTime:]" }];
|
||||
- (BOOL)renderDestinationImage:(FxImageTile *)destination sourceImages:(NSArray<FxImageTile *> *)sources pluginState:(NSData *)state atTime:(CMTime)time error:(NSError **)error {
|
||||
if(sources.count==0||!sources.firstObject.ioSurface||!destination.ioSurface||![state isKindOfClass:NSData.class]||state.length==0||state.length>320*1024*1024) return PGFail(error,@"宿主传入的画面或状态无效。");
|
||||
NSDictionary *plist=[NSPropertyListSerialization propertyListWithData:state options:NSPropertyListImmutable format:nil error:error];
|
||||
if(![plist isKindOfClass:NSDictionary.class]||![plist[@"settings"] isKindOfClass:NSData.class]) return PGFail(error,@"渲染状态版本无效。");
|
||||
NSData *encoded=plist[@"settings"]; uint32_t version=0;
|
||||
if(encoded.length<sizeof(version)) return PGFail(error,@"渲染状态版本无效。");
|
||||
[encoded getBytes:&version length:sizeof(version)];
|
||||
PGBeautySettings s=PGBeautyDefaults();
|
||||
if(version==1 && encoded.length==PGBeautySettingsV1Size) {
|
||||
[encoded getBytes:&s length:PGBeautySettingsV1Size];s.version=PGBeautySettingsVersion;
|
||||
} else if(version==PGBeautySettingsVersion && encoded.length==sizeof(s)) {
|
||||
[encoded getBytes:&s length:sizeof(s)];
|
||||
} else return PGFail(error,@"此版本不支持保存的渲染状态。");
|
||||
s.trackingEnabled=0;s.singleFace=0;
|
||||
CIImage *input=PGImageFromTile(sources.firstObject); if(!input) return PGFail(error,@"无法读取 IOSurface。");
|
||||
@synchronized(self) {
|
||||
if(!_reportedRender) {
|
||||
_reportedRender=YES;
|
||||
IOSurfaceRef src=(__bridge IOSurfaceRef)sources.firstObject.ioSurface;
|
||||
IOSurfaceRef dst=(__bridge IOSurfaceRef)destination.ioSurface;
|
||||
FxRect a=sources.firstObject.tilePixelBounds,b=destination.tilePixelBounds;
|
||||
os_log(PGRenderLog(), "source format=%u %zux%zu bytes=%zu planes=%zu origin=%lu bounds=%d,%d,%d,%d extent=%{public}@; destination format=%u %zux%zu bytes=%zu planes=%zu origin=%lu bounds=%d,%d,%d,%d; midtone=%f mix=%f mask=%u",
|
||||
IOSurfaceGetPixelFormat(src),IOSurfaceGetWidth(src),IOSurfaceGetHeight(src),IOSurfaceGetBytesPerElement(src),IOSurfaceGetPlaneCount(src),(unsigned long)sources.firstObject.imageOrigin,a.left,a.bottom,a.right,a.top,NSStringFromRect(input.extent),
|
||||
IOSurfaceGetPixelFormat(dst),IOSurfaceGetWidth(dst),IOSurfaceGetHeight(dst),IOSurfaceGetBytesPerElement(dst),IOSurfaceGetPlaneCount(dst),(unsigned long)destination.imageOrigin,b.left,b.bottom,b.right,b.top,s.midtoneDetail,s.mix,s.showMask);
|
||||
}
|
||||
|
||||
return succeeded;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// destinationImageRect:sourceImages:destinationImage:pluginState:atTime:error
|
||||
//
|
||||
// This method will calculate the rectangular bounds of the output
|
||||
// image given the various inputs and plug-in state
|
||||
// at the given render time.
|
||||
// It will pass in an array of images, the plug-in state
|
||||
// returned from your plug-in's -pluginStateAtTime:error: method,
|
||||
// and the render time.
|
||||
//---------------------------------------------------------
|
||||
|
||||
- (BOOL)destinationImageRect:(FxRect *)destinationImageRect
|
||||
sourceImages:(NSArray<FxImageTile *> *)sourceImages
|
||||
destinationImage:(nonnull FxImageTile *)destinationImage
|
||||
pluginState:(NSData *)pluginState
|
||||
atTime:(CMTime)renderTime
|
||||
error:(NSError * _Nullable *)outError
|
||||
{
|
||||
if (sourceImages.count < 1)
|
||||
{
|
||||
NSLog (@"No inputImages list");
|
||||
return NO;
|
||||
CIContext *context=[self contextForTile:destination]; if(!context) return PGFail(error,@"没有可用的 Metal 图形设备。");
|
||||
CIImage *output=nil; CIImage *overlay=nil;
|
||||
@synchronized(_faceProcessor) {
|
||||
NSArray *tracks=plist[@"tracks"];
|
||||
if(![tracks isKindOfClass:NSArray.class]||tracks.count!=3) return PGFail(error,@"跟踪状态无效。");
|
||||
for(id track in tracks) if(![track isKindOfClass:NSString.class]) return PGFail(error,@"跟踪记录无效。");
|
||||
NSError *stageError=nil;
|
||||
PGFaceFrame *frame=[_faceProcessor processImage:input settings:s time:time error:&stageError];
|
||||
if(!frame) { os_log_error(PGRenderLog(), "face processing failed: %{public}@",stageError); if(error)*error=stageError; return NO; }
|
||||
PGBeautySettings beauty=s; beauty.mix=1;
|
||||
output=[_beautyRenderer processImage:frame.image settings:beauty skinMask:frame.skinMask colorMask:frame.colorMask teethMask:frame.teethMask eyeMask:frame.eyeMask error:&stageError];
|
||||
if(!output) { os_log_error(PGRenderLog(), "beauty processing failed: %{public}@",stageError); if(error)*error=stageError; return NO; }
|
||||
overlay=frame.overlayImage;
|
||||
}
|
||||
|
||||
// In the case of a filter that only changed RGB values,
|
||||
// the output rect is the same as the input rect.
|
||||
*destinationImageRect = sourceImages [ 0 ].imagePixelBounds;
|
||||
|
||||
return YES;
|
||||
|
||||
if(!output) return NO;
|
||||
// Blend from the original frame so zero mix also disables geometry.
|
||||
if(s.mix<1 && !s.showMask) {
|
||||
output=[output imageByApplyingFilter:@"CIDissolveTransition" withInputParameters:@{kCIInputTargetImageKey:input,kCIInputTimeKey:@(1-s.mix)}];
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// sourceTileRect:sourceImageIndex:sourceImages:destinationTileRect:destinationImage:pluginState:atTime:error
|
||||
//
|
||||
// Calculate tile of the source image we need
|
||||
// to render the given output tile.
|
||||
//---------------------------------------------------------
|
||||
|
||||
- (BOOL)sourceTileRect:(FxRect *)sourceTileRect
|
||||
sourceImageIndex:(NSUInteger)sourceImageIndex
|
||||
sourceImages:(NSArray<FxImageTile *> *)sourceImages
|
||||
destinationTileRect:(FxRect)destinationTileRect
|
||||
destinationImage:(FxImageTile *)destinationImage
|
||||
pluginState:(NSData *)pluginState
|
||||
atTime:(CMTime)renderTime
|
||||
error:(NSError * _Nullable *)outError
|
||||
{
|
||||
// Since this is a color-only filter, the input tile will be the same size as the output tile
|
||||
*sourceTileRect = destinationTileRect;
|
||||
|
||||
if(overlay && !s.showMask) output=[overlay imageByCompositingOverImage:output];
|
||||
FxRect b=destination.tilePixelBounds;
|
||||
output=[output imageByApplyingTransform:CGAffineTransformMakeTranslation(-b.left,-b.bottom)];
|
||||
size_t width=IOSurfaceGetWidth((__bridge IOSurfaceRef)destination.ioSurface),height=IOSurfaceGetHeight((__bridge IOSurfaceRef)destination.ioSurface);
|
||||
@try {[context render:output toIOSurface:(__bridge IOSurfaceRef)destination.ioSurface bounds:CGRectMake(0,0,width,height) colorSpace:nil];}
|
||||
@catch(NSException *exception) {return PGFail(error,exception.reason?:@"图像处理失败。");}
|
||||
return YES;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// renderDestinationImage:sourceImages:pluginState:atTime:error:
|
||||
//
|
||||
// The host will call this method when it wants your plug-in to render an image
|
||||
// tile of the output image. It will pass in each of the input tiles needed as well
|
||||
// as the plug-in state needed for the calculations. Your plug-in should do all its
|
||||
// rendering in this method. It should not attempt to use the FxParameterRetrievalAPI*
|
||||
// object as it is invalid at this time. Note that this method will be called on
|
||||
// multiple threads at the same time.
|
||||
//---------------------------------------------------------
|
||||
|
||||
- (BOOL)renderDestinationImage:(FxImageTile *)destinationImage
|
||||
sourceImages:(NSArray<FxImageTile *> *)sourceImages
|
||||
pluginState:(NSData *)pluginState
|
||||
atTime:(CMTime)renderTime
|
||||
error:(NSError * _Nullable *)outError
|
||||
{
|
||||
if ((pluginState == nil) || (sourceImages [ 0 ].ioSurface == nil) || (destinationImage.ioSurface == nil))
|
||||
{
|
||||
NSDictionary* userInfo = @{
|
||||
NSLocalizedDescriptionKey : @"Invalid plugin state received from host"
|
||||
};
|
||||
if (outError != NULL)
|
||||
*outError = [NSError errorWithDomain:FxPlugErrorDomain
|
||||
code:kFxError_InvalidParameter
|
||||
userInfo:userInfo];
|
||||
return NO;
|
||||
- (void)setStatus:(NSString *)status {
|
||||
id<FxParameterSettingAPI_v5> api=[_apiManager apiForProtocol:@protocol(FxParameterSettingAPI_v5)];
|
||||
[api setStringParameterValue:status toParameter:PGStatus];
|
||||
}
|
||||
- (CMTime)currentHostTime {
|
||||
id<FxCustomParameterActionAPI_v4> api=[_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];
|
||||
return api ? [api currentTime] : kCMTimeZero;
|
||||
}
|
||||
- (void)startAnalysisForward:(BOOL)forward {
|
||||
if(_analyzing) {[self setStatus:@"请先等待当前分析结束或取消分析。"];return;}
|
||||
NSError *error=nil;
|
||||
id<FxAnalysisAPI> api=[_apiManager apiForProtocol:@protocol(FxAnalysisAPI)];
|
||||
if(!api) {[self setStatus:@"当前宿主不提供帧分析接口。"];return;}
|
||||
_analysisTime=[self currentHostTime];
|
||||
PGBeautySettings s=[self settingsAtTime:_analysisTime];
|
||||
NSArray<NSString *> *tracks=[self trackStrings];
|
||||
// A separate processor owns the mutable analysis session. Render snapshots
|
||||
// cannot overwrite records being accumulated by the analyzer.
|
||||
_analysisFaceProcessor=[PGFaceProcessor new];
|
||||
NSData *previous=[[NSData alloc] initWithBase64EncodedString:tracks[s.targetIndex] options:0];
|
||||
[_analysisFaceProcessor setTrackingData:PGCompatibleHostTrack(previous)?previous:nil forTarget:s.targetIndex];
|
||||
_analysisSettings=s;_analysisSettings.trackingEnabled=1;_analysisSettings.singleFace=1;
|
||||
_analysisForward=forward;_analyzing=YES;
|
||||
BOOL ok=forward?[api startForwardAnalysis:kFxAnalysisLocation_CPU error:&error]:[api startBackwardAnalysis:kFxAnalysisLocation_CPU error:&error];
|
||||
if(!ok) _analyzing=NO;
|
||||
[self setStatus:ok?@"正在分析所选人脸…":(error.localizedDescription?:@"宿主未能开始帧分析。")];
|
||||
}
|
||||
- (void)analyzeForward {[self startAnalysisForward:YES];}
|
||||
- (void)analyzeBackward {[self startAnalysisForward:NO];}
|
||||
- (void)clearTracking {
|
||||
if(_analyzing) {[self setStatus:@"请先结束或取消分析,再清除跟踪数据。"];return;}
|
||||
PGBeautySettings s=[self settingsAtTime:[self currentHostTime]];
|
||||
@synchronized(_faceProcessor) {[_faceProcessor setTrackingData:nil forTarget:s.targetIndex];_loadedTracks=nil;}
|
||||
id<FxParameterSettingAPI_v5> api=[_apiManager apiForProtocol:@protocol(FxParameterSettingAPI_v5)];
|
||||
[api setStringParameterValue:@"" toParameter:PGTrackData1+s.targetIndex];
|
||||
[self setStatus:@"已清除当前目标的分析数据"];
|
||||
}
|
||||
- (BOOL)desiredAnalysisTimeRange:(CMTimeRange *)desired forInputWithTimeRange:(CMTimeRange)range error:(NSError **)error {
|
||||
if(!desired) return PGFail(error,@"缺少分析时间范围。");
|
||||
*desired=range;
|
||||
if(CMTIMERANGE_IS_VALID(range) && CMTIME_IS_NUMERIC(_analysisTime) && CMTimeRangeContainsTime(range,_analysisTime)) {
|
||||
if(_analysisForward) *desired=CMTimeRangeFromTimeToTime(_analysisTime,CMTimeRangeGetEnd(range));
|
||||
else {
|
||||
CMTime last=CMTimeAdd(_analysisTime,CMTimeMake(1,MAX(1,_analysisTime.timescale)));
|
||||
if(CMTimeCompare(last,CMTimeRangeGetEnd(range))>0) last=CMTimeRangeGetEnd(range);
|
||||
*desired=CMTimeRangeFromTimeToTime(range.start,last);
|
||||
}
|
||||
|
||||
// This is where you would access parameter values and other info about the source tile
|
||||
// from the pluginState.
|
||||
double brightness = 0.0;
|
||||
[pluginState getBytes:&brightness
|
||||
length:sizeof(brightness)];
|
||||
|
||||
// Set up the renderer, in this case we are using Metal.
|
||||
|
||||
MetalDeviceCache* deviceCache = [MetalDeviceCache deviceCache];
|
||||
MTLPixelFormat pixelFormat = [MetalDeviceCache MTLPixelFormatForImageTile:destinationImage];
|
||||
id<MTLCommandQueue> commandQueue = [deviceCache commandQueueWithRegistryID:sourceImages[0].deviceRegistryID
|
||||
pixelFormat:pixelFormat];
|
||||
if (commandQueue == nil)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
id<MTLCommandBuffer> commandBuffer = [commandQueue commandBuffer];
|
||||
commandBuffer.label = @"DynamicRegXPC Command Buffer";
|
||||
[commandBuffer enqueue];
|
||||
|
||||
id<MTLTexture> inputTexture = [sourceImages[0] metalTextureForDevice:[deviceCache deviceWithRegistryID:sourceImages[0].deviceRegistryID]];
|
||||
id<MTLTexture> outputTexture = [destinationImage metalTextureForDevice:[deviceCache deviceWithRegistryID:destinationImage.deviceRegistryID]];
|
||||
|
||||
MTLRenderPassColorAttachmentDescriptor* colorAttachmentDescriptor = [[MTLRenderPassColorAttachmentDescriptor alloc] init];
|
||||
colorAttachmentDescriptor.texture = outputTexture;
|
||||
colorAttachmentDescriptor.clearColor = MTLClearColorMake(1.0, 0.5, 0.0, 1.0);
|
||||
colorAttachmentDescriptor.loadAction = MTLLoadActionClear;
|
||||
MTLRenderPassDescriptor* renderPassDescriptor = [MTLRenderPassDescriptor renderPassDescriptor];
|
||||
renderPassDescriptor.colorAttachments [ 0 ] = colorAttachmentDescriptor;
|
||||
id<MTLRenderCommandEncoder> commandEncoder = [commandBuffer renderCommandEncoderWithDescriptor:renderPassDescriptor];
|
||||
|
||||
// Rendering
|
||||
float outputWidth = (float)(destinationImage.tilePixelBounds.right - destinationImage.tilePixelBounds.left);
|
||||
float outputHeight = (float)(destinationImage.tilePixelBounds.top - destinationImage.tilePixelBounds.bottom);
|
||||
Vertex2D vertices[] = {
|
||||
{ { outputWidth / 2.0, -outputHeight / 2.0 }, { 1.0, 1.0 } },
|
||||
{ { -outputWidth / 2.0, -outputHeight / 2.0 }, { 0.0, 1.0 } },
|
||||
{ { outputWidth / 2.0, outputHeight / 2.0 }, { 1.0, 0.0 } },
|
||||
{ { -outputWidth / 2.0, outputHeight / 2.0 }, { 0.0, 0.0 } }
|
||||
};
|
||||
|
||||
MTLViewport viewport = {
|
||||
0, 0, outputWidth, outputHeight, -1.0, 1.0
|
||||
};
|
||||
[commandEncoder setViewport:viewport];
|
||||
|
||||
id<MTLRenderPipelineState> pipelineState = [deviceCache pipelineStateWithRegistryID:sourceImages[0].deviceRegistryID
|
||||
pixelFormat:pixelFormat];
|
||||
[commandEncoder setRenderPipelineState:pipelineState];
|
||||
|
||||
[commandEncoder setVertexBytes:vertices
|
||||
length:sizeof(vertices)
|
||||
atIndex:BVI_Vertices];
|
||||
|
||||
simd_uint2 viewportSize = {
|
||||
(unsigned int)(outputWidth),
|
||||
(unsigned int)(outputHeight)
|
||||
};
|
||||
[commandEncoder setVertexBytes:&viewportSize
|
||||
length:sizeof(viewportSize)
|
||||
atIndex:BVI_ViewportSize];
|
||||
|
||||
[commandEncoder setFragmentTexture:inputTexture
|
||||
atIndex:BTI_InputImage];
|
||||
|
||||
float fragmentBrightness = (float)brightness;
|
||||
[commandEncoder setFragmentBytes:&fragmentBrightness
|
||||
length:sizeof(fragmentBrightness)
|
||||
atIndex:BFI_Brightness];
|
||||
|
||||
[commandEncoder drawPrimitives:MTLPrimitiveTypeTriangleStrip
|
||||
vertexStart:0
|
||||
vertexCount:4];
|
||||
|
||||
[commandEncoder endEncoding];
|
||||
[commandBuffer commit];
|
||||
|
||||
[commandBuffer waitUntilCompleted];
|
||||
|
||||
[colorAttachmentDescriptor release];
|
||||
|
||||
[deviceCache returnCommandQueueToCache:commandQueue];
|
||||
|
||||
return YES;
|
||||
|
||||
}
|
||||
|
||||
- (BOOL)setupAnalysisForTimeRange:(CMTimeRange)range frameDuration:(CMTime)duration error:(NSError **)error {
|
||||
_analyzedFrames=0;_analyzing=YES;return YES;
|
||||
}
|
||||
- (BOOL)analyzeFrame:(FxImageTile *)frame atTime:(CMTime)time error:(NSError **)error {
|
||||
CIImage *image=PGImageFromTile(frame);if(!image) return PGFail(error,@"无法读取分析帧。");
|
||||
BOOL ok=NO;
|
||||
@synchronized(_analysisFaceProcessor) {ok=[_analysisFaceProcessor analyzeImage:image settings:_analysisSettings time:time error:error];}
|
||||
if(ok) _analyzedFrames++;
|
||||
return ok;
|
||||
}
|
||||
- (BOOL)cleanupAnalysis:(NSError **)error {
|
||||
_analyzing=NO;
|
||||
id<FxParameterSettingAPI_v5> api=[_apiManager apiForProtocol:@protocol(FxParameterSettingAPI_v5)];
|
||||
NSData *data=nil;
|
||||
@synchronized(_analysisFaceProcessor) {data=[_analysisFaceProcessor trackingDataForTarget:_analysisSettings.targetIndex];}
|
||||
data=PGMarkHostTrack(data);
|
||||
@synchronized(_faceProcessor) {_loadedTracks=nil;}
|
||||
if(data.length>64*1024*1024) {
|
||||
_analyzing=NO;
|
||||
return PGFail(error,@"当前目标的跟踪数据超过 64 MB。请将长素材分段分析;原先保存的数据仍保留。");
|
||||
}
|
||||
if(data) {
|
||||
if(![api setStringParameterValue:[data base64EncodedStringWithOptions:0] toParameter:PGTrackData1+_analysisSettings.targetIndex]) return PGFail(error,@"无法将分析数据保存到工程。");
|
||||
[api setBoolValue:YES toParameter:PGTrackEnabled atTime:_analysisTime];
|
||||
}
|
||||
[self setStatus:[NSString stringWithFormat:@"目标 %u:已分析 %lu 帧",_analysisSettings.targetIndex+1,(unsigned long)_analyzedFrames]];
|
||||
_analyzing=NO;return YES;
|
||||
}
|
||||
@end
|
||||
@@ -1,27 +1,45 @@
|
||||
//
|
||||
// AppDelegate.m
|
||||
// beatygril
|
||||
//
|
||||
// Created by dayu on 2026/10/21.
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
#import <CoreServices/CoreServices.h>
|
||||
|
||||
@interface AppDelegate ()
|
||||
|
||||
@property (weak) IBOutlet NSWindow *window;
|
||||
@property (strong) NSTimer *exitTimer;
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
||||
// Insert code here to initialize your application
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)notification {
|
||||
self.window.title = @"大鱼人像美化 · 免费开源";
|
||||
[self.window setContentSize:NSMakeSize(800, 450)];
|
||||
self.window.styleMask &= ~NSWindowStyleMaskResizable;
|
||||
self.window.backgroundColor = [NSColor colorWithRed:0.94 green:0.92 blue:0.85 alpha:1];
|
||||
NSImageView *card = [[NSImageView alloc] initWithFrame:NSMakeRect(0, 0, 800, 450)];
|
||||
card.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
||||
card.imageScaling = NSImageScaleProportionallyUpOrDown;
|
||||
NSURL *artwork = [NSBundle.mainBundle URLForResource:@"LauncherInfo" withExtension:@"png"];
|
||||
card.image = [[NSImage alloc] initWithContentsOfURL:artwork];
|
||||
card.accessibilityLabel = @"大鱼人像美化,免费开源,自动注册,无需激活码。主程序启动三秒后自动退出;Final Cut Pro 和 Motion 中的滤镜继续独立运行。";
|
||||
self.window.contentView = card;
|
||||
if (!card.image) {
|
||||
NSTextField *fallback = [NSTextField wrappingLabelWithString:card.accessibilityLabel];
|
||||
fallback.frame = NSMakeRect(48, 160, 704, 130);
|
||||
fallback.font = [NSFont systemFontOfSize:24 weight:NSFontWeightSemibold];
|
||||
[card addSubview:fallback];
|
||||
}
|
||||
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification *)aNotification {
|
||||
// Insert code here to tear down your application
|
||||
[self.window center];
|
||||
[self.window makeKeyAndOrderFront:nil];
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
// Only this launcher exits. The FxPlug service has its own process/lifetime.
|
||||
self.exitTimer = [NSTimer scheduledTimerWithTimeInterval:3.0 repeats:NO block:^(NSTimer *timer) {
|
||||
[NSApp terminate:nil];
|
||||
}];
|
||||
// Re-register our own bundle. There is no paid activation or account step.
|
||||
NSURL *bundleURL = NSBundle.mainBundle.bundleURL;
|
||||
dispatch_async(dispatch_get_global_queue(QOS_CLASS_UTILITY, 0), ^{
|
||||
OSStatus status = LSRegisterURL((__bridge CFURLRef)bundleURL, true);
|
||||
if (status != noErr) NSLog(@"LaunchServices registration status: %d", (int)status);
|
||||
});
|
||||
}
|
||||
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender {
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -17,9 +17,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<string>1.3.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<string>15</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
二进制文件未显示。
|
之后 宽度: | 高度: | 大小: 2.9 MiB |
@@ -0,0 +1,23 @@
|
||||
# GitHub 同步与恢复
|
||||
|
||||
公开源码:https://github.com/FAMEDaYu/FCP-BeatyGril
|
||||
|
||||
正式安装包:https://github.com/FAMEDaYu/FCP-BeatyGril/releases/tag/v1.2.0
|
||||
|
||||
本地 `github` 远端指向上述 GitHub 仓库,`origin` 继续指向大鱼仓库,`main` 仍跟随 `origin/main`。当前项目的完整提交历史、main 和七个版本标签已推送,两端引用与本地一致;未改写历史或覆盖标签。后续更新需要分别推送到 origin 和 github,不会自动定时同步。
|
||||
|
||||
## 已验证的 GitHub 恢复节点
|
||||
|
||||
匿名恢复提交:`356683b41af702d6c0143ad7fa5f540d752d6e14`。在关闭凭据助手和交互登录的独立临时目录中成功克隆 GitHub,197 个受跟踪文件逐字节一致、七个标签引用一致,strict/full fsck 通过。正式 PKG 的源码内副本与 GitHub Release 匿名下载副本 SHA-256 相同,下载副本的 Installer 签名与公证票据通过。后续 main 提交补充文章和验证记录,产品源码与该恢复节点一致。
|
||||
|
||||
安装包:`Dayu-Portrait-1.2.0.pkg`,5,011,005 bytes,SHA-256 `5bd77c28b3a7e54f3d4060be1f16bcb145d9bc4d6b9cfb9eb137c01130440243`。Release 标签 `v1.2.0` 仍指向 `3c7261c3a861b9f4704cfb36055d7b500c239dab`,没有重新编译或改动正式安装包。
|
||||
|
||||
```sh
|
||||
git clone https://github.com/FAMEDaYu/FCP-BeatyGril.git
|
||||
cd FCP-BeatyGril
|
||||
git switch --detach 356683b41af702d6c0143ad7fa5f540d752d6e14
|
||||
```
|
||||
|
||||
本项目没有 LFS 或子模块。编译仍需自行安装 Xcode 和 Apple FxPlug SDK;签名私钥与公证凭据不在 Git 内。GitHub 公共克隆无需登录;大鱼备份仍受站点登录和会员网关限制。两边都只承诺已经提交、推送并核验的节点。
|
||||
|
||||
源代码编写署名:代码由 OpenAI + Codex 全程编写,站长仅参与调试和测试。
|
||||
@@ -0,0 +1,81 @@
|
||||
# MSE18V2 分析与 beatygril 复刻
|
||||
|
||||
分析日期:2026-10-21。目标为用户指定的 `/Applications/MSE18V2.app`,原件保持只读。实现基于 PaintFCP 内原始 FxPlug4 工程,产品路径和插件 UUID 独立于原版。
|
||||
|
||||
## 证据与方法
|
||||
|
||||
REA 直接打开内嵌插件。原包为 arm64/x86_64 通用 Mach-O,Ghidra 无法保证通用包的分析切片,故用 `lipo -thin arm64` 创建临时分析副本,再用 REA/Ghidra 12.1.4 分析。所有反编译文本均为机器生成伪代码,属于静态观察与实现推断,不代表原始源码或运行记录。
|
||||
|
||||
- 原始插件 SHA-256:`6c5d74bc844a5c5f745718b48ea10ec6635d08aa08a5b6dc6e62653980849f8a`。
|
||||
- arm64 插件切片:`f01e8c0b7e2676b2961950b0e48efdd2589af218e4b36de7d39f5d1c76852bfb`。
|
||||
- 外层 APP arm64 切片:`958d2ae106a023febe244397402cdc3f1977cbc529811335fca15b93ed569a10`。
|
||||
- 证据包:[插件](rea-plugin.json)、[外层 APP](rea-host.json)。参考 APP、metallib 和 LUT 保留在原位置,没有打包到本项目。
|
||||
|
||||
|问题|静态结果与证据|结论状态|
|
||||
|---|---|---|
|
||||
|APP 与插件职责|外层 `AppDelegate::applicationDidFinishLaunching:` 调用启动图窗口;主要功能在内嵌 `MSSuperSkinSmoothingPlugIn`。`ev_e57649ee7791e0ee7f491c2659e8aece223aca06c5a95f45406c5e27e5b0974b`|已回答|
|
||||
|参数与范围|`addParametersWithError:` 的常规参数含磨皮、肤色、细节、牙齿、九项脸型、选脸、跟踪和蒙版;多数原生参数隐藏,交由自定义面板。`ev_4ab9fb8e1643d141ad84355f7fde14e9269f94adadf9348b1175bf308cbcb7c1`|已回答主要参数,动态面板全部交互未运行覆盖|
|
||||
|处理顺序|`YUCIHighPassSkinSmoothing::outputImage` 与插件 `applySkinSmoothingToImage:` 提供局部细节、调色、锐化、预设、高频细节与牙齿处理入口。`ev_65936f315a3978bebcafd04e028acc5609c1c092282c05e0ca08cf2b279bc9ad`|已回答主链|
|
||||
|磨皮算法|局部/全局细节 helper 使用双 Gaussian 与亮度频带压缩;备用蒙版存在 G/B overlay、高通和三次 hard-light。`ev_0ea0cc3a7596fe3d6f4023cc4ab539bb81f65c6fdb3f28074712847e9dd048b8`|已回答主链,部分 mask 公式采用独立实现|
|
||||
|人脸与跟踪|Vision landmarks、原版 Metal 位移网格、OpenCV 动态库、历史脸框/关键点、选择及分析数据均有证据。`renderDestinationImage:` 及函数检索见插件证据包|部分回答;运动遮挡、切镜与完整身份逻辑未等价验证|
|
||||
|像素一致性|未获得原版相同输入/参数的可信渲染对照|未验证,不能声称逐像素一致|
|
||||
|
||||
## 原版 FCP 模板的实际发布范围
|
||||
|
||||
补充检查用户指定的 `~/Movies/Motion Templates.localized/Effects.localized/💙MS超级美颜/MS超级美颜V2/MS超级美颜V2.moef`:共15个发布入口,包括空名自定义面板入口、脸型、脸框预览、白牙、亮眼和混合,没有跟踪目标、跟踪开关或前向/后向分析按钮。清单和模板摘要见 [发布参数记录](reference-template-parameters.json)。二进制内部的离线分析工具不应据此解释成模板公开控件;本项目的三目标离线分析是独立扩展;原版无需离线分析就会自动跟随,不能从没有发布按钮推断没有自动跟随。
|
||||
|
||||
## 已实现的功能
|
||||
|
||||
- 中频磨皮、强度、半径、高频细节平滑、锐化、五官保护及各大功能分组开关。
|
||||
- 肤色提亮、色相、饱和度、均匀肤色;原色及自然白、冷白、暖白、红润白、小麦、古铜六个程序化风格。
|
||||
- 牙齿美白和眼睛提亮,基于 Vision 面部区域构建软蒙版。
|
||||
- 瘦脸、大眼、短脸、窄脸、下巴、V 脸、下颌、颧骨、小头和小头范围。
|
||||
- 默认自动主要人脸几何跟随、矩形防跳、关键点稳定、失检保持和时间快照;默认外观蒙版保留整组检测范围,显式选脸与快速多人分别控制。
|
||||
- 作为扩展提供三个独立跟踪目标,向前/向后分析,清除当前目标;精确 CMTime 数据持久化到宿主工程,可逆序和任意顺序读取。
|
||||
- 蒙版阈值/柔度/边缘保护、皮肤/牙齿/眼睛通道预览与反转、包含几何变形的整体混合。
|
||||
- 保留透明度、完整输入范围、非零图像原点与宿主上下原点;原生 FxPlug 参数可由宿主保存和制作关键帧。
|
||||
|
||||
## 复刻边界
|
||||
|
||||
本交付为功能相近的独立实现,算法结果存在以下差异:
|
||||
|
||||
1. 原版六个肤色 LUT 由独立颜色变换替代,风格名称接近,颜色值不相同。
|
||||
2. 原版人脸网格/曲线位移采用本项目的平滑椭圆采样位移替代。各脸型权重和曲线、眼嘴软蒙版由本项目编写。
|
||||
3. 皮肤支持区域使用 Vision 面部区域及独立的肤色/高通备用蒙版;原版完整皮肤分割、时间稳定和细部 mask 尚未等价恢复。
|
||||
4. 本版最多保存三个独立目标、每次最多处理十六张脸。原版存在动态目标列表与旧版三目标字段,本次未完整恢复动态列表上限及全部分页操作。
|
||||
5. 离线分析记录与默认实时自动跟随须分开比较。原版实时几何链已证实由Vision重检测、temporal主体关联、防跳范围、关键点稳定/保持及回看历史组成;OpenCV动态库与VNTrackObject备用方法的存在不足以证明它们驱动当前render主链。复刻版实时流程已按这些机制实现独立对齐,完整运动、多人交叉、遮挡与切镜仍需专项对照。
|
||||
6. 界面使用宿主的分组滑块与开关;原版卡片面板的布局没有照搬。眼睛提亮在本版可用,所分析原版主链实际将该项输入设为零。
|
||||
|
||||
跟踪数据每目标保存上限为 64 MB;超过上限时保留此前已保存的数据并报告错误。长素材应分段分析。仅实际验证通过的内容计入完成;本说明中的未知项不因编译或离屏测试通过而自动消除。
|
||||
|
||||
## 自动跟随实现范围
|
||||
|
||||
默认渲染已加入独立实时几何状态,完全不依赖三个离线目标或分析按钮。默认主要人脸按面积与居中评分、前框矩形防跳和最近中心关联;选点变化重新种子,快速多人采用多人变形。外观与变形几何分开,默认皮肤/牙齿/眼睛蒙版仍覆盖检测组,图像与蒙版再共享同一变形几何;显式“只处理选中人脸”保留本项目原有外观单脸语义,此显式范围未证明与原版完全等价。
|
||||
|
||||
自有稳定公式将旧关键点映射到当前框,再以0.9及时间因子混合,异常眼轴翻转时保持重映射点。最多1200条、序列化估算16MB的纯几何缓存不保存图像;仅使用不晚于请求且0.35秒内的参考,连续保持可推进输出时间。精确CMTime、原始几何与上下文一致的重复渲染直接复用,不反复平滑。原版还可取近未来历史,本版选择past-only,因此不是完全相同时间策略。
|
||||
|
||||
当前框仍以检测为准,稳定主要影响自有warp所使用的眼部点;没有恢复原版77点网格全部稳定公式。没有真正素材来源ID,同尺寸换源只能靠时间/原始几何变化隔离,不能保证识别任意换源。首次冷启动、热缓存与首次乱序可能存在差异;锁和缓存不等于全局顺序无关。
|
||||
|
||||
## 验证
|
||||
|
||||
`./scripts/test.sh` 运行实际 Metal/Core Image 像素测试及 Vision 人脸测试。测试素材是 scikit-image 发布的 NASA 公共领域人像,出处见 `tests/fixtures/ATTRIBUTION.txt`。测试包含实际人脸 landmarks、真实几何变化、五官蒙版、单次混合、透明度和跟踪存储恢复。
|
||||
|
||||
正式签名、公证、安装、宿主发现/加载以及最终远程恢复结果记录在 `docs/验证记录.md`。
|
||||
|
||||
## 默认自动跟随的补充分析
|
||||
|
||||
用户澄清后,已追查默认render→temporalFacePoints活跃路径,证据见 [自动跟随报告](auto-follow-report.json) 与 [REA证据包](rea-auto-tracking.json)。原版以Vision重检测当前帧,在默认非多人几何路径中自动选主要人脸;显式选点是重选种子,快速多人是独立分支。主要人脸初始化按面积与居中打分,其后将前框宽高扩到180%形成防跳矩形,在范围内选择最近中心。失检/无匹配可保持原点阵,关键点另有自适应稳定和轴向突变保护。默认几何单主脸不等于美肤/牙齿蒙版只能处理一人。
|
||||
|
||||
原版保存time/points/box历史,至多1200条并支持回看;平滑包含时间因子与约0.84–0.96的混合范围,完整组内公式及轴保护布尔组合未逐像素验证。原版存在近未来历史选择分支,所以不能宣称任意乱序严格确定。复刻将以独立公式实现机制,并限制读取当前时间之前的近时参考;该时间策略会比原版更保守,属于明确的实现差异。
|
||||
|
||||
本机原生观察:Motion中使用同一蓝发视频,原版UI默认多人关闭(单人)、防跳180%;启用检测框并调瘦脸/大眼后,播放时自动更新人脸框,没有先执行离线分析。此观察只覆盖该单人片段,不能替代多人遮挡与所有参数对照。
|
||||
|
||||
1.0.4已在Motion实际加载与不同播放头位置观察默认自动跟随输出;用户随后接管Motion/FCP自测,FCP该版自动跟随及显式OSC原生点击尚未完成自动验收。已完成范围与剩余验证见 [验证记录](../验证记录.md)。
|
||||
|
||||
## 最大瘦脸与转脸差异(用户复测反馈)
|
||||
|
||||
用户反馈跟踪正常,但最大瘦脸与原版不一致,侧脸出现异常变形。补充REA与Metal AIR分析确认,原版瘦脸以76点加中心点输入,执行17组轮廓到鼻部/瞳孔锚点的局部逆向采样;当前复刻采用矩形框水平对称场,两者没有对齐。已检查的GPU瘦脸路径没有显式yaw角度切换或侧脸衰减,不能将局部二维点自适应描述为完整3D姿态识别。详见 [脸型变形与转脸分析](脸型变形与转脸分析.md) 及 [结构报告](slim-pose-report.json)。本轮未修改安装版的变形代码。
|
||||
|
||||
## 1.0.5 对齐实现
|
||||
|
||||
已根据上述证据将瘦脸本身改为76点/17组局部逆向采样,`.025 × sizeGain`映射、UV距离、每组clamp和顺序均由独立数值场对照。没有复制原版metallib或模型。全76点参与当前实时稳定并保存离线记录;缺失完整点阵时不再退回整框瘦脸。其他8类几何控制、完整77点稳定系数和快速多人重叠采样仍有既有差异。阶段验证见验证记录;原分析中“1.0.4尚未修复”是历史状态。
|
||||
@@ -0,0 +1,168 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"date": "2026-10-21",
|
||||
"scope": "只读静态 REA:原版无需离线分析的自动人脸跟随;未执行原版、未控制宿主 UI、未修改源码或原版。原生运行信息由 root 另行记录,不能把本报告静态结论称为已观察执行。",
|
||||
"target": {
|
||||
"original_binary": "/Applications/MSE18V2.app/Contents/PlugIns/MSE18V2.pluginkit/Contents/MacOS/MSE18V2",
|
||||
"original_sha256": "6c5d74bc844a5c5f745718b48ea10ec6635d08aa08a5b6dc6e62653980849f8a",
|
||||
"analyzed_arm64": "/tmp/paintfcp-rea.b3j9Te/MSE18V2-arm64",
|
||||
"analyzed_sha256": "f01e8c0b7e2676b2961950b0e48efdd2589af218e4b36de7d39f5d1c76852bfb"
|
||||
},
|
||||
"evidence": {
|
||||
"new_bundle": "rea-auto-tracking.json",
|
||||
"existing_bundle": "rea-plugin.json",
|
||||
"parameter_population": "ev_4ab9fb8e1643d141ad84355f7fde14e9269f94adadf9348b1175bf308cbcb7c1",
|
||||
"render": "ev_65936f315a3978bebcafd04e028acc5609c1c092282c05e0ca08cf2b279bc9ad",
|
||||
"procedure_search": "ev_0719399b08d56c80e1ac22c44d76b02e1f05d307dcb5a95eac02f8dd0445ccb9",
|
||||
"detection_temporal_and_optional_tracker": "ev_2d9d2d633ad190e846ba2411ce96b44b9b12c0ee4d7f06e540673e8578628182",
|
||||
"tracker_dossier": "ev_445b4f2ff33a93ce32a49568a2417245fccd4c2fcf18d3bb12fef66e60d6c37b",
|
||||
"association_selection_rewind": "ev_65d6a413bebd10f2af76e06d523cde43146db3a53e7d028e4054e31c4b003990",
|
||||
"jump_guard_axis_guard_landmark_layout": "ev_ede612c32d16a78e3ac8ec9228fa0e71fcf2ffd827d99e649bdd73f5133163a5",
|
||||
"new_bundle_sha256": "dc1007f3798fade5e454bb2ef0b58e4cfe2bb0256948c364070fd9af70a97377"
|
||||
},
|
||||
"conclusion": "原版默认几何链为当前帧 Vision 人脸关键点检测 + 跨帧主要人脸关联 + 防跳范围 + 关键点稳定/保持与回看历史;不需要先按离线分析。仅加一个 VNTrackObjectRequest 或现有逐帧重检测,均不能等价复刻这条链。",
|
||||
"findings": [
|
||||
{
|
||||
"id": "live_entry",
|
||||
"confidence": "high-static",
|
||||
"addresses": [
|
||||
"0x10001cba4",
|
||||
"0x10002e4f4",
|
||||
"0x10002f700"
|
||||
],
|
||||
"observed": "renderDestinationImage 在需要几何、局部处理或预览时调用 cachedFaceObservations,再在没有持久跟踪框/选择框可用时直接调用 temporalFacePointsForObservations;该调用不以先完成离线分析为条件。原版字符串 vision_temporal 与 vision_temporal_held 位于此分支。",
|
||||
"limitations": "不是所有参数为零时都运行人脸检测;标签只证明代码分支,不能代替宿主运行日志。"
|
||||
},
|
||||
{
|
||||
"id": "detection_cache",
|
||||
"confidence": "high-static",
|
||||
"addresses": [
|
||||
"0x10002e4f4"
|
||||
],
|
||||
"observed": "缓存比较 CMTime、图像 extent 和 sourceTileRect;相同时间的相同区域可复用。否则创建 VNDetectFaceLandmarksRequest,失败/关键点不足可再试,结果包括空结果会缓存。共享缓存受锁保护。",
|
||||
"limitations": "allowForwardReuse 的可选时长常量未继续还原;render 的主要几何需求路径传 false,不能声称每帧复用旧检测。"
|
||||
},
|
||||
{
|
||||
"id": "default_primary_and_parameters",
|
||||
"confidence": "high-static",
|
||||
"addresses": [
|
||||
"0x10001b84c",
|
||||
"0x10002973c",
|
||||
"0x10002f700",
|
||||
"0x100023b60",
|
||||
"0x10002398c"
|
||||
],
|
||||
"observed": "id20(0x14)=faceSingleSelection,注册默认0,写入 params+0xf0;它控制显式选点种子,关闭时 temporalFacePoints 仍会自动选一个主要人脸。id39(0x27)=fastMultiFaceMode,注册默认0,写入 params+0xe2;开启时强制清除 faceSingleSelection。无前态、非显式选点时 helper 023b60 按面积与靠近画心的组合得分选一个人脸;有显式选点时 02398c 按选点到脸框中心的平方距离选种子。",
|
||||
"derived_formula": "默认 primary 得分约为 1.8*clamp(框面积,0,1)+1.1*(1-clamp(距画心/0.72,0,1));以标准化、裁剪后框为准,公式为反编译推导。",
|
||||
"implication": "faceSingleSelection=false 不等于默认处理全部人脸。UI 所谓多人模式对应 fastMultiFaceMode;不要将 id20 命名直译成 all/single 总开关。"
|
||||
},
|
||||
{
|
||||
"id": "association_jump_guard",
|
||||
"confidence": "high-static",
|
||||
"addresses": [
|
||||
"0x10002f700",
|
||||
"0x100031640",
|
||||
"0x1000319b8",
|
||||
"0x100025428"
|
||||
],
|
||||
"observed": "已有有效参考脸框时,025428 将其围绕中心按 faceJumpGuardRange 倍数扩成矩形并裁剪;031640 只保留脸框中心落在该范围内的候选;0319b8 在候选中选距上一框中心最近者。注册范围1..4,默认1.8即180%。候选不匹配/检测丢失时存在保持之前几何的分支,而非立即跳到画面另一个人。",
|
||||
"implication": "当前 PG 的圆形半径 guard 与原版矩形 guard 不同。原版证据显示几何关联,没有发现此链使用人脸 embedding/实名身份识别。",
|
||||
"limitations": "未建立任意遮挡时长下必然找回同一身份的承诺;不能把几何跟随称为生物识别。",
|
||||
"hold_details": "空检测或范围内无匹配时,valid参考>=77点的路径直接沿用旧点/旧框,返回strength=1,并可推进outputTime。恢复出的该默认控制流未见明确前向hold超时/逐帧衰减阈值;不得将0.35或0.45秒当作此处失检保留时限。"
|
||||
},
|
||||
{
|
||||
"id": "landmark_stability",
|
||||
"confidence": "high-static-structure-medium-exact-math",
|
||||
"addresses": [
|
||||
"0x10002f700",
|
||||
"0x100023e00",
|
||||
"0x100022c70"
|
||||
],
|
||||
"observed": "022c70 从 allPoints 取76点、变到全图标准坐标后追加一个中心点,后续链要求至少77点。temporalFacePoints 对同长度新旧数组进行混合;小于0.03秒的有效前向间隔有 dt/0.03 因子,一般混合系数由脸部左右几何对称程度调到约0.84..0.96并作0.82..0.96限制;部分点组另做更强稳定,点组59..75有额外修正,部分归一化位移限制为0.075。023e00 比较前后脸部轴向/几何,异常时可把旧点重映射到当前框并保持,render还有 axis_hold 分支。",
|
||||
"limitations": "Ghidra 对 ObjC/CGRect/CMTime ABI 恢复不完整,组名与完全等价公式尚未逐条汇编验证;建议先重建稳定机制再通过原生视频对照调系数,不能声称像素一致。",
|
||||
"axis_guard_constants": "023e00含框重叠约0.08、中心距离阈值max(0.04,0.82*参考框最大边)、轴长有效阈值max(0.003,0.055*较小框高)、轴方向点积阈值约-0.18等组合判定。它检查方向突变/轴翻转,返回后由调用者选择旧点重映射;系数与方向已恢复,整个布尔表达式尚未逐汇编校对。"
|
||||
},
|
||||
{
|
||||
"id": "time_seek_state",
|
||||
"confidence": "high-static",
|
||||
"addresses": [
|
||||
"0x100018fe0",
|
||||
"0x100018c10",
|
||||
"0x100019490",
|
||||
"0x10002f700"
|
||||
],
|
||||
"observed": "实例含 temporal points/box、detection time、output time、valid 及 rewind points/box/time/frames;历史保存 time/points/box 并排序,上限1200条,时间差<=0.0005秒替换原条目。reference helper 根据当前时间与 allowCurrentTime 选择历史:一个分支取不晚于当前时间的最新记录,另一个分支可选距当前0.0005..0.35秒的最近历史。temporal/reference 对倒退超过0.05秒有额外判定,限制直接沿用当前 temporal 状态。选择点位置变化>0.01与 selection revision 也参与重新选种子。",
|
||||
"limitations": "这不是简单 seek 就全部清空。最近历史分支可能使用时间上晚于请求的缓存,因此不能宣称原版任意乱序渲染严格无未来状态/完全确定性。首次远跳与长时间丢失的全部优先级未继续做运行验证。",
|
||||
"reselection_reset": "显式选择重种子时清理rewind references和部分待选框状态,缓存新的selection坐标与递增revision,随后新几何成为temporal参考。seek主要靠history/time-local reference,不是统一清空。"
|
||||
},
|
||||
{
|
||||
"id": "vn_object_tracker_presence_vs_reachability",
|
||||
"confidence": "high-static-presence-unproven-live-reachability",
|
||||
"addresses": [
|
||||
"0x10002ee74"
|
||||
],
|
||||
"observed": "trackedFaceBoxForInputImage 内确有 VNSequenceRequestHandler + VNTrackObjectRequest,检测框作 seed、支持 revision 选择、trackingLevel=0(本机 Vision header 为 Accurate)、performRequests:onCIImage:orientation:1、confidence>=0.22、时间间隔0.45秒及倒退/失败重置处理。",
|
||||
"bounded_negative": "该函数 dossier callers=[],仅两个 DATA incoming references;render/temporal pseudocode中未出现对它的调用,procedure搜索未找到其 objc_stub。",
|
||||
"inference": "它可能是备用/旧版/动态调用路径;当前已建立的 live render 证据是检测+temporal关联链。不得仅因导入存在便把自动跟随归因于 VNTrackObjectRequest。间接 ObjC 调用并未穷尽排除。"
|
||||
},
|
||||
{
|
||||
"id": "multi_and_beauty_scope",
|
||||
"confidence": "high-static",
|
||||
"addresses": [
|
||||
"0x10001cba4",
|
||||
"0x10002ae04"
|
||||
],
|
||||
"observed": "fastMultiFaceMode开启且有几何需求时,render另走检测矩形/landmark枚举,构建多套point sets并执行多人变形。默认几何使用单套temporal primary点。applySkinSmoothing 在局部美化/牙齿等条件下仍可获得整组faceObservations;全局肤色与皮肤频率处理也不等同于 primary 几何选脸。",
|
||||
"implication": "不要把默认几何单主脸扩大推断为所有美肤/牙齿只能处理一人。",
|
||||
"multi_details": "render fastMulti分支仅当fastMulti开启且非零几何参数产生需求时组装多点集;先枚举landmark候选,再枚举rectangle候选,使用统一block生成points/box,记录rememberFaceThinPointSets。后续points集>=2才走多套变形,只有一个时沿用单套路径。每张脸的具体去重/旧点补全block未继续反编译,不能保证它与默认单主脸temporal滤波完全相同。"
|
||||
}
|
||||
],
|
||||
"current_implementation_comparison": {
|
||||
"repo_head_at_read": "22cd96a772f84895aacd5ccc1ef24e0711e933fa",
|
||||
"source": "/Users/dayu/Documents/PaintFCP/beatygril/beatygril/Plugin/PGFaceProcessor.m",
|
||||
"source_sha256": "b5b5b57a4baaf1ba6d0d53af6602025c9897207826865b9cf215032f910b47d4",
|
||||
"findings": [
|
||||
"168..185: 每次 observationsInImage 创建 VNImageRequestHandler + VNDetectFaceLandmarksRequest;没有 live 几何缓存。",
|
||||
"214..243: selectOne=singleFace||trackingEnabled,默认两者false时取所有有效脸(最多16)。原版默认几何是单主脸,显式快速多人另开关。",
|
||||
"225..238: 当前 guard 是以max(width,height)*range为半径的圆+宽度比例限制;原版对应 helper 是扩展矩形内的候选中心筛选。",
|
||||
"288..315: trackingEnabled为false时不读取分析记录,也不给geometryForObservations传previous;因此默认实时帧没有跨帧主体关联、防跳、landmark smoothing/hold/replay状态。",
|
||||
"188..211和246..263: _targets是离线分析写入的持久记录;processImage不写历史。它保证当前设计的render顺序独立,但不能提供原版live temporal机制。",
|
||||
"需要自动跟随不等于需要用户点分析;默认检测确实每帧跟随脸部,但多人交叉/遮挡/检测抖动时无法稳定主体与关键点。"
|
||||
]
|
||||
},
|
||||
"recommended_minimum_alignment": [
|
||||
"仅在PGFaceProcessor新增实例级live状态,与离线_targets分离;无需新增UI或要求点分析。fastMultiFace决定多人几何;否则自动primary,singleFace决定显式选点种子。",
|
||||
"首帧primary按面积+居中评分;随后先用上一框的矩形180% guard筛候选,再选最近中心。选择点/target/revision变更时重新种子;短暂丢失保留几何,超出策略范围时重新检测且明确失效。",
|
||||
"在匹配身份后对同一布局关键点作时间感知平滑,必要时将旧点映射到新框;warp与其局部mask共享同一稳定几何。可以先用清晰的自有公式,再用原生运动片对照调整,不复制反编译文本。",
|
||||
"为相同CMTime/区域缓存结果,维护有界time-keyed几何快照;seek回看从近时历史恢复,离线轨迹优先、live为fallback。extent/来源/epoch/选择变更隔离状态。并发渲染下锁住状态快照和更新,避免跨时间抢写。",
|
||||
"时间乱序应明确定义:可只使用不晚于请求的参考,作为确定性设计选择;这是有意收紧原版最近历史行为,不应宣称完全同算法。",
|
||||
"先实现已证实的检测+关联+稳定链。VNTrackObjectRequest只能作为后续可测的优化/桥接;当前证据不足以将其列为必需对齐项。"
|
||||
],
|
||||
"meaningful_validation": [
|
||||
"不调用analyzeImage,默认参数但开启可见瘦脸:连续帧人脸移动时主体框/点位移动,分析记录保持空。",
|
||||
"两人接近/交叉:默认只改变primary;guard外更大的旁人不可抢占;显式fastMultiFace开启后双方可变形。",
|
||||
"选点更换另一人:立即重种子,后续移动自动跟随新主体,不反复选择距固定点击点最近的人。",
|
||||
"检测缺失1..数帧后恢复:几何短时保持;未匹配旁人不跳;超过自定hold策略须可验证回退。",
|
||||
"在固定脸框的抖动关键点序列上,输出关键点方差下降;真实平移不应长时间滞后,面部轴向翻转异常不应造成瞬时形变。",
|
||||
"同一时间重复/正向/倒放/远seek/并发请求:不会把远处未来几何写到请求帧,extent或选择变化不复用旧缓存;测试明确原版证据与自有确定性设计的差异。",
|
||||
"原生Motion/FCP使用同视频逐帧对照默认单主脸、显式选点、防跳与快速多人,记录实际主体验证,不能用纯mock替代宿主验收。"
|
||||
],
|
||||
"unresolved": [
|
||||
"VNTrackObject路径是否通过运行时动态发送调用;当前无运行追踪,静态无caller不等于绝对不可达。",
|
||||
"temporalFace全部系数、按点组语义、首帧/远seek/长丢失保持时间的完全等价行为。",
|
||||
"皮肤mask playbackStabilizedMask另有时序链;本次只确认其存在,未扩展到完整光流/蒙版跟踪还原。",
|
||||
"原生原版UI映射、实际render调用次数和宿主乱序行为由root当前运行观察补充。"
|
||||
],
|
||||
"documentation_correction": {
|
||||
"file": "/Users/dayu/Documents/PaintFCP/docs/analysis/REA-分析与复刻说明.md",
|
||||
"line": 46,
|
||||
"problem": "“原版OpenCV光流”把二进制依赖/其他代码存在推成当前实时几何主链的已证实实现。",
|
||||
"replacement": "本版离线分析记录与原版默认自动跟随须分开比较。原版实时几何链已证实由Vision检测、temporal主体关联、防跳范围、关键点稳定/保持及回看历史组成;OpenCV动态库和VNTrackObject备用方法存在,但不足以证明它们驱动当前render主链。完整运动、多人交叉、遮挡与切镜行为仍需同视频原生对照。"
|
||||
},
|
||||
"native_observation_by_root": {
|
||||
"host": "Motion 6.4",
|
||||
"test": "Same blue-haired portrait movie; ordinary local 25fps video project with original plugin UUID, face preview enabled and thin/bigEye set to 0.5 through original custom UI.",
|
||||
"result": "Original preview followed moving face during playback without offline analysis; default fast-multi switch read off/single, jump range 180%.",
|
||||
"scope": "Single-person smoke test; no claims of exhaustive identity/occlusion behavior."
|
||||
}
|
||||
}
|
||||
二进制文件未显示。
|
之后 宽度: | 高度: | 大小: 603 KiB |
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"date": "2026-10-21",
|
||||
"target_sha256": "f01e8c0b7e2676b2961950b0e48efdd2589af218e4b36de7d39f5d1c76852bfb",
|
||||
"claim_type": "static CPU assembly/constants and Metal AIR reconstruction, independently tested; no native-host observation",
|
||||
"chin_pins": [
|
||||
[
|
||||
68,
|
||||
38
|
||||
],
|
||||
[
|
||||
67,
|
||||
37
|
||||
],
|
||||
[
|
||||
66,
|
||||
36
|
||||
]
|
||||
],
|
||||
"chin_parameter_index": 5,
|
||||
"signed_slider_range": [
|
||||
-1,
|
||||
1
|
||||
],
|
||||
"positive_scale": 0.04,
|
||||
"negative_scale": 0.02,
|
||||
"cpu_evidence": [
|
||||
"ev_640ccb714c5ce00d3864844af319fc574d223810dde08443d2ef2e8f1e989c47",
|
||||
"ev_8bc31392c07788d2482546121297c3f177d527282275ef21fd3e5edef9921544"
|
||||
],
|
||||
"air_sha256": "f97705b88f5491057df2117aef457ffca84e11020574cd57742b0670db4484d8",
|
||||
"air_file_local_ignored": "build/pose-analysis/face-thin.air.txt",
|
||||
"coordinate_contract": "Vision normalized y-up; upload pins and sampling coordinate converted once to y-down UV, result returned to CI y-up",
|
||||
"gain": "clamp(280/max(length((P75-P59)*imageSize),2*length((P67-(P74+P60)/2)*imageSize),1),1,2.25)",
|
||||
"pin_formula": "q=clamp(q-(anchor-origin)*ratio*clamp(1-distance(q,origin)/distance(anchor,origin),0,1),0,1)",
|
||||
"positive_visual_direction": "chin toward lower lip (shorter)",
|
||||
"negative_visual_direction": "chin away from lower lip (longer)",
|
||||
"verification": {
|
||||
"beauty": 49,
|
||||
"face": 116,
|
||||
"thin_chin": 394,
|
||||
"failures": 0,
|
||||
"maximum_uv_oracle_error": 1.09828022e-05,
|
||||
"realVideoASanChecks": 494,
|
||||
"realVideoFrames": 11,
|
||||
"independentAnatomicalChecks": 12,
|
||||
"fullChecks": 904,
|
||||
"hostAdapterASanChecks": 247,
|
||||
"oscASanChecks": 98,
|
||||
"allOriginTagsPixelIdentical": true,
|
||||
"maxByteErrorVsIndependentCIReference": 2,
|
||||
"oldFlipNegativeControl": {
|
||||
"checks": 120,
|
||||
"expectedFailures": 30,
|
||||
"topTopDefaultMaxByteError": 0,
|
||||
"topTopBigEyeMaxByteError": 66,
|
||||
"topTopChinPositiveMaxByteError": 52,
|
||||
"topTopChinNegativeMaxByteError": 21,
|
||||
"scope": "temporary current source with only two old flips restored; three-pin chin already fixed; not same as old Gaussian eye-hotspot counterexample"
|
||||
}
|
||||
},
|
||||
"limitations": [
|
||||
"Seven other shape controls remain approximations.",
|
||||
"Combined analytic controls and multi-face resampling order is not fully reference equivalent.",
|
||||
"Motion/FCP final visual validation is reserved for user."
|
||||
],
|
||||
"adapterCorrection": {
|
||||
"change": "remove imageOrigin-based input/output flips to match reference CI/IOSurface path",
|
||||
"legacyTrackPolicy": "preserve unmarked strings but use realtime follow; reanalysis writes hostCoordinateSpace=iosurface-ci-y-up-v1",
|
||||
"referenceOutputEvidence": [
|
||||
"ev_88a71ec62fade296495f1e3f5428cdb15ad4cda43866e09fb040fa3a4bdb0440",
|
||||
"ev_110d76f7958decb0c56b7daafe292d60a8bc56cd035b40a997f61395cb91ebfe"
|
||||
],
|
||||
"nativeBufferCaptured": false
|
||||
}
|
||||
}
|
||||
二进制文件未显示。
|
之后 宽度: | 高度: | 大小: 697 KiB |
@@ -0,0 +1 @@
|
||||
{"artifacts":[{"architecture":"arm64","digest":{"sha256":"f01e8c0b7e2676b2961950b0e48efdd2589af218e4b36de7d39f5d1c76852bfb"},"format":"mach-o"}],"captures":[],"environments":[],"providers":[{"id":"ghidra","name":"Ghidra","version":"12.1.4"},{"id":"rea-workflow","name":"REA composed investigation workflow","version":"1"}],"records":[{"analysis_profile":{"digest":"20565088524a2d0359b9b96f46ac48e679d774c7b0092c56abc06de8fdbec11c","parameters":{"analyzer_preset":"ghidra-default","annotation_policy":"atomic-function-entry-metadata-v1","architecture":"arm64","available_architectures":["arm64"],"compiler_spec_id":"auto-default","decompiler_jump_loads":true,"function_body_evidence":"complete-inclusive-ranges-v1","function_boundary_observations":"ghidra-terminal-call-limitations-v1","function_references":"complete-body-and-entry-reference-manager-v2","import_mode":"ephemeral-source-immutable","instruction_flow_evidence":"decoded-return-pcode-v1","jump_table_evidence":"typed-case-default-blocks-v1","language_id":"auto-from-header","load_image_observations":"source-mappings-entry-context-v2","loader":"auto-from-header","location_resolution":"explicit-address-exact-entry-symbol-first-v3","no_return_repair":"returning-imports-decoded-return-v2","process_launch":"inspected-jvm-launch-support-v1","string_inventory_evidence":"defined-data-coverage-v1","target_format":"mach-o","target_kind":"executable"},"provider":{"id":"ghidra","name":"Ghidra","version":"12.1.4"}},"authority":"shipped-artifact","confidence":"observed","environment":null,"evidence_id":"ev_0719399b08d56c80e1ac22c44d76b02e1f05d307dcb5a95eac02f8dd0445ccb9","evidence_links":[],"limitations":["The session serves operations only after Ghidra reports default auto-analysis complete; incomplete analysis does not expose partial results.","The imported Program and temporary project are ephemeral and deleted on close. Annotation operations edit session database metadata; original executable bytes are never written.","Cancelling an active Ghidra request terminates its ephemeral database and discards session annotations. The selected target remains open; the next provider query imports the original artifact again.","Default-space addresses use lowercase 0x-prefixed hexadecimal; other address spaces use <percent-encoded-space>:0x<hex>.","Regex mode uses Java Pattern semantics. Matcher or compiler stack exhaustion returns a resource constraint without closing the session; literal mode avoids regex recursion and returns complete matching values.","macOS sessions require a matching executable Ghidra native decompiler; REA checks for it but does not build native components or change Gatekeeper quarantine state."],"locations":[],"normalized_result":[{"address":"0x100008948","value":"MSSSectionCardParameterValue::showFaceTrackBox"},{"address":"0x100008950","value":"MSSSectionCardParameterValue::setShowFaceTrackBox:"},{"address":"0x1000089b8","value":"MSSSectionCardParameterValue::faceTrackEnabled"},{"address":"0x1000089c0","value":"MSSSectionCardParameterValue::setFaceTrackEnabled:"},{"address":"0x1000089c8","value":"MSSSectionCardParameterValue::faceTrackStatus"},{"address":"0x1000089d0","value":"MSSSectionCardParameterValue::setFaceTrackStatus:"},{"address":"0x1000089d8","value":"MSSSectionCardParameterValue::faceTrackRevision"},{"address":"0x1000089e0","value":"MSSSectionCardParameterValue::setFaceTrackRevision:"},{"address":"0x1000089e8","value":"MSSSectionCardParameterValue::faceTrackFrameCount"},{"address":"0x1000089f0","value":"MSSSectionCardParameterValue::setFaceTrackFrameCount:"},{"address":"0x1000089f8","value":"MSSSectionCardParameterValue::faceTrackSeedTimeSeconds"},{"address":"0x100008a00","value":"MSSSectionCardParameterValue::setFaceTrackSeedTimeSeconds:"},{"address":"0x100008a08","value":"MSSSectionCardParameterValue::faceTrackProgress"},{"address":"0x100008a10","value":"MSSSectionCardParameterValue::setFaceTrackProgress:"},{"address":"0x100008a18","value":"MSSSectionCardParameterValue::faceTrackAppendMode"},{"address":"0x100008a20","value":"MSSSectionCardParameterValue::setFaceTrackAppendMode:"},{"address":"0x100008a28","value":"MSSSectionCardParameterValue::faceTrackData"},{"address":"0x100008a30","value":"MSSSectionCardParameterValue::setFaceTrackData:"},{"address":"0x100008a38","value":"MSSSectionCardParameterValue::faceTrackTargetCount"},{"address":"0x100008a40","value":"MSSSectionCardParameterValue::setFaceTrackTargetCount:"},{"address":"0x100008a48","value":"MSSSectionCardParameterValue::faceTrackActiveTargetIndex"},{"address":"0x100008a50","value":"MSSSectionCardParameterValue::setFaceTrackActiveTargetIndex:"},{"address":"0x100008a58","value":"MSSSectionCardParameterValue::faceTrackAnalysisTargetIndex"},{"address":"0x100008a60","value":"MSSSectionCardParameterValue::setFaceTrackAnalysisTargetIndex:"},{"address":"0x100008a68","value":"MSSSectionCardParameterValue::faceTrackTargetPageStartIndex"},{"address":"0x100008a70","value":"MSSSectionCardParameterLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"artifacts":[{"architecture":"arm64","digest":{"sha256":"f01e8c0b7e2676b2961950b0e48efdd2589af218e4b36de7d39f5d1c76852bfb"},"format":"mach-o"}],"captures":[],"environments":[],"providers":[{"id":"ghidra","name":"Ghidra","version":"12.1.4"}],"records":[{"analysis_profile":{"digest":"20565088524a2d0359b9b96f46ac48e679d774c7b0092c56abc06de8fdbec11c","parameters":{"analyzer_preset":"ghidra-default","annotation_policy":"atomic-function-entry-metadata-v1","architecture":"arm64","available_architectures":["arm64"],"compiler_spec_id":"auto-default","decompiler_jump_loads":true,"function_body_evidence":"complete-inclusive-ranges-v1","function_boundary_observations":"ghidra-terminal-call-limitations-v1","function_references":"complete-body-and-entry-reference-manager-v2","import_mode":"ephemeral-source-immutable","instruction_flow_evidence":"decoded-return-pcode-v1","jump_table_evidence":"typed-case-default-blocks-v1","language_id":"auto-from-header","load_image_observations":"source-mappings-entry-context-v2","loader":"auto-from-header","location_resolution":"explicit-address-exact-entry-symbol-first-v3","no_return_repair":"returning-imports-decoded-return-v2","process_launch":"inspected-jvm-launch-support-v1","string_inventory_evidence":"defined-data-coverage-v1","target_format":"mach-o","target_kind":"executable"},"provider":{"id":"ghidra","name":"Ghidra","version":"12.1.4"}},"authority":"shipped-artifact","confidence":"observed","environment":null,"evidence_id":"ev_640ccb714c5ce00d3864844af319fc574d223810dde08443d2ef2e8f1e989c47","evidence_links":[],"limitations":["The session serves operations only after Ghidra reports default auto-analysis complete; incomplete analysis does not expose partial results.","The imported Program and temporary project are ephemeral and deleted on close. Annotation operations edit session database metadata; original executable bytes are never written.","Cancelling an active Ghidra request terminates its ephemeral database and discards session annotations. The selected target remains open; the next provider query imports the original artifact again.","Default-space addresses use lowercase 0x-prefixed hexadecimal; other address spaces use <percent-encoded-space>:0x<hex>.","Bytes reflect Ghidra's initialized memory, including loader fixups. Reads stop at an unmapped or uninitialized byte and report completeness explicitly.","macOS sessions require a matching executable Ghidra native decompiler; REA checks for it but does not build native components or change Gatekeeper quarantine state."],"locations":[],"normalized_result":{"address":"0x10005f9c0","bytes_hex":"7b14ae47e17a943f7b14ae47e17aa43f","complete":true,"requested_bytes":16,"returned_bytes":16},"operation":"read_bytes","parameters":{"address":"0x10005f9c0","length":16},"predicate_type":"rea.analysis","provider":{"id":"ghidra","name":"Ghidra","version":"12.1.4"},"raw_result":{"address":"0x10005f9c0","bytes_hex":"7b14ae47e17a943f7b14ae47e17aa43f","complete":true,"requested_bytes":16,"returned_bytes":16},"subject":{"architecture":"arm64","digest":{"sha256":"f01e8c0b7e2676b2961950b0e48efdd2589af218e4b36de7d39f5d1c76852bfb"},"format":"mach-o","local_path":"/private/tmp/paintfcp-rea.b3j9Te/MSE18V2-arm64","name":"MSE18V2-arm64"}},{"analysis_profile":{"digest":"20565088524a2d0359b9b96f46ac48e679d774c7b0092c56abc06de8fdbec11c","parameters":{"analyzer_preset":"ghidra-default","annotation_policy":"atomic-function-entry-metadata-v1","architecture":"arm64","available_architectures":["arm64"],"compiler_spec_id":"auto-default","decompiler_jump_loads":true,"function_body_evidence":"complete-inclusive-ranges-v1","function_boundary_observations":"ghidra-terminal-call-limitations-v1","function_references":"complete-body-and-entry-reference-manager-v2","import_mode":"ephemeral-source-immutable","instruction_flow_evidence":"decoded-return-pcode-v1","jump_table_evidence":"typed-case-default-blocks-v1","language_id":"auto-from-header","load_image_observations":"source-mappings-entry-context-v2","loader":"auto-from-header","location_resolution":"explicit-address-exact-entry-symbol-first-v3","no_return_repair":"returning-imports-decoded-return-v2","process_launch":"inspected-jvm-launch-support-v1","string_inventory_evidence":"defined-data-coverage-v1","target_format":"mach-o","target_kind":"executable"},"provider":{"id":"ghidra","name":"Ghidra","version":"12.1.4"}},"authority":"shipped-artifact","confidence":"observed","environment":null,"evidence_id":"ev_8bc31392c07788d2482546121297c3f177d527282275ef21fd3e5edef9921544","evidence_links":[],"limitations":["The session serves operations only after Ghidra reports default auto-analysis complete; incomplete analysis does not expose partial results.","The imported Program and temporary project are ephemeral and deleted on close. Annotation operations edit session database metadata; original executable bytes are never written.","Cancelling an active Ghidra request terminates its ephemeral database and discards Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"artifacts":[{"architecture":"arm64","digest":{"sha256":"958d2ae106a023febe244397402cdc3f1977cbc529811335fca15b93ed569a10"},"format":"mach-o"}],"captures":[],"environments":[],"providers":[{"id":"ghidra","name":"Ghidra","version":"12.1.4"},{"id":"rea-workflow","name":"REA composed investigation workflow","version":"1"}],"records":[{"analysis_profile":{"digest":"20565088524a2d0359b9b96f46ac48e679d774c7b0092c56abc06de8fdbec11c","parameters":{"analyzer_preset":"ghidra-default","annotation_policy":"atomic-function-entry-metadata-v1","architecture":"arm64","available_architectures":["arm64"],"compiler_spec_id":"auto-default","decompiler_jump_loads":true,"function_body_evidence":"complete-inclusive-ranges-v1","function_boundary_observations":"ghidra-terminal-call-limitations-v1","function_references":"complete-body-and-entry-reference-manager-v2","import_mode":"ephemeral-source-immutable","instruction_flow_evidence":"decoded-return-pcode-v1","jump_table_evidence":"typed-case-default-blocks-v1","language_id":"auto-from-header","load_image_observations":"source-mappings-entry-context-v2","loader":"auto-from-header","location_resolution":"explicit-address-exact-entry-symbol-first-v3","no_return_repair":"returning-imports-decoded-return-v2","process_launch":"inspected-jvm-launch-support-v1","string_inventory_evidence":"defined-data-coverage-v1","target_format":"mach-o","target_kind":"executable"},"provider":{"id":"ghidra","name":"Ghidra","version":"12.1.4"}},"authority":"shipped-artifact","confidence":"observed","environment":null,"evidence_id":"ev_bf25a1cd9c181e8f034fdee81259118798ae67e640ade71238f4afb707eab142","evidence_links":[],"limitations":["The session serves operations only after Ghidra reports default auto-analysis complete; incomplete analysis does not expose partial results.","The imported Program and temporary project are ephemeral and deleted on close. Annotation operations edit session database metadata; original executable bytes are never written.","Cancelling an active Ghidra request terminates its ephemeral database and discards session annotations. The selected target remains open; the next provider query imports the original artifact again.","Default-space addresses use lowercase 0x-prefixed hexadecimal; other address spaces use <percent-encoded-space>:0x<hex>.","Regex mode uses Java Pattern semantics. Matcher or compiler stack exhaustion returns a resource constraint without closing the session; literal mode avoids regex recursion and returns complete matching values.","macOS sessions require a matching executable Ghidra native decompiler; REA checks for it but does not build native components or change Gatekeeper quarantine state."],"locations":[],"normalized_result":[{"address":"0x100000c24","value":"AppDelegate::applicationDidFinishLaunching:"},{"address":"0x100000c28","value":"AppDelegate::mss_configureLaunchArtworkWindow"},{"address":"0x100000eb4","value":"AppDelegate::mss_pixelSizeForImage:"},{"address":"0x10000100c","value":"AppDelegate::mss_backingScaleFactorForScreen:"},{"address":"0x10000104c","value":"AppDelegate::mss_fittedSizeForSize:onScreen:"},{"address":"0x1000010e4","value":"AppDelegate::window"},{"address":"0x1000010ec","value":"AppDelegate::setWindow:"}],"operation":"search_procedures","parameters":{"case_sensitive":false,"mode":"regex","pattern":"(AppDelegate|ViewController|WindowController)"},"predicate_type":"rea.analysis","provider":{"id":"ghidra","name":"Ghidra","version":"12.1.4"},"raw_result":[{"address":"0x100000c24","value":"AppDelegate::applicationDidFinishLaunching:"},{"address":"0x100000c28","value":"AppDelegate::mss_configureLaunchArtworkWindow"},{"address":"0x100000eb4","value":"AppDelegate::mss_pixelSizeForImage:"},{"address":"0x10000100c","value":"AppDelegate::mss_backingScaleFactorForScreen:"},{"address":"0x10000104c","value":"AppDelegate::mss_fittedSizeForSize:onScreen:"},{"address":"0x1000010e4","value":"AppDelegate::window"},{"address":"0x1000010ec","value":"AppDelegate::setWindow:"}],"subject":{"architecture":"arm64","digest":{"sha256":"958d2ae106a023febe244397402cdc3f1977cbc529811335fca15b93ed569a10"},"format":"mach-o","local_path":"/private/tmp/paintfcp-rea.b3j9Te/MSE18V2-host-arm64","name":"MSE18V2-host-arm64"}},{"analysis_profile":{"digest":"575a577ce88c350b8ef1d4768986d124a16377363cbf22c68a4f73cc917881d4","parameters":{"upstream_analysis_profile":{"digest":"20565088524a2d0359b9b96f46ac48e679d774c7b0092c56abc06de8fdbec11c","parameters":{"analyzer_preset":"ghidra-default","annotation_policy":"atomic-function-entry-metadata-v1","architecture":"arm64","available_architectures":["arm64"],"compiler_spec_id":"auto-default","decompiler_jump_loads":true,"function_body_evidence":"complete-inclusive-ranges-v1","function_boundary_observations":"ghidra-terminal-call-limitations-v1","function_references":"complete-body-and-entry-reference-manager-v2","import_mode":"ephemeral-source-immutable","instruction_flow_evidence":"decoded-return-pcode-v1","jump_table_evidenLine truncated
|
||||
文件差异过大,未显示。
加载差异
@@ -0,0 +1 @@
|
||||
{"artifacts":[{"architecture":"arm64","digest":{"sha256":"f01e8c0b7e2676b2961950b0e48efdd2589af218e4b36de7d39f5d1c76852bfb"},"format":"mach-o"}],"captures":[],"environments":[],"providers":[{"id":"ghidra","name":"Ghidra","version":"12.1.4"}],"records":[{"analysis_profile":{"digest":"20565088524a2d0359b9b96f46ac48e679d774c7b0092c56abc06de8fdbec11c","parameters":{"analyzer_preset":"ghidra-default","annotation_policy":"atomic-function-entry-metadata-v1","architecture":"arm64","available_architectures":["arm64"],"compiler_spec_id":"auto-default","decompiler_jump_loads":true,"function_body_evidence":"complete-inclusive-ranges-v1","function_boundary_observations":"ghidra-terminal-call-limitations-v1","function_references":"complete-body-and-entry-reference-manager-v2","import_mode":"ephemeral-source-immutable","instruction_flow_evidence":"decoded-return-pcode-v1","jump_table_evidence":"typed-case-default-blocks-v1","language_id":"auto-from-header","load_image_observations":"source-mappings-entry-context-v2","loader":"auto-from-header","location_resolution":"explicit-address-exact-entry-symbol-first-v3","no_return_repair":"returning-imports-decoded-return-v2","process_launch":"inspected-jvm-launch-support-v1","string_inventory_evidence":"defined-data-coverage-v1","target_format":"mach-o","target_kind":"executable"},"provider":{"id":"ghidra","name":"Ghidra","version":"12.1.4"}},"authority":"shipped-artifact","confidence":"observed","environment":null,"evidence_id":"ev_8bc31392c07788d2482546121297c3f177d527282275ef21fd3e5edef9921544","evidence_links":[],"limitations":["The session serves operations only after Ghidra reports default auto-analysis complete; incomplete analysis does not expose partial results.","The imported Program and temporary project are ephemeral and deleted on close. Annotation operations edit session database metadata; original executable bytes are never written.","Cancelling an active Ghidra request terminates its ephemeral database and discards session annotations. The selected target remains open; the next provider query imports the original artifact again.","Default-space addresses use lowercase 0x-prefixed hexadecimal; other address spaces use <percent-encoded-space>:0x<hex>.","Assembly is Ghidra Listing text and does not claim textual equivalence with Hopper output.","macOS sessions require a matching executable Ghidra native decompiler; REA checks for it but does not build native components or change Gatekeeper quarantine state."],"locations":[],"normalized_result":"0x1000279f4: stp d9, d8, [sp, #-0x30]!\n0x1000279f8: stp x20, x19, [sp, #0x10]\n0x1000279fc: stp x29, x30, [sp, #0x20]\n0x100027a00: add x29, sp, #0x20\n0x100027a04: fmov d8, d0\n0x100027a08: str xzr, [x8, #0x20]\n0x100027a0c: movi v0.2D, #0x0\n0x100027a10: stp q0, q0, [x8]\n0x100027a14: cbz x0, 0x100027bac\n0x100027a18: mov x20, x0\n0x100027a1c: mov x19, x8\n0x100027a20: bl 0x10001a8c0\n0x100027a24: cbz w0, 0x100027bac\n0x100027a28: fmov d1, 0x3ff0000000000000\n0x100027a2c: fcmp d8, d1\n0x100027a30: fcsel d2, d1, d8, gt\n0x100027a34: fcmp d8, #0.0\n0x100027a38: movi d0, #0x0\n0x100027a3c: fcsel d2, d0, d2, mi\n0x100027a40: fcvt s2, d2\n0x100027a44: ldr d3, [x20, #0x80]\n0x100027a48: fcmp d3, d1\n0x100027a4c: fcsel d4, d1, d3, gt\n0x100027a50: fmov d5, -0x4010000000000000\n0x100027a54: fcmp d3, d5\n0x100027a58: fcsel d4, d5, d4, mi\n0x100027a5c: fcmp d4, #0.0\n0x100027a60: cset w8, gt\n0x100027a64: fcvt d3, s2\n0x100027a68: ldp d5, d2, [x20, #0x60]\n0x100027a6c: fcmp d2, d1\n0x100027a70: fcsel d6, d1, d2, gt\n0x100027a74: adrp x9, 0x10005f000\n0x100027a78: ldr d7, [x9, #0xb80]\n0x100027a7c: fmul d6, d6, d7\n0x100027a80: fcmp d2, #0.0\n0x100027a84: fcsel d2, d0, d6, mi\n0x100027a88: fmul d2, d2, d3\n0x100027a8c: fcvt s2, d2\n0x100027a90: add x9, x20, #0x78\n0x100027a94: ldur q6, [x20, #0x88]\n0x100027a98: ld1 v5, x9, \n0x100027a9c: adrp x9, 0x10005f000\n0x100027aa0: ldr q7, [x9, #0x980]\n0x100027aa4: fcmgt v7.2D, v7.2D, v5.2D\n0x100027aa8: fcmlt v16.2D, v6.2D\n0x100027aac: fmov v17.2D, #0x3ff0000000000000\n0x100027ab0: fcmgt v18.2D, v5.2D, v17.2D\n0x100027ab4: bit v5.16B, v17.16B, v18.16B\n0x100027ab8: fcmgt v18.2D, v6.2D, v17.2D\n0x100027abc: bit v6.16B, v17.16B, v18.16B\n0x100027ac0: adrp x9, 0x10005f000\n0x100027ac4: ldr q18, [x9, #0x990]\n0x100027ac8: fmul v5.2D, v5.2D, v18.2D\n0x100027acc: adrp x9, 0x10005f000\n0x100027ad0: ldr q18, [x9, #0x9a0]\n0x100027ad4: fmul v6.2D, v6.2D, v18.2D\n0x100027ad8: adrp x9, 0x10005f000\n0x100027adc: ldr q18, [x9, #0x9b0]\n0x100027ae0: bit v5.16B, v18.16B, v7.16B\n0x100027ae4: bic v6.16B, v6.16B, v16.16B\n0x100027ae8: fmul v6.2D, v6.2D, v3.D[0x0]\n0x100027aec: fmul v5.2D, v5.2D, v3.D[0x0]\n0x100027af0: fcvtn v5.2S, v5.2D\n0x100027af4: fcvtn2 v5.4S, v6.2D\n0x100027af8: ldr d6, [x20, #0x98]\n0x100027afc: fcmp d6, d1\n0x100027b00: fcsel d7, d1, d6, gt\n0x100027b04: adrp x9, 0x10005f000\n0x100027b08: ldr d16, [x9, #0xe68]\n0x100027b0c: fmul d7, d7, d16\n0x100027b10: fcmp d6, #0.0\n0x100027b14:Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"artifacts":[{"architecture":"arm64","digest":{"sha256":"6c5d74bc844a5c5f745718b48ea10ec6635d08aa08a5b6dc6e62653980849f8a"},"format":"mach-o"},{"architecture":"arm64","digest":{"sha256":"f01e8c0b7e2676b2961950b0e48efdd2589af218e4b36de7d39f5d1c76852bfb"},"format":"mach-o"}],"captures":[],"environments":[],"providers":[{"id":"ghidra","name":"Ghidra","version":"12.1.4"},{"id":"native-macos","name":"macOS native inspection utilities","version":null},{"id":"rea-workflow","name":"REA composed investigation workflow","version":"1"}],"records":[{"analysis_profile":{"digest":"575a577ce88c350b8ef1d4768986d124a16377363cbf22c68a4f73cc917881d4","parameters":{"upstream_analysis_profile":{"digest":"20565088524a2d0359b9b96f46ac48e679d774c7b0092c56abc06de8fdbec11c","parameters":{"analyzer_preset":"ghidra-default","annotation_policy":"atomic-function-entry-metadata-v1","architecture":"arm64","available_architectures":["arm64"],"compiler_spec_id":"auto-default","decompiler_jump_loads":true,"function_body_evidence":"complete-inclusive-ranges-v1","function_boundary_observations":"ghidra-terminal-call-limitations-v1","function_references":"complete-body-and-entry-reference-manager-v2","import_mode":"ephemeral-source-immutable","instruction_flow_evidence":"decoded-return-pcode-v1","jump_table_evidence":"typed-case-default-blocks-v1","language_id":"auto-from-header","load_image_observations":"source-mappings-entry-context-v2","loader":"auto-from-header","location_resolution":"explicit-address-exact-entry-symbol-first-v3","no_return_repair":"returning-imports-decoded-return-v2","process_launch":"inspected-jvm-launch-support-v1","string_inventory_evidence":"defined-data-coverage-v1","target_format":"mach-o","target_kind":"executable"},"provider":{"id":"ghidra","name":"Ghidra","version":"12.1.4"}},"workflow_revision":2},"provider":{"id":"rea-workflow","name":"REA composed investigation workflow","version":"1"}},"authority":"shipped-artifact","confidence":"derived","environment":null,"evidence_id":"ev_0ea0cc3a7596fe3d6f4023cc4ab539bb81f65c6fdb3f28074712847e9dd048b8","evidence_links":[],"limitations":["Derived by an REA composed workflow."],"locations":[{"address":"0x1000353b0","kind":"address"},{"address":"0x1000370a0","kind":"address"},{"address":"0x1000373ec","kind":"address"},{"address":"0x100035c2c","kind":"address"}],"normalized_result":{"failed":0,"items":[{"address":"0x1000353b0","procedure":{"address":"0x1000353b0","name":"YUCIHighPassSkinSmoothingMaskGenerator::outputImage","status":"resolved"},"pseudocode":"\n/* WARNING: Function: _objc_autorelease replaced with injection: _objc_retain_fixup */\n/* Function Stack Size: 0x10 bytes */\n\nID YUCIHighPassSkinSmoothingMaskGenerator::outputImage(ID param_1,SEL param_2)\n\n{\n ID IVar1;\n ID IVar2;\n class_t *pcVar3;\n class_t *self;\n \n IVar1 = CIFilter::filterWithName_((ID)&_OBJC_CLASS___CIFilter,&cf_CIExposureAdjust);\n IVar2 = inputImage(param_1);\n CIFilter::setValue_forKey_(IVar1,IVar2,*(undefined8 *)PTR__kCIInputImageKey_1000781a8);\n CIFilter::setValue_forKey_\n (IVar1,&PTR__OBJC_CLASS___NSConstantDoubleNumber_10007d848,\n *(undefined8 *)PTR__kCIInputEVKey_1000781a0);\n pcVar3 = &objc::class_t::YUCIGreenBlueChannelOverlayBlend;\n _objc_alloc_init();\n IVar1 = CIFilter::outputImage(IVar1);\n objc_stub::setInputImage_((ID)pcVar3,IVar1);\n self = &objc::class_t::YUCIHighPass;\n _objc_alloc_init();\n IVar1 = objc_stub::outputImage((ID)pcVar3);\n objc_stub::setInputImage_((ID)self,IVar1);\n IVar1 = inputRadius(param_1);\n objc_stub::setInputRadius_((ID)self,IVar1);\n pcVar3 = &objc::class_t::YUCIHighPassSkinSmoothingMaskBoost;\n _objc_alloc_init();\n IVar1 = objc_stub::outputImage((ID)self);\n objc_stub::setInputImage_((ID)pcVar3,IVar1);\n IVar1 = objc_stub::outputImage((ID)pcVar3);\n return IVar1;\n}\n\n","status":"ok"},{"address":"0x1000370a0","procedure":{"address":"0x1000370a0","name":"FUN_1000370a0","status":"resolved"},"pseudocode":"\nvoid FUN_1000370a0(double param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n ID param_5,undefined8 param_6)\n\n{\n ID IVar1;\n ID IVar2;\n ID IVar3;\n undefined8 uVar4;\n undefined8 uVar5;\n ID IVar6;\n double dVar7;\n double dVar8;\n double dVar9;\n double dVar10;\n undefined8 extraout_d0;\n double dVar11;\n double dVar12;\n ID local_b8;\n ID IStack_b0;\n ID local_a8;\n ID local_a0;\n long local_98;\n \n local_98 = *(long *)PTR____stack_chk_guard_1000780b8;\n if (param_5 != 0) {\n dVar7 = 1.0;\n if (param_1 <= 1.0) {\n dVar7 = param_1;\n }\n dVar8 = 0.0;\n if (0.0 <= param_1) {\n dVar8 = dVar7 + dVar7;\n }\n dVar7 = 2.0;\n if (dVar8 <= 2.0) {\n dVar7 = dVar8;\n }\n dVar11 = 0.0;\n if (0.0 <= dVar8) {\n dVar11 = dVar7;\n }\n IVar6 = param_5;\n if (2.220446049250313e-16 < dVar11) {\n dVar11 = dVar11 * 0.5;\n dVar7 = dVar11;\n _pow(dVar11,0x4001333333333333);\n Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"artifacts":[{"architecture":"arm64","digest":{"sha256":"f01e8c0b7e2676b2961950b0e48efdd2589af218e4b36de7d39f5d1c76852bfb"},"format":"mach-o"}],"captures":[],"environments":[],"providers":[{"id":"ghidra","name":"Ghidra","version":"12.1.4"}],"records":[{"analysis_profile":{"digest":"20565088524a2d0359b9b96f46ac48e679d774c7b0092c56abc06de8fdbec11c","parameters":{"analyzer_preset":"ghidra-default","annotation_policy":"atomic-function-entry-metadata-v1","architecture":"arm64","available_architectures":["arm64"],"compiler_spec_id":"auto-default","decompiler_jump_loads":true,"function_body_evidence":"complete-inclusive-ranges-v1","function_boundary_observations":"ghidra-terminal-call-limitations-v1","function_references":"complete-body-and-entry-reference-manager-v2","import_mode":"ephemeral-source-immutable","instruction_flow_evidence":"decoded-return-pcode-v1","jump_table_evidence":"typed-case-default-blocks-v1","language_id":"auto-from-header","load_image_observations":"source-mappings-entry-context-v2","loader":"auto-from-header","location_resolution":"explicit-address-exact-entry-symbol-first-v3","no_return_repair":"returning-imports-decoded-return-v2","process_launch":"inspected-jvm-launch-support-v1","string_inventory_evidence":"defined-data-coverage-v1","target_format":"mach-o","target_kind":"executable"},"provider":{"id":"ghidra","name":"Ghidra","version":"12.1.4"}},"authority":"shipped-artifact","confidence":"observed","environment":null,"evidence_id":"ev_02f734a0d72f1b7b77a3112d1de297b9e99ea43d5377349e6eebb71ab017d650","evidence_links":[],"limitations":["The session serves operations only after Ghidra reports default auto-analysis complete; incomplete analysis does not expose partial results.","The imported Program and temporary project are ephemeral and deleted on close. Annotation operations edit session database metadata; original executable bytes are never written.","Cancelling an active Ghidra request terminates its ephemeral database and discards session annotations. The selected target remains open; the next provider query imports the original artifact again.","Default-space addresses use lowercase 0x-prefixed hexadecimal; other address spaces use <percent-encoded-space>:0x<hex>.","Pseudocode is Ghidra decompiler output, not original source and not text-equivalent to Hopper output.","External functions and functions without an analyzable body return null; other decompiler failures remain explicit.","Ghidra Listing reports a terminal call at 0x100016b84 to 0x10005c880 objc_stub::setUsesCPUOnly: (external=false, thunk=false, hasNoReturn=false); fallthrough is excluded by Ghidra's flow model. The reason for the terminal flow is not established by this observation.","macOS sessions require a matching executable Ghidra native decompiler; REA checks for it but does not build native components or change Gatekeeper quarantine state."],"locations":[],"normalized_result":"\nvoid FUN_100016a3c(ID param_1,ID param_2,ID param_3)\n\n{\n undefined8 uVar1;\n int iVar2;\n ID IVar3;\n ID IVar4;\n ID IVar5;\n \n if (param_1 == 0) {\n return;\n }\n if ((param_2 == 0) || (IVar3 = objc_stub::revision(param_2), IVar3 == 0)) {\n IVar5 = VNDetectFaceLandmarksRequest::supportedRevisions\n ((ID)&_OBJC_CLASS___VNDetectFaceLandmarksRequest);\n IVar3 = 3;\n IVar4 = VNDetectFaceLandmarksRequest::containsIndex_(IVar5,3);\n if ((IVar4 & 1) == 0) {\n IVar5 = VNDetectFaceLandmarksRequest::containsIndex_(IVar5,2);\n IVar3 = 1;\n if ((int)IVar5 != 0) {\n IVar3 = 2;\n }\n }\n }\n else {\n IVar3 = objc_stub::revision(param_2);\n }\n IVar5 = VNDetectFaceLandmarksRequest::supportedRevisions\n ((ID)&_OBJC_CLASS___VNDetectFaceLandmarksRequest);\n IVar5 = VNDetectFaceLandmarksRequest::containsIndex_(IVar5,IVar3);\n if ((IVar5 & 1) == 0) {\n IVar3 = VNDetectFaceLandmarksRequest::supportedRevisions\n ((ID)&_OBJC_CLASS___VNDetectFaceLandmarksRequest);\n IVar5 = VNDetectFaceLandmarksRequest::containsIndex_(IVar3,3);\n if ((int)IVar5 == 0) {\n IVar3 = VNDetectFaceLandmarksRequest::containsIndex_(IVar3,2);\n uVar1 = 1;\n if ((int)IVar3 != 0) {\n uVar1 = 2;\n }\n objc_stub::setRevision_(param_1,uVar1);\n goto LAB_100016b4c;\n }\n objc_stub::setRevision_(param_1,3);\n }\n else {\n objc_stub::setRevision_(param_1,IVar3);\n if (IVar3 != 3) goto LAB_100016b4c;\n }\n IVar3 = VNDetectFaceLandmarksRequest::revision_supportsConstellation_\n ((ID)&_OBJC_CLASS___VNDetectFaceLandmarksRequest,3,2);\n if ((int)IVar3 != 0) {\n objc_stub::setConstellation_(param_1,2);\n }\nLAB_100016b4c:\n IVar3 = objc_stub::count(param_3);\n iVar2 = 0;\n if (IVar3 != 0) {\n IVar3 = objc_stub::setInputFaceObservations_(param_1,param_3);\n iVar2 = (int)IVar3;\n }\n FUN_10003b084();\n if (iVar2 == 0) {\n return;\n }\n objc_stub::setUsesCPUOnly_(param_1,1Line truncated
|
||||
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"path": "/Users/dayu/Movies/Motion Templates.localized/Effects.localized/💙MS超级美颜/MS超级美颜V2/MS超级美颜V2.moef",
|
||||
"sha256": "5c20b387f6a6438614a9182d3f93f67473881d433a25f7c3b557d063f55a5d92",
|
||||
"published_count": 15,
|
||||
"published": [
|
||||
{
|
||||
"object": "10030",
|
||||
"channel": "./210",
|
||||
"name": ""
|
||||
},
|
||||
{
|
||||
"object": "10030",
|
||||
"channel": "./18",
|
||||
"name": "瘦脸"
|
||||
},
|
||||
{
|
||||
"object": "10030",
|
||||
"channel": "./33",
|
||||
"name": "大眼"
|
||||
},
|
||||
{
|
||||
"object": "10030",
|
||||
"channel": "./22",
|
||||
"name": "短脸"
|
||||
},
|
||||
{
|
||||
"object": "10030",
|
||||
"channel": "./23",
|
||||
"name": "窄脸"
|
||||
},
|
||||
{
|
||||
"object": "10030",
|
||||
"channel": "./24",
|
||||
"name": "下巴"
|
||||
},
|
||||
{
|
||||
"object": "10030",
|
||||
"channel": "./25",
|
||||
"name": "V脸"
|
||||
},
|
||||
{
|
||||
"object": "10030",
|
||||
"channel": "./26",
|
||||
"name": "下颚骨"
|
||||
},
|
||||
{
|
||||
"object": "10030",
|
||||
"channel": "./27",
|
||||
"name": "颧骨"
|
||||
},
|
||||
{
|
||||
"object": "10030",
|
||||
"channel": "./28",
|
||||
"name": "小头"
|
||||
},
|
||||
{
|
||||
"object": "10030",
|
||||
"channel": "./29",
|
||||
"name": "小头范围"
|
||||
},
|
||||
{
|
||||
"object": "10030",
|
||||
"channel": "./19",
|
||||
"name": "人脸框预览"
|
||||
},
|
||||
{
|
||||
"object": "10030",
|
||||
"channel": "./31",
|
||||
"name": "白牙"
|
||||
},
|
||||
{
|
||||
"object": "10030",
|
||||
"channel": "./32",
|
||||
"name": "亮眼"
|
||||
},
|
||||
{
|
||||
"object": "10030",
|
||||
"channel": "./10001",
|
||||
"name": "混合"
|
||||
}
|
||||
],
|
||||
"tracking_controls_published": false
|
||||
}
|
||||
@@ -0,0 +1,371 @@
|
||||
Source AIR SHA256: f97705b88f5491057df2117aef457ffca84e11020574cd57742b0670db4484d8
|
||||
Line numbers refer to the complete original metal-objdump text. Static IR; original shader not executed.
|
||||
|
||||
583: define internal fastcc <2 x float> @_ZL25mssFaceShapePinCoordinateDv2_fPU11MTLconstantK16MSSFaceThinPointi18MSSFaceShapeParamsS_(<2 x float> %0, %struct.MSSFaceThinPoint addrspace(2)* nocapture readonly %1, i32 %2, float %3, float %4, float %5, float %6, float %7, float %8, float %9, float %10, float %11, float %12, <2 x float> %13) unnamed_addr #2 {
|
||||
584: %15 = alloca [17 x <3 x i32>], align 16
|
||||
585: %16 = alloca [16 x <2 x i32>], align 8
|
||||
586: %17 = alloca [4 x <2 x i32>], align 8
|
||||
587: %18 = alloca [6 x <3 x i32>], align 16
|
||||
588: %19 = alloca [6 x <2 x i32>], align 8
|
||||
589: %20 = alloca [3 x <2 x i32>], align 8
|
||||
590: %21 = alloca [11 x i32], align 4
|
||||
591: %22 = alloca [11 x <2 x float>], align 8
|
||||
592: %23 = add nsw i32 %2, 75
|
||||
593: %24 = sext i32 %23 to i64
|
||||
594: %25 = getelementptr inbounds %struct.MSSFaceThinPoint, %struct.MSSFaceThinPoint addrspace(2)* %1, i64 %24, i32 0
|
||||
595: %26 = load <2 x float>, <2 x float> addrspace(2)* %25, align 8, !tbaa !62
|
||||
596: %27 = add nsw i32 %2, 59
|
||||
597: %28 = sext i32 %27 to i64
|
||||
598: %29 = getelementptr inbounds %struct.MSSFaceThinPoint, %struct.MSSFaceThinPoint addrspace(2)* %1, i64 %28, i32 0
|
||||
599: %30 = load <2 x float>, <2 x float> addrspace(2)* %29, align 8, !tbaa !62
|
||||
600: %31 = add nsw i32 %2, 67
|
||||
601: %32 = sext i32 %31 to i64
|
||||
602: %33 = getelementptr inbounds %struct.MSSFaceThinPoint, %struct.MSSFaceThinPoint addrspace(2)* %1, i64 %32, i32 0
|
||||
603: %34 = load <2 x float>, <2 x float> addrspace(2)* %33, align 8, !tbaa !62
|
||||
604: %35 = add nsw i32 %2, 74
|
||||
605: %36 = sext i32 %35 to i64
|
||||
606: %37 = getelementptr inbounds %struct.MSSFaceThinPoint, %struct.MSSFaceThinPoint addrspace(2)* %1, i64 %36, i32 0
|
||||
607: %38 = load <2 x float>, <2 x float> addrspace(2)* %37, align 8, !tbaa !62
|
||||
608: %39 = add nsw i32 %2, 60
|
||||
609: %40 = sext i32 %39 to i64
|
||||
610: %41 = getelementptr inbounds %struct.MSSFaceThinPoint, %struct.MSSFaceThinPoint addrspace(2)* %1, i64 %40, i32 0
|
||||
611: %42 = load <2 x float>, <2 x float> addrspace(2)* %41, align 8, !tbaa !62
|
||||
612: %43 = fadd fast <2 x float> %42, %38
|
||||
613: %44 = fmul fast <2 x float> %43, <float 5.000000e-01, float 5.000000e-01>
|
||||
614: %45 = fsub fast <2 x float> %26, %30
|
||||
615: %46 = fmul fast <2 x float> %45, %13
|
||||
616: %47 = tail call fast float @air.dot.v2f32(<2 x float> %46, <2 x float> %46) #3
|
||||
617: %48 = tail call fast float @air.fast_sqrt.f32(float %47) #3
|
||||
618: %49 = fsub fast <2 x float> %34, %44
|
||||
619: %50 = fmul fast <2 x float> %49, %13
|
||||
620: %51 = tail call fast float @air.dot.v2f32(<2 x float> %50, <2 x float> %50) #3
|
||||
621: %52 = tail call fast float @air.fast_sqrt.f32(float %51) #3
|
||||
622: %53 = fmul fast float %52, 2.000000e+00
|
||||
623: %54 = tail call fast float @air.fast_fmax.f32(float %48, float %53) #3
|
||||
624: %55 = tail call fast float @air.fast_fmax.f32(float %54, float 1.000000e+00) #3
|
||||
625: %56 = fdiv fast float 2.800000e+02, %55
|
||||
626: %57 = tail call fast float @air.fast_clamp.f32(float %56, float 1.000000e+00, float 2.250000e+00) #3
|
||||
627: %58 = fmul fast float %57, %3
|
||||
628: %59 = fmul fast float %57, %4
|
||||
629: %60 = fmul fast float %57, %5
|
||||
630: %61 = fmul fast float %57, %6
|
||||
631: %62 = fmul fast float %57, %7
|
||||
632: %63 = fmul fast float %57, %8
|
||||
633: %64 = fmul fast float %57, %9
|
||||
634: %65 = tail call fast float @air.fast_fabs.f32(float %58) #3
|
||||
635: %66 = fcmp fast ogt float %65, 0x3EB0C6F7A0000000
|
||||
|
||||
899: 251: ; preds = %212, %200
|
||||
900: %252 = phi <2 x float> [ %248, %212 ], [ %201, %200 ]
|
||||
901: %253 = tail call fast float @air.fast_fabs.f32(float %61) #3
|
||||
902: %254 = fcmp fast ogt float %253, 0x3EB0C6F7A0000000
|
||||
903: br i1 %254, label %255, label %309
|
||||
904:
|
||||
905: 255: ; preds = %251
|
||||
906: %256 = bitcast [6 x <3 x i32>]* %18 to i8*
|
||||
907: call void @llvm.lifetime.start.p0i8(i64 96, i8* nonnull %256) #8
|
||||
908: %257 = getelementptr inbounds [6 x <3 x i32>], [6 x <3 x i32>]* %18, i64 0, i64 0
|
||||
909: store <3 x i32> <i32 72, i32 71, i32 29>, <3 x i32>* %257, align 16
|
||||
910: %258 = getelementptr inbounds [6 x <3 x i32>], [6 x <3 x i32>]* %18, i64 0, i64 1
|
||||
911: store <3 x i32> <i32 62, i32 63, i32 29>, <3 x i32>* %258, align 16
|
||||
912: %259 = getelementptr inbounds [6 x <3 x i32>], [6 x <3 x i32>]* %18, i64 0, i64 2
|
||||
913: store <3 x i32> <i32 71, i32 70, i32 29>, <3 x i32>* %259, align 16
|
||||
914: %260 = getelementptr inbounds [6 x <3 x i32>], [6 x <3 x i32>]* %18, i64 0, i64 3
|
||||
915: store <3 x i32> <i32 63, i32 64, i32 29>, <3 x i32>* %260, align 16
|
||||
916: %261 = getelementptr inbounds [6 x <3 x i32>], [6 x <3 x i32>]* %18, i64 0, i64 4
|
||||
917: store <3 x i32> <i32 70, i32 71, i32 29>, <3 x i32>* %261, align 16
|
||||
918: %262 = getelementptr inbounds [6 x <3 x i32>], [6 x <3 x i32>]* %18, i64 0, i64 5
|
||||
919: store <3 x i32> <i32 64, i32 63, i32 29>, <3 x i32>* %262, align 16
|
||||
920: %263 = insertelement <2 x float> undef, float %61, i64 0
|
||||
921: %264 = shufflevector <2 x float> %263, <2 x float> undef, <2 x i32> zeroinitializer
|
||||
922: br label %266
|
||||
923:
|
||||
924: 265: ; preds = %305
|
||||
925: call void @llvm.lifetime.end.p0i8(i64 96, i8* nonnull %256) #8
|
||||
926: br label %309
|
||||
927:
|
||||
928: 266: ; preds = %305, %255
|
||||
929: %267 = phi <2 x float> [ %252, %255 ], [ %306, %305 ]
|
||||
930: %268 = phi i32 [ 0, %255 ], [ %307, %305 ]
|
||||
931: %269 = zext i32 %268 to i64
|
||||
932: %270 = getelementptr inbounds [6 x <3 x i32>], [6 x <3 x i32>]* %18, i64 0, i64 %269
|
||||
933: %271 = load <3 x i32>, <3 x i32>* %270, align 16
|
||||
934: %272 = extractelement <3 x i32> %271, i64 0
|
||||
935: %273 = add nsw i32 %272, %2
|
||||
936: %274 = sext i32 %273 to i64
|
||||
937: %275 = getelementptr inbounds %struct.MSSFaceThinPoint, %struct.MSSFaceThinPoint addrspace(2)* %1, i64 %274, i32 0
|
||||
938: %276 = load <2 x float>, <2 x float> addrspace(2)* %275, align 8, !tbaa !62
|
||||
939: %277 = extractelement <3 x i32> %271, i64 1
|
||||
940: %278 = add nsw i32 %277, %2
|
||||
941: %279 = sext i32 %278 to i64
|
||||
942: %280 = getelementptr inbounds %struct.MSSFaceThinPoint, %struct.MSSFaceThinPoint addrspace(2)* %1, i64 %279, i32 0
|
||||
943: %281 = load <2 x float>, <2 x float> addrspace(2)* %280, align 8, !tbaa !62
|
||||
944: %282 = fsub fast <2 x float> %276, %281
|
||||
945: %283 = tail call fast float @air.dot.v2f32(<2 x float> %282, <2 x float> %282) #3
|
||||
946: %284 = tail call fast float @air.fast_sqrt.f32(float %283) #3
|
||||
947: %285 = fcmp fast ugt float %284, 0x3F1A36E2E0000000
|
||||
948: br i1 %285, label %286, label %305
|
||||
949:
|
||||
950: 286: ; preds = %266
|
||||
951: %287 = extractelement <3 x i32> %271, i64 2
|
||||
952: %288 = add nsw i32 %287, %2
|
||||
953: %289 = sext i32 %288 to i64
|
||||
954: %290 = getelementptr inbounds %struct.MSSFaceThinPoint, %struct.MSSFaceThinPoint addrspace(2)* %1, i64 %289, i32 0
|
||||
955: %291 = load <2 x float>, <2 x float> addrspace(2)* %290, align 8, !tbaa !62
|
||||
956: %292 = fsub fast <2 x float> %291, %276
|
||||
957: %293 = fsub fast <2 x float> %267, %276
|
||||
958: %294 = tail call fast float @air.dot.v2f32(<2 x float> %293, <2 x float> %293) #3
|
||||
959: %295 = tail call fast float @air.fast_sqrt.f32(float %294) #3
|
||||
960: %296 = fdiv fast float %295, %284
|
||||
961: %297 = fsub fast float 1.000000e+00, %296
|
||||
962: %298 = tail call fast float @air.fast_clamp.f32(float %297, float 0.000000e+00, float 1.000000e+00) #3
|
||||
963: %299 = insertelement <2 x float> undef, float %298, i64 0
|
||||
964: %300 = shufflevector <2 x float> %299, <2 x float> undef, <2 x i32> zeroinitializer
|
||||
965: %301 = fmul fast <2 x float> %292, %264
|
||||
966: %302 = fmul fast <2 x float> %301, %300
|
||||
967: %303 = fsub fast <2 x float> %267, %302
|
||||
968: %304 = tail call fast <2 x float> @air.fast_clamp.v2f32(<2 x float> %303, <2 x float> zeroinitializer, <2 x float> <float 1.000000e+00, float 1.000000e+00>) #3
|
||||
969: br label %305
|
||||
970:
|
||||
971: 305: ; preds = %286, %266
|
||||
972: %306 = phi <2 x float> [ %304, %286 ], [ %267, %266 ]
|
||||
973: %307 = add nuw nsw i32 %268, 1
|
||||
974: %308 = icmp eq i32 %307, 6
|
||||
975: br i1 %308, label %265, label %266, !llvm.loop !67
|
||||
976:
|
||||
977: 309: ; preds = %265, %251
|
||||
978: %310 = phi <2 x float> [ %306, %265 ], [ %252, %251 ]
|
||||
979: %311 = tail call fast float @air.fast_fabs.f32(float %62) #3
|
||||
980: %312 = fcmp fast ogt float %311, 0x3EB0C6F7A0000000
|
||||
981: br i1 %312, label %313, label %372
|
||||
982:
|
||||
983: 313: ; preds = %309
|
||||
984: %314 = bitcast [6 x <2 x i32>]* %19 to i8*
|
||||
985: call void @llvm.lifetime.start.p0i8(i64 48, i8* nonnull %314) #8
|
||||
986: %315 = getelementptr inbounds [6 x <2 x i32>], [6 x <2 x i32>]* %19, i64 0, i64 0
|
||||
|
||||
1127: 422: ; preds = %383, %372
|
||||
1128: %423 = phi <2 x float> [ %419, %383 ], [ %373, %372 ]
|
||||
1129: %424 = tail call fast float @air.fast_fabs.f32(float %64) #3
|
||||
1130: %425 = fcmp fast ogt float %424, 0x3EB0C6F7A0000000
|
||||
1131: br i1 %425, label %426, label %585
|
||||
1132:
|
||||
1133: 426: ; preds = %422
|
||||
1134: %427 = bitcast [11 x i32]* %21 to i8*
|
||||
1135: call void @llvm.lifetime.start.p0i8(i64 44, i8* nonnull %427) #8
|
||||
1136: %428 = getelementptr inbounds [11 x i32], [11 x i32]* %21, i64 0, i64 0
|
||||
1137: store i32 62, i32* %428, align 4
|
||||
1138: %429 = getelementptr inbounds [11 x i32], [11 x i32]* %21, i64 0, i64 1
|
||||
1139: store i32 63, i32* %429, align 4
|
||||
1140: %430 = getelementptr inbounds [11 x i32], [11 x i32]* %21, i64 0, i64 2
|
||||
1141: store i32 64, i32* %430, align 4
|
||||
1142: %431 = getelementptr inbounds [11 x i32], [11 x i32]* %21, i64 0, i64 3
|
||||
1143: store i32 65, i32* %431, align 4
|
||||
1144: %432 = getelementptr inbounds [11 x i32], [11 x i32]* %21, i64 0, i64 4
|
||||
1145: store i32 66, i32* %432, align 4
|
||||
1146: %433 = getelementptr inbounds [11 x i32], [11 x i32]* %21, i64 0, i64 5
|
||||
1147: store i32 67, i32* %433, align 4
|
||||
1148: %434 = getelementptr inbounds [11 x i32], [11 x i32]* %21, i64 0, i64 6
|
||||
1149: store i32 68, i32* %434, align 4
|
||||
1150: %435 = getelementptr inbounds [11 x i32], [11 x i32]* %21, i64 0, i64 7
|
||||
1151: store i32 69, i32* %435, align 4
|
||||
1152: %436 = getelementptr inbounds [11 x i32], [11 x i32]* %21, i64 0, i64 8
|
||||
1153: store i32 70, i32* %436, align 4
|
||||
1154: %437 = getelementptr inbounds [11 x i32], [11 x i32]* %21, i64 0, i64 9
|
||||
1155: store i32 71, i32* %437, align 4
|
||||
1156: %438 = getelementptr inbounds [11 x i32], [11 x i32]* %21, i64 0, i64 10
|
||||
1157: store i32 72, i32* %438, align 4
|
||||
1158: %439 = add nsw i32 %2, 46
|
||||
1159: %440 = sext i32 %439 to i64
|
||||
1160: %441 = getelementptr inbounds %struct.MSSFaceThinPoint, %struct.MSSFaceThinPoint addrspace(2)* %1, i64 %440, i32 0
|
||||
1161: %442 = load <2 x float>, <2 x float> addrspace(2)* %441, align 8, !tbaa !62
|
||||
1162: %443 = add nsw i32 %2, 48
|
||||
1163: %444 = sext i32 %443 to i64
|
||||
1164: %445 = getelementptr inbounds %struct.MSSFaceThinPoint, %struct.MSSFaceThinPoint addrspace(2)* %1, i64 %444, i32 0
|
||||
1165: %446 = load <2 x float>, <2 x float> addrspace(2)* %445, align 8, !tbaa !62
|
||||
1166: %447 = bitcast [11 x <2 x float>]* %22 to i8*
|
||||
1167: call void @llvm.lifetime.start.p0i8(i64 88, i8* nonnull %447) #8
|
||||
1168: br label %492
|
||||
1169:
|
||||
1170: 448: ; preds = %492
|
||||
1171: %449 = fsub fast <2 x float> %442, %446
|
||||
1172: %450 = extractelement <2 x float> %423, i64 1
|
||||
1173: %451 = extractelement <2 x float> %423, i64 0
|
||||
1174: %452 = getelementptr inbounds [11 x <2 x float>], [11 x <2 x float>]* %22, i64 0, i64 10
|
||||
1175: %453 = load <2 x float>, <2 x float>* %452, align 8, !tbaa !62
|
||||
1176: br label %454
|
||||
1177:
|
||||
1178: 454: ; preds = %484, %448
|
||||
1179: %455 = phi <2 x float> [ %453, %448 ], [ %460, %484 ]
|
||||
1180: %456 = phi i8 [ 0, %448 ], [ %485, %484 ]
|
||||
1181: %457 = phi i32 [ 0, %448 ], [ %486, %484 ]
|
||||
1182: %458 = zext i32 %457 to i64
|
||||
1183: %459 = getelementptr inbounds [11 x <2 x float>], [11 x <2 x float>]* %22, i64 0, i64 %458
|
||||
1184: %460 = load <2 x float>, <2 x float>* %459, align 8, !tbaa !62
|
||||
1185: %461 = extractelement <2 x float> %455, i64 1
|
||||
1186: %462 = extractelement <2 x float> %460, i64 1
|
||||
1187: %463 = fcmp fast ule float %462, %450
|
||||
1188: %464 = fcmp fast ogt float %461, %450
|
||||
1189: %465 = xor i1 %463, %464
|
||||
1190: br i1 %465, label %484, label %466
|
||||
1191:
|
||||
1192: 466: ; preds = %454
|
||||
1193: %467 = fsub fast float %461, %462
|
||||
1194: %468 = tail call fast float @air.fast_fabs.f32(float %467) #3
|
||||
1195: %469 = fcmp fast ugt float %468, 0x3EB0C6F7A0000000
|
||||
1196: %470 = fcmp fast olt float %467, 0.000000e+00
|
||||
1197: %471 = select fast i1 %470, float 0xBEB0C6F7A0000000, float 0x3EB0C6F7A0000000
|
||||
1198: %472 = select i1 %469, float %467, float %471
|
||||
1199: %473 = extractelement <2 x float> %455, i64 0
|
||||
1200: %474 = extractelement <2 x float> %460, i64 0
|
||||
1201: %475 = fsub fast float %473, %474
|
||||
1202: %476 = fsub fast float %450, %462
|
||||
1203: %477 = fmul fast float %475, %476
|
||||
1204: %478 = fdiv fast float %477, %472
|
||||
1205: %479 = fadd fast float %478, %474
|
||||
1206: %480 = fcmp fast olt float %451, %479
|
||||
1207: br i1 %480, label %481, label %484
|
||||
1208:
|
||||
1209: 481: ; preds = %466
|
||||
1210: %482 = and i8 %456, 1
|
||||
1211: %483 = xor i8 %482, 1
|
||||
1212: br label %484
|
||||
1213:
|
||||
1214: 484: ; preds = %481, %466, %454
|
||||
1215: %485 = phi i8 [ %483, %481 ], [ %456, %466 ], [ %456, %454 ]
|
||||
1216: %486 = add nuw nsw i32 %457, 1
|
||||
1217: %487 = icmp eq i32 %486, 11
|
||||
1218: br i1 %487, label %488, label %454, !llvm.loop !70
|
||||
1219:
|
||||
1220: 488: ; preds = %484
|
||||
1221: %489 = getelementptr inbounds [11 x <2 x float>], [11 x <2 x float>]* %22, i64 0, i64 0
|
||||
1222: %490 = and i8 %485, 1
|
||||
1223: %491 = load <2 x float>, <2 x float>* %489, align 8, !tbaa !62
|
||||
1224: br label %506
|
||||
1225:
|
||||
1226: 492: ; preds = %492, %426
|
||||
1227: %493 = phi i32 [ 0, %426 ], [ %502, %492 ]
|
||||
1228: %494 = zext i32 %493 to i64
|
||||
1229: %495 = getelementptr inbounds [11 x i32], [11 x i32]* %21, i64 0, i64 %494
|
||||
1230: %496 = load i32, i32* %495, align 4, !tbaa !53
|
||||
1231: %497 = add nsw i32 %496, %2
|
||||
1232: %498 = sext i32 %497 to i64
|
||||
1233: %499 = getelementptr inbounds %struct.MSSFaceThinPoint, %struct.MSSFaceThinPoint addrspace(2)* %1, i64 %498, i32 0
|
||||
1234: %500 = load <2 x float>, <2 x float> addrspace(2)* %499, align 8, !tbaa !62
|
||||
1235: %501 = getelementptr inbounds [11 x <2 x float>], [11 x <2 x float>]* %22, i64 0, i64 %494
|
||||
1236: store <2 x float> %500, <2 x float>* %501, align 8, !tbaa !62
|
||||
1237: %502 = add nuw nsw i32 %493, 1
|
||||
1238: %503 = icmp eq i32 %502, 11
|
||||
1239: br i1 %503, label %448, label %492, !llvm.loop !71
|
||||
1240:
|
||||
1241: 504: ; preds = %531
|
||||
1242: %505 = icmp eq i8 %490, 0
|
||||
1243: br i1 %505, label %559, label %540
|
||||
1244:
|
||||
1245: 506: ; preds = %531, %488
|
||||
1246: %507 = phi i32 [ 0, %488 ], [ %513, %531 ]
|
||||
1247: %508 = phi <2 x float> [ %491, %488 ], [ %538, %531 ]
|
||||
1248: %509 = phi float [ 1.000000e+01, %488 ], [ %537, %531 ]
|
||||
1249: %510 = zext i32 %507 to i64
|
||||
1250: %511 = getelementptr inbounds [11 x <2 x float>], [11 x <2 x float>]* %22, i64 0, i64 %510
|
||||
1251: %512 = load <2 x float>, <2 x float>* %511, align 8, !tbaa !62
|
||||
1252: %513 = add nuw nsw i32 %507, 1
|
||||
1253: %514 = trunc i32 %513 to i8
|
||||
1254: %515 = urem i8 %514, 11
|
||||
1255: %516 = zext i8 %515 to i64
|
||||
1256: %517 = getelementptr inbounds [11 x <2 x float>], [11 x <2 x float>]* %22, i64 0, i64 %516
|
||||
1257: %518 = load <2 x float>, <2 x float>* %517, align 8, !tbaa !62
|
||||
1258: %519 = fsub fast <2 x float> %518, %512
|
||||
1259: %520 = tail call fast float @air.dot.v2f32(<2 x float> %519, <2 x float> %519) #3
|
||||
1260: %521 = fcmp fast ugt float %520, 0x3EB0C6F7A0000000
|
||||
1261: br i1 %521, label %522, label %531
|
||||
1262:
|
||||
1263: 522: ; preds = %506
|
||||
1264: %523 = fsub fast <2 x float> %423, %512
|
||||
1265: %524 = tail call fast float @air.dot.v2f32(<2 x float> %523, <2 x float> %519) #3
|
||||
1266: %525 = fdiv fast float %524, %520
|
||||
1267: %526 = tail call fast float @air.fast_clamp.f32(float %525, float 0.000000e+00, float 1.000000e+00) #3
|
||||
1268: %527 = insertelement <2 x float> undef, float %526, i64 0
|
||||
1269: %528 = shufflevector <2 x float> %527, <2 x float> undef, <2 x i32> zeroinitializer
|
||||
1270: %529 = fmul fast <2 x float> %528, %519
|
||||
1271: %530 = fadd fast <2 x float> %529, %512
|
||||
1272: br label %531
|
||||
1273:
|
||||
1274: 531: ; preds = %522, %506
|
||||
1275: %532 = phi <2 x float> [ %530, %522 ], [ %512, %506 ]
|
||||
1276: %533 = fsub fast <2 x float> %423, %532
|
||||
1277: %534 = tail call fast float @air.dot.v2f32(<2 x float> %533, <2 x float> %533) #3
|
||||
1278: %535 = tail call fast float @air.fast_sqrt.f32(float %534) #3
|
||||
1279: %536 = fcmp fast olt float %535, %509
|
||||
1280: %537 = select i1 %536, float %535, float %509
|
||||
1281: %538 = select i1 %536, <2 x float> %532, <2 x float> %508
|
||||
1282: %539 = icmp eq i32 %513, 11
|
||||
1283: br i1 %539, label %504, label %506, !llvm.loop !72
|
||||
1284:
|
||||
1285: 540: ; preds = %504
|
||||
1286: %541 = fsub fast <2 x float> <float -0.000000e+00, float -0.000000e+00>, %449
|
||||
1287: %542 = tail call fast float @air.dot.v2f32(<2 x float> %541, <2 x float> %541) #3
|
||||
1288: %543 = tail call fast float @air.fast_sqrt.f32(float %542) #3
|
||||
1289: %544 = fcmp fast ugt float %543, 0x3F1A36E2E0000000
|
||||
1290: br i1 %544, label %545, label %583
|
||||
1291:
|
||||
1292: 545: ; preds = %540
|
||||
1293: %546 = tail call fast float @air.dot.v2f32(<2 x float> zeroinitializer, <2 x float> zeroinitializer) #3
|
||||
1294: %547 = tail call fast float @air.fast_sqrt.f32(float %546) #3
|
||||
1295: %548 = fdiv fast float %547, %543
|
||||
1296: %549 = fsub fast float 1.000000e+00, %548
|
||||
1297: %550 = tail call fast float @air.fast_clamp.f32(float %549, float 0.000000e+00, float 1.000000e+00) #3
|
||||
1298: %551 = insertelement <2 x float> undef, float %550, i64 0
|
||||
1299: %552 = shufflevector <2 x float> %551, <2 x float> undef, <2 x i32> zeroinitializer
|
||||
1300: %553 = insertelement <2 x float> undef, float %64, i64 0
|
||||
1301: %554 = shufflevector <2 x float> %553, <2 x float> undef, <2 x i32> zeroinitializer
|
||||
1302: %555 = fmul fast <2 x float> %449, %554
|
||||
1303: %556 = fmul fast <2 x float> %555, %552
|
||||
1304: %557 = fsub fast <2 x float> %423, %556
|
||||
1305: %558 = tail call fast <2 x float> @air.fast_clamp.v2f32(<2 x float> %557, <2 x float> zeroinitializer, <2 x float> <float 1.000000e+00, float 1.000000e+00>) #3
|
||||
1306: br label %583
|
||||
1307:
|
||||
1308: 559: ; preds = %504
|
||||
1309: %560 = tail call fast float @air.dot.v2f32(<2 x float> %449, <2 x float> %449) #3
|
||||
1310: %561 = tail call fast float @air.fast_sqrt.f32(float %560) #3
|
||||
1311: %562 = fcmp fast olt float %537, %561
|
||||
1312: br i1 %562, label %563, label %583
|
||||
1313:
|
||||
1314: 563: ; preds = %559
|
||||
1315: %564 = fsub fast <2 x float> <float -0.000000e+00, float -0.000000e+00>, %449
|
||||
1316: %565 = tail call fast float @air.dot.v2f32(<2 x float> %564, <2 x float> %564) #3
|
||||
1317: %566 = tail call fast float @air.fast_sqrt.f32(float %565) #3
|
||||
1318: %567 = fcmp fast ugt float %566, 0x3F1A36E2E0000000
|
||||
1319: br i1 %567, label %568, label %583
|
||||
1320:
|
||||
1321: 568: ; preds = %563
|
||||
1322: %569 = fsub fast <2 x float> %423, %538
|
||||
1323: %570 = tail call fast float @air.dot.v2f32(<2 x float> %569, <2 x float> %569) #3
|
||||
1324: %571 = tail call fast float @air.fast_sqrt.f32(float %570) #3
|
||||
1325: %572 = fdiv fast float %571, %566
|
||||
1326: %573 = fsub fast float 1.000000e+00, %572
|
||||
1327: %574 = tail call fast float @air.fast_clamp.f32(float %573, float 0.000000e+00, float 1.000000e+00) #3
|
||||
1328: %575 = insertelement <2 x float> undef, float %574, i64 0
|
||||
1329: %576 = shufflevector <2 x float> %575, <2 x float> undef, <2 x i32> zeroinitializer
|
||||
1330: %577 = insertelement <2 x float> undef, float %64, i64 0
|
||||
1331: %578 = shufflevector <2 x float> %577, <2 x float> undef, <2 x i32> zeroinitializer
|
||||
1332: %579 = fmul fast <2 x float> %449, %578
|
||||
1333: %580 = fmul fast <2 x float> %579, %576
|
||||
1334: %581 = fsub fast <2 x float> %423, %580
|
||||
1335: %582 = tail call fast <2 x float> @air.fast_clamp.v2f32(<2 x float> %581, <2 x float> zeroinitializer, <2 x float> <float 1.000000e+00, float 1.000000e+00>) #3
|
||||
1336: br label %583
|
||||
1337:
|
||||
1338: 583: ; preds = %568, %563, %559, %545, %540
|
||||
1339: %584 = phi <2 x float> [ %423, %559 ], [ %558, %545 ], [ %423, %540 ], [ %582, %568 ], [ %423, %563 ]
|
||||
1340: call void @llvm.lifetime.end.p0i8(i64 88, i8* nonnull %447) #8
|
||||
1341: call void @llvm.lifetime.end.p0i8(i64 44, i8* nonnull %427) #8
|
||||
1342: br label %585
|
||||
1343:
|
||||
1344: 585: ; preds = %583, %422
|
||||
1345: %586 = phi <2 x float> [ %584, %583 ], [ %423, %422 ]
|
||||
1346: %587 = tail call fast float @air.fast_fabs.f32(float %10) #3
|
||||
1347: %588 = fcmp fast ogt float %587, 0x3EB0C6F7A0000000
|
||||
1348: br i1 %588, label %589, label %613
|
||||
|
||||
4634: !27 = !{i32 8, !"air.buffer", !"air.location_index", i32 7, i32 1, !"air.read", !"air.struct_type_info", !28, !"air.arg_type_size", i32 40, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"MSSFaceShapeParams", !"air.arg_name", !"faceShapeParams"}
|
||||
4635: !28 = !{i32 0, i32 4, i32 0, !"float", !"shoulian", i32 4, i32 4, i32 0, !"float", !"zhailian", i32 8, i32 4, i32 0, !"float", !"vlian", i32 12, i32 4, i32 0, !"float", !"xiaegu", i32 16, i32 4, i32 0, !"float", !"quangu", i32 20, i32 4, i32 0, !"float", !"xiaba", i32 24, i32 4, i32 0, !"float", !"duanlian", i32 28, i32 4, i32 0, !"float", !"xiaotou", i32 32, i32 4, i32 0, !"float", !"xiaotoufanwei", i32 36, i32 4, i32 0, !"float", !"dayan"}
|
||||
@@ -0,0 +1,178 @@
|
||||
{
|
||||
"authority": "Static shipped-artifact analysis; original shader not executed. Public Vision76 region mapping reused from slim-pose-report.json.",
|
||||
"target_arm64_sha256": "f01e8c0b7e2676b2961950b0e48efdd2589af218e4b36de7d39f5d1c76852bfb",
|
||||
"air_sha256": "f97705b88f5491057df2117aef457ffca84e11020574cd57742b0670db4484d8",
|
||||
"evidence_ids": {
|
||||
"cpu_constants": "ev_d1b8a49fc62e384710bac234967c3e8cbf7c5127081c9b2c6f6a0bbd80b80967",
|
||||
"cpu_assembly": "ev_8bc31392c07788d2482546121297c3f177d527282275ef21fd3e5edef9921544"
|
||||
},
|
||||
"common": {
|
||||
"uv": "full-image normalized, y down; production stores y up and must convert points and q together",
|
||||
"gain": "clamp(280/max(length((P75-P59)*pixelSize),2*length((P67-(P74+P60)/2)*pixelSize),1),1,2.25)",
|
||||
"original_order": [
|
||||
"thin17",
|
||||
"narrow16",
|
||||
"vFace4",
|
||||
"jaw6",
|
||||
"cheek6",
|
||||
"chin3",
|
||||
"shortPolygon",
|
||||
"smallHead",
|
||||
"bigEye"
|
||||
],
|
||||
"enable_threshold": "abs(effectiveRatio)>1e-6",
|
||||
"per_pin_or_field_result": "clamp(q-newOffset,0,1)"
|
||||
},
|
||||
"jaw": {
|
||||
"struct_field": "xiaegu offset12 / helper parameter6",
|
||||
"ui_range": [
|
||||
0,
|
||||
1
|
||||
],
|
||||
"cpu_scale": 0.05,
|
||||
"constant_address": "0x10005f9a8",
|
||||
"pins_origin_radiusNeighbour_directionAnchor": [
|
||||
[
|
||||
72,
|
||||
71,
|
||||
29
|
||||
],
|
||||
[
|
||||
62,
|
||||
63,
|
||||
29
|
||||
],
|
||||
[
|
||||
71,
|
||||
70,
|
||||
29
|
||||
],
|
||||
[
|
||||
63,
|
||||
64,
|
||||
29
|
||||
],
|
||||
[
|
||||
70,
|
||||
71,
|
||||
29
|
||||
],
|
||||
[
|
||||
64,
|
||||
63,
|
||||
29
|
||||
]
|
||||
],
|
||||
"radius": "length(Porigin-Pneighbour) in UV; skip radius<=.0001",
|
||||
"direction": "P29-Porigin",
|
||||
"weight": "clamp(1-length(q-Porigin)/radius,0,1)",
|
||||
"step": "q=clamp(q-direction*clamp(jaw,0,1)*.05*gain*weight,0,1)",
|
||||
"execution": "6 sequential q updates; each radius uses the second triplet index, unlike thin/chin which use the direction anchor distance",
|
||||
"air_lines": [
|
||||
899,
|
||||
986
|
||||
]
|
||||
},
|
||||
"short": {
|
||||
"struct_field": "duanlian offset24 / helper parameter9",
|
||||
"ui_range": [
|
||||
-1,
|
||||
1
|
||||
],
|
||||
"cpu_scale": 0.25,
|
||||
"constant_address": "0x10005f9e0",
|
||||
"cpu_clamp_min_address": "0x10005f9d0 = -1",
|
||||
"cpu_scaled_min_address": "0x10005f9f0 = -.25",
|
||||
"polygon_indices": [
|
||||
62,
|
||||
63,
|
||||
64,
|
||||
65,
|
||||
66,
|
||||
67,
|
||||
68,
|
||||
69,
|
||||
70,
|
||||
71,
|
||||
72
|
||||
],
|
||||
"polygon_closure": "P72->P62",
|
||||
"axis": "P46-P48 (nose crest region)",
|
||||
"radius": "length(axis) in UV; skip radius<=.0001",
|
||||
"inside": "even-odd point-in-polygon; weight1",
|
||||
"outside": "d=minimum distance to11 closed segments; weight=clamp(1-d/radius,0,1), only when d<radius",
|
||||
"step": "q=clamp(q-axis*clamp(short,-1,1)*.25*gain*weight,0,1)",
|
||||
"nearest_segment_threshold": "squared edge length>1e-6 then project t=clamp(dot(q-A,B-A)/dot(B-A,B-A),0,1); else choose A",
|
||||
"ray_crossing_denominator": "dy if abs(dy)>1e-6 else signed1e-6",
|
||||
"air_lines": [
|
||||
1127,
|
||||
1340
|
||||
]
|
||||
},
|
||||
"implementation": {
|
||||
"source": "beatygril/beatygril/Plugin/PGFaceProcessor.m",
|
||||
"order": [
|
||||
"thin17",
|
||||
"existing analytic narrow/V/cheek/small-head body",
|
||||
"jaw6",
|
||||
"chin3",
|
||||
"shortPolygon",
|
||||
"existing analytic bigEye"
|
||||
],
|
||||
"control_coefficients": {
|
||||
"jaw": 0.05,
|
||||
"short": 0.25
|
||||
},
|
||||
"strength": "Original CPU clamps a common shape strength. Product fixes that multiplier at1 and maps it to no user parameter: PGAmount/s.amount is smoothing strength only and is not used by thin/chin/jaw/short. All4 share the same pixel-size gain. Each shape uses its own control; PGMix is applied independently to the total output later by the host adapter. No new common shape-strength UI is introduced.",
|
||||
"sampling": "All sequential coordinates are evaluated within one CIWarpKernel per face; image and all4 masks share the same method.",
|
||||
"missing_or_invalid76": "Preserve legacy face/archive and other5 analytic controls; skip thin/chin/jaw/short exactly.",
|
||||
"unchanged": "Existing thin17/chin3 index order, constants and formulas remain unchanged.",
|
||||
"source_sha256": "e4122ca95f7ba41bc925b4cc4bf2bf88a72044ea41880cd66acd9c8278a7daf4"
|
||||
},
|
||||
"limits": [
|
||||
"No original target app/shader executed; these are static CPU/AIR observations.",
|
||||
"The complete vendor chain is not reconstructed: narrow/V/cheek/small-head/eye algorithms and their ordering remain project approximations. Isolated jaw/short plus recovered thin/chin ordering is tested.",
|
||||
"No new explicit yaw, pitch, roll or landmark-quality attenuation is inferred. Profile behavior follows detected 2D landmarks, as in the recovered branches.",
|
||||
"Physical PNG checks bypass the host IOSurface adapter. Original vendor pixel equivalence and Motion/FCP1.1.2 runtime acceptance remain unverified.",
|
||||
"Independent public Vision CGImage and CIImage detections differ slightly. Tests allow .025 normalized location difference; eye/temple displacement tests measure the actual GPU inverse field."
|
||||
],
|
||||
"verification": {
|
||||
"core": {
|
||||
"exit_code": 0,
|
||||
"beauty_checks": 49,
|
||||
"face_checks": 116,
|
||||
"slim_checks": 796,
|
||||
"total": 961
|
||||
},
|
||||
"real_frames_asan": {
|
||||
"exit_code": 0,
|
||||
"checks": 886,
|
||||
"frames": [
|
||||
"public NASA astronaut",
|
||||
"local user upright/rolled0s",
|
||||
"local user profile4s"
|
||||
],
|
||||
"diagnostics": []
|
||||
},
|
||||
"max_uv_oracle_error": 1.09828022e-05,
|
||||
"physical_checks": "Public Vision76 lower-contour response, pupil/upper-contour positions beyond support unchanged; separate CGImage Vision point locations cross-check the CIImage production path.",
|
||||
"local_logs": [
|
||||
"build/analysis-jaw-short/core-tests.txt",
|
||||
"build/analysis-jaw-short/real-frames-asan.txt"
|
||||
],
|
||||
"app_built": false,
|
||||
"host_operated": false
|
||||
},
|
||||
"pre_fix_difference": {
|
||||
"source": "PGFaceProcessor.m; PGBeautyRenderer only does appearance",
|
||||
"jaw": "axis-aligned bbox jawBand, .20 multiplier, no radiusNeighbour or lip anchor",
|
||||
"short": "axis-aligned bbox lower field, .16 multiplier, no lower-contour polygon or nose axis",
|
||||
"bounds": "Difference in algorithm is established. It does not by itself prove why a specific installed screenshot looks like temple movement; coordinate/isolated-control localization must be checked in actual image output.",
|
||||
"processor_sha256": "fe4f2a6fc28799cc9b81832baaa2d6739320bde9def175ecc8a4494d004d6b28"
|
||||
},
|
||||
"air_excerpts": {
|
||||
"path": "docs/analysis/short-jaw-air.txt",
|
||||
"sha256": "f4ade84fdb2303515dab7b4d7eca8a9c2241039b9e6428cd51ceffc32b3f6b9b",
|
||||
"formatNote": "Trailing whitespace removed from numbered excerpt; original AIR source SHA remains unchanged."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,401 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"date": "2026-10-21",
|
||||
"request": "最大瘦脸差异与人物转脸时的变形机制",
|
||||
"reference": {
|
||||
"plugin_sha256": "6c5d74bc844a5c5f745718b48ea10ec6635d08aa08a5b6dc6e62653980849f8a",
|
||||
"arm64_sha256": "f01e8c0b7e2676b2961950b0e48efdd2589af218e4b36de7d39f5d1c76852bfb",
|
||||
"metallib_sha256": "4e8c77db8be94ae169337a2e646407f69520b63afb248faa653e0e068237aaae"
|
||||
},
|
||||
"air_observation": {
|
||||
"authority": "static Apple metal-objdump AIR disassembly; not observed shader execution",
|
||||
"command": "xcrun metal-objdump --metallib --disassemble-symbols=faceThinFragmentShader <reference default.metallib>",
|
||||
"full_output_sha256": "f97705b88f5491057df2117aef457ffca84e11020574cd57742b0670db4484d8",
|
||||
"full_output_bytes": 274496,
|
||||
"local_output": "build/pose-analysis/face-thin.air.txt",
|
||||
"module": "faceThinFragmentShader",
|
||||
"module_metallib_offset": "0x5d5e",
|
||||
"function": "mssFaceShapePinCoordinate",
|
||||
"active_branch": "faceShapeParamsActive selects Shape helper; inactive branch alone selects legacy Thin helper",
|
||||
"local_pin_triplets": [
|
||||
[
|
||||
75,
|
||||
74,
|
||||
6
|
||||
],
|
||||
[
|
||||
59,
|
||||
60,
|
||||
13
|
||||
],
|
||||
[
|
||||
74,
|
||||
73,
|
||||
47
|
||||
],
|
||||
[
|
||||
60,
|
||||
61,
|
||||
47
|
||||
],
|
||||
[
|
||||
73,
|
||||
72,
|
||||
47
|
||||
],
|
||||
[
|
||||
61,
|
||||
62,
|
||||
47
|
||||
],
|
||||
[
|
||||
72,
|
||||
71,
|
||||
48
|
||||
],
|
||||
[
|
||||
62,
|
||||
63,
|
||||
48
|
||||
],
|
||||
[
|
||||
71,
|
||||
70,
|
||||
48
|
||||
],
|
||||
[
|
||||
63,
|
||||
64,
|
||||
48
|
||||
],
|
||||
[
|
||||
70,
|
||||
69,
|
||||
49
|
||||
],
|
||||
[
|
||||
64,
|
||||
65,
|
||||
49
|
||||
],
|
||||
[
|
||||
69,
|
||||
68,
|
||||
49
|
||||
],
|
||||
[
|
||||
65,
|
||||
66,
|
||||
49
|
||||
],
|
||||
[
|
||||
68,
|
||||
67,
|
||||
52
|
||||
],
|
||||
[
|
||||
66,
|
||||
67,
|
||||
52
|
||||
],
|
||||
[
|
||||
67,
|
||||
65,
|
||||
47
|
||||
]
|
||||
],
|
||||
"triplet_usage": "first=origin, third=anchor; second unused in thin loop",
|
||||
"thin_cpu_scale": 0.025,
|
||||
"size_gain": "clamp(280/max(length((P75-P59)*imageSize),2*length((P67-(P74+P60)/2)*imageSize),1),1,2.25)",
|
||||
"effective_pin_gain": "clamp(UI thin,0,1) * strengthMultiplier * 0.025 * size_gain",
|
||||
"radius": "length(origin-anchor) in normalized image UV",
|
||||
"falloff": "clamp(1-length(currentSampleCoordinate-origin)/radius,0,1)",
|
||||
"inverse_sample_step": "q = clamp(q-(anchor-origin)*effective_pin_gain*falloff,0,1)",
|
||||
"iteration": "17 sequential updates; not 17 independent offsets evaluated at one original coordinate",
|
||||
"bounded_negative_findings": [
|
||||
"No yaw/roll/pitch input to the checked GPU helpers",
|
||||
"No explicit side-view angle gate in the checked thin branch",
|
||||
"No explicit eye/nose restore mask in the checked thin branch; each single pin has zero weight at its own anchor"
|
||||
],
|
||||
"limits": [
|
||||
"This is a 2D local landmark deformation, not proof of 3D head pose estimation",
|
||||
"Static paths are not a capture of the exact runtime branch used in the supplied screenshots",
|
||||
"Other contour controls include fixed horizontal offsets; not all controls share rotation-equivariant behavior"
|
||||
]
|
||||
},
|
||||
"vision_probe": {
|
||||
"authority": "Independent public Apple Vision / AVFoundation invocation; no reference app or plug-in executed",
|
||||
"script": "scripts/inspect-face-geometry.m",
|
||||
"revision": 3,
|
||||
"constellation": 76,
|
||||
"maximum_dimension": 1280,
|
||||
"coordinate_system": "full-image normalized, y up",
|
||||
"region_indices": {
|
||||
"contour": [
|
||||
59,
|
||||
60,
|
||||
61,
|
||||
62,
|
||||
63,
|
||||
64,
|
||||
65,
|
||||
66,
|
||||
67,
|
||||
68,
|
||||
69,
|
||||
70,
|
||||
71,
|
||||
72,
|
||||
73,
|
||||
74,
|
||||
75
|
||||
],
|
||||
"innerLips": [
|
||||
42,
|
||||
40,
|
||||
43,
|
||||
45,
|
||||
41,
|
||||
44
|
||||
],
|
||||
"leftEye": [
|
||||
0,
|
||||
4,
|
||||
5,
|
||||
1,
|
||||
3,
|
||||
2
|
||||
],
|
||||
"leftPupil": [
|
||||
6
|
||||
],
|
||||
"nose": [
|
||||
47,
|
||||
56,
|
||||
54,
|
||||
53,
|
||||
52,
|
||||
51,
|
||||
50,
|
||||
55
|
||||
],
|
||||
"noseCrest": [
|
||||
46,
|
||||
47,
|
||||
48,
|
||||
49,
|
||||
58,
|
||||
57
|
||||
],
|
||||
"outerLips": [
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
31,
|
||||
32,
|
||||
33,
|
||||
34,
|
||||
35,
|
||||
36,
|
||||
37,
|
||||
38,
|
||||
39,
|
||||
26
|
||||
],
|
||||
"rightEye": [
|
||||
7,
|
||||
11,
|
||||
12,
|
||||
8,
|
||||
10,
|
||||
9
|
||||
],
|
||||
"rightPupil": [
|
||||
13
|
||||
]
|
||||
},
|
||||
"frames": [
|
||||
{
|
||||
"time": 0,
|
||||
"face_count": 1,
|
||||
"all_point_counts": [
|
||||
76
|
||||
],
|
||||
"yaw_radians": [
|
||||
0
|
||||
],
|
||||
"pitch_radians": [
|
||||
null
|
||||
]
|
||||
},
|
||||
{
|
||||
"time": 2,
|
||||
"face_count": 1,
|
||||
"all_point_counts": [
|
||||
76
|
||||
],
|
||||
"yaw_radians": [
|
||||
0.7853981852531433
|
||||
],
|
||||
"pitch_radians": [
|
||||
null
|
||||
]
|
||||
},
|
||||
{
|
||||
"time": 4,
|
||||
"face_count": 1,
|
||||
"all_point_counts": [
|
||||
76
|
||||
],
|
||||
"yaw_radians": [
|
||||
1.5707963705062866
|
||||
],
|
||||
"pitch_radians": [
|
||||
null
|
||||
]
|
||||
},
|
||||
{
|
||||
"time": 6,
|
||||
"face_count": 1,
|
||||
"all_point_counts": [
|
||||
76
|
||||
],
|
||||
"yaw_radians": [
|
||||
0
|
||||
],
|
||||
"pitch_radians": [
|
||||
null
|
||||
]
|
||||
},
|
||||
{
|
||||
"time": 8,
|
||||
"face_count": 1,
|
||||
"all_point_counts": [
|
||||
76
|
||||
],
|
||||
"yaw_radians": [
|
||||
0
|
||||
],
|
||||
"pitch_radians": [
|
||||
null
|
||||
]
|
||||
},
|
||||
{
|
||||
"time": 10,
|
||||
"face_count": 1,
|
||||
"all_point_counts": [
|
||||
76
|
||||
],
|
||||
"yaw_radians": [
|
||||
0
|
||||
],
|
||||
"pitch_radians": [
|
||||
null
|
||||
]
|
||||
},
|
||||
{
|
||||
"time": 12,
|
||||
"face_count": 1,
|
||||
"all_point_counts": [
|
||||
76
|
||||
],
|
||||
"yaw_radians": [
|
||||
0
|
||||
],
|
||||
"pitch_radians": [
|
||||
null
|
||||
]
|
||||
},
|
||||
{
|
||||
"time": 14,
|
||||
"face_count": 1,
|
||||
"all_point_counts": [
|
||||
76
|
||||
],
|
||||
"yaw_radians": [
|
||||
0
|
||||
],
|
||||
"pitch_radians": [
|
||||
null
|
||||
]
|
||||
},
|
||||
{
|
||||
"time": 16,
|
||||
"face_count": 1,
|
||||
"all_point_counts": [
|
||||
76
|
||||
],
|
||||
"yaw_radians": [
|
||||
0
|
||||
],
|
||||
"pitch_radians": [
|
||||
null
|
||||
]
|
||||
},
|
||||
{
|
||||
"time": 18,
|
||||
"face_count": 1,
|
||||
"all_point_counts": [
|
||||
76
|
||||
],
|
||||
"yaw_radians": [
|
||||
1.5707963705062866
|
||||
],
|
||||
"pitch_radians": [
|
||||
null
|
||||
]
|
||||
},
|
||||
{
|
||||
"time": 20,
|
||||
"face_count": 1,
|
||||
"all_point_counts": [
|
||||
76
|
||||
],
|
||||
"yaw_radians": [
|
||||
0.7853981852531433
|
||||
],
|
||||
"pitch_radians": [
|
||||
null
|
||||
]
|
||||
}
|
||||
],
|
||||
"result": "All 11 sampled frames returned one face and 76 points; 4s/18s reported yaw approx pi/2; pitch unavailable",
|
||||
"privacy": "Source frames, complete landmarks and source path remain ignored under build/pose-analysis/vision and are not included in Git"
|
||||
},
|
||||
"reconstruction_baseline": {
|
||||
"commit": "e03e460a9b3e5ad489aad24095485ba10ceb987d",
|
||||
"installed_version": "1.0.4 (6)",
|
||||
"root_causes": [
|
||||
"thin deformation uses bounding box x/y/size rather than saved contour/nose points",
|
||||
"horizontal symmetric inverse warp is applied at full strength for any valid box",
|
||||
"no contour/landmark completeness guard or pose metadata preservation",
|
||||
"fixed coefficients do not match reference local-pin scaling"
|
||||
],
|
||||
"direction_check": "Positive thin samples outward and moves image features inward; the sign is not reversed",
|
||||
"test_gap": "Existing geometry tests establish pixel changes, extent and persistence, not reference likeness or profile shape preservation"
|
||||
},
|
||||
"checklist": {
|
||||
"why_maximum_slim_differs": "answered: different geometric model, locality and effective strength",
|
||||
"how_profile_is_handled": "answered within checked active thin path: projected 2D landmarks, local directions/radii; no established explicit yaw gate",
|
||||
"full_native_visual_equivalence": "unverified; screenshots are not a synchronized isolated-parameter capture",
|
||||
"product_fix": "not changed by this analysis; installed 1.0.4 retains the reported issue"
|
||||
},
|
||||
"host_boundary": "User controls Motion/FCP; no UI interaction, host shutdown, app install or plug-in replacement in this analysis.",
|
||||
"followup_implementation": {
|
||||
"version": "1.0.5 (7)",
|
||||
"signed_source_commit": "abe97ed0cbd5a2b5ffda6ebdb486d3bff9170964",
|
||||
"status": "signed_notarized_installed_user_visual_qa_pending",
|
||||
"landmarks": "explicit revision3 / 76 constellation, points76 persisted and stabilized",
|
||||
"warp": "17 sequential UV pins, .025 * pixel-size gain, original thin bbox term removed",
|
||||
"offline_checks": 604,
|
||||
"extra_real_video_asan_checks": 264,
|
||||
"real_video_frames": 11,
|
||||
"max_uv_oracle_error": 1.09828022e-05,
|
||||
"limitations": [
|
||||
"Other eight controls retain prior approximations",
|
||||
"Fast multi-face overlapping resampling order is not equivalent to the original single fragment",
|
||||
"Full native Motion/FCP visual comparison reserved for user"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
# 下巴控制与图像坐标核对
|
||||
|
||||
2026-10-21,接用户反馈“调整下巴却调整眼睛”。本轮不操作、启动或退出Motion/FCP。以已保存的原版AIR和新REA CPU汇编/常量证据继续分析;没有执行原版或复制其二进制到产品。
|
||||
|
||||
## 已确认的下巴差异
|
||||
|
||||
参数发布、PGChin=24、settings.faceChin与GPU参数位置没有串到大眼。1.0.5的下巴仍用脸框高斯场,存在两项错误:作用范围延伸到嘴部甚至眼睑,下巴正负方向与原版相反。独立真实照片上,旧公式的最大位移出现在嘴附近;侧脸真实下巴位移接近零。这些结论来自离屏照片/坐标场探针,不能代替实际宿主当帧诊断。
|
||||
|
||||
原版`0x1000279f4`汇编将下巴滑块约束到[-1,1],正值乘0.04、负值乘0.02,写入脸型结构第5项(byte offset20);常量位于`0x10005f9c0`。REA记录:`ev_8bc31392c07788d2482546121297c3f177d527282275ef21fd3e5edef9921544`与`ev_640ccb714c5ce00d3864844af319fc574d223810dde08443d2ef2e8f1e989c47`,完整小型证据包见[rea-chin.json](rea-chin.json)。原件身份与上一轮一致,arm64切片SHA-256为`f01e8c0b7e2676b2961950b0e48efdd2589af218e4b36de7d39f5d1c76852bfb`。
|
||||
|
||||
`mssFaceShapePinCoordinate`的AIR分支读取第5项及共同尺寸增益,顺序执行68→38、67→37、66→36三组局部采样位移。独立Vision区域核对:66/67/68在下巴轮廓,36/37/38在下唇。其半径、线性衰减、逐步clamp与17组瘦脸相同;支持负值。视觉正值缩短下巴、负值拉长,方向随下巴→嘴唇向量变化,不固定沿画面Y轴。细节和边界见[机器报告](chin-report.json)。
|
||||
|
||||
## 修正与测试
|
||||
|
||||
已移除旧下巴高斯项,改用原版三组点、正负系数、尺寸增益。完整76点缺失或不合法时跳过下巴,避免旧档案使用猜测框位置;其他七类脸型控制仍是现有近似实现,组合顺序未宣称全部恢复。
|
||||
|
||||
核心回归559项通过:美化49、人脸116、瘦脸/下巴394。新增正负下巴、半强度、左右侧脸投影、歪头、三种宽高比、非零原点、瘦脸叠加、坏点与旧档案保护。独立double采样场最大UV误差1.09828022e-5。真实NASA人像额外检查下巴位移、正负向量符号和两侧瞳孔保持不动;以坐标位移判定,避免只检查“像素有改变”。
|
||||
|
||||
## 图像适配层待核对项
|
||||
|
||||
纯CI图像中,76点落在真实瞳孔和下巴,没有全局Y轴反置。但FxPlug适配层曾根据imageOrigin在输入、输出各翻转一次。以相同物理top-first照片字节离屏构造TOP_LEFT输入输出时,旧代码默认直通仍精确一致,却能复现下巴作用到眼部的现象;这说明直通测试无法排除中间处理倒置。
|
||||
|
||||
imageOrigin描述坐标轴方向,不能单凭枚举推断IOSurface的物理行序。原版render主入口包装CIImage后仅见正尺度和位移,仍需核对其输出helper,不能仅凭主函数的有界检索宣称原版整个链条无翻转。原生FCP本次实际缓冲行序未捕获,最后视觉交由用户自测。临时照片、完整人脸坐标和探针输出均留在被忽略的build目录。
|
||||
|
||||
## 原版输出链闭环与适配修复
|
||||
|
||||
继续REA分析两个输出helper后,确认主入口所见的无额外翻转不是仅靠字符串缺失作出的猜测:
|
||||
|
||||
- `0x10002911c`直接调用`CIContext render:toIOSurface:bounds:colorSpace:`,没有修改图像方向。证据`ev_88a71ec62fade296495f1e3f5428cdb15ad4cda43866e09fb040fa3a4bdb0440`。
|
||||
- `0x1000291b4`备用路径先render到BGRA8/RGBAh/RGBAf位图,再按源、目的行步长同时正向递增复制到IOSurface,没有倒行。证据`ev_110d76f7958decb0c56b7daafe292d60a8bc56cd035b40a997f61395cb91ebfe`,另有汇编交叉核对。完整记录见[rea-image-orientation.json](rea-image-orientation.json)。
|
||||
|
||||
已移除我们输入/输出两处基于TOP_LEFT的额外翻转,保持与原版同类CI→IOSurface路径一致。独立探针在相同物理top-first字节下验证默认/大眼/下巴正负×四种源/目的标签共16组,全部与upright CI参考逐字节一致;旧代码在相同构造下出现下巴到眼部的热点,且默认直通0误差不能揭示内部倒置。这里验证的是物理缓冲构造与修复链,未捕获本次实际FCP缓冲。
|
||||
|
||||
Apple[FxImageOrigin](https://developer.apple.com/documentation/professional_video_applications/fximageorigin)和本机SDK说明其描述坐标轴方向;[FxPlug渲染说明](https://developer.apple.com/documentation/professional-video-applications/rendering-in-fxplug)确认FxPlug4经IOSurface传入图像。文档本身未规定每个宿主的物理行序,本次改动依据为原版链和独立物理测试,不能把文档扩张成原生内存捕获。
|
||||
|
||||
旧档案没有记录图像适配坐标契约,无法安全判断是否由旧翻转链产生。adapter现为新分析结果加`hostCoordinateSpace=iosurface-ci-y-up-v1`;未标记记录保留原字符串,渲染和续分析均不载入旧坐标。当前目标暂用实时跟随,新分析后恢复离线记录。不改通用PGFaceProcessor的旧档案读取能力,也不把用户记录直接删除或静默改写成新坐标。
|
||||
|
||||
独立生理热点检查:NASA、实际素材0秒、4秒侧脸三张图均在真实下巴1.2–2.9像素内获得最大位移,实际下巴正值上收、负值延伸,双瞳孔采样位移不超过0.00003像素;12项专项检查通过。另同一素材11帧共494项瘦脸/下巴ASan检查通过,含重复基础用例,不与完整回归简单相加。用户照片、帧及完整点位均没有入库。
|
||||
|
||||
## 新回归的负控
|
||||
|
||||
在临时副本只恢复旧的输入/输出翻转、保留已修正三pin后,120项解剖子测试产生30个预期失败:混合原点标签出现方向错误,TOP/TOP默认仍0误差,但大眼最大差66/255、下巴正值52/255、负值21/255,均被独立参考和跨标签逐字节一致性检出。此时三pin下巴热点仍在下巴,因为点驱动形变可随图像反射;“眼部热点”是此前旧高斯下巴与额外翻转共同构成的反例,二者不能混为同一代码状态。正式当前实现247项宿主适配ASan检查全部通过。
|
||||
@@ -0,0 +1,37 @@
|
||||
# 2.4.0 面板参数迁移
|
||||
|
||||
2026-10-22(Asia/Shanghai)。用户通过截图纠正原需求:迁移新版面板参数,并非新增身体瘦身。此前[瘦身目标核对](瘦身迁移目标核对.md)保留为历史调查;本次继续工作使用 `codex/new-beauty-controls`,不再等待其他目标包。
|
||||
|
||||
## 参考与证据
|
||||
|
||||
目标:`/Users/dayu/Downloads/MSE18V2.app`,2.4.0 / 20260724150000;插件通用二进制 SHA-256:`577303e0de72e07feb576c882e82382b3f056b023a7e987d990ffb37f6b16109`;arm64 切片:`afc71d0d21fd3c1ca95ca745ddafcd729e36ad95f17d8638009f2e45d9b7e8df`。分析使用 Ghidra 12.1.4 与只读 Mach-O 元数据/反汇编,原文件未改。
|
||||
|
||||
| 参考面板 | 目标字段/转换 | 本项目入口 |
|
||||
| --- | --- | --- |
|
||||
| 磨皮程度 | ID12 → midtoneDetail,直接 0–100% | 保留 PGMidtone 12,调整名称 |
|
||||
| 微细锐化 | ID4 → sharpness,局部细节恢复 | 新 PGMicroDetail 77;原全局锐化 4 留在更多设置 |
|
||||
| 五官保护 | ID30 → featureProtectionRelease = 1 − UI;旧 bool 随 release 接近 1 而关闭 | 新 PGFeatureProtectionAmount 75,直接保护量;旧 bool 30 保留类型与读取 |
|
||||
| 非肤色区保护 | ID17 → highPassDetail = 1 − UI;新主路径用于肤色蒙版扩展 | 新 PGNonSkinProtection 76;原独立全局磨皮 17 留在更多设置 |
|
||||
| 白牙、检测框预览、多人及脸型 | 截图中的这些项已经存在 | 保留;检测框名称调整、多人模式增加提示 |
|
||||
|
||||
两个新保护量默认为 100%,微细锐化默认为 0%。内部使用直接保护量,不直接复用参考包的反向 release 数值。
|
||||
|
||||
`setFloatValue:parameterID:minValue:maxValue:`(`0x1000116d8`)分别反转 17/30 的输入;Evidence:`ev_1fb7d2361dabf814edd6f22d217265b63efa9af24739741772ad5f579e0c67e3`。`valuesForControlPanelValue:` 返回相应原始字段;Evidence:`ev_20da8abf4eb5101b0902627255c643a783b7a15337aa4a757820ab71616f33e7`。显示格式 `strength` 是直接乘 100,只有 `protectionInverse` 格式自身反转;17/30 在绘制与交互同步时提前反转,不能把所有 strength 控制都解释为反向。格式函数汇编 Evidence:`ev_8e2a143f81d173c7643ecee2f1dac4a02145edbf82f113c8a48271428baf747c`。
|
||||
|
||||
目标原生处理入口 `applySkinSmoothingToImage:…`(`0x1000358d8`)把 params+0x50 用于非肤色参与,把 params+0x48 用于五官保护释放。Evidence:`ev_34eb4fe26dbaed9fc37d664d9363db903339c1447b6cd7fdb1980dcd61e99572`。可读 CI 内核字符串建立两个关键关系:肤色蒙版向白色线性扩展;保护蒙版与未保护蒙版按 release 线性混合。细节恢复使用原画与低频图的差,并受局部蒙版和亮度/纹理门控。字符串证据:`ev_d02bfe8046953e9287bd46c5403e6585354a5aa6df782a775d6a6fd0d96f1d62`。这里只记录公式和含义,不提交目标模型、metallib 或资源。
|
||||
|
||||
## 实施与兼容
|
||||
|
||||
本项目继续使用自研 Vision 几何蒙版与 Core Image 管线。新的平滑支持蒙版通过现有未保护/已保护覆盖率恢复五官衰减比例,再对非肤色区域扩展;两个控制独立于曝光/肤色蒙版。默认 100%/100% 直接沿用原覆盖路径。微细锐化在局部支持区域恢复亮度细节与少量色彩细节,可在磨皮量为零时独立使用。
|
||||
|
||||
原目标的语义蒙版、特征形状、纹理处理和复杂组合尚未全链对齐,因此本次是参数含义、连续控制和对应局部处理的迁移,不表示整个新版已逐像素复刻。旧版全局磨皮/全局锐化仍可通过更多设置使用,不与新保护项偷换含义;历史工程保留原强度。
|
||||
|
||||
PGBeautySettings v2 尾部增加三个 float,保留 v1 的 160 字节前缀。解码只接受 v1+160 字节或 v2+新完整长度;旧状态补中性默认值。PGInspectorState 仍使用 schema 1 数值字典,旧 bool 30 迁移到缺失的 75,新数值存在时优先采用新值。面板提交先保存权威对象 210,成功后再镜像旧 bool;每次拖动步进仍使用独立宿主 action。
|
||||
|
||||
模板继续发布原 210 对象与两项署名。新隐藏参数由插件注册和缺省值补齐,原 `.moef` 字节未改,无须覆盖用户模板。固定 Bundle ID、滤镜 UUID、安装路径及宣传资源不变。
|
||||
|
||||
## 验证
|
||||
|
||||
最终通过 1636 项:Beauty 57、Face 116、几何 796、宿主适配 ASan 341、OSC ASan 98、Inspector ASan 228(其中 1 项为可选离屏 PNG 输出)。新增检查包含保护量 0/50/100 的像素响应、非肤色保护只改变局部磨皮支持、微细锐化区域、颜色覆盖隔离、v1 状态迁移与错误长度拒绝、新滑杆归档/插值/输入/重置/旁路/主开关、松手前中间状态发布。离屏 AppKit 面板在多种宽度检查;原生宿主视觉验收需另记实际结果。
|
||||
|
||||
完整 REA 证据仅在忽略的 `build/body-analysis/new-controls-evidence.json`。本文保留目标身份、入口、公式与边界,恢复构建不依赖该本地调查目录。
|
||||
@@ -0,0 +1,53 @@
|
||||
# 瘦身迁移:目标版本核对
|
||||
|
||||
核对日期:2026-10-22(Asia/Shanghai)。开发分支:`codex/body-slimming`;源码基线:`13821366a5baee9beea40972118d7fe634b5c735`。
|
||||
|
||||
**后续已澄清**:用户通过截图确认记错了,实际需求是迁移新增面板参数。后续以[新版磨皮参数迁移](新版磨皮参数迁移.md)为准,下面保留纠正前的有界调查结论,不再表示当前等待其他插件包。
|
||||
|
||||
## 当前结果
|
||||
|
||||
用户指定的新目标为 `/Users/dayu/Downloads/MSE18V2.app`。已读取项目交接并检查目标包,**尚未定位到可迁移的新增“瘦身”板块**。当前只完成目标核对与接入点调查,未修改产品源码、模板或正式安装的 1.2.0 APP,未编译或执行目标程序。
|
||||
|
||||
接续时先请用户确认瘦身控制的具体名称、面板画面或包含该功能的目标包路径。不能把现有“瘦脸”误当作“瘦身”,也不能自行设计身体变形后称为已迁移原版算法。
|
||||
|
||||
## 目标身份
|
||||
|
||||
| 项目 | 新下载目标 | 旧安装参考 |
|
||||
| --- | --- | --- |
|
||||
| APP 路径 | `/Users/dayu/Downloads/MSE18V2.app` | `/Applications/MSE18V2.app` |
|
||||
| 外层与插件版本 | `2.4.0` / `20260724150000` | `1.0.20260617-170517` / `20260617170517` |
|
||||
| 插件 Bundle ID | `com.ms.plugins.mse18v2` | `com.ms.plugins.mse18v2` |
|
||||
| 插件通用二进制 SHA-256 | `577303e0de72e07feb576c882e82382b3f056b023a7e987d990ffb37f6b16109` | `6c5d74bc844a5c5f745718b48ea10ec6635d08aa08a5b6dc6e62653980849f8a` |
|
||||
|
||||
新插件 arm64 切片 SHA-256:`afc71d0d21fd3c1ca95ca745ddafcd729e36ad95f17d8638009f2e45d9b7e8df`。插件二进制位于各 APP 的 `Contents/PlugIns/MSE18V2.pluginkit/Contents/MacOS/MSE18V2`。
|
||||
|
||||
## 已观察证据与范围
|
||||
|
||||
- 对新旧包的外层和插件、arm64 与 x86_64 切片,静态检查 `__ustring`、`__cstring`、`__objc_methname`、`__objc_classname`。在这些段内未发现“瘦身、瘦腰、瘦腿、身体”及对应 body/slim/waist/slender/stretch/shoushen 功能命名。可读板块仍为磨皮、美白、瘦脸;新包另有“预览设置、肤色范围、非肤色区保护”等文字。这是有界字符串检查,不能排除动态生成或其他未解释数据。
|
||||
- 新插件 arm64 的 Ghidra 参数注册函数 `MSSuperSkinSmoothingPlugIn::addParametersWithError:`(`0x10001fc10`)注册面板 210、磨皮/肤色/现有脸型参数和三模块开关,所见注册列表没有身体参数。Evidence:`ev_4d3e7e7dc8aa21347adbd0f0847fab13e8b69462bd5e6adf3657cbc0c1998266`。
|
||||
- 面板值类的方法包括 `faceThin`、`faceNarrow`、`faceChin`、`faceJaw`、`faceSmallHead` 等,以及 skin/tone/face 三个模块开关。过程名称搜索没有返回身体变形入口;不能由名称负结果断言所有匿名函数均不存在身体算法。Evidence:`ev_446e4a969ff46db0600fe15988d0f396f394641aaeac760d6372a0c0509bf177`、`ev_157df22ee7802216f3581c9842a9629c69ee66097db068b825695bdfd99385d1`。
|
||||
- 所见几何 GPU 管线仍为 `faceThin*`;新旧 metallib 的 12 个命名函数集合相同。文件变大不能证明新增身体算法,也不能由相同函数名断言函数内容相同。
|
||||
- REA 对提供者已定义字符串对象的搜索只返回无关的 `URLRequest.httpBody`。Ghidra 未在该搜索中解码中文 UTF-16 常量,因此中文检查另使用实际 Mach-O 字节,未把 REA 空结果当作整个包不含中文的证据。Evidence:`ev_015a585ce5565d874f5b55af0c363bed634f09a29088ef660d3ca1c547626c26`。
|
||||
|
||||
REA 使用 Ghidra 12.1.4。通用 Mach-O 不支持该提供者直接选架构,故只读提取 arm64 切片分析。会话已关闭;切片、完整证据和快照仅保存在忽略的 `build/body-analysis/`,不作为构建或远端恢复依赖,不上传原版 APP、模型或 metallib。上述地址与 Evidence ID 仅对应本次 SHA,目标改变后需重新核对。
|
||||
|
||||
## 已完成与待定事项
|
||||
|
||||
| 问题 | 状态 |
|
||||
| --- | --- |
|
||||
| 项目交接、Git 基线、现有正式安装身份 | 已核对,产品源码未改 |
|
||||
| 新下载包身份及与旧包差异 | 已核对;确为不同内容 |
|
||||
| 新增瘦身控制、默认值、范围、画布操作 | 未定位,需确认正确目标 |
|
||||
| 身体算法、处理顺序、跟随与蒙版行为 | 未建立证据,未实施 |
|
||||
| 产品编译、回归、签名、公证、安装 | 本次未执行 |
|
||||
|
||||
## 确认目标后的接入提示
|
||||
|
||||
现有工程只有人脸几何,新增身体效果应有独立状态与总开关,不能依赖人脸检测成功。具体控制数量、范围、算法和顺序以正确目标的证据为准。
|
||||
|
||||
- `PGInspectorState.m` 的描述表同时驱动面板、归档和插值。保留参数 210 及既有 ID;数值字典缺失项会补默认值。新增卡片时,`PGInspectorView.m` 需按 section 识别“更多设置”,不能继续依赖 `index==3`。
|
||||
- `PGBeautySettings` 当前是 160 字节 v1 裸结构体。若追加字段,应保留旧前缀并明确接受旧版本/长度组合,补齐新默认值;同步修改宿主解码,拒绝截断、超长或未知版本。不要只更改 `sizeof` 检查。
|
||||
- OSC 必须同步完整面板对象 210,单写隐藏参数会被已编辑的面板状态覆盖。OSC 回调使用宿主已建立的参数上下文,不能套用面板的 `startAction/endAction` 路径;保留原选脸 ID 和 UUID。
|
||||
- 身体变形需核对与外观处理、四类蒙版及整体混合的先后关系;验证无人脸、非零 extent、原点标签、极端参数、旧归档、撤销、连续拖动与保存重开。
|
||||
|
||||
本次分支基线已在 `origin` 和 `github` 读回核验。两端的最新研究记录以当前分支引用为准;尚无瘦身功能交付标签。
|
||||
@@ -0,0 +1,39 @@
|
||||
# 短脸与下颌骨局部变形
|
||||
|
||||
本次将短脸与下颌骨从包围框近似场替换为目标产物中恢复的76点局部场。几何实现在`PGFaceProcessor.m`;`PGBeautyRenderer.m`负责外观,不是这次位置问题的修改点。
|
||||
|
||||
证据是目标ARM64二进制的只读CPU汇编、常量字节与已有Apple metal-objdump AIR。未运行原版APP或shader,未操作Motion/FCP。CPU证据见`rea-jaw-short.json`,带原始行号的GPU IR见`short-jaw-air.txt`,推导及来源摘要见`short-jaw-report.json`。
|
||||
|
||||
## 确认的规则
|
||||
|
||||
两项共用像素尺寸增益:
|
||||
|
||||
`gain = clamp(280 / max(|(P75-P59)*imageSize|, 2*|(P67-(P74+P60)/2)*imageSize|, 1), 1, 2.25)`。
|
||||
|
||||
距离为UV时,点与采样坐标统一采用全图归一化、Y向下;像素增益另用实际渲染宽高计算。产品内部76点采用Y向上,因此在同一个kernel中统一转换,未改宿主图像方向。
|
||||
|
||||
下颌骨按顺序使用六组`(origin, radiusNeighbour, directionAnchor)`:
|
||||
|
||||
`(72,71,29), (62,63,29), (71,70,29), (63,64,29), (70,71,29), (64,63,29)`。
|
||||
|
||||
半径是前两点的相邻轮廓距离,方向是`P29-origin`。每步令`weight=clamp(1-|q-origin|/radius,0,1)`,再依次更新`q=clamp(q-direction*ratio*weight,0,1)`。`ratio=clamp(jaw,0,1)*0.05*gain`。不能把半径替换为到嘴锚点的距离,也不能将六步合并为在同一原始坐标上求和。
|
||||
|
||||
短脸使用`P62...P72`构成的11边闭合下半脸区域。内部权重为1;外部权重按到最近线段的UV距离线性下降,在距离达到`|P46-P48|`时为0。位移轴为`P46-P48`(公开Vision的鼻梁点区域),`ratio=clamp(short,-1,1)*0.25*gain`,采样更新`q=clamp(q-axis*ratio*weight,0,1)`。正值的可见运动沿鼻梁方向收短,负值延长。半径不超过`0.0001`时跳过;线段投影的平方长度门限为`0.000001`。
|
||||
|
||||
CPU字节证据ID:`ev_d1b8a49fc62e384710bac234967c3e8cbf7c5127081c9b2c6f6a0bbd80b80967`。`0x10005f9a8`的double值为`0.05`;`0x10005f9e0`为`0.25`,`0x10005f9d0`和`0x10005f9f0`分别是短脸下限`-1`与缩放后下限`-0.25`。汇编ID:`ev_8bc31392c07788d2482546121297c3f177d527282275ef21fd3e5edef9921544`。结构字段`xiaegu`偏移12、`duanlian`偏移24,结合CPU写入与AIR读取顺序确认映射。
|
||||
|
||||
## 产品改动及边界
|
||||
|
||||
移除旧`jaw*0.20*jawBand`和`-shortFace*0.16*lower`。保留瘦脸17步、下巴3步的点位、系数和数学,新的局部顺序为`jaw6 → chin3 → short polygon`,仍在同一个CIWarpKernel内更新采样坐标,对每张输入图像或蒙版,每张脸仅进行一次重采样。图像、磨皮/肤色/牙齿/眼睛四张蒙版调用同一变形路径。没有完整合法76点时,这四项恢复算法安全直通;旧记录、其他参数和离线归档继续可读。
|
||||
|
||||
原版完整顺序为`thin → narrow → V → jaw → cheek → chin → short → small-head → eyes`。产品其余五项仍采用原有近似body/眼睛场:body先于jaw,故组合全链不宣称原版等价。原版CPU另接受共同形变强度;本产品该乘数固定为1,未映射到任何用户参数。`PGAmount`/`s.amount`仅表示磨皮强度,不参与thin/chin/jaw/short比例;四项共用同一像素尺寸gain。用户分别调节各项脸型值,最终`PGMix`由宿主适配器独立混合总输出。没有新增共同形变强度控制,以保持磨皮、美白和脸型卡片各自的含义。这里没有证实或添加3D姿态识别、yaw衰减或五官恢复锁定。
|
||||
|
||||
旧算法与原版不同是确定事实;单凭静态代码,不能替某张已安装宿主画面的“太阳穴变化”断言唯一原因。下述位置验证针对真实PNG,宿主适配和原生交互由父任务验收。
|
||||
|
||||
## 验证
|
||||
|
||||
`scripts/test.sh`:Beauty49、Face116、Slim796,共961项通过。旧394项thin/chin测试保留;新增独立double oracle从上述AIR规则写成,比较实际GPU坐标场,最大UV误差`1.09828022e-05`。覆盖非零extent、横竖画幅、侧脸投影与roll、正负短脸、小脸增益上限、相邻轮廓半径反例、组合顺序、缺失/非法76点和四张蒙版一致性。
|
||||
|
||||
ASan专项以NASA公开肖像及本地用户正面/侧脸帧运行:886项通过,无ASan诊断。独立CGImage Vision请求对照了瞳孔、嘴唇、鼻梁和上下轮廓索引,防止与生产CIImage路径共用一次Y翻转假设。实际GPU采样场确认下半脸有响应,处于支持域外的瞳孔和上部轮廓位置不响应。
|
||||
|
||||
用户帧、完整坐标和测试构建只留在忽略的`build/`目录,不进入证据文件。上述不代表原版逐像素一致,也未替代新版本Motion/FCP原生验收;本次未构建APP、安装或提交。
|
||||
@@ -0,0 +1,86 @@
|
||||
# 最大瘦脸与转脸变形分析
|
||||
|
||||
2026-10-21。用户已反馈自动跟随正常;本次检查四张实测图指出的脸型差异。当前安装版仍为1.0.4(6),本次没有修改产品变形代码、替换APP或操作Motion/FCP。
|
||||
|
||||
## 结论
|
||||
|
||||
我们的瘦脸按矩形脸框建立左右对称的水平收缩场;原版主要瘦脸路径根据完整二维面部关键点,顺序执行17组局部位移。两者的作用范围、方向和强度定义均不同。侧脸继续使用正面矩形场,是当前鼻尖、下巴和邻近区域异常变形的直接原因;跟踪框跟对人不能解决这个问题。
|
||||
|
||||
原版已检查的瘦脸路径没有读取yaw/roll/pitch后切换侧脸算法,也没有专门的侧脸角度衰减。它每帧获得随姿态变化的二维轮廓与鼻部位置,让局部收缩方向和作用半径随这些点变化。这属于二维关键点自适应,不能表述成已恢复完整3D姿态估计。
|
||||
|
||||
## 原版证据链
|
||||
|
||||
只读目标与上一轮一致:插件原件SHA-256为`6c5d74bc844a5c5f745718b48ea10ec6635d08aa08a5b6dc6e62653980849f8a`;arm64分析切片为`f01e8c0b7e2676b2961950b0e48efdd2589af218e4b36de7d39f5d1c76852bfb`。本次开始后重新计算原件摘要,未发生变化。Metal库摘要为`4e8c77db8be94ae169337a2e646407f69520b63afb248faa653e0e068237aaae`。
|
||||
|
||||
|步骤|直接静态观察|REA Evidence|
|
||||
|---|---|---|
|
||||
|检测设置|`0x100016a3c`优先配置Vision revision 3及76点constellation;不支持时存在旧revision回退|`ev_02f734a0d72f1b7b77a3112d1de297b9e99ea43d5377349e6eebb71ab017d650`|
|
||||
|当前帧检测|`cachedFaceObservations…`发起`VNDetectFaceLandmarksRequest`,另有重试与缓存|`ev_61ea8c6e7117f18e47fe6cf820c9ec0a59865dedaf3d9c09813be0a5bd7a79bc`|
|
||||
|有效点筛选|`0x1000230cc`要求至少76点;`0x100022c70`转换76点并添加第77个中心点;`0x100017cd8`检查有限数值、空间范围及轮廓分布|`ev_63bb7c8fb07dbe456027f4d4e6be52118338b91ab39dbf9ed6620de9090bc260`、`ev_5f27f174c793c94cd45219d6c405e6b54b96e2650c7462ccc5eeaea14f2604c3`、`ev_1c62b4dab3cf8b661eb5c31b034a0b3cadf9f1f6cb512aace8b3b0838bc74b5c`|
|
||||
|输入几何|`0x1000274d0`打包77个float2,616字节,转换到输出纹理坐标并检查越界点/轮廓尺度|`ev_8a33a7bb27a1a966f9e4ee26380501f1cb009d7d4665ed93b73bd3f630436556`|
|
||||
|参数缩放|`0x1000279f4`将瘦脸滑块值乘0.025及渲染强度,写入十float脸型结构的第一项|`ev_449e1fc8883b8afe27240f672f98f300d4132ac4994db5e1590a4f7ca4e21278`|
|
||||
|GPU连接|`FxMTLDeviceCacheItem::initWithDevice:pixelFormat:`将`faceThinFragmentShader`接入瘦脸pipeline;`0x100027d38/0x10002807c`上传点阵、数量及脸型参数到该pipeline|`ev_1520c2d83845004994f2be940c8c5ea3f4a62daf2d8e3e06278f381ffca1a010`、`ev_dc4487de4891c4a663dab370f2e207799bec7e2ad305a98a1ed579e5de6ef263`、`ev_7d2cc9ff3bf8ed3ceea2d91ffb7c2c47ad45337a792f101c1d989272f37023b1`|
|
||||
|
||||
完整REA记录见[证据包](rea-slim-pose.json)。伪代码是Ghidra生成的静态分析结果,寄存器参数与CGRect返回类型部分恢复不完整;此处没有将其当作原始源码或实际执行记录。
|
||||
|
||||
## Metal瘦脸计算
|
||||
|
||||
用本机Apple工具对只读`default.metallib`输出AIR中间代码。它不是字符串猜测:`faceThinFragmentShader`在`faceShapeParamsActive`为真时调用`mssFaceShapePinCoordinate`,只有inactive分支调用旧`mssFaceThinPinCoordinate`。开启瘦脸后第一项脸型参数非零,因此可建立Shape分支的静态路径。原版截图当时具体走哪条宿主渲染分支没有运行捕获。
|
||||
|
||||
Shape helper中的瘦脸部分有17组点操作,每组实际读取origin和anchor,三元表中的第二项在这一循环中未使用。origin均为59–75号脸轮廓点,anchor为6、13、47、48、49、52号点;独立Vision区域对应检查确认,6/13是左右瞳孔,47/48/49/52位于鼻部或鼻梁。不能把所有锚点都叫下颌点或鼻部点。
|
||||
|
||||
单组逆向采样的结构为:
|
||||
|
||||
```text
|
||||
r = distance(origin, anchor)
|
||||
w = clamp(1 - distance(q, origin) / r, 0, 1)
|
||||
q = clamp(q - (anchor - origin) * effectiveStrength * w, 0, 1)
|
||||
```
|
||||
|
||||
17组顺序更新同一个采样坐标q,不能将其视为一次整脸等比缩放。这里的距离在整幅纹理归一化UV中计算;它并非完整按像素各向同性的旋转不变模型。单组在其anchor处权重为零,但其他组仍可能影响该处,不能说整个鼻部或所有五官被锁死。
|
||||
|
||||
有效强度另含尺寸补偿:`k=clamp(280/max(轮廓两端像素距离, 下巴到上侧轮廓中点的像素距离×2, 1), 1, 2.25)`,单pin系数约为`滑块×0.025×k×渲染强度`。它对小脸加大效果,**不是侧脸质量衰减**。最大单组系数0.05625也不是最终整脸缩窄百分比。
|
||||
|
||||
AIR结构摘要、全部17组索引、尺寸公式、输出摘要和复现命令在[机器可读报告](slim-pose-report.json)。完整AIR文本留在本地`build/pose-analysis/face-thin.air.txt`,未把原版metallib或原版程序加入产品或仓库。
|
||||
|
||||
## 为什么转脸时更自然
|
||||
|
||||
已证实的机制是:轮廓投影变化→局部origin、anchor间向量变化→各处的收缩方向、半径随之变化;并非先证明“人物转头90度”,再换一套固定对称瘦脸公式。另有上一轮已分析的时间点阵稳定、有效性检查和失检参考保持,这些可减少跳动;它们与瘦脸位移模型是两个层面。
|
||||
|
||||
本次检查的GPU瘦脸分支没有yaw/roll/pitch输入、左右脸对称比门限、侧脸强度开关或末端五官恢复蒙版。原生函数名检索也未发现`objc_stub::yaw/roll/pitch` getter;这是有界负面结果,不能据此宣称整个APP绝无任何姿态相关逻辑。其他脸型项仍有固定画面X方向位移,不能把瘦脸的局部点特性扩张成所有控制都具有相同的转头适应性。
|
||||
|
||||
## 同一素材的独立验证
|
||||
|
||||
运行独立的[离线检测工具](../../scripts/inspect-face-geometry.m),从用户视频在0、2、4、6、8、10、12、14、16、18、20秒各取一帧。请求使用Vision revision 3 / 76点,图像最长边1280。全部11帧均返回1张脸、76点;4秒和18秒的Vision yaw约为π/2,pitch均不可用。
|
||||
|
||||
这证明明显侧脸仍可以获得完整二维点阵,也校验了59–75号点确为轮廓、6/13号为瞳孔、47/48/49/52号为鼻部相关点。yaw为检测器返回值,不能当作实测头部角度。工具没有调用或执行原版滤镜,不是原版宿主像素等价测试;本机Vision版本、检测尺寸与宿主缓存可能使点坐标与原版当帧不同。Vision本身报告yaw,也不能说明原版瘦脸实际使用该属性。
|
||||
|
||||
用户素材、截图、导出的帧及完整人脸坐标均只保留在被忽略的本地build目录,没有上传远程仓库。入库的报告仅含汇总计数、区域索引和角度信息。
|
||||
|
||||
工具复现:
|
||||
|
||||
```sh
|
||||
xcrun clang -fobjc-arc -Wall -Wextra \
|
||||
-framework Foundation -framework AVFoundation -framework Vision \
|
||||
-framework ImageIO -framework CoreGraphics -framework CoreMedia \
|
||||
scripts/inspect-face-geometry.m -o /tmp/inspect-face-geometry
|
||||
/tmp/inspect-face-geometry '<用户视频路径>' '<本地输出目录>/geometry.json' 0 2 4 6 8 10 12 14 16 18 20
|
||||
```
|
||||
|
||||
## 当前实现差异与修复落点
|
||||
|
||||
`PGFaceProcessor.m:290–305`的瘦脸只用框中心/宽高,按画面水平轴同时处理左右;`warpImage:geometry:settings:extent:`额外读取的双眼仅用于大眼。已有`contour/nose/lips`未参与瘦脸,缺失轮廓时仍会按有效框足额变形。pose信息也没有贯通提取、净化、实时稳定和离线存储。
|
||||
|
||||
正值采样向外、视觉向内收的符号本身正确;简单反号无法修复。当前公式在框高35%处的测试位置将脸框两边缘间距缩小约20.2%,作用域还可延伸到框外。这个局部计算是当前公式的解析检查,不代表与原版截图的实测宽度差。
|
||||
|
||||
后续修正应让瘦脸直接使用稳定后的轮廓和鼻部控制点,按局部方向/半径位移,并校准尺寸补偿和滑块映射。若另加显式姿态或质量衰减,应标记为本项目设计,不能当作已证实的原版算法。完整点阵必须贯通实时与持久化路径,不能只在检测入口新增字段后被后续步骤丢弃。
|
||||
|
||||
现有测试只能证明各几何参数改变像素、范围保持和跟踪恢复一致,尚未验证最大瘦脸外观或侧脸形状。修复验证至少应包括同帧正面/半侧/全侧、向左右转脸、歪头、轮廓缺失、正逆播放、100%瘦脸与多个脸型项叠加,和原版在隔离相同其他参数后的对照。
|
||||
|
||||
本轮完成机制分析及独立检测,未宣称已修复安装版,也未将用户的“跟踪没问题”扩张为其他未覆盖的原生验收通过。
|
||||
|
||||
## 后续修复状态
|
||||
|
||||
1.0.5已实现并安装76点/17组局部瘦脸,旧的矩形框瘦脸已移除。上文“安装版未修复”为本次分析开始时1.0.4的历史状态。新增独立数值场与真实素材回归,签名公证及安装记录见 `../验证记录.md`。Motion/FCP最终视觉由用户自测,其他8类脸型控制与快速多人重叠的既有近似边界仍保留。
|
||||
|
||||
1.0.6继续分析下巴与宿主图像轴,新增原版三pin下巴及CI/IOSurface无额外翻转修复,详见[下巴与坐标分析](下巴与坐标分析.md)。其余七类控制仍为近似实现。
|
||||
@@ -0,0 +1,25 @@
|
||||
# 自定义面板交互连接修复
|
||||
|
||||
1.1.0在FCP原生界面复现:卡片能显示,“更多设置”可展开,但全部参数控件禁用,底部显示“等待宿主连接”。这不是整张视图不接收事件。
|
||||
|
||||
控制器原先在startAction之前检查FxParameterRetrievalAPI_v6与FxParameterSettingAPI_v5,若宿主仅在action上下文中提供它们,就根本进不了action。1.1.1改为先取得FxCustomParameterActionAPI_v4,以真实PGInspectorView为sender开启操作,再获取读写接口;缺接口时正确结束操作,后续可重试。NSView sender也符合本机官方头文件的sender定义。
|
||||
|
||||
实际FCP正式安装版日志确认readBefore=0、writeBefore=0,进入action后readInAction=1、writeInAction=1,viewSender=1、onMain=1。界面控件随即启用,原生重置按钮能把肤色亮度清零;数值输入37并按Return后,滑块与数值显示同步为0.37/37%。因此原先门控条件在实际宿主中确实无法成立。
|
||||
|
||||
新增模拟宿主只有在action内才提供参数接口,并要求sender为NSView:修改前141项检查有5项失败,修改后141项全部通过;独立远端恢复的同一测试启用ASan通过。完整1046项回归通过。签名代码节点为53ce88dd15983e9397ab08f5ec9ad608fce5d0b5,正式中间版1.1.1(10)已安装并通过签名、公证和票据。后续用户报告短脸和下颌骨位置错误,继续在合并修复版完成两宿主最终验收,未给中间版建立最终发布标签。
|
||||
|
||||
## 原生验收的边界
|
||||
|
||||
Mouse/keyboard自动化尝试中有焦点落回时间线及参数在非本次操作时改变的情况,不能据此断言点击坐标一定错位。另一次FCP高CPU与AX超时,调用栈落在大量效果浏览器的辅助功能遍历;插件主线程大多空闲。收起效果浏览器后AX读取从约10秒降到约1秒。这不是已证明的插件死锁。原始截图、用户测试片段和全部窗口树保留本机build/native-111,不上传远程。
|
||||
|
||||
原版UI的只读对照显示isFlipped同为YES,原生滑块同样使用super mouseDown;root鼠标以locationInWindow经convertPoint:fromView:nil转换。名字含WidthFix的方法只处理容器高度不足,没有鼠标Y翻转或backing像素重映射。没有证据需要盲改本产品的isFlipped。1.1.2最终Motion/FCP数值、重置、保存重开及画面响应将另行记录。
|
||||
|
||||
## 数值失焦与拖动连续预览
|
||||
|
||||
原生build11验收发现数值Return后仍保留字段编辑器,失焦通知无条件再次提交旧文本,可能把宿主刚撤销或重置的状态写回。新增独立回归确认旧delegate在失焦时复活旧值;现追踪尚未提交的真实文本改动,Return只提交一次并释放AppKit字段编辑器,失焦仅提交新改动。离屏真实NSWindow/field editor用例已覆盖。
|
||||
|
||||
用户另报滑杆只在松手后更新:旧view层在mouseDown之前beginInteraction,整个NSSlider tracking loop结束才endInteraction,虽然continuous为YES,宿主可直到endAction才发布预览。现在gesture depth只阻止定时刷新覆盖拖动显示,每个有效slider action由controller单独开启/结束宿主上下文,仍先在真实NSView sender的action内取得API,完整自定义状态和隐藏镜像一起提交。没有新增手动分析或强制刷新按钮。
|
||||
|
||||
在仅于endAction发布预览的模拟宿主中,三个中间步进旧版3项失败,新版155项检查器ASan全部通过,含无变化去重、action配对、每步可读的完整渲染设置。宿主是否合并快速更新以及实际显示帧率由其调度和设备性能决定;不保证每一个鼠标事件均在屏幕独立显示一帧。新版原生复验另记。
|
||||
|
||||
远程编辑器补充:Motion build12中数值提交后的重置已经改变实际slider/输出,但仍保留字段编辑器并显示旧文本。最终改为对已提交编辑调用abortEditing,并仅在存在尚未提交的真实输入时阻止宿主刷新/保留文本;单纯残留焦点不再遮蔽撤销或重置。新增两个真实离屏编辑器用例确认无改动焦点可刷新、尚未提交输入仍受保护;检查器ASan现157项通过。
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"generator": "built-in image_gen",
|
||||
"type": "generated promotional artwork, not an actual effect-output comparison",
|
||||
"style": "宋式青绿古风;成年女性面部近景;金色瘦脸轮廓线与内收箭头",
|
||||
"thumbnail_text": [
|
||||
"大鱼人像美化",
|
||||
"自动瘦脸",
|
||||
"自动跟随",
|
||||
"自动美颜",
|
||||
"免费开源"
|
||||
],
|
||||
"app_card_text": [
|
||||
"大鱼人像美化",
|
||||
"免费开源",
|
||||
"自动注册 · 无需激活码",
|
||||
"启动 3 秒后自动退出",
|
||||
"Final Cut Pro · Motion",
|
||||
"dayu.media"
|
||||
],
|
||||
"files": [
|
||||
{
|
||||
"path": "Assets/Artwork/portrait-cover.png",
|
||||
"sha256": "a346f06e7793b4e5483ccd4b3b86f34c2036bbe6bbddb7ad9cc70c47e7d014ab"
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/Resources/LauncherInfo.png",
|
||||
"sha256": "239552eeea738a32fafa70922d3cd1d4c115ff75d672574fa4c5acd941381fba"
|
||||
},
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/large.png",
|
||||
"sha256": "a02ddb255b1ae255c749bb837a759e2dee1c3b8ffb9bdc1167957761bd5a1b97"
|
||||
},
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/small.png",
|
||||
"sha256": "1552b838dd88f60dee0795e20aaca652f9c558ecefc93500e895fbff77c2a4d5"
|
||||
}
|
||||
],
|
||||
"thumbnail_lock": "uchg on both PNGs only; installer must restore flags",
|
||||
"template_sha256": "e9fa97dc14323d0daa7d3d61b06a78ba4000a70ab9f5e67ebffd750d49df1e15",
|
||||
"revision": "User feedback: reduce three feature lines by approximately one third and increase negative space."
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"mode": "built-in image_gen",
|
||||
"cover_prompt": "Use case: ads-marketing. Asset type: final 16:9 wide Chinese classical portrait beautification FxPlug product cover and very small Final Cut Pro effect thumbnail.\nEdit the supplied previous cover. Preserve its original jade-green, ivory and antique-gold Song-dynasty Chinese painting direction and the fictional adult Chinese hanfu woman identity, but redesign the composition for thumbnail legibility.\nPrimary request: CLOSE-UP FACE portrait dominates the RIGHT 52 percent; crop from the ornate updo to just below shoulders, face itself very large (about 65 percent of image height), almost frontal with slight elegant three-quarter angle, both cheeks and jaw clearly visible, natural skin texture and beautiful natural proportion. No fan, no hands, no full-body or waist framing. Gold/jade hairpin and small part of hanfu collar retain classical character. Background quiet dark jade and understated distant misty Chinese mountains; remove busy koi and flowers near lettering.\nDraw precise elegant luminous antique-gold contour curves along BOTH cheeks and jaw (following the skin outline, from below cheekbones toward chin) plus two short inward arrows on each side, unmistakably communicating automatic face slimming. Add a few restrained dotted jade landmark points and four fine rounded face-following corner marks. These overlays are design graphics only and must not distort the portrait. Avoid modern blue sci-fi HUD, grids covering eyes, and competitor likeness.\nLEFT 46 percent: extremely clear bold warm ivory Chinese display lettering, restrained gold border, generous spacing and high contrast. Text verbatim and only:\nTop compact brand line: \"大鱼人像美化\"\nThree equally prominent large feature lines stacked vertically:\n\"自动瘦脸\"\n\"自动跟随\"\n\"自动美颜\"\nSmall vermilion seal: \"免费开源\"\nSmall bottom line: \"Final Cut Pro · Motion\"\nNo tiny explanatory paragraphs and no extra slogans. Main three feature lines must be very large and remain distinguishable after downscaling to 192x108. Keep all key text and facial features inside 6 percent edge-safe margins. Refined classical poster with realistic close-up portrait, contemporary clear Chinese typography integrated into antique jade/gold aesthetics. Output a polished landscape 16:9 master image.\n",
|
||||
"final_refinement_prompt": "Edit this exact cover, changing ONLY the oversized typography layout. Preserve the classical jade-green/gold Chinese backdrop, the SAME adult hanfu woman's close-up face, all natural facial proportions, gold jaw-slimming contour arrows and tracking marks, 16:9 canvas, portrait placement. User says the feature text is too large.\nReduce the three feature lines \"自动瘦脸\", \"自动跟随\", \"自动美颜\" to approximately 62 percent of their current font height and width. Make the type refined, medium-weight warm ivory/gold rather than massive heavy gold brush blocks. Set them as three compact clean evenly spaced lines centered within the left column, with substantial calm dark-jade negative space above, below and around. Entire feature text group should occupy roughly 26 percent of total canvas width and 35 percent of canvas height, not the current 40 percent width and 57 percent height.\nKeep the product name \"大鱼人像美化\" at the top left but reduce it slightly (about 15 percent), preserving visual hierarchy: product name slightly larger than each feature line. Small red \"免费开源\" seal and small \"Final Cut Pro · Motion\" footer remain at bottom left. Remove the horizontal rules between the three feature lines; keep only subtle fine gold divider beneath product name and near footer. No new text. No giant lettering. Quiet elegant premium classical poster with FACE as the main visual focus. Exact required text retained: 大鱼人像美化 / 自动瘦脸 / 自动跟随 / 自动美颜 / 免费开源 / Final Cut Pro · Motion.\n"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"article_id": 15593,
|
||||
"url": "https://dayu.media/15593/",
|
||||
"status": "publish",
|
||||
"github_repository": "https://github.com/FAMEDaYu/FCP-BeatyGril",
|
||||
"github_release": "https://github.com/FAMEDaYu/FCP-BeatyGril/releases/tag/v1.2.0",
|
||||
"anonymous_frontend_http": 200,
|
||||
"both_github_links_present_in_frontend": true,
|
||||
"code_writing_credit_retained": "代码由 OpenAI + Codex 全程编写,站长仅参与调试和测试。",
|
||||
"resource_price_download_cover_seo_and_author_preserved": true,
|
||||
"only_content_requested": true,
|
||||
"frontend_seo_unique_and_exact": true,
|
||||
"idempotency_key": "55e60cc5-509a-4ae9-ba96-c0d25b2c575a",
|
||||
"before_content_sha256": "2701991a543b80114c062cc7ee68b83afff505dd9456cfe82f0b8819ea81b119",
|
||||
"after_content_sha256": "c66e1ddb374714a938442cd24cf5034482ea4e67d6f8dd79c07d43ba74ad1b1d",
|
||||
"verified_at_utc": "2026-10-21T19:32:48.060004+00:00"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"target": "https://github.com/FAMEDaYu/FCP-BeatyGril.git",
|
||||
"source_commit": "dffa547d92478dd471fb4926579df91084581756",
|
||||
"all_reachable_blobs_scanned": 406,
|
||||
"secret_pattern_matches": [],
|
||||
"package_sha256": "5bd77c28b3a7e54f3d4060be1f16bcb145d9bc4d6b9cfb9eb137c01130440243",
|
||||
"connector_target_push_permission": false,
|
||||
"local_https_credential_present": false,
|
||||
"status": "prepared_waiting_for_GitHub_write_authentication",
|
||||
"github_visibility": "public",
|
||||
"github_repository_id": "1428817365",
|
||||
"github_repository_initial_state": "empty",
|
||||
"origin_retained": "https://dayu.media/git/dayu/paintfcp-fxplug.git",
|
||||
"github_remote_added": true
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"repository": "https://github.com/FAMEDaYu/FCP-BeatyGril",
|
||||
"repository_id": 1428817365,
|
||||
"visibility": "public",
|
||||
"source_commit": "356683b41af702d6c0143ad7fa5f540d752d6e14",
|
||||
"local_refs": {
|
||||
"refs/heads/main": "356683b41af702d6c0143ad7fa5f540d752d6e14",
|
||||
"refs/tags/baseline-20261021": "4124c350ce288b5fa3cf843ec0e9751e9db19b4c",
|
||||
"refs/tags/v1.0.4": "302dc20c0a90c0b8934c4341d65c2467d4ed3386",
|
||||
"refs/tags/v1.0.5": "1008651f6e2111a26d1420021c49f40d6f728b3a",
|
||||
"refs/tags/v1.0.6": "5793e3de499bfe320b5e9a9db16ef7bc79a5243d",
|
||||
"refs/tags/v1.1.0": "3bb33818eaa8033b8b1d140eb64e31f38ec3fa75",
|
||||
"refs/tags/v1.1.2": "e9fddda5e13042f761755762fa39dfe090853c6a",
|
||||
"refs/tags/v1.2.0": "3c7261c3a861b9f4704cfb36055d7b500c239dab"
|
||||
},
|
||||
"github_refs_verified": true,
|
||||
"main_upstream_retained": "origin",
|
||||
"auth_storage": "macOS keyring through GitHub CLI; no token included"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"remote": "https://github.com/FAMEDaYu/FCP-BeatyGril.git",
|
||||
"anonymous_clone": true,
|
||||
"credentials_disabled_for_clone": true,
|
||||
"commit": "356683b41af702d6c0143ad7fa5f540d752d6e14",
|
||||
"tracked_files_compared": 197,
|
||||
"all_tag_refs_equal": true,
|
||||
"tag_count": 7,
|
||||
"git_fsck_full_strict": true,
|
||||
"package_sha256": "5bd77c28b3a7e54f3d4060be1f16bcb145d9bc4d6b9cfb9eb137c01130440243",
|
||||
"lfs": false,
|
||||
"submodules": false,
|
||||
"temporary_clone_removed": true
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"repository": "FAMEDaYu/FCP-BeatyGril",
|
||||
"url": "https://github.com/FAMEDaYu/FCP-BeatyGril/releases/tag/v1.2.0",
|
||||
"release_id": 419972270,
|
||||
"tag": "v1.2.0",
|
||||
"draft": false,
|
||||
"prerelease": false,
|
||||
"asset": {
|
||||
"id": 663571667,
|
||||
"name": "Dayu-Portrait-1.2.0.pkg",
|
||||
"size": 5011005,
|
||||
"digest": "sha256:5bd77c28b3a7e54f3d4060be1f16bcb145d9bc4d6b9cfb9eb137c01130440243",
|
||||
"browser_download_url": "https://github.com/FAMEDaYu/FCP-BeatyGril/releases/download/v1.2.0/Dayu-Portrait-1.2.0.pkg"
|
||||
},
|
||||
"sha256": "5bd77c28b3a7e54f3d4060be1f16bcb145d9bc4d6b9cfb9eb137c01130440243",
|
||||
"anonymous_asset_download_hash_matches": true,
|
||||
"downloaded_pkg_signature_and_ticket_valid": true
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
Executable=/Library/Plug-Ins/FxPlug/beatygril.app/Contents/MacOS/beatygril
|
||||
Identifier=com.dayu.beatygril
|
||||
Format=app bundle with Mach-O universal (x86_64 arm64)
|
||||
CodeDirectory v=20500 size=478 flags=0x10000(runtime) hashes=4+7 location=embedded
|
||||
Hash type=sha256 size=32
|
||||
CandidateCDHash sha256=b77375a5d7c6d5d866ff21bfdc3ce85412dc1d0b
|
||||
CandidateCDHashFull sha256=b77375a5d7c6d5d866ff21bfdc3ce85412dc1d0b463ff47fe896a52640762b4f
|
||||
Hash choices=sha256
|
||||
CMSDigest=b77375a5d7c6d5d866ff21bfdc3ce85412dc1d0b463ff47fe896a52640762b4f
|
||||
CMSDigestType=2
|
||||
CDHash=b77375a5d7c6d5d866ff21bfdc3ce85412dc1d0b
|
||||
Signature size=8968
|
||||
Authority=Developer ID Application: zhong luo (B3W25FX5H5)
|
||||
Authority=Developer ID Certification Authority
|
||||
Authority=Apple Root CA
|
||||
Timestamp=Oct 21, 2026 at 18:42:32
|
||||
Notarization Ticket=stapled
|
||||
Info.plist entries=22
|
||||
TeamIdentifier=B3W25FX5H5
|
||||
Runtime Version=27.0.0
|
||||
Sealed Resources version=2 rules=13 files=4
|
||||
Internal requirements count=1 size=180
|
||||
Total signatures=1
|
||||
Chosen signature=1
|
||||
@@ -0,0 +1,3 @@
|
||||
Face AddressSanitizer build and standalone run
|
||||
Face processing: 116 checks passed
|
||||
2026-10-21 18:40:05.422 face-tests[99927:5270835] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2
|
||||
@@ -0,0 +1 @@
|
||||
{"status":"Accepted","id":"8eb96294-5935-49ff-a487-3c4f60c27395","message":"Processing complete"}
|
||||
@@ -0,0 +1,8 @@
|
||||
Arguments: ["zsh", "scripts/test.sh"]
|
||||
Environment additions: {}
|
||||
Exit code: 0
|
||||
|
||||
Beauty renderer: 49 checks, 0 failures (Metal).
|
||||
Face processing: 116 checks passed
|
||||
|
||||
2026-10-21 18:42:58.952 face-tests[1253:5276682] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2
|
||||
@@ -0,0 +1,9 @@
|
||||
Arguments: ["zsh", "scripts/test-host.sh"]
|
||||
Environment additions: {"PAINTFCP_HOST_ASAN": "1"}
|
||||
Exit code: 0
|
||||
|
||||
Default IOSurface maximum byte difference: 0
|
||||
Alternate destination tag maximum byte difference: 0
|
||||
Host adapter: 117 checks, 0 failures
|
||||
|
||||
2026-10-21 18:42:58.460 host-tests[1241:5276594] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2
|
||||
@@ -0,0 +1,26 @@
|
||||
Arguments: ["zsh", "scripts/test-osc.sh"]
|
||||
Environment additions: {"PAINTFCP_OSC_ASAN": "1"}
|
||||
Exit code: 0
|
||||
|
||||
OSC adapter: 98 checks, 0 failures
|
||||
|
||||
2026-10-21 18:42:57.862 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.25,0.75) setter=(0.25,0.75) readback=(0.25,0.75) mode=normalized verified=1
|
||||
2026-10-21 18:42:57.887 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(80,180) surface=320x240 origin=0
|
||||
2026-10-21 18:42:58.633 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.8,0.3) setter=(1152,-432) readback=(0.8,0.3) mode=centered-pixels verified=1
|
||||
2026-10-21 18:42:58.633 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.7,0.4) objectBounds=(-1920,-1080,3840,2160) canvas=(152,78) surface=320x240 origin=0
|
||||
2026-10-21 18:42:58.734 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.8,0.3) setter=(0.8,0.3) readback=(0.12345,0.87654) mode=normalized verified=0
|
||||
2026-10-21 18:42:58.734 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.75,0.25) setter=(0.75,0.25) readback=(0.75,0.25) mode=normalized verified=1
|
||||
2026-10-21 18:42:58.734 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.75,0.25) objectBounds=(-100,-50,200,100) canvas=(160,60) surface=320x240 origin=0
|
||||
2026-10-21 18:42:58.813 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.625,0.375) setter=(0.625,0.375) readback=(0.625,0.375) mode=normalized verified=1
|
||||
2026-10-21 18:42:58.813 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.625,0.375) objectBounds=(-100,-50,200,100) canvas=(240,60) surface=320x240 origin=0
|
||||
2026-10-21 18:42:58.892 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.25,0.75) setter=(0.25,0.75) readback=(0.25,0.75) mode=normalized verified=1
|
||||
2026-10-21 18:42:58.892 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(144,180) surface=320x240 origin=0
|
||||
2026-10-21 18:42:58.976 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1
|
||||
2026-10-21 18:42:58.977 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0,1) objectBounds=(-100,-50,200,100) canvas=(100,140) surface=320x240 origin=0
|
||||
2026-10-21 18:42:59.070 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(nan,nan) surface=320x240 origin=0
|
||||
2026-10-21 18:42:59.137 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1
|
||||
2026-10-21 18:42:59.137 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(inf,nan) surface=320x240 origin=0
|
||||
2026-10-21 18:42:59.206 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1
|
||||
2026-10-21 18:42:59.206 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(80,nan) surface=320x240 origin=0
|
||||
2026-10-21 18:42:59.265 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1
|
||||
2026-10-21 18:42:59.265 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1
|
||||
@@ -0,0 +1,21 @@
|
||||
Arguments: ["xcodebuild", "-list", "-project", "beatygril/beatygril.xcodeproj"]
|
||||
Environment additions: {}
|
||||
Exit code: 0
|
||||
|
||||
Command line invocation:
|
||||
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -list -project beatygril/beatygril.xcodeproj
|
||||
|
||||
Information about project "beatygril":
|
||||
Targets:
|
||||
Wrapper Application
|
||||
XPC Service
|
||||
|
||||
Build Configurations:
|
||||
Debug
|
||||
Release
|
||||
|
||||
If no build configuration is specified and -scheme is not passed then "Release" is used.
|
||||
|
||||
Schemes:
|
||||
Wrapper Application
|
||||
XPC Service
|
||||
@@ -0,0 +1,609 @@
|
||||
{
|
||||
"target": "e03e460a9b3e5ad489aad24095485ba10ceb987d",
|
||||
"remote": "https://dayu.media/git/dayu/paintfcp-fxplug.git",
|
||||
"startedAt": "2026-10-21T10:42:53.349001+00:00",
|
||||
"temporaryClone": "/var/folders/t4/kbc10sqs43b0rjf3nfh51nmw0000gn/T/paintfcp-final-recovery-e03e460-wsazshda/clone",
|
||||
"scope": "Independent remote source recovery; no APP build, installation, execution, UI, source edits or commit.",
|
||||
"cloneHead": "e03e460a9b3e5ad489aad24095485ba10ceb987d",
|
||||
"files": {
|
||||
"count": 51,
|
||||
"allByteAndBlobAndModeEqual": true,
|
||||
"entries": [
|
||||
{
|
||||
"path": ".gitignore",
|
||||
"bytes": 490,
|
||||
"mode": "100644",
|
||||
"gitBlob": "d2bca6e38076bb5f7574cc7781eadef27b41d9ff",
|
||||
"sha256": "34e63260d343569ad4d5a1ffd6c15647da5a7da2b8940dc93f6d987c7fec474e",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "README.md",
|
||||
"bytes": 2374,
|
||||
"mode": "100644",
|
||||
"gitBlob": "b23fa1dbe565ec9c076d5a070b9d3b15771d09eb",
|
||||
"sha256": "b483ab1c164af35003277dcdeecf3e2d66c2c608461c2ea7ab17d7b2b87a781e",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "RECOVERY.md",
|
||||
"bytes": 3722,
|
||||
"mode": "100644",
|
||||
"gitBlob": "321cbca369a7da1cb0da858381701d32d9145a6d",
|
||||
"sha256": "5d1ba0793bb476ce10bfbe5a5b9195cb8be33d9987a1de29975de5ec92c25201",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/Drop Zone.tiff",
|
||||
"bytes": 420128,
|
||||
"mode": "100644",
|
||||
"gitBlob": "6d15c98bc221f999514f197ff67a7145836e6a38",
|
||||
"sha256": "a7f8e3a2a431dbb3ce9e777040bb55e701cfe9ab9632e8cbb10359732bc8692e",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/PARAMETERS.json",
|
||||
"bytes": 9815,
|
||||
"mode": "100644",
|
||||
"gitBlob": "df2c01f370e6ee639d2950774fe8020742802c17",
|
||||
"sha256": "bb561b0dfff90223f0925a60ec05b28518e22163a6bf7922c4efc6d155ddbabb",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/README.md",
|
||||
"bytes": 4180,
|
||||
"mode": "100644",
|
||||
"gitBlob": "e4317f896ea661029a9c3e6f38e1141692b20f92",
|
||||
"sha256": "cab22a7d453a197f6fad5f38508e9bbfb1f55fb67d368b255dc8cc8b973f116c",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/VALIDATION.json",
|
||||
"bytes": 1749,
|
||||
"mode": "100644",
|
||||
"gitBlob": "725063ec5edc1d5fe39e9cf79a91f5e5da005853",
|
||||
"sha256": "8aa839a756a23a64ab631ff558e16a5542f5311d5f9d0f6212a62150eb75ad1d",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/大鱼人像美化.moef",
|
||||
"bytes": 22996,
|
||||
"mode": "100644",
|
||||
"gitBlob": "98142a1ab47258a7fdd40c82ddc36ade6976fc04",
|
||||
"sha256": "d234d504eba9e6d37b910b622a46c92458e658c5bbdad2caf5831c2a1463a3e2",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril.xcodeproj/project.pbxproj",
|
||||
"bytes": 22986,
|
||||
"mode": "100644",
|
||||
"gitBlob": "db5251bf3c337b865621e771a4b28690214f1c8e",
|
||||
"sha256": "e9b9be100e53003f6bba96658d3a36078bb607236958e43aec6ed59f8c73ce32",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
|
||||
"bytes": 135,
|
||||
"mode": "100644",
|
||||
"gitBlob": "919434a6254f0e9651f402737811be6634a03e9c",
|
||||
"sha256": "7f3b00b5c3fdb45242d7b87e1e5c4e25d1fa8129a16c94295ecc4e8ea2235c5f",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/Info.plist",
|
||||
"bytes": 3030,
|
||||
"mode": "100644",
|
||||
"gitBlob": "956728344f758fd35239c8f0cfe1a532c11f3f16",
|
||||
"sha256": "b7285915328457ff63e146230a9db417c4a99a20b067930265dbc5b270988457",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/PGBeautyRenderer.h",
|
||||
"bytes": 1410,
|
||||
"mode": "100644",
|
||||
"gitBlob": "a0a6965c837072e6d837a98b701d59b1cc139655",
|
||||
"sha256": "4e9b663c47261e4feceb7ab38c25171b65f36c14417d82a8b7c49ee3201492d3",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/PGBeautyRenderer.m",
|
||||
"bytes": 17132,
|
||||
"mode": "100644",
|
||||
"gitBlob": "4c9fc6fbb1dc1f2c4048a16435f554cae9f2ca74",
|
||||
"sha256": "00b52b1f22c1e875f137ee4ea90f50d6caa38db277bebd0da538d0ba7e66072b",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/PGBeautyTypes.h",
|
||||
"bytes": 1149,
|
||||
"mode": "100644",
|
||||
"gitBlob": "e1cd3ef21f37b831cdaa7d9f52211cafaf243994",
|
||||
"sha256": "6ea8005accc22f85fe8be1b73bf6e89a5b37ffd6e97460d4f6dd69d55eaf33cc",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/PGFaceProcessor.h",
|
||||
"bytes": 2178,
|
||||
"mode": "100644",
|
||||
"gitBlob": "0b861830a6e9652d81ccfe62f2ce758febee449f",
|
||||
"sha256": "a3448bd75fd278c9702f079f55637ba2c26bc820bdbb81f49fb3a3d0e2a4aba5",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/PGFaceProcessor.m",
|
||||
"bytes": 36793,
|
||||
"mode": "100644",
|
||||
"gitBlob": "69359f52ef6473d034553d8cd9528881b4a0125f",
|
||||
"sha256": "49ee6e5632d7ec043cbadef8596a153f1f6841eb4e658ea67b436f4aca9e60c4",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/PGFaceSelectOSC.m",
|
||||
"bytes": 11630,
|
||||
"mode": "100644",
|
||||
"gitBlob": "ae0aa7ce1c2de355b2c1cb890314a0de689df81a",
|
||||
"sha256": "d5e1dd1db6825730803ddc3f21b588cd548cbbacc60760aa45ad9e2feedae307",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/PGParameterIDs.h",
|
||||
"bytes": 932,
|
||||
"mode": "100644",
|
||||
"gitBlob": "4cc0e20af1e659f1e8e666fabe01003c06cfd885",
|
||||
"sha256": "8fdfa2021131317ce09532d27fd6f34fb0b505f7b17c561819336ad2a06c42cc",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/beatygrilPlugIn.h",
|
||||
"bytes": 347,
|
||||
"mode": "100644",
|
||||
"gitBlob": "12dca07a744c064d5d474e0294304ca29055a077",
|
||||
"sha256": "4f00716328c9237b79cc58153ba47d8ac8ddc1786939cb206bd37b01e3b6397e",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/beatygrilPlugIn.m",
|
||||
"bytes": 24193,
|
||||
"mode": "100644",
|
||||
"gitBlob": "3f148956b32770c7db5b0df97700fd96f7e20025",
|
||||
"sha256": "b8f4326ed3eb2de74770e4ea266d09ebe4aea70428a4511f0ec501a0cd89b247",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/en.lproj/InfoPlist.strings",
|
||||
"bytes": 85,
|
||||
"mode": "100644",
|
||||
"gitBlob": "9a5f27348a39c8e3ee50cffc2fb359c78a1319c8",
|
||||
"sha256": "1b1cd5b74690bd5a74cf2b0a0c068bbc2c3462c5e9fe5ca3e61541bcbd451a7a",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/en.lproj/Localizable.strings",
|
||||
"bytes": 132,
|
||||
"mode": "100644",
|
||||
"gitBlob": "7f52f3dd719cb4f94e24867e36114cb061ef0b92",
|
||||
"sha256": "b3036a2339b97ebf264516e1e534351d1ceb64f45942595508f4d67d07b07769",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/main.m",
|
||||
"bytes": 114,
|
||||
"mode": "100644",
|
||||
"gitBlob": "34d50d3f8cdf438d3508d0aa94e3f2d20e45f962",
|
||||
"sha256": "5b812ddb1ef171fe075e4faf13d761935ca73ecbba1be0bd9d4802a64a7759cd",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/AppDelegate.h",
|
||||
"bytes": 167,
|
||||
"mode": "100644",
|
||||
"gitBlob": "f3f8e19cfe057114c2289ff37c01c2e6e1aa7ed0",
|
||||
"sha256": "3fc6516be93176f90c2deb17332c9cf98e670458a33fbad4fe7b8f367ec9494f",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/AppDelegate.m",
|
||||
"bytes": 3003,
|
||||
"mode": "100644",
|
||||
"gitBlob": "1cb56f073356dd30add33415117bf4c24fdc4ef0",
|
||||
"sha256": "acef6ade6591c039cd8b3e603f83d6d06f64da9709a0385b73c8588e824fe6de",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/Base.lproj/MainMenu.xib",
|
||||
"bytes": 50614,
|
||||
"mode": "100644",
|
||||
"gitBlob": "57d03a50e249d189c5fa0a4602c5ec846f06612d",
|
||||
"sha256": "7f0945bc5903a658550b712267870edecbdf1b73ac83c71f1358468f40c1ab1d",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/Info.plist",
|
||||
"bytes": 1084,
|
||||
"mode": "100644",
|
||||
"gitBlob": "94b192675bf5651a7c66da35f04ff23e7b8f01c2",
|
||||
"sha256": "b1e0922de60e32a703f62c34b508610d5a0329d70637911cfa4645c0fd19083d",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/SandboxEntitlements.entitlements",
|
||||
"bytes": 240,
|
||||
"mode": "100644",
|
||||
"gitBlob": "852fa1a4728ae4789e3bca55dd07caef3b41f2a5",
|
||||
"sha256": "b746c74b201e6af4e0864fbd1f4f629f96156a7ec4b7208bc995d0a5089bb592",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/en.lproj/Credits.rtf",
|
||||
"bytes": 264,
|
||||
"mode": "100644",
|
||||
"gitBlob": "da779d0f6bec11568066e347a01ccef0308488b2",
|
||||
"sha256": "ec846e198df85720e8443abb810334411b5690386f3062f90208c23b8575f28a",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/en.lproj/InfoPlist.strings",
|
||||
"bytes": 0,
|
||||
"mode": "100644",
|
||||
"gitBlob": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/main.m",
|
||||
"bytes": 112,
|
||||
"mode": "100644",
|
||||
"gitBlob": "99ad4384792f9b2050e0755c07522c0dab9b4b86",
|
||||
"sha256": "5c3dc97a53d0379af0e0ce75c5541f33c47f2da115d2d0018cfba003d185a63d",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/REA-分析与复刻说明.md",
|
||||
"bytes": 7652,
|
||||
"mode": "100644",
|
||||
"gitBlob": "dd32569f3d93f3533f257ed4d1ecd70a4eab271e",
|
||||
"sha256": "6ca162a8eb43ef67b5bf55954d15c16aecefbfdfa5a1b687e7516cee4f141c9e",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/auto-follow-report.json",
|
||||
"bytes": 15665,
|
||||
"mode": "100644",
|
||||
"gitBlob": "e60d6d055a513ab8e9c21d2b39460c9d0698e1d3",
|
||||
"sha256": "1a0c91efcaee058f331f6a7446bea8794af1dcf9120f5c2585f249b188d038e3",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/beauty-preview.png",
|
||||
"bytes": 617622,
|
||||
"mode": "100644",
|
||||
"gitBlob": "35ace472cb42629b01b3e05660cb7be8b9711fd7",
|
||||
"sha256": "37aa97855915a49ff1f225a9e1fa9d8bcbed0be5f4109b6835ba4db17f9113f6",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/face-preview.png",
|
||||
"bytes": 713552,
|
||||
"mode": "100644",
|
||||
"gitBlob": "9a5bab3ad706b95ac32875352d16d6580dcd48ab",
|
||||
"sha256": "6cc662cbb2b554a0dd8c926d94a0d819506ac76710d9c09c2d3d7f808fbf686b",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/rea-auto-tracking.json",
|
||||
"bytes": 2883488,
|
||||
"mode": "100644",
|
||||
"gitBlob": "2f5738f934f0ce89780cf4535c7257b54a397bef",
|
||||
"sha256": "dc1007f3798fade5e454bb2ef0b58e4cfe2bb0256948c364070fd9af70a97377",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/rea-host.json",
|
||||
"bytes": 10111,
|
||||
"mode": "100644",
|
||||
"gitBlob": "9de443173a74668f0a2dced3426dae20549a16dd",
|
||||
"sha256": "141866459948b19d5378de2f6534de333c795e317416f2ac6c9fdc86c94dd61a",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/rea-plugin.json",
|
||||
"bytes": 343165,
|
||||
"mode": "100644",
|
||||
"gitBlob": "79bcafbcfeda694ed466d95f81f30eb622a95a0b",
|
||||
"sha256": "dda6e450915e1054653c28addfed5254c678dccf14ee66643d508e7087c1f0c1",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/reference-template-parameters.json",
|
||||
"bytes": 1608,
|
||||
"mode": "100644",
|
||||
"gitBlob": "9947e2ff182a146bc4c9120dfff7eacc8cca9c0c",
|
||||
"sha256": "026e47e8ecbd9a967d8b8aabddac2a370479a43b9e1a7a7728b5b01a5002f006",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/验证记录.md",
|
||||
"bytes": 4783,
|
||||
"mode": "100644",
|
||||
"gitBlob": "22db834b9b61b5d1ede9fa4c16e0a8ffb2157821",
|
||||
"sha256": "b030e25d23264e8bdfbf172a4b9f417bc30fdd35029a97b3579e3d5c5a0cc798",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "scripts/checkpoint.py",
|
||||
"bytes": 2218,
|
||||
"mode": "100644",
|
||||
"gitBlob": "8248d1732aceed377d28cdae02873057f442474b",
|
||||
"sha256": "3c27b0e603dd2d94512f611cec97bd9afe5809aea0f5a4bb213995d2e23366f8",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "scripts/deliver.py",
|
||||
"bytes": 5858,
|
||||
"mode": "100755",
|
||||
"gitBlob": "1ab7b19e5e7f384e5491a93933b1cb5148a4fc1d",
|
||||
"sha256": "1192f8458d8127677ae5353fd15ee8426d76871de60aac719e52da951e86cec0",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "scripts/test-host.sh",
|
||||
"bytes": 1129,
|
||||
"mode": "100755",
|
||||
"gitBlob": "ef9c7f6436e3d1babbf272e9d329d65ec6c395cb",
|
||||
"sha256": "7f55ed6de05e6cc59884fb7c96062676bd086f4ac745ae847511eacb12316467",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "scripts/test-osc.sh",
|
||||
"bytes": 941,
|
||||
"mode": "100755",
|
||||
"gitBlob": "ffaed0b8d449eef6acf2fb352d9fea10fc1649fd",
|
||||
"sha256": "ed405cd214ce252641074d0ef0a12c4cc0faf3e1869fe92716a98fff7f9ac517",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "scripts/test.sh",
|
||||
"bytes": 765,
|
||||
"mode": "100755",
|
||||
"gitBlob": "2ec53312311eab71361399e2fb16a229042d4820",
|
||||
"sha256": "b848347a4bcaa883300e75ac78682ac1f82ce07f2696e2457ee22226c06c7131",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "tests/beauty_render_tests.m",
|
||||
"bytes": 16870,
|
||||
"mode": "100644",
|
||||
"gitBlob": "24050fb3a2630693253202ae1525c280f4f144eb",
|
||||
"sha256": "b04eb2f0d78faec13bbdd2a3286cc74c46c2f536358c7c1c3d5d03c54daa868c",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "tests/face_tests.m",
|
||||
"bytes": 33040,
|
||||
"mode": "100644",
|
||||
"gitBlob": "76a05235db8c7ab4c9b59ab6f184be2524443b6e",
|
||||
"sha256": "288654ac41fcbec3db79605a2c215a1284c9b431fcbc0379974a8b6e546d6da4",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "tests/fixtures/ATTRIBUTION.txt",
|
||||
"bytes": 498,
|
||||
"mode": "100644",
|
||||
"gitBlob": "6e439ab97256952b0acd1eef0e1c1b4ab3ea015c",
|
||||
"sha256": "8823ad8aed1a5c1bdda93946e4b5ed24cd542e996a2b8087517cf62f7f4f2a84",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "tests/fixtures/astronaut.png",
|
||||
"bytes": 791555,
|
||||
"mode": "100644",
|
||||
"gitBlob": "834cda0012478c5edc8d43bade96d315dedeaab4",
|
||||
"sha256": "88431cd9653ccd539741b555fb0a46b61558b301d4110412b5bc28b5e3ea6cb5",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "tests/host_adapter_tests.m",
|
||||
"bytes": 30363,
|
||||
"mode": "100644",
|
||||
"gitBlob": "8091c1523eb0b05295c391e20637c931d681e049",
|
||||
"sha256": "77131c770222d3b404204fb04bf47cf943885eeff6acfc7498d59feb28eb1e73",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "tests/osc_tests.m",
|
||||
"bytes": 22495,
|
||||
"mode": "100644",
|
||||
"gitBlob": "66fff5f78f8e0ba08026e53375b184a460a29162",
|
||||
"sha256": "a3199147e32facd63373b53f77840408411b04436fb1dd42e2fb71023c8f2f8a",
|
||||
"byteAndBlobAndModeEqual": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"requiredResources": [
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/大鱼人像美化.moef",
|
||||
"exists": true,
|
||||
"bytes": 22996
|
||||
},
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/Drop Zone.tiff",
|
||||
"exists": true,
|
||||
"bytes": 420128
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/Base.lproj/MainMenu.xib",
|
||||
"exists": true,
|
||||
"bytes": 50614
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/en.lproj/Credits.rtf",
|
||||
"exists": true,
|
||||
"bytes": 264
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/en.lproj/InfoPlist.strings",
|
||||
"exists": true,
|
||||
"bytes": 0
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/en.lproj/InfoPlist.strings",
|
||||
"exists": true,
|
||||
"bytes": 85
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/en.lproj/Localizable.strings",
|
||||
"exists": true,
|
||||
"bytes": 132
|
||||
},
|
||||
{
|
||||
"path": "tests/fixtures/astronaut.png",
|
||||
"exists": true,
|
||||
"bytes": 791555
|
||||
},
|
||||
{
|
||||
"path": "tests/fixtures/ATTRIBUTION.txt",
|
||||
"exists": true,
|
||||
"bytes": 498
|
||||
}
|
||||
],
|
||||
"gitFsck": {
|
||||
"args": [
|
||||
"git",
|
||||
"fsck",
|
||||
"--full",
|
||||
"--strict"
|
||||
],
|
||||
"returncode": 0,
|
||||
"stdout": "",
|
||||
"stderr": ""
|
||||
},
|
||||
"submodules": {
|
||||
"args": [
|
||||
"git",
|
||||
"submodule",
|
||||
"status",
|
||||
"--recursive"
|
||||
],
|
||||
"returncode": 0,
|
||||
"stdout": "",
|
||||
"stderr": ""
|
||||
},
|
||||
"lfsPointerFiles": [],
|
||||
"lfsAttributesPresent": false,
|
||||
"remoteRefs": {
|
||||
"args": [
|
||||
"git",
|
||||
"ls-remote",
|
||||
"origin",
|
||||
"refs/heads/main"
|
||||
],
|
||||
"returncode": 0,
|
||||
"stdout": "e03e460a9b3e5ad489aad24095485ba10ceb987d\trefs/heads/main\n",
|
||||
"stderr": ""
|
||||
},
|
||||
"checkpointInvocation": {
|
||||
"mode": "100644",
|
||||
"correctInvocation": "python3 scripts/checkpoint.py ...",
|
||||
"helpCheck": {
|
||||
"args": [
|
||||
"python3",
|
||||
"scripts/checkpoint.py",
|
||||
"--help"
|
||||
],
|
||||
"returncode": 0,
|
||||
"stdout": "usage: checkpoint.py [-h] [--tag TAG] message files [files ...]\n\npositional arguments:\n message\n files\n\noptions:\n -h, --help show this help message and exit\n --tag TAG\n",
|
||||
"stderr": ""
|
||||
}
|
||||
},
|
||||
"checks": {
|
||||
"beauty-face": {
|
||||
"args": [
|
||||
"zsh",
|
||||
"scripts/test.sh"
|
||||
],
|
||||
"returncode": 0,
|
||||
"stdout": "Beauty renderer: 49 checks, 0 failures (Metal).\nFace processing: 116 checks passed\n",
|
||||
"stderr": "2026-10-21 18:42:58.952 face-tests[1253:5276682] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2\n",
|
||||
"elapsedSeconds": 2.662,
|
||||
"environment": {},
|
||||
"transcript": "/Users/dayu/Documents/PaintFCP/build/delivery/recovery-e03e460-beauty-face.txt"
|
||||
},
|
||||
"host-asan": {
|
||||
"args": [
|
||||
"zsh",
|
||||
"scripts/test-host.sh"
|
||||
],
|
||||
"returncode": 0,
|
||||
"stdout": "Default IOSurface maximum byte difference: 0\nAlternate destination tag maximum byte difference: 0\nHost adapter: 117 checks, 0 failures\n",
|
||||
"stderr": "2026-10-21 18:42:58.460 host-tests[1241:5276594] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2\n",
|
||||
"elapsedSeconds": 2.32,
|
||||
"environment": {
|
||||
"PAINTFCP_HOST_ASAN": "1"
|
||||
},
|
||||
"transcript": "/Users/dayu/Documents/PaintFCP/build/delivery/recovery-e03e460-host-asan.txt"
|
||||
},
|
||||
"osc-asan": {
|
||||
"args": [
|
||||
"zsh",
|
||||
"scripts/test-osc.sh"
|
||||
],
|
||||
"returncode": 0,
|
||||
"stdout": "OSC adapter: 98 checks, 0 failures\n",
|
||||
"stderr": "2026-10-21 18:42:57.862 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.25,0.75) setter=(0.25,0.75) readback=(0.25,0.75) mode=normalized verified=1\n2026-10-21 18:42:57.887 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(80,180) surface=320x240 origin=0\n2026-10-21 18:42:58.633 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.8,0.3) setter=(1152,-432) readback=(0.8,0.3) mode=centered-pixels verified=1\n2026-10-21 18:42:58.633 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.7,0.4) objectBounds=(-1920,-1080,3840,2160) canvas=(152,78) surface=320x240 origin=0\n2026-10-21 18:42:58.734 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.8,0.3) setter=(0.8,0.3) readback=(0.12345,0.87654) mode=normalized verified=0\n2026-10-21 18:42:58.734 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.75,0.25) setter=(0.75,0.25) readback=(0.75,0.25) mode=normalized verified=1\n2026-10-21 18:42:58.734 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.75,0.25) objectBounds=(-100,-50,200,100) canvas=(160,60) surface=320x240 origin=0\n2026-10-21 18:42:58.813 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.625,0.375) setter=(0.625,0.375) readback=(0.625,0.375) mode=normalized verified=1\n2026-10-21 18:42:58.813 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.625,0.375) objectBounds=(-100,-50,200,100) canvas=(240,60) surface=320x240 origin=0\n2026-10-21 18:42:58.892 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.25,0.75) setter=(0.25,0.75) readback=(0.25,0.75) mode=normalized verified=1\n2026-10-21 18:42:58.892 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(144,180) surface=320x240 origin=0\n2026-10-21 18:42:58.976 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1\n2026-10-21 18:42:58.977 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0,1) objectBounds=(-100,-50,200,100) canvas=(100,140) surface=320x240 origin=0\n2026-10-21 18:42:59.070 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(nan,nan) surface=320x240 origin=0\n2026-10-21 18:42:59.137 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1\n2026-10-21 18:42:59.137 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(inf,nan) surface=320x240 origin=0\n2026-10-21 18:42:59.206 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1\n2026-10-21 18:42:59.206 osc-tests[1236:5276552] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(80,nan) surface=320x240 origin=0\n2026-10-21 18:42:59.265 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1\n2026-10-21 18:42:59.265 osc-tests[1236:5276552] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1\n",
|
||||
"elapsedSeconds": 2.201,
|
||||
"environment": {
|
||||
"PAINTFCP_OSC_ASAN": "1"
|
||||
},
|
||||
"transcript": "/Users/dayu/Documents/PaintFCP/build/delivery/recovery-e03e460-osc-asan.txt"
|
||||
},
|
||||
"xcode-list": {
|
||||
"args": [
|
||||
"xcodebuild",
|
||||
"-list",
|
||||
"-project",
|
||||
"beatygril/beatygril.xcodeproj"
|
||||
],
|
||||
"returncode": 0,
|
||||
"stdout": "Command line invocation:\n /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -list -project beatygril/beatygril.xcodeproj\n\nInformation about project \"beatygril\":\n Targets:\n Wrapper Application\n XPC Service\n\n Build Configurations:\n Debug\n Release\n\n If no build configuration is specified and -scheme is not passed then \"Release\" is used.\n\n Schemes:\n Wrapper Application\n XPC Service\n\n",
|
||||
"stderr": "",
|
||||
"elapsedSeconds": 1.096,
|
||||
"environment": {},
|
||||
"transcript": "/Users/dayu/Documents/PaintFCP/build/delivery/recovery-e03e460-xcode-list.txt"
|
||||
}
|
||||
},
|
||||
"testSummary": {
|
||||
"checks": {
|
||||
"beauty": 49,
|
||||
"face": 116,
|
||||
"host": 117,
|
||||
"osc": 98
|
||||
},
|
||||
"total": 380,
|
||||
"failures": 0,
|
||||
"asan": [
|
||||
"host",
|
||||
"osc"
|
||||
]
|
||||
},
|
||||
"workspaceDifferencesFromTarget": [],
|
||||
"workspaceExpectedDocumentationDifferencesOnly": true,
|
||||
"clonePostCheckTrackedDiff": {
|
||||
"args": [
|
||||
"git",
|
||||
"status",
|
||||
"--porcelain",
|
||||
"--untracked-files=no"
|
||||
],
|
||||
"returncode": 0,
|
||||
"stdout": "",
|
||||
"stderr": ""
|
||||
},
|
||||
"passed": true,
|
||||
"notes": [
|
||||
"Expected RECOVERY.md/docs/验证记录.md edits after source freeze do not invalidate byte recovery of this commit.",
|
||||
"scripts/checkpoint.py mode 100644 is usable through explicit python3 invocation; --help passed.",
|
||||
"Only standalone CLI test programs and Xcode project listing were executed. No APP build or host/UI execution."
|
||||
],
|
||||
"temporaryCloneRemoved": true,
|
||||
"completedAt": "2026-10-21T10:42:59.816535+00:00"
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
独立远端恢复验收:通过
|
||||
源码节点:e03e460a9b3e5ad489aad24095485ba10ceb987d
|
||||
远程:https://dayu.media/git/dayu/paintfcp-fxplug.git
|
||||
远程 main 与节点精确一致。
|
||||
|
||||
新临时克隆 detached 检出:51 个跟踪文件逐 byte/blob/模式一致。
|
||||
必要 9 项资源完整(包含标准 Drop Zone.tiff、NASA astronaut fixture 与授权说明)。
|
||||
git fsck --full --strict 通过;无 LFS 指针、无子模块。
|
||||
|
||||
完整离屏检查 380:Beauty49 + Face116 + Host117 + OSC98,零失败。
|
||||
Host、OSC 均使用 AddressSanitizer,通过。
|
||||
xcodebuild -list 通过;未构建 APP。
|
||||
|
||||
工作区相对源码节点的预期文档差异:
|
||||
- 无
|
||||
checkpoint.py 模式 100644;python3 scripts/checkpoint.py --help 已通过。
|
||||
未修改源码、提交、安装、启动 APP 或操作宿主 UI。
|
||||
本次临时克隆已清理。
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"version": "1.0.4",
|
||||
"build": "6",
|
||||
"mainBundleID": "com.dayu.beatygril",
|
||||
"pluginBundleID": "com.dayu.beatygril.fxplug",
|
||||
"sourceCommit": "e03e460a9b3e5ad489aad24095485ba10ceb987d",
|
||||
"notarization": {
|
||||
"status": "Accepted",
|
||||
"id": "8eb96294-5935-49ff-a487-3c4f60c27395",
|
||||
"message": "Processing complete"
|
||||
},
|
||||
"architectures": "x86_64 arm64",
|
||||
"inventoryRoots": [
|
||||
"/Users/dayu/Documents/PaintFCP",
|
||||
"/Users/dayu/Library/Developer/Xcode/DerivedData",
|
||||
"/Users/dayu/Downloads",
|
||||
"/Users/dayu/Desktop",
|
||||
"/Applications",
|
||||
"/Library/Plug-Ins/FxPlug",
|
||||
"/tmp/paintfcp-build-20261021"
|
||||
],
|
||||
"appCopiesBeforeCleanup": [
|
||||
"/Users/dayu/Documents/PaintFCP/build/delivery/previous-beatygril.app",
|
||||
"/Library/Plug-Ins/FxPlug/beatygril.app",
|
||||
"/tmp/paintfcp-build-20261021/Build/Products/Release/beatygril.app"
|
||||
],
|
||||
"inventoryErrors": [],
|
||||
"appCopiesAfterCleanup": [
|
||||
"/Library/Plug-Ins/FxPlug/beatygril.app"
|
||||
],
|
||||
"temporaryBuildRemoved": true,
|
||||
"previousBackupRemoved": true,
|
||||
"notarizationZipRemoved": true,
|
||||
"registry": "com.dayu.beatygril.fxplug(1.1)\n\t Path = /Library/Plug-Ins/FxPlug/beatygril.app/Contents/PlugIns/beatygril XPC Service.pluginkit\n\t UUID = 6E26839B-7A7D-4BF9-B3EA-EA0F0F35F54D\n\t Timestamp = 2026-10-21 10:43:01 +0000\n\t Parent Bundle = /Library/Plug-Ins/FxPlug/beatygril.app\n\t Display Name = 大鱼人像美化\n\t Short Name = beatygril XPC Service\n\t Parent Name = beatygril\n\t Platform = macOS\n\n (1 plug-in)",
|
||||
"hostValidation": {
|
||||
"Motion": "1.0.4 formal plugin loaded real-video project and produced beauty + primary tracking box; playhead changed across source positions; no offline analysis enabled in project. Native explicit OSC click test incomplete due user interaction.",
|
||||
"FCP": "Template input/brightness passed native tests before realtime alignment; 1.0.4 automatic-follow native FCP test not yet performed.",
|
||||
"handoff": "User explicitly requested to operate Motion/FCP for self-testing; automation ceased."
|
||||
},
|
||||
"installedFinalChecks": {
|
||||
"signature": {
|
||||
"exit": 0,
|
||||
"output": ""
|
||||
},
|
||||
"ticket": {
|
||||
"exit": 0,
|
||||
"output": "Processing: /Library/Plug-Ins/FxPlug/beatygril.app\nThe validate action worked!\n"
|
||||
},
|
||||
"gatekeeper": {
|
||||
"exit": 0,
|
||||
"output": "/Library/Plug-Ins/FxPlug/beatygril.app: accepted\nsource=Notarized Developer ID\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
Beauty renderer: 49 checks, 0 failures (Metal).
|
||||
2026-10-21 20:18:32.623 face-tests[6394:5408005] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2
|
||||
Face processing: 116 checks passed
|
||||
2026-10-21 20:18:36.942 slim-tests[6433:5408137] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2
|
||||
PASS: 224 slim alignment checks; maximum UV oracle error 1.09828022e-05
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"status": "installed_user_qa_pending",
|
||||
"bundleIdentifier": "com.dayu.beatygril",
|
||||
"installationPath": "/Library/Plug-Ins/FxPlug/beatygril.app",
|
||||
"options": {
|
||||
"waitForHosts": true,
|
||||
"userTests": true,
|
||||
"resumePrepared": true
|
||||
},
|
||||
"nativeEffectQA": {
|
||||
"status": "pending_user",
|
||||
"performedByScript": false
|
||||
},
|
||||
"source": {
|
||||
"commit": "abe97ed0cbd5a2b5ffda6ebdb486d3bff9170964",
|
||||
"trackedWorktreeChanges": []
|
||||
},
|
||||
"updatedAt": "2026-10-21T12:23:23.275614+00:00",
|
||||
"version": "1.0.5",
|
||||
"build": "7",
|
||||
"stagingSignature": "Executable=/private/tmp/paintfcp-build-20261021/Build/Products/Release/beatygril.app/Contents/MacOS/beatygril\nIdentifier=com.dayu.beatygril\nFormat=app bundle with Mach-O universal (x86_64 arm64)\nCodeDirectory v=20500 size=478 flags=0x10000(runtime) hashes=4+7 location=embedded\nHash type=sha256 size=32\nCandidateCDHash sha256=573debde15f2628c7bc7c6ed9a4cdeabd33f7518\nCandidateCDHashFull sha256=573debde15f2628c7bc7c6ed9a4cdeabd33f7518762fa036f842d998dd623720\nHash choices=sha256\nCMSDigest=573debde15f2628c7bc7c6ed9a4cdeabd33f7518762fa036f842d998dd623720\nCMSDigestType=2\nCDHash=573debde15f2628c7bc7c6ed9a4cdeabd33f7518\nSignature size=8968\nAuthority=Developer ID Application: zhong luo (B3W25FX5H5)\nAuthority=Developer ID Certification Authority\nAuthority=Apple Root CA\nTimestamp=Oct 21, 2026 at 20:20:14\nInfo.plist entries=22\nTeamIdentifier=B3W25FX5H5\nRuntime Version=27.0.0\nSealed Resources version=2 rules=13 files=4\nInternal requirements count=1 size=180\nTotal signatures=1\nChosen signature=1\n",
|
||||
"notarization": {
|
||||
"id": "7d7034f8-7389-410f-ad8e-9e722408c0fc",
|
||||
"status": "Accepted",
|
||||
"message": "Processing complete"
|
||||
},
|
||||
"resumedBy": {
|
||||
"commit": "a6551c334fd1a0883259700b802174955c78376a",
|
||||
"trackedWorktreeChanges": []
|
||||
},
|
||||
"signingVerified": true,
|
||||
"stapleValidated": true,
|
||||
"stagingPluginUnregistered": true,
|
||||
"runningHosts": [],
|
||||
"installedSignature": "Executable=/Library/Plug-Ins/FxPlug/beatygril.app/Contents/MacOS/beatygril\nIdentifier=com.dayu.beatygril\nFormat=app bundle with Mach-O universal (x86_64 arm64)\nCodeDirectory v=20500 size=478 flags=0x10000(runtime) hashes=4+7 location=embedded\nHash type=sha256 size=32\nCandidateCDHash sha256=573debde15f2628c7bc7c6ed9a4cdeabd33f7518\nCandidateCDHashFull sha256=573debde15f2628c7bc7c6ed9a4cdeabd33f7518762fa036f842d998dd623720\nHash choices=sha256\nCMSDigest=573debde15f2628c7bc7c6ed9a4cdeabd33f7518762fa036f842d998dd623720\nCMSDigestType=2\nCDHash=573debde15f2628c7bc7c6ed9a4cdeabd33f7518\nSignature size=8968\nAuthority=Developer ID Application: zhong luo (B3W25FX5H5)\nAuthority=Developer ID Certification Authority\nAuthority=Apple Root CA\nTimestamp=Oct 21, 2026 at 20:20:14\nNotarization Ticket=stapled\nInfo.plist entries=22\nTeamIdentifier=B3W25FX5H5\nRuntime Version=27.0.0\nSealed Resources version=2 rules=13 files=4\nInternal requirements count=1 size=180\nTotal signatures=1\nChosen signature=1\n",
|
||||
"installedSignatureVerified": true,
|
||||
"installedStapleValidated": true,
|
||||
"gatekeeperAccepted": true,
|
||||
"pluginDiscovery": {
|
||||
"bundleIdentifier": "com.dayu.beatygril.fxplug",
|
||||
"formalPath": "/Library/Plug-Ins/FxPlug/beatygril.app/Contents/PlugIns/beatygril XPC Service.pluginkit",
|
||||
"output": " com.dayu.beatygril.fxplug(1.1)\tF419A538-F395-459D-9984-AC46EAB5E83D\t2026-10-21 12:23:23 +0000\t/Library/Plug-Ins/FxPlug/beatygril.app/Contents/PlugIns/beatygril XPC Service.pluginkit\n (1 plug-in)\n"
|
||||
},
|
||||
"removedGeneratedPaths": [
|
||||
"/Users/dayu/Documents/PaintFCP/build/delivery/previous-beatygril.app",
|
||||
"/tmp/paintfcp-build-20261021",
|
||||
"/Users/dayu/Documents/PaintFCP/build/delivery/notarization.zip"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
2026-10-21 20:18:33.844 host-tests[6427:5408121] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2
|
||||
Default IOSurface maximum byte difference: 0
|
||||
Alternate destination tag maximum byte difference: 0
|
||||
Host adapter: 117 checks, 0 failures
|
||||
@@ -0,0 +1,2 @@
|
||||
com.dayu.beatygril.fxplug(1.1) F419A538-F395-459D-9984-AC46EAB5E83D 2026-10-21 12:23:23 +0000 /Library/Plug-Ins/FxPlug/beatygril.app/Contents/PlugIns/beatygril XPC Service.pluginkit
|
||||
(1 plug-in)
|
||||
@@ -0,0 +1,24 @@
|
||||
Executable=/Library/Plug-Ins/FxPlug/beatygril.app/Contents/MacOS/beatygril
|
||||
Identifier=com.dayu.beatygril
|
||||
Format=app bundle with Mach-O universal (x86_64 arm64)
|
||||
CodeDirectory v=20500 size=478 flags=0x10000(runtime) hashes=4+7 location=embedded
|
||||
Hash type=sha256 size=32
|
||||
CandidateCDHash sha256=573debde15f2628c7bc7c6ed9a4cdeabd33f7518
|
||||
CandidateCDHashFull sha256=573debde15f2628c7bc7c6ed9a4cdeabd33f7518762fa036f842d998dd623720
|
||||
Hash choices=sha256
|
||||
CMSDigest=573debde15f2628c7bc7c6ed9a4cdeabd33f7518762fa036f842d998dd623720
|
||||
CMSDigestType=2
|
||||
CDHash=573debde15f2628c7bc7c6ed9a4cdeabd33f7518
|
||||
Signature size=8968
|
||||
Authority=Developer ID Application: zhong luo (B3W25FX5H5)
|
||||
Authority=Developer ID Certification Authority
|
||||
Authority=Apple Root CA
|
||||
Timestamp=Oct 21, 2026 at 20:20:14
|
||||
Notarization Ticket=stapled
|
||||
Info.plist entries=22
|
||||
TeamIdentifier=B3W25FX5H5
|
||||
Runtime Version=27.0.0
|
||||
Sealed Resources version=2 rules=13 files=4
|
||||
Internal requirements count=1 size=180
|
||||
Total signatures=1
|
||||
Chosen signature=1
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"version": "1.0.5",
|
||||
"build": "7",
|
||||
"uiOperations": 0,
|
||||
"template": {
|
||||
"path": "/Users/dayu/Movies/Motion Templates.localized/Effects.localized/大鱼/大鱼人像美化/大鱼人像美化.moef",
|
||||
"sha256": "ba08de6916cd837b3733aa0c6fcb78f2e8224431d25e1310089ae67d18445f2d",
|
||||
"resourceVerified": true
|
||||
},
|
||||
"codesign": "",
|
||||
"xcrun": "Processing: /Library/Plug-Ins/FxPlug/beatygril.app\nThe validate action worked!",
|
||||
"spctl": "/Library/Plug-Ins/FxPlug/beatygril.app: accepted\nsource=Notarized Developer ID",
|
||||
"Contents/MacOS/beatygril": "x86_64 arm64",
|
||||
"Contents/PlugIns/beatygril XPC Service.pluginkit/Contents/MacOS/beatygril XPC Service": "x86_64 arm64",
|
||||
"duplicateInventory": {
|
||||
"scopes": [
|
||||
"/Users/dayu/Documents/PaintFCP",
|
||||
"/Users/dayu/Library/Developer/Xcode/DerivedData",
|
||||
"/Users/dayu/Desktop",
|
||||
"/Users/dayu/Downloads",
|
||||
"/Applications",
|
||||
"/Library/Plug-Ins/FxPlug",
|
||||
"/Users/dayu/Library/Plug-Ins/FxPlug"
|
||||
],
|
||||
"matchingOuterApps": [
|
||||
"/Library/Plug-Ins/FxPlug/beatygril.app"
|
||||
],
|
||||
"errors": []
|
||||
},
|
||||
"discovery": " com.dayu.beatygril.fxplug(1.1)\tF419A538-F395-459D-9984-AC46EAB5E83D\t2026-10-21 12:23:23 +0000\t/Library/Plug-Ins/FxPlug/beatygril.app/Contents/PlugIns/beatygril XPC Service.pluginkit\n (1 plug-in)\n",
|
||||
"status": "installed_verified_user_visual_tests_pending"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"id":"7d7034f8-7389-410f-ad8e-9e722408c0fc","status":"Accepted","message":"Processing complete"}
|
||||
@@ -0,0 +1,21 @@
|
||||
2026-10-21 20:18:34.451 osc-tests[6459:5408235] PGFaceOSC point-write desired=(0.25,0.75) setter=(0.25,0.75) readback=(0.25,0.75) mode=normalized verified=1
|
||||
2026-10-21 20:18:34.466 osc-tests[6459:5408235] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(80,180) surface=320x240 origin=0
|
||||
2026-10-21 20:18:34.897 osc-tests[6459:5408235] PGFaceOSC point-write desired=(0.8,0.3) setter=(1152,-432) readback=(0.8,0.3) mode=centered-pixels verified=1
|
||||
2026-10-21 20:18:34.897 osc-tests[6459:5408235] PGFaceOSC coordinates selection=(0.7,0.4) objectBounds=(-1920,-1080,3840,2160) canvas=(152,78) surface=320x240 origin=0
|
||||
2026-10-21 20:18:34.948 osc-tests[6459:5408235] PGFaceOSC point-write desired=(0.8,0.3) setter=(0.8,0.3) readback=(0.12345,0.87654) mode=normalized verified=0
|
||||
2026-10-21 20:18:34.948 osc-tests[6459:5408235] PGFaceOSC point-write desired=(0.75,0.25) setter=(0.75,0.25) readback=(0.75,0.25) mode=normalized verified=1
|
||||
2026-10-21 20:18:34.948 osc-tests[6459:5408235] PGFaceOSC coordinates selection=(0.75,0.25) objectBounds=(-100,-50,200,100) canvas=(160,60) surface=320x240 origin=0
|
||||
2026-10-21 20:18:35.005 osc-tests[6459:5408235] PGFaceOSC point-write desired=(0.625,0.375) setter=(0.625,0.375) readback=(0.625,0.375) mode=normalized verified=1
|
||||
2026-10-21 20:18:35.005 osc-tests[6459:5408235] PGFaceOSC coordinates selection=(0.625,0.375) objectBounds=(-100,-50,200,100) canvas=(240,60) surface=320x240 origin=0
|
||||
2026-10-21 20:18:35.057 osc-tests[6459:5408235] PGFaceOSC point-write desired=(0.25,0.75) setter=(0.25,0.75) readback=(0.25,0.75) mode=normalized verified=1
|
||||
2026-10-21 20:18:35.057 osc-tests[6459:5408235] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(144,180) surface=320x240 origin=0
|
||||
2026-10-21 20:18:35.108 osc-tests[6459:5408235] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1
|
||||
2026-10-21 20:18:35.108 osc-tests[6459:5408235] PGFaceOSC coordinates selection=(0,1) objectBounds=(-100,-50,200,100) canvas=(100,140) surface=320x240 origin=0
|
||||
2026-10-21 20:18:35.167 osc-tests[6459:5408235] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(nan,nan) surface=320x240 origin=0
|
||||
2026-10-21 20:18:35.217 osc-tests[6459:5408235] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1
|
||||
2026-10-21 20:18:35.217 osc-tests[6459:5408235] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(inf,nan) surface=320x240 origin=0
|
||||
2026-10-21 20:18:35.267 osc-tests[6459:5408235] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1
|
||||
2026-10-21 20:18:35.267 osc-tests[6459:5408235] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(80,nan) surface=320x240 origin=0
|
||||
2026-10-21 20:18:35.316 osc-tests[6459:5408235] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1
|
||||
2026-10-21 20:18:35.316 osc-tests[6459:5408235] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1
|
||||
OSC adapter: 98 checks, 0 failures
|
||||
@@ -0,0 +1,11 @@
|
||||
Independent remote recovery test
|
||||
Target: abe97ed0cbd5a2b5ffda6ebdb486d3bff9170964
|
||||
Command: zsh scripts/test.sh
|
||||
Exit code: 0
|
||||
|
||||
Beauty renderer: 49 checks, 0 failures (Metal).
|
||||
Face processing: 116 checks passed
|
||||
PASS: 224 slim alignment checks; maximum UV oracle error 1.09828022e-05
|
||||
|
||||
2026-10-21 20:20:38.246 face-tests[7122:5413459] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2
|
||||
2026-10-21 20:20:40.227 slim-tests[7129:5413512] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2
|
||||
@@ -0,0 +1,740 @@
|
||||
{
|
||||
"target": "abe97ed0cbd5a2b5ffda6ebdb486d3bff9170964",
|
||||
"remote": "https://dayu.media/git/dayu/paintfcp-fxplug.git",
|
||||
"startedAt": "2026-10-21T12:20:32.822716+00:00",
|
||||
"temporaryClone": "/var/folders/t4/kbc10sqs43b0rjf3nfh51nmw0000gn/T/paintfcp-recovery-abe97ed-um2yk1vm/clone",
|
||||
"scope": "Independent source recovery plus scripts/test.sh only; no APP build, host execution/UI, installation, root source changes, commit, host/OSC ASan or delivery-lock operation.",
|
||||
"cloneHead": "abe97ed0cbd5a2b5ffda6ebdb486d3bff9170964",
|
||||
"files": {
|
||||
"count": 69,
|
||||
"allByteBlobAndModeEqual": true,
|
||||
"entries": [
|
||||
{
|
||||
"path": ".gitignore",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "d2bca6e38076bb5f7574cc7781eadef27b41d9ff",
|
||||
"bytes": 490,
|
||||
"sha256": "34e63260d343569ad4d5a1ffd6c15647da5a7da2b8940dc93f6d987c7fec474e",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "README.md",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "d0282233a2a630f2a00a7bd1e3342ba4f3a0791a",
|
||||
"bytes": 3167,
|
||||
"sha256": "3f1d5c727a335ef862837db92a57ba684424e802cbdee4d64f6bdae069e43076",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "RECOVERY.md",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "d97c7731d0a3d349c72982ad156a581ef6a03a87",
|
||||
"bytes": 4183,
|
||||
"sha256": "2f310d4b5f4df318b8b522963c3f1bbe35c1e2a3b3ed85a112d59fc10205c36a",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/Drop Zone.tiff",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "6d15c98bc221f999514f197ff67a7145836e6a38",
|
||||
"bytes": 420128,
|
||||
"sha256": "a7f8e3a2a431dbb3ce9e777040bb55e701cfe9ab9632e8cbb10359732bc8692e",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/PARAMETERS.json",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "df2c01f370e6ee639d2950774fe8020742802c17",
|
||||
"bytes": 9815,
|
||||
"sha256": "bb561b0dfff90223f0925a60ec05b28518e22163a6bf7922c4efc6d155ddbabb",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/README.md",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "46cf59f6b4500b32c5a203a63a79a491a2202cdf",
|
||||
"bytes": 4420,
|
||||
"sha256": "c57ef81f43271d566a0488385d5f6b8e492142bae0860049bcbf943206b0c567",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/VALIDATION.json",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "63aa4f2ce4e1e72ce8b255d5f98fe209e2354c09",
|
||||
"bytes": 1872,
|
||||
"sha256": "558ac5ff3bee28e6d3df41cc5ffd9a43cd51fca2fd001fff8641260c327e351d",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/大鱼人像美化.moef",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "f68569a62b399cf7ad1ee2b33427372fc9b6b913",
|
||||
"bytes": 22996,
|
||||
"sha256": "ba08de6916cd837b3733aa0c6fcb78f2e8224431d25e1310089ae67d18445f2d",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril.xcodeproj/project.pbxproj",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "db5251bf3c337b865621e771a4b28690214f1c8e",
|
||||
"bytes": 22986,
|
||||
"sha256": "e9b9be100e53003f6bba96658d3a36078bb607236958e43aec6ed59f8c73ce32",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "919434a6254f0e9651f402737811be6634a03e9c",
|
||||
"bytes": 135,
|
||||
"sha256": "7f3b00b5c3fdb45242d7b87e1e5c4e25d1fa8129a16c94295ecc4e8ea2235c5f",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/Info.plist",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "95542fa8c27e6770b9266389f0aa34027053e31f",
|
||||
"bytes": 3030,
|
||||
"sha256": "865f1775fb476ff1f22556141b41b25d3569c05e4aa1d2450cccdcb06de6aa4c",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/PGBeautyRenderer.h",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "a0a6965c837072e6d837a98b701d59b1cc139655",
|
||||
"bytes": 1410,
|
||||
"sha256": "4e9b663c47261e4feceb7ab38c25171b65f36c14417d82a8b7c49ee3201492d3",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/PGBeautyRenderer.m",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "4c9fc6fbb1dc1f2c4048a16435f554cae9f2ca74",
|
||||
"bytes": 17132,
|
||||
"sha256": "00b52b1f22c1e875f137ee4ea90f50d6caa38db277bebd0da538d0ba7e66072b",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/PGBeautyTypes.h",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "e1cd3ef21f37b831cdaa7d9f52211cafaf243994",
|
||||
"bytes": 1149,
|
||||
"sha256": "6ea8005accc22f85fe8be1b73bf6e89a5b37ffd6e97460d4f6dd69d55eaf33cc",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/PGFaceProcessor.h",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "0b861830a6e9652d81ccfe62f2ce758febee449f",
|
||||
"bytes": 2178,
|
||||
"sha256": "a3448bd75fd278c9702f079f55637ba2c26bc820bdbb81f49fb3a3d0e2a4aba5",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/PGFaceProcessor.m",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "08c1e85455da07203e4ee30a5410fb10cb9e78c7",
|
||||
"bytes": 42670,
|
||||
"sha256": "445aac56a8ff7332c3b94c6ad5b37b9e412af757995a8332ae2e70066d348d7e",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/PGFaceSelectOSC.m",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "ae0aa7ce1c2de355b2c1cb890314a0de689df81a",
|
||||
"bytes": 11630,
|
||||
"sha256": "d5e1dd1db6825730803ddc3f21b588cd548cbbacc60760aa45ad9e2feedae307",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/PGParameterIDs.h",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "4cc0e20af1e659f1e8e666fabe01003c06cfd885",
|
||||
"bytes": 932,
|
||||
"sha256": "8fdfa2021131317ce09532d27fd6f34fb0b505f7b17c561819336ad2a06c42cc",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/beatygrilPlugIn.h",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "12dca07a744c064d5d474e0294304ca29055a077",
|
||||
"bytes": 347,
|
||||
"sha256": "4f00716328c9237b79cc58153ba47d8ac8ddc1786939cb206bd37b01e3b6397e",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/beatygrilPlugIn.m",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "3f148956b32770c7db5b0df97700fd96f7e20025",
|
||||
"bytes": 24193,
|
||||
"sha256": "b8f4326ed3eb2de74770e4ea266d09ebe4aea70428a4511f0ec501a0cd89b247",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/en.lproj/InfoPlist.strings",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "9a5f27348a39c8e3ee50cffc2fb359c78a1319c8",
|
||||
"bytes": 85,
|
||||
"sha256": "1b1cd5b74690bd5a74cf2b0a0c068bbc2c3462c5e9fe5ca3e61541bcbd451a7a",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/en.lproj/Localizable.strings",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "7f52f3dd719cb4f94e24867e36114cb061ef0b92",
|
||||
"bytes": 132,
|
||||
"sha256": "b3036a2339b97ebf264516e1e534351d1ceb64f45942595508f4d67d07b07769",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/main.m",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "34d50d3f8cdf438d3508d0aa94e3f2d20e45f962",
|
||||
"bytes": 114,
|
||||
"sha256": "5b812ddb1ef171fe075e4faf13d761935ca73ecbba1be0bd9d4802a64a7759cd",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/AppDelegate.h",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "f3f8e19cfe057114c2289ff37c01c2e6e1aa7ed0",
|
||||
"bytes": 167,
|
||||
"sha256": "3fc6516be93176f90c2deb17332c9cf98e670458a33fbad4fe7b8f367ec9494f",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/AppDelegate.m",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "1cb56f073356dd30add33415117bf4c24fdc4ef0",
|
||||
"bytes": 3003,
|
||||
"sha256": "acef6ade6591c039cd8b3e603f83d6d06f64da9709a0385b73c8588e824fe6de",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/Base.lproj/MainMenu.xib",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "57d03a50e249d189c5fa0a4602c5ec846f06612d",
|
||||
"bytes": 50614,
|
||||
"sha256": "7f0945bc5903a658550b712267870edecbdf1b73ac83c71f1358468f40c1ab1d",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/Info.plist",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "a1fe6cdcfe8e41f2de4ee07525e192e52723d760",
|
||||
"bytes": 1084,
|
||||
"sha256": "7b3ff213b68dda774306a96835cf4743e3998e23dd7ac4b20cbdb3cf709d7b8b",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/SandboxEntitlements.entitlements",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "852fa1a4728ae4789e3bca55dd07caef3b41f2a5",
|
||||
"bytes": 240,
|
||||
"sha256": "b746c74b201e6af4e0864fbd1f4f629f96156a7ec4b7208bc995d0a5089bb592",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/en.lproj/Credits.rtf",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "da779d0f6bec11568066e347a01ccef0308488b2",
|
||||
"bytes": 264,
|
||||
"sha256": "ec846e198df85720e8443abb810334411b5690386f3062f90208c23b8575f28a",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/en.lproj/InfoPlist.strings",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/main.m",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "99ad4384792f9b2050e0755c07522c0dab9b4b86",
|
||||
"bytes": 112,
|
||||
"sha256": "5c3dc97a53d0379af0e0ce75c5541f33c47f2da115d2d0018cfba003d185a63d",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/REA-分析与复刻说明.md",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "6581570f9d140ef8d0e00f19d9285d44a6ae3813",
|
||||
"bytes": 10519,
|
||||
"sha256": "ee64e260fd9261856047096570b8fed308284b3a02cd0dd892f3ceda6a5482ab",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/auto-follow-report.json",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "e60d6d055a513ab8e9c21d2b39460c9d0698e1d3",
|
||||
"bytes": 15665,
|
||||
"sha256": "1a0c91efcaee058f331f6a7446bea8794af1dcf9120f5c2585f249b188d038e3",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/beauty-preview.png",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "35ace472cb42629b01b3e05660cb7be8b9711fd7",
|
||||
"bytes": 617622,
|
||||
"sha256": "37aa97855915a49ff1f225a9e1fa9d8bcbed0be5f4109b6835ba4db17f9113f6",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/face-preview.png",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "9a5bab3ad706b95ac32875352d16d6580dcd48ab",
|
||||
"bytes": 713552,
|
||||
"sha256": "6cc662cbb2b554a0dd8c926d94a0d819506ac76710d9c09c2d3d7f808fbf686b",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/rea-auto-tracking.json",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "2f5738f934f0ce89780cf4535c7257b54a397bef",
|
||||
"bytes": 2883488,
|
||||
"sha256": "dc1007f3798fade5e454bb2ef0b58e4cfe2bb0256948c364070fd9af70a97377",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/rea-host.json",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "9de443173a74668f0a2dced3426dae20549a16dd",
|
||||
"bytes": 10111,
|
||||
"sha256": "141866459948b19d5378de2f6534de333c795e317416f2ac6c9fdc86c94dd61a",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/rea-plugin.json",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "79bcafbcfeda694ed466d95f81f30eb622a95a0b",
|
||||
"bytes": 343165,
|
||||
"sha256": "dda6e450915e1054653c28addfed5254c678dccf14ee66643d508e7087c1f0c1",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/rea-slim-pose.json",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "249eb3678b20c378e0d73239e0949cc86c2af436",
|
||||
"bytes": 343127,
|
||||
"sha256": "5f4a2dfe5796ce72bb3d022a85a42cd5ed0eceb0cd0655041812126ebec7933a",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/reference-template-parameters.json",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "9947e2ff182a146bc4c9120dfff7eacc8cca9c0c",
|
||||
"bytes": 1608,
|
||||
"sha256": "026e47e8ecbd9a967d8b8aabddac2a370479a43b9e1a7a7728b5b01a5002f006",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/slim-pose-report.json",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "755e0dfcb6eef016e932415ad8c391b97f8de575",
|
||||
"bytes": 8724,
|
||||
"sha256": "512d22abc2b08860adb64c38efa0f8e3474b45e3dbd19cb81406b1d9e7060f06",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/analysis/脸型变形与转脸分析.md",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "b98271ebd17b745d2e16e6357578eac6a757c1c1",
|
||||
"bytes": 8789,
|
||||
"sha256": "0121d022e4ba430b9fd62b9a13da5b84d03866eb0d541e64e4da3204730c03cf",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/verification/installed-signature.txt",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "78fc46fd6aee5443af9eeb53a97502d0251cf2a9",
|
||||
"bytes": 988,
|
||||
"sha256": "add93ef0fa60cd32ed766c965e6f2869f56b4da65030e774e76d133b02ef7aec",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/verification/live-face-asan.txt",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "b92d565bec7a49444b638437b4ae8e7400ce90f6",
|
||||
"bytes": 219,
|
||||
"sha256": "b956e0fe7a3fccdd8eff8788807c0aaf60da56aa1cb153087f25234cc156c27d",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/verification/notarization.json",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "86d17c6738b9e0aa6f92583ffc798c2e6b6bece1",
|
||||
"bytes": 98,
|
||||
"sha256": "91b4f5e239a50467bde83b8c40c1c1809f85cd4eb4b1f1091e1b2197c11a79b6",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/verification/recovery-e03e460-beauty-face.txt",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "2c6f0b5e7f7dedf9571d6da6ce67303bf34faedc",
|
||||
"bytes": 298,
|
||||
"sha256": "45698c80fdfc68c2dc68be59ba03380aa6e8194731d4858dc009f827dd06e226",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/verification/recovery-e03e460-host-asan.txt",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "7eeed088f0dad0564aa166232aedb9ae47a56dd0",
|
||||
"bytes": 380,
|
||||
"sha256": "65d0226f95e882702484849997fde558fae7af418e9243702f789b1e2fcacf14",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/verification/recovery-e03e460-osc-asan.txt",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "7abde29290bfea1e475af387899fb3160a60cc95",
|
||||
"bytes": 3336,
|
||||
"sha256": "2e326d2fc0eb5d2cdd9f07e2318dfd17a41d346a82f383b05b51f416ffdacdb3",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/verification/recovery-e03e460-xcode-list.txt",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "e90278ec1aedf6a1176682ec1037e49ba2f588c1",
|
||||
"bytes": 570,
|
||||
"sha256": "ff9ffb300caac840f4e64f97f24712e319af9bbe4cee1dbbd79b0a5caa1432d1",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/verification/recovery-e03e460.json",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "ecd24b6f35c893c3637dc4e268d0acabb4d09967",
|
||||
"bytes": 25360,
|
||||
"sha256": "559839e989fb4fa9589847632975a6d4d8548c00e6ad5b87bdba736bb3e1daf3",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/verification/recovery-e03e460.txt",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "ed81f4abdeada50c1afb2ac866d3cc79fd6579d9",
|
||||
"bytes": 846,
|
||||
"sha256": "3931beb81cf475ce1c44e5b90c8e9101abb1a7ba20b657d72090b6e7662530cc",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/verification/release-receipt.json",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "e53f21de9e8ea68a40f435cf9e3d1a0d95499bde",
|
||||
"bytes": 2454,
|
||||
"sha256": "07ba4f5bbba101a49d4579c0b79fbce0dad70a1e4b5887e61e052741c49486ee",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/verification/v1.0.5/core-tests.txt",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "76d29d91672ec631950b2f3ada1db39db4c877ac",
|
||||
"bytes": 427,
|
||||
"sha256": "408910aeedcf0155bc31ef43ca6e8994d9348f8fbdc0c25eb8a43ce89965e081",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/verification/v1.0.5/host-tests.txt",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "3e1c1c6b7c104995a2656e142671759634352525",
|
||||
"bytes": 271,
|
||||
"sha256": "c727d9d56a0b46a4cdbc79d24eeedc589e5984b38144f28ccf017f4d65f504f7",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/verification/v1.0.5/osc-tests.txt",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "c9c618896ca3ee0c2a943979103ab3b42335c7e0",
|
||||
"bytes": 3229,
|
||||
"sha256": "5e443009bc39635d01a1f6276b48170fe9da73c088646425c6ed140d87ba4518",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "docs/验证记录.md",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "2d2d97b0e13e876bc8ddf65aedf671cbeead8b6b",
|
||||
"bytes": 9154,
|
||||
"sha256": "8ece9ba47c81980a781ab00b73c961bd32c1acec2e09811f348375e162e29661",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "scripts/checkpoint.py",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "8248d1732aceed377d28cdae02873057f442474b",
|
||||
"bytes": 2218,
|
||||
"sha256": "3c27b0e603dd2d94512f611cec97bd9afe5809aea0f5a4bb213995d2e23366f8",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "scripts/deliver.py",
|
||||
"mode": "100755",
|
||||
"kind": "blob",
|
||||
"blob": "b20e2149f84307afd6198df71f967f4facb444bb",
|
||||
"bytes": 10848,
|
||||
"sha256": "dc5df519aaabc695adddff8e9087dcb6c6e9861036ab0efccf242a5fe12e0b78",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "scripts/inspect-face-geometry.m",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "d075cf7c8c9a23b9bd01bbcbc31da89fea84d5d3",
|
||||
"bytes": 6613,
|
||||
"sha256": "a2c54e7297f9f94e9c56c0b29f9ce607756705f2005c1f13e10996bc26c24b66",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "scripts/test-host.sh",
|
||||
"mode": "100755",
|
||||
"kind": "blob",
|
||||
"blob": "ef9c7f6436e3d1babbf272e9d329d65ec6c395cb",
|
||||
"bytes": 1129,
|
||||
"sha256": "7f55ed6de05e6cc59884fb7c96062676bd086f4ac745ae847511eacb12316467",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "scripts/test-osc.sh",
|
||||
"mode": "100755",
|
||||
"kind": "blob",
|
||||
"blob": "ffaed0b8d449eef6acf2fb352d9fea10fc1649fd",
|
||||
"bytes": 941,
|
||||
"sha256": "ed405cd214ce252641074d0ef0a12c4cc0faf3e1869fe92716a98fff7f9ac517",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "scripts/test.sh",
|
||||
"mode": "100755",
|
||||
"kind": "blob",
|
||||
"blob": "f13ba656929fe34b43c143bdfeb4a208c44c7428",
|
||||
"bytes": 932,
|
||||
"sha256": "3ca9cb120b452a0c402debbe5d3399fa4996e0ea0882253470791494815d530d",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "tests/beauty_render_tests.m",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "24050fb3a2630693253202ae1525c280f4f144eb",
|
||||
"bytes": 16870,
|
||||
"sha256": "b04eb2f0d78faec13bbdd2a3286cc74c46c2f536358c7c1c3d5d03c54daa868c",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "tests/face_tests.m",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "9fe21ddd021d1a2517fa8b75d7a65532f6fefedb",
|
||||
"bytes": 33180,
|
||||
"sha256": "0350abe9f206fc371f697c993f5dea420d512259f16947c7a1167569843b215a",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "tests/fixtures/ATTRIBUTION.txt",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "6e439ab97256952b0acd1eef0e1c1b4ab3ea015c",
|
||||
"bytes": 498,
|
||||
"sha256": "8823ad8aed1a5c1bdda93946e4b5ed24cd542e996a2b8087517cf62f7f4f2a84",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "tests/fixtures/astronaut.png",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "834cda0012478c5edc8d43bade96d315dedeaab4",
|
||||
"bytes": 791555,
|
||||
"sha256": "88431cd9653ccd539741b555fb0a46b61558b301d4110412b5bc28b5e3ea6cb5",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "tests/host_adapter_tests.m",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "8091c1523eb0b05295c391e20637c931d681e049",
|
||||
"bytes": 30363,
|
||||
"sha256": "77131c770222d3b404204fb04bf47cf943885eeff6acfc7498d59feb28eb1e73",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "tests/osc_tests.m",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "66fff5f78f8e0ba08026e53375b184a460a29162",
|
||||
"bytes": 22495,
|
||||
"sha256": "a3199147e32facd63373b53f77840408411b04436fb1dd42e2fb71023c8f2f8a",
|
||||
"byteBlobAndModeEqual": true
|
||||
},
|
||||
{
|
||||
"path": "tests/slim_tests.m",
|
||||
"mode": "100644",
|
||||
"kind": "blob",
|
||||
"blob": "3f7654f14e642f72ee57c2a5c3e92df39fe7346a",
|
||||
"bytes": 12759,
|
||||
"sha256": "701b52d7f803b44680586c215e5a351e4dc67661e5ea1a56ca5038567cd34cd6",
|
||||
"byteBlobAndModeEqual": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"requiredResources": [
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/大鱼人像美化.moef",
|
||||
"exists": true,
|
||||
"bytes": 22996
|
||||
},
|
||||
{
|
||||
"path": "Templates/大鱼人像美化/Drop Zone.tiff",
|
||||
"exists": true,
|
||||
"bytes": 420128
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/Base.lproj/MainMenu.xib",
|
||||
"exists": true,
|
||||
"bytes": 50614
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/en.lproj/Credits.rtf",
|
||||
"exists": true,
|
||||
"bytes": 264
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Wrapper Application/en.lproj/InfoPlist.strings",
|
||||
"exists": true,
|
||||
"bytes": 0
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/en.lproj/InfoPlist.strings",
|
||||
"exists": true,
|
||||
"bytes": 85
|
||||
},
|
||||
{
|
||||
"path": "beatygril/beatygril/Plugin/en.lproj/Localizable.strings",
|
||||
"exists": true,
|
||||
"bytes": 132
|
||||
},
|
||||
{
|
||||
"path": "tests/fixtures/astronaut.png",
|
||||
"exists": true,
|
||||
"bytes": 791555
|
||||
},
|
||||
{
|
||||
"path": "tests/fixtures/ATTRIBUTION.txt",
|
||||
"exists": true,
|
||||
"bytes": 498
|
||||
}
|
||||
],
|
||||
"gitFsck": {
|
||||
"args": [
|
||||
"git",
|
||||
"fsck",
|
||||
"--full",
|
||||
"--strict"
|
||||
],
|
||||
"returncode": 0,
|
||||
"stdout": "",
|
||||
"stderr": ""
|
||||
},
|
||||
"submodules": {
|
||||
"args": [
|
||||
"git",
|
||||
"submodule",
|
||||
"status",
|
||||
"--recursive"
|
||||
],
|
||||
"returncode": 0,
|
||||
"stdout": "",
|
||||
"stderr": ""
|
||||
},
|
||||
"lfsPointers": [],
|
||||
"remoteMain": {
|
||||
"args": [
|
||||
"git",
|
||||
"ls-remote",
|
||||
"origin",
|
||||
"refs/heads/main"
|
||||
],
|
||||
"returncode": 0,
|
||||
"stdout": "abe97ed0cbd5a2b5ffda6ebdb486d3bff9170964\trefs/heads/main\n",
|
||||
"stderr": ""
|
||||
},
|
||||
"processorUnchangedFromEc22": {
|
||||
"commit": "ec22f1b2cf541d02e7ffbd5cc4edbc4d0cd97311",
|
||||
"equal": true
|
||||
},
|
||||
"test": {
|
||||
"args": [
|
||||
"zsh",
|
||||
"scripts/test.sh"
|
||||
],
|
||||
"returncode": 0,
|
||||
"stdout": "Beauty renderer: 49 checks, 0 failures (Metal).\nFace processing: 116 checks passed\nPASS: 224 slim alignment checks; maximum UV oracle error 1.09828022e-05\n",
|
||||
"stderr": "2026-10-21 20:20:38.246 face-tests[7122:5413459] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2\n2026-10-21 20:20:40.227 slim-tests[7129:5413512] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2\n",
|
||||
"elapsedSeconds": 3.384
|
||||
},
|
||||
"testCounts": {
|
||||
"beauty": 49,
|
||||
"face": 116,
|
||||
"slim": 224
|
||||
},
|
||||
"testTotal": 389,
|
||||
"cloneTrackedWorktreeClean": true,
|
||||
"passed": true,
|
||||
"temporaryCloneRemoved": true,
|
||||
"completedAt": "2026-10-21T12:20:40.364542+00:00"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
独立恢复验收:通过
|
||||
源码节点:abe97ed0cbd5a2b5ffda6ebdb486d3bff9170964
|
||||
远程:https://dayu.media/git/dayu/paintfcp-fxplug.git
|
||||
远程 main 与节点一致。
|
||||
全部 69 个跟踪文件逐 byte/blob/模式一致;9 项必要资源完整。
|
||||
git fsck --full --strict 通过;无 LFS 指针、无子模块。
|
||||
独立 clone 内 scripts/test.sh:Beauty 49、Face 116、Slim 224;共 389 检查通过。
|
||||
未重复 Host/OSC ASan;未构建 APP、启动宿主、操作 UI、安装、修改源码、提交或操作交付锁。
|
||||
本次临时 clone 已清理。
|
||||
@@ -0,0 +1,2 @@
|
||||
2026-10-21 20:20:01.427 slim-asan[6677:5410585] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2
|
||||
PASS: 264 slim alignment checks; maximum UV oracle error 1.09828022e-05
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"checks": 12,
|
||||
"cases": 3,
|
||||
"includes_profile": true,
|
||||
"processor_sha256": "fe4f2a6fc28799cc9b81832baaa2d6739320bde9def175ecc8a4494d004d6b28",
|
||||
"max_pupil_sampling_displacement_px": 2.8653327774463833e-05,
|
||||
"peak_distance_to_real_chin_px": [
|
||||
1.1827483260479077,
|
||||
2.8140858161593
|
||||
],
|
||||
"positive_visual_direction": "toward lower lip",
|
||||
"negative_visual_direction": "away from lower lip",
|
||||
"actual_photos_and_full_geometry": "ignored local build only",
|
||||
"scope": "standalone actual PNG anatomy; bypasses FxPlug adapter; no native host operation"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
Beauty renderer: 49 checks, 0 failures (Metal).
|
||||
2026-10-21 20:48:04.999 face-tests[9473:5455578] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2
|
||||
Face processing: 116 checks passed
|
||||
2026-10-21 20:48:08.750 slim-tests[9480:5455684] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2
|
||||
PASS: 394 slim alignment checks; maximum UV oracle error 1.09828022e-05
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"status": "installed_user_qa_pending",
|
||||
"bundleIdentifier": "com.dayu.beatygril",
|
||||
"installationPath": "/Library/Plug-Ins/FxPlug/beatygril.app",
|
||||
"options": {
|
||||
"waitForHosts": true,
|
||||
"userTests": true
|
||||
},
|
||||
"nativeEffectQA": {
|
||||
"status": "pending_user",
|
||||
"performedByScript": false
|
||||
},
|
||||
"source": {
|
||||
"commit": "ad54726b17fabd11f46bc6121e664eac38960a23",
|
||||
"trackedWorktreeChanges": []
|
||||
},
|
||||
"updatedAt": "2026-10-21T13:53:56.294416+00:00",
|
||||
"version": "1.0.6",
|
||||
"build": "8",
|
||||
"stagingSignature": "Executable=/private/tmp/paintfcp-build-20261021/Build/Products/Release/beatygril.app/Contents/MacOS/beatygril\nIdentifier=com.dayu.beatygril\nFormat=app bundle with Mach-O universal (x86_64 arm64)\nCodeDirectory v=20500 size=478 flags=0x10000(runtime) hashes=4+7 location=embedded\nHash type=sha256 size=32\nCandidateCDHash sha256=66df95f2ce931ca96f52ee5cfa5ad664be49a6c8\nCandidateCDHashFull sha256=66df95f2ce931ca96f52ee5cfa5ad664be49a6c89b8cc1c206d68f0c162b8348\nHash choices=sha256\nCMSDigest=66df95f2ce931ca96f52ee5cfa5ad664be49a6c89b8cc1c206d68f0c162b8348\nCMSDigestType=2\nCDHash=66df95f2ce931ca96f52ee5cfa5ad664be49a6c8\nSignature size=8969\nAuthority=Developer ID Application: zhong luo (B3W25FX5H5)\nAuthority=Developer ID Certification Authority\nAuthority=Apple Root CA\nTimestamp=Oct 21, 2026 at 20:57:26\nInfo.plist entries=22\nTeamIdentifier=B3W25FX5H5\nRuntime Version=27.0.0\nSealed Resources version=2 rules=13 files=4\nInternal requirements count=1 size=180\nTotal signatures=1\nChosen signature=1\n",
|
||||
"notarization": {
|
||||
"id": "ab0271c8-0c4b-4b10-9474-cebe9b55385b",
|
||||
"message": "Processing complete",
|
||||
"status": "Accepted"
|
||||
},
|
||||
"signingVerified": true,
|
||||
"stapleValidated": true,
|
||||
"stagingPluginUnregistered": true,
|
||||
"runningHosts": [],
|
||||
"installedSignature": "Executable=/Library/Plug-Ins/FxPlug/beatygril.app/Contents/MacOS/beatygril\nIdentifier=com.dayu.beatygril\nFormat=app bundle with Mach-O universal (x86_64 arm64)\nCodeDirectory v=20500 size=478 flags=0x10000(runtime) hashes=4+7 location=embedded\nHash type=sha256 size=32\nCandidateCDHash sha256=66df95f2ce931ca96f52ee5cfa5ad664be49a6c8\nCandidateCDHashFull sha256=66df95f2ce931ca96f52ee5cfa5ad664be49a6c89b8cc1c206d68f0c162b8348\nHash choices=sha256\nCMSDigest=66df95f2ce931ca96f52ee5cfa5ad664be49a6c89b8cc1c206d68f0c162b8348\nCMSDigestType=2\nCDHash=66df95f2ce931ca96f52ee5cfa5ad664be49a6c8\nSignature size=8969\nAuthority=Developer ID Application: zhong luo (B3W25FX5H5)\nAuthority=Developer ID Certification Authority\nAuthority=Apple Root CA\nTimestamp=Oct 21, 2026 at 20:57:26\nNotarization Ticket=stapled\nInfo.plist entries=22\nTeamIdentifier=B3W25FX5H5\nRuntime Version=27.0.0\nSealed Resources version=2 rules=13 files=4\nInternal requirements count=1 size=180\nTotal signatures=1\nChosen signature=1\n",
|
||||
"installedSignatureVerified": true,
|
||||
"installedStapleValidated": true,
|
||||
"gatekeeperAccepted": true,
|
||||
"pluginDiscovery": {
|
||||
"bundleIdentifier": "com.dayu.beatygril.fxplug",
|
||||
"formalPath": "/Library/Plug-Ins/FxPlug/beatygril.app/Contents/PlugIns/beatygril XPC Service.pluginkit",
|
||||
"output": " com.dayu.beatygril.fxplug(1.1)\tA9F36A44-1E5E-4AB3-A2FD-5C66A76DB8BB\t2026-10-21 13:53:56 +0000\t/Library/Plug-Ins/FxPlug/beatygril.app/Contents/PlugIns/beatygril XPC Service.pluginkit\n (1 plug-in)\n"
|
||||
},
|
||||
"removedGeneratedPaths": [
|
||||
"/Users/dayu/Documents/PaintFCP/build/delivery/previous-beatygril.app",
|
||||
"/tmp/paintfcp-build-20261021",
|
||||
"/Users/dayu/Documents/PaintFCP/build/delivery/notarization.zip"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
2026-10-21 20:56:23.542 negative-control[10726:5467718] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2
|
||||
FAIL: default sourceBOTTOM/destinationTOP matches independent upright CI output
|
||||
FAIL: default sourceBOTTOM/destinationTOP is byte-identical across coordinate tags
|
||||
FAIL: default sourceBOTTOM/destinationTOP preserves the independently decoded photo
|
||||
FAIL: default sourceTOP/destinationBOTTOM matches independent upright CI output
|
||||
FAIL: default sourceTOP/destinationBOTTOM is byte-identical across coordinate tags
|
||||
FAIL: default sourceTOP/destinationBOTTOM preserves the independently decoded photo
|
||||
FAIL: big-eye sourceBOTTOM/destinationTOP matches independent upright CI output
|
||||
FAIL: big-eye sourceBOTTOM/destinationTOP is byte-identical across coordinate tags
|
||||
FAIL: big-eye sourceBOTTOM/destinationTOP changes the two real eye regions
|
||||
FAIL: big-eye sourceTOP/destinationBOTTOM matches independent upright CI output
|
||||
FAIL: big-eye sourceTOP/destinationBOTTOM is byte-identical across coordinate tags
|
||||
FAIL: big-eye sourceTOP/destinationBOTTOM changes the two real eye regions
|
||||
FAIL: big-eye sourceTOP/destinationTOP matches independent upright CI output
|
||||
FAIL: big-eye sourceTOP/destinationTOP is byte-identical across coordinate tags
|
||||
FAIL: chin-positive sourceBOTTOM/destinationTOP matches independent upright CI output
|
||||
FAIL: chin-positive sourceBOTTOM/destinationTOP is byte-identical across coordinate tags
|
||||
FAIL: chin-positive sourceBOTTOM/destinationTOP changes the real chin rather than eyes or mirrored anatomy
|
||||
FAIL: chin-positive sourceTOP/destinationBOTTOM matches independent upright CI output
|
||||
FAIL: chin-positive sourceTOP/destinationBOTTOM is byte-identical across coordinate tags
|
||||
FAIL: chin-positive sourceTOP/destinationBOTTOM changes the real chin rather than eyes or mirrored anatomy
|
||||
FAIL: chin-positive sourceTOP/destinationTOP matches independent upright CI output
|
||||
FAIL: chin-positive sourceTOP/destinationTOP is byte-identical across coordinate tags
|
||||
FAIL: chin-negative sourceBOTTOM/destinationTOP matches independent upright CI output
|
||||
FAIL: chin-negative sourceBOTTOM/destinationTOP is byte-identical across coordinate tags
|
||||
FAIL: chin-negative sourceBOTTOM/destinationTOP changes the real chin rather than eyes or mirrored anatomy
|
||||
FAIL: chin-negative sourceTOP/destinationBOTTOM matches independent upright CI output
|
||||
FAIL: chin-negative sourceTOP/destinationBOTTOM is byte-identical across coordinate tags
|
||||
FAIL: chin-negative sourceTOP/destinationBOTTOM changes the real chin rather than eyes or mirrored anatomy
|
||||
FAIL: chin-negative sourceTOP/destinationTOP matches independent upright CI output
|
||||
FAIL: chin-negative sourceTOP/destinationTOP is byte-identical across coordinate tags
|
||||
Anatomy default 0/0 max=0 mean=0.0000000 eye=0/0 chin=0 inverted=0
|
||||
Anatomy default 0/1 max=255 mean=75.5590439 eye=512210/458308 chin=640530 inverted=2678038
|
||||
Anatomy default 1/0 max=255 mean=75.5590439 eye=512210/458308 chin=640530 inverted=2678038
|
||||
Anatomy default 1/1 max=0 mean=0.0000000 eye=0/0 chin=0 inverted=0
|
||||
Anatomy big-eye 0/0 max=2 mean=0.0008917 eye=33510/33880 chin=0 inverted=0
|
||||
Anatomy big-eye 0/1 max=255 mean=75.5509195 eye=512210/458308 chin=640530 inverted=2673702
|
||||
Anatomy big-eye 1/0 max=255 mean=75.5510902 eye=512210/458308 chin=640530 inverted=2673881
|
||||
Anatomy big-eye 1/1 max=66 mean=0.0180340 eye=30841/32051 chin=0 inverted=0
|
||||
Anatomy chin-positive 0/0 max=1 mean=0.0001459 eye=0/0 chin=116812 inverted=0
|
||||
Anatomy chin-positive 0/1 max=255 mean=75.5574808 eye=512210/458308 chin=640530 inverted=2671244
|
||||
Anatomy chin-positive 1/0 max=255 mean=75.5593863 eye=512210/458308 chin=640530 inverted=2671753
|
||||
Anatomy chin-positive 1/1 max=52 mean=0.0127611 eye=0/0 chin=121860 inverted=0
|
||||
Anatomy chin-negative 0/0 max=1 mean=0.0000849 eye=0/0 chin=60426 inverted=0
|
||||
Anatomy chin-negative 0/1 max=255 mean=75.5518637 eye=512210/458308 chin=640530 inverted=2681787
|
||||
Anatomy chin-negative 1/0 max=255 mean=75.5510559 eye=512210/458308 chin=640530 inverted=2681767
|
||||
Anatomy chin-negative 1/1 max=21 mean=0.0061512 eye=0/0 chin=63433 inverted=0
|
||||
Restored origin flips negative control: 120 checks, 30 expected failures
|
||||
@@ -0,0 +1,21 @@
|
||||
2026-10-21 20:55:46.681 host-tests[10689:5467036] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2
|
||||
Default IOSurface maximum byte difference: 0
|
||||
Alternate destination tag maximum byte difference: 0
|
||||
Anatomy default 0/0 max=0 mean=0.0000000 eye=0/0 chin=0 inverted=0
|
||||
Anatomy default 0/1 max=0 mean=0.0000000 eye=0/0 chin=0 inverted=0
|
||||
Anatomy default 1/0 max=0 mean=0.0000000 eye=0/0 chin=0 inverted=0
|
||||
Anatomy default 1/1 max=0 mean=0.0000000 eye=0/0 chin=0 inverted=0
|
||||
Anatomy big-eye 0/0 max=2 mean=0.0008917 eye=33510/33880 chin=0 inverted=0
|
||||
Anatomy big-eye 0/1 max=2 mean=0.0008917 eye=33510/33880 chin=0 inverted=0
|
||||
Anatomy big-eye 1/0 max=2 mean=0.0008917 eye=33510/33880 chin=0 inverted=0
|
||||
Anatomy big-eye 1/1 max=2 mean=0.0008917 eye=33510/33880 chin=0 inverted=0
|
||||
Anatomy chin-positive 0/0 max=1 mean=0.0001459 eye=0/0 chin=116812 inverted=0
|
||||
Anatomy chin-positive 0/1 max=1 mean=0.0001459 eye=0/0 chin=116812 inverted=0
|
||||
Anatomy chin-positive 1/0 max=1 mean=0.0001459 eye=0/0 chin=116812 inverted=0
|
||||
Anatomy chin-positive 1/1 max=1 mean=0.0001459 eye=0/0 chin=116812 inverted=0
|
||||
Anatomy chin-negative 0/0 max=1 mean=0.0000849 eye=0/0 chin=60426 inverted=0
|
||||
Anatomy chin-negative 0/1 max=1 mean=0.0000849 eye=0/0 chin=60426 inverted=0
|
||||
Anatomy chin-negative 1/0 max=1 mean=0.0000849 eye=0/0 chin=60426 inverted=0
|
||||
Anatomy chin-negative 1/1 max=1 mean=0.0000849 eye=0/0 chin=60426 inverted=0
|
||||
Legacy fallback upright comparison: max=2 mean=0.0010357
|
||||
Host adapter: 247 checks, 0 failures
|
||||
@@ -0,0 +1,2 @@
|
||||
com.dayu.beatygril.fxplug(1.1) A9F36A44-1E5E-4AB3-A2FD-5C66A76DB8BB 2026-10-21 13:53:56 +0000 /Library/Plug-Ins/FxPlug/beatygril.app/Contents/PlugIns/beatygril XPC Service.pluginkit
|
||||
(1 plug-in)
|
||||
@@ -0,0 +1,24 @@
|
||||
Executable=/Library/Plug-Ins/FxPlug/beatygril.app/Contents/MacOS/beatygril
|
||||
Identifier=com.dayu.beatygril
|
||||
Format=app bundle with Mach-O universal (x86_64 arm64)
|
||||
CodeDirectory v=20500 size=478 flags=0x10000(runtime) hashes=4+7 location=embedded
|
||||
Hash type=sha256 size=32
|
||||
CandidateCDHash sha256=66df95f2ce931ca96f52ee5cfa5ad664be49a6c8
|
||||
CandidateCDHashFull sha256=66df95f2ce931ca96f52ee5cfa5ad664be49a6c89b8cc1c206d68f0c162b8348
|
||||
Hash choices=sha256
|
||||
CMSDigest=66df95f2ce931ca96f52ee5cfa5ad664be49a6c89b8cc1c206d68f0c162b8348
|
||||
CMSDigestType=2
|
||||
CDHash=66df95f2ce931ca96f52ee5cfa5ad664be49a6c8
|
||||
Signature size=8969
|
||||
Authority=Developer ID Application: zhong luo (B3W25FX5H5)
|
||||
Authority=Developer ID Certification Authority
|
||||
Authority=Apple Root CA
|
||||
Timestamp=Oct 21, 2026 at 20:57:26
|
||||
Notarization Ticket=stapled
|
||||
Info.plist entries=22
|
||||
TeamIdentifier=B3W25FX5H5
|
||||
Runtime Version=27.0.0
|
||||
Sealed Resources version=2 rules=13 files=4
|
||||
Internal requirements count=1 size=180
|
||||
Total signatures=1
|
||||
Chosen signature=1
|
||||
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"version": "1.0.6",
|
||||
"build": "8",
|
||||
"uiOperations": false,
|
||||
"nativeVisualQA": "pending user",
|
||||
"installationPath": "/Library/Plug-Ins/FxPlug/beatygril.app",
|
||||
"codesign": {
|
||||
"exitCode": 0,
|
||||
"stdout": "",
|
||||
"stderr": ""
|
||||
},
|
||||
"staple": {
|
||||
"exitCode": 0,
|
||||
"stdout": "Processing: /Library/Plug-Ins/FxPlug/beatygril.app\nThe validate action worked!",
|
||||
"stderr": ""
|
||||
},
|
||||
"gatekeeper": {
|
||||
"exitCode": 0,
|
||||
"stdout": "",
|
||||
"stderr": "/Library/Plug-Ins/FxPlug/beatygril.app: accepted\nsource=Notarized Developer ID"
|
||||
},
|
||||
"identity": [
|
||||
{
|
||||
"path": "/Library/Plug-Ins/FxPlug/beatygril.app",
|
||||
"bundleIdentifier": "com.dayu.beatygril",
|
||||
"version": "1.0.6",
|
||||
"build": "8",
|
||||
"archs": "x86_64 arm64",
|
||||
"signature": "Executable=/Library/Plug-Ins/FxPlug/beatygril.app/Contents/MacOS/beatygril\nIdentifier=com.dayu.beatygril\nFormat=app bundle with Mach-O universal (x86_64 arm64)\nCodeDirectory v=20500 size=478 flags=0x10000(runtime) hashes=4+7 location=embedded\nHash type=sha256 size=32\nCandidateCDHash sha256=66df95f2ce931ca96f52ee5cfa5ad664be49a6c8\nCandidateCDHashFull sha256=66df95f2ce931ca96f52ee5cfa5ad664be49a6c89b8cc1c206d68f0c162b8348\nHash choices=sha256\nCMSDigest=66df95f2ce931ca96f52ee5cfa5ad664be49a6c89b8cc1c206d68f0c162b8348\nCMSDigestType=2\nCDHash=66df95f2ce931ca96f52ee5cfa5ad664be49a6c8\nSignature size=8969\nAuthority=Developer ID Application: zhong luo (B3W25FX5H5)\nAuthority=Developer ID Certification Authority\nAuthority=Apple Root CA\nTimestamp=Oct 21, 2026 at 20:57:26\nNotarization Ticket=stapled\nInfo.plist entries=22\nTeamIdentifier=B3W25FX5H5\nRuntime Version=27.0.0\nSealed Resources version=2 rules=13 files=4\nInternal requirements count=1 size=180\nTotal signatures=1\nChosen signature=1\n"
|
||||
},
|
||||
{
|
||||
"path": "/Library/Plug-Ins/FxPlug/beatygril.app/Contents/PlugIns/beatygril XPC Service.pluginkit",
|
||||
"bundleIdentifier": "com.dayu.beatygril.fxplug",
|
||||
"version": "1.0.6",
|
||||
"build": "8",
|
||||
"archs": "x86_64 arm64",
|
||||
"signature": "Executable=/Library/Plug-Ins/FxPlug/beatygril.app/Contents/PlugIns/beatygril XPC Service.pluginkit/Contents/MacOS/beatygril XPC Service\nIdentifier=com.dayu.beatygril.fxplug\nFormat=bundle with Mach-O universal (x86_64 arm64)\nCodeDirectory v=20500 size=645 flags=0x10000(runtime) hashes=13+3 location=embedded\nHash type=sha256 size=32\nCandidateCDHash sha256=ded7ed887bb9c90fbf0c9e9b25a5b279c97e1da6\nCandidateCDHashFull sha256=ded7ed887bb9c90fbf0c9e9b25a5b279c97e1da6809e5a5bf42bd0dd56d42dfd\nHash choices=sha256\nCMSDigest=ded7ed887bb9c90fbf0c9e9b25a5b279c97e1da6809e5a5bf42bd0dd56d42dfd\nCMSDigestType=2\nCDHash=ded7ed887bb9c90fbf0c9e9b25a5b279c97e1da6\nSignature size=8969\nAuthority=Developer ID Application: zhong luo (B3W25FX5H5)\nAuthority=Developer ID Certification Authority\nAuthority=Apple Root CA\nTimestamp=Oct 21, 2026 at 20:57:25\nInfo.plist entries=26\nTeamIdentifier=B3W25FX5H5\nRuntime Version=27.0.0\nSealed Resources version=2 rules=13 files=4\nInternal requirements count=1 size=188\nTotal signatures=1\nChosen signature=1\n"
|
||||
}
|
||||
],
|
||||
"template": {
|
||||
"previousTemplateSHA256": "ba08de6916cd837b3733aa0c6fcb78f2e8224431d25e1310089ae67d18445f2d",
|
||||
"files": [
|
||||
{
|
||||
"path": "/Users/dayu/Movies/Motion Templates.localized/Effects.localized/大鱼/大鱼人像美化/大鱼人像美化.moef",
|
||||
"bytes": 22996,
|
||||
"sha256": "30ca8edf36801264c5de2c753c40b720aba8052633620713a12401098fcd2409"
|
||||
},
|
||||
{
|
||||
"path": "/Users/dayu/Movies/Motion Templates.localized/Effects.localized/大鱼/大鱼人像美化/Drop Zone.tiff",
|
||||
"bytes": 420128,
|
||||
"sha256": "a7f8e3a2a431dbb3ce9e777040bb55e701cfe9ab9632e8cbb10359732bc8692e"
|
||||
}
|
||||
],
|
||||
"installedWithHostsClosed": true
|
||||
},
|
||||
"discovery": " com.dayu.beatygril.fxplug(1.1)\tA9F36A44-1E5E-4AB3-A2FD-5C66A76DB8BB\t2026-10-21 13:53:56 +0000\t/Library/Plug-Ins/FxPlug/beatygril.app/Contents/PlugIns/beatygril XPC Service.pluginkit\n (1 plug-in)\n",
|
||||
"duplicateInventory": {
|
||||
"scopes": [
|
||||
"/Users/dayu/Documents/PaintFCP",
|
||||
"/Users/dayu/.codex/worktrees",
|
||||
"/Users/dayu/Library/Developer/Xcode/DerivedData",
|
||||
"/Users/dayu/Desktop",
|
||||
"/Users/dayu/Downloads",
|
||||
"/Applications",
|
||||
"/Library/Plug-Ins/FxPlug",
|
||||
"/Users/dayu/Library/Plug-Ins/FxPlug",
|
||||
"/private/tmp/paintfcp-format-probe.PsxvYQ",
|
||||
"/private/tmp/paintfcp-y-review.KpPi8T",
|
||||
"/private/tmp/paintfcp-live-review.ItH4EG",
|
||||
"/private/tmp/paintfcp-slim-field.6fDdJj",
|
||||
"/private/tmp/paintfcp-chin-smoke.rfco16hq",
|
||||
"/private/tmp/paintfcp-rea.b3j9Te",
|
||||
"/private/tmp/paintfcp-slim-smoke.3ncdDe"
|
||||
],
|
||||
"matchingOuterApps": [
|
||||
"/Library/Plug-Ins/FxPlug/beatygril.app"
|
||||
],
|
||||
"errors": []
|
||||
},
|
||||
"status": "installed, formal identity/ticket/discovery/template verified; user visual QA pending"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"id":"ab0271c8-0c4b-4b10-9474-cebe9b55385b","message":"Processing complete","status":"Accepted"}
|
||||
@@ -0,0 +1,21 @@
|
||||
2026-10-21 20:53:14.697 osc-tests[10458:5463835] PGFaceOSC point-write desired=(0.25,0.75) setter=(0.25,0.75) readback=(0.25,0.75) mode=normalized verified=1
|
||||
2026-10-21 20:53:14.705 osc-tests[10458:5463835] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(80,180) surface=320x240 origin=0
|
||||
2026-10-21 20:53:15.118 osc-tests[10458:5463835] PGFaceOSC point-write desired=(0.8,0.3) setter=(1152,-432) readback=(0.8,0.3) mode=centered-pixels verified=1
|
||||
2026-10-21 20:53:15.118 osc-tests[10458:5463835] PGFaceOSC coordinates selection=(0.7,0.4) objectBounds=(-1920,-1080,3840,2160) canvas=(152,78) surface=320x240 origin=0
|
||||
2026-10-21 20:53:15.168 osc-tests[10458:5463835] PGFaceOSC point-write desired=(0.8,0.3) setter=(0.8,0.3) readback=(0.12345,0.87654) mode=normalized verified=0
|
||||
2026-10-21 20:53:15.168 osc-tests[10458:5463835] PGFaceOSC point-write desired=(0.75,0.25) setter=(0.75,0.25) readback=(0.75,0.25) mode=normalized verified=1
|
||||
2026-10-21 20:53:15.168 osc-tests[10458:5463835] PGFaceOSC coordinates selection=(0.75,0.25) objectBounds=(-100,-50,200,100) canvas=(160,60) surface=320x240 origin=0
|
||||
2026-10-21 20:53:15.218 osc-tests[10458:5463835] PGFaceOSC point-write desired=(0.625,0.375) setter=(0.625,0.375) readback=(0.625,0.375) mode=normalized verified=1
|
||||
2026-10-21 20:53:15.218 osc-tests[10458:5463835] PGFaceOSC coordinates selection=(0.625,0.375) objectBounds=(-100,-50,200,100) canvas=(240,60) surface=320x240 origin=0
|
||||
2026-10-21 20:53:15.268 osc-tests[10458:5463835] PGFaceOSC point-write desired=(0.25,0.75) setter=(0.25,0.75) readback=(0.25,0.75) mode=normalized verified=1
|
||||
2026-10-21 20:53:15.268 osc-tests[10458:5463835] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(144,180) surface=320x240 origin=0
|
||||
2026-10-21 20:53:15.318 osc-tests[10458:5463835] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1
|
||||
2026-10-21 20:53:15.318 osc-tests[10458:5463835] PGFaceOSC coordinates selection=(0,1) objectBounds=(-100,-50,200,100) canvas=(100,140) surface=320x240 origin=0
|
||||
2026-10-21 20:53:15.369 osc-tests[10458:5463835] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(nan,nan) surface=320x240 origin=0
|
||||
2026-10-21 20:53:15.418 osc-tests[10458:5463835] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1
|
||||
2026-10-21 20:53:15.418 osc-tests[10458:5463835] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(inf,nan) surface=320x240 origin=0
|
||||
2026-10-21 20:53:15.467 osc-tests[10458:5463835] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1
|
||||
2026-10-21 20:53:15.467 osc-tests[10458:5463835] PGFaceOSC coordinates selection=(0.25,0.75) objectBounds=(-100,-50,200,100) canvas=(80,nan) surface=320x240 origin=0
|
||||
2026-10-21 20:53:15.517 osc-tests[10458:5463835] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1
|
||||
2026-10-21 20:53:15.517 osc-tests[10458:5463835] PGFaceOSC point-write desired=(0.5,0.5) setter=(0.5,0.5) readback=(0.5,0.5) mode=normalized verified=1
|
||||
OSC adapter: 98 checks, 0 failures
|
||||
@@ -0,0 +1,5 @@
|
||||
Beauty renderer: 49 checks, 0 failures (Metal).
|
||||
2026-10-21 20:58:16.457 face-tests[11385:5472531] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2
|
||||
Face processing: 116 checks passed
|
||||
2026-10-21 20:58:19.882 slim-tests[11391:5472584] FBBA: creating VNFaceBBoxAligner from VNFaceDetectorRevision2: VNFaceDetectorRevision2
|
||||
PASS: 394 slim alignment checks; maximum UV oracle error 1.09828022e-05
|
||||
文件差异过大,未显示。
加载差异
已加载 100/203 个文件。由于本次变更涉及的文件过多,其余文件未显示。
显示更多
在新工单中引用
屏蔽一个用户