比较提交

...
共修改 29 个文件,包含 517 行新增和 80 行删除

没有与搜索条件相匹配的文件

+9 -1
查看文件
@@ -8,10 +8,16 @@
- [恢复、依赖与正式交付](RECOVERY.md)
- [GPU 数学来源与验证](tools/kernels/README.md)
- [正式安装记录](verification/Delivery.json)
- [程序图标与插件缩略图验收](verification/BrandAssets.json)
- [分组展开与启用验收](verification/HostGroupFolding.json)
- [主题与 LUT 库的 FCP 验收](verification/HostThemeLUT.json)
- [早期调色链的 FCP 验收](verification/Host.json)
主题与 LUT 浏览库版本为 1.1.0(6),源码标签 `v1.1.0-theme-lut-20261031`。灰、蓝、紫、绿、橙五套主题采用原版完整配色和分组样式,切换后跨实例记忆。风格 LUT 左侧网格按钮打开缩略图浏览器,右侧文件夹按钮打开 `~/Movies/大鱼调色LUT/look LUTs`。可导入文件或目录,按目录与名称过滤,单击应用,缩略图大小与目录会保存。
当前版本为 1.1.2(11),源码标签 `v1.1.2-group-fold-20261031`。所有调色分组统一为展开即启用、折叠即停用;新建实例与全部还原只展开基础调节。折叠保留参数和 LUT 路径,重新展开继续使用;打开已保存的调色时按各组实际启用状态展开。基础调节同时控制其光影、白平衡与颜色子组。
程序图标与 FCP 缩略图采用统一的光谱鱼。两张原始生成图及提示词保存在 `design/`;运行 `python3 tools/build_brand_assets.py` 使用 macOS 工具导出 ICNS、640×360 与 240×135 的效果预览。
主题与 LUT 浏览库自 1.1.0(6)提供,源码标签 `v1.1.0-theme-lut-20261031`。灰、蓝、紫、绿、橙五套主题采用原版完整配色和分组样式,切换后跨实例记忆。风格 LUT 左侧网格按钮打开缩略图浏览器,右侧文件夹按钮打开 `~/Movies/大鱼调色LUT/look LUTs`。可导入文件或目录,按目录与名称过滤,单击应用,缩略图大小与目录会保存。
缩略图使用当前素材先经过输入 LUT 的画面;没有源帧时显示本产品生成的色卡。显示方向与宿主图像原点一致,自动分析保留自己的原始数据。浏览器优先采用 FxPlug 宿主窗口,不能使用时回退为锚定弹出面板。品牌保留大鱼,吸管仍为系统取色器。
@@ -20,3 +26,5 @@
选择自有 LUT 后,预设记录其绝对路径;跨机器搬移时同时保留 LUT 文件并重新选择。LUT 导出只保存逐像素颜色,不包含纹理、清晰度或逐画面分析。
`tools/create_lut_host_fixture.py` 可重建独立 FCP 验收 XML 和四个合成测试 LUT;它只写产品缓存,不会向用户库自动导入。LUT 核心检查见 `verification/LUTLibrary.json`,原版主题与浏览行为证据见 `research/ThemeLUT-analysis.md`。
`tools/create_group_fold_host_fixture.py` 可创建独立的合成验收时间线,用于检查新实例仅基础调节默认启用、分组展开/折叠与数值保留。风格 LUT 总组停用会旁路全部五层;停用的输入或风格 LUT 不加载其文件。
+17 -3
查看文件
@@ -4,11 +4,21 @@
初始化基线:10987dd6bcc6986ea321eff75b37d4e8b48e966d;后续节点见git log。
产品主ID:com.dayu.color,XPC:com.dayu.color.XPC;唯一正式位置:/Library/Plug-Ins/FxPlug/大鱼调色.app。
当前交付标签:v1.1.0-theme-lut-20261031。APP 1.1.0(6)编译源码:c8d92077e5a017fa4b1a7ee7b24be2386b29294d;标签另含本次宿主验收与恢复记录。Apple公证ID 3629c27c-7689-4cde-b591-666aa93320a3,Accepted;正式签名、票据和实际安装状态见 verification/Delivery.json,主题/LUT宿主验收见 verification/HostThemeLUT.json。
当前交付标签:v1.1.2-group-fold-20261031。APP 1.1.2(11)编译源码:cdcb30a6aa1519bfb2f183165fef11cbf278bc7c;标签另含本次宿主验收与恢复记录。Apple公证ID 398b020c-9e1e-4c2b-b637-e8e3af2a8f59,Accepted;正式签名、票据和实际安装状态见 verification/Delivery.json。
所有调色分组展开即启用、折叠即停用,关闭时参数不可见;仅基础调节在新实例和全部还原后默认展开。折叠保留数值和 LUT 路径;打开已保存实例时按其实际启用状态展开。基础调节同时控制原光影与颜色两个子组。风格 LUT 总组停用时全部五层均旁路,关闭的输入或风格 LUT 不加载文件。肤色保护的百分比字段按0–100范围显示和保存。
FCP12.4正式安装版本的11组标题/眼睛联动、隐藏参数、黑白红45与肤色65%跨折叠及保存重开保留、全部还原后只展开基础调节的验收见 verification/HostGroupFolding.json。仅在独立合成验收项目中改值,最后恢复默认;用户媒体和其他产品未作改动。
图标交付标签 v1.1.1-brand-icons-20261031 保留,编译源码 bd02c7a368348fdea6357889a09fba298872487a,原公证ID 352e85a7-f603-4e93-8c1a-43f6c107bea1。正式程序关于窗口的新图标、FCP12.4效果浏览器缩略图与安装资源校验见 verification/BrandAssets.json;本次沿用相同品牌资源。
主题/LUT交付标签 v1.1.0-theme-lut-20261031 保留,编译源码 c8d92077e5a017fa4b1a7ee7b24be2386b29294d,宿主验收见 verification/HostThemeLUT.json。
历史交付 v1.0.0-build2-20261031 保留;其编译源码 ce7e0a3371693c84c97267af12ca0f078b0db981,原生调色链及初次 FCP 导出验收见 verification/Host.json。
当前源码的远端独立克隆、逐文件比对、strict/full fsck、完整 XPC Release 重建和73项原生自检见 verification/ThemeLUTRecovery.json。重建 Metal SHA256:9d89ed3197cf987a37ad7320911d23b8510b5461ffca2bd16397c8b963e02132。构建不依赖原厂APP。
本次编译节点的远端独立克隆116个已提交文件比对、strict/full fsck、从源码与本机SDK重建原生模型注册信息及FCP模板逐字节一致,见 verification/GroupFoldingRecovery.json。当前模板 SHA256:ebf8b7aa7a6781b9ce611375a838d89997656b0fc01077b2a7e5b1b2a2c373e1。
图标版本的远端独立克隆113文件比对、strict/full fsck和三种导出资源逐字节重建见 verification/BrandRecovery.json。主题/LUT源码的完整 XPC Release 重建和73项原生自检见 verification/ThemeLUTRecovery.json;本次Release送公证前及正式安装后均通过82项原生自检,正式结果见 verification/InstalledSelfTest.json。重建 Metal SHA256:9d89ed3197cf987a37ad7320911d23b8510b5461ffca2bd16397c8b963e02132。构建不依赖原厂APP。
## 恢复和构建
@@ -17,7 +27,7 @@
3. 依赖:Xcode27.1 / macOS SDK27,Metal Toolchain,FxPlug SDK4.3.5(/Library/Developer/SDKs/FxPlug.sdk),FxPlug及PluginManager运行框架(/Library/Developer/Frameworks)。最低系统14.6,当前验证Apple M4。
4. Xcode打开大鱼调色.xcodeproj,Wrapper Application方案,Release。构建脚本由版本化LLVM文本重建Metal库;不读取参考LumiGrade或网络源。17相机输入、Camera Raw数学表均已入Git,无LFS、无子模块。
5. 更改模型后运行 python3 tools/build_template.py --refresh-model --overwrite,更新FCP原生壳的注册参数与归档。
6. 正式交付运行 python3 tools/deliver.py;脚本持有产品锁,Release、逐层Developer ID签名、Apple Accepted、staple/validate、Gatekeeper、原子替换、清理副本、PluginKit唯一登记。等待宿主验收后输入complete才记通过。
6. 正式交付运行 python3 tools/deliver.py;脚本持有产品锁,Release、逐层Developer ID签名、自检通过后送Apple Accepted、staple/validate、Gatekeeper、原子替换、正式版自检、清理副本、PluginKit唯一登记。等待宿主验收后输入complete才记通过。
7. 固定缓存:/Users/mac/Library/Caches/CodexBuilds/com.dayu.color。正式XPC支持 --self-test 输出原生模型/IOSurface/颜色/LUT集成JSON。请从正式安装路径运行。
## 证书和数据
@@ -37,3 +47,7 @@ Developer ID团队B3W25FX5H5,公证profile codex-dayu-notary-B3W25FX5H5。证
缩略图捕获输入转换后的源帧,显示层按 FxPlug 的原点单独转换为顶部优先。原分析帧字节序、调色核心和 Metal 数学库未变。当前宿主验收采用原生锚定 Popover;支持 FxRemoteWindow 的宿主也可使用其窗口接口。
运行 python3 tools/create_lut_host_fixture.py 可重建合成验收图、独立 XML 与四个测试 LUT,输出只在产品缓存。随后从浏览器导入测试目录并在 FCP 验证,不自动写入用户库。
## 品牌资源
程序图标与插件缩略图由内置图像生成工具分别生成,采用同一光谱鱼标志。原始 PNG 和完整提示词见 design/ASSETS.json。程序 ICNS 含16至1024像素的标准图标表示;FCP预览为640×360与240×135。恢复后运行 python3 tools/build_brand_assets.py 可使用macOS自带sips/iconutil重建三项资源,不需要联网生成,也不依赖原厂APP。大图原始PNG、ICNS及两种FCP缩略图均保存在普通Git对象中,无LFS或子模块。
+24
查看文件
@@ -0,0 +1,24 @@
{
"generator": "OpenAI built-in image_gen",
"created": "2026-10-31",
"brand": "大鱼调色",
"assets": [
{
"path": "design/dayu-color-app-icon-v1.png",
"width": 1254,
"height": 1254,
"alpha": true,
"prompt": "Use case: logo-brand.\nAsset type: final macOS application icon for the Chinese color-grading FxPlug product 大鱼调色 (Dayu Color).\nCreate ONE polished square 1024×1024 raster app icon, NOT a presentation board or mockup. A single bold, abstract fish silhouette formed from a smooth continuous spectral ribbon flowing cyan → blue → violet → magenta → warm orange, curving around a dark circular negative space like a color-grading wheel. The fish should read immediately at small Dock sizes, with a clear tail and elegantly tapered head, no eye details. Center it on a deep midnight-navy rounded-square app tile, restrained dimensional glass/enamel shading, clean premium native macOS software aesthetic. The tile occupies about 88% of the canvas, equal safety margins, subtle soft shadow, no extra rings or small controls. Outside the rounded square is genuinely transparent alpha. Crisp silhouette, balanced negative space, vivid color and controlled highlights. No lettering, no words, no badges, no watermark, no borrowed brand marks. This is the standalone icon asset itself, straight-on, not an icon pictured on a device or in a scene."
},
{
"path": "design/dayu-color-plugin-thumbnail-v1.png",
"width": 1672,
"height": 941,
"alpha": false,
"reference": "design/dayu-color-app-icon-v1.png",
"prompt": "Use case: logo-brand.\nAsset type: final widescreen 16:9 plugin thumbnail for the Final Cut Pro effects browser, for 大鱼调色.\nInput Image 1 is a brand reference, not an edit target. Preserve its recognizable spectral fish silhouette and cyan-blue-violet-magenta-orange enamel material, but generate a NEW horizontal composition. One 16:9 image, preferably 1536×864 or 1920×1080, not a presentation board.\nFull-bleed midnight navy background, very restrained soft chromatic illumination. The same circular spectral fish emblem sits prominently on the left half, WITHOUT a rounded-square app tile around it. On the right half, large perfectly legible white Chinese typography reading exactly \"大鱼调色\" in a modern bold sans-serif, horizontal one-line title. A little breathing room between emblem and title. The emblem and title have equal visual authority; both remain readable when reduced to a small effect thumbnail. Keep all essential content inside an 8% safety margin. Premium native creative-software identity, crisp luminous ribbon edges, controlled highlights and generous negative space. No other words or letters, no version numbers, no fake interface, no devices, no watermark, no extra logos, no additional fish. The final asset fills the entire rectangular canvas, with no outer transparent margin."
}
],
"exportCommand": "python3 tools/build_brand_assets.py",
"note": "原始生成图保留;通过 macOS sips 和 iconutil 导出图标与 FCP 的两种预览尺寸。"
}
二进制文件未显示。

