比较提交
| 作者 | SHA1 | 提交日期 | |
|---|---|---|---|
|
|
078d4cc7e6 | ||
|
|
fe8e31f5af | ||
|
|
e6e5407b7a | ||
|
|
afff5cb5f3 | ||
|
|
a1a0779e12 | ||
|
|
0388b79bd8 | ||
|
|
a20e734f66 | ||
|
|
6827eaed21 | ||
|
|
8bc6f1efbf | ||
|
|
a1eb334840 | ||
|
|
4a642c4daf | ||
|
|
f1a4694360 | ||
|
|
c0cddd2b65 | ||
|
|
4e0ccec6a9 | ||
|
|
3a79851955 | ||
|
|
c66a9ba9b6 | ||
|
|
311c3b9535 | ||
|
|
af6b2d652d | ||
|
|
d43c97e2d3 | ||
|
|
f241a470ca | ||
|
|
e09c3ecd5e | ||
|
|
b37f6b530b | ||
|
|
ae1522bf1c | ||
|
|
876c5f1270 | ||
|
|
dd9f9597bc | ||
|
|
c88f1e1394 | ||
|
|
34561ff544 | ||
|
|
a5b41e638b | ||
|
|
e6fecdad7b | ||
|
|
2d7feb5aa2 | ||
|
|
c0c76542b9 | ||
|
|
f5ae4ca5ea | ||
|
|
ca7221f073 | ||
|
|
3005347a6b | ||
|
|
4fd7829a7f | ||
|
|
883f680ade | ||
|
|
90ca0f4a08 | ||
|
|
68ef3a48be | ||
|
|
aa60572b51 | ||
|
|
19db05b364 | ||
|
|
9b097e04a2 | ||
|
|
57a9830280 | ||
|
|
a084d9d5b8 | ||
|
|
5adb9a20c7 | ||
|
|
1ef5273ee3 | ||
|
|
b3e6985fe2 | ||
|
|
bb4be3166f | ||
|
|
7763be5468 | ||
|
|
f96e1967a1 | ||
|
|
6b722057c6 | ||
|
|
ca9936ee3c | ||
|
|
5a10408557 | ||
|
|
1d3ad6f847 | ||
|
|
0f3f14522c | ||
|
|
a20f1e674f | ||
|
|
d944ad8652 | ||
|
|
8c2f226d43 | ||
|
|
ad0603350b | ||
|
|
5aa35100a2 | ||
|
|
ddab3b0bcd | ||
|
|
d83a97bd83 | ||
|
|
cdf23fb4fd | ||
|
|
d15d01733c | ||
|
|
68700d4016 | ||
|
|
1a4c802322 | ||
|
|
6f02a40a51 | ||
|
|
e2f4327dfd | ||
|
|
978cc84d53 | ||
|
|
749ef7c4b9 | ||
|
|
da15deefb7 | ||
|
|
46d7ff7bbc | ||
|
|
6541a4dd22 | ||
|
|
158829a418 | ||
|
|
6bc086ade0 | ||
|
|
7f833757da | ||
|
|
c7f6311506 | ||
|
|
da700d4e2f | ||
|
|
3524267800 | ||
|
|
31d1089264 | ||
|
|
d9de393f51 | ||
|
|
70348c4aef | ||
|
|
188553a613 | ||
|
|
8ef576b73d | ||
|
|
2ec2ee7ac5 | ||
|
|
d979f8958c | ||
|
|
4830f913c2 | ||
|
|
910b8c5c3e | ||
|
|
e1912f6cac | ||
|
|
22b23cf1e0 | ||
|
|
b98d92fad2 | ||
|
|
0631e8b6c3 | ||
|
|
5abe64481d | ||
|
|
42d130c811 | ||
|
|
f24c67907e | ||
|
|
a04c4a69ed | ||
|
|
a2a8624dc0 | ||
|
|
f7d0a80a2e | ||
|
|
5fae1150f4 | ||
|
|
995ac745d0 | ||
|
|
f554b11e6c | ||
|
|
76b7e7e8a3 | ||
|
|
ec81578b25 | ||
|
|
74cc74973b | ||
|
|
38e9fb25a2 | ||
|
|
79f1dd4545 | ||
|
|
039e567aaa | ||
|
|
b57c9fad72 | ||
|
|
5aae670f56 | ||
|
|
6ef38faa19 | ||
|
|
178e1e7d16 | ||
|
|
9f12f7b42a | ||
|
|
f6b488a87d | ||
|
|
3de998257d | ||
|
|
ff4c9ca1c4 | ||
|
|
e0bd8342c0 | ||
|
|
a0225404a2 | ||
|
|
44f6e1f860 | ||
|
|
5ab5e78255 | ||
|
|
4dc2d2a693 | ||
|
|
8ca33a78fd | ||
|
|
b7c2e291ec | ||
|
|
5c0f177bde | ||
|
|
8ca30fa3cc | ||
|
|
ffd6bc3052 | ||
|
|
7f2917393c | ||
|
|
d91f1b176b | ||
|
|
c5d614743a | ||
|
|
a1595caf30 | ||
|
|
f1ce687bcf | ||
|
|
4336454932 | ||
|
|
63c49b0135 | ||
|
|
ef0e62419a | ||
|
|
b6f73ebb66 | ||
|
|
6a979f16a8 | ||
|
|
4b7e348ff5 | ||
|
|
f07b116398 | ||
|
|
9a3559172d | ||
|
|
ad4e5e7a82 | ||
|
|
2bab7347a5 | ||
|
|
6959c21820 | ||
|
|
28453f8a57 | ||
|
|
98d80970e8 | ||
|
|
c791ddcb76 | ||
|
|
8a434b8e40 | ||
|
|
cdf6ddc1d7 | ||
|
|
3a5ead0ce0 | ||
|
|
90e512aabe | ||
|
|
c2c71f3dbc | ||
|
|
ccc34734e3 | ||
|
|
c9e4d3f330 | ||
|
|
ad9ee19bf8 | ||
|
|
bc9021271d | ||
|
|
046411ba8b | ||
|
|
b16a6326a4 | ||
|
|
01efcc8a29 | ||
|
|
b34ef54ad8 | ||
|
|
b82a386632 | ||
|
|
93c61899a4 | ||
|
|
27b3c24ac7 | ||
|
|
8615dc1c4f | ||
|
|
6add6f29e3 | ||
|
|
c03843dddb | ||
|
|
3642a1dba6 | ||
|
|
b3597bb4e4 | ||
|
|
5bf2a8428a | ||
|
|
a0178f994d | ||
|
|
b7ec47424e | ||
|
|
867bcfbad3 | ||
|
|
8af7013ad4 | ||
|
|
dbab2ab0cc | ||
|
|
7aece444b0 | ||
|
|
1f430a164a | ||
|
|
2f38f5e34f | ||
|
|
5fe4b1933e | ||
|
|
a4a1f8b08b | ||
|
|
1cc7f8edb2 | ||
|
|
48ac192d4b | ||
|
|
ca4abaf2c3 | ||
|
|
38f15ec1fe | ||
|
|
1575cb1191 | ||
|
|
a03a056bff | ||
|
|
edfbcd540b | ||
|
|
d018769558 | ||
|
|
e26a7c68e4 | ||
|
|
2b2a98d665 | ||
|
|
ecadafd8c3 | ||
|
|
ae0a64ec84 | ||
|
|
31a4d0cd15 | ||
|
|
7c0bfa5352 | ||
|
|
880a321e72 | ||
|
|
3b4c612edf | ||
|
|
f05cf05451 | ||
|
|
08d229b55b | ||
|
|
a458bbeb53 | ||
|
|
396ad5d1b2 | ||
|
|
03a1e2452e | ||
|
|
69040fd730 | ||
|
|
98d8c14048 | ||
|
|
b4ed141cb4 | ||
|
|
ea9884d266 | ||
|
|
2c2af3695b | ||
|
|
3c96507971 | ||
|
|
cf5954a927 | ||
|
|
dc56d0b321 | ||
|
|
0a1987572b | ||
|
|
4b73db8a17 | ||
|
|
3452f2344f | ||
|
|
e3a072324c | ||
|
|
0483e76a17 | ||
|
|
4eea88cd83 | ||
|
|
27ba2b53ca | ||
|
|
dc5769492d | ||
|
|
81b50538b4 | ||
|
|
9ba28e5b26 | ||
|
|
b85165b6e2 | ||
|
|
a2a6e57c13 | ||
|
|
320f4c5f91 | ||
|
|
5ca307414c | ||
|
|
ffabdca5b1 | ||
|
|
c9c72afc5b | ||
|
|
a7926f7e13 | ||
|
|
474bff9ea9 | ||
|
|
9f5f065977 | ||
|
|
14afd3382c | ||
|
|
48f48cb90c | ||
|
|
8b96e8b8c1 | ||
|
|
6515e0fa67 | ||
|
|
d2b6f8ef81 | ||
|
|
687a366e1c | ||
|
|
7b6a3106ca | ||
|
|
89eeaa9ba1 | ||
|
|
c86925d967 | ||
|
|
7e11c47126 | ||
|
|
810bbf4dfb | ||
|
|
52a7422004 | ||
|
|
78b4c5f962 | ||
|
|
7bf1f88fe9 | ||
|
|
b2601ac9b0 | ||
|
|
5032ce70ab | ||
|
|
df9b3c0253 | ||
|
|
44c4f5c470 | ||
|
|
84a0405628 | ||
|
|
5252296b7b | ||
|
|
db6b2b05b3 | ||
|
|
a7508203d1 | ||
|
|
38afc087d5 | ||
|
|
46153a26ed | ||
|
|
1659f3d385 | ||
|
|
dff9134be7 | ||
|
|
1f1b7917e7 | ||
|
|
4fb008e100 | ||
|
|
07601e50bf | ||
|
|
9977b5c41b | ||
|
|
ca8a5433d3 | ||
|
|
213d01dbd8 | ||
|
|
0782b5e654 | ||
|
|
504e08e425 | ||
|
|
bbb258e495 | ||
|
|
9f0adbeb3b | ||
|
|
43320c7ccd | ||
|
|
54ca7150f8 | ||
|
|
65e4c02bd0 | ||
|
|
fb21dabc08 | ||
|
|
e241f2a3e5 | ||
|
|
c9bd52fff5 | ||
|
|
585c83c8a1 | ||
|
|
91b66eb2d8 | ||
|
|
ee14dd9185 | ||
|
|
b77226b7e6 | ||
|
|
b72e6b3172 | ||
|
|
4ba65f1bde | ||
|
|
beccf2fc01 | ||
|
|
16b20af39a | ||
|
|
8bbd386abb | ||
|
|
df6bf52f32 | ||
|
|
8ac7ca43da | ||
|
|
dad77aff77 | ||
|
|
b60ae3e45b | ||
|
|
331e3ff315 | ||
|
|
b8a003970a | ||
|
|
411900b928 | ||
|
|
0ef847f6bb | ||
|
|
ded1f22be8 | ||
|
|
1396d5b7bf | ||
|
|
57059390d1 | ||
|
|
38e11aa103 | ||
|
|
bf25c6c9c1 | ||
|
|
bc974bc394 | ||
|
|
a6910ebff4 | ||
|
|
606544820f | ||
|
|
2d162a8fc5 | ||
|
|
226b7e1e93 | ||
|
|
a9cf2eda29 | ||
|
|
a0a97dfd88 | ||
|
|
9ba6eeb00a | ||
|
|
385fb47f14 | ||
|
|
ca352248c1 | ||
|
|
78e53b3889 | ||
|
|
b33b9634e2 | ||
|
|
1144a89214 | ||
|
|
5f8fb13fce | ||
|
|
4f7450bfec | ||
|
|
d2875fe86c | ||
|
|
1835ecc2a2 | ||
|
|
fdfcbd8ba9 | ||
|
|
49d35cb49a | ||
|
|
2711e0016e | ||
|
|
1c3e294ce9 | ||
|
|
a3bd2ceb26 | ||
|
|
e2aa0bd9a1 | ||
|
|
5224e404f5 | ||
|
|
302b75710b | ||
|
|
c0e6f3be0a | ||
|
|
10a14a8c62 | ||
|
|
6dd29caa3d | ||
|
|
d7d33fd8c6 | ||
|
|
ade118e284 | ||
|
|
201152d3e0 | ||
|
|
cccc51ff7a | ||
|
|
80dec904be | ||
|
|
b216cebc70 | ||
|
|
5cf4ba75b3 | ||
|
|
fe8b298c33 | ||
|
|
031c704f0f | ||
|
|
0dfb838b39 | ||
|
|
7f2cef5c58 | ||
|
|
92a90e6b33 | ||
|
|
30d413dc42 | ||
|
|
0597c8f4dd | ||
|
|
0ab448d04f | ||
|
|
cc037340bf | ||
|
|
61248ab9f5 | ||
|
|
ac9180e47c | ||
|
|
def8c2f638 | ||
|
|
642817e782 | ||
|
|
d39004c26a | ||
|
|
ebb67af1bc | ||
|
|
b0ef44b496 | ||
|
|
07a3f7bd4d | ||
|
|
c6d40d2f4d | ||
|
|
39676664f7 | ||
|
|
09e04ca647 | ||
|
|
77856a1334 | ||
|
|
6ea931a991 | ||
|
|
ab63b25f88 | ||
|
|
fe7ddbd6f8 | ||
|
|
8c62e4b5bd | ||
|
|
55b66a358c | ||
|
|
2ba0a415ae | ||
|
|
998a983884 | ||
|
|
8e00968bf0 | ||
|
|
0328399f52 | ||
|
|
a06a3a3914 | ||
|
|
c55f3343ea | ||
|
|
3fd0152240 | ||
|
|
94151cad7d | ||
|
|
335ef7a5ee | ||
|
|
386e6d228b | ||
|
|
bea51d2297 | ||
|
|
3373a5365e | ||
|
|
fa82014266 | ||
|
|
504e6d98e3 | ||
|
|
f4bacfbd75 | ||
|
|
6031b3bafb | ||
|
|
b2922811f9 | ||
|
|
da03d16c7e | ||
|
|
64ebd20d54 | ||
|
|
870f0064c2 | ||
|
|
1eacf595fc | ||
|
|
4d88c93b93 | ||
|
|
12fdde332f | ||
|
|
d0eadccc29 | ||
|
|
0d286c3924 | ||
|
|
24520e7848 | ||
|
|
0592458580 | ||
|
|
072bf881b9 | ||
|
|
d5aba63b4e | ||
|
|
0b1b4454b4 | ||
|
|
2cf93fafe5 | ||
|
|
aa9a8d24f2 | ||
|
|
a5a2bddeb3 | ||
|
|
11a8851828 | ||
|
|
8bd2ba91fa | ||
|
|
9f5c9a1237 | ||
|
|
54e68b4810 | ||
|
|
bb5ede7be4 | ||
|
|
70a50ab445 | ||
|
|
5b8ef04f7e | ||
|
|
a1e49e2eb5 | ||
|
|
d0b4e9d2ba | ||
|
|
468d530bf0 | ||
|
|
06a00371df | ||
|
|
c18a0890ed | ||
|
|
72a0269fe7 | ||
|
|
85ec27d49f | ||
|
|
5212187cc8 | ||
|
|
48b3e2d033 | ||
|
|
4d2a71d9e2 |
没有与搜索条件相匹配的文件
@@ -0,0 +1,15 @@
|
||||
# 大鱼调色项目规则
|
||||
|
||||
本文件适用于当前 Git 仓库及其子目录。沿用本机全局开发、正式交付和 Git 备份约定。
|
||||
|
||||
## 接手
|
||||
|
||||
- 新对话先读 [开发交接.md](开发交接.md) 的当前基线和待跟进事项。核对实际工作区、分支、远端、正式安装版本和交付锁,再依据用户本轮要求继续。
|
||||
- 按范围查阅专项交接、`verification/` 和 [RECOVERY.md](RECOVERY.md)。旧版本文档用于查找历史,当前状态以实际结果和对应版本的验证记录为准。
|
||||
|
||||
## 每次任务结束都要更新交接
|
||||
|
||||
- 无论本轮是开发、排查、发布、纯文档工作,还是暂时受阻,结束前都在 [开发交接.md](开发交接.md) 记录本轮工作。更新受影响的当前基线和待跟进事项,保留前序任务记录。
|
||||
- 写清任务日期与目标、实际完成的改动和关键路径、验证结果及覆盖范围、交付状态,以及仍待处理的事项和接手第一步。涉及发行时分别标明实际编译提交、版本标签、本机安装、Git Release、站点文章和主 APP 更新通道,注明对应版本和核验依据。
|
||||
- 区分本机实测、用户确认、自动检查与尚待复现的反馈。保留有助于继续排查的限制、假设和阻塞,引用已有报告。凭据、用户素材和未脱敏日志留在各自受控位置。
|
||||
- 在本轮结束前按 Git 约定提交交接文档,推送并回读远端。最后回复附上交接入口;远端核验受阻时注明本地提交与具体原因。
|
||||
+18
-2
@@ -17,11 +17,13 @@ SOURCE_BACKUP=大鱼调色仓库 Backend/
|
||||
|
||||
## 客户端
|
||||
|
||||
主 APP 检查更新与插件注册并行,检查结束且注册成功后显示3秒退出倒计时。发现更新则保留窗口;下载可取消,校验 SHA-256、字节数、Installer/App签名团队、Gatekeeper、包内 Bundle ID、版本、安装位置及模板。保存并退出 FCP/Motion 后打开系统安装器,不强杀宿主。下一次启动可记录已完成升级。
|
||||
主 APP 检查更新与插件注册并行,注册后保持运行,关闭窗口后仍在后台收集诊断;菜单栏可重新打开或明确退出。发现更新会显示提示;下载可取消,校验 SHA-256、字节数、Installer/App签名团队、Gatekeeper、包内 Bundle ID、版本、安装位置及模板。保存并退出 FCP/Motion 后打开系统安装器,不强杀宿主。下一次启动可记录已完成升级。
|
||||
|
||||
主 APP 与 XPC 共享随机安装标识及诊断开关。诊断默认开启,界面明确说明并可关闭;不上传素材、LUT、预设、用户路径、账号、硬件 UUID 或原始崩溃文件。后台私有队列最多256条/384KB,批次16条,网络超时并延迟重试,服务端按事件 UUID 去重。关闭后清除待发摘要并停止新请求;已经送达的数据按保留期清理。
|
||||
|
||||
采集进程启动、初始化、检查器创建/慢刷新、Metal 管线准备、首次渲染、渲染错误、超过6秒的疑似阻塞,以及本插件近7天系统崩溃报告的脱敏摘要。疑似阻塞不等于根因;整个进程被停止、网络不可用、主机强制断电时无法保证即时送达。不会拦截崩溃信号,也不采集整个 FCP 的报告。本轮保留调色与宿主回调逻辑,尚未修复偶发卡死。
|
||||
1.18.0(104)起每分钟汇总进程内存/CPU/线程数和渲染、参数读取、跟踪帧耗时;慢于100ms的单次事件最多每阶段30秒一条。超过6秒的疑似阻塞附当前阶段,并限频调用系统 sample 采样本进程1秒(间隔至少120秒,每小时最多6次,8秒超时,失败明确标记);仅提取调用栈,临时原文随即删除。主运行循环使用公共模式脉冲,避免正常菜单/模态循环被主队列探针误报。
|
||||
|
||||
主 APP 每分钟扫描本产品 APP 和 XPC 近7天 IPS,补采终止后的待发送队列;不要求用户重启主 APP。崩溃摘要记录故障实际版本/build、终止类别、故障线程的镜像UUID与偏移;排除自检和 ASAN 记录。已送达报告本地去重,云端继续按事件UUID去重。疑似阻塞不等于根因;整个进程被停止、网络不可用、主机强制断电时无法保证即时送达。不会拦截崩溃信号,也不采集整个 FCP 的报告;整个进程完全无法调度时,内部采样无法运行,须依靠系统生成的后续报告。本轮保留调色与宿主回调逻辑,尚未修复偶发卡死。
|
||||
|
||||
## 验证与发布
|
||||
|
||||
@@ -35,3 +37,17 @@ python3 Backend/deploy.py --package '/Volumes/备份/大鱼调色/发行包/大
|
||||
先从仓库审查、提交并推送,再由部署脚本同步到专项工程;脚本验证实际 SMB 挂载及基线。覆盖原文件前同目录旁路备份并核对字节,新增文件无需不存在的备份。只写明确列出的路径,不加载或输出生产配置。更新包签名、公证、票据与正式 APP 验收通过后才发布;同名包不同字节立即停止。发布后完整下载核对大小与 SHA-256,并核验较低/相同构建号的更新结果。
|
||||
|
||||
回滚:先备份当前文件,再恢复部署记录中对应旁路备份;禁止降低已有清单构建号来自动降级。撤下更新时备份并移走 beta.json,更新路由回到没有更新;历史安装包和诊断表保留。源代码可从产品远程仓库恢复,签名私钥及服务端数据库不属于 Git 备份。
|
||||
|
||||
## 微信首次扫码登录专项(2026-11-13)
|
||||
|
||||
本轮使用仓库 `Backend/` 为有范围的本机专项工程。新增保存生产主题 `wp-content/themes/ripro5/inc/oauth/weixin/callback.php`,仅将 `DayuColor` 加入现有扫码证明名单;同时在线 LUT 会话接口把拒绝/过期返回为 HTTP 401,让现有 1.22.1 客户端及时结束等待。无需重编 APP。
|
||||
|
||||
```sh
|
||||
php Backend/tests/wechat_callback.php
|
||||
php Backend/tests/online_luts.php
|
||||
python3 Backend/deploy_wechat_login.py
|
||||
```
|
||||
|
||||
前两项执行合成账号和 OAuth 的隔离测试,不加载生产配置;后一项仅审阅两个明确目标、SHA-256、挂载与权限。先按仓库约定完成源码提交、推送和回读,再加 `--apply --ssh-control <已认证连接>` 进行部署。脚本固定目标 SSH 主机和已确认的 NAS 原生路径,不接收或保存密码。写入前复核全部目标基线,每个覆盖文件均创建原目录分钟级旁路备份;使用原文件所有者通过原生 SSH 保留 UID/GID、权限和扩展属性,两个文件均暂存成功才替换,失败回滚已替换文件。部署报告保存每个相对路径、备份完整路径、摘要与原生元数据。回退沿用上节规则。若生产基线已变化,先重新比较,不能直接更新预期摘要来绕过保护。
|
||||
|
||||
2026-11-13 01:22 已完成两文件上线。67 项隔离检查、服务器 PHP 7.4.34 语法及8项实际 HTTPS 检查通过;拒绝/过期会话立即返回401,三个临时合成会话已清理。原生权限及扩展属性保持,旁路备份见 `verification/WeChatLoginDeployment.json`。此前目录与网络限制已解除,无需修改 NAS 权限。真实未绑定用户扫码仍需实际验收。现状与部署结果见 [开发交接](../开发交接.md),证据见 [验证报告](../verification/WeChatLoginFix.json)。
|
||||
+1
-1
@@ -75,7 +75,7 @@ def main():
|
||||
result=deploy_file(local,NAS/relative,allow_new=True)
|
||||
manifest=dict(bundle_id='com.dayu.color',channel='beta',version=version,build=build,package_type='pkg',install_mode='pkg_installer',
|
||||
size=package.stat().st_size,sha256=digest,download_url='https://dayu.media/'+str(relative),minimum_system_version='14.6',
|
||||
notes='公测版:接入自动更新与可关闭的云端诊断,记录插件加载耗时及错误摘要。请保存并退出 FCP / Motion 后安装。')
|
||||
notes='全部跟踪改用 Apple Vision;普通蒙版和图章使用局部配准,马赛克使用目标外观跟踪,短时丢失后尝试重新定位并补齐轨迹;超过确认范围自动停止,未确认尾部不写入。预览限频,减少界面刷新负担;需重新跟踪并播放复核遮挡范围。保留可关闭的后台自动诊断。安装前请保存工作并正常退出 FCP、Motion 和大鱼调色主程序。')
|
||||
dest=NAS/UPLOAD/'beta.json';old=json.loads(dest.read_text()) if dest.exists() else None
|
||||
if old:assert int(old['build'])<=build, '禁止更新通道倒退'
|
||||
localManifest=LOCAL/UPLOAD/'beta.json';write_json(localManifest,manifest)
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Deploy only the two reviewed online-LUT files from the scoped local workspace."""
|
||||
import json, os, shutil, subprocess
|
||||
from pathlib import Path
|
||||
from deploy import ROOT, LOCAL, NAS, STAMP, check_mount, deploy_file, sha, write_json
|
||||
|
||||
FILES=[Path('wp-content/mu-plugins/dayu-color-online-luts/renderer.php'),Path('wp-content/mu-plugins/dayu-color-online-luts.php')]
|
||||
|
||||
def main():
|
||||
mount=check_mount()
|
||||
contract=subprocess.run(['php',str(ROOT/'Backend/tests/online_luts.php')],capture_output=True,text=True,check=True)
|
||||
assert json.loads(contract.stdout)['pass']
|
||||
report=ROOT/'verification/OnlineLUTDeployment.json'
|
||||
previous=json.loads(report.read_text()) if report.exists() else {}
|
||||
old={entry['relativePath']:entry for entry in previous.get('files',[])}
|
||||
LOCAL.mkdir(parents=True,exist_ok=True);lock=LOCAL/'.deployment.lock';lock.mkdir()
|
||||
write_json(lock/'owner.json',dict(pid=os.getpid(),cwd=str(ROOT),started=STAMP))
|
||||
results=[]
|
||||
try:
|
||||
for relative in FILES:
|
||||
source=ROOT/'Backend'/relative;local=LOCAL/relative;target=NAS/relative
|
||||
subprocess.run(['php','-l',str(source)],check=True,capture_output=True)
|
||||
# Deploy only a remotely saved source checkpoint.
|
||||
tracked=subprocess.check_output(['git','show','HEAD:Backend/'+str(relative)],cwd=ROOT)
|
||||
assert tracked==source.read_bytes(),'Backend source is not committed'
|
||||
expected=old.get(str(relative),{}).get('sha256')
|
||||
if local.exists() and local.read_bytes()!=source.read_bytes():assert sha(local)==expected,'Local undeployed changes exist'
|
||||
local.parent.mkdir(parents=True,exist_ok=True);shutil.copyfile(source,local)
|
||||
result=deploy_file(local,target,allow_new=not expected,expected=expected)
|
||||
result['relativePath']=str(relative);result['readable']=os.access(target,os.R_OK);result['mode']=oct(target.stat().st_mode&0o777);results.append(result)
|
||||
write_json(report,dict(timestamp=STAMP,mount=mount,localProject=str(LOCAL),nasRoot=str(NAS),sourceCommit=subprocess.check_output(['git','rev-parse','HEAD'],cwd=ROOT,text=True).strip(),files=results))
|
||||
print(json.dumps(dict(deployed=len(results),report=str(report)),ensure_ascii=False))
|
||||
finally:
|
||||
shutil.rmtree(lock)
|
||||
if __name__=='__main__':main()
|
||||
@@ -0,0 +1,226 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Review by default; --apply deploys only the two WeChat login fixes."""
|
||||
import argparse
|
||||
import base64
|
||||
import datetime
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import shlex
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
from deploy import ROOT, NAS, MOUNT, sha, check_mount, write_json
|
||||
|
||||
FILES = (
|
||||
Path('wp-content/themes/ripro5/inc/oauth/weixin/callback.php'),
|
||||
Path('wp-content/mu-plugins/dayu-color-online-luts.php'),
|
||||
)
|
||||
|
||||
# Run as the existing file owner on the NAS: SMB reports synthetic Mac modes.
|
||||
# No credentials or production configuration are included in this program.
|
||||
NATIVE_DEPLOY = r'''
|
||||
import base64, datetime, hashlib, json, os, pathlib, shutil, stat, sys, uuid
|
||||
root = pathlib.Path('/vol1/1000/dayumedia/wwwroot/dayu_media')
|
||||
allowed = {'wp-content/themes/ripro5/inc/oauth/weixin/callback.php',
|
||||
'wp-content/mu-plugins/dayu-color-online-luts.php'}
|
||||
request = json.load(sys.stdin)
|
||||
assert len(request['files']) == 2
|
||||
assert {r['relativePath'] for r in request['files']} == allowed
|
||||
def digest(path):
|
||||
return hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
def metadata(path):
|
||||
s = path.stat()
|
||||
return dict(uid=s.st_uid, gid=s.st_gid, mode=oct(stat.S_IMODE(s.st_mode)),
|
||||
xattrs={k:base64.b64encode(os.getxattr(path,k)).decode()
|
||||
for k in sorted(os.listxattr(path))})
|
||||
def syncdir(path):
|
||||
fd=os.open(str(path),os.O_RDONLY)
|
||||
try: os.fsync(fd)
|
||||
finally: os.close(fd)
|
||||
def clone(original, destination, expected):
|
||||
fd=os.open(str(destination),os.O_CREAT|os.O_EXCL|os.O_WRONLY,0o600)
|
||||
os.close(fd)
|
||||
shutil.copy2(original,destination)
|
||||
if (destination.stat().st_uid,destination.stat().st_gid)!=(expected['uid'],expected['gid']):
|
||||
os.chown(destination,expected['uid'],expected['gid'])
|
||||
if stat.S_IMODE(destination.stat().st_mode)!=int(expected['mode'],8):
|
||||
os.chmod(destination,int(expected['mode'],8))
|
||||
# fnOS creates a system.trim_acl inherited from the parent even when the
|
||||
# original has none. copy2 does not remove these destination-only xattrs.
|
||||
for key in set(os.listxattr(destination))-set(expected['xattrs']):
|
||||
os.removexattr(destination,key)
|
||||
for key,value in expected['xattrs'].items():
|
||||
os.setxattr(destination,key,base64.b64decode(value))
|
||||
assert metadata(destination)==expected, 'Native metadata copy mismatch'
|
||||
with destination.open('rb') as f: os.fsync(f.fileno())
|
||||
stamp=datetime.datetime.now(datetime.timezone(datetime.timedelta(hours=8))).strftime('%Y%m%d%H%M')
|
||||
rows=[]
|
||||
stages=[]
|
||||
changed=[]
|
||||
result=dict(ok=False,files=rows,rolledBack=False)
|
||||
try:
|
||||
# Check the entire batch before creating backups or staging new content.
|
||||
for item in request['files']:
|
||||
target=root/item['relativePath']
|
||||
assert target.resolve()==target and target.is_file(), 'Unexpected path or symlink'
|
||||
original=digest(target)
|
||||
source=base64.b64decode(item['sourceBase64'],validate=True)
|
||||
assert hashlib.sha256(source).hexdigest()==item['sourceSHA256']
|
||||
assert original in (item['expectedSHA256'],item['sourceSHA256']), 'Production baseline changed'
|
||||
attrs=metadata(target)
|
||||
assert attrs['uid']==os.geteuid(), 'Run as the original file owner'
|
||||
row=dict(relativePath=item['relativePath'],nativeTarget=str(target),
|
||||
beforeSHA256=original,sha256=item['sourceSHA256'],beforeMetadata=attrs,
|
||||
status='already-current' if original==item['sourceSHA256'] else 'pending')
|
||||
rows.append(row)
|
||||
for row,item in zip(rows,request['files']):
|
||||
if row['status']=='already-current': continue
|
||||
target=pathlib.Path(row['nativeTarget'])
|
||||
backup=target.with_name(target.stem+'-'+stamp+target.suffix+'bak')
|
||||
clone(target,backup,row['beforeMetadata'])
|
||||
assert digest(backup)==row['beforeSHA256'], 'Backup content mismatch'
|
||||
row['nativeBackup']=str(backup)
|
||||
syncdir(target.parent)
|
||||
# Stage both files before replacing either production file.
|
||||
for row,item in zip(rows,request['files']):
|
||||
if row['status']=='already-current': continue
|
||||
target=pathlib.Path(row['nativeTarget'])
|
||||
stage=target.with_name('.dayu-wechat-stage-'+uuid.uuid4().hex)
|
||||
stages.append(stage)
|
||||
clone(target,stage,row['beforeMetadata'])
|
||||
with stage.open('wb') as f:
|
||||
f.write(base64.b64decode(item['sourceBase64'],validate=True))
|
||||
f.flush(); os.fsync(f.fileno())
|
||||
os.utime(stage,None)
|
||||
assert metadata(stage)==row['beforeMetadata'], 'Staged metadata mismatch'
|
||||
assert digest(stage)==row['sha256'], 'Staged content mismatch'
|
||||
row['stage']=str(stage)
|
||||
for row in rows:
|
||||
if row['status']=='already-current': continue
|
||||
target=pathlib.Path(row['nativeTarget'])
|
||||
assert digest(target)==row['beforeSHA256'], 'Production changed before replacement'
|
||||
assert metadata(target)==row['beforeMetadata'], 'Permissions changed before replacement'
|
||||
os.replace(row['stage'],target)
|
||||
changed.append(row)
|
||||
syncdir(target.parent)
|
||||
row['status']='deployed'
|
||||
for row in rows:
|
||||
target=pathlib.Path(row['nativeTarget'])
|
||||
assert digest(target)==row['sha256']
|
||||
row['afterMetadata']=metadata(target)
|
||||
assert row['afterMetadata']==row['beforeMetadata'], 'Final metadata mismatch'
|
||||
result['ok']=True
|
||||
except Exception as e:
|
||||
result['error']=str(e)
|
||||
rollback_errors=[]
|
||||
for row in reversed(changed):
|
||||
try:
|
||||
target=pathlib.Path(row['nativeTarget'])
|
||||
restore=target.with_name('.dayu-wechat-restore-'+uuid.uuid4().hex)
|
||||
stages.append(restore)
|
||||
clone(pathlib.Path(row['nativeBackup']),restore,row['beforeMetadata'])
|
||||
assert digest(restore)==row['beforeSHA256']
|
||||
os.replace(restore,target); syncdir(target.parent)
|
||||
row['status']='rolled-back'
|
||||
except Exception as failure: rollback_errors.append(str(failure))
|
||||
result['rolledBack']=bool(changed) and not rollback_errors
|
||||
result['rollbackErrors']=rollback_errors
|
||||
finally:
|
||||
for stage in stages:
|
||||
if stage.exists(): stage.unlink()
|
||||
for row in rows: row.pop('stage',None)
|
||||
print(json.dumps(result,ensure_ascii=False))
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--apply', action='store_true')
|
||||
parser.add_argument('--ssh-control', help='Existing authenticated SSH control socket; no password argument')
|
||||
args = parser.parse_args()
|
||||
mounts = subprocess.check_output(['/sbin/mount'], text=True).splitlines()
|
||||
matches = [line for line in mounts if f' on {MOUNT} (smbfs,' in line]
|
||||
assert len(matches) == 1 and '@192.168.31.21/dayumedia%' in matches[0], 'NAS SMB mount mismatch'
|
||||
baseline = json.loads((ROOT/'verification/WeChatLoginBaseline.json').read_text())
|
||||
expected = {row['relativePath']: row['sha256'] for row in baseline['files']}
|
||||
files = []
|
||||
# Validate every target before making any production change.
|
||||
for relative in FILES:
|
||||
source = ROOT/'Backend'/relative
|
||||
target = NAS/relative
|
||||
subprocess.run(['php', '-l', str(source)], check=True, capture_output=True)
|
||||
assert sha(target) in (expected[str(relative)], sha(source)), 'Production baseline changed: '+str(relative)
|
||||
files.append(dict(relativePath=str(relative), sourceSHA256=sha(source),
|
||||
productionSHA256=sha(target), writable=os.access(target.parent, os.W_OK)))
|
||||
contracts = []
|
||||
for name in ('wechat_callback.php', 'online_luts.php'):
|
||||
result = subprocess.run(['php', str(ROOT/'Backend/tests'/name)], check=True, capture_output=True, text=True)
|
||||
report = json.loads(result.stdout)
|
||||
assert report['pass']
|
||||
contracts.append(dict(suite=name, count=report['count'], passed=True))
|
||||
review = dict(mode='apply' if args.apply else 'review', localProject=str(ROOT/'Backend'),
|
||||
nasRoot=str(NAS), files=files, contracts=contracts)
|
||||
if not args.apply:
|
||||
print(json.dumps(review, ensure_ascii=False, indent=2))
|
||||
return
|
||||
check_mount()
|
||||
assert all(row['writable'] for row in files), 'Production target is read-only'
|
||||
commit = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=ROOT, text=True).strip()
|
||||
remote = subprocess.check_output(['git', 'ls-remote', 'origin', 'refs/heads/main'], cwd=ROOT, text=True).split()[0]
|
||||
assert remote == commit, 'Source checkpoint must be pushed and verified first'
|
||||
for relative in FILES:
|
||||
saved = subprocess.check_output(['git', 'show', 'HEAD:Backend/'+str(relative)], cwd=ROOT)
|
||||
assert saved == (ROOT/'Backend'/relative).read_bytes(), 'Source not committed: '+str(relative)
|
||||
lock = ROOT/'Backend/.wechat-login-deployment.lock'
|
||||
lock.mkdir()
|
||||
write_json(lock/'owner.json', dict(pid=os.getpid(), sourceCommit=commit))
|
||||
try:
|
||||
request = dict(files=[dict(relativePath=str(relative), expectedSHA256=expected[str(relative)],
|
||||
sourceSHA256=sha(ROOT/'Backend'/relative),
|
||||
sourceBase64=base64.b64encode((ROOT/'Backend'/relative).read_bytes()).decode())
|
||||
for relative in FILES])
|
||||
command = ['/usr/bin/ssh', '-T', '-p', '22', '-o', 'BatchMode=yes',
|
||||
'-o', 'StrictHostKeyChecking=yes']
|
||||
if args.ssh_control:
|
||||
command += ['-o', 'ControlPath='+args.ssh_control]
|
||||
command += ['dayu@192.168.31.21', '/usr/bin/python3 -c '+shlex.quote(NATIVE_DEPLOY)]
|
||||
process = subprocess.run(command, input=json.dumps(request), text=True, capture_output=True, timeout=60)
|
||||
if process.returncode:
|
||||
raise RuntimeError('Native SSH deployment failed: '+process.stderr.strip())
|
||||
outcome = json.loads(process.stdout)
|
||||
results = outcome['files']
|
||||
for result in results:
|
||||
relative = result['relativePath']
|
||||
result['target'] = str(NAS/relative)
|
||||
if 'nativeBackup' in result:
|
||||
result['backup'] = str(NAS/Path(result['nativeBackup']).relative_to('/vol1/1000/dayumedia/wwwroot/dayu_media'))
|
||||
report = dict(
|
||||
checkedAt=datetime.datetime.now(datetime.timezone.utc).isoformat(), sourceCommit=commit,
|
||||
localProject=str(ROOT/'Backend'), nasRoot=str(NAS), files=results,
|
||||
nativeResult=outcome, liveScanVerified=False,
|
||||
status='native deployment complete; SMB readback pending' if outcome['ok'] else 'deployment failed')
|
||||
report_path = ROOT/'verification/WeChatLoginDeployment.json'
|
||||
# Keep the native transaction evidence even if SMB serves a stale cache.
|
||||
write_json(report_path, report)
|
||||
assert outcome['ok'], json.dumps(outcome,ensure_ascii=False)
|
||||
for result in results:
|
||||
deadline = time.monotonic()+30
|
||||
while sha(Path(result['target'])) != result['sha256']:
|
||||
if time.monotonic() >= deadline:
|
||||
raise RuntimeError('Native deployment passed; SMB readback remains stale: '+result['relativePath'])
|
||||
time.sleep(1)
|
||||
report['smbReadbackPassed'] = True
|
||||
report['status'] = 'files deployed; fresh unbound-account scan still required'
|
||||
write_json(report_path, report)
|
||||
print(json.dumps(dict(deployed=len(results), files=results), ensure_ascii=False, indent=2))
|
||||
finally:
|
||||
def ignore_missing(function, path, exception):
|
||||
if not isinstance(exception[1], FileNotFoundError):
|
||||
raise exception[1]
|
||||
shutil.rmtree(lock, onerror=ignore_missing)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -38,6 +38,9 @@ try {
|
||||
$reply=Dayu_Color_Beta::ingest(request($body));
|
||||
check($reply->status===200 && $reply->data['accepted'] && count($wpdb->rows)===1,'valid event accepted');
|
||||
Dayu_Color_Beta::ingest(request($body));check(count($wpdb->rows)===1,'retry idempotency');
|
||||
$newFields=array('source_build'=>'104','process_role'=>'plugin','termination_namespace'=>'DYLD','termination_code'=>1,'memory_mb'=>512,'cpu_percent'=>120,'thread_count'=>32,'resource_kind'=>'cube','pid'=>123,'width'=>3840,'height'=>2160,'sample_status'=>'captured','frames'=>'DYRenderer | image + 32 | UUID');
|
||||
check(Dayu_Color_Beta::clean_fields($newFields)==$newFields,'new evidence fields survive server normalization');
|
||||
foreach(array('render','plugin_state','tracking_frame','process_health','performance_summary','hang_sample') as $name){$b=$body;$b['events'][0]['event']=$name;$b['events'][0]['fields']=$newFields;check(Dayu_Color_Beta::ingest(request($b))->status===200,'new event accepted '.$name);}
|
||||
foreach(array('version'=>array(),'build'=>array(),'event'=>'material_path','session_id'=>'bad','occurred_at'=>null) as $key=>$bad){$b=$body;$b['events'][0][$key]=$bad;check(Dayu_Color_Beta::ingest(request($b))->data['status']===400,'malformed '.$key);}
|
||||
$b=$body;$b['events']=array_fill(0,33,$event);check(Dayu_Color_Beta::ingest(request($b))->data['status']===400,'batch limit');
|
||||
$b=$body;$b['padding']=str_repeat('a',100000);check(Dayu_Color_Beta::ingest(request($b))->data['status']===413,'byte limit');
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
// Isolated WordPress contract tests. Never load production configuration or user data.
|
||||
define('ABSPATH', __DIR__.'/'); define('ARRAY_A','ARRAY_A');
|
||||
class WP_Error { public $code,$message,$data; function __construct($c,$m,$d=array()){$this->code=$c;$this->message=$m;$this->data=$d;} }
|
||||
class WP_REST_Response { private $data; public $headers=array(); function __construct($d,$status=200){$this->data=$d;} function get_data(){return $this->data;} function header($k,$v){$this->headers[$k]=$v;} }
|
||||
class Request implements ArrayAccess {
|
||||
private $params,$headers;
|
||||
function __construct($p=array(),$token=''){$this->params=$p;$this->headers=array('authorization'=>$token?'Bearer '.$token:'');}
|
||||
function get_param($k){return $this->params[$k]??null;} function get_header($k){return $this->headers[$k]??'';} function get_body(){return json_encode($this->params);}
|
||||
function offsetExists($k):bool{return isset($this->params[$k]);} function offsetGet($k):mixed{return $this->get_param($k);} function offsetSet($k,$v):void{$this->params[$k]=$v;} function offsetUnset($k):void{unset($this->params[$k]);}
|
||||
}
|
||||
class WP_REST_Request extends Request {function __construct($method){parent::__construct();} function set_param($key,$value){$this[$key]=$value;}}
|
||||
class AuthBridge {function rest_check_access($request){if($request->get_param('token')!=='stub-valid-device-token')return new WP_Error('invalid','invalid',array('status'=>401));return array('success'=>true,'data'=>array('user_id'=>7));}}
|
||||
$GLOBALS['dayu_macos_app_auth']=new AuthBridge;
|
||||
$transients=array();$options=array();$meta=array();$purchase=array();$admin=false;$member=false;$bound=7;$rows=array();$checks=array();
|
||||
function add_action(...$a){} function add_filter(...$a){} function register_rest_route(...$a){} function wp_schedule_single_event(...$a){}
|
||||
function add_option($k,$v,...$a){global $options;if(isset($options[$k]))return false;$options[$k]=$v;return true;}
|
||||
function delete_option($k){global $options;unset($options[$k]);}
|
||||
function get_transient($k){global $transients;return $transients[$k]??false;} function set_transient($k,$v,$ttl){global $transients;$transients[$k]=$v;return true;} function delete_transient($k){global $transients;unset($transients[$k]);}
|
||||
function sanitize_key($v){return preg_replace('/[^a-z0-9_\-]/','',strtolower($v));} function sanitize_text_field($v){return trim(strip_tags($v));}
|
||||
function get_user_by($key,$id){return $id===7?(object)array('ID'=>7,'display_name'=>'测试用户'):false;}
|
||||
function get_user_meta($id,$key,$single){global $meta;return $meta[$key]??'';} function user_can($id,$cap){global $admin;return $admin;}
|
||||
function dayu_check_user_purchased_article($id,$post){global $purchase;return !empty($purchase[$post]);}
|
||||
function is_boosvip_status($id){global $member;return $member;}
|
||||
function is_wp_error($v){return $v instanceof WP_Error;}
|
||||
class DB {
|
||||
public $prefix='test_';
|
||||
function prepare($sql,...$args){if(count($args)===1&&is_array($args[0]))$args=$args[0];return array($sql,$args);}
|
||||
function get_var($q){global $bound;$sql=is_array($q)?$q[0]:$q;if(strpos($sql,'app_login_records')!==false)return $bound;if(strpos($sql,'COUNT(')!==false)return 1;return null;}
|
||||
function get_results($q,$mode=null){global $rows;return array_map(function($r){$row=(array)$r;$row['id']=(string)$row['id'];$row['file_size']=(string)$row['file_size'];return $row;},array_values(array_filter($rows,function($r){return $r->status==='published';})));}
|
||||
function get_col($q){return array('测试分类');} function esc_like($s){return addcslashes($s,'_%\\');}
|
||||
function get_row($q){global $rows;$id=$q[1][0];$row=$rows[$id]??null;return $row&&$row->status==='published'&&$row->material_type==='lut'?$row:null;}
|
||||
}
|
||||
$wpdb=new DB;
|
||||
require __DIR__.'/../wp-content/mu-plugins/dayu-color-online-luts.php';
|
||||
function check($pass,$name){global $checks;$checks[]=array('name'=>$name,'pass'=>(bool)$pass);if(!$pass){fwrite(STDERR,'FAIL '.$name."\n");exit(1);}}
|
||||
function denied($value,$status){return is_wp_error($value)&&($value->data['status']??0)===$status;}
|
||||
function body($value){return $value instanceof WP_REST_Response?$value->get_data():null;}
|
||||
check(!Dayu_Color_Online_LUTs::access(7),'ordinary account denied');
|
||||
foreach(array(14421,15792) as $post){$purchase=array($post=>true);check(Dayu_Color_Online_LUTs::access(7),'either individual purchase grants '.$post);}
|
||||
$purchase=array();$member=true;check(Dayu_Color_Online_LUTs::access(7),'active member allowed');$member=false;
|
||||
$meta=array('cao_user_type'=>'vip','cao_vip_end_time'=>'9999-09-09');check(Dayu_Color_Online_LUTs::access(7),'lifetime member allowed');
|
||||
$meta=array('cao_user_type'=>'vip','cao_vip_end_time'=>time()-1);check(!Dayu_Color_Online_LUTs::access(7),'expired member denied');
|
||||
$meta=array('cao_vip_type'=>'year','cao_vip_expire'=>time()+100);check(Dayu_Color_Online_LUTs::access(7),'legacy active membership supported');$meta=array();
|
||||
check(!Dayu_Color_Online_LUTs::access(8),'deleted user denied');
|
||||
$device='00000000-0000-0000-0000-000000000001';$key=str_repeat('a',40);$login='dayu_app_login_'.hash('sha256',$key);
|
||||
check(denied(Dayu_Color_Online_LUTs::device_login(new Request(array('device_uuid'=>$device))),400),'UUID alone cannot mint an online session');
|
||||
check(denied(Dayu_Color_Online_LUTs::device_login(new Request(array('device_uuid'=>$device,'login_token'=>str_repeat('x',30)))),401),'forged shared login token rejected');
|
||||
check(denied(Dayu_Color_Online_LUTs::device_login(new Request(array('device_uuid'=>'random-client-id','login_token'=>'stub-valid-device-token'))),400),'non-hardware UUID format rejected');
|
||||
$restored=body(Dayu_Color_Online_LUTs::device_login(new Request(array('device_uuid'=>$device,'login_token'=>'stub-valid-device-token'))));
|
||||
check(strlen($restored['token']??'')===64&&$restored['allowed']===false,'existing bound account restored without granting unpaid access');
|
||||
$bound=8;check(denied(Dayu_Color_Online_LUTs::device_login(new Request(array('device_uuid'=>$device,'login_token'=>'stub-valid-device-token'))),401),'shared login user must match current hardware binding');$bound=0;
|
||||
check(denied(Dayu_Color_Online_LUTs::device_login(new Request(array('device_uuid'=>$device,'login_token'=>'stub-valid-device-token'))),401),'unbound hardware cannot resume another account');$bound=7;
|
||||
check(body(Dayu_Color_Online_LUTs::logout(new Request(array(),$restored['token'])))['success']===true,'restored session can be revoked normally');
|
||||
$session=array('app_name'=>'DayuColor','device_uuid'=>$device,'expires_at'=>time()+120,'status'=>'pending','user_id'=>7);
|
||||
$transients[$login]=$session;
|
||||
check(body(Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device))))['status']==='pending','pending login cannot mint a credential');
|
||||
$bound=0;
|
||||
check(body(Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device))))['status']==='pending','first unbound device can wait for WeChat approval');
|
||||
$transients[$login]['status']='approved';
|
||||
check(denied(Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device))),401),'approval cannot bypass missing UUID binding');
|
||||
check(isset($transients[$login])&&!isset($options['dayu_color_lut_once_'.hash('sha256',$key)]),'missing binding does not consume the login session');
|
||||
$transients[$login]=$session;$transients[$login]['status']='denied';$transients[$login]['message']='该 UUID 已绑定其他账号,请先解绑';
|
||||
$failed=Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device)));
|
||||
check(denied($failed,401)&&$failed->message===$transients[$login]['message'],'callback denial immediately stops installed client polling with the actual reason');
|
||||
$transients[$login]['status']='expired';
|
||||
check(denied(Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device))),401),'expired callback stops installed client polling');
|
||||
$transients[$login]=$session;$transients[$login]['expires_at']=time()-1;
|
||||
check(denied(Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device))),401),'past session deadline stops polling');
|
||||
$transients[$login]=$session;$bound=7;
|
||||
$transients[$login]['app_name']='FCPXSoundEffects';check(denied(Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device))),401),'another product login rejected');
|
||||
$transients[$login]=$session;$transients[$login]['status']='approved';
|
||||
$issued=Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device)));$token=body($issued)['token']??'';
|
||||
check(strlen($token)===64,'approved product login exchanges a random token');check($issued->headers['Cache-Control']==='no-store, private','credential responses cannot be cached');
|
||||
check(denied(Dayu_Color_Online_LUTs::exchange(new Request(array('session_key'=>$key,'device_uuid'=>$device))),401),'one-time login replay rejected');
|
||||
check(denied(Dayu_Color_Online_LUTs::catalog(new Request()),401),'anonymous catalogue rejected');
|
||||
check(denied(Dayu_Color_Online_LUTs::download(new Request(array('id'=>1))),401),'anonymous file rejected');
|
||||
check(denied(Dayu_Color_Online_LUTs::preview(new Request(array('id'=>1))),401),'anonymous frame rejected before decoding');
|
||||
check(body(Dayu_Color_Online_LUTs::status(new Request(array(),$token)))['allowed']===false,'signed-in unpaid account has no online permission');
|
||||
check(denied(Dayu_Color_Online_LUTs::catalog(new Request(array(),$token)),403),'unpaid catalogue denied server-side');
|
||||
$purchase=array(15792=>true);
|
||||
check(body(Dayu_Color_Online_LUTs::status(new Request(array(),$token)))['allowed']===true,'new purchase is recognized without another login');
|
||||
$bound=8;check(denied(Dayu_Color_Online_LUTs::status(new Request(array(),$token)),401),'device rebind revokes previous session');$bound=7;
|
||||
$root=sys_get_temp_dir().'/dayu-color-lut-contract-'.bin2hex(random_bytes(8));mkdir($root);mkdir($root.'/materials');
|
||||
class Storage {public $root;function material_storage_root(){return $this->root;}}
|
||||
$storage=new Storage;$storage->root=$root;$GLOBALS['dayu_fcpx_sfx_api']=$storage;
|
||||
$cube="TITLE test\nLUT_3D_SIZE 2\n";for($z=0;$z<2;$z++)for($y=0;$y<2;$y++)for($x=0;$x<2;$x++)$cube.=(1-$x).' '.(1-$y).' '.(1-$z)."\n";
|
||||
$path=$root.'/materials/test.cube';file_put_contents($path,$cube);
|
||||
$rows[1]=(object)array('id'=>1,'title'=>'测试 LUT','category'=>'测试分类','file_size'=>strlen($cube),'checksum'=>hash('sha256',$cube),'material_type'=>'lut','status'=>'published','relative_path'=>'test.cube');
|
||||
$rows[2]=clone $rows[1];$rows[2]->id=2;$rows[2]->status='draft';
|
||||
check(count(body(Dayu_Color_Online_LUTs::catalog(new Request(array(),$token)))['items'])===1,'catalogue excludes private drafts');
|
||||
$serialized=body(Dayu_Color_Online_LUTs::catalog(new Request(array(),$token)))['items'][0];check(is_int($serialized['id'])&&is_int($serialized['file_size']),'SQL string identifiers and sizes serialize as JSON numbers for the native client');
|
||||
check(body(Dayu_Color_Online_LUTs::download(new Request(array('id'=>1),$token))) instanceof Dayu_Color_LUT_Binary,'authorized published LUT streams original bytes');
|
||||
check(denied(Dayu_Color_Online_LUTs::download(new Request(array('id'=>2),$token)),404),'private LUT cannot be downloaded by guessed ID');
|
||||
$rows[1]->relative_path='../outside.cube';file_put_contents($root.'/outside.cube',$cube);
|
||||
check(denied(Dayu_Color_Online_LUTs::download(new Request(array('id'=>1),$token)),503),'catalogue path traversal rejected');$rows[1]->relative_path='test.cube';
|
||||
$rows[1]->checksum=str_repeat('0',64);check(denied(Dayu_Color_Online_LUTs::download(new Request(array('id'=>1),$token)),503),'server rejects modified LUT bytes');$rows[1]->checksum=hash('sha256',$cube);
|
||||
$image=imagecreatetruecolor(3,2);imagesetpixel($image,0,0,0x204060);imagesetpixel($image,1,0,0xabcdef);ob_start();imagepng($image);$png=ob_get_clean();unset($image);
|
||||
$render=Dayu_Color_LUT_Renderer::render($path,$png);check(is_string($render),'renderer returns a PNG');$out=imagecreatefromstring($render);
|
||||
check(imagesx($out)===3&&imagesy($out)===2,'renderer preserves source aspect and size');check((imagecolorat($out,0,0)&0xffffff)===0xdfbf9f,'known inverse LUT transforms pixel values correctly');unset($out);
|
||||
$preview=body(Dayu_Color_Online_LUTs::preview(new Request(array('id'=>1,'frame_png'=>base64_encode($png)),$token)));check($preview instanceof Dayu_Color_LUT_Binary&&$preview->bytes()===$render,'authorized frame route returns the actual LUT effect');
|
||||
check(is_wp_error(Dayu_Color_LUT_Renderer::render($path,'invalid')),'malformed image rejected');
|
||||
$large=imagecreatetruecolor(641,1);ob_start();imagepng($large);$too_large=ob_get_clean();unset($large);check(is_wp_error(Dayu_Color_LUT_Renderer::render($path,$too_large)),'over-limit image rejected');
|
||||
file_put_contents($path,"LUT_3D_SIZE 2\n0 0 0\n");check(is_wp_error(Dayu_Color_LUT_Renderer::render($path,$png)),'truncated LUT rejected');
|
||||
file_put_contents($path,"\xff\xfe".iconv('UTF-8','UTF-16LE',$cube));check(is_string(Dayu_Color_LUT_Renderer::render($path,$png)),'UTF-16 BOM LUT supported');
|
||||
$purchase=array();check(denied(Dayu_Color_Online_LUTs::preview(new Request(array('id'=>1,'frame_png'=>base64_encode($png)),$token)),403),'permission revoked before another frame is processed');
|
||||
check(body(Dayu_Color_Online_LUTs::logout(new Request(array(),$token)))['success']===true,'logout invalidates server credential');check(denied(Dayu_Color_Online_LUTs::status(new Request(array(),$token)),401),'logged-out token cannot be reused');
|
||||
unlink($path);unlink($root.'/outside.cube');rmdir($root.'/materials');rmdir($root);
|
||||
$report=array('pass'=>true,'count'=>count($checks),'scope'=>'Isolated PHP/GD contracts; synthetic users, purchases and frames; no production credentials or account data.','checks'=>$checks);
|
||||
echo json_encode($report,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE)."\n";
|
||||
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
// Execute the actual theme callback with synthetic OAuth and WordPress services.
|
||||
// Never load wp-config.php, contact WeChat, or read/change real accounts.
|
||||
namespace Yurun\OAuthLogin\Weixin {
|
||||
class OAuth2 {
|
||||
public $http, $openid='synthetic-wechat-openid';
|
||||
public function __construct(...$args) { $this->http=new \stdClass; }
|
||||
public function getAccessToken($state) { return 'synthetic-provider-token'; }
|
||||
public function getUserInfo() { return array('nickname'=>'测试用户', 'headimgurl'=>'https://example.invalid/avatar'); }
|
||||
}
|
||||
}
|
||||
namespace {
|
||||
define('ABSPATH', __DIR__.'/'); define('MINUTE_IN_SECONDS', 60);
|
||||
class CallbackRedirect extends \RuntimeException {}
|
||||
class CallbackRejected extends \RuntimeException {}
|
||||
class LoginEvents {
|
||||
public $events=array();
|
||||
public function log_login_event($stage,$fields=array()) { $this->events[]=array('stage'=>$stage,'fields'=>$fields); }
|
||||
}
|
||||
class CallbackDB {
|
||||
public $usermeta='synthetic_usermeta';
|
||||
public function prepare(...$args) { return $args; }
|
||||
public function get_var($query) { return 7; }
|
||||
}
|
||||
$wpdb=new CallbackDB;
|
||||
$GLOBALS['dayu_macos_app_auth']=new LoginEvents;
|
||||
$transients=array(); $checks=array();
|
||||
function _cao($key) { return array('appid'=>'synthetic','appkey'=>'synthetic'); }
|
||||
function home_url($path) { return 'https://dayu.media'.$path; }
|
||||
function wp_parse_url($url) { return parse_url($url); }
|
||||
function sanitize_text_field($value) { return trim(strip_tags($value)); }
|
||||
function set_transient($key,$value,$ttl) { global $transients; $transients[$key]=$value; return true; }
|
||||
function get_current_user_id() { return 0; }
|
||||
function wp_set_current_user($id) {}
|
||||
function wp_set_auth_cookie(...$args) {}
|
||||
function get_user_by(...$args) { return (object)array('user_login'=>'synthetic-user'); }
|
||||
function do_action(...$args) {}
|
||||
function wp_safe_redirect($url) { throw new CallbackRedirect; }
|
||||
function cao_wp_die(...$args) { throw new CallbackRejected; }
|
||||
function is_wp_error($value) { return false; }
|
||||
function check($passed,$name) {
|
||||
global $checks;
|
||||
$checks[]=array('name'=>$name,'pass'=>(bool)$passed);
|
||||
if (!$passed) { fwrite(STDERR,'FAIL '.$name."\n"); exit(1); }
|
||||
}
|
||||
// Redirects throw before the production callback's exit statements.
|
||||
function callback_proof($app, $overrides=array(), $host='dayu.media', $provider_state=true) {
|
||||
global $transients;
|
||||
$transients=array(); $GLOBALS['dayu_macos_app_auth']->events=array();
|
||||
$query=array_merge(array('action'=>'app_wechat_auth_check','app_name'=>$app,
|
||||
'fcpxqwen_session'=>str_repeat('a',40),'device_uuid'=>'00000000-0000-0000-0000-000000000001'),$overrides);
|
||||
$_SESSION=array('oauth_rurl'=>'https://'.$host.'/wp-admin/admin-ajax.php?'.http_build_query($query));
|
||||
if ($provider_state) { $_SESSION['YURUN_WEIXIN_STATE']='synthetic-state'; }
|
||||
$_GET=array('code'=>'synthetic-code');
|
||||
try { include $GLOBALS['callback_source']; } catch (CallbackRedirect $e) {} catch (CallbackRejected $e) {}
|
||||
return $_SESSION['dayu_fcpx_wechat_oauth']??null;
|
||||
}
|
||||
$callback_source=$argv[1]??__DIR__.'/../wp-content/themes/ripro5/inc/oauth/weixin/callback.php';
|
||||
session_start();
|
||||
$proof=callback_proof('DayuColor');
|
||||
check(is_array($proof),'DayuColor first scan writes OAuth proof without any prior UUID binding');
|
||||
check($proof['session_hash']===hash('sha256',str_repeat('a',40))
|
||||
&&$proof['device_hash']===hash('sha256','00000000-0000-0000-0000-000000000001')
|
||||
&&$proof['openid_hash']===hash('sha256','synthetic-wechat-openid'),
|
||||
'proof binds this login session, hardware UUID and provider identity');
|
||||
check(abs(time()-$proof['issued_at'])<=1,'proof has a fresh server timestamp');
|
||||
check(($transients['dayu_fcpx_oauth_proof_'.hash('sha256',str_repeat('a',40))]??null)===$proof,
|
||||
'transient fallback matches proof across PHP session boundaries');
|
||||
check(in_array('oauth_proof_written',array_column($GLOBALS['dayu_macos_app_auth']->events,'stage'),true),
|
||||
'successful proof is visible in existing login diagnostics');
|
||||
foreach (array('FCPXQwen3ASR','FCPXPython','FCPXSoundEffects','qwenzhiyin','DayuDownie','DayuLightFactory') as $app) {
|
||||
check(is_array(callback_proof($app)),'existing app callback preserved: '.$app);
|
||||
}
|
||||
check(callback_proof('UnknownApp')===null,'unrecognized apps do not receive proof');
|
||||
check(callback_proof('DayuColor',array(),'foreign.example')===null,'foreign redirect host cannot receive proof');
|
||||
check(callback_proof('DayuColor',array('action'=>'other_action'))===null,'wrong callback action cannot receive proof');
|
||||
check(callback_proof('DayuColor',array('fcpxqwen_session'=>'short'))===null,'invalid login session cannot receive proof');
|
||||
check(callback_proof('DayuColor',array('device_uuid'=>'random-client-id'))===null,'non-hardware UUID cannot receive proof');
|
||||
check(callback_proof('DayuColor',array(),'dayu.media',false)===null,'browser cookie or redirect alone cannot bypass provider state');
|
||||
session_destroy();
|
||||
echo json_encode(array('pass'=>true,'count'=>count($checks),
|
||||
'scope'=>'Actual scoped theme callback with synthetic OAuth and WordPress services; no live scan or user data.',
|
||||
'checks'=>$checks),JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE)."\n";
|
||||
}
|
||||
+3
-2
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Anonymous public-beta endpoint smoke test; no credentials or production settings."""
|
||||
import datetime,json,time,urllib.request,urllib.error,uuid
|
||||
import datetime,json,time,urllib.request,urllib.error,uuid,plistlib
|
||||
from pathlib import Path
|
||||
ROOT=Path(__file__).resolve().parent.parent
|
||||
BASE='https://dayu.media/wp-json/dayu-color/v1/'
|
||||
@@ -14,7 +14,8 @@ def main():
|
||||
assert call('update?bundle_id=other&channel=beta')[0]==400
|
||||
assert call('diagnostics')[0] in (401,403)
|
||||
event_id=str(uuid.uuid4());installation=str(uuid.uuid4());session=str(uuid.uuid4())
|
||||
event=dict(event_id=event_id,session_id=session,source='app',version='1.7.0',build=45,event='diagnostic_summary',occurred_at=time.time(),fields={'status':'deployment_smoke_test','count':1})
|
||||
info=plistlib.loads((ROOT/'大鱼调色/Wrapper Application/Info.plist').read_bytes())
|
||||
event=dict(event_id=event_id,session_id=session,source='app',version=info['CFBundleShortVersionString'],build=int(info['CFBundleVersion']),event='hang_sample',occurred_at=time.time(),fields={'status':'deployment_smoke_test','phase':'verification','sample_status':'contract_only','count':1})
|
||||
payload=dict(bundle_id='com.dayu.color',installation_id=installation,events=[event])
|
||||
for attempt in range(2):
|
||||
status,reply=call('diagnostics',payload);assert status==200 and reply['accepted'] and reply['event_ids']==[event_id],(status,reply)
|
||||
|
||||
@@ -12,10 +12,10 @@ final class Dayu_Color_Beta {
|
||||
const EVENTS = array('process_start','process_exit','plugin_init','inspector_create','inspector_refresh',
|
||||
'device_prepare','gpu_pipeline','first_render','render_error','main_thread_stall',
|
||||
'operation_stall','previous_session_pending','crash_summary','registration','host_confirmed',
|
||||
'update_check','update_download','update_validation','update_installer','diagnostic_summary');
|
||||
'render','plugin_state','tracking_frame','process_health','performance_summary','hang_sample','update_check','update_download','update_validation','update_installer','diagnostic_summary');
|
||||
const FIELDS = array('phase','stage','pipeline','duration_ms','status','error_domain','error_code',
|
||||
'exception','signal','frames','report_time','count','pending','model','os_version','fcp_version',
|
||||
'cpu_cores','memory_gb','gpu','main_delay_ms','active_stages','source_version');
|
||||
'cpu_cores','memory_gb','gpu','main_delay_ms','active_stages','source_version','source_build','process_role','termination_namespace','termination_code','pid','resource_kind','memory_mb','cpu_percent','thread_count','uptime_s','max_duration_ms','average_ms','width','height','layer_count','mask_count','sample_status');
|
||||
|
||||
public static function boot() {
|
||||
add_action('rest_api_init', array(__CLASS__, 'routes'));
|
||||
@@ -90,7 +90,7 @@ final class Dayu_Color_Beta {
|
||||
$out = array();
|
||||
foreach (self::FIELDS as $key) {
|
||||
if (!array_key_exists($key,$input) || !is_scalar($input[$key])) continue;
|
||||
if (in_array($key,array('duration_ms','main_delay_ms','memory_gb','cpu_cores','count','pending','error_code'),true)) {
|
||||
if (in_array($key,array('duration_ms','main_delay_ms','memory_gb','cpu_cores','count','pending','error_code','pid','termination_code','memory_mb','cpu_percent','thread_count','uptime_s','max_duration_ms','average_ms','width','height','layer_count','mask_count'),true)) {
|
||||
if (is_numeric($input[$key]) && is_finite((float)$input[$key])) $out[$key]=max(-1000000,min(86400000,(float)$input[$key]));
|
||||
continue;
|
||||
}
|
||||
@@ -165,15 +165,17 @@ final class Dayu_Color_Beta {
|
||||
echo '<h2>公测更新</h2><p>'.($manifest?'当前版本:'.esc_html($manifest['version']).'('.esc_html($manifest['build']).')':'尚未发布更新包').'</p>';
|
||||
echo '<h2>诊断事件</h2><form method="get"><input type="hidden" name="page" value="dayu-color-beta">';
|
||||
foreach (array('build'=>'构建号','event'=>'事件','installation'=>'完整报告标识') as $key=>$label) echo '<label>'.esc_html($label).' <input name="'.esc_attr($key).'" value="'.esc_attr($request->get_param($key)).'"></label> ';
|
||||
echo '<button class="button">筛选</button></form><table class="widefat striped"><thead><tr><th>时间(UTC)</th><th>版本</th><th>报告标识</th><th>来源/事件</th><th>内容</th></tr></thead><tbody>';
|
||||
echo '<button class="button">筛选</button></form><table class="widefat striped"><thead><tr><th>时间(UTC)</th><th>上传版本 / 故障版本</th><th>报告标识</th><th>来源/事件</th><th>内容</th></tr></thead><tbody>';
|
||||
foreach ($result['events'] as $row) {
|
||||
echo '<tr><td>'.esc_html($row['occurred_at']).'<br>送达 '.esc_html($row['received_at']).'</td><td>'.esc_html($row['client_version'].' ('.$row['client_build'].')').'</td><td><code>'.esc_html($row['installation_id']).'</code><br>会话 '.esc_html(substr($row['session_id'],0,8)).'</td><td>'.esc_html($row['source'].' / '.$row['event']).'</td><td><pre style="white-space:pre-wrap;max-width:760px">'.esc_html(wp_json_encode(json_decode($row['fields_json'],true),JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE)).'</pre></td></tr>';
|
||||
$fields=json_decode($row['fields_json'],true)?:array();
|
||||
$crashed=$row['event']==='crash_summary' ? '<br>故障:'.esc_html(($fields['source_version']??'未知').' ('.($fields['source_build']??'未采集').')') : '';
|
||||
echo '<tr><td>'.esc_html($row['occurred_at']).'<br>送达 '.esc_html($row['received_at']).'</td><td>'.esc_html($row['client_version'].' ('.$row['client_build'].')').$crashed.'</td><td><code>'.esc_html($row['installation_id']).'</code><br>会话 '.esc_html(substr($row['session_id'],0,8)).'</td><td>'.esc_html($row['source'].' / '.$row['event']).'</td><td><pre style="white-space:pre-wrap;max-width:760px">'.esc_html(wp_json_encode(json_decode($row['fields_json'],true),JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE)).'</pre></td></tr>';
|
||||
}
|
||||
echo '</tbody></table><p>';
|
||||
$base=array('page'=>'dayu-color-beta','build'=>$request->get_param('build'),'event'=>$request->get_param('event'),'installation'=>$request->get_param('installation'));
|
||||
if ($result['page']>1) echo '<a class="button" href="'.esc_url(add_query_arg(array_merge($base,array('paged'=>$result['page']-1)),admin_url('tools.php'))).'">上一页</a> ';
|
||||
if (count($result['events'])===50) echo '<a class="button" href="'.esc_url(add_query_arg(array_merge($base,array('paged'=>$result['page']+1)),admin_url('tools.php'))).'">下一页</a>';
|
||||
echo '</p><p>仅包含产品版本、环境、阶段耗时、错误代码及本插件崩溃摘要,不接收素材、预设、硬件UUID或账户凭据。</p></div>';
|
||||
echo '</p><p>仅包含产品版本、环境、阶段耗时、资源使用、错误代码及本产品崩溃/卡顿调用栈摘要,不接收素材、预设、硬件UUID或账户凭据。</p></div>';
|
||||
}
|
||||
}
|
||||
Dayu_Color_Beta::boot();
|
||||
@@ -0,0 +1,185 @@
|
||||
<?php
|
||||
/** Plugin Name: Dayu Color Online LUTs
|
||||
* Product-scoped sessions and access to the existing published LUT catalogue.
|
||||
*/
|
||||
if (!defined('ABSPATH')) { exit; }
|
||||
require_once __DIR__ . '/dayu-color-online-luts/renderer.php';
|
||||
|
||||
final class Dayu_Color_LUT_Binary {
|
||||
private $path;
|
||||
private $bytes;
|
||||
private $mime;
|
||||
public function __construct($path, $bytes, $mime) { $this->path=$path; $this->bytes=$bytes; $this->mime=$mime; }
|
||||
public function send() {
|
||||
header('Content-Type: ' . $this->mime);
|
||||
header('Cache-Control: no-store, private');
|
||||
header('X-Content-Type-Options: nosniff');
|
||||
header('Content-Length: ' . ($this->path ? filesize($this->path) : strlen($this->bytes)));
|
||||
if ($this->path) { readfile($this->path); } else { echo $this->bytes; }
|
||||
}
|
||||
public function bytes() { return $this->bytes; }
|
||||
}
|
||||
|
||||
final class Dayu_Color_Online_LUTs {
|
||||
const APP = 'DayuColor';
|
||||
const TTL = 2592000;
|
||||
public static function init() {
|
||||
add_action('rest_api_init', array(__CLASS__, 'routes'));
|
||||
add_filter('rest_pre_serve_request', array(__CLASS__, 'serve'), 10, 4);
|
||||
add_action('dayu_color_lut_consumed_cleanup', 'delete_option');
|
||||
}
|
||||
public static function routes() {
|
||||
foreach (array('session'=>'exchange', 'device'=>'device_login', 'status'=>'status', 'logout'=>'logout', 'catalog'=>'catalog', '(?P<id>\d+)/download'=>'download', '(?P<id>\d+)/preview'=>'preview') as $path=>$handler) {
|
||||
register_rest_route('dayu-color/v1', '/lut/' . $path, array('methods'=>'POST', 'callback'=>array(__CLASS__, $handler), 'permission_callback'=>'__return_true'));
|
||||
}
|
||||
}
|
||||
public static function serve($served, $result, $request, $server) {
|
||||
if (strpos($request->get_route(), '/dayu-color/v1/lut/') !== 0) { return $served; }
|
||||
$data=$result->get_data();
|
||||
if ($data instanceof Dayu_Color_LUT_Binary) { $data->send(); return true; }
|
||||
return $served;
|
||||
}
|
||||
private static function response($data) {
|
||||
$response=new WP_REST_Response($data, 200);
|
||||
$response->header('Cache-Control', 'no-store, private');
|
||||
return $response;
|
||||
}
|
||||
private static function error($code, $message, $status) { return new WP_Error('dayu_color_lut_' . $code, $message, array('status'=>$status)); }
|
||||
private static function device($value) {
|
||||
$value=strtoupper(trim((string)$value));
|
||||
return preg_match('/^[A-F0-9]{8}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{12}$/D', $value) ? $value : '';
|
||||
}
|
||||
private static function bound_user($device) {
|
||||
global $wpdb;
|
||||
return intval($wpdb->get_var($wpdb->prepare("SELECT user_id FROM {$wpdb->prefix}app_login_records WHERE device_uuid=%s AND is_active=1 ORDER BY last_active DESC, id DESC LIMIT 1", $device)));
|
||||
}
|
||||
public static function access($user_id) {
|
||||
if (!$user_id || !get_user_by('ID', $user_id)) { return false; }
|
||||
if (user_can($user_id, 'manage_options')) { return true; }
|
||||
if (class_exists('CaoUser')) { $user=new CaoUser($user_id); if (method_exists($user, 'vip_status') && $user->vip_status()) { return true; } }
|
||||
if (function_exists('is_boosvip_status') && is_boosvip_status($user_id)) { return true; }
|
||||
$type=get_user_meta($user_id, 'cao_user_type', true);
|
||||
$end=get_user_meta($user_id, 'cao_vip_end_time', true);
|
||||
$until=is_numeric($end) ? intval($end) : strtotime((string)$end);
|
||||
if ($type === 'vip' && ($end === '9999-09-09' || ($until && $until > time()))) { return true; }
|
||||
if (get_user_meta($user_id, 'cao_vip_type', true) && intval(get_user_meta($user_id, 'cao_vip_expire', true)) > time()) { return true; }
|
||||
global $wpdb;
|
||||
foreach (array(14421, 15792) as $post) {
|
||||
if (function_exists('dayu_check_user_purchased_article') && dayu_check_user_purchased_article($user_id, $post)) { return true; }
|
||||
if ($wpdb->get_var($wpdb->prepare("SELECT id FROM {$wpdb->prefix}cao_paylog WHERE user_id=%d AND post_id=%d AND status=1 LIMIT 1", $user_id, $post))) { return true; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static function exchange($request) {
|
||||
$key=(string)$request->get_param('session_key'); $device=self::device($request->get_param('device_uuid'));
|
||||
if (!$device || !preg_match('/^[A-Za-z0-9_-]{32,80}$/D', $key)) { return self::error('login', '登录会话无效,请重新登录。', 400); }
|
||||
$transient='dayu_app_login_' . hash('sha256', $key); $session=get_transient($transient);
|
||||
if (!is_array($session) || intval($session['expires_at'] ?? 0) < time() || ($session['app_name'] ?? '') !== self::APP || !hash_equals((string)($session['device_uuid'] ?? ''), $device)) { return self::error('expired', '登录会话已过期,请重新登录。', 401); }
|
||||
// Installed clients stop polling on 401. Do not leave a denied callback
|
||||
// looking like a pending login until the ten-minute timer expires.
|
||||
if (in_array($session['status'] ?? '', array('denied', 'expired'), true)) {
|
||||
return self::error('login_failed', sanitize_text_field($session['message'] ?? '微信登录失败,请重新登录。'), 401);
|
||||
}
|
||||
if (($session['status'] ?? '') !== 'approved') { return self::response(array('status'=>sanitize_key($session['status'] ?? 'pending'), 'message'=>sanitize_text_field($session['message'] ?? '等待微信登录'))); }
|
||||
$user_id=intval($session['user_id'] ?? 0);
|
||||
if (!$user_id || self::bound_user($device) !== $user_id || !get_user_by('ID', $user_id)) { return self::error('binding', '账号绑定已变化,请重新登录。', 401); }
|
||||
// Atomic one-time exchange; add_option is unique in the shared DB, unlike get/set transient pairs.
|
||||
$once='dayu_color_lut_once_' . hash('sha256', $key);
|
||||
if (!add_option($once, time(), '', false)) { return self::error('used', '登录会话已使用,请重新登录。', 401); }
|
||||
delete_transient($transient);
|
||||
// Keep the marker past the original login lifetime, including concurrent poll requests.
|
||||
wp_schedule_single_event(time()+1200, 'dayu_color_lut_consumed_cleanup', array($once));
|
||||
return self::issue($user_id, $device);
|
||||
}
|
||||
private static function issue($user_id, $device) {
|
||||
$token=bin2hex(random_bytes(32)); $expires=time()+self::TTL;
|
||||
set_transient('dayu_color_lut_' . hash('sha256', $token), array('user_id'=>$user_id, 'device'=>$device, 'expires'=>$expires), self::TTL);
|
||||
return self::response(array('status'=>'approved', 'token'=>$token, 'expires_at'=>$expires, 'allowed'=>self::access($user_id), 'username'=>get_user_by('ID', $user_id)->display_name));
|
||||
}
|
||||
public static function device_login($request) {
|
||||
// Reuse the existing hardware-UUID login's JWT verification. Never accept
|
||||
// a submitted user ID or UUID alone as an online LUT session credential.
|
||||
$device=self::device($request->get_param('device_uuid'));
|
||||
$token=(string)$request->get_param('login_token');
|
||||
if (!$device || strlen($token)<20 || strlen($token)>8192) { return self::error('device_login', '设备登录凭据无效,请重新识别本机账号。', 400); }
|
||||
foreach (array('device'=>array($device,30), 'ip'=>array((string)($_SERVER['REMOTE_ADDR']??''),120)) as $scope=>$limit) {
|
||||
$key='dayu_color_lut_login_' . $scope . '_' . hash('sha256',$limit[0]) . '_' . intval(time()/600);
|
||||
$count=intval(get_transient($key));
|
||||
if ($count >= $limit[1]) { return self::error('rate', '设备验证过于频繁,请稍后重试。', 429); }
|
||||
set_transient($key,$count+1,600);
|
||||
}
|
||||
$auth=$GLOBALS['dayu_macos_app_auth']??null;
|
||||
if (!$auth || !is_callable(array($auth,'rest_check_access'))) { return self::error('auth_unavailable','账号服务暂不可用,请稍后重试。',503); }
|
||||
$proof=new WP_REST_Request('POST');
|
||||
foreach (array('token'=>$token,'device_uuid'=>$device,'app_name'=>self::APP,'article_id'=>14421,'allow_vip'=>1) as $key=>$value) { $proof->set_param($key,$value); }
|
||||
$verified=$auth->rest_check_access($proof);
|
||||
if (is_wp_error($verified)) { return self::error('device_login','本机账号验证已失效,请刷新或重新微信登录。',401); }
|
||||
$user_id=intval($verified['data']['user_id']??0);
|
||||
if (($verified['success']??false)!==true || !$user_id || self::bound_user($device)!==$user_id || !get_user_by('ID',$user_id)) { return self::error('binding','本机尚未绑定此账号,请在主 APP 重新登录。',401); }
|
||||
return self::issue($user_id,$device);
|
||||
}
|
||||
private static function authentication($request, $paid=true) {
|
||||
$header=trim((string)$request->get_header('authorization'));
|
||||
if (!preg_match('/^Bearer ([a-f0-9]{64})$/D', $header, $match)) { return self::error('login_required', '请先在大鱼调色主 APP 登录。', 401); }
|
||||
$key='dayu_color_lut_' . hash('sha256', $match[1]); $session=get_transient($key);
|
||||
if (!is_array($session) || intval($session['expires'] ?? 0)<time() || self::bound_user($session['device']) !== intval($session['user_id']) || !get_user_by('ID', intval($session['user_id']))) { return self::error('login_required', '登录已失效,请在主 APP 重新登录。', 401); }
|
||||
if ($paid && !self::access(intval($session['user_id']))) { return self::error('access_denied', '在线 LUT 需要有效会员,或已购买文章 14421 / 15792。', 403); }
|
||||
$session['key']=$key; return $session;
|
||||
}
|
||||
public static function status($request) {
|
||||
$session=self::authentication($request, false); if (is_wp_error($session)) { return $session; }
|
||||
return self::response(array('allowed'=>self::access($session['user_id']), 'username'=>get_user_by('ID', $session['user_id'])->display_name, 'expires_at'=>$session['expires'], 'renderer'=>function_exists('imagecreatefromstring')));
|
||||
}
|
||||
public static function logout($request) {
|
||||
$session=self::authentication($request, false); if (is_wp_error($session)) { return $session; }
|
||||
delete_transient($session['key']); return self::response(array('success'=>true));
|
||||
}
|
||||
public static function catalog($request) {
|
||||
$session=self::authentication($request); if (is_wp_error($session)) { return $session; }
|
||||
global $wpdb; $table=$wpdb->prefix . 'dayu_sfx_materials';
|
||||
$page=max(1, intval($request->get_param('page'))); $limit=60;
|
||||
$category=mb_substr(sanitize_text_field((string)$request->get_param('category')), 0, 191);
|
||||
$search=mb_substr(sanitize_text_field((string)$request->get_param('search')), 0, 100);
|
||||
$where="material_type='lut' AND status='published'"; $values=array();
|
||||
if ($category!=='') { $where.=' AND category=%s'; $values[]=$category; }
|
||||
if ($search!=='') { $where.=' AND (title LIKE %s OR category LIKE %s)'; $like='%'.$wpdb->esc_like($search).'%'; array_push($values, $like, $like); }
|
||||
$count="SELECT COUNT(*) FROM {$table} WHERE {$where}";
|
||||
$total=intval($wpdb->get_var($values ? $wpdb->prepare($count, $values) : $count));
|
||||
$rows=$wpdb->get_results($wpdb->prepare("SELECT id,title,category,file_size,checksum FROM {$table} WHERE {$where} ORDER BY title ASC,id ASC LIMIT %d OFFSET %d", array_merge($values, array($limit,($page-1)*$limit))), ARRAY_A);
|
||||
$categories=$wpdb->get_col("SELECT DISTINCT category FROM {$table} WHERE material_type='lut' AND status='published' AND category<>'' ORDER BY category ASC");
|
||||
$rows=(array)$rows; foreach ($rows as &$row) { $row['id']=intval($row['id']); $row['file_size']=intval($row['file_size']); } unset($row);
|
||||
return self::response(array('items'=>(array)$rows, 'categories'=>array_values((array)$categories), 'page'=>$page, 'total'=>$total, 'per_page'=>$limit));
|
||||
}
|
||||
private static function material($id) {
|
||||
global $wpdb;
|
||||
$row=$wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}dayu_sfx_materials WHERE id=%d AND material_type='lut' AND status='published'", intval($id)));
|
||||
if (!$row) { return self::error('missing', '此 LUT 已下架或不存在。', 404); }
|
||||
$api=$GLOBALS['dayu_fcpx_sfx_api'] ?? null;
|
||||
if (!$api || !method_exists($api, 'material_storage_root')) { return self::error('storage', '素材服务暂不可用。', 503); }
|
||||
$root=realpath($api->material_storage_root().'/materials');
|
||||
$path=$root ? realpath($root.'/'.ltrim($row->relative_path, '/\\')) : false;
|
||||
if (!$root || !$path || strpos($path, $root.DIRECTORY_SEPARATOR)!==0 || strtolower(pathinfo($path,PATHINFO_EXTENSION))!=='cube' || !is_file($path) || !is_readable($path) || filesize($path)>67108864 || !hash_equals(strtolower($row->checksum), hash_file('sha256',$path))) { return self::error('file', 'LUT 文件未通过完整性检查。', 503); }
|
||||
return $path;
|
||||
}
|
||||
public static function download($request) {
|
||||
$session=self::authentication($request); if (is_wp_error($session)) { return $session; }
|
||||
$path=self::material($request['id']); if (is_wp_error($path)) { return $path; }
|
||||
return self::response(new Dayu_Color_LUT_Binary($path, null, 'application/octet-stream'));
|
||||
}
|
||||
public static function preview($request) {
|
||||
$session=self::authentication($request); if (is_wp_error($session)) { return $session; }
|
||||
if (strlen($request->get_body())>2100000) { return self::error('frame_size', '预览帧过大。', 413); }
|
||||
$rate='dayu_color_lut_rate_' . $session['user_id'].'_'.intval(time()/60);
|
||||
$count=intval(get_transient($rate)); if ($count>=120) { return self::error('rate', '预览请求较多,请稍后刷新。', 429); }
|
||||
set_transient($rate, $count+1, 120);
|
||||
$path=self::material($request['id']); if (is_wp_error($path)) { return $path; }
|
||||
$encoded=$request->get_param('frame_png');
|
||||
if (!is_string($encoded) || strlen($encoded)>2000000) { return self::error('frame', '预览帧无效。', 400); }
|
||||
$bytes=base64_decode($encoded, true);
|
||||
if (!is_string($bytes) || strlen($bytes)>1500000) { return self::error('frame', '预览帧无效。', 400); }
|
||||
$result=Dayu_Color_LUT_Renderer::render($path, $bytes);
|
||||
if (is_wp_error($result)) { return $result; }
|
||||
return self::response(new Dayu_Color_LUT_Binary(null, $result, 'image/png'));
|
||||
}
|
||||
}
|
||||
Dayu_Color_Online_LUTs::init();
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
if (!defined('ABSPATH')) { exit; }
|
||||
|
||||
/** Display-reference renderer. Uploaded PNGs and returned PNGs stay in request memory. */
|
||||
final class Dayu_Color_LUT_Renderer {
|
||||
private static function error($message) { return new WP_Error('dayu_color_lut_render', $message, array('status'=>422)); }
|
||||
public static function read_cube($path) {
|
||||
$text=file_get_contents($path);
|
||||
if (!is_string($text) || strlen($text)>67108864) { return self::error('无法读取 LUT。'); }
|
||||
foreach (array("\x00\x00\xfe\xff"=>'UTF-32BE', "\xff\xfe\x00\x00"=>'UTF-32LE', "\xfe\xff"=>'UTF-16BE', "\xff\xfe"=>'UTF-16LE') as $bom=>$encoding) {
|
||||
if (strncmp($text, $bom, strlen($bom))===0) { $text=iconv($encoding, 'UTF-8', substr($text,strlen($bom))); break; }
|
||||
}
|
||||
if (!is_string($text) || strpos($text,"\0")!==false) { return self::error('LUT 编码无效。'); }
|
||||
$text=preg_replace('/^\xEF\xBB\xBF/', '', $text);
|
||||
$n=0; $rows=0; $packed=''; $min=array(0,0,0); $max=array(1,1,1);
|
||||
$stream=fopen('php://memory', 'w+'); fwrite($stream,str_replace("\r","\n",$text)); rewind($stream); unset($text);
|
||||
while (($line=fgets($stream))!==false) {
|
||||
$line=trim(explode('#',$line,2)[0]); if ($line==='') { continue; }
|
||||
if (preg_match('/^LUT_3D_SIZE\s+(\d+)\s*$/D',$line,$m)) {
|
||||
if ($n || intval($m[1])<2 || intval($m[1])>128) { fclose($stream); return self::error('LUT 尺寸无效。'); }
|
||||
$n=intval($m[1]); continue;
|
||||
}
|
||||
if (preg_match('/^(DOMAIN_MIN|DOMAIN_MAX)\s+(.+)$/D',$line,$m)) {
|
||||
$parts=preg_split('/\s+/',trim($m[2]));
|
||||
if (count($parts)!==3 || count(array_filter($parts,'is_numeric'))!==3) { fclose($stream); return self::error('LUT DOMAIN 无效。'); }
|
||||
if ($m[1]==='DOMAIN_MIN') { $min=array_map('floatval',$parts); } else { $max=array_map('floatval',$parts); }
|
||||
continue;
|
||||
}
|
||||
if (preg_match('/^(TITLE|LUT_3D_INPUT_RANGE)(?:\s|$)/',$line)) { continue; }
|
||||
$parts=preg_split('/\s+/', $line);
|
||||
if (!$n || count($parts)!==3 || count(array_filter($parts,'is_numeric'))!==3 || $rows>=$n*$n*$n) { fclose($stream); return self::error('LUT 数据格式无效。'); }
|
||||
$rgb=array_map('floatval',$parts);
|
||||
foreach ($rgb as $v) { if (!is_finite($v)) { fclose($stream); return self::error('LUT 含无效数字。'); } }
|
||||
$packed.=pack('g3',$rgb[0],$rgb[1],$rgb[2]); $rows++;
|
||||
}
|
||||
fclose($stream);
|
||||
for ($c=0;$c<3;$c++) { if (!is_finite($min[$c]) || !is_finite($max[$c]) || $max[$c]<=$min[$c]) { return self::error('LUT DOMAIN 无效。'); } }
|
||||
if (!$n || $rows!==$n*$n*$n) { return self::error('LUT 数据不完整。'); }
|
||||
return array($n,$packed,$min,$max);
|
||||
}
|
||||
public static function sample($table, $rgb) {
|
||||
list($n,$packed,$min,$max)=$table; $index=array(); $fraction=array();
|
||||
for ($c=0;$c<3;$c++) {
|
||||
$s=max(0.,min(1.,($rgb[$c]-$min[$c])/($max[$c]-$min[$c])))*($n-1);
|
||||
$index[$c]=min($n-2,intval($s)); $fraction[$c]=$s-$index[$c];
|
||||
}
|
||||
$out=array(0.,0.,0.);
|
||||
for ($k=0;$k<8;$k++) {
|
||||
$x=$k&1; $y=($k>>1)&1; $z=($k>>2)&1;
|
||||
$offset=((($index[2]+$z)*$n+$index[1]+$y)*$n+$index[0]+$x)*12;
|
||||
$v=unpack('g3',$packed,$offset);
|
||||
$w=($x?$fraction[0]:1-$fraction[0])*($y?$fraction[1]:1-$fraction[1])*($z?$fraction[2]:1-$fraction[2]);
|
||||
for ($c=0;$c<3;$c++) { $out[$c]+=$v[$c+1]*$w; }
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
public static function render($path, $bytes) {
|
||||
if (!function_exists('imagecreatefromstring')) { return self::error('服务器图像处理暂不可用。'); }
|
||||
$size=@getimagesizefromstring($bytes);
|
||||
if (!$size || $size[2]!==IMAGETYPE_PNG || $size[0]<1 || $size[1]<1 || max($size[0],$size[1])>640 || $size[0]*$size[1]>230400) { return self::error('请发送最长边不超过 640 像素的 PNG 预览帧。'); }
|
||||
$table=self::read_cube($path); if (is_wp_error($table)) { return $table; }
|
||||
$input=@imagecreatefromstring($bytes); if (!$input) { return self::error('无法解码预览帧。'); }
|
||||
$output=imagecreatetruecolor($size[0],$size[1]); imagealphablending($output,false); imagesavealpha($output,true);
|
||||
// Memoize repeated display pixels within this request only. No frame cache on disk or in WP.
|
||||
$memo=array();
|
||||
for ($y=0;$y<$size[1];$y++) { for ($x=0;$x<$size[0];$x++) {
|
||||
$pixel=imagecolorat($input,$x,$y);
|
||||
if (isset($memo[$pixel])) { $color=$memo[$pixel]; } else {
|
||||
$rgba=imagecolorsforindex($input,$pixel);
|
||||
$v=self::sample($table,array($rgba['red']/255,$rgba['green']/255,$rgba['blue']/255));
|
||||
$color=($rgba['alpha']<<24)|(intval(round(max(0,min(1,$v[0]))*255))<<16)|(intval(round(max(0,min(1,$v[1]))*255))<<8)|intval(round(max(0,min(1,$v[2]))*255));
|
||||
if (count($memo)<65536) { $memo[$pixel]=$color; }
|
||||
}
|
||||
imagesetpixel($output,$x,$y,$color);
|
||||
} }
|
||||
ob_start(); imagepng($output,null,3); $png=ob_get_clean();
|
||||
unset($input, $output);
|
||||
return $png;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
<?php
|
||||
if (!defined('ABSPATH')) {die;} // Cannot access directly.
|
||||
//启用 session - 检查是否已经启动
|
||||
if (!session_id()) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
$dayu_login_log = function ($stage, $fields = array()) {
|
||||
if (isset($GLOBALS['dayu_macos_app_auth'])
|
||||
&& is_object($GLOBALS['dayu_macos_app_auth'])
|
||||
&& method_exists($GLOBALS['dayu_macos_app_auth'], 'log_login_event')) {
|
||||
$GLOBALS['dayu_macos_app_auth']->log_login_event($stage, $fields);
|
||||
}
|
||||
};
|
||||
|
||||
//获取后台配置
|
||||
$wxConfig = _cao('oauth_weixin');
|
||||
$wxOAuth = new \Yurun\OAuthLogin\Weixin\OAuth2($wxConfig['appid'], $wxConfig['appkey']);
|
||||
|
||||
// 尝试提高健壮性:强制 IPv4、设置超时与重试,规避服务器 IPv6/DNS 异常和偶发网络抖动
|
||||
try {
|
||||
if (defined('CURLOPT_IPRESOLVE') && defined('CURL_IPRESOLVE_V4')) {
|
||||
$wxOAuth->http->option(CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
// 忽略设置失败
|
||||
}
|
||||
// 毫秒
|
||||
$wxOAuth->http->connectTimeout = 10000; // 10s 连接超时
|
||||
$wxOAuth->http->timeout = 15000; // 15s 总超时
|
||||
$wxOAuth->http->retry = 1; // 失败重试 1 次
|
||||
|
||||
if (isset($wxConfig['agent']) && $wxConfig['agent']) {
|
||||
$wxOAuth->loginAgentUrl = esc_url(home_url('/oauth/weixinagent'));
|
||||
}
|
||||
// 防止未设置触发 Notice
|
||||
if (empty($_SESSION['YURUN_WEIXIN_STATE'])) {
|
||||
cao_wp_die('非法访问,没有经过第三方登录返回');
|
||||
}
|
||||
// 获取accessToken,把之前存储的state传入,会自动判断。
|
||||
// 第三方返回异常(例如 code been used)时,当前代码未捕获会导致致命错误。
|
||||
// 这里做一次兜底处理,提示用户并引导其重试登录。
|
||||
try {
|
||||
$accessToken = $wxOAuth->getAccessToken($_SESSION['YURUN_WEIXIN_STATE']);
|
||||
} catch (\Throwable $e) {
|
||||
// 清理已用的 state,避免重复使用
|
||||
unset($_SESSION['YURUN_WEIXIN_STATE']);
|
||||
// 记录错误便于排查,但不给用户暴露底层异常内容
|
||||
if (function_exists('error_log')) {
|
||||
error_log('Weixin OAuth getAccessToken failed: ' . $e->getMessage());
|
||||
// 进一步主动探测一次接口,记录更详细的网络错误信息(不影响业务流程)
|
||||
try {
|
||||
$probe = new \Yurun\Util\HttpRequest();
|
||||
if (defined('CURLOPT_IPRESOLVE') && defined('CURL_IPRESOLVE_V4')) {
|
||||
$probe->option(CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
|
||||
}
|
||||
$probe->connectTimeout = 8000;
|
||||
$probe->timeout = 12000;
|
||||
$res = $probe->get('https://api.weixin.qq.com/sns/oauth2/access_token', array(
|
||||
'appid' => $wxConfig['appid'],
|
||||
'secret' => $wxConfig['appkey'],
|
||||
'code' => isset($_GET['code']) ? $_GET['code'] : '',
|
||||
'grant_type' => 'authorization_code',
|
||||
));
|
||||
$snippet = substr($res->body(), 0, 200);
|
||||
error_log('Weixin OAuth probe status=' . $res->getStatusCode() . ' errno=' . $res->getErrno() . ' error=' . $res->getError() . ' body=' . $snippet);
|
||||
} catch (\Throwable $e2) {
|
||||
error_log('Weixin OAuth probe exception: ' . $e2->getMessage());
|
||||
}
|
||||
}
|
||||
// 给出友好提示并提供重新发起登录的入口,避免 Fatal Error 白屏
|
||||
$restartUrl = esc_url(home_url('/oauth/weixin')) . (isset($_SESSION['oauth_rurl']) ? ('?rurl=' . rawurlencode($_SESSION['oauth_rurl'])) : '');
|
||||
$msg = '授权码已失效或被重复使用,请返回后重试(请勿刷新回调页)。<br><a href="' . $restartUrl . '">点击这里重新发起微信登录</a>';
|
||||
cao_wp_die('微信登录失败', $msg);
|
||||
}
|
||||
|
||||
$openid = $wxOAuth->openid; // 唯一ID
|
||||
$dayu_login_log('oauth_provider_callback', array(
|
||||
'has_oauth_code' => !empty($_GET['code']),
|
||||
'has_openid' => !empty($openid),
|
||||
'has_php_session' => session_status() !== PHP_SESSION_NONE,
|
||||
));
|
||||
|
||||
// 兼容网络异常/返回非JSON导致的空结果:
|
||||
// 当请求失败时,yurun-http 返回 null,未抛异常,这里显式拦截避免白屏
|
||||
if (empty($accessToken) || empty($openid)) {
|
||||
$raw = isset($wxOAuth->result) ? $wxOAuth->result : null;
|
||||
if (function_exists('error_log')) {
|
||||
// 记录原始返回,便于排查(一般为 null 或包含 errcode/errmsg)
|
||||
error_log('Weixin OAuth getAccessToken returned empty. result=' . (is_array($raw) ? json_encode($raw, JSON_UNESCAPED_UNICODE) : var_export($raw, true)));
|
||||
}
|
||||
// 进一步主动探测一次接口,记录更详细的网络错误信息(不影响业务流程)
|
||||
try {
|
||||
$probe = new \Yurun\Util\HttpRequest();
|
||||
if (defined('CURLOPT_IPRESOLVE') && defined('CURL_IPRESOLVE_V4')) {
|
||||
$probe->option(CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
|
||||
}
|
||||
$probe->connectTimeout = 8000;
|
||||
$probe->timeout = 12000;
|
||||
$res = $probe->get('https://api.weixin.qq.com/sns/oauth2/access_token', array(
|
||||
'appid' => $wxConfig['appid'],
|
||||
'secret' => $wxConfig['appkey'],
|
||||
'code' => isset($_GET['code']) ? $_GET['code'] : '',
|
||||
'grant_type' => 'authorization_code',
|
||||
));
|
||||
$snippet = substr($res->body(), 0, 200);
|
||||
error_log('Weixin OAuth probe status=' . $res->getStatusCode() . ' errno=' . $res->getErrno() . ' error=' . $res->getError() . ' body=' . $snippet);
|
||||
} catch (\Throwable $e2) {
|
||||
error_log('Weixin OAuth probe exception: ' . $e2->getMessage());
|
||||
}
|
||||
$restartUrl = esc_url(home_url('/oauth/weixin')) . (isset($_SESSION['oauth_rurl']) ? ('?rurl=' . rawurlencode($_SESSION['oauth_rurl'])) : '');
|
||||
$msg = '未能获取微信授权凭证,可能由于服务器无法连接微信接口、网络波动,或回调参数已过期。<br><a href="' . $restartUrl . '">点击这里重新发起微信登录</a>';
|
||||
cao_wp_die('微信登录失败', $msg);
|
||||
}
|
||||
try {
|
||||
$userInfo = $wxOAuth->getUserInfo(); // 第三方用户信息,失败也可能抛异常
|
||||
} catch (\Throwable $e) {
|
||||
if (function_exists('error_log')) {
|
||||
error_log('Weixin OAuth getUserInfo failed: ' . $e->getMessage());
|
||||
}
|
||||
cao_wp_die('微信登录失败', '获取用户信息失败,请返回后重试。');
|
||||
}
|
||||
|
||||
// 防御性校验:避免空数组/空字段导致后续逻辑不执行而白屏
|
||||
if (empty($userInfo) || !is_array($userInfo) || (empty($userInfo['nickname']) && empty($userInfo['headimgurl']))) {
|
||||
if (function_exists('error_log')) {
|
||||
error_log('Weixin OAuth getUserInfo returned invalid: ' . var_export($userInfo, true));
|
||||
}
|
||||
$restartUrl = esc_url(home_url('/?oauth=weixin'));
|
||||
$msg = '未能获取到完整的微信用户资料,请返回后重试。<br><a href="' . $restartUrl . '">点击这里重新发起微信登录</a>';
|
||||
cao_wp_die('微信登录失败', $msg);
|
||||
}
|
||||
|
||||
// Dayu macOS APP 设备绑定必须能证明本次跳转确实经过了微信 OAuth,不接受仅有旧 WordPress Cookie 的回调。
|
||||
$dayu_oauth_rurl = isset($_SESSION['oauth_rurl']) ? (string) $_SESSION['oauth_rurl'] : '';
|
||||
$dayu_target = $dayu_oauth_rurl !== '' ? wp_parse_url($dayu_oauth_rurl) : false;
|
||||
$dayu_home = wp_parse_url(home_url('/'));
|
||||
if (is_array($dayu_target)
|
||||
&& is_array($dayu_home)
|
||||
&& !empty($dayu_target['host'])
|
||||
&& !empty($dayu_home['host'])
|
||||
&& hash_equals(strtolower((string) $dayu_home['host']), strtolower((string) $dayu_target['host']))) {
|
||||
$dayu_query = array();
|
||||
parse_str((string) ($dayu_target['query'] ?? ''), $dayu_query);
|
||||
$dayu_session_key = sanitize_text_field((string) ($dayu_query['fcpxqwen_session'] ?? ''));
|
||||
$dayu_device_uuid = strtoupper(sanitize_text_field((string) ($dayu_query['device_uuid'] ?? '')));
|
||||
$dayu_app_name = sanitize_text_field((string) ($dayu_query['app_name'] ?? ''));
|
||||
$dayu_trace_id = sanitize_text_field((string) ($dayu_query['trace_id'] ?? ''));
|
||||
if (($dayu_query['action'] ?? '') === 'app_wechat_auth_check'
|
||||
&& in_array($dayu_app_name, array('FCPXQwen3ASR', 'FCPXPython', 'FCPXSoundEffects', 'qwenzhiyin', 'DayuDownie', 'DayuLightFactory', 'DayuColor'), true)
|
||||
&& preg_match('/^[A-Za-z0-9_-]{32,80}$/', $dayu_session_key)
|
||||
&& preg_match('/^[A-F0-9]{8}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{12}$/', $dayu_device_uuid)) {
|
||||
$dayu_oauth_proof = array(
|
||||
'session_hash' => hash('sha256', $dayu_session_key),
|
||||
'device_hash' => hash('sha256', $dayu_device_uuid),
|
||||
'openid_hash' => hash('sha256', (string) $openid),
|
||||
'issued_at' => time(),
|
||||
);
|
||||
$_SESSION['dayu_fcpx_wechat_oauth'] = $dayu_oauth_proof;
|
||||
set_transient(
|
||||
'dayu_fcpx_oauth_proof_' . hash('sha256', $dayu_session_key),
|
||||
$dayu_oauth_proof,
|
||||
10 * MINUTE_IN_SECONDS
|
||||
);
|
||||
$dayu_login_log('oauth_proof_written', array(
|
||||
'trace_id' => $dayu_trace_id,
|
||||
'app_name' => $dayu_app_name,
|
||||
'device_uuid' => $dayu_device_uuid,
|
||||
'has_openid' => !empty($openid),
|
||||
'proof_written' => true,
|
||||
'proof_transient' => true,
|
||||
));
|
||||
} else {
|
||||
$dayu_login_log('oauth_proof_not_written', array(
|
||||
'trace_id' => $dayu_trace_id,
|
||||
'app_name' => $dayu_app_name,
|
||||
'device_uuid' => $dayu_device_uuid,
|
||||
'has_openid' => !empty($openid),
|
||||
'proof_written' => false,
|
||||
));
|
||||
}
|
||||
}
|
||||
// 处理本地业务逻辑
|
||||
//
|
||||
if ($openid && $userInfo) {
|
||||
$_prefix = 'weixin';
|
||||
$_openid_meta_key = 'open_' . $_prefix . '_openid';
|
||||
// 初始化信息
|
||||
$metaInfo = array(
|
||||
'openid' => $openid,
|
||||
'name' => $userInfo['nickname'],
|
||||
'bind' => 1,
|
||||
'avatar' => $userInfo['headimgurl'],
|
||||
);
|
||||
if (!empty($userInfo['unionid'])) {
|
||||
$metaInfo['unionid'] = $userInfo['unionid'];
|
||||
}
|
||||
|
||||
global $wpdb, $current_user;
|
||||
|
||||
// 查询meta
|
||||
$user_exist = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key=%s AND meta_value=%s", $_openid_meta_key, $openid));
|
||||
// 如果当前用户已登录,而$user_exist存在,即该开放平台账号连接被其他用户占用了,不能再重复绑定了
|
||||
$current_user_id = get_current_user_id();
|
||||
if ($current_user_id != 0 && isset($user_exist) && $current_user_id != $user_exist) {
|
||||
cao_wp_die('绑定失败,可能之前已有其他账号绑定,请先登录其他账户解绑。');
|
||||
}
|
||||
|
||||
if (isset($user_exist) && (int) $user_exist > 0) {
|
||||
// 该开放平台账号已连接过WP系统,再次使用它直接登录
|
||||
$user_exist = (int) $user_exist;
|
||||
if (function_exists('dayu_sync_user_payout_wechat_openid')) {
|
||||
dayu_sync_user_payout_wechat_openid($user_exist, $openid);
|
||||
}
|
||||
if (!empty($metaInfo['unionid'])) {
|
||||
update_user_meta($user_exist, 'open_' . $_prefix . '_unionid', $metaInfo['unionid']);
|
||||
}
|
||||
wp_set_current_user($user_exist);
|
||||
wp_set_auth_cookie($user_exist);
|
||||
$user = get_user_by('id', $user_exist);
|
||||
do_action('wp_login', $user->user_login, $user); // 保证挂载的action执行
|
||||
wp_safe_redirect($_SESSION['oauth_rurl']);
|
||||
exit;
|
||||
} elseif ($current_user_id) {
|
||||
// Open 连接未被占用且当前已登录了本地账号, 那么直接绑定信息到该账号 case: 从个人资料设置中点击了绑定社交账号等操作
|
||||
update_user_meta($current_user_id, 'open_' . $_prefix . '_openid', $metaInfo['openid']);
|
||||
update_user_meta($current_user_id, 'open_' . $_prefix . '_bind', $metaInfo['bind']);
|
||||
update_user_meta($current_user_id, 'open_' . $_prefix . '_name', $metaInfo['name']);
|
||||
update_user_meta($current_user_id, 'open_' . $_prefix . '_avatar', $metaInfo['avatar']);
|
||||
if (function_exists('dayu_sync_user_payout_wechat_openid')) {
|
||||
dayu_sync_user_payout_wechat_openid($current_user_id, $openid);
|
||||
}
|
||||
if (!empty($metaInfo['unionid'])) {
|
||||
update_user_meta($current_user_id, 'open_' . $_prefix . '_unionid', $metaInfo['unionid']);
|
||||
}
|
||||
wp_safe_redirect($_SESSION['oauth_rurl']);
|
||||
exit;
|
||||
} else {
|
||||
// 该开放平台账号未连接过WP系统,使用它登录并分配和绑定一个WP本地新用户
|
||||
$login_name = "u" . mt_rand(1000, 9999) . mt_rand(1000, 9999);
|
||||
$user_pass = wp_generate_password(64, true, true);
|
||||
$nickname = $metaInfo['name'];
|
||||
$userdata = array(
|
||||
'user_login' => $login_name,
|
||||
'user_email' => $login_name.'_mail@no.com',
|
||||
'display_name' => $nickname,
|
||||
'nickname' => $nickname,
|
||||
'user_pass' => $user_pass,
|
||||
'role' => get_option('default_role'),
|
||||
'first_name' => $nickname,
|
||||
);
|
||||
$user_id = wp_insert_user($userdata);
|
||||
if (is_wp_error($user_id)) {
|
||||
echo $user_id->get_error_message();
|
||||
} else {
|
||||
// 更新用户字段
|
||||
update_user_meta($user_id, 'open_' . $_prefix . '_openid', $metaInfo['openid']);
|
||||
update_user_meta($user_id, 'open_' . $_prefix . '_bind', $metaInfo['bind']);
|
||||
update_user_meta($user_id, 'open_' . $_prefix . '_name', $metaInfo['name']);
|
||||
update_user_meta($user_id, 'open_' . $_prefix . '_avatar', $metaInfo['avatar']);
|
||||
update_user_meta($user_id, 'user_avatar_type',$_prefix);
|
||||
if (function_exists('dayu_sync_user_payout_wechat_openid')) {
|
||||
dayu_sync_user_payout_wechat_openid($user_id, $openid);
|
||||
}
|
||||
if (!empty($metaInfo['unionid'])) {
|
||||
update_user_meta($user_id, 'open_' . $_prefix . '_unionid', $metaInfo['unionid']);
|
||||
}
|
||||
|
||||
//登录
|
||||
wp_set_auth_cookie($user_id, true, false);
|
||||
$user = get_user_by('id', $user_id);
|
||||
do_action('wp_login', $user->user_login, $user); // 保证挂载的action执行
|
||||
wp_safe_redirect($_SESSION['oauth_rurl']);
|
||||
}
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
// 理论不会到达,但为防止意外(例如上游返回结构变化),兜底提示,避免白屏
|
||||
cao_wp_die('微信登录失败', '授权返回数据不完整,请重新尝试登录。');
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
#pragma once
|
||||
#include "DYPremultiplied.h"
|
||||
#include <memory>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// Independent from the frozen grade ABI. Values are Dayu-owned, append-only IDs.
|
||||
namespace dycm {
|
||||
inline constexpr unsigned Version = 1;
|
||||
inline constexpr const char *Engine = "OpenColorIO-2.5.2";
|
||||
inline constexpr const char *Config = "studio-config-v2.2.0_aces-v1.3_ocio-v2.4";
|
||||
enum class Space : unsigned {
|
||||
ACES2065=1, ACEScg=2, ACEScc=3, ACEScct=4,
|
||||
Linear709=10, Gamma22_709=11, SRGB=12, Linear2020=13,
|
||||
AppleLog=100, ARRI_LogC3=101, ARRI_LogC4=102, BMD_Gen5=103,
|
||||
CanonLog2=104, CanonLog3=105, PanasonicVLog=106, REDLog3G10=107,
|
||||
SonySLog3=108, SonySLog3Cine=109, SonyVeniceSLog3=110, SonyVeniceSLog3Cine=111,
|
||||
DaVinciIntermediate=112
|
||||
};
|
||||
enum class Output : unsigned {
|
||||
Rec709_100=1, SRGB_100=2, DisplayP3_100=3, Rec709D60_100=4,
|
||||
Rec2020_100=5, Rec2020PQ_1000=6, Rec2020HLG_1000=7,
|
||||
P3D60_48=8, P3DCI_48=9, P3D65_48=10
|
||||
};
|
||||
enum class Alpha { Straight, Premultiplied };
|
||||
struct SpaceInfo { Space id; const char *label; const char *ocioName; };
|
||||
struct OutputInfo { Output id; const char *label; const char *display; const char *view; };
|
||||
std::span<const SpaceInfo> spaces();
|
||||
std::span<const OutputInfo> outputs();
|
||||
const SpaceInfo &spaceInfo(Space);
|
||||
const OutputInfo &outputInfo(Output);
|
||||
|
||||
struct Settings {
|
||||
unsigned version=Version;
|
||||
bool enabled=false;
|
||||
Space input=Space::ACEScg, working=Space::ACEScct;
|
||||
Output output=Output::Rec709_100;
|
||||
// Explicit scene-domain LMT, before the display/output transform.
|
||||
bool referenceGamutCompression=false;
|
||||
void validate() const;
|
||||
std::string key() const;
|
||||
};
|
||||
struct ShaderTexture {
|
||||
unsigned dimensions=0,width=0,height=0,depth=0,channels=0;
|
||||
bool linear=false;
|
||||
std::vector<float> values;
|
||||
};
|
||||
struct MetalProgram {std::string source;std::vector<ShaderTexture> textures;};
|
||||
|
||||
// Immutable processor, independent of OCIO environment variables and monitor state.
|
||||
// A no-op never normalizes or unpremultiplies pixels (including hidden RGB).
|
||||
class Transform {
|
||||
public:
|
||||
static Transform identity();
|
||||
static Transform convert(Space from, Space to);
|
||||
static Transform display(Space from, Output to, bool gamutCompression=false);
|
||||
bool isIdentity() const;
|
||||
const std::string &key() const;
|
||||
void apply(std::span<DYCompositeRGBA> pixels, Alpha alpha) const;
|
||||
// Shader resources are copied from the fixed built-in config; no filesystem
|
||||
// LUT loading, process-global config, or dynamic uniform is allowed here.
|
||||
MetalProgram metalProgram() const;
|
||||
private:
|
||||
struct Impl;
|
||||
std::shared_ptr<const Impl> impl;
|
||||
explicit Transform(std::shared_ptr<const Impl>);
|
||||
};
|
||||
|
||||
struct Plan {
|
||||
Settings settings;
|
||||
Transform input, output;
|
||||
static Plan compile(const Settings &);
|
||||
std::string key() const;
|
||||
};
|
||||
|
||||
enum class FrameStage : unsigned { Input, Output, ToLinear, FromLinear, Count };
|
||||
enum class ToolDomain : unsigned { Working, Linear, Segmented };
|
||||
// An immutable platform profile conversion at a frame boundary. This interface
|
||||
// keeps host ICC objects out of archives and the portable grading engine.
|
||||
class PhysicalTransform {
|
||||
public:
|
||||
virtual ~PhysicalTransform() = default;
|
||||
virtual bool isIdentity() const = 0;
|
||||
virtual void apply(std::span<DYCompositeRGBA>, Alpha) const = 0;
|
||||
virtual std::string key() const = 0;
|
||||
};
|
||||
// The frame executor depends on this immutable contract, not on OCIO itself.
|
||||
// Header-only legacy render tests therefore do not acquire a runtime dependency.
|
||||
class FramePipeline {
|
||||
public:
|
||||
virtual ~FramePipeline() = default;
|
||||
virtual void validate() const = 0;
|
||||
virtual const Settings &settings() const = 0;
|
||||
virtual const Transform &transform(FrameStage) const = 0;
|
||||
virtual bool isIdentity(FrameStage) const = 0;
|
||||
virtual void apply(FrameStage, std::span<DYCompositeRGBA>, Alpha) const = 0;
|
||||
virtual std::string key() const = 0;
|
||||
// Input boundary runs before the declared input transform; Output runs
|
||||
// after the complete ODT. Intermediate tool domains have no ICC boundary.
|
||||
virtual std::shared_ptr<const PhysicalTransform> physicalBoundary(FrameStage) const {return {};}
|
||||
};
|
||||
std::shared_ptr<const FramePipeline> compileFramePipeline(const Settings &);
|
||||
} // namespace dycm
|
||||
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
#include <cmath>
|
||||
struct DYCompositeRGBA {float r,g,b,a;};
|
||||
inline DYCompositeRGBA dyPMFinite(DYCompositeRGBA p){return {std::isfinite(p.r)?p.r:0,std::isfinite(p.g)?p.g:0,std::isfinite(p.b)?p.b:0,std::isfinite(p.a)?p.a:0};}
|
||||
inline DYCompositeRGBA dyPMUnpremultiply(DYCompositeRGBA p){float a=p.a>1e-5f?p.a:1e-5f;return dyPMFinite({p.r/a,p.g/a,p.b/a,p.a});}
|
||||
inline DYCompositeRGBA dyPMPremultiply(DYCompositeRGBA p){return dyPMFinite({p.r*p.a,p.g*p.a,p.b*p.a,p.a});}
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"sourceRepository": "https://dayu.media/git/dayu/dayu-colorplate.git",
|
||||
"sourceCommit": "f8950384e514685c8809fe8e8ee2dd5f16ad0bd7",
|
||||
"files": [
|
||||
{
|
||||
"path": "Core/DYColorManagement.hpp",
|
||||
"sourceSHA256": "78f6c2d5acdb611368370c3c9050d02d3a807f79b6f409906a4be7680a0c3746"
|
||||
},
|
||||
{
|
||||
"path": "Sources/DYColorManagement.cpp",
|
||||
"sourceSHA256": "68648a1d2b1e4be8d3c59679e47d4b07de239ec2b5196dc1eb99b59af2ba6306"
|
||||
},
|
||||
{
|
||||
"path": "Sources/DYColorManagementGPU.h",
|
||||
"sourceSHA256": "ed724b0cc73e27d8e238862bad120570939401e27f127d7afaf48c0e198cc4d7"
|
||||
},
|
||||
{
|
||||
"path": "Sources/DYColorManagementGPU.mm",
|
||||
"sourceSHA256": "dd2c68a3b29baae0cd19b86e224d70a49c222010e6232a56e13d7500285ff1c5"
|
||||
},
|
||||
{
|
||||
"path": "Sources/DYColorManagementState.h",
|
||||
"sourceSHA256": "5c39f949d83c160977b2cf6793ace991c0d66c81846c29dfd3bc705703b1c514"
|
||||
},
|
||||
{
|
||||
"path": "Sources/DYColorManagementState.mm",
|
||||
"sourceSHA256": "2e0035b59d0ff028530b0766c07c143b76f12c4b785d404fd7aff1e46ed8d9eb"
|
||||
},
|
||||
{
|
||||
"path": "Sources/DYColorProfile.h",
|
||||
"sourceSHA256": "38685ea23cbfe5686c1ade7ae8cf2eff231fd222e9d480245d3732ce5fecf7bb"
|
||||
},
|
||||
{
|
||||
"path": "Sources/DYColorProfile.mm",
|
||||
"sourceSHA256": "ccf1d6bf401c7d11fb4a2a745ee1e399d45cc99b62eba61e3818a582ab8c672c"
|
||||
},
|
||||
{
|
||||
"path": "Tools/build_ocio.py",
|
||||
"sourceSHA256": "ba1004e4d788590a44ae8ce2e124dcd65ee3b6b50d834cd615013d6355e6500b"
|
||||
}
|
||||
],
|
||||
"adaptations": [
|
||||
"Dedicated com.dayu.color runtime cache",
|
||||
"Standalone RGBA/alpha header, excluding unrelated layer engine",
|
||||
"No dependency on the sibling installed application",
|
||||
"Batch GPU profile prepare, Core Image and restore on the same command buffer for uncancelled render calls"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,221 @@
|
||||
#include "../Core/DYColorManagement.hpp"
|
||||
#include <OpenColorIO/OpenColorIO.h>
|
||||
#include <array>
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
namespace O = OCIO_NAMESPACE;
|
||||
namespace dycm {
|
||||
namespace {
|
||||
constexpr SpaceInfo spaceTable[] = {
|
||||
{Space::ACES2065,"ACES2065-1 / AP0 线性","ACES2065-1"},
|
||||
{Space::ACEScg,"ACEScg / AP1 线性","ACEScg"},
|
||||
{Space::ACEScc,"ACEScc","ACEScc"}, {Space::ACEScct,"ACEScct","ACEScct"},
|
||||
{Space::Linear709,"Rec.709 线性","Linear Rec.709 (sRGB)"},
|
||||
{Space::Gamma22_709,"Rec.709 Gamma 2.2","Gamma 2.2 Encoded Rec.709"},
|
||||
{Space::SRGB,"sRGB","sRGB Encoded Rec.709 (sRGB)"},
|
||||
{Space::Linear2020,"Rec.2020 线性","Linear Rec.2020"},
|
||||
{Space::AppleLog,"Apple Log","Apple Log"},
|
||||
{Space::ARRI_LogC3,"ARRI LogC3 / EI800","ARRI LogC3 (EI800)"},
|
||||
{Space::ARRI_LogC4,"ARRI LogC4","ARRI LogC4"},
|
||||
{Space::BMD_Gen5,"Blackmagic Film Gen 5 / Wide Gamut","BMDFilm WideGamut Gen5"},
|
||||
{Space::CanonLog2,"Canon Log2 / Cinema Gamut D55","CanonLog2 CinemaGamut D55"},
|
||||
{Space::CanonLog3,"Canon Log3 / Cinema Gamut D55","CanonLog3 CinemaGamut D55"},
|
||||
{Space::PanasonicVLog,"Panasonic V-Log / V-Gamut","V-Log V-Gamut"},
|
||||
{Space::REDLog3G10,"RED Log3G10 / REDWideGamutRGB","Log3G10 REDWideGamutRGB"},
|
||||
{Space::SonySLog3,"Sony S-Log3 / S-Gamut3","S-Log3 S-Gamut3"},
|
||||
{Space::SonySLog3Cine,"Sony S-Log3 / S-Gamut3.Cine","S-Log3 S-Gamut3.Cine"},
|
||||
{Space::SonyVeniceSLog3,"Sony Venice S-Log3 / S-Gamut3","S-Log3 Venice S-Gamut3"},
|
||||
{Space::SonyVeniceSLog3Cine,"Sony Venice S-Log3 / S-Gamut3.Cine","S-Log3 Venice S-Gamut3.Cine"},
|
||||
{Space::DaVinciIntermediate,"DaVinci Intermediate / Wide Gamut","DaVinci Intermediate WideGamut"}
|
||||
};
|
||||
constexpr OutputInfo outputTable[] = {
|
||||
{Output::Rec709_100,"Rec.709 / 100 nit","Rec.1886 Rec.709 - Display","ACES 1.0 - SDR Video"},
|
||||
{Output::SRGB_100,"sRGB / 100 nit","sRGB - Display","ACES 1.0 - SDR Video"},
|
||||
{Output::DisplayP3_100,"Display P3 / 100 nit","Display P3 - Display","ACES 1.0 - SDR Video"},
|
||||
{Output::Rec709D60_100,"Rec.709 / D60 模拟 / 100 nit","Rec.1886 Rec.709 - Display","ACES 1.0 - SDR Video (D60 sim on D65)"},
|
||||
{Output::Rec2020_100,"Rec.2020 SDR / 100 nit","Rec.1886 Rec.2020 - Display","ACES 1.0 - SDR Video"},
|
||||
{Output::Rec2020PQ_1000,"Rec.2020 PQ / 1000 nit","Rec.2100-PQ - Display","ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim)"},
|
||||
{Output::Rec2020HLG_1000,"Rec.2020 HLG / 1000 nit","Rec.2100-HLG - Display","ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim)"},
|
||||
{Output::P3D60_48,"P3 D60 / 48 nit","P3-D60 - Display","ACES 1.0 - SDR Cinema"},
|
||||
{Output::P3DCI_48,"P3 DCI / 48 nit","P3-DCI - Display","ACES 1.0 - SDR Cinema (D60 sim on DCI)"},
|
||||
{Output::P3D65_48,"P3 D65 / 48 nit","P3-D65 - Display","ACES 1.0 - SDR Cinema"}
|
||||
};
|
||||
O::ConstConfigRcPtr config() {
|
||||
static const auto value=[] {auto c=O::Config::CreateFromBuiltinConfig(Config);c->validate();return c;}();
|
||||
return value;
|
||||
}
|
||||
std::string prefix(){return std::string("dayu-cms:")+std::to_string(Version)+":"+Engine+":"+Config+":";}
|
||||
}
|
||||
std::span<const SpaceInfo> spaces(){return spaceTable;}
|
||||
std::span<const OutputInfo> outputs(){return outputTable;}
|
||||
const SpaceInfo &spaceInfo(Space id){for(auto &s:spaceTable)if(s.id==id)return s;throw std::invalid_argument("Unknown color space ID");}
|
||||
const OutputInfo &outputInfo(Output id){for(auto &s:outputTable)if(s.id==id)return s;throw std::invalid_argument("Unknown output transform ID");}
|
||||
void Settings::validate() const {
|
||||
if(version!=Version)throw std::invalid_argument("Unsupported color management version");
|
||||
spaceInfo(input);spaceInfo(working);outputInfo(output);
|
||||
if(working!=Space::ACEScc&&working!=Space::ACEScct&&working!=Space::ACEScg)
|
||||
throw std::invalid_argument("Unsupported ACES grading space");
|
||||
}
|
||||
std::string Settings::key() const {
|
||||
validate();return prefix()+std::to_string(enabled)+":"+std::to_string(unsigned(input))+":"+
|
||||
std::to_string(unsigned(working))+":"+std::to_string(unsigned(output))+":"+std::to_string(referenceGamutCompression);
|
||||
}
|
||||
struct Transform::Impl {
|
||||
std::string key;
|
||||
std::vector<O::ConstProcessorRcPtr> processors;
|
||||
std::vector<O::ConstCPUProcessorRcPtr> cpus;
|
||||
bool identity=true;
|
||||
bool decodeCC=false,encodeCC=false;
|
||||
Impl(std::string k,std::vector<O::ConstProcessorRcPtr> steps={},bool decode=false,bool encode=false):key(std::move(k)),processors(std::move(steps)),decodeCC(decode),encodeCC(encode) {
|
||||
identity=!decode&&!encode;
|
||||
for(auto &p:processors){auto cpu=p->getOptimizedCPUProcessor(O::OPTIMIZATION_LOSSLESS);identity=identity&&cpu->isNoOp();cpus.push_back(cpu);}
|
||||
}
|
||||
};
|
||||
// Academy ACEScc analytic encoding. The pinned OCIO config's cc entry uses a
|
||||
// 4096-sample LUT; use AP1 linear at that boundary to avoid LUT approximation.
|
||||
static float encodeCC(float x){return x<=0?float((-16.+9.72)/17.52):float((std::log2(x<1.f/32768?1./65536+double(x)*.5:double(x))+9.72)/17.52);}
|
||||
static float decodeCC(float x){return x<float((9.72-15.)/17.52)?float((std::exp2(double(x)*17.52-9.72)-1./65536)*2):float(std::min(std::exp2(double(x)*17.52-9.72),65504.));}
|
||||
Transform::Transform(std::shared_ptr<const Impl> value):impl(std::move(value)){}
|
||||
Transform Transform::identity(){return Transform(std::make_shared<Impl>(prefix()+"identity"));}
|
||||
Transform Transform::convert(Space from,Space to) {
|
||||
auto &source=spaceInfo(from);auto &destination=spaceInfo(to);
|
||||
if(from==to)return identity();
|
||||
return Transform(std::make_shared<Impl>(prefix()+"space:"+std::to_string(unsigned(from))+":"+std::to_string(unsigned(to)),
|
||||
std::vector<O::ConstProcessorRcPtr>{config()->getProcessor(from==Space::ACEScc?"ACEScg":source.ocioName,"ACEScg"),
|
||||
config()->getProcessor("ACEScg",to==Space::ACEScc?"ACEScg":destination.ocioName)},from==Space::ACEScc,to==Space::ACEScc));
|
||||
}
|
||||
Transform Transform::display(Space from,Output to,bool gamutCompression) {
|
||||
auto &source=spaceInfo(from);auto &destination=outputInfo(to);const char *sourceName=from==Space::ACEScc?"ACEScg":source.ocioName;
|
||||
auto group=O::GroupTransform::Create();
|
||||
if(gamutCompression){
|
||||
auto look=O::LookTransform::Create();look->setSrc("ACEScg");look->setDst("ACEScg");
|
||||
look->setLooks("ACES 1.3 Reference Gamut Compression");group->appendTransform(look);
|
||||
}
|
||||
auto view=O::DisplayViewTransform::Create();view->setSrc("ACEScg");view->setDisplay(destination.display);view->setView(destination.view);
|
||||
group->appendTransform(view);
|
||||
return Transform(std::make_shared<Impl>(prefix()+"display:"+std::to_string(unsigned(from))+":"+std::to_string(unsigned(to))+":"+std::to_string(gamutCompression),
|
||||
std::vector<O::ConstProcessorRcPtr>{config()->getProcessor(sourceName,"ACEScg"),config()->getProcessor(group)},from==Space::ACEScc));
|
||||
}
|
||||
bool Transform::isIdentity() const{return impl->identity;}
|
||||
const std::string &Transform::key() const{return impl->key;}
|
||||
void Transform::apply(std::span<DYCompositeRGBA> pixels,Alpha alpha) const {
|
||||
if(alpha!=Alpha::Straight&&alpha!=Alpha::Premultiplied)throw std::invalid_argument("Unknown alpha representation");
|
||||
if(isIdentity()||pixels.empty())return;
|
||||
std::array<DYCompositeRGBA,4096> scratch;
|
||||
std::array<float,4096> originalAlpha;
|
||||
for(size_t offset=0;offset<pixels.size();offset+=scratch.size()){
|
||||
size_t count=std::min(scratch.size(),pixels.size()-offset);
|
||||
for(size_t i=0;i<count;i++){
|
||||
auto p=dyPMFinite(pixels[offset+i]);originalAlpha[i]=p.a;
|
||||
if(alpha==Alpha::Premultiplied)p=dyPMUnpremultiply(p);
|
||||
if(impl->decodeCC){p.r=decodeCC(p.r);p.g=decodeCC(p.g);p.b=decodeCC(p.b);}
|
||||
p.a=1;scratch[i]=p;
|
||||
}
|
||||
O::PackedImageDesc image(scratch.data(),long(count),1,4);
|
||||
for(auto &cpu:impl->cpus){cpu->apply(image);for(size_t i=0;i<count;i++)scratch[i]=dyPMFinite(scratch[i]);}
|
||||
for(size_t i=0;i<count;i++){
|
||||
auto p=dyPMFinite(scratch[i]);p.a=originalAlpha[i];
|
||||
if(impl->encodeCC){p.r=encodeCC(p.r);p.g=encodeCC(p.g);p.b=encodeCC(p.b);}
|
||||
pixels[offset+i]=alpha==Alpha::Premultiplied?dyPMPremultiply(p):p;
|
||||
}
|
||||
}
|
||||
}
|
||||
MetalProgram Transform::metalProgram() const {
|
||||
if(isIdentity())return {"float4 dyOCIO(float4 p) { return p; }\n",{}};
|
||||
MetalProgram program;auto &source=program.source;std::string calls;
|
||||
for(size_t step=0;step<impl->processors.size();step++){
|
||||
auto desc=O::GpuShaderDesc::CreateShaderDesc();desc->setLanguage(O::GPU_LANGUAGE_MSL_2_0);
|
||||
std::string function="dyCMSBase"+std::to_string(step),prefix="dyCMS"+std::to_string(step)+"_";
|
||||
desc->setFunctionName(function.c_str());desc->setResourcePrefix(prefix.c_str());
|
||||
impl->processors[step]->getOptimizedGPUProcessor(O::OPTIMIZATION_LOSSLESS)->extractGpuShaderInfo(desc);
|
||||
if(desc->getNumUniforms())throw std::runtime_error("Fixed CMS transform unexpectedly requires dynamic uniforms: "+key());
|
||||
source+=desc->getShaderText();size_t firstTexture=program.textures.size();
|
||||
// OCIO's generic shader blends camera-log branches arithmetically. In MSL,
|
||||
// 0 * an overflowing inactive linear branch becomes NaN. Select the branch
|
||||
// as the CPU does, without changing the active curve or clamping HDR.
|
||||
const std::string branch="isAboveBreak * logSeg + ( float3(1., 1., 1.) - isAboveBreak ) * linSeg";
|
||||
for(size_t pos=0;(pos=source.find(branch,pos))!=std::string::npos;){
|
||||
const std::string replacement="select(linSeg, logSeg, isAboveBreak > float3(0.5))";
|
||||
source.replace(pos,branch.size(),replacement);pos+=replacement.size();
|
||||
}
|
||||
for(const char *boundary:{"linear_break","log_break"})for(int component=0;component<3;component++){
|
||||
auto c=std::to_string(component);
|
||||
std::string match="(outColor.rgb["+c+"] > "+boundary+"["+c+"]) ? 1.0 : 0.0";
|
||||
std::string replacement="(outColor.rgb["+c+"] < "+boundary+"["+c+"]) ? 0.0 : 1.0";
|
||||
for(size_t pos=0;(pos=source.find(match,pos))!=std::string::npos;){source.replace(pos,match.size(),replacement);pos+=replacement.size();}
|
||||
}
|
||||
// The public MSL wrapper takes 3D textures/samplers first, then 1D/2D pairs.
|
||||
auto copyTexture=[&](ShaderTexture t,const float *values,O::Interpolation interpolation){
|
||||
uint64_t count=uint64_t(t.width)*t.height*t.depth*t.channels;
|
||||
if(!values||!count||count>32*1024*1024||(interpolation!=O::INTERP_NEAREST&&interpolation!=O::INTERP_LINEAR&&interpolation!=O::INTERP_TETRAHEDRAL))
|
||||
throw std::runtime_error("Unsupported CMS shader texture: "+key());
|
||||
t.linear=interpolation==O::INTERP_LINEAR;t.values.assign(values,values+count);program.textures.push_back(std::move(t));
|
||||
};
|
||||
for(unsigned i=0;i<desc->getNum3DTextures();i++){
|
||||
const char *name=nullptr,*sampler=nullptr;unsigned edge=0;O::Interpolation interpolation;const float *values=nullptr;
|
||||
desc->get3DTexture(i,name,sampler,edge,interpolation);desc->get3DTextureValues(i,values);
|
||||
if(edge>256)throw std::runtime_error("CMS 3D texture is too large");
|
||||
copyTexture({3,edge,edge,edge,3,false,{}},values,interpolation);
|
||||
}
|
||||
for(unsigned i=0;i<desc->getNumTextures();i++){
|
||||
const char *name=nullptr,*sampler=nullptr;unsigned width=0,height=0;O::GpuShaderDesc::TextureType channels;O::GpuShaderDesc::TextureDimensions dimensions;O::Interpolation interpolation;const float *values=nullptr;
|
||||
desc->getTexture(i,name,sampler,width,height,channels,dimensions,interpolation);desc->getTextureValues(i,values);
|
||||
if(width>16384||height>16384)throw std::runtime_error("CMS texture is too large");
|
||||
unsigned dim=dimensions==O::GpuShaderDesc::TEXTURE_1D?1:2;
|
||||
copyTexture({dim,width,height,1,channels==O::GpuShaderDesc::TEXTURE_RED_CHANNEL?1u:3u,false,{}},values,interpolation);
|
||||
if(interpolation==O::INTERP_LINEAR){
|
||||
// Hardware samplers quantize the interpolation fraction. Near the
|
||||
// ACEScc toe this becomes measurable; interpolate fetched float
|
||||
// texels explicitly using the same LUT values as the CPU.
|
||||
std::string helper="dyCMSLookup"+std::to_string(program.textures.size()-1),text;
|
||||
if(dim==1)text="float4 "+helper+"(texture1d<float> t,float uv){float q=clamp(uv*float(t.get_width())-0.5f,0.f,float(t.get_width()-1));uint a=uint(floor(q)),b=min(a+1,t.get_width()-1);return mix(t.read(a),t.read(b),q-float(a));}\n";
|
||||
else text="float4 "+helper+"(texture2d<float> t,float2 uv){uint2 size=uint2(t.get_width(),t.get_height());float2 q=clamp(uv*float2(size)-0.5f,float2(0),float2(size-1));uint2 a=uint2(floor(q)),b=min(a+1,size-1);float2 f=q-float2(a);return mix(mix(t.read(a),t.read(uint2(b.x,a.y)),f.x),mix(t.read(uint2(a.x,b.y)),t.read(b),f.x),f.y);}\n";
|
||||
std::string match=std::string(name)+".sample("+sampler+", ",replacement=helper+"("+name+", ";
|
||||
for(size_t pos=0;(pos=source.find(match,pos))!=std::string::npos;){source.replace(pos,match.size(),replacement);pos+=replacement.size();}
|
||||
source=text+source;
|
||||
}
|
||||
}
|
||||
calls+="p="+function+"(";
|
||||
for(size_t i=firstTexture;i<program.textures.size();i++){auto suffix=std::to_string(i);calls+="dyBound"+suffix+",dySampler"+suffix+",";}
|
||||
calls+="p);p=select(float4(0),p,isfinite(p));\n";
|
||||
}
|
||||
source+="\nfloat dyCCEncode(float x) {return x<=0?((-16.f+9.72f)/17.52f):((log2(x<1.f/32768.f?1.f/65536.f+x*.5f:x)+9.72f)/17.52f);}\n";
|
||||
source+="float dyCCDecode(float x) {return x<((9.72f-15.f)/17.52f)?((exp2(x*17.52f-9.72f)-1.f/65536.f)*2.f):min(exp2(x*17.52f-9.72f),65504.f);}\nfloat4 dyOCIO(";
|
||||
for(size_t i=0;i<program.textures.size();i++){
|
||||
auto suffix=std::to_string(i);source+="texture"+std::to_string(program.textures[i].dimensions)+"d<float> dyBound"+suffix+", sampler dySampler"+suffix+", ";
|
||||
}
|
||||
source+="float4 p) {\n";
|
||||
if(impl->decodeCC)source+="p.rgb=float3(dyCCDecode(p.r),dyCCDecode(p.g),dyCCDecode(p.b));\n";
|
||||
source+=calls;
|
||||
if(impl->encodeCC)source+="p=select(float4(0),p,isfinite(p));p.rgb=float3(dyCCEncode(p.r),dyCCEncode(p.g),dyCCEncode(p.b));\n";
|
||||
source+="return p;}\n";return program;
|
||||
}
|
||||
Plan Plan::compile(const Settings &s){
|
||||
s.validate();return {s,s.enabled?Transform::convert(s.input,s.working):Transform::identity(),
|
||||
s.enabled?Transform::display(s.working,s.output,s.referenceGamutCompression):Transform::identity()};
|
||||
}
|
||||
std::string Plan::key()const{return settings.key();}
|
||||
namespace {
|
||||
class CompiledFramePipeline final : public FramePipeline {
|
||||
Plan plan;
|
||||
Transform toLinear,fromLinear;
|
||||
public:
|
||||
explicit CompiledFramePipeline(const Settings&s):plan(Plan::compile(s)),
|
||||
toLinear(Transform::convert(s.working,Space::ACEScg)),
|
||||
fromLinear(Transform::convert(Space::ACEScg,s.working)){validate();}
|
||||
void validate()const override {plan.settings.validate();if(!plan.settings.enabled)throw std::invalid_argument("A frame CMS pipeline must be enabled");}
|
||||
const Settings&settings()const override{return plan.settings;}
|
||||
const Transform&transform(FrameStage stage)const override{
|
||||
switch(stage){case FrameStage::Input:return plan.input;case FrameStage::Output:return plan.output;
|
||||
case FrameStage::ToLinear:return toLinear;case FrameStage::FromLinear:return fromLinear;
|
||||
default:throw std::invalid_argument("Invalid frame CMS stage");}
|
||||
}
|
||||
bool isIdentity(FrameStage stage)const override{return transform(stage).isIdentity();}
|
||||
void apply(FrameStage stage,std::span<DYCompositeRGBA>pixels,Alpha alpha)const override{transform(stage).apply(pixels,alpha);}
|
||||
std::string key()const override{return plan.key();}
|
||||
};
|
||||
}
|
||||
std::shared_ptr<const FramePipeline> compileFramePipeline(const Settings&s){
|
||||
s.validate();return s.enabled?std::make_shared<const CompiledFramePipeline>(s):nullptr;
|
||||
}
|
||||
} // namespace dycm
|
||||
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Metal/Metal.h>
|
||||
#include "../Core/DYColorManagement.hpp"
|
||||
|
||||
// Own one immutable pipeline per transform/device. The caller commits and checks
|
||||
// its frame command buffer, so CMS joins the existing frame transaction.
|
||||
@interface DYColorManagementGPU : NSObject
|
||||
@property(nonatomic,readonly,copy) NSString *transformKey;
|
||||
@property(nonatomic,readonly) uint64_t retainedTextureBytes;
|
||||
- (instancetype)initWithDevice:(id<MTLDevice>)device transform:(const dycm::Transform&)transform error:(NSError**)error;
|
||||
- (instancetype)initWithDevice:(id<MTLDevice>)device transform:(const dycm::Transform&)transform
|
||||
resourceBudget:(uint64_t)bytes error:(NSError**)error;
|
||||
- (BOOL)encodeInput:(id<MTLTexture>)input output:(id<MTLTexture>)output
|
||||
alpha:(dycm::Alpha)alpha commandBuffer:(id<MTLCommandBuffer>)command
|
||||
workspaceBudget:(uint64_t)bytes error:(NSError**)error;
|
||||
@end
|
||||
|
||||
struct DYColorManagementCacheStatistics {
|
||||
NSUInteger entries=0;
|
||||
uint64_t retainedTextureBytes=0, builds=0, hits=0, evictions=0;
|
||||
};
|
||||
// Immutable device/transform resources shared by independent frame requests.
|
||||
// Limits bound cache ownership, not resources still leased by active frames.
|
||||
// Every frame must also charge its leased tables to its own resource budget.
|
||||
@interface DYColorManagementGPUCache : NSObject
|
||||
+ (instancetype)sharedCache;
|
||||
- (instancetype)initWithCountLimit:(NSUInteger)count textureByteLimit:(uint64_t)bytes;
|
||||
- (DYColorManagementGPU*)pipelineWithDevice:(id<MTLDevice>)device
|
||||
transform:(const dycm::Transform&)transform resourceBudget:(uint64_t)bytes error:(NSError**)error;
|
||||
- (DYColorManagementCacheStatistics)statistics;
|
||||
- (void)removeAllObjects;
|
||||
@end
|
||||
@@ -0,0 +1,130 @@
|
||||
#import "DYColorManagementGPU.h"
|
||||
#include <stdexcept>
|
||||
namespace {
|
||||
NSError *failure(NSString *text){return [NSError errorWithDomain:@"com.dayu.colorplate.cms" code:1 userInfo:@{NSLocalizedDescriptionKey:text}];}
|
||||
}
|
||||
@implementation DYColorManagementGPU {
|
||||
id<MTLDevice> _device;
|
||||
id<MTLComputePipelineState> _pipeline;
|
||||
NSString *_transformKey;
|
||||
NSArray *_textures,*_samplers;
|
||||
uint64_t _lutBytes;
|
||||
}
|
||||
- (NSString*)transformKey{return _transformKey;}
|
||||
- (uint64_t)retainedTextureBytes{return _lutBytes;}
|
||||
- (instancetype)initWithDevice:(id<MTLDevice>)device transform:(const dycm::Transform&)transform error:(NSError**)error {
|
||||
return [self initWithDevice:device transform:transform resourceBudget:128*1024*1024 error:error];
|
||||
}
|
||||
- (instancetype)initWithDevice:(id<MTLDevice>)device transform:(const dycm::Transform&)transform resourceBudget:(uint64_t)bytes error:(NSError**)error {
|
||||
if(!(self=[super init]))return nil;
|
||||
try {
|
||||
if(!device)throw std::invalid_argument("色彩管理需要可用的显卡");
|
||||
_device=device;_transformKey=[NSString stringWithUTF8String:transform.key().c_str()];
|
||||
auto program=transform.metalProgram();NSMutableArray *textures=[NSMutableArray new],*samplers=[NSMutableArray new];
|
||||
if(program.textures.size()>16)throw std::runtime_error("色彩管理查找表数量超过限制");
|
||||
std::string source="#include <metal_stdlib>\nusing namespace metal;\n"+program.source;
|
||||
source+="\nkernel void dyCMSFrame(texture2d<float,access::read> src [[texture(0)]], texture2d<float,access::write> dst [[texture(1)]], ";std::string arguments;
|
||||
for(size_t i=0;i<program.textures.size();i++){
|
||||
auto &t=program.textures[i];auto suffix=std::to_string(i);
|
||||
source+="texture"+std::to_string(t.dimensions)+"d<float> dyBound"+suffix+" [[texture("+std::to_string(i+2)+")]], sampler dySampler"+suffix+" [[sampler("+suffix+")]], ";
|
||||
arguments+="dyBound"+suffix+",dySampler"+suffix+",";
|
||||
auto d=[MTLTextureDescriptor new];d.pixelFormat=MTLPixelFormatRGBA32Float;d.textureType=t.dimensions==3?MTLTextureType3D:(t.dimensions==1?MTLTextureType1D:MTLTextureType2D);d.width=t.width;d.height=t.height;d.depth=t.depth;d.storageMode=MTLStorageModeShared;d.usage=MTLTextureUsageShaderRead;
|
||||
uint64_t limit=std::min(bytes,uint64_t(128)*1024*1024);
|
||||
if(_lutBytes>limit||uint64_t(t.width)*t.height*t.depth*16>limit-_lutBytes)throw std::runtime_error("色彩管理查找表超过预算");
|
||||
id<MTLTexture> texture=[device newTextureWithDescriptor:d];if(!texture)throw std::runtime_error("无法分配色彩查找表");_lutBytes+=texture.allocatedSize;if(_lutBytes>limit)throw std::runtime_error("色彩管理查找表超过预算");
|
||||
std::vector<float> rgba(uint64_t(t.width)*t.height*t.depth*4,1);
|
||||
for(size_t p=0;p<t.values.size()/t.channels;p++)for(unsigned c=0;c<3;c++)rgba[p*4+c]=t.values[p*t.channels+(t.channels==1?0:c)];
|
||||
if(t.dimensions==3)[texture replaceRegion:MTLRegionMake3D(0,0,0,t.width,t.height,t.depth) mipmapLevel:0 slice:0 withBytes:rgba.data() bytesPerRow:t.width*16 bytesPerImage:t.width*t.height*16];
|
||||
else [texture replaceRegion:MTLRegionMake2D(0,0,t.width,t.height) mipmapLevel:0 withBytes:rgba.data() bytesPerRow:t.dimensions==1?0:t.width*16];
|
||||
MTLSamplerDescriptor *sd=[MTLSamplerDescriptor new];sd.minFilter=sd.magFilter=t.linear?MTLSamplerMinMagFilterLinear:MTLSamplerMinMagFilterNearest;sd.sAddressMode=sd.tAddressMode=sd.rAddressMode=MTLSamplerAddressModeClampToEdge;sd.normalizedCoordinates=YES;
|
||||
id<MTLSamplerState> sampler=[device newSamplerStateWithDescriptor:sd];if(!sampler)throw std::runtime_error("无法分配色彩查找表采样器");[textures addObject:texture];[samplers addObject:sampler];
|
||||
}
|
||||
_textures=[textures copy];_samplers=[samplers copy];
|
||||
source+="constant uint &premult [[buffer(0)]], uint2 xy [[thread_position_in_grid]]) {\nif(any(xy >= uint2(src.get_width(),src.get_height()))) return;\nfloat4 p=src.read(xy);\n";
|
||||
if(!transform.isIdentity()){
|
||||
// Same finite and alpha-floor contract as Core/DYPremultiplied.h.
|
||||
// Alpha is excluded from the OCIO processor, including gamma ops.
|
||||
source+="p=select(float4(0),p,isfinite(p));float a=p.a;\nif(premult) { p.rgb/=max(a,1e-5f);p=select(float4(0),p,isfinite(p)); }\np=dyOCIO("+arguments+"float4(p.rgb,1));p=select(float4(0),p,isfinite(p));p.a=a;\nif(premult){p.rgb*=a;p=select(float4(0),p,isfinite(p));}\n";
|
||||
}
|
||||
source+="dst.write(p,xy);}\n";
|
||||
MTLCompileOptions *options=[MTLCompileOptions new];options.languageVersion=MTLLanguageVersion3_1;options.fastMathEnabled=NO;
|
||||
id<MTLLibrary> library=[device newLibraryWithSource:[NSString stringWithUTF8String:source.c_str()] options:options error:error];
|
||||
if(!library)return nil;
|
||||
id<MTLFunction> function=[library newFunctionWithName:@"dyCMSFrame"];
|
||||
if(!function)throw std::runtime_error("色彩管理显卡函数缺失");
|
||||
_pipeline=[device newComputePipelineStateWithFunction:function error:error];
|
||||
if(!_pipeline)return nil;
|
||||
return self;
|
||||
}catch(const std::exception &e){if(error)*error=failure([NSString stringWithUTF8String:e.what()]);return nil;}
|
||||
}
|
||||
- (BOOL)encodeInput:(id<MTLTexture>)input output:(id<MTLTexture>)output alpha:(dycm::Alpha)alpha commandBuffer:(id<MTLCommandBuffer>)command workspaceBudget:(uint64_t)bytes error:(NSError**)error {
|
||||
try {
|
||||
if(alpha!=dycm::Alpha::Straight&&alpha!=dycm::Alpha::Premultiplied)throw std::invalid_argument("色彩管理透明度表示无效");
|
||||
auto valid=[&](id<MTLTexture> t){return t&&t.device.registryID==_device.registryID&&t.pixelFormat==MTLPixelFormatRGBA32Float&&t.textureType==MTLTextureType2D&&t.sampleCount==1&&t.mipmapLevelCount==1&&t.width&&t.height&&t.width<=16384&&t.height<=16384&&uint64_t(t.width)*t.height<=uint64_t(64)*1024*1024;};
|
||||
if(!valid(input)||!valid(output)||input==output||input.width!=output.width||input.height!=output.height)
|
||||
throw std::invalid_argument("色彩管理需要独立、同尺寸的 RGBA32Float 纹理");
|
||||
if((input.usage!=MTLTextureUsageUnknown&&!(input.usage&MTLTextureUsageShaderRead))||(output.usage!=MTLTextureUsageUnknown&&!(output.usage&MTLTextureUsageShaderWrite)))
|
||||
throw std::invalid_argument("色彩管理纹理缺少读写用途");
|
||||
if(!command||command.commandQueue.device.registryID!=_device.registryID||command.status!=MTLCommandBufferStatusNotEnqueued)
|
||||
throw std::invalid_argument("色彩管理帧命令不可写入");
|
||||
if(_lutBytes>bytes||input.allocatedSize>bytes-_lutBytes||output.allocatedSize>bytes-_lutBytes-input.allocatedSize)
|
||||
throw std::runtime_error("色彩管理超过图像预算");
|
||||
id<MTLComputeCommandEncoder> encoder=[command computeCommandEncoder];
|
||||
if(!encoder)throw std::runtime_error("色彩管理显卡编码器不可用");
|
||||
uint32_t pm=alpha==dycm::Alpha::Premultiplied;
|
||||
[encoder setComputePipelineState:_pipeline];[encoder setTexture:input atIndex:0];[encoder setTexture:output atIndex:1];[encoder setBytes:&pm length:sizeof(pm) atIndex:0];
|
||||
for(NSUInteger i=0;i<_textures.count;i++){[encoder setTexture:_textures[i] atIndex:i+2];[encoder setSamplerState:_samplers[i] atIndex:i];}
|
||||
NSUInteger x=_pipeline.threadExecutionWidth,y=std::min(NSUInteger(8),_pipeline.maxTotalThreadsPerThreadgroup/x);
|
||||
[encoder dispatchThreads:MTLSizeMake(input.width,input.height,1) threadsPerThreadgroup:MTLSizeMake(x,y,1)];[encoder endEncoding];
|
||||
return YES;
|
||||
}catch(const std::exception &e){if(error)*error=failure([NSString stringWithUTF8String:e.what()]);return NO;}
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation DYColorManagementGPUCache {
|
||||
NSMutableDictionary<NSString*,DYColorManagementGPU*> *_entries;
|
||||
NSMutableArray<NSString*> *_order;
|
||||
NSUInteger _countLimit;
|
||||
uint64_t _byteLimit;
|
||||
DYColorManagementCacheStatistics _statistics;
|
||||
}
|
||||
+ (instancetype)sharedCache {
|
||||
static DYColorManagementGPUCache *cache;static dispatch_once_t once;
|
||||
dispatch_once(&once,^{cache=[[self alloc]initWithCountLimit:32 textureByteLimit:uint64_t(128)*1024*1024];});
|
||||
return cache;
|
||||
}
|
||||
- (instancetype)init {return [self initWithCountLimit:32 textureByteLimit:uint64_t(128)*1024*1024];}
|
||||
- (instancetype)initWithCountLimit:(NSUInteger)count textureByteLimit:(uint64_t)bytes {
|
||||
if((self=[super init])){_entries=[NSMutableDictionary new];_order=[NSMutableArray new];_countLimit=count;_byteLimit=bytes;}
|
||||
return self;
|
||||
}
|
||||
- (DYColorManagementGPU*)pipelineWithDevice:(id<MTLDevice>)device transform:(const dycm::Transform&)transform resourceBudget:(uint64_t)bytes error:(NSError**)error {
|
||||
if(!device){if(error)*error=failure(@"色彩管理需要可用的显卡");return nil;}
|
||||
NSString *key=[NSString stringWithFormat:@"%llu:%s",(unsigned long long)device.registryID,transform.key().c_str()];
|
||||
// Coalesce simultaneous first frames. Compilation happens on the caller's
|
||||
// render queue; the cache never calls back into a frame or holds its buffers.
|
||||
@synchronized(self){
|
||||
DYColorManagementGPU *pipeline=_entries[key];
|
||||
if(pipeline){
|
||||
if(pipeline.retainedTextureBytes>bytes){if(error)*error=failure(@"色彩管理查找表超过预算");return nil;}
|
||||
[_order removeObject:key];[_order addObject:key];_statistics.hits++;return pipeline;
|
||||
}
|
||||
pipeline=[[DYColorManagementGPU alloc]initWithDevice:device transform:transform resourceBudget:bytes error:error];
|
||||
if(!pipeline)return nil;_statistics.builds++;
|
||||
uint64_t cost=pipeline.retainedTextureBytes;
|
||||
if(!_countLimit||cost>_byteLimit)return pipeline;
|
||||
while(_order.count&&(_order.count>=_countLimit||cost>_byteLimit-_statistics.retainedTextureBytes)){
|
||||
NSString *old=_order.firstObject;_statistics.retainedTextureBytes-=_entries[old].retainedTextureBytes;
|
||||
[_entries removeObjectForKey:old];[_order removeObjectAtIndex:0];_statistics.evictions++;
|
||||
}
|
||||
_entries[key]=pipeline;[_order addObject:key];_statistics.retainedTextureBytes+=cost;
|
||||
return pipeline;
|
||||
}
|
||||
}
|
||||
- (DYColorManagementCacheStatistics)statistics {
|
||||
@synchronized(self){auto value=_statistics;value.entries=_entries.count;return value;}
|
||||
}
|
||||
- (void)removeAllObjects {
|
||||
@synchronized(self){[_entries removeAllObjects];[_order removeAllObjects];_statistics.retainedTextureBytes=0;}
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#import <Foundation/Foundation.h>
|
||||
#include "../Core/DYColorManagement.hpp"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
typedef NS_ENUM(NSInteger,DYCMSInputMode){DYCMSInputDeclared=0,DYCMSInputHostProfile=1};
|
||||
// Root-level authoring state. Integration must explicitly whitelist this class;
|
||||
// missing state in older documents means the unchanged unmanaged pipeline.
|
||||
@interface DYColorManagementState : NSObject <NSSecureCoding,NSCopying>
|
||||
@property(nonatomic) NSInteger version,inputSpace,workingSpace,outputTransform;
|
||||
@property(nonatomic) DYCMSInputMode inputMode;
|
||||
@property(nonatomic) BOOL enabled,referenceGamutCompression;
|
||||
@property(nonatomic,copy) NSString *engineIdentifier,*configIdentifier;
|
||||
- (BOOL)getSettings:(dycm::Settings*)settings error:(NSError* _Nullable * _Nullable)error;
|
||||
- (nullable NSData*)archiveDataWithError:(NSError* _Nullable * _Nullable)error;
|
||||
+ (nullable instancetype)stateFromArchiveData:(NSData*)data error:(NSError* _Nullable * _Nullable)error;
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,77 @@
|
||||
#import "DYColorManagementState.h"
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
namespace {
|
||||
NSError *failure(NSString *message){return [NSError errorWithDomain:@"com.dayu.colorplate.cms-state" code:1 userInfo:@{NSLocalizedDescriptionKey:message}];}
|
||||
NSArray<NSString*> *keys(){return @[@"version",@"inputMode",@"inputSpace",@"workingSpace",@"outputTransform",@"enabled",@"referenceGamutCompression",@"engineIdentifier",@"configIdentifier"];}
|
||||
}
|
||||
@implementation DYColorManagementState
|
||||
+ (BOOL)supportsSecureCoding{return YES;}
|
||||
- (instancetype)init {
|
||||
if((self=[super init])){dycm::Settings s;_version=2;_inputMode=DYCMSInputDeclared;_inputSpace=NSInteger(s.input);_workingSpace=NSInteger(s.working);_outputTransform=NSInteger(s.output);_enabled=s.enabled;_referenceGamutCompression=s.referenceGamutCompression;
|
||||
_engineIdentifier=[NSString stringWithUTF8String:dycm::Engine];_configIdentifier=[NSString stringWithUTF8String:dycm::Config];}
|
||||
return self;
|
||||
}
|
||||
- (BOOL)getSettings:(dycm::Settings*)settings error:(NSError**)error {
|
||||
try {
|
||||
if(!settings)throw std::invalid_argument("色彩管理参数目的地缺失");
|
||||
if(![_engineIdentifier isKindOfClass:NSString.class]||![_configIdentifier isKindOfClass:NSString.class]||![_engineIdentifier isEqualToString:[NSString stringWithUTF8String:dycm::Engine]]||![_configIdentifier isEqualToString:[NSString stringWithUTF8String:dycm::Config]])
|
||||
throw std::invalid_argument("工程使用了不支持的色彩转换组件版本");
|
||||
for(NSNumber *value in @[@(_version),@(_inputSpace),@(_workingSpace),@(_outputTransform)])
|
||||
if(value.longLongValue<0||value.unsignedLongLongValue>std::numeric_limits<unsigned>::max())throw std::invalid_argument("色彩管理标识超出范围");
|
||||
if((_version!=1&&_version!=2)||(_inputMode!=DYCMSInputDeclared&&_inputMode!=DYCMSInputHostProfile)||(_version==1&&_inputMode!=DYCMSInputDeclared))throw std::invalid_argument("色彩管理输入方式或归档版本无效");
|
||||
dycm::Settings s;s.enabled=_enabled;s.input=dycm::Space(_inputSpace);s.working=dycm::Space(_workingSpace);s.output=dycm::Output(_outputTransform);s.referenceGamutCompression=_referenceGamutCompression;
|
||||
s.validate();if(_inputMode==DYCMSInputHostProfile)s.input=dycm::Space::ACEScg;*settings=s;return YES;
|
||||
}catch(const std::exception &e){if(error)*error=failure([NSString stringWithUTF8String:e.what()]);return NO;}
|
||||
}
|
||||
- (void)encodeWithCoder:(NSCoder*)coder {
|
||||
dycm::Settings s;NSError *error=nil;if(![self getSettings:&s error:&error]){[coder failWithError:error];return;}
|
||||
for(NSString *key in @[@"version",@"inputSpace",@"workingSpace",@"outputTransform"])[coder encodeInteger:[[self valueForKey:key]integerValue] forKey:key];
|
||||
if(_version>=2)[coder encodeInteger:_inputMode forKey:@"inputMode"];
|
||||
[coder encodeBool:_enabled forKey:@"enabled"];[coder encodeBool:_referenceGamutCompression forKey:@"referenceGamutCompression"];
|
||||
[coder encodeObject:_engineIdentifier forKey:@"engineIdentifier"];[coder encodeObject:_configIdentifier forKey:@"configIdentifier"];
|
||||
}
|
||||
- (instancetype)initWithCoder:(NSCoder*)coder {
|
||||
if(!(self=[self init]))return nil;
|
||||
for(NSString *key in keys())if(![key isEqual:@"inputMode"]&&![coder containsValueForKey:key]){[coder failWithError:failure(@"色彩管理归档不完整")];return nil;}
|
||||
for(NSString *key in @[@"version",@"inputSpace",@"workingSpace",@"outputTransform"])[self setValue:@([coder decodeIntegerForKey:key]) forKey:key];
|
||||
if((_version>=2)!=[coder containsValueForKey:@"inputMode"]){[coder failWithError:failure(@"色彩管理输入方式与归档版本不一致")];return nil;}
|
||||
_inputMode=_version>=2?DYCMSInputMode([coder decodeIntegerForKey:@"inputMode"]):DYCMSInputDeclared;
|
||||
// Keyed archives distinguish CFBoolean from integer NSNumber. The boolean
|
||||
// decoder already rejects integer 0/1/2; an integer decoder rejects our own
|
||||
// valid encodeBool fields. Do not coerce either representation via KVC.
|
||||
_enabled=[coder decodeBoolForKey:@"enabled"];
|
||||
_referenceGamutCompression=[coder decodeBoolForKey:@"referenceGamutCompression"];
|
||||
if(coder.error)return nil;
|
||||
_engineIdentifier=[[coder decodeObjectOfClass:NSString.class forKey:@"engineIdentifier"]copy];_configIdentifier=[[coder decodeObjectOfClass:NSString.class forKey:@"configIdentifier"]copy];
|
||||
dycm::Settings s;NSError *error=nil;if(![self getSettings:&s error:&error]){[coder failWithError:error];return nil;}return self;
|
||||
}
|
||||
- (id)copyWithZone:(NSZone*)zone {
|
||||
DYColorManagementState *copy=[[[self class]allocWithZone:zone]init];
|
||||
for(NSString *key in keys())[copy setValue:[self valueForKey:key] forKey:key];return copy;
|
||||
}
|
||||
- (BOOL)isEqual:(id)object {
|
||||
if(object==self)return YES;if(![object isMemberOfClass:self.class])return NO;
|
||||
for(NSString *key in keys()){id a=[self valueForKey:key],b=[object valueForKey:key];if(a!=b&&![a isEqual:b])return NO;}return YES;
|
||||
}
|
||||
- (NSUInteger)hash {
|
||||
NSUInteger value=1469598103934665603ull;
|
||||
for(NSString *key in keys())value=(value^[[self valueForKey:key]hash])*1099511628211ull;return value;
|
||||
}
|
||||
- (NSData*)archiveDataWithError:(NSError**)error {
|
||||
dycm::Settings s;if(![self getSettings:&s error:error])return nil;
|
||||
@try{return [NSKeyedArchiver archivedDataWithRootObject:self requiringSecureCoding:YES error:error];}
|
||||
@catch(NSException *exception){if(error)*error=failure(@"无法保存色彩管理设置");return nil;}
|
||||
}
|
||||
+ (instancetype)stateFromArchiveData:(NSData*)data error:(NSError**)error {
|
||||
if(![data isKindOfClass:NSData.class]||!data.length||data.length>16384){if(error)*error=failure(@"色彩管理归档大小无效");return nil;}
|
||||
@try{
|
||||
id decoded=[NSKeyedUnarchiver unarchivedObjectOfClass:self fromData:data error:error];
|
||||
// Foundation permits some scalar classes even with a specific root
|
||||
// whitelist. Check the returned root before exposing typed state.
|
||||
if(![decoded isMemberOfClass:self]){if(error)*error=failure(@"色彩管理归档根对象无效");return nil;}
|
||||
dycm::Settings s;if(![decoded getSettings:&s error:error])return nil;return decoded;
|
||||
}
|
||||
@catch(NSException *exception){if(error)*error=failure(@"无法读取色彩管理设置");return nil;}
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreGraphics/CoreGraphics.h>
|
||||
#import <Metal/Metal.h>
|
||||
#include "../Core/DYColorManagement.hpp"
|
||||
#include <optional>
|
||||
#include <atomic>
|
||||
|
||||
// A physical RGB profile conversion, separate from a declared camera encoding
|
||||
// or an ACES display rendering transform. Profiles and keys are immutable.
|
||||
@interface DYColorProfile : NSObject
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
- (instancetype)initWithSource:(CGColorSpaceRef)source target:(CGColorSpaceRef)target error:(NSError**)error;
|
||||
// Encoded ACES ODT values to a real host/display profile. In particular, HLG
|
||||
// uses the BT.2100 reference EOTF before the physical profile conversion.
|
||||
- (instancetype)initWithDisplayOutput:(dycm::Output)output target:(CGColorSpaceRef)target error:(NSError**)error;
|
||||
@property(nonatomic,readonly) CGColorSpaceRef source;
|
||||
@property(nonatomic,readonly) CGColorSpaceRef target;
|
||||
@property(nonatomic,readonly) BOOL identity;
|
||||
@property(nonatomic,readonly,copy) NSString*key;
|
||||
// Opaque fingerprint metadata only, never decoded as an authoring field.
|
||||
@property(nonatomic,readonly,copy) NSData*sourceDescription;
|
||||
@property(nonatomic,readonly,copy) NSData*targetDescription;
|
||||
// No additional display tone mapping or [0,1] clipping. The selected physical
|
||||
// profile still defines its own transfer-function range and extrapolation.
|
||||
// Output storage is private. Input remains untouched on success or failure.
|
||||
- (std::optional<std::vector<DYCompositeRGBA>>)convertPixels:(std::span<const DYCompositeRGBA>)input
|
||||
alpha:(dycm::Alpha)alpha budget:(uint64_t)bytes cancelled:(const std::atomic_bool*)cancelled error:(NSError**)error;
|
||||
@end
|
||||
|
||||
@interface DYColorProfileGPU : NSObject
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
- (instancetype)initWithDevice:(id<MTLDevice>)device profile:(DYColorProfile*)profile error:(NSError**)error;
|
||||
- (BOOL)renderInput:(id<MTLTexture>)input output:(id<MTLTexture>)output alpha:(dycm::Alpha)alpha
|
||||
workspaceBudget:(uint64_t)bytes cancelled:(const std::atomic_bool*)cancelled error:(NSError**)error;
|
||||
@end
|
||||
|
||||
// Nominal output profile. For conversion use initWithDisplayOutput:target:;
|
||||
// Apple's HLG profile alone is not the reference BT.2100 chromatic EOTF.
|
||||
CGColorSpaceRef DYCreateCMSOutputColorSpace(dycm::Output output) CF_RETURNS_RETAINED;
|
||||
@@ -0,0 +1,161 @@
|
||||
#import "DYColorProfile.h"
|
||||
#import <CoreImage/CoreImage.h>
|
||||
#import <CommonCrypto/CommonDigest.h>
|
||||
#include <mutex>
|
||||
#include <stdexcept>
|
||||
#include <simd/simd.h>
|
||||
|
||||
namespace {
|
||||
struct CacheClear {CIContext*context;~CacheClear(){[context clearCaches];}};
|
||||
NSError*failure(NSString*message){return [NSError errorWithDomain:@"com.dayu.colorplate.profile" code:1 userInfo:@{NSLocalizedDescriptionKey:message}];}
|
||||
void check(const std::atomic_bool*cancelled){if(cancelled&&cancelled->load())throw std::runtime_error("颜色配置转换已取消");}
|
||||
void validAlpha(dycm::Alpha alpha){if(alpha!=dycm::Alpha::Straight&&alpha!=dycm::Alpha::Premultiplied)throw std::invalid_argument("颜色配置透明度表示无效");}
|
||||
void admission(uint64_t pixels,uint64_t bytes){if(!pixels||pixels>uint64_t(64)*1024*1024||pixels>bytes/(6*sizeof(DYCompositeRGBA)))throw std::runtime_error("颜色配置转换的估算工作集超过预算");}
|
||||
NSData*description(CGColorSpaceRef space){
|
||||
if(!space||CGColorSpaceGetModel(space)!=kCGColorSpaceModelRGB)throw std::invalid_argument("颜色转换需要明确的 RGB 配置");
|
||||
CGColorSpaceRef device=CGColorSpaceCreateDeviceRGB();bool unspecified=CFEqual(space,device);CGColorSpaceRelease(device);if(unspecified)throw std::invalid_argument("Device RGB 没有明确的原色和传递函数");
|
||||
CFPropertyListRef plist=CGColorSpaceCopyPropertyList(space);if(!plist)throw std::runtime_error("无法保存颜色配置描述");
|
||||
NSData*data=[NSPropertyListSerialization dataWithPropertyList:CFBridgingRelease(plist) format:NSPropertyListBinaryFormat_v1_0 options:0 error:nil];
|
||||
if(!data.length||data.length>16*1024*1024)throw std::runtime_error("颜色配置描述无效或超过限制");
|
||||
return data;
|
||||
}
|
||||
NSString*fingerprint(NSData*data){unsigned char digest[CC_SHA256_DIGEST_LENGTH];CC_SHA256(data.bytes,(CC_LONG)data.length,digest);NSMutableString*result=[NSMutableString new];for(auto c:digest)[result appendFormat:@"%02x",c];return result;}
|
||||
NSDictionary*options(bool software){
|
||||
CGColorSpaceRef working=CGColorSpaceCreateWithName(kCGColorSpaceACESCGLinear);if(!working)throw std::runtime_error("无法建立线性颜色转换空间");
|
||||
NSMutableDictionary*value=[@{kCIContextWorkingColorSpace:CFBridgingRelease(working),kCIContextWorkingFormat:@(kCIFormatRGBAf),kCIContextOutputPremultiplied:@YES,kCIContextCacheIntermediates:@NO}mutableCopy];if(software)value[kCIContextUseSoftwareRenderer]=@YES;return value;
|
||||
}
|
||||
void configure(CIRenderDestination*d,CGColorSpaceRef target){d.colorSpace=target;d.alphaMode=CIRenderDestinationAlphaPremultiplied;d.clamped=NO;d.dithered=NO;d.flipped=NO;}
|
||||
bool render(CIContext*context,CIImage*image,CIRenderDestination*destination,size_t width,size_t height,NSError**error){
|
||||
NSError*underlying=nil;auto task=[context startTaskToRender:image fromRect:CGRectMake(0,0,width,height) toDestination:destination atPoint:CGPointZero error:&underlying];
|
||||
if(!task||![task waitUntilCompletedAndReturnError:&underlying]){if(error)*error=underlying?:failure(@"系统颜色配置转换未完成");return false;}return true;
|
||||
}
|
||||
id<MTLTexture>rootTexture(id<MTLTexture>t){while(t.parentTexture)t=t.parentTexture;return t;}
|
||||
bool aliases(id<MTLTexture>a,id<MTLTexture>b){a=rootTexture(a);b=rootTexture(b);return a==b||(a.buffer&&a.buffer==b.buffer)||(a.iosurface&&a.iosurface==b.iosurface)||(a.heap&&a.heap==b.heap);}
|
||||
CGColorSpaceRef calibrated(double rx,double ry,double gx,double gy,double bx,double by,double wx,double wy,double gamma){
|
||||
simd_double3 white={wx/wy,1,(1-wx-wy)/wy};simd_double3x3 primaries={simd_double3{rx/ry,1,(1-rx-ry)/ry},simd_double3{gx/gy,1,(1-gx-gy)/gy},simd_double3{bx/by,1,(1-bx-by)/by}};auto scales=simd_mul(simd_inverse(primaries),white);
|
||||
CGFloat w[3]={white.x,white.y,white.z},g[3]={gamma,gamma,gamma},matrix[9];for(int c=0;c<3;c++)for(int r=0;r<3;r++)matrix[c*3+r]=primaries.columns[c][r]*scales[c];return CGColorSpaceCreateCalibratedRGB(w,nullptr,g,matrix);
|
||||
}
|
||||
DYCompositeRGBA decodeHLG(DYCompositeRGBA p){
|
||||
// BT.2100 reference display: 1000 cd/m2, gamma 1.2, black 0. Apple's
|
||||
// physical linear profile uses ISO HDR reference white 203 cd/m2.
|
||||
// Signed extension is explicit; finite values are not clipped to [0,1].
|
||||
auto inverse=[](float c){float v=fabsf(c);return copysignf(v<=.5f?v*v/3.f:(expf((v-.55991073f)/.17883277f)+.28466892f)/12.f,c);};p.r=inverse(p.r);p.g=inverse(p.g);p.b=inverse(p.b);
|
||||
float scale=(1000.f/203.f)*powf(fabsf(.2627f*p.r+.6780f*p.g+.0593f*p.b),.2f);p.r*=scale;p.g*=scale;p.b*=scale;return dyPMFinite(p);
|
||||
}
|
||||
}
|
||||
@interface DYColorProfile ()
|
||||
@property(nonatomic,readonly) CGColorSpaceRef conversionSource;
|
||||
@property(nonatomic,readonly) BOOL decodeHLG;
|
||||
@end
|
||||
CGColorSpaceRef DYCreateCMSOutputColorSpace(dycm::Output output){
|
||||
switch(output){
|
||||
case dycm::Output::Rec709_100:case dycm::Output::Rec709D60_100:return calibrated(.64,.33,.30,.60,.15,.06,.3127,.3290,2.4);
|
||||
case dycm::Output::SRGB_100:return CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
|
||||
case dycm::Output::DisplayP3_100:return CGColorSpaceCreateWithName(kCGColorSpaceDisplayP3);
|
||||
case dycm::Output::Rec2020_100:return calibrated(.708,.292,.170,.797,.131,.046,.3127,.3290,2.4);
|
||||
case dycm::Output::Rec2020PQ_1000:return CGColorSpaceCreateWithName(kCGColorSpaceITUR_2100_PQ);
|
||||
case dycm::Output::Rec2020HLG_1000:return CGColorSpaceCreateWithName(kCGColorSpaceITUR_2100_HLG);
|
||||
case dycm::Output::P3D60_48:return calibrated(.68,.32,.265,.69,.15,.06,.32168,.33767,2.6);
|
||||
case dycm::Output::P3DCI_48:return CGColorSpaceCreateWithName(kCGColorSpaceDCIP3);
|
||||
case dycm::Output::P3D65_48:return calibrated(.68,.32,.265,.69,.15,.06,.3127,.3290,2.6);
|
||||
}return nullptr;
|
||||
}
|
||||
@implementation DYColorProfile {
|
||||
CGColorSpaceRef _source,_target,_conversionSource;BOOL _identity,_decodeHLG;NSString*_key;NSData*_sourceDescription,*_targetDescription;CIContext*_cpu;std::mutex _mutex;
|
||||
}
|
||||
- (CGColorSpaceRef)source{return _source;}
|
||||
- (CGColorSpaceRef)target{return _target;}
|
||||
- (BOOL)identity{return _identity;}
|
||||
- (NSString*)key{return _key;}
|
||||
- (NSData*)sourceDescription{return _sourceDescription;}
|
||||
- (NSData*)targetDescription{return _targetDescription;}
|
||||
- (CGColorSpaceRef)conversionSource{return _conversionSource?:_source;}
|
||||
- (BOOL)decodeHLG{return _decodeHLG;}
|
||||
- (instancetype)initWithSource:(CGColorSpaceRef)source target:(CGColorSpaceRef)target error:(NSError**)error {
|
||||
if(!(self=[super init]))return nil;try{_sourceDescription=description(source);_targetDescription=description(target);_source=CGColorSpaceRetain(source);_target=CGColorSpaceRetain(target);_identity=CFEqual(source,target);_key=[NSString stringWithFormat:@"dayu-profile:1:%@:%@",fingerprint(_sourceDescription),fingerprint(_targetDescription)];return self;}catch(const std::exception&e){if(error)*error=failure(@(e.what()));return nil;}
|
||||
}
|
||||
- (instancetype)initWithDisplayOutput:(dycm::Output)output target:(CGColorSpaceRef)target error:(NSError**)error {
|
||||
CGColorSpaceRef source=DYCreateCMSOutputColorSpace(output);self=[self initWithSource:source target:target error:error];if(source)CGColorSpaceRelease(source);if(!self)return nil;
|
||||
if(output==dycm::Output::Rec2020HLG_1000){_conversionSource=CGColorSpaceCreateWithName(kCGColorSpaceExtendedLinearITUR_2020);if(!_conversionSource){if(error)*error=failure(@"无法建立 HLG 参考输出空间");return nil;}_decodeHLG=YES;_identity=NO;_key=[_key stringByAppendingString:@":reference-hlg:1000:203:v1"];}
|
||||
return self;
|
||||
}
|
||||
- (void)dealloc{if(_source)CGColorSpaceRelease(_source);if(_target)CGColorSpaceRelease(_target);if(_conversionSource)CGColorSpaceRelease(_conversionSource);}
|
||||
- (std::optional<std::vector<DYCompositeRGBA>>)convertPixels:(std::span<const DYCompositeRGBA>)input alpha:(dycm::Alpha)alpha budget:(uint64_t)bytes cancelled:(const std::atomic_bool*)cancelled error:(NSError**)error {
|
||||
try{validAlpha(alpha);check(cancelled);if(input.empty()||input.size()>uint64_t(64)*1024*1024)throw std::invalid_argument("颜色转换输入大小无效");if(input.size()>bytes/(2*sizeof(DYCompositeRGBA)))throw std::runtime_error("颜色转换副本超过预算");if(_identity)return std::vector<DYCompositeRGBA>(input.begin(),input.end());admission(input.size(),bytes);
|
||||
std::lock_guard<std::mutex>lock(_mutex);check(cancelled);@autoreleasepool{@try{
|
||||
if(!_cpu)_cpu=[CIContext contextWithOptions:options(true)];if(!_cpu)throw std::runtime_error("无法建立 CPU 颜色转换");
|
||||
CacheClear cleanup{_cpu};std::vector<DYCompositeRGBA>result(input.size());std::vector<DYCompositeRGBA>opaque(std::min(size_t(4096),input.size()));
|
||||
for(size_t offset=0;offset<input.size();offset+=opaque.size()){
|
||||
check(cancelled);size_t count=std::min(opaque.size(),input.size()-offset);
|
||||
for(size_t i=0;i<count;i++){auto p=dyPMFinite(input[offset+i]);if(alpha==dycm::Alpha::Premultiplied)p=dyPMUnpremultiply(p);if(_decodeHLG)p=decodeHLG(p);p.a=1;opaque[i]=p;}
|
||||
NSData*data=[NSData dataWithBytesNoCopy:opaque.data() length:count*sizeof(DYCompositeRGBA) freeWhenDone:NO];auto image=[CIImage imageWithBitmapData:data bytesPerRow:count*16 size:CGSizeMake(count,1) format:kCIFormatRGBAf colorSpace:self.conversionSource];
|
||||
auto destination=[[CIRenderDestination alloc]initWithBitmapData:result.data()+offset width:count height:1 bytesPerRow:count*16 format:kCIFormatRGBAf];configure(destination,_target);
|
||||
if(!image||!render(_cpu,image,destination,count,1,error)){[_cpu clearCaches];return std::nullopt;}
|
||||
for(size_t i=0;i<count;i++){auto p=dyPMFinite(result[offset+i]);p.a=dyPMFinite(input[offset+i]).a;result[offset+i]=alpha==dycm::Alpha::Premultiplied?dyPMPremultiply(p):p;}
|
||||
}[_cpu clearCaches];check(cancelled);return result;
|
||||
}@catch(NSException*e){[_cpu clearCaches];if(error)*error=failure(e.reason?:@"CPU 颜色转换异常");return std::nullopt;}}
|
||||
}catch(const std::exception&e){if(error)*error=failure(@(e.what()));return std::nullopt;}
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation DYColorProfileGPU {
|
||||
id<MTLDevice>_device;id<MTLCommandQueue>_queue;DYColorProfile*_profile;CIContext*_context;
|
||||
id<MTLComputePipelineState>_prepare,_restore;std::mutex _mutex;
|
||||
}
|
||||
- (instancetype)initWithDevice:(id<MTLDevice>)device profile:(DYColorProfile*)profile error:(NSError**)error {
|
||||
if(!(self=[super init]))return nil;try{
|
||||
if(!device||!profile)throw std::invalid_argument("颜色配置或显卡缺失");_device=device;_profile=profile;_queue=[device newCommandQueue];if(!_queue)throw std::runtime_error("无法建立颜色转换队列");
|
||||
if(profile.identity)return self;_context=[CIContext contextWithMTLCommandQueue:_queue options:options(false)];if(!_context)throw std::runtime_error("无法建立显卡颜色转换");
|
||||
NSString*source=@"#include <metal_stdlib>\nusing namespace metal;\nfloat4 safe(float4 p){return select(float4(0),p,isfinite(p));}\nkernel void prepare(texture2d<float,access::read> src [[texture(0)]],texture2d<float,access::write> dst [[texture(1)]],constant uint2& options [[buffer(0)]],uint2 p [[thread_position_in_grid]]){if(any(p>=uint2(src.get_width(),src.get_height())))return;float4 c=safe(src.read(p));if(options.x)c=safe(float4(c.rgb/max(c.a,1e-5f),c.a));if(options.y){float3 v=abs(c.rgb);c.rgb=sign(c.rgb)*select((exp((v-.55991073f)/.17883277f)+.28466892f)/12.f,v*v/3.f,v<=.5f);c.rgb*=1000.f/203.f*pow(abs(dot(c.rgb,float3(.2627f,.6780f,.0593f))),.2f);c=safe(c);}dst.write(float4(c.rgb,1),p);}\nkernel void restore(texture2d<float,access::read> original [[texture(0)]],texture2d<float,access::read> converted [[texture(1)]],texture2d<float,access::write> dst [[texture(2)]],constant uint2& options [[buffer(0)]],uint2 p [[thread_position_in_grid]]){if(any(p>=uint2(dst.get_width(),dst.get_height())))return;float a=safe(original.read(p)).a;float3 rgb=safe(converted.read(p)).rgb;if(options.x)rgb*=a;dst.write(safe(float4(rgb,a)),p);}";
|
||||
auto options=[MTLCompileOptions new];options.languageVersion=MTLLanguageVersion3_1;options.fastMathEnabled=NO;auto library=[device newLibraryWithSource:source options:options error:error];if(!library)return nil;
|
||||
_prepare=[device newComputePipelineStateWithFunction:[library newFunctionWithName:@"prepare"] error:error];_restore=[device newComputePipelineStateWithFunction:[library newFunctionWithName:@"restore"] error:error];if(!_prepare||!_restore)return nil;return self;
|
||||
}catch(const std::exception&e){if(error)*error=failure(@(e.what()));return nil;}
|
||||
}
|
||||
- (BOOL)renderInput:(id<MTLTexture>)input output:(id<MTLTexture>)output alpha:(dycm::Alpha)alpha workspaceBudget:(uint64_t)bytes cancelled:(const std::atomic_bool*)cancelled error:(NSError**)error {
|
||||
try{validAlpha(alpha);check(cancelled);auto valid=[&](id<MTLTexture>t){return t&&t.device.registryID==_device.registryID&&t.textureType==MTLTextureType2D&&t.pixelFormat==MTLPixelFormatRGBA32Float&&t.width&&t.height&&t.width<=16384&&t.height<=16384&&t.sampleCount==1&&t.mipmapLevelCount==1&&!t.framebufferOnly&&t.storageMode!=MTLStorageModeMemoryless;};
|
||||
if(!valid(input)||!valid(output)||input.width!=output.width||input.height!=output.height||aliases(input,output))throw std::invalid_argument("颜色转换需要同设备、同尺寸且独立的 RGBA32Float 纹理");
|
||||
if((input.usage!=MTLTextureUsageUnknown&&!(input.usage&MTLTextureUsageShaderRead))||(output.usage!=MTLTextureUsageUnknown&&!(output.usage&MTLTextureUsageShaderWrite)))throw std::invalid_argument("颜色转换纹理缺少读写用途");
|
||||
if(uint64_t(input.width)*input.height>uint64_t(64)*1024*1024)throw std::invalid_argument("颜色转换图像过大");
|
||||
if(input.allocatedSize>bytes||output.allocatedSize>bytes-input.allocatedSize)throw std::runtime_error("颜色转换纹理超过预算");
|
||||
std::lock_guard<std::mutex>lock(_mutex);check(cancelled);@autoreleasepool{@try{
|
||||
CacheClear cleanup{_context};auto finish=[&](id<MTLCommandBuffer>b){if(!b)throw std::runtime_error("颜色转换命令缺失");[b commit];[b waitUntilCompleted];if(b.status!=MTLCommandBufferStatusCompleted)throw std::runtime_error(b.error.localizedDescription.UTF8String?:"颜色转换命令未完成");check(cancelled);};
|
||||
if(_profile.identity){auto command=[_queue commandBuffer];auto blit=[command blitCommandEncoder];if(!blit)throw std::runtime_error("无法复制恒等颜色图像");[blit copyFromTexture:input sourceSlice:0 sourceLevel:0 sourceOrigin:MTLOriginMake(0,0,0) sourceSize:MTLSizeMake(input.width,input.height,1) toTexture:output destinationSlice:0 destinationLevel:0 destinationOrigin:MTLOriginMake(0,0,0)];[blit endEncoding];finish(command);return YES;}
|
||||
admission(uint64_t(input.width)*input.height,bytes);auto desc=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA32Float width:input.width height:input.height mipmapped:NO];desc.storageMode=MTLStorageModePrivate;desc.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite;
|
||||
auto opaque=[_device newTextureWithDescriptor:desc],converted=[_device newTextureWithDescriptor:desc];if(!opaque||!converted)throw std::runtime_error("无法分配颜色转换图像");uint64_t actual=input.allocatedSize+output.allocatedSize+opaque.allocatedSize+converted.allocatedSize;
|
||||
if(actual>bytes||2*uint64_t(input.width)*input.height*16>bytes-actual)throw std::runtime_error("颜色转换实际纹理及估算系统工作区超过预算");
|
||||
auto dispatch=[&](id<MTLCommandBuffer>command,id<MTLComputePipelineState>pipeline,NSArray*textures){
|
||||
check(cancelled);
|
||||
auto encoder=[command computeCommandEncoder];if(!encoder)throw std::runtime_error("无法建立颜色转换编码器");
|
||||
[encoder setComputePipelineState:pipeline];
|
||||
for(NSUInteger i=0;i<textures.count;i++)[encoder setTexture:textures[i] atIndex:i];
|
||||
uint32_t parameters[2]={alpha==dycm::Alpha::Premultiplied,uint32_t(_profile.decodeHLG)};
|
||||
[encoder setBytes:parameters length:sizeof(parameters) atIndex:0];
|
||||
NSUInteger x=pipeline.threadExecutionWidth,y=std::min(NSUInteger(8),pipeline.maxTotalThreadsPerThreadgroup/x);
|
||||
[encoder dispatchThreads:MTLSizeMake(input.width,input.height,1) threadsPerThreadgroup:MTLSizeMake(x,y,1)];
|
||||
[encoder endEncoding];
|
||||
};
|
||||
auto command=[_queue commandBuffer];
|
||||
dispatch(command,_prepare,@[input,opaque]);
|
||||
// Keep cancellation checkpoints for callers that supply a cancellation flag.
|
||||
if(cancelled){finish(command);command=nil;}
|
||||
auto image=[CIImage imageWithMTLTexture:opaque options:@{kCIImageColorSpace:(__bridge id)_profile.conversionSource,kCIImageToneMapHDRtoSDR:@NO}];
|
||||
auto destination=[[CIRenderDestination alloc]initWithMTLTexture:converted commandBuffer:command];
|
||||
configure(destination,_profile.target);
|
||||
NSError *underlying=nil;
|
||||
CIRenderTask *task=image?[_context startTaskToRender:image fromRect:CGRectMake(0,0,input.width,input.height)
|
||||
toDestination:destination atPoint:CGPointZero error:&underlying]:nil;
|
||||
if(!task){if(error)*error=underlying?:failure(@"系统颜色配置转换未开始");return NO;}
|
||||
if(cancelled){
|
||||
if(![task waitUntilCompletedAndReturnError:&underlying]){if(error)*error=underlying?:failure(@"系统颜色配置转换未完成");return NO;}
|
||||
command=[_queue commandBuffer];
|
||||
}
|
||||
dispatch(command,_restore,@[input,converted,output]);
|
||||
finish(command);
|
||||
if(!cancelled&&![task waitUntilCompletedAndReturnError:&underlying]){
|
||||
if(error)*error=underlying?:failure(@"系统颜色配置转换未完成");return NO;
|
||||
}
|
||||
return YES;
|
||||
}@catch(NSException*e){[_context clearCaches];if(error)*error=failure(e.reason?:@"显卡颜色转换异常");return NO;}}
|
||||
}catch(const std::exception&e){if(error)*error=failure(@(e.what()));return NO;}
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,11 @@
|
||||
# 固定版本的公开色彩管理依赖
|
||||
|
||||
这里保留 OpenColorIO 2.5.2 及其六个静态依赖、ARM SIMD 头文件的原始源码压缩包,供离线恢复与构建。不是已安装的依赖目录或编译产物。每个来源 URL、版本、字节数、SHA-256 和许可证见 `dependencies.lock.json`;原压缩包包含完整版权声明。
|
||||
|
||||
`python3 Tools/build_ocio.py` 在产品固定缓存的 `cms-runtime` 中编译 Release arm64/macOS 14.6,使用私有命名空间 `DayuOCIO_2_5_2`,不链接 Homebrew 动态库,不在构建时下载源码。需要 Xcode 和 CMake 3.24 以上(本机为 4.4.4)。缓存修改有两处:下载入口改为已校验的本地源码包;禁用 `OCIO_OPTIMIZATION_FLAGS` 环境覆盖,防止宿主环境悄悄改变工程精度。上游转换算法保持原样。构建有进程锁,所有实际静态库均校验后才复用。
|
||||
|
||||
固定 Studio 配置 `studio-config-v2.2.0_aces-v1.3_ocio-v2.4`,不使用随升级漂移的 `studio-config-latest`。OCIO 软件版本、配置版本和 ACES 系统版本是三个独立标识。完整输出使用 DisplayViewTransform;显示编码转换不能替代 ACES 输出渲染。
|
||||
|
||||
大鱼的 ACEScc 边界使用 [Academy 公开公式](https://docs.acescentral.com/encodings/acescc/) 与 AP1 线性衔接,避免此配置 ACEScc 的 4096 点查表近似。ACEScct 和相机/显示转换仍用固定 OCIO 配置。CPU/GPU选择 `OPTIMIZATION_LOSSLESS`,输出域和透明度政策由独立模块验证。
|
||||
|
||||
当前为独立模块准备,尚未接入产品渲染、工程归档或界面。正式33及旧工程不受影响。后续集成时须将这些许可证装入发行 APP,并验证 CPU/Metal、透明度、旧工程旁路以及宿主输入/输出边界。
|
||||
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"version": 1,
|
||||
"namespace": "DayuOCIO_2_5_2",
|
||||
"builtin_config": "studio-config-v2.2.0_aces-v1.3_ocio-v2.4",
|
||||
"sources": [
|
||||
{
|
||||
"name": "OpenColorIO",
|
||||
"version": "2.5.2",
|
||||
"url": "https://codeload.github.com/AcademySoftwareFoundation/OpenColorIO/tar.gz/refs/tags/v2.5.2",
|
||||
"archive": "OpenColorIO-2.5.2.tar.gz",
|
||||
"bytes": 14182890,
|
||||
"sha256": "722601e01b78b7a12da4829cb450674935f404b0e508f3f20046fa77570e3272",
|
||||
"licenses": [
|
||||
"licenses/OpenColorIO.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "expat",
|
||||
"version": "2.7.2",
|
||||
"url": "https://codeload.github.com/libexpat/libexpat/tar.gz/R_2_7_2",
|
||||
"archive": "expat-2.7.2.tar.gz",
|
||||
"bytes": 8439887,
|
||||
"sha256": "d09e2dd23398805cec1bac2860304714c96dc2fde629a7a1a77d0880ab7cd242",
|
||||
"licenses": [
|
||||
"licenses/expat.txt",
|
||||
"licenses/expat-1.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "yaml-cpp",
|
||||
"version": "0.8.0",
|
||||
"url": "https://codeload.github.com/jbeder/yaml-cpp/tar.gz/0.8.0",
|
||||
"archive": "yaml-cpp-0.8.0.tar.gz",
|
||||
"bytes": 1017151,
|
||||
"sha256": "fbe74bbdcee21d656715688706da3c8becfd946d92cd44705cc6098bb23b3a16",
|
||||
"licenses": [
|
||||
"licenses/yaml-cpp.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Imath",
|
||||
"version": "3.2.1",
|
||||
"url": "https://codeload.github.com/AcademySoftwareFoundation/Imath/tar.gz/v3.2.1",
|
||||
"archive": "Imath-3.2.1.tar.gz",
|
||||
"bytes": 689041,
|
||||
"sha256": "b2c8a44c3e4695b74e9644c76f5f5480767355c6f98cde58ba0e82b4ad8c63ce",
|
||||
"licenses": [
|
||||
"licenses/Imath.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "pystring",
|
||||
"version": "1.1.4",
|
||||
"url": "https://codeload.github.com/imageworks/pystring/tar.gz/v1.1.4",
|
||||
"archive": "pystring-1.1.4.tar.gz",
|
||||
"bytes": 19184,
|
||||
"sha256": "49da0fe2a049340d3c45cce530df63a2278af936003642330287b68cefd788fb",
|
||||
"licenses": [
|
||||
"licenses/pystring.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "minizip-ng",
|
||||
"version": "4.0.10",
|
||||
"url": "https://codeload.github.com/zlib-ng/minizip-ng/tar.gz/4.0.10",
|
||||
"archive": "minizip-ng-4.0.10.tar.gz",
|
||||
"bytes": 773269,
|
||||
"sha256": "c362e35ee973fa7be58cc5e38a4a6c23cc8f7e652555daf4f115a9eb2d3a6be7",
|
||||
"licenses": [
|
||||
"licenses/minizip-ng.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "zlib",
|
||||
"version": "1.3.1",
|
||||
"url": "https://codeload.github.com/madler/zlib/tar.gz/v1.3.1",
|
||||
"archive": "zlib-1.3.1.tar.gz",
|
||||
"bytes": 1572744,
|
||||
"sha256": "17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c",
|
||||
"licenses": [
|
||||
"licenses/zlib.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "sse2neon",
|
||||
"version": "227cc413fb2d50b2a10073087be96b59d5364aea",
|
||||
"url": "https://codeload.github.com/DLTcollab/sse2neon/tar.gz/227cc413fb2d50b2a10073087be96b59d5364aea",
|
||||
"archive": "sse2neon-227cc413fb2d50b2a10073087be96b59d5364aea.tar.gz",
|
||||
"bytes": 136342,
|
||||
"sha256": "3427a495743bb6fd1b5f9f806b80f57d67b1ac7ccf39a5f44aedd487fd7e6da1",
|
||||
"licenses": [
|
||||
"licenses/sse2neon.txt"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
Copyright 2013 Colour Developers
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
@@ -0,0 +1,11 @@
|
||||
Copyright Contributors to the OpenEXR Project. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,26 @@
|
||||
Copyright Contributors to the OpenColorIO Project.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,21 @@
|
||||
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
|
||||
Copyright (c) 2001-2025 Expat maintainers
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,21 @@
|
||||
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
|
||||
Copyright (c) 2001-2025 Expat maintainers
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,17 @@
|
||||
Condition of use and distribution are the same as zlib:
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgement in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
@@ -0,0 +1,27 @@
|
||||
Copyright (c) 2008-present Contributors to the Pystring project.
|
||||
All Rights Reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2015-2024 SSE2NEON Contributors
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2008-2015 Jesse Beder.
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,22 @@
|
||||
Copyright notice:
|
||||
|
||||
(C) 1995-2022 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Jean-loup Gailly Mark Adler
|
||||
jloup@gzip.org madler@alumni.caltech.edu
|
||||
二进制文件未显示。
二进制文件未显示。
二进制文件未显示。
二进制文件未显示。
二进制文件未显示。
二进制
二进制文件未显示。
二进制文件未显示。
二进制文件未显示。
@@ -0,0 +1,98 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Build the pinned color runtime offline; no Homebrew libraries or implicit downloads."""
|
||||
from pathlib import Path
|
||||
import fcntl, hashlib, json, os, re, shutil, subprocess, tarfile
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
VENDOR = ROOT / 'ThirdParty/ColorManagement'
|
||||
CACHE = Path('/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/cms-runtime')
|
||||
|
||||
def digest(path):
|
||||
return hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
|
||||
def extract(archive, destination):
|
||||
with tarfile.open(archive) as tf:
|
||||
for member in tf.getmembers():
|
||||
path = (destination / member.name).resolve()
|
||||
if destination not in path.parents or member.isdev():
|
||||
raise ValueError('Unsafe source archive member')
|
||||
if member.issym() or member.islnk():
|
||||
target = ((path.parent if member.issym() else destination) / member.linkname).resolve()
|
||||
if target != destination and destination not in target.parents:
|
||||
raise ValueError('Unsafe source archive link')
|
||||
# Python 3.9 on the supported build machine has no extraction filter API.
|
||||
tf.extractall(destination)
|
||||
|
||||
def _build():
|
||||
lock = json.loads((VENDOR / 'dependencies.lock.json').read_text())
|
||||
archives = {}
|
||||
for item in lock['sources']:
|
||||
archive = VENDOR / 'sources' / item['archive']
|
||||
if archive.stat().st_size != item['bytes'] or digest(archive) != item['sha256']:
|
||||
raise ValueError('Source checksum mismatch: ' + item['name'])
|
||||
archives[item['name']] = (archive, item['sha256'])
|
||||
cmake = shutil.which('cmake') or '/opt/homebrew/bin/cmake'
|
||||
compiler = subprocess.check_output(['xcrun', 'clang++', '--version'], text=True)
|
||||
sdk = subprocess.check_output(['xcrun', '--show-sdk-version'], text=True).strip()
|
||||
identity = hashlib.sha256((json.dumps(lock, sort_keys=True) + Path(__file__).read_text() + compiler + sdk).encode()).hexdigest()
|
||||
CACHE.mkdir(parents=True, exist_ok=True)
|
||||
stamp = CACHE / 'build.json'
|
||||
if stamp.exists():
|
||||
previous = json.loads(stamp.read_text())
|
||||
if previous.get('identity') == identity and all(Path(p).is_file() and digest(Path(p)) == sha for p, sha in previous['libraries'].items()):
|
||||
return previous
|
||||
source_dir, build_dir, install = CACHE / 'source', CACHE / 'build', CACHE / 'install'
|
||||
# These are dedicated generated directories; no product APP or user source lives here.
|
||||
for path in (source_dir, build_dir, install):
|
||||
if path.exists(): shutil.rmtree(path)
|
||||
path.mkdir()
|
||||
extract(archives['OpenColorIO'][0], source_dir)
|
||||
source = source_dir / 'OpenColorIO-2.5.2'
|
||||
modules = source / 'share/cmake/modules/install'
|
||||
# Keep upstream's dependency options and target wiring, replacing only network retrieval.
|
||||
for name, (archive, sha) in archives.items():
|
||||
if name == 'OpenColorIO': continue
|
||||
filename = modules / ('Install' + ('ZLIB' if name == 'zlib' else name) + '.cmake')
|
||||
text = filename.read_text()
|
||||
text, count = re.subn(r'(?m)^\s*GIT_REPOSITORY[^\n]*\n\s*GIT_TAG[^\n]*',
|
||||
'\n URL "' + str(archive) + '"\n URL_HASH SHA256=' + sha + '\n DOWNLOAD_EXTRACT_TIMESTAMP TRUE', text)
|
||||
if count != 1: raise ValueError('Upstream install recipe changed: ' + name)
|
||||
text = re.sub(r'(?m)^\s*GIT_(CONFIG|SHALLOW)[^\n]*\n', '', text)
|
||||
filename.write_text(text)
|
||||
# This is a private, versioned runtime. A host's OCIO_OPTIMIZATION_FLAGS
|
||||
# must not silently override the precision explicitly chosen by the product.
|
||||
processor = source / 'src/OpenColorIO/Processor.cpp'
|
||||
text = processor.read_text()
|
||||
text, count = re.subn(r'OptimizationFlags EnvironmentOverride\(OptimizationFlags oFlags\)\n\{.*?\n\}',
|
||||
'OptimizationFlags EnvironmentOverride(OptimizationFlags oFlags)\n{\n return oFlags; // Dayu: fixed per-processor precision; ignore process environment.\n}', text, flags=re.S)
|
||||
if count != 1: raise ValueError('Upstream optimization override changed')
|
||||
processor.write_text(text)
|
||||
flags = ['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_OSX_ARCHITECTURES=arm64',
|
||||
'-DCMAKE_OSX_DEPLOYMENT_TARGET=14.6', '-DBUILD_SHARED_LIBS=OFF',
|
||||
'-DCMAKE_INSTALL_PREFIX=' + str(install), '-DCMAKE_INSTALL_LIBDIR=lib',
|
||||
'-DOCIO_NAMESPACE=' + lock['namespace'], '-DOCIO_INSTALL_EXT_PACKAGES=ALL',
|
||||
'-DOCIO_BUILD_APPS=OFF', '-DOCIO_BUILD_PYTHON=OFF', '-DOCIO_BUILD_TESTS=OFF',
|
||||
'-DOCIO_BUILD_GPU_TESTS=OFF', '-DOCIO_BUILD_DOCS=OFF', '-DOCIO_BUILD_JAVA=OFF',
|
||||
'-DOCIO_BUILD_NUKE=OFF', '-DOCIO_BUILD_OPENFX=OFF']
|
||||
environment = dict(os.environ, CMAKE_BUILD_PARALLEL_LEVEL='6')
|
||||
for args in ([cmake, '-S', source, '-B', build_dir] + flags,
|
||||
[cmake, '--build', build_dir, '--parallel', '6'],
|
||||
[cmake, '--install', build_dir]):
|
||||
subprocess.run([str(x) for x in args], check=True, env=environment)
|
||||
libraries = [install / 'lib/libOpenColorIO.a'] + sorted((build_dir / 'ext/dist/lib').glob('*.a'))
|
||||
if len(libraries) != 7 or not all(p.is_file() for p in libraries):
|
||||
raise ValueError('Expected OCIO and six pinned static dependencies')
|
||||
result = dict(identity=identity, compiler=compiler, sdk=sdk, namespace=lock['namespace'],
|
||||
include=str(install / 'include'), libraries={str(p): digest(p) for p in libraries},
|
||||
builtin_config=lock['builtin_config'])
|
||||
stamp.write_text(json.dumps(result, indent=2) + '\n')
|
||||
return result
|
||||
|
||||
def build():
|
||||
CACHE.mkdir(parents=True, exist_ok=True)
|
||||
with (CACHE / 'build.lock').open('a') as guard:
|
||||
fcntl.flock(guard, fcntl.LOCK_EX)
|
||||
return _build()
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(json.dumps(build(), indent=2))
|
||||
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Build the pinned, ARC-isolated CMS bridge and a deterministic Xcode link file."""
|
||||
from pathlib import Path
|
||||
import hashlib, json, os, subprocess, sys, fcntl, shutil
|
||||
ROOT=Path(__file__).resolve().parent
|
||||
sys.path.insert(0,str(ROOT/'Tools'))
|
||||
from build_ocio import build
|
||||
CACHE=Path('/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/cms-runtime')
|
||||
def prepare():
|
||||
runtime=build();work=CACHE/'bridge';work.mkdir(parents=True,exist_ok=True)
|
||||
with (work/'build.lock').open('a') as guard:
|
||||
fcntl.flock(guard,fcntl.LOCK_EX)
|
||||
sources=[p for p in sorted((ROOT/'Sources').glob('*.cpp'))+sorted((ROOT/'Sources').glob('*.mm')) if not p.name.startswith('._')]
|
||||
inputs=sources+[p for p in sorted((ROOT/'Sources').glob('*.h'))+sorted((ROOT/'Core').glob('*.h*')) if not p.name.startswith('._')]+[Path(__file__)]
|
||||
key=hashlib.sha256((json.dumps(runtime,sort_keys=True)+''.join(hashlib.sha256(p.read_bytes()).hexdigest() for p in inputs)).encode()).hexdigest()
|
||||
stamp=work/'build.json';library=work/'libDayuColorManagement.a'
|
||||
if not stamp.exists() or json.loads(stamp.read_text()).get('key')!=key or not library.exists():
|
||||
objects=[]
|
||||
for src in sources:
|
||||
obj=work/(src.stem+'.o');args=['xcrun','clang++','-std=c++20','-O2','-arch','arm64','-mmacosx-version-min=14.6','-I',runtime['include'],'-c',str(src),'-o',str(obj)]
|
||||
if src.suffix=='.mm':args.insert(2,'-fobjc-arc')
|
||||
subprocess.run(args,check=True);objects.append(str(obj))
|
||||
subprocess.run(['xcrun','libtool','-static','-o',str(library),*objects],check=True)
|
||||
stamp.write_text(json.dumps(dict(key=key,librarySHA256=hashlib.sha256(library.read_bytes()).hexdigest()),indent=2)+'\n')
|
||||
frameworks=['Metal','CoreGraphics','CoreImage','ColorSync','IOKit']
|
||||
args=['-Wl,-ObjC',str(library),*runtime['libraries']]
|
||||
for name in frameworks:args+=['-framework',name]
|
||||
response=CACHE/'bridge-link.rsp';response.write_text('\n'.join('"'+s.replace('"','\\"')+'"' for s in args)+'\n')
|
||||
return str(response)
|
||||
if __name__=='__main__':
|
||||
print(prepare())
|
||||
if len(sys.argv)>1:
|
||||
destination=Path(sys.argv[1])/'ColorManagement';destination.mkdir(parents=True,exist_ok=True)
|
||||
source=ROOT/'ThirdParty/ColorManagement'
|
||||
shutil.copytree(source/'licenses',destination/'licenses',dirs_exist_ok=True,ignore=shutil.ignore_patterns('._*'))
|
||||
for name in ['dependencies.lock.json','README.md']:shutil.copy2(source/name,destination/name)
|
||||
shutil.copy2(ROOT/'PROVENANCE.json',destination/'PROVENANCE.json')
|
||||
@@ -0,0 +1,17 @@
|
||||
大鱼调色 1.10.0(72)|紧急 UI 更新
|
||||
|
||||
- 画布工具改为纵向排列,可打开、移动、折叠或关闭多个工具面板。
|
||||
- 曲线支持直接拖点及 RGB 通道切换,颜色分级提供四个画布色轮;保留精确参数视图。
|
||||
- 新增画布外辅助工作区,集中查看当前效果输出的亮度波形、RGB 分列、直方图与风格1 LUT 预览。
|
||||
- 曲线双轴与色轮参数在一次手势内共同提交并撤销;播放头、图层或颜色管理改变时中止过期写入。
|
||||
|
||||
695 项正式安装原生检查通过。Final Cut Pro 12.4 中的曲线拖点与一次撤销、LUT 预览、移动播放头后的示波器更新已通过实际鼠标验证。自绘示波器为 sRGB 显示参考,宿主分块输出时标注当前分块,不代替 HDR / IRE 精密测量。
|
||||
|
||||
支持 Apple Silicon,macOS 14.6 及以上。APP 与 PKG 已通过 Developer ID 签名、Apple 公证和票据验证。固定安装位置:/Library/Plug-Ins/FxPlug/大鱼调色.app。本次正式 APP 独立安装并验收,PKG 完成20项展开验包,未重复执行系统安装脚本。
|
||||
|
||||
安装包:大鱼调色-1.10.0.pkg
|
||||
大小:43090565 字节
|
||||
SHA-256:ee70461c9b2d2e0ddd78cbcb3371c3b1b36b7f0e5fc69bfccc7ac0f1a3e468d8
|
||||
实际编译源码:80dec904bedf5f704b29d16325fa95d639f3a250
|
||||
|
||||
资源文章已先行更新:https://dayu.media/15792/ 。使用新的紧急UI更新封面及用户提供的深色/浅色实际截图,主安装包更新为本版;50元、有效会员免费及其它商业设置保持。
|
||||
@@ -0,0 +1,13 @@
|
||||
# 大鱼调色 1.11.0(73)
|
||||
|
||||
曲线、HSL 与蜘蛛盘现可在画布中直接编辑。曲线包含同区直方图,三个工具支持半透明面板、多面板移动、独立图层及一次拖动一次撤销。
|
||||
|
||||
主检查器默认保留一级、基础、蜘蛛、HSL 四张折叠卡;其它工具通过添加模块或画布工具条打开。新增当前帧人脸肤色限定及实际保护区域预览,并加入缩放、光学中心和蒙版可调的镜头径向畸变修复。旧调色参数 ID、已有图层及预设 v7 继续兼容。
|
||||
|
||||
需要 macOS 14.6 或更高、Apple Silicon Mac、Final Cut Pro 或 Motion。肤色范围在本机检测;未识别到人脸时不使用上一镜头蒙版。镜头修复由本项目独立实现,尚无与参考插件逐像素一致的证明。包含空间处理的调色可保存完整预设,静态 Cube 无法保存空间选区或几何变换。
|
||||
|
||||
APP 实际编译源码:49d35cb49ab93f5ab6ca3411eaea80f7219be346。APP 公证 Accepted、票据及 Gatekeeper 通过,正式安装 724 项原生检查通过。
|
||||
|
||||
PKG 已签名、公证 Accepted、粘附票据并通过 20 项展开验包。43,128,845 字节,SHA-256:2dd5166902ebdaae50dd897057459cbe7e5ea611dbdeb571bd688e843c59768e。
|
||||
|
||||
Final Cut Pro 12.4 已加载唯一正式安装版本;用户实鼠确认画布三工具及一次撤销、人脸肤色区域、畸变网格调整三项均正常。旧版恢复 APP 已在验收后清理。
|
||||
@@ -0,0 +1,11 @@
|
||||
# 大鱼调色 1.12.0(79)
|
||||
|
||||
统一工作区采用横排图标工具、左侧图层、中间所选模块和右侧常驻四宫格示波器。分栏与窗口尺寸可调整,模块新增、删除、启停、参数和共享蒙版与主检视器同步。HSL色块上排、三轴同宽;蜘蛛盘左盘面、右参数和混合量。矢量图新增肤色参考线。
|
||||
|
||||
LUT浏览器保留现有文件夹、真实帧预览、缩略图和异步载入,恢复随宽度换行的多行网格。风格LUT调整参数下增加最近使用缩略图快捷入口,点击应用到当前图层,成功后记录前移。选择LUT图层直接浏览,点击图层蒙版符号进入编辑/跟踪。
|
||||
|
||||
画布图标按钮移到左下横排,保留矩形、椭圆、钢笔、曲线、畸变、肤色范围和LUT入口;控制面板按钮在右下。畸变通过画面控件调整,从工作区排除。修复片尾界面时间与显示帧时间差导致的示波器等待和画布写入被拒,钢笔闭合与曲线保存已由用户实际确认正常。
|
||||
|
||||
同一蒙版对象可同时关联HSL、蜘蛛盘及其它模块,支持先画再分配,或从模块画后继续添加关联;轨迹和形状共同更新,旧独立蒙版及v7预设兼容。跟踪按本机ColorFinale2.16.2证据重建,使用锁定官方源码构建的OpenCV4.5.1,许可证随APP提供。真实同素材、同矩形共同99帧最大位置差约0.008源像素、角度差约0.015°;原版导出缺最后一帧,完整100帧报告保留缺失。当前对照覆盖合成平移,不宣称任意素材/分组/键间插值完全等价。
|
||||
|
||||
正式安装通过834项原生检查,并完成FCP中的布局、快捷LUT应用、检视器重开和四路示波器检查。需要macOS14.6或更高、Apple Silicon、Final Cut Pro或Motion。工作区由宿主托管为可调整浮动窗口,公开FxPlug接口未提供原生停靠到FCP检视器。空间蒙版/畸变可用完整预设保存,静态Cube无法保存空间处理。
|
||||
@@ -0,0 +1,14 @@
|
||||
大鱼调色 1.18.0(105)增强公测故障诊断,主 APP 注册成功及关闭窗口后继续在后台运行,菜单栏可重新打开、发送摘要或退出。
|
||||
|
||||
- 崩溃摘要记录故障发生时的实际版本、异常终止类别、镜像 UUID 和地址偏移,排除开发自检报告。
|
||||
- 卡顿时限频采集本产品调用栈摘要,按分钟汇总渲染、状态构建、检视器刷新和跟踪耗时,以及内存、CPU 和线程数。正常菜单与模态事件循环继续响应探针。
|
||||
- 沿用可关闭的公测诊断开关及 30 天保留,不上传素材、LUT、预设、账号或原始系统诊断文件。
|
||||
- 安装器增加常驻主 APP 的正常退出检查,更新后启动正式版本。
|
||||
|
||||
云端历史报告中,外部 1.10.0 的通知回调崩溃对应 1.11.0 起已有的修复;历史卡顿与 dyld 报告信息不足,本版本用于补足现场证据,不宣称已解决全部用户闪退或卡顿。
|
||||
|
||||
实际编译提交:`d0187695581fa3a8fe5c3cfa8a1bc6337425f5f6`。APP 与 PKG 均使用 Developer ID 签名、Apple 公证及票据验证;系统要求 macOS 14.6+,Apple Silicon。安装前保存工作,按系统提示正常退出宿主和主 APP。
|
||||
|
||||
安装包与符号附件的 SHA-256、签名、公证和实际宿主验收范围见本标签下 verification/Package.json、verification/Symbols1.18.0.json 与 verification/Diagnostics1.18.0.json。
|
||||
|
||||
安装包:大鱼调色-1.18.0.pkg(46620783 字节),SHA-256:`4a52742a393ecaaa30f758d72c9e0ba68c606ed8e805316d48b9868068378a3f`。
|
||||
@@ -0,0 +1,16 @@
|
||||
大鱼调色 1.22.0(131)增加在线 LUT 库。
|
||||
|
||||
- 主 APP 启动时使用 macOS 硬件 UUID 识别已绑定的大鱼账号,支持免扫码恢复;未绑定机器支持微信登录。提供刷新权限和退出登录,退出后不会立即自动重新登录。购买过文章 14421、15792 中任意一个,或当前为有效会员,即可使用全部已发布在线 LUT。
|
||||
- 插件 LUT 浏览器增加在线来源、分类、分页和搜索。点击 LUT 后下载并检查文件大小、SHA-256 和 Cube 内容,保存到本地库后应用;相同文件重复下载复用已有副本。
|
||||
- 点击“预览当前帧”会将当前时间线帧的 PNG 缩略图发送到 dayu.media,在服务器应用相应 LUT 并返回效果预览。最长边不超过 640 像素;不上传原始视频、文件路径或项目名称。服务器在请求内存中处理,不保存预览帧。移动播放头不会自动上传新帧,需要再次点击更新。
|
||||
- 在线预览为 8-bit 显示参考;实际调色仍使用下载后的本地 LUT 和原有浮点渲染流程。本地 LUT 导入与调色继续可离线使用。
|
||||
|
||||
适用于 Apple Silicon,macOS 14.6 或更高版本,Final Cut Pro / Motion。安装前请保存工作并正常退出 FCP、Motion 和大鱼调色主 APP。安装后打开主 APP 自动识别本机已绑定账号;未绑定时完成微信登录,再在插件 LUT 浏览器切换“在线 LUT”。
|
||||
|
||||
正式签名、公证、安装、宿主验收与安装包校验结果见本版本交付记录。
|
||||
|
||||
实际 APP 编译提交:`d979f8958caf36cc7b97ea838960c69f7fbb4d91`。APP 与安装包均完成 Developer ID 签名、Apple 公证和票据验证;FCP 12.4 合成时间线已验证硬件账号恢复、云端预览和下载应用。新机未绑定时的首次微信 OAuth 扫码及 Motion 宿主未实测。
|
||||
|
||||
安装包:`大鱼调色-1.22.0.pkg`,44557321 字节。
|
||||
|
||||
SHA-256:`82bfe89889bd7e09ba68d85c0a52f36bb291de4cfe98c509fb6df8d40d9dd2dd`。
|
||||
@@ -0,0 +1,11 @@
|
||||
# 大鱼调色 1.7.4(52)
|
||||
|
||||
每个模块和新增图层标题增加减号,可删除不需要的层。删除同时还原参数、清除已有关键帧及所属LUT、蒙版等设置,避免界面隐藏后继续影响画面;其它模块和后续层保留。一组宿主撤销即可恢复。顶部“添加模块”从初始参数创建新层,不继承旧值;原有“再加一层”保留,删除状态随工程和完整预设保存。
|
||||
|
||||
436项正式原生检查通过,覆盖14类模块、资源归属、关键帧清理、独立层和实际渲染/Cube导出。本机FCP12.4/macOS27.0.1验证删除、一次撤销、重做、重新添加、独立层删除和正常退出冷重开;用户手动确认删除已验证。中间构建51自动化时曾出现远程检查器空白,52延后界面无障碍通知后同一路径复验通过;未将该现象等同于已证明所有宿主问题。保留Cube文字行兼容和“更多空间”窗口修正。
|
||||
|
||||
要求Apple Silicon、macOS14.6或更新,唯一安装位置`/Library/Plug-Ins/FxPlug/大鱼调色.app`。
|
||||
|
||||
实际编译源码`06a00371dfba6d9857dc75f48121232fb0ea01b8`。APP公证`673758ed-55f7-418d-8094-d05cf4932111`、PKG公证`102e93fc-2214-4dbf-8d67-68412464a5c2`均Accepted;签名、票据、Gatekeeper及20项展开验包通过。本轮APP独立正式安装并验收,未再次运行PKG安装脚本。
|
||||
|
||||
包名`大鱼调色-1.7.4.pkg`,40918925字节,SHA-256`bab2cb14229de151f73782e4a9bd54ca34ef47b9dd15ef3590dd1cd95d04fce5`。
|
||||
@@ -0,0 +1,18 @@
|
||||
大鱼调色 1.8.0(55)公测版,适用于 Apple Silicon / macOS 14.6 或更高版本。
|
||||
|
||||
新增独立色彩管理方式:旧版兼容、跟随 FCP、相机编码 → ACES、输入 LUT → ACES。新版采用固定 OpenColorIO 2.5.2 / ACES 1.3 配置,一级层统一在 ACEScct/AP1 中处理,印片位于输出之前;明确区分实际宿主颜色配置与手动声明的相机编码。
|
||||
|
||||
新增一级层默认关闭额外映射,添加中性层保持画面。旧工程和 v1–v6 预设继续原有渲染,升级不会自动替换其管理方式;新版完整预设为 v7。输入 LUT 使用浮点四面体插值,并显示已选文件名。新版静态 Cube 为 65³,输出约定为 sRGB/Rec.709;HDR、空间/时间处理请保存完整预设。
|
||||
|
||||
PQ/HLG 输出或跟随 Rec.2020 宿主暂仅开放一级调色与印片;活跃 SDR 修饰工具会明确报错。旧工具尚未全部改写为 HDR/场景算法。
|
||||
|
||||
安装前保存工程并正常退出 Final Cut Pro 与 Motion。安装到唯一位置 /Library/Plug-Ins/FxPlug/大鱼调色.app,模板安装到当前用户“影片/Motion Templates/Effects/大鱼调色”。重新打开宿主后,在调色参数顶部选择管理方式。
|
||||
|
||||
验证:530 项正式原生检查、FCP 12.4 管理切换/撤销、输入 LUT 取消及错误恢复、两份预设冷重开逐字节比对、65³ Cube、1080p25 ProRes 100 帧导出通过。FCPXML 1.12 回导的三个项目与输入结构比较一致。
|
||||
|
||||
APP 与 PKG 均经 Developer ID 签名、Apple 公证 Accepted、票据粘附与验证。PKG 20 项展开验包通过;本轮未重复运行系统安装脚本,APP 已在正式路径单独安装并完成宿主验收。
|
||||
|
||||
安装包:大鱼调色-1.8.0.pkg
|
||||
字节数:42851034
|
||||
SHA-256:fd59203d387122e768090a97851daf3bd7c07193a8073b9497a10c05d5fd6c42
|
||||
实际编译源码:11a88518280f0665f3cd0f388d1d66e5446ece14
|
||||
@@ -0,0 +1,16 @@
|
||||
大鱼调色 1.8.1(57)公测
|
||||
|
||||
修正 1.8.0 固定 ACEScct 接管一级 CST 的设计,恢复输入、工作曲线/色域与输出设置。主输出移至所有一级层及印片之后;新增一级层继承工作空间,默认关闭额外映射。局部 CST、线性混合、负值和超白保留经过回归;线性工作曲线增加明确的 DI 适配。
|
||||
|
||||
在参数顶部明确选择“一级 CST · 延后输出(推荐)”启用。模板与注册缺省、已保存的 nil/v2 状态保持原流程,避免 FCP 把新缺省应用到旧实例。65³ Cube 按一级声明的输入、输出编码导出,所选 Gamma/Log 不再统一写成 sRGB。
|
||||
|
||||
旧工具仍作为输出后的 SDR 修饰;Log/线性码值输出不运行活跃的 SDR 修饰。上游 FCP 已还原或裁切的数据不能由插件恢复,请核对相机 LUT 与颜色符合。受控 Log 码值载体不等于所有相机文件的上游路由认证。
|
||||
|
||||
581 项原生检查通过,包括独立曝光/高光参考、负值/超白、局部 CST、线性混合、印片域和 Cube 输出曲线。
|
||||
|
||||
正式签名、公证、宿主验收与包校验以 verification/Delivery.json、HostPrimaryCST1.8.1.json、Package.json 和 Release.json 为准。安装包已通过20项展开验包;本轮未重新执行系统安装脚本,APP已在正式位置独立安装和宿主验收。
|
||||
|
||||
安装包:大鱼调色-1.8.1.pkg
|
||||
字节数:42999475
|
||||
SHA-256:f94aa3a21ffbe52bc68b482289b71112d9895161e18f983af918d11547d254cd
|
||||
实际编译源码:059245858035e74f78bd669ef25913408d07d235
|
||||
@@ -0,0 +1,16 @@
|
||||
大鱼调色 1.8.2(59)公测
|
||||
|
||||
高级色彩管理移入顶部“颜色设置”按钮,默认收起。关闭后不留空白,调色模块直接上移;展开/收起不改参数、不增加撤销项。详细说明移入工具提示。
|
||||
|
||||
新增默认黑金渐变主题:黑色与深炭色渐变背景、亮金文字、柔和静态光晕及金色细边。保留五种原有配色及其编号;明确保存的主题偏好保留,可随时切换到黑金。系统增加对比度或减少透明度时去掉文字光晕。
|
||||
|
||||
默认继续原有色彩流程;已保存的 nil/v2/v3 工程及完整预设保持原处理。相机 Log、工作空间和输出转换逻辑沿用 1.8.1 修正,没有更改渲染算法或模板默认。
|
||||
|
||||
本版验证与正式签名、公证、宿主和安装包结果见 verification/Delivery.json、HostCompactUI1.8.2.json、InstalledSelfTest.json、Package.json 和 Release.json。本轮独立替换正式 APP 并验收,PKG 展开验包,不重复执行系统安装脚本。
|
||||
|
||||
595 项原生检查、FCP 中六主题切换/设置反复开关、nil 原流程保持和 v3 完整预设重开逐字节一致通过。独立远程源码重建通过同样595项检查;8个依赖源包按锁定摘要验证,复用已验证的静态运行时缓存。
|
||||
|
||||
安装包:大鱼调色-1.8.2.pkg
|
||||
字节数:43006067
|
||||
SHA-256:cbabffc620ad851bd8ecddfaf797c46689722d0f772be409aaa29d0841a2eded
|
||||
实际编译源码:da03d16c7efa87a5d230467334ec73f9a3a12e54
|
||||
@@ -0,0 +1,16 @@
|
||||
大鱼调色 1.8.3(62)公测
|
||||
|
||||
新增“霓虹炫彩”主题:分模块的多色渐变:一级紫红、蜘蛛盘青蓝、基础珊瑚玫红、HSL绿青、曲线青蓝等;大面积卡片、标题及图标均跟随各模块配色。洋红到青色渐变重点按钮与滑杆,白色文字。未设置主题时默认使用炫彩;原六种主题和编号保留,可随时切换。
|
||||
|
||||
曲线编辑器新增真实分析画面的直方图叠层,显示亮度与 RGB 分布;RGB 页叠加四通道,红、绿、蓝页只显示对应通道。支持“直方图”开关,曲线控制点仍可直接添加、拖动、删除。主题、通道和叠层显示不改变调色参数或预设。
|
||||
|
||||
直方图复用 320×180 分析缓存、256 档,最多每秒2次更新,播放或移动播放头时刷新。透明与非有限像素不计,范围外值归到端点,共同峰值平方根缩放。原流程取一级 CST/输入 LUT 后,新 CMS 取显示输出转换后、SDR修饰前;它不是最终输出示波器,也不是每个独立曲线层的即时输入。工具提示可查看来源与范围。
|
||||
|
||||
色彩管理、调色数学和模板默认保持不变。系统要求 Apple Silicon、macOS14.6 或更新。唯一正式位置 /Library/Plug-Ins/FxPlug/大鱼调色.app。
|
||||
|
||||
605项正式原生检查与FCP12.4实机通过;真实视频与色块分布、四通道/显隐、冷重开与8,590字节原预设一致验证完成。APP与PKG均已正式签名、公证Accepted、粘附票据;PKG通过20项展开验包。本轮APP独立正式安装验收,未重复执行PKG安装脚本。
|
||||
|
||||
安装包:大鱼调色-1.8.3.pkg
|
||||
字节数:43010609
|
||||
SHA-256:518f54c12a6680c32be5cb4bd7d01b8a4c49e3d492a0d9d75ac5e46e3345da53
|
||||
实际编译源码:3fd015224037df944b428684c43ec8ec7accea85
|
||||
@@ -0,0 +1,14 @@
|
||||
大鱼调色 1.8.4(64)公测
|
||||
|
||||
重新收敛“霓虹炫彩”配色。移除各模块独立的红、绿、橙等高饱和色块,卡片和标题统一为接近黑色、轻微暖紫倾向的低饱和表面,图标使用统一的柔和银灰紫色。使用者认可的“保存预设”按钮继续保留原有粉紫到青色渐变,渐变强调集中在主按钮、滑杆和顶部细线。
|
||||
|
||||
在用户认可的近黑底色上,模块名称按钮以统一的轻粉青渐变、细边及更亮展开态强化显示;蒙版、删除、再加一层按钮增加低对比按钮底与清晰图标。
|
||||
|
||||
不改变现有功能、参数、色彩管理、模板或直方图算法。亮度/RGB直方图继续使用320×180分析画面、256档、最多2Hz刷新,支持单通道与显隐;仍不是最终输出或HDR示波器。
|
||||
|
||||
适用Apple Silicon,macOS14.6或更新。唯一正式安装 /Library/Plug-Ins/FxPlug/大鱼调色.app。605项正式原生检查通过;FCP12.4实际检查模块按钮展开/折叠、图层操作辨识与直方图数据,前后8,590字节预设逐字节一致。用户认可的候选63底色代码完整保留。APP与PKG均已正式签名、公证Accepted并粘附票据,PKG通过20项展开验包。本轮APP独立正式安装验收,没有重复执行PKG安装脚本。
|
||||
|
||||
包名:大鱼调色-1.8.4.pkg
|
||||
字节数:43009859
|
||||
SHA-256:59c8cee9282260ad97130b1d3d8dc6b09bdf8e8f82cb6c5937bf54ee5880e660
|
||||
实际编译源码:55b66a358cf4c52eeb6ad89acde822cb73be3137
|
||||
@@ -0,0 +1,15 @@
|
||||
大鱼调色 1.8.5(67)
|
||||
|
||||
- 只保留“浅色 / 深色”两个明确的文字切换,移除其它主题和彩色色签。
|
||||
- 浅色使用冰蓝表面、深青文字、柔和浮雕与定向反光边。
|
||||
- 深色使用中性炭黑、浅色文字、高亮细边与局部青蓝光晕。
|
||||
- 按钮、模块、数值框与滑杆采用同一套层次语言,曲线继续显示亮度与RGB直方图叠层。
|
||||
|
||||
610项正式原生检查与FCP12.4界面验收通过;外观切换前后完整调色预设保持一致。调色数学、CMS、模板与预设格式保持原合同。
|
||||
|
||||
支持Apple Silicon,macOS14.6及以上,Final Cut Pro / Motion。APP与安装包已完成Developer ID签名、Apple公证与票据验证,安装位置为/Library/Plug-Ins/FxPlug/大鱼调色.app。本轮APP独立安装验收,PKG展开验包未重复执行安装脚本。
|
||||
|
||||
安装包:大鱼调色-1.8.5.pkg
|
||||
大小:43010987字节
|
||||
SHA-256:b4540c2be931d9e042ed1a6f2673c001e4b6e0ec67eef0bc22f4b3977af4952b
|
||||
实际编译源码:d39004c26af3c0c5853111faef7e40e6c66f6aa6
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"title": "大鱼调色 1.18.0 公测版|后台自动诊断与多目标马赛克",
|
||||
"content": "<!-- wp:paragraph -->\n<p>大鱼调色是适用于 Final Cut Pro 和 Motion 的原生 FxPlug 4 调色插件。1.18.0(构建 105)公测版加入后台自动诊断,便于继续排查闪退与界面卡顿;同时保留调色、图章、蒙版跟踪和马赛克功能。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>本文主下载已更新为 1.18.0(构建 105)。该版本用于补充排查信息,目前尚未确认所有卡顿的根因,也不代表追踪速度已经改善。此前的安装完整性修复继续保留。</strong></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>官方原始安装包不加密,不限制安装数量。</strong> 安装和使用无需登录、激活码或机器码。原始 PKG 可以原样转发,请保持安装包完整。禁止二次加密或加上一机一码后分发。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.18.0 自动诊断与后台运行</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>主 App 关闭窗口后继续在后台运行。</strong> 注册完成后不再倒计时退出,可从菜单栏重新打开窗口、发送诊断摘要或主动退出。保持主 App 运行有助于持续发现本插件的崩溃报告。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>开启公测诊断后,自动收集并发送限量摘要。</strong> 内容包括本插件主 App/服务的崩溃信息、卡顿调用栈,以及界面刷新、跟踪和渲染耗时统计。离线时排队,恢复连接后重试;诊断可在主 App 中关闭,云端保留 30 天。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>诊断不上传素材、LUT、个人预设、账号或原始系统报告;不会自动上传 Final Cut Pro 本身的完整崩溃报告。如果宿主再次闪退,请记下发生时间,并提供主 App 显示的报告标识,便于对应排查。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>近期版本还加入独立调色效果、水平校正和多目标马赛克。</strong> 检视器恢复折叠与内部滚动;“全部人脸”可逐帧识别,也可将暂停画面中的人脸转为可选蒙版,再对指定目标执行跟踪。实际多人运动、遮挡和界面流畅度仍需继续验证。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.14.3 界面展示</h2>\n<!-- /wp:heading -->\n\n<!-- wp:image {\"id\":15861,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n<figure class=\"wp-block-image size-full\"><img src=\"https://dayu.media/wp-content/uploads/2026/11/1793904608-fab8ae3ea572b84.png\" alt=\"大鱼调色 1.14.3 实际界面,画布仿制图章、检视器、蜘蛛盘校色仪及示波器\" class=\"wp-image-15861\" width=\"2046\" height=\"1570\" /><figcaption class=\"wp-element-caption\">大鱼调色 1.14.3 实际界面</figcaption></figure>\n<!-- /wp:image -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.14.3 跟踪更新</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>仿制图章跟踪更稳。</strong> 取样区和覆盖区分别跟随画面移动与缩放。新版会平滑两边的轨迹,并在像素之间连续取样,减少画面跳动和边缘闪烁。已有图章可选中后重新执行一次“双向跟踪”。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>图章和蒙版都能查看跟踪进度。</strong> 开始跟踪后,控制面板右侧显示方向、已完成帧数和百分比。画面与轮廓同步更新,图章用青色标出取样区、黄色标出覆盖区。自动跟踪时播放头留在起始位置,跟踪结束后可以查看最后一帧。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>在画布右下角选择仿制图章,先点选取样中心,再拖出覆盖区。选中图章后可拖动青色十字更换取样位置。要跟踪已有图章或蒙版,可在控制面板左侧选中它,再选择正向、反向或双向跟踪。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>本机在 Final Cut Pro 12.4 的 4K 实拍副本上验证,仿制图章和矩形蒙版各完成了 190 帧双向跟踪。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">在时间线里完成调色</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>色彩管理与基础调整</strong>:支持 CST 输入、工作空间和输出转换,并提供曝光、白平衡、曲线、HSL、色轮及蜘蛛盘等调节工具。首次使用时,请在一级调色中选择与素材相符的输入曲线和色域。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>LUT 与风格管理</strong>:通过缩略图浏览、收藏和预览管理常用 LUT,支持自选 LUT 文件与文件夹。完整预设用于保存组合调节;适合静态颜色变换的处理可导出 Cube LUT,颗粒、晕光、蒙版等时间或空间效Line truncated
|
||||
"excerpt": "大鱼调色 1.18.0(105)加入后台自动诊断,主 App 关闭窗口后继续运行。开启诊断后自动发送本插件的崩溃、卡顿和耗时摘要;保留独立调色效果与多目标马赛克。官方安装包无需激活。",
|
||||
"seo": {
|
||||
"title": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色 1.18.0 公测版|后台自动诊断与多目标马赛克"
|
||||
},
|
||||
"description": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色 1.18.0 是适用于 Final Cut Pro 和 Motion 的原生调色插件。主 App 可后台运行,开启诊断后自动发送本插件的崩溃、卡顿和性能摘要,便于继续排查问题。包含 16 个独立调色效果与多目标马赛克。官方 PKG 已签名公证,无需激活。"
|
||||
},
|
||||
"keywords": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色,Final Cut Pro,Motion,FxPlug4,调色插件,仿制图章,蒙版跟踪,逐帧预览"
|
||||
}
|
||||
},
|
||||
"resource": {
|
||||
"cao_original_filename": "大鱼调色-1.18.0.pkg"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"title": "大鱼调色 1.18.1 公测版|跟踪提速与后台自动诊断",
|
||||
"content": "<!-- wp:paragraph -->\n<p>大鱼调色是适用于 Final Cut Pro 和 Motion 的原生 FxPlug 4 调色插件。1.18.1(构建 106)公测版优化蒙版与马赛克跟踪计算,减少参数面板重复刷新;保留后台自动诊断,便于继续排查闪退与界面卡顿。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>本文主下载已更新为 1.18.1(构建 106)。本版优化跟踪速度和界面刷新;转身、遮挡后的目标偏移仍需检查,尚未确认所有卡顿的根因。此前的安装完整性修复继续保留。</strong></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>官方原始安装包不加密,不限制安装数量。</strong> 安装和使用无需登录、激活码或机器码。原始 PKG 可以原样转发,请保持安装包完整。禁止二次加密或加上一机一码后分发。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.18.1 跟踪提速与界面刷新</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>跟踪使用 Metal 生成紧凑灰度数据,减少 GPU 到 CPU 的回读;特征检测集中在目标范围,并复用相邻帧的光流计算数据。参数面板减少重复读取与图层列表刷新,让操作少做重复工作。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>同一段 4K 实拍素材的 285 帧测试中,纯追踪计算由约 8.78 秒降至 1.31 秒,轨迹与旧版逐帧一致。该测试不含宿主供图、解码、预览和渲染,不代表 FCP 整体处理速度提升相同比例。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>本机正式版已完成 FCP 285 帧追踪和模块切换、参数修改还原测试。人物转身或遮挡后仍可能偏移,请检查结果并按需分段修正;本版不宣称提高追踪精度,也不宣称解决全部界面卡顿。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.18.0 自动诊断与后台运行</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>主 App 关闭窗口后继续在后台运行。</strong> 注册完成后不再倒计时退出,可从菜单栏重新打开窗口、发送诊断摘要或主动退出。保持主 App 运行有助于持续发现本插件的崩溃报告。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>开启公测诊断后,自动收集并发送限量摘要。</strong> 内容包括本插件主 App/服务的崩溃信息、卡顿调用栈,以及界面刷新、跟踪和渲染耗时统计。离线时排队,恢复连接后重试;诊断可在主 App 中关闭,云端保留 30 天。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>诊断不上传素材、LUT、个人预设、账号或原始系统报告;不会自动上传 Final Cut Pro 本身的完整崩溃报告。如果宿主再次闪退,请记下发生时间,并提供主 App 显示的报告标识,便于对应排查。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>近期版本还加入独立调色效果、水平校正和多目标马赛克。</strong> 检视器恢复折叠与内部滚动;“全部人脸”可逐帧识别,也可将暂停画面中的人脸转为可选蒙版,再对指定目标执行跟踪。实际多人运动、遮挡和界面流畅度仍需继续验证。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.14.3 界面展示</h2>\n<!-- /wp:heading -->\n\n<!-- wp:image {\"id\":15861,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n<figure class=\"wp-block-image size-full\"><img src=\"https://dayu.media/wp-content/uploads/2026/11/1793904608-fab8ae3ea572b84.png\" alt=\"大鱼调色 1.14.3 实际界面,画布仿制图章、检视器、蜘蛛盘校色仪及示波器\" class=\"wp-image-15861\" width=\"2046\" height=\"1570\" /><figcaption class=\"wp-element-caption\">大鱼调色 1.14.3 实际界面</figcaption></figure>\n<!-- /wp:image -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.14.3 跟踪更新</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>仿制图章跟踪更稳。</strong> 取样区和覆盖区分别跟随画面移动与缩放。新版会平滑两边的轨迹,并在像素之间连续取样,减少画面跳动和边缘闪烁。已有图章可选中后重新执行一次“双向跟踪”。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>图章和蒙版都能查看跟踪进度。</strong> 开始跟踪后,控制面板右侧显示方向、已完成帧数和百分比。画面与轮廓同步更新,图章用青色标出取样区、黄色标出覆盖区。自动跟踪时播放头留在起始位置,跟踪结束后可以查看最后一帧。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>在画布右下角选择仿制图章,先点选取样中心,再拖出覆盖区。选中图章后可拖动青色十字更换取样位置。要跟踪已有图章或蒙Line truncated
|
||||
"excerpt": "大鱼调色 1.18.1(106)优化蒙版与马赛克跟踪,减少参数面板重复刷新。保留可关闭的后台自动诊断与关窗常驻,支持 16 个独立调色效果。转身、遮挡后仍需检查追踪结果。",
|
||||
"seo": {
|
||||
"title": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色 1.18.1 公测版|跟踪提速与后台自动诊断"
|
||||
},
|
||||
"description": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色 1.18.1 是适用于 Final Cut Pro 和 Motion 的原生调色插件。优化蒙版与马赛克跟踪计算,减少参数面板重复刷新,保留可关闭的后台自动诊断。包含 16 个独立调色效果,官方 PKG 已签名公证,无需激活。"
|
||||
},
|
||||
"keywords": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色,Final Cut Pro,Motion,FxPlug4,调色插件,仿制图章,蒙版跟踪,逐帧预览"
|
||||
}
|
||||
},
|
||||
"resource": {
|
||||
"cao_original_filename": "大鱼调色-1.18.1.pkg"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"title": "大鱼调色 1.19.0 公测版|全 Apple Vision 跟踪与后台自动诊断",
|
||||
"content": "<!-- wp:paragraph -->\n<p>大鱼调色是适用于 Final Cut Pro 和 Motion 的原生 FxPlug 4 调色插件。1.19.0(构建 109)公测版将马赛克、普通蒙版和图章的跟踪全部切换到 Apple Vision,加入短时预测与遮挡后重新确认,继续减少界面刷新负担,并保留后台自动诊断。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>本文主下载已更新为 1.19.0(构建 109)。勾选用于局部马赛克的矩形、椭圆或钢笔蒙版后,重新运行跟踪即可使用新方案。仍需播放复核遮盖范围;此前的后台诊断和安装完整性修复继续保留。</strong></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>官方原始安装包不加密,不限制安装数量。</strong> 安装和使用无需登录、激活码或机器码。原始 PKG 可以原样转发,请保持安装包完整。禁止二次加密或加上一机一码后分发。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.19.0 全 Apple Vision 跟踪</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>马赛克蒙版改用 Apple Vision 目标跟踪。</strong>先在“局部马赛克”菜单中勾选目标蒙版,再到控制面板逐个执行正向、反向或双向跟踪。转身时保留蒙版的宽高比例,减少框过度变窄。已有轨迹不会自动改变,需要重新跟踪。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>短时丢失后尝试重新找到目标。</strong>丢失时冻结最后确认的外观,根据之前运动做最多约 0.8 秒的暂时预测;连续两次确认目标后,再用丢失前后位置补齐中间轨迹。超过范围仍未确认则停止,末尾未确认预测不保存为正常关键帧,补齐的片段会提示复核。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>本版同时修复控制面板延后布局访问已释放视图时的插件服务闪退。正式安装后通过 979 项回归检查,Final Cut Pro 实片完成 285 帧跟踪,并核对转身前后实际马赛克遮挡。不同素材仍需自行播放检查。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>跟踪预览最多每秒刷新 15 次,只显示最新画面,减少面板刷新负担。普通调色蒙版和图章统一改用 Apple Vision 局部配准,保留位置、缩放和旋转;图章取样区和覆盖区分别跟踪。APP 已移除 OpenCV 跟踪依赖。新方案已用同一段转身素材与 CSRT、VitTrack 做本机比较,并覆盖人工短遮挡、长遮挡停止、突切停止和反向跟踪;单段测试不能保证所有素材都不偏移,长时间离开画面或相似人物交叉仍需分段修正。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.18.1 跟踪提速与界面刷新</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>跟踪使用 Metal 生成紧凑灰度数据,减少 GPU 到 CPU 的回读;特征检测集中在目标范围,并复用相邻帧的光流计算数据。参数面板减少重复读取与图层列表刷新,让操作少做重复工作。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>同一段 4K 实拍素材的 285 帧测试中,纯追踪计算由约 8.78 秒降至 1.31 秒,轨迹与旧版逐帧一致。该测试不含宿主供图、解码、预览和渲染,不代表 FCP 整体处理速度提升相同比例。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>1.18.1 当时完成了 FCP 285 帧追踪和模块切换、参数修改还原测试,但旧光流方案仍有转身偏移。上述速度数据是该历史版本的独立计算测试;1.19.0 的马赛克矩形/椭圆已改用目标外观跟踪。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.18.0 自动诊断与后台运行</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>主 App 关闭窗口后继续在后台运行。</strong> 注册完成后不再倒计时退出,可从菜单栏重新打开窗口、发送诊断摘要或主动退出。保持主 App 运行有助于持续发现本插件的崩溃报告。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>开启公测诊断后,自动收集并发送限量摘要。</strong> 内容包括本插件主 App/服务的崩溃信息、卡顿调用栈,以及界面刷新、跟踪和渲染耗时统计。离线时排队,恢复连接后重试;诊断可在主 App 中关闭,云端保留 30 天。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>诊断不上传素材、LUT、个人预设、账号或原始系统报告;不会自动上传 Final Cut Pro 本身的完整崩溃报告。如果宿主再次闪退,请记下发生时间,并提供主 App 显示的报告标识,便于对应排查。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>近期版本还加入独立调色效果、水平校正和多目标马赛克。Line truncated
|
||||
"excerpt": "大鱼调色 1.19.0(109)将马赛克、普通蒙版和图章跟踪全部切换到 Apple Vision,支持短时预测与重新确认,修复面板生命周期闪退,保留可关闭的后台自动诊断。",
|
||||
"seo": {
|
||||
"title": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色 1.19.0 公测版|全 Apple Vision 跟踪与后台自动诊断"
|
||||
},
|
||||
"description": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色 1.19.0 将马赛克、普通蒙版与图章跟踪全部切换至 Apple Vision,支持短时预测与遮挡后重新确认,保留后台自动诊断和 16 个独立效果。官方 PKG 已签名公证,无需激活。"
|
||||
},
|
||||
"keywords": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色,Final Cut Pro,Motion,FxPlug4,调色插件,仿制图章,蒙版跟踪,逐帧预览"
|
||||
}
|
||||
},
|
||||
"resource": {
|
||||
"cao_original_filename": "大鱼调色-1.19.0.pkg"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"title": "大鱼调色 1.19.1 公测版|修复默认预览卡顿,含 16 个独立模块",
|
||||
"content": "<!-- wp:paragraph -->\n<p>大鱼调色是适用于 Final Cut Pro 和 Motion 的原生 FxPlug 4 调色插件。1.19.1(构建 110)公测版修复刚添加整合效果、尚未调节参数时预览严重卡顿的问题,保留 Apple Vision 跟踪和可关闭的后台自动诊断。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>本文主下载已更新为 1.19.1(构建 110)。同一个 PKG 已包含“大鱼调色”整合效果和全部 16 个独立模块效果,以及所需的完整主 App,无需另外下载安装独立模块。</strong></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>官方原始安装包不加密,不限制安装数量。</strong> 安装和使用无需登录、激活码或机器码。原始 PKG 可以原样转发,请保持安装包完整。禁止二次加密或加上一机一码后分发。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.19.1 默认预览卡顿修复</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>修复整合效果在刚添加、未调整任何参数时明显拖慢预览的问题。默认状态不再执行无效的人脸检测和整帧人脸轮廓蒙版运算;已有参数、预设及模板继续兼容。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>在本机 Apple M4 的相同人像基准中,1080p 单帧平均渲染耗时由约 324 毫秒降至 5.2 毫秒,4K 由约 1249 毫秒降至 17 毫秒。这是插件渲染器耗时,不是 Final Cut Pro 的实际播放帧率;启用人脸肤色保护后的性能仍需继续优化。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>正式版本通过 994 项检查,并在 Final Cut Pro 12.4 中重新添加整合效果复测默认播放。安装包已签名、公证,包含整合效果、16 个独立模块和对应预览图。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">新增独立模块示意</h2>\n<!-- /wp:heading -->\n\n<!-- wp:image {\"id\":15879,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n<figure class=\"wp-block-image size-full\"><img src=\"https://dayu.media/wp-content/uploads/2026/11/1793978887-775df3c76d48009.png\" alt=\"Final Cut Pro 效果浏览器中的大鱼调色独立模块,包括基础调整、曲线、HSL、肤色保护与 CST 色彩空间转换\" class=\"wp-image-15879\" width=\"1364\" height=\"748\" /><figcaption class=\"wp-element-caption\">Final Cut Pro「效果 → 大鱼调色」中的独立模块示意</figcaption></figure>\n<!-- /wp:image -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.19.0 全 Apple Vision 跟踪</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>马赛克蒙版改用 Apple Vision 目标跟踪。</strong>先在“局部马赛克”菜单中勾选目标蒙版,再到控制面板逐个执行正向、反向或双向跟踪。转身时保留蒙版的宽高比例,减少框过度变窄。已有轨迹不会自动改变,需要重新跟踪。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>短时丢失后尝试重新找到目标。</strong>丢失时冻结最后确认的外观,根据之前运动做最多约 0.8 秒的暂时预测;连续两次确认目标后,再用丢失前后位置补齐中间轨迹。超过范围仍未确认则停止,末尾未确认预测不保存为正常关键帧,补齐的片段会提示复核。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>本版同时修复控制面板延后布局访问已释放视图时的插件服务闪退。正式安装后通过 979 项回归检查,Final Cut Pro 实片完成 285 帧跟踪,并核对转身前后实际马赛克遮挡。不同素材仍需自行播放检查。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>跟踪预览最多每秒刷新 15 次,只显示最新画面,减少面板刷新负担。普通调色蒙版和图章统一改用 Apple Vision 局部配准,保留位置、缩放和旋转;图章取样区和覆盖区分别跟踪。APP 已移除 OpenCV 跟踪依赖。新方案已用同一段转身素材与 CSRT、VitTrack 做本机比较,并覆盖人工短遮挡、长遮挡停止、突切停止和反向跟踪;单段测试不能保证所有素材都不偏移,长时间离开画面或相似人物交叉仍需分段修正。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.18.1 跟踪提速与界面刷新</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>跟踪使用 Metal 生成紧凑灰度数据,减少 GPU 到 CPU 的回读;特征检测集中在目标范围,并复用相邻帧的光流计算数据。参数面板减少重复读取与图层列表刷新,让操作少做重复工作。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>同一段 4K 实拍素材的 285 帧测试中,纯追踪计算由约 8.78 秒降至 1.31 秒,轨迹与旧版逐帧一致。该测试不含宿主供图、解码、预览和渲染,不Line truncated
|
||||
"excerpt": "大鱼调色 1.19.1(110)修复刚添加整合效果时的默认预览卡顿。安装包完整包含整合效果、16 个独立模块和主 App,保留 Apple Vision 跟踪及可关闭的后台自动诊断。",
|
||||
"resource": {
|
||||
"cao_original_filename": "大鱼调色-1.19.1.pkg"
|
||||
},
|
||||
"seo": {
|
||||
"title": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色 1.19.1 公测版|修复默认预览卡顿,含 16 个独立模块"
|
||||
},
|
||||
"description": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色 1.19.1 修复添加整合效果后尚未调节参数就严重卡顿的问题,保留 Apple Vision 跟踪和后台自动诊断。官方 PKG 包含整合效果、16 个独立调色模块及完整主 App,已签名公证,无需激活。"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"title": "大鱼调色 1.21.1 公测版|首开波形修复与人脸肤色保护提速",
|
||||
"content": "<!-- wp:paragraph -->\n<p>大鱼调色是适用于 Final Cut Pro 和 Motion 的原生 FxPlug 4 调色插件。1.21.1(构建 117)公测版修复片尾暂停时首次打开控制面板没有波形的问题,并加快了人脸肤色保护的预览渲染。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>本文主下载已更新为 1.21.1(构建 117)。同一个 PKG 已包含“大鱼调色”整合效果和全部 16 个独立模块效果,以及所需的完整主 App,无需另外下载安装独立模块。</strong></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>官方原始安装包不加密,不限制安装数量。</strong> 安装和使用无需登录、激活码或机器码。原始 PKG 可以原样转发,请保持安装包完整。禁止二次加密或加上一机一码后分发。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.1 首开波形与人脸肤色保护优化</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>片尾暂停时,打开控制面板即可显示波形。</strong>在 Final Cut Pro 12.4 中,用 60p 素材和 25p 项目复测。停在片尾首次打开及同帧重开,亮度波形、RGB 分列、直方图和矢量图都自动显示,每种各有 57,600 个有效取样。两次打开都无需移动播放头或修改调色。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>开启人脸肤色保护后,减少轮廓计算。</strong>GPU 在实际脸部轮廓的外接范围内计算精细蒙版,保留眼、眉和嘴部的排除规则。下表是 Mac mini M4 上同一人像、开启人脸肤色保护的单帧渲染中位数。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:table -->\n<figure class=\"wp-block-table\"><table><thead><tr><th>分辨率</th><th>优化前</th><th>1.21.1</th></tr></thead><tbody><tr><td>1080p</td><td>308.08 毫秒</td><td>13.47 毫秒</td></tr><tr><td>4K</td><td>1176.07 毫秒</td><td>22.22 毫秒</td></tr></tbody></table></figure>\n<!-- /wp:table -->\n\n<!-- wp:paragraph -->\n<p>每组计时取 12 帧,六组对照的末帧逐字节一致。表中耗时只覆盖插件的肤色保护渲染。正式安装版通过 1008 项原生检查,PKG 已签名、公证并通过 20 项展开检查。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.19.1 默认预览卡顿修复</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>修复整合效果在刚添加、未调整任何参数时明显拖慢预览的问题。默认状态不再执行无效的人脸检测和整帧人脸轮廓蒙版运算;已有参数、预设及模板继续兼容。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>在本机 Apple M4 的相同人像基准中,1080p 单帧平均渲染耗时由约 324 毫秒降至 5.2 毫秒,4K 由约 1249 毫秒降至 17 毫秒。这组数据记录 1.19.1 的默认效果渲染。已启用人脸肤色保护的对照见上方 1.21.1 更新。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>正式版本通过 994 项检查,并在 Final Cut Pro 12.4 中重新添加整合效果复测默认播放。安装包已签名、公证,包含整合效果、16 个独立模块和对应预览图。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">新增独立模块示意</h2>\n<!-- /wp:heading -->\n\n<!-- wp:image {\"id\":15879,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n<figure class=\"wp-block-image size-full\"><img src=\"https://dayu.media/wp-content/uploads/2026/11/1793978887-775df3c76d48009.png\" alt=\"Final Cut Pro 效果浏览器中的大鱼调色独立模块,包括基础调整、曲线、HSL、肤色保护与 CST 色彩空间转换\" class=\"wp-image-15879\" width=\"1364\" height=\"748\" /><figcaption class=\"wp-element-caption\">Final Cut Pro「效果 → 大鱼调色」中的独立模块示意</figcaption></figure>\n<!-- /wp:image -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.19.0 全 Apple Vision 跟踪</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>马赛克蒙版改用 Apple Vision 目标跟踪。</strong>先在“局部马赛克”菜单中勾选目标蒙版,再到控制面板逐个执行正向、反向或双向跟踪。转身时保留蒙版的宽高比例,减少框过度变窄。已有轨迹不会自动改变,需要重新跟踪。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>短时丢失后尝试重新找到目标。</strong>丢失时冻结最后确认的外观,根据之前运动做最多约 0.8 秒的暂时预测;连续两次确认目标后,再用丢失前后位置补齐中间轨迹。超过范围仍未确认则停止,末尾未确认预测不保存为正常关键帧,补齐的片段会提示复核。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>本版同时修复控制面板延后布局访问已释放视图时的插件服务闪退。正式安装后通过 979Line truncated
|
||||
"excerpt": "大鱼调色 1.21.1(117)修复片尾暂停时首次打开控制面板不显示波形的问题,并加快人脸肤色保护渲染。Mac mini M4 同一人像的 4K 单帧中位数从 1176.07 降至 22.22 毫秒。",
|
||||
"resource": {
|
||||
"cao_original_filename": "大鱼调色-1.21.1.pkg"
|
||||
},
|
||||
"seo": {
|
||||
"title": {
|
||||
"value": "大鱼调色 1.21.1 公测版|首开波形修复与人脸肤色保护提速"
|
||||
},
|
||||
"description": {
|
||||
"value": "大鱼调色 1.21.1 公测版适用于 Final Cut Pro 和 Motion。FCP 实测片尾首次打开控制面板即显示四种示波器。Mac mini M4 的 4K 人脸肤色保护单帧渲染中位数由 1176.07 降至 22.22 毫秒。原始 PKG 已签名公证,包含整合效果和 16 个独立模块。"
|
||||
},
|
||||
"keywords": {
|
||||
"value": "大鱼调色,Final Cut Pro,Motion,FxPlug4,调色插件,仿制图章,蒙版跟踪,逐帧预览,示波器,人脸肤色保护"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"title": "大鱼调色 1.21.3 公测版|LUT 高清划像预览与蒙版追踪提速",
|
||||
"content": "<!-- wp:paragraph -->\n<p>大鱼调色是适用于 Final Cut Pro 和 Motion 的原生 FxPlug 4 调色插件。1.21.3(构建 120)公测版新增 LUT 高清缩略图和右侧划像对比,并缩短马赛克目标蒙版的追踪耗时。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>本文主下载已更新为 1.21.3(构建 120)。同一个 PKG 已包含“大鱼调色”整合效果和全部 16 个独立模块效果,以及所需的完整主 App,无需另外下载安装独立模块。</strong></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>官方原始安装包不加密,不限制安装数量。</strong> 安装和使用无需登录、激活码或机器码。原始 PKG 可以原样转发,请保持安装包完整。禁止二次加密或加上一机一码后分发。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.3 高清 LUT 预览与划像对比</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>打开“风格 LUT”的缩略图浏览库,勾选底部的“高清预览”。缩略图从 640×360 源帧生成双倍像素图,重开浏览器时会记住此设置。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>选中一个 LUT 后,右侧大图显示同一帧。左侧是应用当前 LUT 前的画面,右侧是 100% LUT 效果。拖动分界线或下方滑杆,即可查看画面细节和颜色差异。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:image {\"id\":15919,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} -->\n<figure class=\"wp-block-image size-full\"><a href=\"https://dayu.media/wp-content/uploads/2026/11/1794138126-43434ffd5f06df6.png\"><img src=\"https://dayu.media/wp-content/uploads/2026/11/1794138126-43434ffd5f06df6.png\" alt=\"大鱼调色 LUT 浏览器。红色箭头标出高清预览,右侧显示原图与 LUT 的同帧划像对比。\" class=\"wp-image-15919\" width=\"2614\" height=\"1696\" /></a><figcaption class=\"wp-element-caption\">勾选底部“高清预览”,在右侧滑动比较原图与当前 LUT。点击图片可查看原尺寸。</figcaption></figure>\n<!-- /wp:image -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">马赛克目标蒙版追踪提速</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>Metal 将画面直接写入 Vision 可读的共享像素缓冲,省去每帧的 CPU 像素转换。Mac mini M4 在 Final Cut Pro 12.4 中使用同一段 4K 素材,从点击“正向跟踪”到界面确认保存轨迹,三次热态测试的中位数从 3.682 秒降至 3.217 秒,缩短 12.6%。两版的 285 个轨迹键及导出的 285 帧马赛克画面逐一一致。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.1 首开波形与人脸肤色保护优化</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>片尾暂停时,打开控制面板即可显示波形。</strong>在 Final Cut Pro 12.4 中,用 60p 素材和 25p 项目复测。停在片尾首次打开及同帧重开,亮度波形、RGB 分列、直方图和矢量图都自动显示,每种各有 57,600 个有效取样。两次打开都无需移动播放头或修改调色。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>开启人脸肤色保护后,减少轮廓计算。</strong>GPU 在实际脸部轮廓的外接范围内计算精细蒙版,保留眼、眉和嘴部的排除规则。下表是 Mac mini M4 上同一人像、开启人脸肤色保护的单帧渲染中位数。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:table -->\n<figure class=\"wp-block-table\"><table><thead><tr><th>分辨率</th><th>优化前</th><th>1.21.1</th></tr></thead><tbody><tr><td>1080p</td><td>308.08 毫秒</td><td>13.47 毫秒</td></tr><tr><td>4K</td><td>1176.07 毫秒</td><td>22.22 毫秒</td></tr></tbody></table></figure>\n<!-- /wp:table -->\n\n<!-- wp:paragraph -->\n<p>每组计时取 12 帧,六组对照的末帧逐字节一致。表中耗时只覆盖插件的肤色保护渲染。正式安装版通过 1008 项原生检查,PKG 已签名、公证并通过 20 项展开检查。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.19.1 默认预览卡顿修复</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>修复整合效果在刚添加、未调整任何参数时明显拖慢预览的问题。默认状态不再执行无效的人脸检测和整帧人脸轮廓蒙版运算;已有参数、预设及模板继续兼容。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>在本机 Apple M4 的相同人像基准中,1080p 单帧平均渲染耗时由约 324 毫秒降至 5.2 毫秒,4K 由约 1249 毫秒降至 17 毫秒。这组数据记录 1.19.1 的默认效果渲染。已启用人脸肤色保护的对照见上方 1.21.1 更新。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>正式版本通过 994 项检查,并在 Final Cut Pro 12.4 中重新添加整合效果复测默认播放Line truncated
|
||||
"excerpt": "大鱼调色 1.21.3 新增 LUT 高清缩略图和右侧原图对比。Mac mini M4 上使用 Final Cut Pro 12.4 对同一段 4K 片段测试,完整正向追踪热态中位数从 3.682 秒降至 3.217 秒,285 个轨迹键与 285 帧马赛克输出逐一一致。",
|
||||
"resource": {
|
||||
"cao_original_filename": "大鱼调色-1.21.3.pkg"
|
||||
},
|
||||
"seo": {
|
||||
"title": {
|
||||
"value": "大鱼调色 1.21.3 公测版|LUT 高清划像预览与蒙版追踪提速"
|
||||
},
|
||||
"description": {
|
||||
"value": "大鱼调色 1.21.3 公测版适用于 Final Cut Pro 和 Motion。LUT 浏览器新增高清缩略图和原图划像对比。Mac mini M4 在 FCP 中对同一段 4K 素材实测,完整正向追踪热态中位数缩短 12.6%。签名公证 PKG 包含整合效果和 16 个独立模块。"
|
||||
},
|
||||
"keywords": {
|
||||
"value": "大鱼调色,Final Cut Pro,Motion,FxPlug4,调色插件,LUT,高清缩略图,划像对比,局部马赛克,蒙版追踪,Vision"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"title": "大鱼调色 1.21.6 公测版|LUT 预览复用与竖屏适配",
|
||||
"content": "<!-- wp:paragraph -->\n<p>大鱼调色是适用于 Final Cut Pro 和 Motion 的原生 FxPlug 4 调色插件。1.21.6(构建 124)改进 LUT 浏览器。同一帧连续点选时复用已生成的预览,缩略图与划像连续显示。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>本文主下载已更新为 1.21.6(构建 124)。同一个 PKG 已包含“大鱼调色”整合效果和全部 16 个独立模块效果,以及所需的完整主 App,无需另外下载安装独立模块。</strong></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>官方原始安装包不加密,不限制安装数量。</strong> 安装和使用无需登录、激活码或机器码。原始 PKG 可以原样转发,请保持安装包完整。禁止二次加密或加上一机一码后分发。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.6 LUT 浏览器更新</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>点击已生成的缩略图时,右侧划像直接复用这张图,左侧原图和列表缩略图继续显示。移动播放头后,新预览在后台生成,就绪后再替换。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>缩略图和划像按源帧比例显示,竖屏、方形和宽画幅都能保留原构图。同一次打开期间,点选 LUT 时列表顺序保持稳定。重新打开浏览器后,最近成功应用的 LUT 会排到前面。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.3 高清 LUT 预览与划像对比</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>打开“风格 LUT”的缩略图浏览库,勾选底部的“高清预览”。缩略图从 640×360 源帧生成双倍像素图,重开浏览器时会记住此设置。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>选中一个 LUT 后,右侧大图显示同一帧。左侧是应用当前 LUT 前的画面,右侧是 100% LUT 效果。拖动分界线或下方滑杆,即可查看画面细节和颜色差异。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:image {\"id\":15919,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} -->\n<figure class=\"wp-block-image size-full\"><a href=\"https://dayu.media/wp-content/uploads/2026/11/1794138126-43434ffd5f06df6.png\"><img src=\"https://dayu.media/wp-content/uploads/2026/11/1794138126-43434ffd5f06df6.png\" alt=\"大鱼调色 LUT 浏览器。红色箭头标出高清预览,右侧显示原图与 LUT 的同帧划像对比。\" class=\"wp-image-15919\" width=\"2614\" height=\"1696\" /></a><figcaption class=\"wp-element-caption\">勾选底部“高清预览”,在右侧滑动比较原图与当前 LUT。点击图片可查看原尺寸。</figcaption></figure>\n<!-- /wp:image -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">马赛克目标蒙版追踪提速</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>Metal 将画面直接写入 Vision 可读的共享像素缓冲,省去每帧的 CPU 像素转换。Mac mini M4 在 Final Cut Pro 12.4 中使用同一段 4K 素材,从点击“正向跟踪”到界面确认保存轨迹,三次热态测试的中位数从 3.682 秒降至 3.217 秒,缩短 12.6%。两版的 285 个轨迹键及导出的 285 帧马赛克画面逐一一致。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.1 首开波形与人脸肤色保护优化</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>片尾暂停时,打开控制面板即可显示波形。</strong>在 Final Cut Pro 12.4 中,用 60p 素材和 25p 项目复测。停在片尾首次打开及同帧重开,亮度波形、RGB 分列、直方图和矢量图都自动显示,每种各有 57,600 个有效取样。两次打开都无需移动播放头或修改调色。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>开启人脸肤色保护后,减少轮廓计算。</strong>GPU 在实际脸部轮廓的外接范围内计算精细蒙版,保留眼、眉和嘴部的排除规则。下表是 Mac mini M4 上同一人像、开启人脸肤色保护的单帧渲染中位数。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:table -->\n<figure class=\"wp-block-table\"><table><thead><tr><th>分辨率</th><th>优化前</th><th>1.21.1</th></tr></thead><tbody><tr><td>1080p</td><td>308.08 毫秒</td><td>13.47 毫秒</td></tr><tr><td>4K</td><td>1176.07 毫秒</td><td>22.22 毫秒</td></tr></tbody></table></figure>\n<!-- /wp:table -->\n\n<!-- wp:paragraph -->\n<p>每组计时取 12 帧,六组对照的末帧逐字节一致。表中耗时只覆盖插件的肤色保护渲染。正式安装版通过 1008 项原生检查,PKG 已签名、公证并通过 20 项展开检查。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.19.1 默认预览卡顿修复</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>修复整合效果在刚添加、未调整任何参数时明显Line truncated
|
||||
"excerpt": "大鱼调色 1.21.6(构建 124)改进 LUT 浏览器。同一帧点选时复用已生成的缩略图和划像,浏览顺序保持稳定。缩略图和划像按源帧比例显示,已在 Final Cut Pro 12.4 的竖屏项目复测。",
|
||||
"resource": {
|
||||
"cao_downurl": "https://dayu.media/wp-content/uploads/dayu-color-beta/updates/dayu-color-1-21-6-124.pkg",
|
||||
"cao_original_filename": "大鱼调色-1.21.6.pkg"
|
||||
},
|
||||
"seo": {
|
||||
"title": {
|
||||
"value": "大鱼调色 1.21.6 公测版|LUT 预览复用与竖屏适配"
|
||||
},
|
||||
"description": {
|
||||
"value": "大鱼调色 1.21.6 适用于 Final Cut Pro 和 Motion。LUT 浏览器同一帧点选时复用已生成的预览,并按源帧比例显示竖屏、方形和宽画幅。已签名公证的 PKG 包含完整主 App、整合调色效果和 16 个独立模块。"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"title": "大鱼调色 1.21.8 公测版|多层调色与拖动优化",
|
||||
"content": "<!-- wp:paragraph -->\n<p>大鱼调色是适用于 Final Cut Pro 和 Motion 的原生 FxPlug 4 调色插件。1.21.8(构建 126)降低多层调色与蒙版混合的渲染耗时,改善曲线、一级白平衡轮和颜色分级轮的拖动响应。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>本文主下载已更新为 1.21.8(构建 126)。同一个 PKG 已包含“大鱼调色”整合效果和全部 16 个独立模块效果,以及所需的完整主 App,无需另外下载安装独立模块。</strong></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>官方原始安装包不加密,不限制安装数量。</strong> 安装和使用无需登录、激活码或机器码。原始 PKG 可以原样转发,请保持安装包完整。禁止二次加密或加上一机一码后分发。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.8 多层调色与拖动优化</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>多层调色减少 GPU 等待。几何蒙版省去多余的色彩转换,羽化与部分覆盖继续按原方式混合。在 Apple M4 的插件单帧渲染测试中,4K 曝光加 HSL 蒙版由 87.7 毫秒降到 75.0 毫秒,一级 CST 加蒙版由 49.5 毫秒降到 42.8 毫秒。128 帧对照输出逐字节一致。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>从 1.21.6 升级后,蜘蛛盘、曲线、一级白平衡轮和颜色分级轮会合并拖动中的参数写入。松手提交最终值,每次拖动可一次撤销。曲线和两种色轮已在 Final Cut Pro 12.4 工作台验证。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.6 LUT 浏览器更新</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>点击已生成的缩略图时,右侧划像直接复用这张图,左侧原图和列表缩略图继续显示。移动播放头后,新预览在后台生成,就绪后再替换。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>缩略图和划像按源帧比例显示,竖屏、方形和宽画幅都能保留原构图。同一次打开期间,点选 LUT 时列表顺序保持稳定。重新打开浏览器后,最近成功应用的 LUT 会排到前面。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.3 高清 LUT 预览与划像对比</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>打开“风格 LUT”的缩略图浏览库,勾选底部的“高清预览”。缩略图从 640×360 源帧生成双倍像素图,重开浏览器时会记住此设置。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>选中一个 LUT 后,右侧大图显示同一帧。左侧是应用当前 LUT 前的画面,右侧是 100% LUT 效果。拖动分界线或下方滑杆,即可查看画面细节和颜色差异。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:image {\"id\":15919,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} -->\n<figure class=\"wp-block-image size-full\"><a href=\"https://dayu.media/wp-content/uploads/2026/11/1794138126-43434ffd5f06df6.png\"><img src=\"https://dayu.media/wp-content/uploads/2026/11/1794138126-43434ffd5f06df6.png\" alt=\"大鱼调色 LUT 浏览器。红色箭头标出高清预览,右侧显示原图与 LUT 的同帧划像对比。\" class=\"wp-image-15919\" width=\"2614\" height=\"1696\" /></a><figcaption class=\"wp-element-caption\">勾选底部“高清预览”,在右侧滑动比较原图与当前 LUT。点击图片可查看原尺寸。</figcaption></figure>\n<!-- /wp:image -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">马赛克目标蒙版追踪提速</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>Metal 将画面直接写入 Vision 可读的共享像素缓冲,省去每帧的 CPU 像素转换。Mac mini M4 在 Final Cut Pro 12.4 中使用同一段 4K 素材,从点击“正向跟踪”到界面确认保存轨迹,三次热态测试的中位数从 3.682 秒降至 3.217 秒,缩短 12.6%。两版的 285 个轨迹键及导出的 285 帧马赛克画面逐一一致。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.1 首开波形与人脸肤色保护优化</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>片尾暂停时,打开控制面板即可显示波形。</strong>在 Final Cut Pro 12.4 中,用 60p 素材和 25p 项目复测。停在片尾首次打开及同帧重开,亮度波形、RGB 分列、直方图和矢量图都自动显示,每种各有 57,600 个有效取样。两次打开都无需移动播放头或修改调色。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>开启人脸肤色保护后,减少轮廓计算。</strong>GPU 在实际脸部轮廓的外接范围内计算精细蒙版,保留眼、眉和嘴部的排除规则。下表是 Mac mini M4 上同一人像、开启人脸肤色保护的单帧渲染中位数。</p>\n<!-- /wp:paragraph --Line truncated
|
||||
"excerpt": "大鱼调色 1.21.8(构建 126)降低多层调色和蒙版混合的耗时,改善曲线、一级白平衡轮和颜色分级轮的拖动响应。已在 Final Cut Pro 12.4 验证拖动与一次撤销。",
|
||||
"resource": {
|
||||
"cao_downurl": "https://dayu.media/wp-content/uploads/dayu-color-beta/updates/dayu-color-1-21-8-126.pkg",
|
||||
"cao_original_filename": "大鱼调色-1.21.8.pkg"
|
||||
},
|
||||
"seo": {
|
||||
"title": {
|
||||
"value": "大鱼调色 1.21.8 公测版|多层调色与拖动优化"
|
||||
},
|
||||
"description": {
|
||||
"value": "大鱼调色 1.21.8 适用于 Final Cut Pro 和 Motion,优化多层调色、蒙版混合及曲线与色轮拖动。已签名公证的 PKG 包含完整主 App、整合调色效果及 16 个独立模块。"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"title": "大鱼调色 1.22.1 公测版|在线 LUT 自动预览与统一分类",
|
||||
"content": "<!-- wp:paragraph -->\n<p>大鱼调色是适用于 Final Cut Pro 和 Motion 的原生 FxPlug 4 调色插件。1.22.1(构建 133)支持打开浏览器自动批量预览在线 LUT,将在线与本地目录放在同一分类栏,点击在线 LUT 即可安装到对应本地分类并应用。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>本文主下载已更新为 1.22.1(构建 133)。同一个 PKG 已包含“大鱼调色”整合效果和全部 16 个独立模块效果,以及所需的完整主 App,无需另外下载安装独立模块。</strong></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>官方原始安装包不加密,不限制安装数量。</strong> 插件安装和本地调色无需登录、激活码或机器码。在线 LUT 需要登录大鱼账号并具备访问权限。原始 PKG 可以原样转发,请保持安装包完整。禁止二次加密或加上一机一码后分发。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.22.1 在线 LUT 自动预览与统一分类</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>打开浏览器即可批量查看在线效果。</strong> 浏览器自动使用当前缓存帧,加载当前页在线 LUT 的效果缩略图,无需逐个点击预览。如果首次打开还没有缓存帧,会在获得首帧后自动补载。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>在线与本地共用分类栏。</strong> “在线 LUT”总分类下列出在线子分类;本地文件夹支持二级及更深层级,可展开或折叠,方便按用途整理。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>点击在线 LUT 后安装并应用。</strong> 文件校验通过后保存到本地对应分类,可在“已安装 LUT / 对应分类”中找到并离线使用。重复安装会复用已有文件,在线预载失败也不影响本地 LUT 操作。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>在线预览会将当前缓存帧的 PNG 缩略图发送到 dayu.media,最长边为 640 像素,用于批量生成效果图。服务器仅在内存处理,不保存预览帧,不上传视频文件。同一次打开期间,移动播放头不会连续上传;需要换用其他画面时点击“更新预览”。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>本次正式版已在 Final Cut Pro 12.4 验证自动预览、点击安装应用、原图划像和播放。APP 与 PKG 均已完成正式签名和 Apple 公证;Motion 本轮未复测。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.22.0 在线 LUT 资源库</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>1.22.0 首次加入大鱼在线 LUT 目录、分类搜索与下载安装,并提供主 App 账号识别和微信登录入口。1.22.1 在此基础上完善自动预览、统一分类和本地层级目录。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.8 多层调色与拖动优化</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>多层调色减少 GPU 等待。几何蒙版省去多余的色彩转换,羽化与部分覆盖继续按原方式混合。在 Apple M4 的插件单帧渲染测试中,4K 曝光加 HSL 蒙版由 87.7 毫秒降到 75.0 毫秒,一级 CST 加蒙版由 49.5 毫秒降到 42.8 毫秒。128 帧对照输出逐字节一致。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>从 1.21.6 升级后,蜘蛛盘、曲线、一级白平衡轮和颜色分级轮会合并拖动中的参数写入。松手提交最终值,每次拖动可一次撤销。曲线和两种色轮已在 Final Cut Pro 12.4 工作台验证。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.6 LUT 浏览器更新</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>点击已生成的缩略图时,右侧划像直接复用这张图,左侧原图和列表缩略图继续显示。移动播放头后,新预览在后台生成,就绪后再替换。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>缩略图和划像按源帧比例显示,竖屏、方形和宽画幅都能保留原构图。同一次打开期间,点选 LUT 时列表顺序保持稳定。重新打开浏览器后,最近成功应用的 LUT 会排到前面。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.21.3 高清 LUT 预览与划像对比</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>打开“风格 LUT”的缩略图浏览库,勾选底部的“高清预览”。缩略图从 640×360 源帧生成双倍像素图,重开浏览器时会记住此设置。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>选中一个 LUT 后,右侧大图显示同一帧。左侧是应用当前 LUT 前的画面,右侧是 100% LUT 效果。拖动分界线或下方滑杆,即可查看画面细节和颜色差异Line truncated
|
||||
"excerpt": "大鱼调色 1.22.1(构建 133)支持打开浏览器自动批量预览在线 LUT,在线与本地共用分类栏,点击即可安装并应用;本地目录支持二级及更深分类。已签名公证,包含整合效果和 16 个独立模块。",
|
||||
"seo": {
|
||||
"title": {
|
||||
"value": "大鱼调色 1.22.1 公测版|在线 LUT 自动预览与统一分类"
|
||||
},
|
||||
"description": {
|
||||
"value": "大鱼调色 1.22.1 适用于 Final Cut Pro 和 Motion,支持自动批量预览在线 LUT、在线与本地统一分类、点击安装应用及本地二级目录。已签名公证的 PKG 包含完整主 App、整合效果及 16 个独立模块。"
|
||||
},
|
||||
"keywords": {
|
||||
"value": "大鱼调色,Final Cut Pro,Motion,FxPlug4,调色插件,LUT,高清缩略图,划像对比,局部马赛克,蒙版追踪,Vision,在线LUT,自动预览,LUT分类"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"title": "大鱼调色 1.22.2 公测版|仿制图章修复与简洁主界面",
|
||||
"content": "<!-- wp:paragraph -->\n<p>大鱼调色是适用于 Final Cut Pro 和 Motion 的原生 FxPlug 4 调色插件。1.22.2(构建 137)完善仿制图章的创建、跟踪和失败处理指引,可用同一表面的清晰参考带动小范围修复,并通过手工关键帧继续处理自动跟踪无法完成的片段。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>本文主下载已更新为 1.22.2(构建 137)。同一个 PKG 已包含“大鱼调色”整合效果和全部 16 个独立模块效果,以及所需的完整主 App,无需另外下载安装独立模块。</strong></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>官方原始安装包不加密,不限制安装数量。</strong> 插件安装和本地调色无需登录、激活码或机器码。在线 LUT 需要登录大鱼账号并具备访问权限。原始 PKG 可以原样转发,请保持安装包完整。禁止二次加密或加上一机一码后分发。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>主 App 收拢为在线 LUT、插件连接、版本更新和诊断四个区域。使用帮助、权限与预览、隐私说明按需打开;登录后收起重复登录入口,空闲时收起进度条和不可用的安装按钮。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.22.2 仿制图章跟踪与操作指引</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>干净取样区可以随修复区移动。</strong> 新建图章默认采用这一模式,不再要求干净的纯色取样区独立识别纹理。已有图章保留原来的独立跟踪模式,可在编辑面板切换;独立模式仍需要取样区和修复参考都有足够细节。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>跟踪参考与修复范围分开选择。</strong> 瑕疵附近缺少纹理时,点击“选择跟踪参考”,在同一运动表面上框选清晰细节。绿色框只负责跟踪,黄色椭圆决定实际修复范围。请避免选择独立运动的物体或不同景深的背景作参考。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>跟踪停止后可以看到原因。</strong> 画布保留失败原因、停止的片段时间和最后可信位置;首帧失败也会保存说明。已有可信轨迹时,可查看最后可信位置,校正位置或更换参考后继续处理。宿主支持时可用“最后可信帧”跳转;本次 FCP 验收中自动跳转未生效,请按显示的片段时间手动定位。双向跟踪遇到实际失败会明确停止,宿主超过 30 秒没有返回新画面时也会显示说明。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>自动跟踪前也能建立手工关键帧。</strong> 点击“手工关键帧”,移动到另一帧后拖动黄色修复区或青色取样点,帧间自动过渡。有轨迹时,拖动取样点只修改当前帧;重新自动跟踪时保留手工设置的取样位置。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading {\"level\":3} -->\n<h3 class=\"wp-block-heading\">纯色表面上的瑕疵怎么处理</h3>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>先选择亮度、颜色和纹理接近的干净取样中心,再拖出略大于瑕疵的黄色覆盖椭圆,调整羽化。污点固定在画面坐标上时直接覆盖即可;需要跟随表面运动时,使用“取样跟随修复区移动”,并为缺少细节的修复区选择同一表面的跟踪参考。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>如果整个运动表面都没有可供识别的细节,自动跟踪仍可能无法开始。此时按画布说明使用手工关键帧,逐段校正修复区和取样点,并播放检查修复结果。参考跟踪不会自动补画被遮挡的内容。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.22.1 在线 LUT 自动预览与统一分类</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>打开浏览器即可批量查看在线效果。</strong> 浏览器自动使用当前缓存帧,加载当前页在线 LUT 的效果缩略图,无需逐个点击预览。如果首次打开还没有缓存帧,会在获得首帧后自动补载。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>在线与本地共用分类栏。</strong> “在线 LUT”总分类下列出在线子分类;本地文件夹支持二级及更深层级,可展开或折叠,方便按用途整理。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>点击在线 LUT 后安装并应用。</strong> 文件校验通过后保存到本地对应分类,可在“已安装 LUT / 对应分类”中找到并离线使用。重复安装会复用已有文件,在线预载失败也不影响本地 LUT 操作。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>在线预览会将当前缓存帧的 PNG 缩略图发送到 dayu.media,最长Line truncated
|
||||
"excerpt": "大鱼调色 1.22.2(构建 137)支持纯色取样随动、独立跟踪参考和手工关键帧,并精简主 App 界面,常用操作集中显示,详细说明按需查看。",
|
||||
"seo": {
|
||||
"title": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色 1.22.2 公测版|仿制图章修复与简洁主界面"
|
||||
},
|
||||
"description": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色 1.22.2 适用于 Final Cut Pro 和 Motion,完善仿制图章跟踪指引、纯色取样跟随、独立参考区、手工关键帧及失败说明。完整 PKG 包含主 App、整合效果和 16 个独立模块。"
|
||||
},
|
||||
"keywords": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色,Final Cut Pro,Motion,FxPlug4,调色插件,LUT,高清缩略图,划像对比,局部马赛克,蒙版追踪,Vision,在线LUT,自动预览,LUT分类,仿制图章,纯色区域修复,跟踪参考,手工关键帧"
|
||||
}
|
||||
},
|
||||
"resource": {
|
||||
"cao_price": "50",
|
||||
"cao_vip_rate": "0",
|
||||
"cao_original_filename": "大鱼调色-1.22.2.pkg"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"state": "prepared-not-publishable",
|
||||
"articleID": 15792,
|
||||
"articleURL": "https://dayu.media/15792/",
|
||||
"versionAssigned": false,
|
||||
"format": "Editorial templates only. This is not a complete publisher request.",
|
||||
"titleTemplate": "大鱼调色 {{VERSION}} 公测版|仿制图章跟踪指引与纯色区域修复",
|
||||
"excerptTemplate": "大鱼调色 {{VERSION}}(构建 {{BUILD}})完善仿制图章操作指引:取样可跟随修复区移动,支持单独选择同一表面的跟踪参考与手工关键帧;跟踪停止后显示原因、停止时间和最后可信位置。",
|
||||
"openingParagraphTemplate": "<p>大鱼调色是适用于 Final Cut Pro 和 Motion 的原生 FxPlug 4 调色插件。{{VERSION}}(构建 {{BUILD}})完善仿制图章的创建、跟踪和失败处理指引,可用同一表面的清晰参考带动小范围修复,并通过手工关键帧继续处理自动跟踪无法完成的片段。</p>",
|
||||
"mainDownloadParagraphTemplate": "<p><strong>本文主下载已更新为 {{VERSION}}(构建 {{BUILD}})。同一个 PKG 已包含“大鱼调色”整合效果和全部 16 个独立模块效果,以及所需的完整主 App,无需另外下载安装独立模块。</strong></p>",
|
||||
"newSectionBlocks": [
|
||||
{"type": "heading", "level": 2, "htmlTemplate": "{{VERSION}} 仿制图章跟踪与操作指引"},
|
||||
{"type": "paragraph", "htmlTemplate": "<strong>干净取样区可以随修复区移动。</strong> 新建图章默认采用这一模式,不再要求干净的纯色取样区独立识别纹理。已有图章保留原来的独立跟踪模式,可在编辑面板切换;独立模式仍需要取样区和修复参考都有足够细节。"},
|
||||
{"type": "paragraph", "htmlTemplate": "<strong>跟踪参考与修复范围分开选择。</strong> 瑕疵附近缺少纹理时,点击“选择跟踪参考”,在同一运动表面上框选清晰细节。绿色框只负责跟踪,黄色椭圆决定实际修复范围。请避免选择独立运动的物体或不同景深的背景作参考。"},
|
||||
{"type": "paragraph", "htmlTemplate": "<strong>跟踪停止后可以看到原因。</strong> 画布保留失败原因、停止的片段时间和最后可信位置;首帧失败也会保存说明。已有可信轨迹时,可点击“最后可信帧”定位,校正位置或更换参考后继续处理。双向跟踪遇到实际失败会明确停止,宿主超过 30 秒没有返回新画面时也会显示说明。"},
|
||||
{"type": "paragraph", "htmlTemplate": "<strong>自动跟踪前也能建立手工关键帧。</strong> 点击“手工关键帧”,移动到另一帧后拖动黄色修复区或青色取样点,帧间自动过渡。有轨迹时,拖动取样点只修改当前帧;重新自动跟踪时保留手工设置的取样位置。"},
|
||||
{"type": "heading", "level": 3, "htmlTemplate": "纯色表面上的瑕疵怎么处理"},
|
||||
{"type": "paragraph", "htmlTemplate": "先选择亮度、颜色和纹理接近的干净取样中心,再拖出略大于瑕疵的黄色覆盖椭圆,调整羽化。污点固定在画面坐标上时直接覆盖即可;需要跟随表面运动时,使用“取样跟随修复区移动”,并为缺少细节的修复区选择同一表面的跟踪参考。"},
|
||||
{"type": "paragraph", "htmlTemplate": "如果整个运动表面都没有可供识别的细节,自动跟踪仍可能无法开始。此时按画布说明使用手工关键帧,逐段校正修复区和取样点,并播放检查修复结果。参考跟踪不会自动补画被遮挡的内容。"}
|
||||
],
|
||||
"installationParagraphTemplate": "<p>运行本文提供的 {{VERSION}} 原始 PKG。安装器会装好大鱼调色主 App、内嵌 FxPlug 插件、“大鱼调色”整合效果和全部 16 个独立模块效果,并自动登记插件。</p>",
|
||||
"seoTemplates": {
|
||||
"title": "大鱼调色 {{VERSION}} 公测版|仿制图章跟踪指引与纯色区域修复",
|
||||
"description": "大鱼调色 {{VERSION}} 适用于 Final Cut Pro 和 Motion,完善仿制图章跟踪指引、纯色取样跟随、独立参考区、手工关键帧及失败说明。完整 PKG 包含主 App、整合效果和 16 个独立模块。",
|
||||
"additionalKeywords": ["仿制图章", "纯色区域修复", "跟踪参考", "手工关键帧"]
|
||||
},
|
||||
"applyAgainstLiveArticle": {
|
||||
"required": true,
|
||||
"lastVerifiedHistoricalBaseline": "Packaging/article-1.22.1.json",
|
||||
"baselineFreshness": "Historical reference only; fetch the live article immediately before preparing the final publisher request.",
|
||||
"operations": [
|
||||
"Read authenticated current article, download fields and SEO enabled states; preserve a private baseline.",
|
||||
"Fill VERSION and BUILD only from the accepted installed Release and verified package reports.",
|
||||
"Replace the current opening summary, main download version paragraph and current installation package paragraph; do not replace historical version references globally.",
|
||||
"Insert the new section above the existing most recent update section, preserving all historical content, six images, effect names and App open command.",
|
||||
"Update title, excerpt and SEO text. Keep current SEO enabled states, commercial settings, price, member entitlements, author, categories, tags, cover and FCPX settings.",
|
||||
"Upload the exact verified package using the existing article publisher and a unique request ID; read back before retrying an unknown upload result.",
|
||||
"Replace the main package URL and original filename only after full uploaded-file download matches verified package size and SHA-256.",
|
||||
"Read back authenticated saved fields and the frontend; verify current version, install instructions, history, images, code and commercial settings."
|
||||
]
|
||||
},
|
||||
"publicationRequirements": [
|
||||
"Full Release build from a recorded recoverable source commit.",
|
||||
"APP signature, notarization Accepted, ticket and unique formal installation verified.",
|
||||
"Installed native regression and required Final Cut Pro host acceptance passed.",
|
||||
"PKG signature, notarization Accepted, ticket, Gatekeeper and package inspection passed.",
|
||||
"Source checkpoint and version tag pushed and read back; Release attachment fully downloaded and verified.",
|
||||
"Current live article baseline read; every template token replaced; package attachment fully downloaded and verified."
|
||||
],
|
||||
"acceptanceClaims": "Add only the actual new-version verification results after completion. Do not reuse 1.22.1 host acceptance or the 24 isolated clone-state checks as new-version acceptance."
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"resource": {
|
||||
"cao_original_filename": "大鱼调色-1.22.1.pkg"
|
||||
}
|
||||
}
|
||||
+106
-17
@@ -8,9 +8,15 @@ import os
|
||||
from pathlib import Path
|
||||
import plistlib
|
||||
import shutil
|
||||
import stat
|
||||
import subprocess
|
||||
import tempfile
|
||||
import xml.etree.ElementTree as ET
|
||||
import sys
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
sys.path.insert(0, str(ROOT / "tools"))
|
||||
from template_payload import template_files
|
||||
APP = Path("/Library/Plug-Ins/FxPlug/大鱼调色.app")
|
||||
CACHE = Path.home() / "Library/Caches/CodexBuilds/com.dayu.color"
|
||||
LOCK = Path.home() / ".codex/app-delivery-locks/com.dayu.color.lock"
|
||||
@@ -25,6 +31,64 @@ def history(profile, keychain):
|
||||
"--keychain", keychain, "--output-format", "json"))["history"]
|
||||
|
||||
|
||||
def check_bundle_access(entries):
|
||||
for path, mode in entries:
|
||||
if stat.S_ISLNK(mode):
|
||||
continue
|
||||
required = 0o555 if stat.S_ISDIR(mode) or mode & stat.S_IXUSR else 0o444
|
||||
if mode & required != required:
|
||||
raise ValueError(f"普通用户无法读取或执行安装载荷:{path}({stat.S_IMODE(mode):04o})")
|
||||
|
||||
|
||||
def check_package_bundle_access(package):
|
||||
prefix = "." + str(APP)
|
||||
with tempfile.TemporaryDirectory(dir=CACHE) as scratch:
|
||||
expanded = Path(scratch) / "expanded"
|
||||
run("pkgutil", "--expand", str(package), str(expanded))
|
||||
entries = {}
|
||||
for bom in expanded.glob("*.pkg/Bom"):
|
||||
for line in run("lsbom", "-p", "fm", str(bom)).splitlines():
|
||||
path, mode = line.rsplit("\t", 1)
|
||||
if path == prefix or path.startswith(prefix + "/"):
|
||||
if not any(part.startswith("._") for part in Path(path).parts):
|
||||
entries[path] = int(mode, 8)
|
||||
if prefix not in entries:
|
||||
raise ValueError(f"安装载荷清单缺少正式 APP:{APP}")
|
||||
check_bundle_access(entries.items())
|
||||
return len(entries)
|
||||
|
||||
|
||||
def prepare_resident_entry(skill, destination):
|
||||
"""Reuse Forge core; add our resident wrapper to its normal-quit checks."""
|
||||
runner = skill / "package_fxplug.py"
|
||||
entry = skill / "PackageFxPlug.swift"
|
||||
source = entry.read_text()
|
||||
anchor = " var hosts = ApplicationToClose.presets\n"
|
||||
assert source.count(anchor) == 1, "PKG 工坊入口变化,须重新核对常驻 APP 退出规则"
|
||||
replacement = anchor + """ for item in items where item.kind == .fxPlug {
|
||||
hosts.append(try ApplicationToClose.read(URL(fileURLWithPath: item.sourcePath)))
|
||||
}
|
||||
"""
|
||||
destination.mkdir()
|
||||
shutil.copy2(runner, destination / runner.name)
|
||||
(destination / entry.name).write_text(source.replace(anchor, replacement))
|
||||
return dict(upstreamEntrySHA256=hashlib.sha256(entry.read_bytes()).hexdigest(),
|
||||
adaptedEntrySHA256=hashlib.sha256((destination / entry.name).read_bytes()).hexdigest(),
|
||||
requiredApplication="com.dayu.color")
|
||||
|
||||
|
||||
def check_resident_close(package):
|
||||
with tempfile.TemporaryDirectory(dir=CACHE) as scratch:
|
||||
expanded = Path(scratch) / "expanded"
|
||||
run("pkgutil", "--expand", str(package), str(expanded))
|
||||
distribution = ET.parse(expanded / "Distribution")
|
||||
identifiers = [x.attrib.get("id") for x in distribution.findall(".//must-close/app")]
|
||||
assert "com.dayu.color" in identifiers, "安装器必须正常退出常驻主 APP"
|
||||
preinstalls = list(expanded.glob("*.pkg/Scripts/preinstall"))
|
||||
assert preinstalls and all("'com.dayu.color'" in p.read_text() for p in preinstalls)
|
||||
return dict(identifiers=identifiers, preinstallGuardCount=len(preinstalls), normalQuit=True)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--pkg-forge-repo", type=Path,
|
||||
@@ -38,7 +102,10 @@ def main():
|
||||
assert (skill / "package_fxplug.py").is_file(), "请指定含 pkg-forge 技能的 PKG 工坊 checkout"
|
||||
delivery = json.loads((ROOT / "verification/Delivery.json").read_text())
|
||||
info = plistlib.loads((APP / "Contents/Info.plist").read_bytes())
|
||||
assert delivery["status"] == "verified" and delivery["path"] == str(APP)
|
||||
assert delivery["path"] == str(APP)
|
||||
# Preparation only stages and validates inputs. Creating a distributable
|
||||
# package still requires completed host acceptance of the formal install.
|
||||
assert args.prepare_only or delivery["status"] == "verified", "正式安装尚未完成宿主验收"
|
||||
assert info["CFBundleIdentifier"] == "com.dayu.color"
|
||||
assert (info["CFBundleShortVersionString"], info["CFBundleVersion"]) == (delivery["version"], delivery["build"])
|
||||
args.output_dir.mkdir(parents=True, exist_ok=True)
|
||||
@@ -47,40 +114,54 @@ def main():
|
||||
LOCK.mkdir()
|
||||
(LOCK / "owner.json").write_text(json.dumps(dict(PID=os.getpid(), cwd=str(ROOT),
|
||||
product="大鱼调色", phase="PKG packaging", started=datetime.datetime.now(datetime.timezone.utc).isoformat())))
|
||||
stage = None
|
||||
try:
|
||||
check_bundle_access((path, path.lstat().st_mode) for path in [APP, *APP.rglob("*")])
|
||||
source = APP / "Contents/Resources/FCP Templates"
|
||||
staged = CACHE / "pkg-inputs/大鱼调色/大鱼调色"
|
||||
staged.mkdir(parents=True, exist_ok=True)
|
||||
# Use a fresh staging directory, so historical files cannot leak into
|
||||
# the new payload or override the intended effect list.
|
||||
stage = Path(tempfile.mkdtemp(prefix="pkg-inputs-", dir=CACHE))
|
||||
staged = stage / "大鱼调色"
|
||||
hashes = {}
|
||||
for name in ["大鱼调色.moef", "large.png", "small.png"]:
|
||||
data = (source / name).read_bytes()
|
||||
assert data == (ROOT / "template" / name).read_bytes(), name
|
||||
target = staged / name
|
||||
if target.exists():
|
||||
os.chflags(target, 0)
|
||||
for reference, bundled, installed in template_files():
|
||||
data = (source / bundled).read_bytes()
|
||||
assert data == (ROOT / "template" / reference).read_bytes(), installed
|
||||
target = staged / installed
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
target.write_bytes(data)
|
||||
target.chmod(0o644)
|
||||
if name.endswith(".png"):
|
||||
if target.suffix == ".png":
|
||||
os.chflags(target, 2)
|
||||
hashes[name] = hashlib.sha256(data).hexdigest()
|
||||
for folder in [staged, staged.parent]:
|
||||
folder.chmod(0o755)
|
||||
hashes[str(installed)] = hashlib.sha256(data).hexdigest()
|
||||
keychain = str(Path.home() / "Library/Keychains/login.keychain-db")
|
||||
profile = "codex-dayu-notary-B3W25FX5H5"
|
||||
version = info["CFBundleShortVersionString"]
|
||||
manifest = dict(name="大鱼调色", output=str(args.output_dir / "大鱼调色.pkg"),
|
||||
identifierPrefix="com.dayu.color.installer", resources=[dict(source=str(APP)),
|
||||
dict(source=str(staged.parent), destination="~/Movies/Motion Templates.localized/Effects.localized")],
|
||||
dict(source=str(staged), destination="~/Movies/Motion Templates.localized/Effects.localized")],
|
||||
signing=dict(identity="Developer ID Installer: zhong luo (B3W25FX5H5)", profile=profile,
|
||||
keychain=keychain, notaryKeychain=keychain),
|
||||
appearance=dict(title="大鱼调色", subtitle="适用于 Final Cut Pro 与 Motion 的原生调色效果",
|
||||
badgeImage=str(ROOT / "design/dayu-color-app-icon-v1.png"), authorContact="https://dayu.media"),
|
||||
pages=dict(welcome="安装大鱼调色 " + version + ",包含原生 FxPlug 调色插件和 Final Cut Pro 效果入口。",
|
||||
readme="系统要求:macOS 14.6 或更高版本。本发行构建适用于 Apple Silicon Mac。\n\n安装内容:\n/Library/Plug-Ins/FxPlug/大鱼调色.app\n登录用户“影片/Motion Templates/Effects/大鱼调色”中的效果模板与预览图。\n\n重新打开 Final Cut Pro 后,在“效果 → 大鱼调色”中应用;Motion 中可选择原生滤镜。\n本安装包不包含用户自选 LUT、预设或媒体文件。\n\n公测诊断默认开启,可在主 APP 关闭。仅发送版本、系统环境、加载耗时与本插件错误摘要到 dayu.media;不发送素材、预设或账号,保留30天。主 APP 启动时检查更新,新版由用户确认安装。",
|
||||
license="", conclusion="大鱼调色已安装。主 APP 自动注册插件,成功后显示3秒倒计时退出。可点击“打开 FCP 检查”保留窗口,并在宿主中实际检查效果。"))
|
||||
readme=(
|
||||
'系统要求:macOS 14.6 或更高版本。本发行构建适用于 Apple Silicon Mac。\n'
|
||||
'\n'
|
||||
'安装内容:\n'
|
||||
'/Library/Plug-Ins/FxPlug/大鱼调色.app\n'
|
||||
'登录用户“影片/Motion Templates/Effects/大鱼调色”中的效果模板与预览图。\n'
|
||||
'\n'
|
||||
'重新打开 Final Cut Pro 后,在“效果 → 大鱼调色”中应用;Motion 中可选择原生滤镜。\n'
|
||||
'本安装包不包含用户自选 LUT、预设或媒体文件。\n'
|
||||
'\n'
|
||||
'公测诊断默认开启,可在主 APP 关闭。仅发送版本、系统环境、阶段耗时、资源使用与本产品崩溃/卡顿调用栈摘要到 dayu.media;不发送素材、预设或账号,保留30天。在线 LUT 在主 APP 启动时自动识别本机已绑定的大鱼账号;未绑定时可微信登录。有效会员或购买文章 14421 / 15792 可使用全部已发布在线 LUT。打开插件 LUT 浏览器时,自动发送当前缓存帧缩略图到 dayu.media 并批量生成在线预览;服务器内存处理,不保存预览帧,不上传视频文件。在线与本地分类统一显示,点击在线 LUT 后安装到本地对应分类并应用,可供离线使用。主 APP 启动时检查更新,新版由用户确认安装。'
|
||||
),
|
||||
license="", conclusion="大鱼调色已安装。主 APP 自动注册插件,成功后保持运行。关闭窗口仍在后台收集已开启的诊断;菜单栏可重新打开或退出。请重开宿主并实际检查效果。"))
|
||||
manifest_path = CACHE / "dayu-color-package-manifest.json"
|
||||
manifest_path.write_text(json.dumps(manifest, ensure_ascii=False, indent=2) + "\n")
|
||||
command = ["/usr/bin/python3", str(skill / "package_fxplug.py"), "--repo", str(forge), "--manifest", str(manifest_path)]
|
||||
adapter = stage / "forge-entry"
|
||||
adapter_record = prepare_resident_entry(skill, adapter)
|
||||
command = ["/usr/bin/python3", str(adapter / "package_fxplug.py"), "--repo", str(forge), "--manifest", str(manifest_path)]
|
||||
subprocess.run(command + ["--check"], check=True)
|
||||
if args.prepare_only:
|
||||
print("清单:" + str(manifest_path))
|
||||
@@ -90,6 +171,8 @@ def main():
|
||||
with log_path.open("w") as log:
|
||||
subprocess.run(command, stdout=log, stderr=subprocess.STDOUT, check=True)
|
||||
package = args.output_dir / ("大鱼调色-" + version + ".pkg")
|
||||
verified_payload_entries = check_package_bundle_access(package)
|
||||
resident_close = check_resident_close(package)
|
||||
report_path = ROOT / "verification/Package.json"
|
||||
subprocess.run(["/usr/bin/python3", str(skill / "verify_fxplug_package.py"), "--manifest", str(manifest_path),
|
||||
"--package", str(package), "--report", str(report_path)], check=True)
|
||||
@@ -101,12 +184,18 @@ def main():
|
||||
report = json.loads(report_path.read_text())
|
||||
report.update(notarization=job, appCompiledSource=delivery["sourceCommit"], appBuild=info["CFBundleVersion"],
|
||||
packageBuilderRemote="https://dayu.media/git/dayu/pkg-forge.git",
|
||||
residentAppClosing=resident_close, packageEntryAdaptation=adapter_record,
|
||||
packageBuilderCommit=run("git", "rev-parse", "HEAD", cwd=forge), templateSHA256=hashes,
|
||||
payloadBundleAccess=dict(entries=verified_payload_entries, scope="Read/traverse modes for installer-owned app entries, from the package BOM"),
|
||||
installedAppHostAcceptance=delivery.get("hostVerification", "verification/HostLUTLoading.json"),
|
||||
installScope="本轮仅生成并验包,未再次执行系统安装;正式 APP 已有独立宿主验收。")
|
||||
report_path.write_text(json.dumps(report, ensure_ascii=False, indent=2) + "\n")
|
||||
print("正式安装包:" + str(package))
|
||||
finally:
|
||||
if stage and not args.prepare_only:
|
||||
for preview in stage.rglob("*.png"):
|
||||
os.chflags(preview, 0)
|
||||
shutil.rmtree(stage)
|
||||
(LOCK / "owner.json").unlink()
|
||||
LOCK.rmdir()
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
优化蒙版与马赛克跟踪的数据传输和计算复用,并减少参数面板的重复刷新。
|
||||
|
||||
- Metal 输出紧凑灰度数据,4K 回读量减少 75%;特征检测限定在目标范围,OpenCV 光流复用金字塔。
|
||||
- 同一 4K 实拍 285 帧的纯追踪计算由 8.78 秒降至 1.31 秒,轨迹与旧版逐帧一致。此数字不包括宿主供图、解码、预览和渲染。
|
||||
- 参数读取按单次操作复用;只在显示内容变化时重建图层列表。
|
||||
- 保留 1.18.0 的后台自动诊断和关窗常驻行为,可在主 App 关闭诊断。
|
||||
|
||||
已完成签名、公证、票据、964 项正式安装原生检查与 FCP 两轮 285 帧追踪验收。人脸转身/遮挡后的偏移仍需检查;本版不宣称提升追踪精度。旧 Metal 光流实验因整段测试丢轨而未启用。
|
||||
|
||||
版本 1.18.1,构建 106;实际编译源码 `1cc7f8edb2acb3cfc62bd72447c2956ad7a01601`。安装前请保存并正常退出 Final Cut Pro、Motion 和大鱼调色主 App。
|
||||
@@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Preserve Dayu Color's beta flag while reusing PKG Forge's authenticated transport.
|
||||
Draft web downloads may require a normal browser session. A supplied download is
|
||||
only accepted when it is a distinct file with the exact verified size and hash.
|
||||
No release, attachment, tag or repository visibility is overwritten.
|
||||
"""
|
||||
import argparse, hashlib, json, runpy, subprocess
|
||||
from pathlib import Path
|
||||
from urllib.parse import quote
|
||||
ROOT=Path(__file__).resolve().parent.parent
|
||||
REPOSITORY='dayu/dayu-color'
|
||||
def git(*args):return subprocess.check_output(['git',*args],cwd=ROOT,text=True,stderr=subprocess.DEVNULL).strip()
|
||||
def digest(path):
|
||||
h=hashlib.sha256()
|
||||
with path.open('rb') as f:
|
||||
for block in iter(lambda:f.read(1024*1024),b''):h.update(block)
|
||||
return h.hexdigest()
|
||||
def main():
|
||||
parser=argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--tag',required=True);parser.add_argument('--notes',required=True,type=Path)
|
||||
parser.add_argument('--verified-download',type=Path)
|
||||
parser.add_argument('--pkg-forge-repo',type=Path,default=Path.home()/'Documents/dayu-git/repositories/pkg-forge')
|
||||
args=parser.parse_args();helper=runpy.run_path(str(args.pkg_forge_repo/'skills/pkg-forge/scripts/publish_release.py'),run_name='dayu_beta_transport')
|
||||
Failure=helper['Failure']
|
||||
try:
|
||||
report=json.loads((ROOT/'verification/Package.json').read_text());expected=json.loads(git('show',args.tag+':verification/Package.json'))
|
||||
assert report['pass'] and not report['testUnsigned'] and report['notarization']['status']=='Accepted'
|
||||
for key in ['sha256','bytes','appCompiledSource','appBuild']:assert report[key]==expected[key]
|
||||
package=Path(report['package']);assert package.stat().st_size==report['bytes'] and digest(package)==report['sha256']
|
||||
subprocess.run(['pkgutil','--check-signature',str(package)],check=True,capture_output=True)
|
||||
subprocess.run(['xcrun','stapler','validate',str(package)],check=True,capture_output=True)
|
||||
subprocess.run(['spctl','--assess','--type','install',str(package)],check=True,capture_output=True)
|
||||
notes=args.notes.read_text().strip();title='大鱼调色 '+report['resources'][0]['version']+'('+report['appBuild']+')'
|
||||
provider=runpy.run_path(str(Path.home()/'.local/bin/dayu-git'),run_name='dayu_beta_credentials');token,source=provider['credential']('dayu');api=helper['API'](token)
|
||||
with helper['repository_lock'](REPOSITORY):
|
||||
commit=git('rev-parse',args.tag+'^{commit}');assert git('ls-remote','origin','refs/tags/'+args.tag).split()[0]==commit
|
||||
assert api.request('GET','/user')['login']=='dayu'
|
||||
prefix='/repos/'+REPOSITORY;repo=api.request('GET',prefix);assert repo['full_name']==REPOSITORY and repo['permissions']['push']
|
||||
try:release=api.request('GET',prefix+'/releases/tags/'+quote(args.tag,safe=''))
|
||||
except Failure as e:
|
||||
if e.status!=404:raise
|
||||
release=api.request('POST',prefix+'/releases',payload=dict(tag_name=args.tag,target_commitish=commit,name=title,body=notes,draft=True,prerelease=True))
|
||||
assert release['tag_name']==args.tag and release['name']==title and release['body'].strip()==notes and release['prerelease']
|
||||
path=prefix+'/releases/'+str(release['id']);assets=api.request('GET',path+'/assets');matches=[a for a in assets if a['name']==package.name];assert len(matches)<=1
|
||||
asset=matches[0] if matches else api.upload(path+'/assets',package);assert asset['name']==package.name and asset['size']==report['bytes']
|
||||
proof=None
|
||||
try:sha,size=api.downloaded_digest(asset['browser_download_url'],report['bytes'])
|
||||
except Failure as e:
|
||||
if e.status!=404 or not release['draft']:raise
|
||||
draft=dict(status='draft-download-required',releaseID=release['id'],releaseURL=release['html_url'],tag=args.tag,commit=commit,assetID=asset['id'],downloadURL=asset['browser_download_url'],bytes=report['bytes'],sha256=report['sha256'])
|
||||
(ROOT/'verification/CMSReleaseDraft.json').write_text(json.dumps(draft,ensure_ascii=False,indent=2)+'\n')
|
||||
if not args.verified_download:
|
||||
print(json.dumps(draft,ensure_ascii=False));return 2
|
||||
download=args.verified_download.expanduser().resolve();assert download!=package.resolve() and download.is_file()
|
||||
sha,size=digest(download),download.stat().st_size;proof=dict(path=str(download),sha256=sha,bytes=size,sourceURL=asset['browser_download_url'])
|
||||
assert sha==report['sha256'] and size==report['bytes']
|
||||
if release['draft']:api.request('PATCH',path,payload={'draft':False})
|
||||
final=api.request('GET',path);confirmed=api.request('GET',path+'/assets')
|
||||
assert not final['draft'] and final['prerelease'] and final['tag_name']==args.tag and final['name']==title and final['body'].strip()==notes
|
||||
assert any(a['id']==asset['id'] and a['size']==size and a['name']==package.name for a in confirmed)
|
||||
sha,size=api.downloaded_digest(asset['browser_download_url'],report['bytes']);assert sha==report['sha256'] and size==report['bytes']
|
||||
assert git('ls-remote','origin','refs/tags/'+args.tag).split()[0]==commit
|
||||
result=dict(passResult=True,repository=REPOSITORY,repositoryID=repo['id'],private=repo['private'],tag=args.tag,releaseCommit=commit,releaseID=final['id'],releaseURL=final['html_url'],prerelease=True,assetID=asset['id'],assetName=asset['name'],downloadURL=asset['browser_download_url'],bytes=size,sha256=sha,existingAssetReused=bool(matches),verification='Full draft download checked before publication; published attachment downloaded and checked again; release, tag and asset read-back verified.',credentialSource=source)
|
||||
if proof:result['draftBrowserDownload']=proof
|
||||
(ROOT/'verification/Release.json').write_text(json.dumps(result,ensure_ascii=False,indent=2)+'\n');print(json.dumps(result,ensure_ascii=False));return 0
|
||||
except Failure as e:
|
||||
print(json.dumps({'error':str(e)},ensure_ascii=False));return 1
|
||||
except (AssertionError,OSError,subprocess.CalledProcessError):
|
||||
print(json.dumps({'error':'Release validation failed. Existing files and remote assets retained; inspect state before retrying.'}));return 1
|
||||
if __name__=='__main__':raise SystemExit(main())
|
||||
@@ -0,0 +1,11 @@
|
||||
大鱼调色 1.19.0(109)公测版
|
||||
|
||||
用于局部马赛克的矩形、椭圆和钢笔蒙版改用成熟的目标外观跟踪。转身时保留蒙版宽高比;短时丢失时冻结可信外观、最多预测约 0.8 秒,重新连续确认目标后用前后端点补齐,末尾未确认预测不写入轨迹。需重新运行跟踪并播放复核。
|
||||
|
||||
预览最多刷新 15 次/秒,只显示最新帧;保留上一版的轻量参数与图层刷新。普通调色蒙版和图章统一改用 Apple Vision 局部配准,保留位置、缩放和旋转;图章取样区和覆盖区分别跟踪。APP 已移除 OpenCV 跟踪依赖。主 APP 关闭窗口后继续后台诊断,可主动退出或关闭诊断。
|
||||
|
||||
修复宿主释放面板父视图后,延后布局访问旧指针导致的插件服务闪退。正式安装后 979 项检查通过,FCP 实片完成 285 帧跟踪并核对转身前后实际马赛克。
|
||||
|
||||
同一段转身素材已比较 CSRT、VitTrack 和本次方案;人工短遮挡、长遮挡停止、突切停止、反向跟踪均有独立回归记录。单段测试不能保证长期遮挡、相似人物交叉或所有素材均不偏移。
|
||||
|
||||
安装前请保存工作,正常退出 Final Cut Pro、Motion 和大鱼调色。固定安装位置:/Library/Plug-Ins/FxPlug/大鱼调色.app。使用最终 Developer ID 签名、公证并粘附票据的 PKG;具体源码、验包和宿主验收见本版本 verification 记录。附匹配 dSYM 供崩溃定位。
|
||||
@@ -0,0 +1,16 @@
|
||||
# 大鱼调色 1.19.1(110)
|
||||
|
||||
修复整合版效果在刚添加、尚未调节参数时严重拖慢预览的问题。空 LUT 槽与零混合黑白设置不再触发人脸检测,未实际生效的肤色保护也不再执行整帧人脸轮廓蒙版。已有调色参数、默认开关、预设和模板保持兼容。
|
||||
|
||||
Apple M4 同一公开人像渲染基准:1080p 平均 324.37 → 5.23 ms,4K 平均 1248.90 → 16.99 ms;这是渲染器耗时,不是 FCP 显示帧率。默认状态的 14 次渲染中人脸检测从 14 次降为 0。实际启用人脸肤色保护时仍执行既有算法,其性能不在此次优化范围。
|
||||
|
||||
994 项正式安装原生检查通过。FCP 12.4 在独立验收项目中完成旧效果默认重播、新添加整合效果默认播放及正式加载核验。未量化宿主掉帧或完成全片导出/跟踪复测。
|
||||
|
||||
适用 Apple Silicon、macOS 14.6 或更高版本。安装前保存并退出 Final Cut Pro / Motion;安装后重新打开宿主。APP 与 PKG 均已 Developer ID 签名、公证 Accepted、票据及 Gatekeeper 验证通过,PKG 20 项展开检查通过。本机为正式 APP 独立安装验收,未重复运行本 PKG 的系统安装脚本。
|
||||
|
||||
实际编译源码:`3642a1dba6cbbc4423bd6928944e0e95d76d9cfa`。
|
||||
安装包:`大鱼调色-1.19.1.pkg`,44488264 字节。
|
||||
SHA-256:`7513be46cc86eb5df26401c9cb4368c8290d276cdcc478e5f16f727a1be4d647`。
|
||||
APP 公证:`c965f687-ab0b-442b-99e1-4b5013065f50`;PKG 公证:`5bf23d87-857d-48d9-856c-f6f05e97867b`。
|
||||
|
||||
附匹配正式二进制 UUID 的 dSYM 符号包,供诊断恢复。
|
||||
@@ -0,0 +1,16 @@
|
||||
# 大鱼调色 1.20.2(113)
|
||||
|
||||
- 蜘蛛盘内显示当前效果的矢量轨迹。色盘保留平滑的色相外圈,中心压暗,半透明轨迹、灰色节点和深色描边便于分辨。
|
||||
- 提亮蜘蛛网格线。蜘蛛盘与控制面板共用 Cb/Cr 色度坐标及肤色参考方向,两处指示线均朝左上。
|
||||
- 新添加的 Final Cut Pro 整合效果、独立模板和肤色工具默认关闭肤色保护。已有项目读取保存的开关状态。
|
||||
|
||||
Apple Silicon,macOS 14.6 或更高版本。安装前保存并退出 Final Cut Pro 和 Motion。APP 及安装包均完成 Developer ID 签名、公证和票据验证,正式安装版通过 1002 项原生检查,并在 Final Cut Pro 12.4 的同一帧实看片中核对网格和两条肤色线。
|
||||
|
||||
| 项目 | 内容 |
|
||||
| --- | --- |
|
||||
| 实际编译提交 | `046411ba8b2c2bf8549601b2e5a080fd9dccd31b` |
|
||||
| 安装包 | `大鱼调色-1.20.2.pkg` |
|
||||
| 字节数 | 44505420 |
|
||||
| SHA-256 | `8edd792c6a9be629263baee68c4c3e7b67221ffd1e995bd8c9ab1f753eefd2b4` |
|
||||
| APP 公证 | `e8c27c08-a78e-4be2-9adf-235e7bfad1f6` |
|
||||
| PKG 公证 | `1a6834df-840f-47da-9ee8-be6a0a808fee` |
|
||||
@@ -0,0 +1,16 @@
|
||||
# 大鱼调色 1.21.0(114)
|
||||
|
||||
- GPU 管线在工具首次使用时准备。未调整的独立效果可跳过通用调色和查找纹理,中性画面保留透明度、负值和超白。
|
||||
- 无蒙版的 CST 合并两次全帧处理。示波器取样与最终输出共用 GPU 提交,保留暂停帧缓存。
|
||||
- 检查器减少重复读参和布局更新,连续修改参数时减少宿主往返。
|
||||
|
||||
Apple Silicon,macOS 14.6 或更高版本。安装前保存并退出 Final Cut Pro 和 Motion。正式安装版通过 1050 项原生检查,包含 21 组独立 CST 对照。Final Cut Pro 12.4 实测播放、混合滑杆、复位和四种示波器。
|
||||
|
||||
| 项目 | 内容 |
|
||||
| --- | --- |
|
||||
| 实际编译提交 | `90e512aabe72fff30046b4bf18d6a35f91c0c113` |
|
||||
| 安装包 | `大鱼调色-1.21.0.pkg` |
|
||||
| 字节数 | 44508770 |
|
||||
| SHA-256 | `ec1a57f23bf369d7a7841848d71d8ab78a7c229cbb5abe1c502e9964f87dbbcb` |
|
||||
| APP 公证 | `505ed5a4-7b32-49a2-8eef-70c7757a98b4` |
|
||||
| PKG 公证 | `29d5f921-6cd4-48a4-856a-2632f9a85e2b` |
|
||||
@@ -0,0 +1,15 @@
|
||||
# 大鱼调色 1.21.1(117)
|
||||
|
||||
- 修复控制面板在片尾暂停时首开没有波形。FCP 12.4 用 60p 素材和 25p 项目实测,首次打开及同帧重开均自动显示四种示波器。
|
||||
- 人脸肤色保护的 Metal 轮廓计算限制到脸部外接范围。M4 同一公开人像的单帧渲染中位数,1080p 从 308.08 降至 13.47 ms,4K 从 1176.07 降至 22.22 ms。六组对照末帧逐字节一致。
|
||||
|
||||
Apple Silicon,macOS 14.6 或更高版本。安装前保存并退出 Final Cut Pro 和 Motion。已通过 1008 项正式安装原生检查与 20 项 PKG 展开检查。
|
||||
|
||||
| 项目 | 内容 |
|
||||
| --- | --- |
|
||||
| 实际编译提交 | `98d80970e83e30e4883a76d8f740f2fca5d05e7c` |
|
||||
| 安装包 | `大鱼调色-1.21.1.pkg` |
|
||||
| 字节数 | 44509639 |
|
||||
| SHA-256 | `bdc63a1b1030ccad6960031cb9f2ec8297aa90f8d4acce2057eb5ba7750a289b` |
|
||||
| APP 公证 | `eeda9002-5e87-4a33-83d3-9163a14283ba` |
|
||||
| PKG 公证 | `dbddc544-aa94-4279-8f92-37597c264313` |
|
||||
@@ -0,0 +1,16 @@
|
||||
# 大鱼调色 1.21.2(119)
|
||||
|
||||
- 局部马赛克的 Metal 渲染跳过钢笔轮廓外的逐段计算,无人脸命中时跳过马赛克通道。M4 4K 双钢笔蒙版中位数从 42.75 降到 13.84 ms。
|
||||
- 指定目标追踪省去不需要的整帧灰度处理。M4 4K 取图预处理中位数从 6.00 降到 3.54 ms。相同输入的 192 张渲染输出及 24 张彩色追踪输入逐字节一致。
|
||||
- 检查宿主参考时间,避免对无效时间发起分析。FCP 12.4 的有效画面复测写入 27 个正向轨迹键和 284 个双向轨迹键,并核对随动遮挡。
|
||||
|
||||
Apple Silicon,macOS 14.6 或更高版本。安装前保存并退出 Final Cut Pro 和 Motion。已通过 1010 项正式安装原生检查、17 套模板核对和 20 项安装包展开检查。耗时为渲染或取图阶段测试。
|
||||
|
||||
| 项目 | 内容 |
|
||||
| --- | --- |
|
||||
| 实际编译提交 | `6a979f16a828e17284c8f04647c79ac65811d3dc` |
|
||||
| 安装包 | `大鱼调色-1.21.2.pkg` |
|
||||
| 字节数 | 44509704 |
|
||||
| SHA-256 | `01ee76d2302d0d1fc54b1ff5a3397c386467324db5f391d0b5dfd48c1e93b9df` |
|
||||
| APP 公证 | `7344dd1a-62ba-4e82-8dc1-36cb220c4942` |
|
||||
| PKG 公证 | `add05c02-616e-471f-a53a-8aa7c230ef52` |
|
||||
@@ -0,0 +1,16 @@
|
||||
# 大鱼调色 1.21.3(120)
|
||||
|
||||
- LUT 浏览器右侧加入同帧划像。左侧显示加载当前 LUT 前的画面,右侧预览 100% LUT。拖动图上的竖线或下方滑杆即可对比。
|
||||
- “高清预览”从 640×360 源帧生成双倍像素缩略图,设置在重开浏览器后保留。
|
||||
- 目标蒙版追踪由 Metal 直接写入 Vision 可读的共享像素缓冲。M4 上用 FCP 12.4 的同一段 4K 片段实测,三次热态完整正向追踪中位数由 3.682 降到 3.217 秒,缩短 12.6%。285 个轨迹键和 285 帧 4K 马赛克成片逐一核对一致。
|
||||
|
||||
Apple Silicon,macOS 14.6 或更高版本。安装前保存并退出 Final Cut Pro 和 Motion。1012 项正式安装原生检查、17 套模板与 20 项安装包展开检查通过。
|
||||
|
||||
| 项目 | 内容 |
|
||||
| --- | --- |
|
||||
| 实际编译提交 | `43364549327470291abd82ca1d0eded2becd1579` |
|
||||
| 安装包 | `大鱼调色-1.21.3.pkg` |
|
||||
| 字节数 | 44527074 |
|
||||
| SHA-256 | `99872aee9e3e0a25ed17f3fb173b20b8549dd9473c6fccd3954dd09836213ff9` |
|
||||
| APP 公证 | `6f1e34d4-7d24-4a73-9a8b-af41e132d4ba` |
|
||||
| PKG 公证 | `ba16473c-fcf2-4700-a7aa-df768d603724` |
|
||||
@@ -0,0 +1,15 @@
|
||||
# 大鱼调色 1.21.4(121)
|
||||
|
||||
- 曲线背景直方图将线性 Rec.709 输出换算为视频电平再统计。FCP 12.4 同一帧 S-Log3 灰片对照中,主峰与高光小峰回到原生示波器对应区间。
|
||||
- 改动只作用于检查器和画布的曲线直方图。保留 256 档、320×180 采样和 0–255 曲线坐标。
|
||||
|
||||
适用于 Apple Silicon 和 macOS 14.6 或更新版本。安装前保存并退出 Final Cut Pro 和 Motion。1014 项正式安装自检、17 套模板和 20 项安装包展开检查通过。
|
||||
|
||||
| 项目 | 内容 |
|
||||
| --- | --- |
|
||||
| 实际编译提交 | `7f2917393c89cdc8935b494106e09b2851378ec5` |
|
||||
| 安装包 | `大鱼调色-1.21.4.pkg` |
|
||||
| 字节数 | 44527149 |
|
||||
| SHA-256 | `eb0d4fd257a30705d3c4614f0bfca6d29b492199384fea8f2e6ccb7c50a674dc` |
|
||||
| APP 公证 | `f587be58-4008-42a3-8261-050988eae9b8` |
|
||||
| PKG 公证 | `17666d78-e94e-4886-9c5d-a46d11f1b4cb` |
|
||||
@@ -0,0 +1,15 @@
|
||||
# 大鱼调色 1.21.5(123)
|
||||
|
||||
- LUT 浏览器的标准和高清缩略图按源帧比例显示。网格、列表和划像完整保留竖屏、方形及宽画幅的画面。
|
||||
- 本次打开期间,点选 LUT 只更新选中状态和对比画面。成功应用的 LUT 会在下次打开时按最近使用优先排列。
|
||||
|
||||
适用于 Apple Silicon 和 macOS 14.6 或更新版本。安装前保存并退出 Final Cut Pro 和 Motion。已通过 FCP 12.4 竖屏实测、1018 项正式安装自检、30 项浏览器检查和安装包展开校验。
|
||||
|
||||
| 项目 | 内容 |
|
||||
| --- | --- |
|
||||
| 实际编译提交 | `8ca33a78fd224d13fffb1092c704adfce6cda12b` |
|
||||
| 安装包 | `大鱼调色-1.21.5.pkg` |
|
||||
| 字节数 | 44527441 |
|
||||
| SHA-256 | `01e63b554ee236ca3bf3b8f1d85eeaf3cf9c933a03c0e3cb4fb5256aafa6cf72` |
|
||||
| APP 公证 | `5b1bf442-0460-44c9-9d99-9bcd18788c32` |
|
||||
| PKG 公证 | `98ab3da4-515d-4b07-9692-9e357b130880` |
|
||||
@@ -0,0 +1,16 @@
|
||||
# 大鱼调色 1.21.6(124)
|
||||
|
||||
- 点选已有预览的 LUT 时,缩略图和右侧划像直接复用已生成的位图。
|
||||
- 同一播放头位置连续切换 LUT 时保留预览;移动播放头后在后台更新,等新图就绪再替换。
|
||||
- 标准和高清模式下,缩略图与划像共用同一份源帧。
|
||||
|
||||
适用于 Apple Silicon 和 macOS 14.6 或更新版本。安装前保存并退出 Final Cut Pro 和 Motion。已完成 FCP 12.4 竖屏验收、1018 项安装自检、40 项浏览器检查和安装包展开校验。
|
||||
|
||||
| 项目 | 内容 |
|
||||
| --- | --- |
|
||||
| 实际编译提交 | `e0bd8342c0b2231028af64abd7b544b2be8f29d7` |
|
||||
| 安装包 | `大鱼调色-1.21.6.pkg` |
|
||||
| 字节数 | 44527921 |
|
||||
| SHA-256 | `c92082550720225d9ea7a0f8b0f7315f19a438d9c717ab637a476b6c678f0ad6` |
|
||||
| APP 公证 | `79da8471-e33a-4463-86e9-8c5c114b149b` |
|
||||
| PKG 公证 | `3ea27bc7-b29e-4fd9-8a3f-aabf25d7e200` |
|
||||
@@ -0,0 +1,16 @@
|
||||
# 大鱼调色 1.21.7(125)
|
||||
|
||||
- 蜘蛛盘拖动时先更新本地控制点,合并宿主写入,松手补交最后位置。一次拖动可一次撤销。
|
||||
- 检查器和工作台在拖动中复用已有示波轨迹,松手后恢复从最终输出取样。画布合并尚未处理的蜘蛛盘事件。
|
||||
- FCP 12.4 在合成色卡项目通过工作台拖动和宿主撤销验收,正式安装版通过 1,022 项自检。
|
||||
|
||||
适用于 Apple Silicon 和 macOS 14.6 或更新版本。安装前保存并退出 Final Cut Pro 和 Motion。
|
||||
|
||||
| 项目 | 内容 |
|
||||
| --- | --- |
|
||||
| 实际编译提交 | `5aae670f56201a17cffe6aff3624d1b8cfad2308` |
|
||||
| 安装包 | `大鱼调色-1.21.7.pkg` |
|
||||
| 字节数 | 44528083 |
|
||||
| SHA-256 | `e4d327d4a4fdbcb025e17dd6aa1e0e884c435392b70bcc2e7402d100c07a10ef` |
|
||||
| APP 公证 | `0b71188e-188c-4c78-9087-28fa62a87a51` |
|
||||
| PKG 公证 | `e9cab355-85bf-4a16-922b-a811aacb5b05` |
|
||||
@@ -0,0 +1,17 @@
|
||||
# 大鱼调色 1.21.8(126)
|
||||
|
||||
- 合并多层调色的 GPU 工作,减少颜色转换、蒙版混合和预览取样之间的等待。
|
||||
- 复用已解析的宿主色彩配置。几何蒙版跳过色键转换,保留羽化和部分覆盖的原有混合方式。
|
||||
- 曲线、一级白平衡轮和颜色分级轮在拖动时合并参数写入,松手提交最终值,每次拖动可一次撤销。
|
||||
- Apple M4 的 4K 曝光加 HSL 蒙版渲染约 87.7 → 75.0 毫秒,128 帧测试输出逐字节一致。正式安装通过 1,028 项自检与 Final Cut Pro 12.4 工作台验收。
|
||||
|
||||
适用于 Apple Silicon 和 macOS 14.6 或更新版本。安装前保存并退出 Final Cut Pro 和 Motion。
|
||||
|
||||
| 项目 | 内容 |
|
||||
| --- | --- |
|
||||
| 实际编译提交 | `38e9fb25a21d7ba573f09093ea4ca45a79664cf5` |
|
||||
| 安装包 | `大鱼调色-1.21.8.pkg` |
|
||||
| 字节数 | 44529845 |
|
||||
| SHA-256 | `8df87b7762f8a0d11b32e6947f5e4f3a358dce7e44505b20f8534b3a0e3e14b9` |
|
||||
| APP 公证 | `c439ff82-db8e-44a9-83e4-68c62588a2de` |
|
||||
| PKG 公证 | `2aa1a8fa-d48f-45a5-8a56-9ac084d8c7b3` |
|
||||
@@ -0,0 +1,19 @@
|
||||
# 大鱼调色 1.22.1(133)
|
||||
|
||||
打开 LUT 浏览器即可批量预览在线效果,在线与本地共用分类栏,点击即可安装并应用。
|
||||
|
||||
- 打开 LUT 浏览器时自动使用当前缓存帧,批量加载当前页在线 LUT 的效果预览;保留“更新预览”按钮。首次没有缓存帧时自动等待首帧,播放过程中不持续上传。
|
||||
- 在线与本地合并到同一分类栏。“在线 LUT”总分类包含在线子分类;本地文件夹支持二级及更深层级,可展开或折叠。
|
||||
- 点击在线 LUT 后,校验下载并安装到本地“已安装 LUT / 对应分类”,随后应用到当前风格层,供离线使用。重复安装相同文件会复用已有副本。
|
||||
- 后台预载失败不影响本地 LUT 与文件夹操作;在线预览并发限制为 2,切换分类与滚动时复用已生成图像。
|
||||
|
||||
适用于 Apple Silicon Mac,macOS 14.6 或更高版本;Final Cut Pro / Motion 原生 FxPlug 4。
|
||||
打开浏览器时发送当前缓存帧的 PNG 缩略图到 dayu.media 用于在线预览,最长边 640;服务器内存处理,不保存帧、不上传视频文件。在线权限规则保持不变。
|
||||
|
||||
验证:68 项在线与分类合约、40 项本地浏览器回归、1,028 项正式安装自检及 FCP 12.4 自动预览、安装应用、划像与播放通过。APP 和 PKG 均已通过 Apple 公证、票据及系统安全检查,安装包20项展开检查通过。Motion 未复测;本轮验收使用独立正式安装的 APP,未再次运行本 PKG 的系统安装脚本。
|
||||
|
||||
安装包:`大鱼调色-1.22.1.pkg`,44,557,648 字节。
|
||||
SHA-256:`a5f5a335f7f1d3d8c42f829da941da75dcfd974febcc75d16cab26499c757663`
|
||||
实际 APP 编译提交:`7f833757da243f2a4610c23c36ec278b44c80ad4`。
|
||||
|
||||
正式安装位置:`/Library/Plug-Ins/FxPlug/大鱼调色.app`。安装前保存工作并正常退出 Final Cut Pro / Motion 和大鱼调色。
|
||||
@@ -0,0 +1,16 @@
|
||||
大鱼调色 1.22.2(137)公测版
|
||||
|
||||
- 仿制图章支持纯色取样随动、独立参考框和手工关键帧,保存跟踪失败原因;修正取样和旋转随动。
|
||||
- 主App精简为在线LUT、插件连接、版本更新、诊断四张卡片;帮助、账号权限和隐私说明按需打开。
|
||||
- 修复Xcode Metal组件定位及重复编译。
|
||||
|
||||
Apple Silicon,macOS 14.6及以上。正式安装版通过1037项原生检查;FCP 12.4合成素材跟踪、重开、手工取样、撤销/重做通过,用户已手动验收图章。Motion、变速片段及用户原始素材本轮未复测。
|
||||
|
||||
已知限制:FCP 12.4中“最后可信帧”自动跳转仍可能失败,界面显示精确片段时间供手动定位。
|
||||
|
||||
APP与PKG均由B3W25FX5H5团队Developer ID签名、公证Accepted并粘附票据,Gatekeeper通过。PKG完成20项结构及载荷检查;本轮未再次执行系统安装器,正式APP已有独立安装和宿主验收。
|
||||
|
||||
实际编译源码:aa60572b517ba7dd8fbd9d2f0d46bd810cc3e1a6
|
||||
安装包:大鱼调色-1.22.2.pkg
|
||||
字节数:44570793
|
||||
SHA-256:237baadbdfdfdf77de8529e9e05602f1ddecf5943f44d0fe80ae0a4c3eef5843
|
||||
@@ -0,0 +1,16 @@
|
||||
# 大鱼调色 1.22.5(142)
|
||||
|
||||
- 修复画面曲线松手后复原、畸变控件拖动无效和画面白平衡吸管无法保存的问题。
|
||||
- 控制面板与插件检查器使用同一份模块和参数,新增模块及两边修改同步刷新。
|
||||
- LUT 浏览器增加五个风格位置的强度滑杆和百分比输入,与检查器对应。
|
||||
- 应用局部马赛克后保留蒙版选择和跟踪编辑入口。
|
||||
- 图章操作提示改为半透明、鼠标可穿透的小浮层,两秒后自动消失。
|
||||
- 区域跟踪保持蒙版原有宽高比,支持整体平移、旋转和等比缩放,避免正方形逐渐拉成长方形。
|
||||
|
||||
支持 Apple Silicon,macOS 14.6 或更高版本。安装后重新打开 Final Cut Pro / Motion。
|
||||
|
||||
原生模型及 Metal 集成检查1113项通过;FCP12.4正式安装已验证新增模块、37%/62%双向强度刷新、100帧合成运动的蒙版宽高比保持及冷重开持久化。
|
||||
|
||||
画面控件拖动与白平衡吸管的物理操作、提示两秒消失未直接完成宿主界面验收;同帧写入修复已有原生桥接回归。复杂实拍运动、遮挡、透视变化及Motion/HDR/变速仍需复测。
|
||||
|
||||
正式PKG:44,585,448字节;SHA-256 `194c636978289dda73860a9409401f3063d153c6e3fdafdfc98bc52c760a2a2a`。Developer ID Installer签名、Apple公证Accepted、票据、Gatekeeper和20项展开验包通过。本轮未再次运行系统安装器,正式APP已有独立安装与FCP验收。
|
||||
@@ -0,0 +1,14 @@
|
||||
# 大鱼调色 1.22.6(143)
|
||||
|
||||
- 控制面板各调色图层、检查器各模块新增整体强度,可在 0–100% 之间调整;保留模块参数、LUT 与蒙版,两处同步并支持撤销及预设保存。
|
||||
- 控制面板顶部显示图标和中文按钮名,自适应换行;屏幕工具的操作说明、实时提示与详情入口集中在面板。
|
||||
- 一级调色分为“常用/影调/更多设置”,改为纵向滚动;其他横向编辑区常显滚动条。
|
||||
- 精简紧凑窗口的提示区与跟踪预览,保留更多参数和画面空间。
|
||||
|
||||
Apple Silicon,macOS 14.6 或更新版本;Final Cut Pro / Motion FxPlug4。退出宿主后安装,再重新打开。固定插件路径 `/Library/Plug-Ins/FxPlug/大鱼调色.app`。
|
||||
|
||||
整体强度在统一色彩管线中混合完整模块结果;旧工程沿用既有逐模块蒙版混合方式。输出转换强度调节色调映射的混合,色域与曲线解释仍按输出域和宿主适配处理。既有图章“最后可信帧”在 FCP 12.4 仍可能需要手动按时间定位。
|
||||
|
||||
本轮未修改站点文章和主 APP 更新通道。签名、公证、安装、宿主与下载校验结果见对应版本的 verification 记录;未验收的复杂素材、Motion、HDR 和变速不扩大声明。
|
||||
|
||||
正式 PKG:44,599,258 字节,SHA-256 `e43967ea2efa5ee83b7426e3cb28cefc9e46da0eb86500a5af459c652949eaa9`。APP 与 PKG 均经 Developer ID 签名、Apple 公证和票据验证;1130 项构建与正式安装检查及 FCP 12.4 双向强度、冷重开保存和分组滚动通过。
|
||||
@@ -0,0 +1,27 @@
|
||||
# 仿制图章修复:待正式验收及发布
|
||||
|
||||
此为本地发布草稿。尚未生成正式版本号、签名公证、安装包或线上附件;不得用此草稿宣称已发布。须在正式安装路径的 FCP 验收通过后,才更新文章 15792、安装包与对应 Release。
|
||||
|
||||
## 更新说明草稿
|
||||
|
||||
- 新建图章默认“取样跟随修复区移动”,干净的纯色取样区域无需独立识别纹理。已有图章保留原模式,可在编辑面板切换。
|
||||
- 增加“选择跟踪参考”:可框选同一表面上有纹理的区域,用于带动小范围修复。绿色框用于跟踪,黄色椭圆仍决定实际覆盖范围。
|
||||
- 增加“手工关键帧”:自动跟踪前即可建立首个关键帧,再到其它帧调整修复区与取样点,帧间自动过渡。
|
||||
- 跟踪停止后在画布持续显示原因、停止时间和最后可信位置。即使首帧失败,关闭后重新打开仍能读取原因;可点击“最后可信帧”定位继续处理。
|
||||
- 双向跟踪在发生实际失败时明确停止;宿主长时间未返回新帧时显示超时原因。
|
||||
|
||||
## 使用说明草稿
|
||||
|
||||
1. 点击图章,选择与瑕疵亮度、颜色和纹理接近的干净取样中心,再拖出略大于瑕疵的黄色覆盖椭圆,调整羽化。
|
||||
2. 固定在画面坐标上的污点直接覆盖即可;需要随表面移动时,再启动跟踪。
|
||||
3. 修复区缺少纹理时,点击“选择跟踪参考”,在同一表面拖出包含清晰细节的绿色框。不能选择另一个独立运动物体或不同景深的背景作参考。
|
||||
4. 干净取样区为纯色时,选择“取样跟随修复区移动”;仅在取样区和修复区确实分别运动、且两者都有足够细节时,使用“取样区独立跟踪”。
|
||||
5. 自动跟踪停止后先阅读画布原因。存在可信轨迹时,点击“最后可信帧”,校正位置或重新选择参考再继续。没有可用参考时,点击“手工关键帧”,逐段设置修复位置。
|
||||
|
||||
## 发布门槛
|
||||
|
||||
- 完整 Release 构建、正式签名、公证 Accepted、票据及唯一正式安装通过。
|
||||
- 正式安装原生自检包含新增宿主回归,并且没有既有检查失败。
|
||||
- FCP 实际检查:纯色取样跟随、纯色小修复区与独立参考、首帧失败提示与冷重开、部分失败后定位、正反双向、手工修复与取样关键帧、撤销、存储及画布控件布局。
|
||||
- PKG 签名、公证、验包;Git 标签、Release 附件及完整下载校验通过。
|
||||
- 用当时的线上文章作为最新基线,仅更新版本、说明及主下载项;保留价格、会员权益、历史内容和图片,上传后完整下载校验并回读前台。
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"title": "大鱼调色 1.10.0 公测版:紧急 UI 更新,画布工具与独立工作区",
|
||||
"status": "publish",
|
||||
"content": "<!-- wp:paragraph -->\n<p>大鱼调色 1.10.0 公测版是一款适用于 Final Cut Pro 与 Motion 的原生 FxPlug 4 调色插件。从素材色彩还原、基础调整,到 LUT 风格、胶片质感和局部蒙版,可直接在剪辑时间线里完成。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>本篇下载售价为50元,站内有效会员免费。提供已签名、公证的完整 PKG 安装包,版本 1.10.0,构建 72。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.10.0 紧急 UI 更新</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>本次紧急更新重新安排了调色工具的位置:画布左侧使用纵向工具条,曲线、色轮等调整控件直接叠在画面中;示波器和 LUT 预览放进画布外的独立工作区。需要精确参数时,仍可使用右侧检查器。下方两张为新版实际界面,分别展示深色与浅色模式。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:list -->\n<ul class=\"wp-block-list\"><li><strong>纵向工具条</strong>:从画布侧边切换工具,工具面板可以独立移动、折叠和关闭,也可同时打开多个工具。</li><li><strong>画布内调整</strong>:曲线支持直接添加、移动和删除控制点,并切换 RGB、红、绿、蓝通道;颜色分级提供直接调节的色轮。一次拖动作为一次操作,可用 ⌘Z 撤销。</li><li><strong>画布外工作区</strong>:通过“工作区 · 示波器 / LUT”打开,切换亮度波形、RGB 分列或直方图;“风格1 LUT”页使用当前画面预览 LUT,并明确应用到风格1。</li><li><strong>保留已有调色</strong>:原有调色参数和预设继续使用,深色、浅色模式均可切换。</li></ul>\n<!-- /wp:list -->\n\n<!-- wp:paragraph -->\n<p>工作区示波器用于 sRGB 显示参考,采样当前插件的处理输出,不包含其后的其他效果或宿主显示转换;它不替代 HDR/IRE 精密测量。宿主仅提供分块画面时,会标明当前分块。移动播放头后随新画面更新。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>此版本已完成正式签名、公证及安装验证,并在 Final Cut Pro 中实测曲线拖点与一次撤销、LUT 预览、示波器随播放头更新。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:image {\"id\":15840,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n<figure class=\"wp-block-image size-full\"><img src=\"https://dayu.media/wp-content/uploads/2026/11/1793804584-5bc2fbe021e0e8f.png\" alt=\"大鱼调色 1.10.0 深色模式:画布左侧纵向工具条、检查器与画布外示波器工作区\" class=\"wp-image-15840\" width=\"1628\" height=\"1258\" /><figcaption class=\"wp-element-caption\">大鱼调色 1.10.0 深色模式:纵向画布工具与独立示波器工作区</figcaption></figure>\n<!-- /wp:image -->\n\n<!-- wp:image {\"id\":15841,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n<figure class=\"wp-block-image size-full\"><img src=\"https://dayu.media/wp-content/uploads/2026/11/1793804588-7ea8d6f6f860d66.png\" alt=\"大鱼调色 1.10.0 浅色模式:浅色纵向工具条、调色检查器与画布外直方图工作区\" class=\"wp-image-15841\" width=\"1664\" height=\"1068\" /><figcaption class=\"wp-element-caption\">大鱼调色 1.10.0 浅色模式:纵向画布工具与独立示波器工作区</figcaption></figure>\n<!-- /wp:image -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">在时间线里完成调色</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>色彩管理与基础调整</strong>:支持 CST 输入、工作空间和输出转换,并提供曝光、白平衡、曲线、HSL、色轮及蜘蛛盘等调节工具。首次使用时,请在一级调色中选择与素材相符的输入曲线和色域。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>LUT 与风格管理</strong>:通过缩略图浏览、收藏和预览管理常用 LUT,支持自选 LUT 文件与文件夹。完整预设用于保存组合调节;适合静态颜色变换的处理可导出 Cube LUT,颗粒、晕光、蒙版等时间或空间效果不属于静态 LUT 的保存范围。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>胶片模拟与印片外观</strong>:包含减色、颗粒、晕光、辉光、暗角及通道混合器,提供 Kodak 2383、Fuji 3513 等八种印片外观,可独立调整强度。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>局部蒙版与工具叠层</strong>:可针对单独工具添加蒙版、建立相邻叠层,并使用关键帧与跟踪处理局部区域,方便细调画面的不同部分。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">历史更新</h2>\n<!-- /wp:heading -->\n\n<!-- wp:heading {\"level\":3} -->\n<h3 class=\"wp-block-heading\">1.7.4:删除模块与图层</h3>\n<!-- /wp:heading -->\n\n<!-- wp:paragrLine truncated
|
||||
"excerpt": "大鱼调色 1.10.0 紧急 UI 更新:纵向工具条、画布内曲线与色轮、画布外示波器及 LUT 预览工作区,提供深浅色模式。完整 PKG 已签名公证,售价50元,站内有效会员免费。",
|
||||
"seo": {
|
||||
"title": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色1.10.0公测版:紧急UI更新,画布工具与独立工作区"
|
||||
},
|
||||
"description": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色1.10.0公测版紧急UI更新:纵向工具条、画布内曲线与色轮、独立示波器和LUT预览工作区,支持深浅色模式。适用于Apple Silicon、macOS14.6及以上,已在Final Cut Pro12.4实测。完整PKG已签名公证,售价50元,站内有效会员免费。"
|
||||
},
|
||||
"keywords": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色,Final Cut Pro,调色插件,FxPlug4,紧急UI更新,画布曲线,色轮,示波器,LUT预览,会员免费"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
<!-- wp:paragraph -->
|
||||
<p>大鱼调色 1.10.0 公测版是一款适用于 Final Cut Pro 与 Motion 的原生 FxPlug 4 调色插件。从素材色彩还原、基础调整,到 LUT 风格、胶片质感和局部蒙版,可直接在剪辑时间线里完成。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>本篇下载售价为50元,站内有效会员免费。提供已签名、公证的完整 PKG 安装包,版本 1.10.0,构建 72。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading">1.10.0 紧急 UI 更新</h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>本次紧急更新重新安排了调色工具的位置:画布左侧使用纵向工具条,曲线、色轮等调整控件直接叠在画面中;示波器和 LUT 预览放进画布外的独立工作区。需要精确参数时,仍可使用右侧检查器。下方两张为新版实际界面,分别展示深色与浅色模式。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:list -->
|
||||
<ul class="wp-block-list"><li><strong>纵向工具条</strong>:从画布侧边切换工具,工具面板可以独立移动、折叠和关闭,也可同时打开多个工具。</li><li><strong>画布内调整</strong>:曲线支持直接添加、移动和删除控制点,并切换 RGB、红、绿、蓝通道;颜色分级提供直接调节的色轮。一次拖动作为一次操作,可用 ⌘Z 撤销。</li><li><strong>画布外工作区</strong>:通过“工作区 · 示波器 / LUT”打开,切换亮度波形、RGB 分列或直方图;“风格1 LUT”页使用当前画面预览 LUT,并明确应用到风格1。</li><li><strong>保留已有调色</strong>:原有调色参数和预设继续使用,深色、浅色模式均可切换。</li></ul>
|
||||
<!-- /wp:list -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>工作区示波器用于 sRGB 显示参考,采样当前插件的处理输出,不包含其后的其他效果或宿主显示转换;它不替代 HDR/IRE 精密测量。宿主仅提供分块画面时,会标明当前分块。移动播放头后随新画面更新。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>此版本已完成正式签名、公证及安装验证,并在 Final Cut Pro 中实测曲线拖点与一次撤销、LUT 预览、示波器随播放头更新。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:image {"id":15840,"sizeSlug":"full","linkDestination":"none"} -->
|
||||
<figure class="wp-block-image size-full"><img src="https://dayu.media/wp-content/uploads/2026/11/1793804584-5bc2fbe021e0e8f.png" alt="大鱼调色 1.10.0 深色模式:画布左侧纵向工具条、检查器与画布外示波器工作区" class="wp-image-15840" width="1628" height="1258" /><figcaption class="wp-element-caption">大鱼调色 1.10.0 深色模式:纵向画布工具与独立示波器工作区</figcaption></figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:image {"id":15841,"sizeSlug":"full","linkDestination":"none"} -->
|
||||
<figure class="wp-block-image size-full"><img src="https://dayu.media/wp-content/uploads/2026/11/1793804588-7ea8d6f6f860d66.png" alt="大鱼调色 1.10.0 浅色模式:浅色纵向工具条、调色检查器与画布外直方图工作区" class="wp-image-15841" width="1664" height="1068" /><figcaption class="wp-element-caption">大鱼调色 1.10.0 浅色模式:纵向画布工具与独立示波器工作区</figcaption></figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading">在时间线里完成调色</h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p><strong>色彩管理与基础调整</strong>:支持 CST 输入、工作空间和输出转换,并提供曝光、白平衡、曲线、HSL、色轮及蜘蛛盘等调节工具。首次使用时,请在一级调色中选择与素材相符的输入曲线和色域。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p><strong>LUT 与风格管理</strong>:通过缩略图浏览、收藏和预览管理常用 LUT,支持自选 LUT 文件与文件夹。完整预设用于保存组合调节;适合静态颜色变换的处理可导出 Cube LUT,颗粒、晕光、蒙版等时间或空间效果不属于静态 LUT 的保存范围。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p><strong>胶片模拟与印片外观</strong>:包含减色、颗粒、晕光、辉光、暗角及通道混合器,提供 Kodak 2383、Fuji 3513 等八种印片外观,可独立调整强度。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p><strong>局部蒙版与工具叠层</strong>:可针对单独工具添加蒙版、建立相邻叠层,并使用关键帧与跟踪处理局部区域,方便细调画面的不同部分。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading">历史更新</h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:heading {"level":3} -->
|
||||
<h3 class="wp-block-heading">1.7.4:删除模块与图层</h3>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>每个模块和新增图层的标题增加减号按钮,可删除不需要的层并让它从界面消失。删除时一并还原该模块的参数、清除关键帧及所属 LUT、蒙版等设置,避免隐藏后仍影响画面;其他模块保持原设置。误删可通过 Final Cut Pro 的一次撤销恢复。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>顶部“添加模块”菜单可重新添加任意模块,新层从初始参数开始,不继承已删除层的设置。原有“再加一层”继续保留,删除状态随工程和完整预设保存。本机已验证删除、撤销、重做、重新添加与退出重开;本版继续保留此前的 Cube 兼容与“更多空间”窗口修正。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading {"level":3} -->
|
||||
<h3 class="wp-block-heading">1.7.3:显示缩放下的 LUT 窗口</h3>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>修正部分显示器选择“更多空间”后,LUT 缩略图浏览库出现大片灰色、内容偏移和裁切的问题。首次打开即可完整显示搜索、文件夹、预览和底部控件,无需点击窗口绿色按钮恢复;原有窗口缩放、网格/列表与缩略图设置继续保留。本机已在相同显示设置下验证首次打开和重新启动 Final Cut Pro 后打开正常。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading {"level":3} -->
|
||||
<h3 class="wp-block-heading">1.7.2:LUT 浏览窗口</h3>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>LUT 缩略图浏览库改为跟随 Final Cut Pro 提供的实际窗口内容区域,避免旧窗口位置和尺寸记录干扰布局;窗口变化时同步调整深色内容区、列表及底部控件。缩略图大小、网格/列表、侧栏、分类和最近使用设置继续保留。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading {"level":3} -->
|
||||
<h3 class="wp-block-heading">1.7.1:LUT 导入兼容</h3>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>改善 Cube LUT 导入兼容性,可读取部分在颜色数据行夹带文字标记的文件。保留可读取的数值,无法读取的后续通道按 0 处理,各行位置保持不变;这与本机 Final Cut Pro“自定 LUT”处理同类文件的方式一致。原有文件编码支持、缩略图浏览与预览功能继续保留。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading {"level":3} -->
|
||||
<h3 class="wp-block-heading">1.7.0 公测新增</h3>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>主 App 启动时自动检查新版,发现更新后由用户确认下载。完整更新包经过完整性、签名和产品版本校验,保存并退出 Final Cut Pro / Motion 后,通过系统安装器完成升级。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>公测诊断用于记录系统与版本、插件初始化、界面创建、管线准备和首次渲染的耗时,以及错误和本插件崩溃摘要。它在后台限量排队、离线重试,不上传素材、LUT、预设、账号、硬件 UUID 或原始崩溃文件;诊断保留30天,可在主 App 关闭。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>本版处于公测阶段,部分用户反馈的偶发加载无响应仍在收集信息,尚未确认根因。遇到问题时,请附主 App 显示的报告标识、发生时间、Mac 芯片、macOS 和 FCP 版本,便于关联加载过程。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading">兼容与安装内容</h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:list -->
|
||||
<ul class="wp-block-list"><li>Apple Silicon Mac,macOS 14.6 或更新版本;本发行构建不支持 Intel Mac。</li><li>本机已在 Final Cut Pro 12.4 验证加载、界面和调节,其他宿主版本的兼容情况继续通过公测收集。</li><li>主 App 固定安装到 /Library/Plug-Ins/FxPlug/大鱼调色.app,FCP 效果模板安装到当前登录用户的“影片/Motion Templates/Effects/大鱼调色”。</li><li>安装包不包含用户自选素材、LUT 或个人预设。</li></ul>
|
||||
<!-- /wp:list -->
|
||||
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading">安装</h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>安装前,请先退出 Final Cut Pro(FCPX)和 Motion,并在整个安装过程中保持它们关闭。PKG 通常会检查这两个程序是否正在运行;如果安装器提示关闭,请退出对应程序后继续安装。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>运行本资源提供的 PKG 安装包,安装包包含完整的大鱼调色主 App、内嵌 FxPlug 插件和效果模板,并自动完成安装与插件注册,无需另行安装运行依赖。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>本公测版不需要登录或输入激活码。安装完成后打开主 App「大鱼调色」,它会检查并提交插件注册;成功后显示3秒倒计时再退出。点击“查看功能介绍”可以保留窗口,查看更新和诊断设置。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading">使用</h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>安装和注册完成后,打开 Final Cut Pro。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>在“效果”中找到“大鱼调色”文件夹,选择“大鱼调色”即可使用。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>选中添加了插件的片段后,从画布左侧纵向工具条打开调色面板。拖动面板标题可调整位置;在检查器点击“工作区 · 示波器 / LUT”,可打开画布外的辅助窗口。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading">常见问题</h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>如果插件失效或显示红色警告,可能是系统插件缓存异常。先退出 Final Cut Pro,再重新打开一次插件主 App,然后重新启动 Final Cut Pro 查看插件是否恢复。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>本资源的主 App「大鱼调色」安装在下面的实际路径。将以下命令复制到“终端”运行,即可打开主 App:</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:code -->
|
||||
<pre class="wp-block-code"><code>open '/Library/Plug-Ins/FxPlug/大鱼调色.app'</code></pre>
|
||||
<!-- /wp:code -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>若仍显示红色警告或长时间停在加载中,请核对系统及 FCP 版本,并通过主 App 的“发送诊断摘要”反馈报告标识和发生时间。公测阶段的偶发加载无响应仍在收集信息,重新注册并不能保证解决所有问题。</p>
|
||||
<!-- /wp:paragraph -->
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"articleID": 15792,
|
||||
"assets": [
|
||||
{
|
||||
"file": "dayu-color-1.10.0-interface-01.png",
|
||||
"role": "body-interface-dark",
|
||||
"bytes": 577587,
|
||||
"sha256": "4e948f0599700ddd13f2938a1aac892dea1b6ff60423c2ea15a72e50d5a9ec70",
|
||||
"width": 1628,
|
||||
"height": 1258
|
||||
},
|
||||
{
|
||||
"file": "dayu-color-1.10.0-interface-02-light.png",
|
||||
"role": "body-interface-light",
|
||||
"bytes": 493551,
|
||||
"sha256": "e0f7ec34a839755efed1d67277e482c753e48aa770279cdb2b75a5963f16257f",
|
||||
"width": 1664,
|
||||
"height": 1068
|
||||
},
|
||||
{
|
||||
"file": "dayu-color-1.10.0-cover.png",
|
||||
"role": "generated-article-cover",
|
||||
"bytes": 1722606,
|
||||
"sha256": "c05470ec2b50de0cfdd246b26334aaa895bd288abdb080cad2d4312c120c9a5a",
|
||||
"width": 1672,
|
||||
"height": 941
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"articleID": 15792,
|
||||
"images": [
|
||||
{
|
||||
"file": "dayu-color-1.10.0-interface-01.png",
|
||||
"bytes": 577587,
|
||||
"sha256": "4e948f0599700ddd13f2938a1aac892dea1b6ff60423c2ea15a72e50d5a9ec70",
|
||||
"status": "verified",
|
||||
"id": 15840,
|
||||
"url": "https://dayu.media/wp-content/uploads/2026/11/1793804584-5bc2fbe021e0e8f.png",
|
||||
"alt": "大鱼调色 1.10.0 深色模式:画布左侧纵向工具条、检查器与画布外示波器工作区",
|
||||
"title": "大鱼调色 1.10.0 深色模式",
|
||||
"downloadSHA256": "4e948f0599700ddd13f2938a1aac892dea1b6ff60423c2ea15a72e50d5a9ec70"
|
||||
},
|
||||
{
|
||||
"file": "dayu-color-1.10.0-interface-02-light.png",
|
||||
"bytes": 493551,
|
||||
"sha256": "e0f7ec34a839755efed1d67277e482c753e48aa770279cdb2b75a5963f16257f",
|
||||
"status": "verified",
|
||||
"id": 15841,
|
||||
"url": "https://dayu.media/wp-content/uploads/2026/11/1793804588-7ea8d6f6f860d66.png",
|
||||
"alt": "大鱼调色 1.10.0 浅色模式:浅色纵向工具条、调色检查器与画布外直方图工作区",
|
||||
"title": "大鱼调色 1.10.0 浅色模式",
|
||||
"downloadSHA256": "e0f7ec34a839755efed1d67277e482c753e48aa770279cdb2b75a5963f16257f"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
# 1.10.0 文章封面
|
||||
|
||||
生成方式:内置 imagegen;生成日期:2026-11-04。最终文件:`dayu-color-1.10.0-cover.png`。
|
||||
|
||||
提示词:
|
||||
|
||||
Use case: ads-marketing.
|
||||
Asset type: wide 16:9 article cover for a real native Final Cut Pro color-grading plugin.
|
||||
Primary request: create a polished Chinese editorial cover announcing the emergency UI update of 大鱼调色 version 1.10.0.
|
||||
Scene: elegant charcoal-black background, subtle cyan and violet light, restrained native macOS visual language. A clean vertical strip of abstract tool icons along one side, a luminous RGB curve with control points, a precise color wheel, and a small RGB histogram area suggest canvas tools and a separate auxiliary workspace. These are editorial graphic motifs, not a fabricated app screenshot.
|
||||
Composition: large beautifully typeset Chinese product title with generous space, smaller version number, prominent update badge. Strong thumbnail legibility, calm professional color-science feel. Avoid excessive glow or clutter.
|
||||
Text (verbatim, no additional text):
|
||||
"大鱼调色"
|
||||
"1.10.0"
|
||||
"紧急 UI 更新"
|
||||
"画布工具 · 曲线色轮 · 独立工作区"
|
||||
"Final Cut Pro"
|
||||
Typography: crisp modern Chinese sans-serif, accurate characters, white main title, cyan or violet accent badge.
|
||||
Constraints: landscape 16:9, finished opaque cover. No fake detailed UI text, no logos of other products, no watermark, no price.
|
||||
|
||||
正文图片为用户提供的深色、浅色模式实拍截图,按原始字节保存;与生成封面分开使用。
|
||||
二进制文件未显示。
|
之后 宽度: | 高度: | 大小: 1.6 MiB |
二进制文件未显示。
|
之后 宽度: | 高度: | 大小: 564 KiB |
二进制文件未显示。
|
之后 宽度: | 高度: | 大小: 482 KiB |
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"status": "publish",
|
||||
"title": "大鱼调色 1.12.0 公测版|统一调色工作区与共享蒙版",
|
||||
"content": "<!-- wp:paragraph -->\n<p>大鱼调色 1.12.0 公测版适用于 Final Cut Pro 与 Motion。这个版本把图层、调色参数、LUT 浏览和示波器放到同一个可调整大小的控制面板里。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">1.12.0 公测更新</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>统一调色工作区</strong>。从画布右下角或检视器点击“控制面板”。左侧管理图层,中间调节选中的模块,右侧同时显示亮度波形、RGB 分列、直方图和带肤色参考线的矢量图。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>画布工具与共享蒙版</strong>。左下角可直接绘制矩形、椭圆和钢笔蒙版,也能打开曲线、畸变、肤色范围或 LUT。一个蒙版可同时作用于 HSL、蜘蛛盘等多个图层。点击图层上的蒙版图标即可编辑形状或运行跟踪。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>最近使用 LUT</strong>。风格 LUT 参数下方显示最近使用的缩略图,点击即可应用到当前图层。浏览库按窗口宽度自动换行,保留文件夹和画面预览。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>编辑与加载</strong>。改善切换片段、重新打开检视器及停在片尾时的加载,修正钢笔闭合和画布曲线调整的保存问题。已在本机 Final Cut Pro 验证。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">在时间线里完成调色</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p><strong>色彩管理与基础调整</strong>:支持 CST 输入、工作空间和输出转换,并提供曝光、白平衡、曲线、HSL、色轮及蜘蛛盘等调节工具。首次使用时,请在一级调色中选择与素材相符的输入曲线和色域。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>LUT 与风格管理</strong>:通过缩略图浏览、收藏和预览管理常用 LUT,支持自选 LUT 文件与文件夹。完整预设用于保存组合调节;适合静态颜色变换的处理可导出 Cube LUT,颗粒、晕光、蒙版等时间或空间效果不属于静态 LUT 的保存范围。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>胶片模拟与印片外观</strong>:包含减色、颗粒、晕光、辉光、暗角及通道混合器,提供 Kodak 2383、Fuji 3513 等八种印片外观,可独立调整强度。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><strong>局部蒙版与工具叠层</strong>:可针对单独工具添加蒙版、建立相邻叠层,并使用关键帧与跟踪处理局部区域,方便细调画面的不同部分。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">历史更新</h2>\n<!-- /wp:heading -->\n\n<!-- wp:heading {\"level\":3} -->\n<h3 class=\"wp-block-heading\">1.10.0 画布工具与独立工作区</h3>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>下方为 1.10.0 的深色与浅色界面记录。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:image {\"id\":15840,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n<figure class=\"wp-block-image size-full\"><img src=\"https://dayu.media/wp-content/uploads/2026/11/1793804584-5bc2fbe021e0e8f.png\" alt=\"大鱼调色 1.10.0 深色模式:画布左侧纵向工具条、检查器与画布外示波器工作区\" class=\"wp-image-15840\" width=\"1628\" height=\"1258\" /><figcaption class=\"wp-element-caption\">大鱼调色 1.10.0 深色模式:纵向画布工具与独立示波器工作区</figcaption></figure>\n<!-- /wp:image -->\n\n<!-- wp:image {\"id\":15841,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n<figure class=\"wp-block-image size-full\"><img src=\"https://dayu.media/wp-content/uploads/2026/11/1793804588-7ea8d6f6f860d66.png\" alt=\"大鱼调色 1.10.0 浅色模式:浅色纵向工具条、调色检查器与画布外直方图工作区\" class=\"wp-image-15841\" width=\"1664\" height=\"1068\" /><figcaption class=\"wp-element-caption\">大鱼调色 1.10.0 浅色模式:纵向画布工具与独立示波器工作区</figcaption></figure>\n<!-- /wp:image -->\n\n\n<!-- wp:heading {\"level\":3} -->\n<h3 class=\"wp-block-heading\">1.7.4:删除模块与图层</h3>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>每个模块和新增图层的标题增加减号按钮,可删除不需要的层并让它从界面消失。删除时一并还原该模块的参数、清除关键帧及所属 LUT、蒙版等设置,避免隐藏后仍影响画面;其他模块保持原设置。误删可通过 Final Cut Pro 的一次撤销恢复。</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>顶部“添加模块”菜单可重新添加任意模块,新层从初始参数开始,不继承已删除层的设置。原有“再加一层”继续保留,删除状态随工程和完整预设保存。Line truncated
|
||||
"excerpt": "统一调色工作区、共享蒙版、最近使用 LUT 与四宫格示波器。大鱼调色 1.12.0 公测版完整安装包已签名公证,站内有效会员免费。",
|
||||
"seo": {
|
||||
"title": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色 1.12.0 公测版|统一调色工作区与共享蒙版"
|
||||
},
|
||||
"description": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色 1.12.0 是适用于 Final Cut Pro 与 Motion 的原生调色插件。新版控制面板集中管理图层、共享蒙版、最近使用 LUT 和四宫格示波器,画布工具移至左下角。适用于 Apple Silicon 和 macOS 14.6 及以上,完整安装包已签名公证。"
|
||||
},
|
||||
"keywords": {
|
||||
"enabled": true,
|
||||
"value": "大鱼调色,Final Cut Pro,调色插件,FxPlug4,统一工作区,共享蒙版,LUT,示波器"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"article_id": 15792,
|
||||
"article_url": "https://dayu.media/15792/",
|
||||
"request_id": "dayu-color-1120-build79-article-20261105",
|
||||
"cover_source": "template/large.png",
|
||||
"cover_sha256": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a",
|
||||
"update_baseline_sha256": "30c92debf91de7ab8215b35dc64a4ddb764e53450c327ae53fb41a4c2f7a26c0",
|
||||
"compiled_source": "beccf2fc01f8dc06c5d3d505f88289885d209bc8",
|
||||
"release_tag": "v1.12.0-unified-workspace-20261105",
|
||||
"package_bytes": 45329742,
|
||||
"package_sha256": "d4b557fec283f5e06f605bc6b1d99a0c8649f9d65e405eba452f525e8454cdfe"
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"bundle_id": "com.dayu.color",
|
||||
"channel": "beta",
|
||||
"version": "1.12.0",
|
||||
"build": 79,
|
||||
"package_type": "pkg",
|
||||
"install_mode": "pkg_installer",
|
||||
"size": 45329742,
|
||||
"sha256": "d4b557fec283f5e06f605bc6b1d99a0c8649f9d65e405eba452f525e8454cdfe",
|
||||
"download_url": "https://dayu.media/wp-content/uploads/dayu-color-beta/updates/dayu-color-1-12-0-79.pkg",
|
||||
"minimum_system_version": "14.6",
|
||||
"notes": "1.12.0 公测版加入统一调色工作区、共享蒙版、最近使用 LUT 和四宫格示波器。画布工具移至左下角,改善检视器重开与片尾示波器加载。请保存项目并退出 Final Cut Pro 和 Motion 后安装。"
|
||||
}
|
||||
已加载 100/788 个文件。由于本次变更涉及的文件过多,其余文件未显示。
显示更多
在新工单中引用
屏蔽一个用户