之后

宽度:  |  高度:  |  大小: 1.5 MiB

二进制文件未显示。

之后

宽度:  |  高度:  |  大小: 1.4 MiB

+3 -1
查看文件
@@ -16,4 +16,6 @@ python3 tools/build_template.py --output /绝对路径/大鱼调色.moef
工程模型有变更时,先审查变更,再加 `--refresh-model` 重新导出实际注册表与自有归档。它只编译并执行短时命令行元数据工具,不打开或运行原厂程序。既有输出必须明确加 `--overwrite`;普通重建直接复用版本化原始归档并核对模型源码哈希,以保持模板字节稳定。
`verification/StaticContract.json`、`SavedSelection.json`、`SkillAudit.json` 记录当前落盘文件的静态检查:唯一滤镜、参数覆盖、四项发布、真实空绑定、无内容图层选中、源引用及无动画。静态检查已通过,不能替代正式已公证插件的 FCP/Motion 界面、保存重开和渲染验证。真实渲染预览与效果缩略图尚未生成,由正式交付验收补齐;本目录目前是待宿主验收候选。
`verification/StaticContract.json`、`SavedSelection.json`、`SkillAudit.json` 记录当前落盘文件的静态检查:唯一滤镜、参数覆盖、四项发布、真实空绑定、无内容图层选中、源引用及无动画。实际 FCP 验收和导出记录见工程根目录 `verification/Host.json` 与 `HostThemeLUT.json`。
`large.png`(640×360)与 `small.png`(240×135)使用本产品的光谱鱼和“大鱼调色”品牌图。原图和生成提示词在 `design/`,运行 `python3 tools/build_brand_assets.py` 可重建。`verification/Preview.json` 记录来源与导出哈希;正式安装时设置预览文件锁,防止宿主自动覆盖。
二进制
查看文件
二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 51 KiB

之后

宽度:  |  高度:  |  大小: 255 KiB

二进制
查看文件
二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 16 KiB

之后

宽度:  |  高度:  |  大小: 42 KiB

+9 -9
查看文件
@@ -47,7 +47,7 @@
"title": "输入强度"
},
{
"default": 1,
"default": 0,
"key": "inputEnabled",
"kind": "bool",
"max": 1,
@@ -523,7 +523,7 @@
"title": "风格 5 强度"
},
{
"default": 1,
"default": 0,
"key": "lookEnabled",
"kind": "bool",
"max": 1,
@@ -1106,7 +1106,7 @@
"title": "蓝 扩展点4 X"
},
{
"default": 1,
"default": 0,
"key": "curveEnabled",
"kind": "bool",
"max": 1,
@@ -1491,7 +1491,7 @@
"title": "显示自定义色选区"
},
{
"default": 1,
"default": 0,
"key": "hslEnabled",
"kind": "bool",
"max": 1,
@@ -1656,7 +1656,7 @@
"title": "平衡"
},
{
"default": 1,
"default": 0,
"key": "gradingEnabled",
"kind": "bool",
"max": 1,
@@ -1733,7 +1733,7 @@
"title": "蓝原色 饱和度"
},
{
"default": 1,
"default": 0,
"key": "primariesEnabled",
"kind": "bool",
"max": 1,
@@ -1964,7 +1964,7 @@
"title": "蓝 输出白"
},
{
"default": 1,
"default": 0,
"key": "levelsEnabled",
"kind": "bool",
"max": 1,
@@ -2184,7 +2184,7 @@
"title": "高光 黄 ↔ 蓝"
},
{
"default": 1,
"default": 0,
"key": "balanceEnabled",
"kind": "bool",
"max": 1,
@@ -2198,7 +2198,7 @@
"sourceSHA256": {
"template/tools/dump_model.mm": "2ef22e010e0cae15b73107d39fb2c125f6049b1e5405e88078f936cf29e79350",
"大鱼调色/Plugin/DYModel.h": "66507eb37e0c0e3426a10ab45f7388fd53fcba570a715a6574396056731d5129",
"大鱼调色/Plugin/DYModel.mm": "ba97a42935a7721ceb560b25f610fcdacfe302d8a4ac1f76e1f37408e808cb36",
"大鱼调色/Plugin/DYModel.mm": "cf46784f302014d7c025249c5ebbd02505a5e70739ec3ffc0d269890601bb5c5",
"大鱼调色/Plugin/DYUniforms.h": "06db5ec83703aa320c9569a7de08617a2fdbc535ac29f438558959d485aa2138"
}
}
+22 -4
查看文件
@@ -1,6 +1,24 @@
{
"sourceVideo": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/大鱼调色_build2_正式宿主导出.mov",
"sourceVideoSHA256": "0a87bbe851ea1b9d49e95f2ee55fec5dbe47fea2e581dbcc6038a37b89d55005",
"timeSeconds": 3,
"installedPreviewLocked": true
"sourceImage": "design/dayu-color-plugin-thumbnail-v1.png",
"sourceImageSHA256": "6b63ed2a06c543ee6880f7cf4393bd43d3488a3f7325b806a73d2bee4c80652d",
"generator": "OpenAI built-in image generation",
"installedPreviewLocked": true,
"exports": [
{
"path": "大鱼调色/Wrapper Application/Resources/DayuColor.icns",
"sha256": "9811ee6b0cefcec94ff6d717fd17f9fcedd6954048d2efea35f6f86764804f80"
},
{
"path": "template/large.png",
"width": 640,
"height": 360,
"sha256": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a"
},
{
"path": "template/small.png",
"width": 240,
"height": 135,
"sha256": "41fec3138aee904fc39d6982e6fde809243ffec55298dbfe966f4f48d89caf8a"
}
]
}
+1 -1
查看文件
@@ -1,6 +1,6 @@
{
"passed": true,
"sha256": "46b613b2b9d799ce6b55902f973a5fd901b289c6105b39c0b4f6a018949cc81b",
"sha256": "ebf8b7aa7a6781b9ce611375a838d89997656b0fc01077b2a7e5b1b2a2c373e1",
"version": "5.13",
"displayversion": "5.6.7",
"filterCount": 1,
+8 -8
查看文件
@@ -303,7 +303,7 @@
</parameter>
<parameter name="相机输入" id="2013" flags="12889161760" default="0" value="0" />
<parameter name="输入强度" id="2014" flags="12889161760" default="1" value="1" />
<parameter name="输入 / LUT" id="2033" flags="12889161760" default="1" value="1" />
<parameter name="输入 / LUT" id="2033" flags="12889161760" default="0" value="0" />
<parameter name="曝光" id="2000" flags="12889161760" default="0" value="0" />
<parameter name="曝光 启用" id="2020" flags="12889161760" default="1" value="1" />
<parameter name="对比度" id="2001" flags="12889161760" default="0" value="0" />
@@ -345,7 +345,7 @@
<parameter name="风格 4 强度" id="2018" flags="12889161760" default="1" value="1" />
<parameter name="风格 5 启用" id="2043" flags="12889161760" default="1" value="1" />
<parameter name="风格 5 强度" id="2019" flags="12889161760" default="1" value="1" />
<parameter name="风格 LUT" id="2036" flags="12889161760" default="1" value="1" />
<parameter name="风格 LUT" id="2036" flags="12889161760" default="0" value="0" />
<parameter name="主曲线 阴影" id="2046" flags="12889161760" default="0" value="0" />
<parameter name="主曲线 暗部" id="2047" flags="12889161760" default="0" value="0" />
<parameter name="主曲线 亮部" id="2048" flags="12889161760" default="0" value="0" />
@@ -398,7 +398,7 @@
<parameter name="蓝 扩展点3 X" id="2234" flags="12889161760" default="-1" value="-1" />
<parameter name="蓝 扩展点4 偏移" id="2231" flags="12889161760" default="0" value="0" />
<parameter name="蓝 扩展点4 X" id="2235" flags="12889161760" default="-1" value="-1" />
<parameter name="曲线" id="2044" flags="12889161760" default="1" value="1" />
<parameter name="曲线" id="2044" flags="12889161760" default="0" value="0" />
<parameter name="红 色相" id="2068" flags="12889161760" default="0" value="0" />
<parameter name="橙 色相" id="2069" flags="12889161760" default="0" value="0" />
<parameter name="黄 色相" id="2070" flags="12889161760" default="0" value="0" />
@@ -433,7 +433,7 @@
<parameter name="自定义 明亮度" id="2098" flags="12889161760" default="0" value="0" />
<parameter name="自定义 明亮度范围" id="2142" flags="12889161760" default="40" value="40" />
<parameter name="显示自定义色选区" id="2144" flags="12889161760" default="0" value="0" />
<parameter name="HSL 混色" id="2045" flags="12889161760" default="1" value="1" />
<parameter name="HSL 混色" id="2045" flags="12889161760" default="0" value="0" />
<parameter name="阴影 色相" id="2106" flags="12889161760" default="0" value="0" />
<parameter name="阴影 饱和度" id="2107" flags="12889161760" default="0" value="0" />
<parameter name="阴影 明亮度" id="2113" flags="12889161760" default="0" value="0" />
@@ -448,14 +448,14 @@
<parameter name="全局 明亮度" id="2150" flags="12889161760" default="0" value="0" />
<parameter name="混合" id="2101" flags="12889161760" default="50" value="50" />
<parameter name="平衡" id="2102" flags="12889161760" default="0" value="0" />
<parameter name="颜色分级" id="2100" flags="12889161760" default="1" value="1" />
<parameter name="颜色分级" id="2100" flags="12889161760" default="0" value="0" />
<parameter name="红原色 色相" id="2121" flags="12889161760" default="0" value="0" />
<parameter name="红原色 饱和度" id="2122" flags="12889161760" default="0" value="0" />
<parameter name="绿原色 色相" id="2123" flags="12889161760" default="0" value="0" />
<parameter name="绿原色 饱和度" id="2124" flags="12889161760" default="0" value="0" />
<parameter name="蓝原色 色相" id="2125" flags="12889161760" default="0" value="0" />
<parameter name="蓝原色 饱和度" id="2126" flags="12889161760" default="0" value="0" />
<parameter name="三原色" id="2120" flags="12889161760" default="1" value="1" />
<parameter name="三原色" id="2120" flags="12889161760" default="0" value="0" />
<parameter name="RGB 输入黑" id="2156" flags="12889161760" default="0" value="0" />
<parameter name="RGB 伽马" id="2160" flags="12889161760" default="1" value="1" />
<parameter name="RGB 输入白" id="2164" flags="12889161760" default="255" value="255" />
@@ -476,7 +476,7 @@
<parameter name="蓝 输入白" id="2167" flags="12889161760" default="255" value="255" />
<parameter name="蓝 输出黑" id="2171" flags="12889161760" default="0" value="0" />
<parameter name="蓝 输出白" id="2175" flags="12889161760" default="255" value="255" />
<parameter name="色阶" id="2152" flags="12889161760" default="1" value="1" />
<parameter name="色阶" id="2152" flags="12889161760" default="0" value="0" />
<parameter name="黑白 红" id="2180" flags="12889161760" default="40" value="40" />
<parameter name="黑白 黄" id="2181" flags="12889161760" default="60" value="60" />
<parameter name="黑白 绿" id="2182" flags="12889161760" default="40" value="40" />
@@ -496,7 +496,7 @@
<parameter name="高光 青 ↔ 红" id="2200" flags="12889161760" default="0" value="0" />
<parameter name="高光 洋红 ↔ 绿" id="2201" flags="12889161760" default="0" value="0" />
<parameter name="高光 黄 ↔ 蓝" id="2202" flags="12889161760" default="0" value="0" />
<parameter name="色彩平衡" id="2188" flags="12889161760" default="1" value="1" />
<parameter name="色彩平衡" id="2188" flags="12889161760" default="0" value="0" />
<parameter name="混合" id="10001" flags="12884901888" default="1" value="1" />
<parameter name="翻转" id="10002" flags="12889161760" default="0" value="0" />
<parameter name="输入点" id="10003" flags="12889161760" default="1" value="1" />
+46
查看文件
@@ -0,0 +1,46 @@
#!/usr/bin/env python3
"""Export generated brand masters with native macOS image tools."""
from pathlib import Path
import hashlib
import json
import subprocess
import tempfile
ROOT = Path(__file__).resolve().parent.parent
ICON = ROOT / 'design/dayu-color-app-icon-v1.png'
THUMBNAIL = ROOT / 'design/dayu-color-plugin-thumbnail-v1.png'
ICNS = ROOT / '大鱼调色/Wrapper Application/Resources/DayuColor.icns'
def run(*args):
subprocess.run([str(arg) for arg in args], check=True, stdout=subprocess.DEVNULL)
def sha(path):
return hashlib.sha256(path.read_bytes()).hexdigest()
def main():
ICNS.parent.mkdir(parents=True, exist_ok=True)
with tempfile.TemporaryDirectory(prefix='dayu-color-icon-') as temporary:
iconset = Path(temporary) / 'DayuColor.iconset'
iconset.mkdir()
for points in (16, 32, 128, 256, 512):
for scale in (1, 2):
pixels = points * scale
name = f'icon_{points}x{points}' + ('@2x' if scale == 2 else '') + '.png'
run('sips', '-z', pixels, pixels, ICON, '--out', iconset / name)
run('iconutil', '-c', 'icns', iconset, '-o', ICNS)
exports = [{'path': str(ICNS.relative_to(ROOT)), 'sha256': sha(ICNS)}]
for name, width, height in [('large.png', 640, 360), ('small.png', 240, 135)]:
output = ROOT / 'template' / name
run('sips', '-z', height, width, THUMBNAIL, '--out', output)
exports.append(dict(path=str(output.relative_to(ROOT)), width=width, height=height, sha256=sha(output)))
record = dict(sourceImage='design/dayu-color-plugin-thumbnail-v1.png', sourceImageSHA256=sha(THUMBNAIL),
generator='OpenAI built-in image generation', installedPreviewLocked=True, exports=exports)
(ROOT / 'template/verification/Preview.json').write_text(json.dumps(record, ensure_ascii=False, indent=2) + '\n')
print(json.dumps(record, ensure_ascii=False, indent=2))
if __name__ == '__main__':
main()
+18
查看文件
@@ -0,0 +1,18 @@
#!/usr/bin/env python3
"""Create a fresh FCP instance for group expansion/activation acceptance."""
from pathlib import Path
import runpy
import xml.etree.ElementTree as ET
root = Path(__file__).resolve().parent.parent
runpy.run_path(str(root / 'tools/create_host_fixture.py'))
qa = Path('/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa')
tree = ET.parse(qa / '大鱼调色_正式版验收.fcpxml')
document = tree.getroot()
document.find('.//event').set('name', '大鱼调色_分组展开验收')
document.find('.//project').set('name', '大鱼调色_分组展开与启用验收')
ET.indent(document)
output = qa / '大鱼调色_分组展开与启用验收.fcpxml'
output.write_text('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE fcpxml>\n'
+ ET.tostring(document, encoding='unicode') + '\n')
print(output)
+3
查看文件
@@ -49,6 +49,9 @@ def main():
run('codesign','--verify','--deep','--strict',str(APP))
details=run('codesign','-dvvv',str(APP))
if 'TeamIdentifier=B3W25FX5H5' not in details or 'Timestamp=' not in details or 'runtime' not in details:raise RuntimeError('签名身份/时间戳/runtime未通过')
preflight=json.loads(run(str(plugin/'Contents/MacOS/大鱼调色 XPC Service'),'--self-test'))
(CACHE/'release-preflight.json').write_text(json.dumps(preflight,ensure_ascii=False,indent=2)+'\n')
if not preflight.get('pass'):raise RuntimeError('Release集成自检失败,正式旧版未替换')
archive=CACHE/'notarization-submission.zip'
if archive.exists():archive.unlink()
run('ditto','-c','-k','--keepParent',str(APP),str(archive));print('Submitting signed Release to Apple',flush=True)
+33
查看文件
@@ -0,0 +1,33 @@
{
"version": "1.1.1",
"build": "7",
"appIconInNativeAboutWindow": true,
"aboutVersionObserved": "Version 1.1.1 (7)",
"fcpVersion": "12.4",
"effectBrowserCategory": "大鱼调色",
"effectBrowserThumbnailObserved": true,
"thumbnailFishAndChineseTitleLegible": true,
"qaProject": "大鱼调色_主题与LUT浏览库验收",
"inspectorLoaded": true,
"exposureRetained": 0.25,
"themeRetained": "冰川蓝",
"syntheticColorChartRendered": true,
"formalAppAndPluginProcessPathsVerified": true,
"uniquePluginKitRegistration": "com.dayu.color.XPC(1.1)\t6CD1CA2F-C9C1-4345-8668-6295ADC0DED3\t2026-10-31 03:35:56 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit\n (1 plug-in)",
"assets": {
"大鱼调色/Wrapper Application/Resources/DayuColor.icns": {
"installedPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/Resources/DayuColor.icns",
"sha256": "9811ee6b0cefcec94ff6d717fd17f9fcedd6954048d2efea35f6f86764804f80"
},
"template/large.png": {
"installedPath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/large.png",
"sha256": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a",
"userImmutable": true
},
"template/small.png": {
"installedPath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/small.png",
"sha256": "41fec3138aee904fc39d6982e6fde809243ffec55298dbfe966f4f48d89caf8a",
"userImmutable": true
}
}
}
+20
查看文件
@@ -0,0 +1,20 @@
{
"remote": "https://dayu.media/git/dayu/dayu-color.git",
"branch": "main",
"sourceCommit": "bd02c7a368348fdea6357889a09fba298872487a",
"trackedFilesCompared": 113,
"allFilesIdentical": true,
"strictFullFsck": true,
"brandExportsReproducedByteForByte": true,
"exports": {
"大鱼调色/Wrapper Application/Resources/DayuColor.icns": "9811ee6b0cefcec94ff6d717fd17f9fcedd6954048d2efea35f6f86764804f80",
"template/large.png": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a",
"template/small.png": "41fec3138aee904fc39d6982e6fde809243ffec55298dbfe966f4f48d89caf8a"
},
"lfs": false,
"submodules": false,
"masterImages": {
"design/dayu-color-app-icon-v1.png": "f04ec63f5cdebb3aa3fdebbca809f8505c2fc88084f069f0cbbd3f7535fcd21c",
"design/dayu-color-plugin-thumbnail-v1.png": "6b63ed2a06c543ee6880f7cf4393bd43d3488a3f7325b806a73d2bee4c80652d"
}
}
+9 -6
查看文件
@@ -2,15 +2,18 @@
"status": "verified",
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"bundleID": "com.dayu.color",
"version": "1.1.0",
"build": "6",
"version": "1.1.2",
"build": "11",
"team": "B3W25FX5H5",
"notaryID": "3629c27c-7689-4cde-b591-666aa93320a3",
"notaryID": "398b020c-9e1e-4c2b-b637-e8e3af2a8f59",
"notaryStatus": "Accepted",
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
"sourceCommit": "c8d92077e5a017fa4b1a7ee7b24be2386b29294d",
"sourceCommit": "cdcb30a6aa1519bfb2f183165fef11cbf278bc7c",
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
"templateSHA256": "46b613b2b9d799ce6b55902f973a5fd901b289c6105b39c0b4f6a018949cc81b",
"templateSHA256": "ebf8b7aa7a6781b9ce611375a838d89997656b0fc01077b2a7e5b1b2a2c373e1",
"shaderSHA256": "9d89ed3197cf987a37ad7320911d23b8510b5461ffca2bd16397c8b963e02132",
"registry": "com.dayu.color.XPC(1.1)\t895E89B3-AC5C-48B7-B7E6-1E6934DB29F9\t2026-10-30 20:00:36 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit\n (1 plug-in)"
"registry": "com.dayu.color.XPC(1.1)\tB7148000-0FBF-412F-A04F-9AF1CCBDC570\t2026-10-31 04:45:55 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit\n (1 plug-in)",
"hostVerification": "verification/HostGroupFolding.json",
"sourceRecoveryVerification": "verification/GroupFoldingRecovery.json",
"brandAssetsVerification": "verification/BrandAssets.json"
}
+13
查看文件
@@ -0,0 +1,13 @@
{
"remote": "https://dayu.media/git/dayu/dayu-color.git",
"branch": "main",
"sourceCommit": "cdcb30a6aa1519bfb2f183165fef11cbf278bc7c",
"trackedFilesCompared": 116,
"allCommittedFilesIdentical": true,
"strictFullFsck": true,
"nativeModelMetadataAndTemplateReproducedByteForByte": true,
"templateSHA256": "ebf8b7aa7a6781b9ce611375a838d89997656b0fc01077b2a7e5b1b2a2c373e1",
"lfs": false,
"submodules": false,
"scope": "Independent remote clone of the compiled source commit, compared to committed Git blobs; regenerated native model metadata and FCP template with local SDK. Final delivery tag is verified separately."
}
+134
查看文件
@@ -0,0 +1,134 @@
{
"date": "2026-10-31T12:57:49.295933+08:00",
"host": "Final Cut Pro",
"hostVersion": "12.4",
"hostBuild": "454072",
"product": "大鱼调色",
"version": "1.1.2",
"build": "11",
"sourceCommit": "cdcb30a6aa1519bfb2f183165fef11cbf278bc7c",
"installedPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"library": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/大鱼调色_验收.fcpbundle",
"project": "大鱼调色_分组展开与启用验收",
"profile": "standard; existing native Objective-C++ AppKit inspector",
"interactionContract": {
"expanded": "Enabled; parameters visible and editable",
"collapsed": "Disabled; parameters hidden, retained values and LUT paths are not cleared",
"newInstanceAndResetAll": "Only basic adjustments expanded",
"savedInstances": "Expansion derives from each group’s actual saved enable parameter, including previously enabled groups"
},
"checks": {
"newInstanceOnlyBasicExpanded": true,
"groupInteractions": [
{
"group": "输入 / LUT",
"headerOpensAndEnables": true,
"eyeClosesAndDisables": true,
"parametersHiddenWhenOff": true
},
{
"group": "基础调色",
"headerOpensAndEnables": true,
"eyeClosesAndDisables": true,
"parametersHiddenWhenOff": true
},
{
"group": "肤色保护设置",
"headerOpensAndEnables": true,
"eyeClosesAndDisables": true,
"parametersHiddenWhenOff": true
},
{
"group": "风格 LUT",
"headerOpensAndEnables": true,
"eyeClosesAndDisables": true,
"parametersHiddenWhenOff": true
},
{
"group": "HSL 混色",
"headerOpensAndEnables": true,
"eyeClosesAndDisables": true,
"parametersHiddenWhenOff": true
},
{
"group": "曲线",
"headerOpensAndEnables": true,
"eyeClosesAndDisables": true,
"parametersHiddenWhenOff": true
},
{
"group": "颜色分级",
"headerOpensAndEnables": true,
"eyeClosesAndDisables": true,
"parametersHiddenWhenOff": true
},
{
"group": "三原色",
"headerOpensAndEnables": true,
"eyeClosesAndDisables": true,
"parametersHiddenWhenOff": true
},
{
"group": "色阶",
"headerOpensAndEnables": true,
"eyeClosesAndDisables": true,
"parametersHiddenWhenOff": true
},
{
"group": "黑白混色",
"headerOpensAndEnables": true,
"eyeClosesAndDisables": true,
"parametersHiddenWhenOff": true
},
{
"group": "色彩平衡",
"headerOpensAndEnables": true,
"eyeClosesAndDisables": true,
"parametersHiddenWhenOff": true
}
],
"blackwhite": {
"editedBlackwhiteRed": 45,
"foldReopenRetainsValue": true,
"valueAfterNormalHostQuitAndReopen": 45,
"closedGroupHadNoParameterRowsAfterReopen": true,
"enabledGrayImageObservedAtTimecode": "00:00:03:09",
"disabledColorImageObserved": true
},
"skinProtection": {
"enteredDisplayValue": "65%",
"actualSliderValue": 65,
"foldReopenRetainsValue": true,
"valueAfterNormalHostQuitAndReopen": 65,
"closedGroupHadNoParameterRowsAfterReopen": true
},
"resetAllOnlyBasicExpanded": true,
"resetStateAfterNormalHostQuitAndReopenOnlyBasicExpanded": true,
"finalSyntheticProjectRestoredToDefaults": true,
"finalNativeIntegrationSelfTest": {
"pass": true,
"checks": 82,
"gpu": "Apple M4",
"record": "verification/InstalledSelfTest.json"
},
"accessibility": {
"groupToggleStatesAndHelpMatchVisibility": true,
"hiddenRowsAbsentFromAccessibilityTree": true,
"keyboardNumericFieldEntry": true,
"voiceOverSession": false
},
"swiftUIAudit": "Not applicable: no Swift or SwiftUI source in the product; existing AppKit inspector retained"
},
"pluginKit": "com.dayu.color.XPC(1.1)\tB7148000-0FBF-412F-A04F-9AF1CCBDC570\t2026-10-31 04:45:55 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit\n (1 plug-in)",
"installedProcesses": [
"28318 /Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/MacOS/大鱼调色",
"28539 /Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit/Contents/MacOS/大鱼调色 XPC Service"
],
"cleanup": {
"confirmedFailedBuild9Removed": true,
"generatedOuterAppsInProjectAndProductCache": 0,
"notarizationSubmissionZIPRemoved": true,
"uniqueFormalFxPlugPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app"
},
"scope": "Finite live acceptance on the synthetic 1920x1080 25p timeline in FCP 12.4 on Apple M4. Renderer bypass of retained HSL, grading, selected input and five LUT layers also covered by native integration checks. Does not claim exhaustive media, VoiceOver, older OS/host or Intel validation; prior export and brand/theme evidence remains in separate historical records."
}
+60 -4
查看文件
@@ -1,6 +1,6 @@
{
"bundlePath": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit",
"checks": 73,
"checks": 82,
"gpu": "Apple M4",
"limitations": [
"Finite states and a 64x48 frame; live FCP discovery, inspector interaction, timeline persistence and real host export require separate acceptance.",
@@ -12,7 +12,7 @@
"error": "未提供错误信息",
"name": "runtime-directory",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/702A234D-15F8-4902-A91D-0B0FF49EB01E"
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/BF781A20-5772-4A80-9272-B57C3DD9468A"
},
{
"descriptors": 196,
@@ -25,6 +25,10 @@
"name": "finite-real-model-defaults",
"pass": true
},
{
"name": "only-basic-adjustments-enabled-by-default",
"pass": true
},
{
"error": "未提供错误信息",
"name": "native-parameter-creation",
@@ -183,6 +187,19 @@
"nonzeroComponents": 9832,
"pass": true
},
{
"error": "",
"name": "folded-hsl-bypasses-retained-adjustments-render",
"pass": true
},
{
"changedComponents": 0,
"maxAbsoluteError": 0,
"name": "folded-hsl-bypasses-retained-adjustments",
"nonfiniteComponents": 0,
"nonzeroComponents": 9832,
"pass": true
},
{
"error": "",
"name": "renderer-grading-pass",
@@ -196,6 +213,19 @@
"nonzeroComponents": 9832,
"pass": true
},
{
"error": "",
"name": "folded-grading-bypasses-retained-adjustments-render",
"pass": true
},
{
"changedComponents": 0,
"maxAbsoluteError": 0,
"name": "folded-grading-bypasses-retained-adjustments",
"nonfiniteComponents": 0,
"nonzeroComponents": 9832,
"pass": true
},
{
"error": "",
"name": "input-profile-01-load-render",
@@ -417,6 +447,19 @@
"nonzeroComponents": 9832,
"pass": true
},
{
"error": "",
"name": "folded-input-bypasses-retained-profile-render",
"pass": true
},
{
"changedComponents": 0,
"maxAbsoluteError": 0,
"name": "folded-input-bypasses-retained-profile",
"nonfiniteComponents": 0,
"nonzeroComponents": 9832,
"pass": true
},
{
"error": "",
"name": "renderer-input-analysis-pass",
@@ -446,11 +489,24 @@
"nonzeroComponents": 9832,
"pass": true
},
{
"error": "",
"name": "folded-look-bypasses-retained-LUTs-render",
"pass": true
},
{
"changedComponents": 0,
"maxAbsoluteError": 0,
"name": "folded-look-bypasses-retained-LUTs",
"nonfiniteComponents": 0,
"nonzeroComponents": 9832,
"pass": true
},
{
"error": "未提供错误信息",
"name": "renderer-export-33cube",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/702A234D-15F8-4902-A91D-0B0FF49EB01E/diagnostic-export.cube"
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/BF781A20-5772-4A80-9272-B57C3DD9468A/diagnostic-export.cube"
},
{
"bytes": 1186070,
@@ -460,6 +516,6 @@
"rows": 35937
}
],
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/702A234D-15F8-4902-A91D-0B0FF49EB01E",
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/BF781A20-5772-4A80-9272-B57C3DD9468A",
"scope": "Native model and renderer integration with real Metal/IOSurface textures and fake FxPlug host selectors; no GUI or live host document."
}
+1
查看文件
@@ -121,6 +121,7 @@
Plugin/Resources/InputLUTs/sony_slog3_sgamut3cine_to_rec709.dylut,
"Plugin/Resources/THIRD-PARTY-NOTICES.txt",
"Wrapper Application/AppDelegate.m",
"Wrapper Application/Resources/DayuColor.icns",
"Wrapper Application/Info.plist",
"Wrapper Application/main.m",
);
+17 -5
查看文件
@@ -125,6 +125,9 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
for(NSDictionary *row in descriptors)if([row[@"offset"]integerValue]>=0){float value=*field(&defaults,row);finite&=std::isfinite(value);matches&=value==[row[@"default"]floatValue];}
for(int c=0;c<3;c++)finite&=std::isfinite(defaults.primariesM0[c])&&std::isfinite(defaults.primariesM1[c])&&std::isfinite(defaults.primariesM2[c]);
run.need(@"finite-real-model-defaults",finite&&matches);
bool initialGroups=true;
for(NSDictionary *section in sections){BOOL base=[@[@"base",@"color"]containsObject:section[@"key"]];for(NSDictionary *row in descriptors)if([row[@"pid"]isEqual:section[@"enabled"]])initialGroups&=([row[@"default"]doubleValue]>=.5)==base;}
run.record(@"only-basic-adjustments-enabled-by-default",initialGroups);
DYDiagnosticManager *manager=[[[DYDiagnosticManager alloc]init]autorelease];error=nil;
run.need(@"native-parameter-creation",DYCreateParameters(manager,&error)&&!manager->_duplicate&&manager->_values.count==descriptors.count&&manager->_custom.count==2,@{@"error":reason(error)});
id<FxParameterSettingAPI_v6> setter=[manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];id<FxParameterRetrievalAPI_v6> getter=[manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
@@ -144,6 +147,11 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
[[source metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,width,height) mipmapLevel:0 withBytes:input.data() bytesPerRow:width*8];
DYRenderer *renderer=[[[DYRenderer alloc]init]autorelease];Pixels neutral=render(run,renderer,source,destination,gpu,defaults,@{},@"renderer-default-pass");Difference neutralDifference=difference(input,neutral);
run.record(@"transparent-premultiplied-neutral",neutralDifference.nonfinite==0&&neutralDifference.maximum<=.001,measure(neutralDifference));
auto checkFoldedGroup=[&](DYUniforms active,NSUInteger offset,NSDictionary *paths,NSString *name){
*(float *)((uint8_t *)&active+offset)=0;
Pixels folded=render(run,renderer,source,destination,gpu,active,paths,[name stringByAppendingString:@"-render"]);
Difference delta=difference(neutral,folded);run.record(name,delta.nonfinite==0&&delta.maximum==0,measure(delta));
};
size_t transparentBad=0;for(size_t i=0;i<input.size();i+=4){if(input[i+3]==0)for(int c=0;c<4;c++)if(neutral[i+c]!=0)transparentBad++;if(neutral[i+3]!=input[i+3])transparentBad++;}
run.record(@"renderer-alpha-contract",transparentBad==0,@{@"invalidComponents":@(transparentBad)});
NSData *preview=[renderer preview];bool previewFinite=preview.length==320*180*16;if(previewFinite){const float *data=(const float *)preview.bytes;for(NSUInteger i=0;i<preview.length/4;i++)previewFinite&=std::isfinite(data[i]);}
@@ -182,16 +190,20 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
u.baseSectionEnabled=0;Pixels bypass=render(run,renderer,source,destination,gpu,u,@{},@"renderer-base-bypass-pass");Difference bypassDifference=difference(neutral,bypass);run.record(@"base-group-bypass",bypassDifference.nonfinite==0&&bypassDifference.maximum==0,measure(bypassDifference));
u=defaults;u.temperature=35;u.tint=-20;Pixels wb=render(run,renderer,source,destination,gpu,u,@{},@"renderer-white-balance-pass");Difference wbDifference=difference(neutral,wb);run.record(@"white-balance-real-table-frame",wbDifference.nonfinite==0&&wbDifference.different>100,measure(wbDifference));
u.colorSectionEnabled=0;bypass=render(run,renderer,source,destination,gpu,u,@{},@"renderer-color-bypass-pass");bypassDifference=difference(neutral,bypass);run.record(@"color-group-bypass",bypassDifference.nonfinite==0&&bypassDifference.maximum==0,measure(bypassDifference));
u=defaults;u.hslHueA.x=28;u.hslSatA.y=45;u.hslLumB.z=-18;Pixels hsl=render(run,renderer,source,destination,gpu,u,@{},@"renderer-hsl-pass");Difference hslDifference=difference(neutral,hsl);run.record(@"hsl-real-table-frame",hslDifference.nonfinite==0&&hslDifference.different>100,measure(hslDifference));
u=defaults;u.colorGradingHueSatA.x=210;u.colorGradingHueSatA.y=42;u.colorGradingLuma.x=18;Pixels grading=render(run,renderer,source,destination,gpu,u,@{},@"renderer-grading-pass");Difference gradingDifference=difference(neutral,grading);run.record(@"grading-real-table-frame",gradingDifference.nonfinite==0&&gradingDifference.different>100,measure(gradingDifference));
for(int profile=1;profile<=17;profile++){@autoreleasepool{u=defaults;u.inputProfile=profile;Pixels transformed=render(run,renderer,source,destination,gpu,u,@{},[NSString stringWithFormat:@"input-profile-%02d-load-render",profile]);Difference delta=difference(neutral,transformed);run.record([NSString stringWithFormat:@"input-profile-%02d-finite-nonzero",profile],delta.nonfinite==0&&delta.nonzero>100,measure(delta));}}
DYRenderer *analysisRenderer=[[[DYRenderer alloc]init]autorelease];u=defaults;u.inputProfile=1;render(run,analysisRenderer,source,destination,gpu,u,@{},@"renderer-input-analysis-pass");
u=defaults;u.hslSectionEnabled=1;u.hslHueA.x=28;u.hslSatA.y=45;u.hslLumB.z=-18;Pixels hsl=render(run,renderer,source,destination,gpu,u,@{},@"renderer-hsl-pass");Difference hslDifference=difference(neutral,hsl);run.record(@"hsl-real-table-frame",hslDifference.nonfinite==0&&hslDifference.different>100,measure(hslDifference));
checkFoldedGroup(u,offsetof(DYUniforms,hslSectionEnabled),@{},@"folded-hsl-bypasses-retained-adjustments");
u=defaults;u.colorGradingSectionEnabled=1;u.colorGradingHueSatA.x=210;u.colorGradingHueSatA.y=42;u.colorGradingLuma.x=18;Pixels grading=render(run,renderer,source,destination,gpu,u,@{},@"renderer-grading-pass");Difference gradingDifference=difference(neutral,grading);run.record(@"grading-real-table-frame",gradingDifference.nonfinite==0&&gradingDifference.different>100,measure(gradingDifference));
checkFoldedGroup(u,offsetof(DYUniforms,colorGradingSectionEnabled),@{},@"folded-grading-bypasses-retained-adjustments");
for(int profile=1;profile<=17;profile++){@autoreleasepool{u=defaults;u.inputSectionEnabled=1;u.inputProfile=profile;Pixels transformed=render(run,renderer,source,destination,gpu,u,@{},[NSString stringWithFormat:@"input-profile-%02d-load-render",profile]);Difference delta=difference(neutral,transformed);run.record([NSString stringWithFormat:@"input-profile-%02d-finite-nonzero",profile],delta.nonfinite==0&&delta.nonzero>100,measure(delta));}}
checkFoldedGroup(u,offsetof(DYUniforms,inputSectionEnabled),@{},@"folded-input-bypasses-retained-profile");
DYRenderer *analysisRenderer=[[[DYRenderer alloc]init]autorelease];u=defaults;u.inputSectionEnabled=1;u.inputProfile=1;render(run,analysisRenderer,source,destination,gpu,u,@{},@"renderer-input-analysis-pass");
NSData *inputPreview=[analysisRenderer preview];bool analysisDifferent=inputPreview.length==preview.length&&preview.length==320*180*16;double analysisMaximum=0;size_t analysisChanges=0;
if(analysisDifferent){const float *a=(const float *)preview.bytes,*b=(const float *)inputPreview.bytes;for(NSUInteger i=0;i<preview.length/4;i++){if(!std::isfinite(a[i])||!std::isfinite(b[i])){analysisDifferent=false;break;}if(i%4!=3){double delta=std::fabs(double(a[i])-b[i]);analysisMaximum=std::max(analysisMaximum,delta);if(delta>1e-5)analysisChanges++;}}}
run.record(@"analysis-applies-selected-input-LUT",analysisDifferent&&analysisChanges>100,@{@"changedComponents":@(analysisChanges),@"maxAbsoluteError":@(analysisMaximum)});
NSString *lookFile=[runtime stringByAppendingPathComponent:@"diagnostic-look.cube"];NSMutableString *cube=[NSMutableString stringWithString:@"TITLE \"Self test look\"\nLUT_3D_SIZE 2\nDOMAIN_MIN 0 0 0\nDOMAIN_MAX 1 1 1\n"];
for(int b=0;b<2;b++)for(int g=0;g<2;g++)for(int r=0;r<2;r++)[cube appendFormat:@"%.8f %.8f %.8f\n",.7f*r+.1f,.8f*g+.05f,.85f*b+.02f];error=nil;run.need(@"temporary-look-file",[cube writeToFile:lookFile atomically:YES encoding:NSUTF8StringEncoding error:&error],@{@"error":reason(error)});
NSDictionary *paths=@{@"look0":lookFile,@"look1":lookFile,@"look2":lookFile,@"look3":lookFile,@"look4":lookFile};u=defaults;u.postLUTStrength=.35f;u.extraPostLUTStrengths=(DYFloat4){.4f,.5f,.6f,.7f};Pixels looks=render(run,renderer,source,destination,gpu,u,paths,@"renderer-five-look-pass");Difference looksDifference=difference(neutral,looks);run.record(@"five-look-mixes-affect-frame",looksDifference.nonfinite==0&&looksDifference.different>100,measure(looksDifference));
NSDictionary *paths=@{@"look0":lookFile,@"look1":lookFile,@"look2":lookFile,@"look3":lookFile,@"look4":lookFile};u=defaults;u.lookSectionEnabled=1;u.postLUTStrength=.35f;u.extraPostLUTStrengths=(DYFloat4){.4f,.5f,.6f,.7f};Pixels looks=render(run,renderer,source,destination,gpu,u,paths,@"renderer-five-look-pass");Difference looksDifference=difference(neutral,looks);run.record(@"five-look-mixes-affect-frame",looksDifference.nonfinite==0&&looksDifference.different>100,measure(looksDifference));
checkFoldedGroup(u,offsetof(DYUniforms,lookSectionEnabled),paths,@"folded-look-bypasses-retained-LUTs");
NSURL *exportURL=[NSURL fileURLWithPath:[runtime stringByAppendingPathComponent:@"diagnostic-export.cube"]];error=nil;run.need(@"renderer-export-33cube",[renderer exportLUT:exportURL uniforms:u paths:paths error:&error],@{@"error":reason(error),@"path":exportURL.path});
NSString *exported=[NSString stringWithContentsOfURL:exportURL encoding:NSUTF8StringEncoding error:&error];NSUInteger triples=0,nonzero=0;bool exportFinite=true;for(NSString *line in [exported componentsSeparatedByCharactersInSet:NSCharacterSet.newlineCharacterSet]){float r,g,b;if(sscanf(line.UTF8String,"%f %f %f",&r,&g,&b)==3){triples++;exportFinite&=std::isfinite(r)&&std::isfinite(g)&&std::isfinite(b);if(r!=0||g!=0||b!=0)nonzero++;}}
run.record(@"export-33cube-data-contract",[exported containsString:@"LUT_3D_SIZE 33"]&&triples==33*33*33&&exportFinite&&nonzero>0,@{@"rows":@(triples),@"nonzeroRows":@(nonzero),@"bytes":@([[[NSFileManager defaultManager]attributesOfItemAtPath:exportURL.path error:nil][NSFileSize]unsignedLongLongValue])});
+53 -27
查看文件
@@ -22,8 +22,11 @@ static NSButton *DYButton(NSString *title,id target,SEL action) {
b.bezelStyle=NSBezelStyleRounded; b.font=[NSFont systemFontOfSize:11];
b.contentTintColor=DYAccent(); return b;
}
static BOOL DYStrengthUsesUnitRange(NSDictionary *d) {
return [d[@"key"] hasSuffix:@"Strength"] && [d[@"max"] doubleValue]<=1;
}
static NSString *DYNumber(double value,NSDictionary *d) {
if([d[@"key"] hasSuffix:@"Strength"]||[d[@"key"] isEqual:@"preLUTStrength"])return [NSString stringWithFormat:@"%.0f%%",value*100];
if([d[@"key"] hasSuffix:@"Strength"])return [NSString stringWithFormat:@"%.0f%%",value*(DYStrengthUsesUnitRange(d)?100:1)];
double step=[d[@"step"] doubleValue];
return [NSString stringWithFormat:step>0&&step<.1?@"%.2f":step>0&&step<1?@"%.1f":@"%.0f",value];
}
@@ -138,7 +141,9 @@ static NSArray *DYAccessibleSubviews(NSView *view, BOOL visibleOnly) {
NSRect r=NSInsetRect(self.bounds,.5,2);
NSGradient *g=[[[NSGradient alloc]initWithStartingColor:DYThemePalette()[@"headerTop"] endingColor:DYThemePalette()[@"headerBottom"]]autorelease];
[g drawInBezierPath:[NSBezierPath bezierPathWithRoundedRect:r xRadius:8 yRadius:8] angle:90];
[self.title drawInRect:NSInsetRect(r,9,5) withAttributes:@{NSFontAttributeName:self.font,NSForegroundColorAttributeName:DYInk()}];
NSDictionary *attributes=@{NSFontAttributeName:self.font,NSForegroundColorAttributeName:DYInk()};
[(self.state==NSControlStateValueOn?@"▾":@"▸") drawInRect:NSMakeRect(8,7,12,16) withAttributes:attributes];
[self.title drawInRect:NSMakeRect(23,7,MAX(0,r.size.width-31),16) withAttributes:attributes];
}
- (void)mouseDown:(NSEvent *)event {
if(event.clickCount==2) [NSApp sendAction:self.doubleClickAction to:self.target from:self];
@@ -479,9 +484,10 @@ static NSImage *DYWheelImage(void) {
[_document addSubview:card];
DYHeader *header=[[[DYHeader alloc] initWithFrame:NSZeroRect] autorelease];
header.title=[section[@"key"] isEqual:@"skin"]?@"肤色保护设置":section[@"title"];
[header setButtonType:NSButtonTypePushOnPushOff];
header.bordered=NO; header.alignment=NSTextAlignmentLeft; header.font=[NSFont boldSystemFontOfSize:12];
header.contentTintColor=DYInk(); header.target=self; header.action=@selector(toggleSection:); header.tag=index;
header.doubleClickAction=@selector(resetSection:); header.toolTip=@"点击折叠;双击还原本组";
header.doubleClickAction=@selector(resetSection:); header.toolTip=@"展开启用,折叠停用;双击还原本组";
[card addSubview:header];
NSButton *enabled=DYButton(@"",self,@selector(groupEnabled:));enabled.bordered=NO;[enabled setButtonType:NSButtonTypePushOnPushOff];enabled.image=[NSImage imageWithSystemSymbolName:@"eye" accessibilityDescription:@"启用本组"];
enabled.tag=index; enabled.contentTintColor=DYAccent(); enabled.toolTip=@"启用或旁路本组";
@@ -489,7 +495,7 @@ static NSImage *DYWheelImage(void) {
[card addSubview:enabled]; enabled.hidden=section[@"enabled"]==nil;
NSButton *reset=DYButton(@"↺",self,@selector(resetSection:)); reset.tag=index;
reset.bordered=NO;
reset.toolTip=@"还原本组"; reset.accessibilityLabel=[section[@"title"] stringByAppendingString:@"还原"];
reset.toolTip=@"还原本组默认值与开关"; reset.accessibilityLabel=[section[@"title"] stringByAppendingString:@"还原"];
[card addSubview:reset];
NSMutableArray *body=[NSMutableArray array];
NSString *key=section[@"key"]?:@"";
@@ -575,7 +581,7 @@ static NSImage *DYWheelImage(void) {
}
for(NSView *row in body)if(![ordered containsObject:row])row.hidden=YES;body=ordered;
}
NSMutableDictionary *record=[NSMutableDictionary dictionaryWithDictionary:@{@"section":section,@"view":card,@"header":header,@"enabled":enabled,@"reset":reset,@"body":body,@"collapsed":@([key isEqual:@"skin"])}];
NSMutableDictionary *record=[NSMutableDictionary dictionaryWithDictionary:@{@"section":section,@"view":card,@"header":header,@"enabled":enabled,@"reset":reset,@"body":body,@"collapsed":@(![section[@"defaultEnabled"]boolValue])}];
if([key isEqual:@"look"]){NSButton *add=DYButton(@"+",self,@selector(addLook:));add.bordered=NO;add.font=[NSFont boldSystemFontOfSize:20];add.accessibilityLabel=@"添加风格 LUT";[card addSubview:add];record[@"add"]=add;}
[_cards addObject:record];
index++;
@@ -623,13 +629,14 @@ static NSImage *DYWheelImage(void) {
DYCard *card=c[@"view"];BOOL collapsed=[c[@"collapsed"]boolValue];NSString *key=c[@"section"][@"key"];
NSArray *body=c[@"body"];CGFloat contentHeight=0;
for(NSView *row in body)if([self showRow:row section:key])contentHeight+=[self heightForRow:row];
card.frame=NSMakeRect(16,y,cw,43+(collapsed?0:contentHeight+8));y+=card.frame.size.height+12;
[c[@"enabled"]setFrame:NSMakeRect(12,12,20,20)];
CGFloat titleWidth=MIN(cw-104,MAX(80,[[(NSButton *)c[@"header"]title]sizeWithAttributes:@{NSFontAttributeName:[NSFont boldSystemFontOfSize:12]}].width+22));
CGFloat titleWidth=MIN(cw-104,MAX(94,[[(NSButton *)c[@"header"]title]sizeWithAttributes:@{NSFontAttributeName:[NSFont boldSystemFontOfSize:12]}].width+36));
[c[@"header"]setFrame:NSMakeRect(42,8,titleWidth,28)];
CGFloat headerHeight=43;
card.frame=NSMakeRect(16,y,cw,headerHeight+(collapsed?0:contentHeight+8));y+=card.frame.size.height+12;
[c[@"reset"]setFrame:NSMakeRect(cw-36,10,24,24)];
[c[@"add"]setFrame:NSMakeRect(cw-64,10,24,24)];[c[@"add"]setEnabled:_visibleLooks<5];
CGFloat rowY=43;
[c[@"add"]setFrame:NSMakeRect(cw-64,10,24,24)];[c[@"add"]setEnabled:_visibleLooks<5];[c[@"add"]setHidden:collapsed];
CGFloat rowY=headerHeight;
for(NSView *row in body) {
BOOL show=!collapsed&&[self showRow:row section:key];row.hidden=!show;if(!show)continue;
CGFloat rh=[self heightForRow:row];row.frame=NSMakeRect(12,rowY,cw-24,rh-1);rowY+=rh;
@@ -660,6 +667,7 @@ static NSImage *DYWheelImage(void) {
if(_refreshing||!_manager)return;
id<FxCustomParameterActionAPI_v4> action=[self actionAPI]; if(!action)return;
_refreshing=YES;
BOOL groupingChanged=NO;
[action startAction:self];
@try {
CMTime t=action.currentTime;
@@ -676,12 +684,23 @@ static NSImage *DYWheelImage(void) {
NSPopUpButton *popup=r[@"popup"]; if(popup.numberOfItems>0) [popup selectItemAtIndex:MAX(0,MIN((NSInteger)llround(v),popup.numberOfItems-1))];
}
for(id graphic in _graphics)[graphic setValues:graphicValues];
for(NSDictionary *c in _cards) {
for(NSMutableDictionary *c in _cards) {
NSNumber *pid=c[@"section"][@"enabled"];
double v=1;if(pid)[get getFloatValue:&v fromParameter:pid.unsignedIntValue atTime:t];
[c[@"enabled"] setState:v>=.5?NSControlStateValueOn:NSControlStateValueOff];
[c[@"enabled"]setImage:[NSImage imageWithSystemSymbolName:v>=.5?@"eye":@"eye.slash" accessibilityDescription:v>=.5?@"启用本组":@"旁路本组"]];
for(NSView *row in c[@"body"])row.alphaValue=v>=.5?1:.45;
double v=[c[@"section"][@"defaultEnabled"]doubleValue];if(pid)[get getFloatValue:&v fromParameter:pid.unsignedIntValue atTime:t];
NSNumber *extra=c[@"section"][@"extraEnabled"];double extraValue=0;
if(extra)[get getFloatValue:&extraValue fromParameter:extra.unsignedIntValue atTime:t];
BOOL enabled=v>=.5||extraValue>=.5;
BOOL collapsed=!enabled;groupingChanged|=collapsed!=[c[@"collapsed"]boolValue];c[@"collapsed"]=@(collapsed);
[c[@"header"]setState:enabled?NSControlStateValueOn:NSControlStateValueOff];
[c[@"header"]setToolTip:enabled?@"折叠并停用本组,保留参数值;双击还原本组":@"展开并启用本组,恢复之前的参数值;双击还原本组"];
[c[@"header"]setAccessibilityHelp:[c[@"header"]toolTip]];
[c[@"header"]setNeedsDisplay:YES];
[c[@"enabled"] setState:enabled?NSControlStateValueOn:NSControlStateValueOff];
[c[@"enabled"]setImage:[NSImage imageWithSystemSymbolName:enabled?@"eye":@"eye.slash" accessibilityDescription:enabled?@"折叠并停用本组":@"展开并启用本组"]];
[c[@"enabled"]setToolTip:enabled?@"折叠并停用本组,保留参数值":@"展开并启用本组,恢复之前的参数值"];
[c[@"enabled"]setAccessibilityHelp:[c[@"enabled"]toolTip]];
// Visibility and rendering share the host's section enable value.
for(NSView *row in c[@"body"])row.alphaValue=1;
}
DYAssetState *assets=DYReadAssets(_manager,t);
for(NSString *key in _assetButtons) {
@@ -695,6 +714,9 @@ static NSImage *DYWheelImage(void) {
for(NSInteger i=1;i<5;i++)if([assets.paths[[NSString stringWithFormat:@"look%ld",(long)i]]length])_visibleLooks=MAX(_visibleLooks,i+1);
[self setNeedsLayout:YES];
} @finally { [action endAction:self]; _refreshing=NO; }
// Remote layout/accessibility can re-enter the host. Let the parameter
// action and current callback unwind before notifying the remote view.
if(groupingChanged)dispatch_async(dispatch_get_main_queue(),^{NSAccessibilityPostNotification(self,NSAccessibilityLayoutChangedNotification);});
}
- (void)postChanged { [[NSNotificationCenter defaultCenter] postNotificationName:@"DYModelChanged" object:_manager]; }
- (void)scalarChanged:(NSControl *)sender {
@@ -709,7 +731,7 @@ static NSImage *DYWheelImage(void) {
NSString *text=[sender.stringValue stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceCharacterSet];BOOL percent=[text hasSuffix:@"%"];
if(percent)text=[text substringToIndex:text.length-1];scanner=[NSScanner scannerWithString:text];
if(![scanner scanDouble:&v]||!scanner.isAtEnd||!std::isfinite(v)){NSBeep();[self refresh];return;}
if([d[@"key"]hasSuffix:@"Strength"])v/=100.;
if(DYStrengthUsesUnitRange(d))v/=100.;
} else v=sender.doubleValue;
}
v=fmax([d[@"min"] doubleValue],fmin([d[@"max"] doubleValue],v));
@@ -731,7 +753,7 @@ static NSImage *DYWheelImage(void) {
NSDictionary *d=_controls[@(sender.tag)][@"descriptor"];NSNumber *pid=d[@"enabled"];if(!pid)return;
id<FxCustomParameterActionAPI_v4> action=[self actionAPI];if(!action)return;
[action startAction:self];
@try {id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];double value=sender.state==NSControlStateValueOn?1:0;[set setFloatValue:value toParameter:pid.unsignedIntValue atTime:action.currentTime];NSNumber *extra=_cards[sender.tag][@"section"][@"extraEnabled"];if(extra)[set setFloatValue:value toParameter:extra.unsignedIntValue atTime:action.currentTime];}
@try {id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];double value=sender.state==NSControlStateValueOn?1:0;[set setFloatValue:value toParameter:pid.unsignedIntValue atTime:action.currentTime];}
@finally {[action endAction:self];}
[self postChanged];
}
@@ -745,21 +767,24 @@ static NSImage *DYWheelImage(void) {
} @finally {[action endAction:self];}
[self postChanged];
}
- (void)groupEnabled:(NSButton *)sender {
if(sender.tag>=_cards.count)return;
NSNumber *pid=_cards[sender.tag][@"section"][@"enabled"];if(!pid)return;
- (void)setSectionEnabled:(BOOL)enabled atIndex:(NSInteger)index {
if(index<0||index>=_cards.count)return;
NSDictionary *section=_cards[index][@"section"];
NSNumber *pid=section[@"enabled"];if(!pid)return;
id<FxCustomParameterActionAPI_v4> action=[self actionAPI];if(!action)return;
[action startAction:self];
@try {id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];[set setFloatValue:sender.state==NSControlStateValueOn?1:0 toParameter:pid.unsignedIntValue atTime:action.currentTime];}
@try {
id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];
[set setFloatValue:enabled?1:0 toParameter:pid.unsignedIntValue atTime:action.currentTime];
NSNumber *extra=section[@"extraEnabled"];if(extra)[set setFloatValue:enabled?1:0 toParameter:extra.unsignedIntValue atTime:action.currentTime];
}
@finally {[action endAction:self];}
[self postChanged];
}
- (void)groupEnabled:(NSButton *)sender { [self setSectionEnabled:sender.state==NSControlStateValueOn atIndex:sender.tag]; }
- (void)toggleSection:(NSButton *)sender {
if(sender.tag>=_cards.count)return;
NSMutableDictionary *card=_cards[sender.tag];BOOL collapsed=![card[@"collapsed"] boolValue];card[@"collapsed"]=@(collapsed);
[sender setNeedsDisplay:YES];
[self setNeedsLayout:YES];
NSAccessibilityPostNotification(self,NSAccessibilityLayoutChangedNotification);
if(sender.tag<0||sender.tag>=_cards.count)return;
[self setSectionEnabled:[_cards[sender.tag][@"collapsed"]boolValue] atIndex:sender.tag];
}
- (void)resetSection:(NSButton *)sender {
if(sender.tag>=_cards.count)return;
@@ -769,8 +794,9 @@ static NSImage *DYWheelImage(void) {
@try {
CMTime t=action.currentTime;id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];
for(NSDictionary *d in section[@"rows"]) {[set setFloatValue:[d[@"default"] doubleValue] toParameter:[d[@"pid"] unsignedIntValue] atTime:t];if(d[@"enabled"])[set setFloatValue:1 toParameter:[d[@"enabled"] unsignedIntValue] atTime:t];}
NSNumber *enabled=section[@"enabled"];if(enabled)[set setFloatValue:1 toParameter:enabled.unsignedIntValue atTime:t];
NSNumber *extra=section[@"extraEnabled"];if(extra)[set setFloatValue:1 toParameter:extra.unsignedIntValue atTime:t];
double defaultEnabled=[section[@"defaultEnabled"]doubleValue];
NSNumber *enabled=section[@"enabled"];if(enabled)[set setFloatValue:defaultEnabled toParameter:enabled.unsignedIntValue atTime:t];
NSNumber *extra=section[@"extraEnabled"];if(extra)[set setFloatValue:defaultEnabled toParameter:extra.unsignedIntValue atTime:t];
NSString *key=section[@"key"]?:@"";
if([key localizedCaseInsensitiveContainsString:@"input"]||[key localizedCaseInsensitiveContainsString:@"look"]) {
DYAssetState *assets=[[DYReadAssets(_manager,t) copy] autorelease];
+4 -4
查看文件
@@ -7,9 +7,9 @@ static NSDictionary *row(NSString*k,NSString*t,NSUInteger o,double lo,double hi,
NSMutableDictionary*r=[@{@"key":k,@"title":t,@"pid":@(PID(o)),@"offset":@(o),@"min":@(lo),@"max":@(hi),@"default":@(d),@"step":@(hi-lo>10?1:.01),@"kind":kind?:@"float"}mutableCopy];
[descriptors addObject:r];return [r autorelease];
}
static void section(NSString*k,NSString*t,NSUInteger offset,NSArray*rows,double def=1){
static void section(NSString*k,NSString*t,NSUInteger offset,NSArray*rows,double def=0){
NSDictionary*e=row([k stringByAppendingString:@"Enabled"],t,offset,0,1,def,@"bool");
[sections addObject:@{@"key":k,@"title":t,@"enabled":e[@"pid"],@"rows":rows}];
[sections addObject:@{@"key":k,@"title":t,@"enabled":e[@"pid"],@"defaultEnabled":@(def),@"rows":rows}];
}
static NSDictionary *scalar(NSString*k,NSString*t,NSUInteger o,double lo=-100,double hi=100,double def=0){return row(k,t,o,lo,hi,def,@"float");}
static void initialize(){static dispatch_once_t once;dispatch_once(&once,^{
@@ -26,8 +26,8 @@ static void initialize(){static dispatch_once_t once;dispatch_once(&once,^{
[descriptors replaceObjectAtIndex:[descriptors indexOfObjectPassingTest:^BOOL(id obj,NSUInteger idx,BOOL*stop){return [obj[@"key"]isEqual:keys[i]];}] withObject:r];[base addObject:r];
}
NSDictionary*copyAuto=@{@"key":@"copyAutoGrade",@"title":@"复制时自动调色",@"pid":@8800,@"offset":@(-1),@"min":@0,@"max":@1,@"default":@0,@"step":@1,@"kind":@"bool",@"notAnimatable":@YES};[descriptors addObject:copyAuto];
section(@"base",@"基础调色",136,[[[base subarrayWithRange:NSMakeRange(0,6)]arrayByAddingObjectsFromArray:[base subarrayWithRange:NSMakeRange(10,3)]]arrayByAddingObject:copyAuto]);
section(@"color",@"白平衡与颜色",140,@[base[6],base[7],base[9],base[8]]);
section(@"base",@"基础调色",136,[[[base subarrayWithRange:NSMakeRange(0,6)]arrayByAddingObjectsFromArray:[base subarrayWithRange:NSMakeRange(10,3)]]arrayByAddingObject:copyAuto],1);
section(@"color",@"白平衡与颜色",140,@[base[6],base[7],base[9],base[8]],1);
section(@"skin",@"肤色保护",464,@[scalar(@"skinStrength",@"保护程度",468,0,100,60),scalar(@"skinHue",@"肤色色相",472,0,60,28)],0);
NSMutableArray*look=[NSMutableArray arrayWithObject:scalar(@"postLUTStrength",@"风格 1 强度",60,0,1,1)];
for(int i=0;i<4;i++){[look addObject:row([NSString stringWithFormat:@"look%dEnabled",i+2],[NSString stringWithFormat:@"风格 %d 启用",i+2],160+i*4,0,1,1,@"bool")];[look addObject:scalar([NSString stringWithFormat:@"look%dStrength",i+2],[NSString stringWithFormat:@"风格 %d 强度",i+2],64+i*4,0,1,1)];}
+8 -2
查看文件
@@ -38,11 +38,17 @@ static id<MTLTexture> texture3D(id<MTLDevice>d,const float*values,NSUInteger n){
std::vector<float>v;NSUInteger n=0;if(!DYLUTReadCube(path,v,n,err))return nil;t=texture3D(e[@"device"],v.data(),n);if(!t){fail(err,@"LUT 纹理分配失败");return nil;}if(_luts.count>=12)[_luts removeAllObjects];_luts[key]=t;return t;
}
- (NSArray*)textures:(NSDictionary*)paths uniforms:(DYUniforms*)u entry:(NSDictionary*)e error:(NSError**)err{
NSString*input=paths[@"input"];int profile=(int)roundf(u->inputProfile);
// Normalize only this render copy. Folded groups retain their host parameters
// and paths, while inactive LUTs neither load files nor affect any layer.
BOOL inputEnabled=u->inputSectionEnabled>.5;
NSString*input=inputEnabled?paths[@"input"]:nil;int profile=inputEnabled?(int)roundf(u->inputProfile):0;
if(!inputEnabled){u->inputProfile=0;u->preLUTStrength=0;}
if(!input.length&&profile>0&&profile<(int)inputFiles().count)input=[[NSBundle bundleForClass:self.class]pathForResource:inputFiles()[profile] ofType:@"dylut" inDirectory:@"InputLUTs"];
if(profile>0&&!input.length){fail(err,@"相机输入转换资源缺失");return nil;}
NSMutableArray*ts=[NSMutableArray array];id<MTLTexture>t=[self lut:input entry:e error:err];if(!t)return nil;[ts addObject:t];if(!input.length)u->preLUTStrength=0;
for(int i=0;i<5;i++){NSString*p=paths[[NSString stringWithFormat:@"look%d",i]];t=[self lut:p entry:e error:err];if(!t)return nil;[ts addObject:t];if(!p.length){if(i==0)u->postLUTStrength=0;else u->extraPostLUTStrengths[i-1]=0;}}
BOOL looksEnabled=u->lookSectionEnabled>.5;
if(!looksEnabled)u->extraLookSectionEnableds=(DYFloat4){0,0,0,0};
for(int i=0;i<5;i++){BOOL active=looksEnabled&&(i==0||u->extraLookSectionEnableds[i-1]>.5);NSString*p=active?paths[[NSString stringWithFormat:@"look%d",i]]:nil;t=[self lut:p entry:e error:err];if(!t)return nil;[ts addObject:t];if(!p.length){if(i==0)u->postLUTStrength=0;else u->extraPostLUTStrengths[i-1]=0;}}
[DYColorTables fillPrimaries:u];id<MTLDevice>d=e[@"device"];
id<MTLTexture>h=[_tables hslForDevice:d uniforms:u],w=[_tables whiteBalanceForDevice:d uniforms:u],g=[_tables gradingForDevice:d uniforms:u];if(!h||!w||!g){fail(err,_tables.lastError?:@"颜色查表构建失败");return nil;}[ts addObjectsFromArray:@[h,w,g]];return ts;
}
+2 -2
查看文件
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.1.0</string>
<string>1.1.2</string>
<key>CFBundleVersion</key>
<string>6</string>
<string>11</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>PlugInKit</key>
+3 -3
查看文件
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIconFile</key>
<string></string>
<string>DayuColor.icns</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.1.0</string>
<string>1.1.2</string>
<key>CFBundleVersion</key>
<string>6</string>
<string>11</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
二进制文件未显示。