比较提交
7
次代码提交
| 作者 | SHA1 | 提交日期 | |
|---|---|---|---|
|
|
85b6590944 | ||
|
|
06d531c443 | ||
|
|
eeeee102cd | ||
|
|
f575c01893 | ||
|
|
a249436776 | ||
|
|
b640b5da06 | ||
|
|
7814a03f95 |
没有与搜索条件相匹配的文件
@@ -0,0 +1,7 @@
|
||||
新增通道混合器:RGB三输出矩阵、保持亮度、保持饱和度和混合强度。新增胶片模拟:减色、晕光、辉光、颗粒、暗角五组,独立启停;颗粒支持固定种子与1–5帧保持。新模块均支持蒙版、区域跟踪、相邻初始化叠层和完整预设保存,既有调色链与旧工程数据保留。
|
||||
|
||||
参考本机Color Finale 2.16.2组件独立实现,产品运行和构建不加载原厂二进制。减色/颗粒接入既有sRGB边界,其余在线性纹理上;本版不含八种ACES印片外观,不承诺原版任意ACES链完全等价。纯矩阵及减色可导出Cube,活跃空间/时间效果或蒙版会提示无法保存为静态Cube。
|
||||
|
||||
349项原生检查、四种尺寸184项原版组件对照通过。FCP12.4验证用户旧234参数、资产路径、蜘蛛盘和287键蒙版载荷保持,新增层/蒙版/折叠及删除撤销重做通过。正式ProRes导出确认颗粒两帧保持,组合与颗粒完整预设冷重开前后逐字节一致,三项目FCPXML回导通过。Motion、Intel未实机验收。
|
||||
|
||||
版本1.5.0(34),Apple Silicon,macOS14.6起。APP实际编译源码 `06d531c443b0bb2f179022a4e64148394f5d0690`;APP公证 `164abf2b-4e67-4504-b72a-04122da9e381`、PKG公证 `05f849da-5567-4351-9556-742d17b95723` 均Accepted,签名、票据、Gatekeeper和20项展开验包通过。包 `大鱼调色-1.5.0.pkg`,14,380,104字节,SHA-256 `3ecabc7a8bfd675b228a5f00016aa17a35b65b544055e57793ec3bff3d7e0294`。唯一正式APP位置 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,包内不含用户预设、媒体或LUT。APP已独立安装并在FCP验收;PKG仅展开验包,未再次运行系统安装器。历史标签和发行包保留。
|
||||
@@ -1,6 +1,20 @@
|
||||
# 大鱼调色
|
||||
|
||||
原生 FxPlug 4 调色器,当前正式安装版本 **1.4.3(33)**。唯一安装位置为 `/Library/Plug-Ins/FxPlug/大鱼调色.app`;Final Cut Pro 中从“效果 → 大鱼调色”添加。
|
||||
原生 FxPlug 4 调色器,当前正式安装版本 **1.5.0(34)**。唯一安装位置为 `/Library/Plug-Ins/FxPlug/大鱼调色.app`;Final Cut Pro 中从“效果 → 大鱼调色”添加。
|
||||
|
||||
交接与恢复入口:[大鱼调色FxPlug4交接.md](大鱼调色FxPlug4交接.md)。
|
||||
|
||||
## 胶片模拟与通道混合器
|
||||
|
||||
新增可重复的胶片模拟和通道混合器,现有调色、蒙版、区域跟踪和相邻叠层保留。每个新工具都有独立眼睛、折叠、复位、蒙版、数量标记和“再加一层”;新增层从默认值开始。
|
||||
|
||||
通道混合器按红、绿、蓝输出分组,每个输出有三个输入系数,并提供保持亮度、保持饱和度和混合强度。胶片包含减色、晕光、辉光、颗粒、暗角五组,各自启停;颗粒支持精确帧时间、1–5帧保持和固定种子。默认保持中性,旧工程缺省不改变画面。
|
||||
|
||||
本机Color Finale 2.16.2的相关数学已单独取证并对照,产品独立构建,不加载原版APP或原版二进制。新阶段位于既有显示域链之后;减色/颗粒沿用本工程sRGB边界,其余在线性域。活跃减色沿用原核的0–1限幅;不宣称与原版全部ACES管理路径完全等价。原版ACES输出中的八种印片外观未纳入本版五组处理。
|
||||
|
||||
完整预设升级为v5,兼容旧版。纯通道矩阵和减色可导出Cube;活跃晕光、辉光、颗粒、暗角和蒙版不能保存为静态Cube,导出时说明原因。
|
||||
|
||||
349项原生检查、四种尺寸184项原版组件对照通过。FCP12.4验证旧234参数、LUT路径、蜘蛛盘和全部287键蒙版载荷不变;新增层默认值、蒙版数量、折叠、删除撤销/重做、冷重开通过。1920×1080正式导出验证“两帧保持”,组合预设8987字节及颗粒预设8420字节重开前后逐字节一致。见[研究与边界](research/ColorFinaleFilmMixer.md)、[组件对照](verification/FilmMixerReference.json)、[宿主验收](verification/HostFilmMixer1.5.0.json)。
|
||||
|
||||
## 蒙版折叠与标题标记
|
||||
|
||||
@@ -36,9 +50,9 @@ LUT 缩略图浏览器使用宿主的独立可调整窗口:拖动标题栏移
|
||||
|
||||
## 每工具蒙版与再次添加工具
|
||||
|
||||
十二个模块标题均有“添加蒙版”和“再加一层”。新增工具紧接点击的原工具或新增工具插入,从本工具的初始化参数开始,拥有独立启停、折叠、复位、删除、LUT 和蒙版;不会复制原层当前设置。新增一级采用 Rec.709/Gamma 2.4 同域输入输出,新增肤色保护强度为零。
|
||||
十四个模块标题均有“添加蒙版”和“再加一层”。新增工具紧接点击的原工具或新增工具插入,从本工具的初始化参数开始,拥有独立启停、折叠、复位、删除、LUT 和蒙版;不会复制原层当前设置。新增一级采用 Rec.709/Gamma 2.4 同域输入输出,新增肤色保护强度为零。
|
||||
|
||||
蒙版包括椭圆、矩形、钢笔、线性渐变、HSL 和亮度选区,支持相加、减去、相交、反转、羽化和强度。矩形、椭圆和闭合钢笔区域可正向、反向、双向或单帧跟踪。算法从“大鱼调色盘”固定源码适配,随本产品独立构建;不依赖安装父插件。完整预设 v4 保存新增工具、蒙版和逐帧轨迹,兼容旧预设。空间蒙版不能导出到 Cube,导出时会提示。
|
||||
蒙版包括椭圆、矩形、钢笔、线性渐变、HSL 和亮度选区,支持相加、减去、相交、反转、羽化和强度。矩形、椭圆和闭合钢笔区域可正向、反向、双向或单帧跟踪。算法从“大鱼调色盘”固定源码适配,随本产品独立构建;不依赖安装父插件。完整预设 v5 保存新增工具、蒙版和逐帧轨迹,兼容旧预设。空间蒙版不能导出到 Cube,导出时会提示。
|
||||
|
||||
蒙版检视器采用13pt参数文字和数值、32–36pt按钮、独立整行滑杆及两列跟踪操作。钢笔菜单直接进入绘制态,可点击放点、拖出曲柄、点首节点/Return/“完成绘制”闭合,Esc/取消保留原路径;支持重画、Delete回退和即时预览。跟踪改进实际路径搜索边界、300点特征、亚像素精炼和21×21光流,运动分析按显示比例限制到1280×720,4K细纹先低通再缩小,调色渲染和输出分辨率保持原设置。
|
||||
|
||||
@@ -77,6 +91,6 @@ LUT 缩略图浏览器使用宿主的独立可调整窗口:拖动标题栏移
|
||||
|
||||
正式发行包由 PKG 工坊技能生成,包含 APP 与 FCP 模板,不含用户 LUT、预设或媒体。安装与发布证据分别保存在 [Package.json](verification/Package.json) 和 [Release.json](verification/Release.json);以其中记录的版本和成功状态为准。
|
||||
|
||||
正式发行包:[大鱼调色-1.4.2.pkg](../发行包/大鱼调色-1.4.2.pkg);APP与PKG均已签名、公证、粘附票据并通过Gatekeeper,20项展开验包通过。[1.4.2 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.4.2-tracking-midpoint-20261102)已发布;草稿和发布后的完整下载字节数、SHA-256均一致。历史[1.4.1 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.4.1-mask-workflow-20261101)及更早发行包和标签保留。
|
||||
正式发行包:[大鱼调色-1.5.0.pkg](../发行包/大鱼调色-1.5.0.pkg);APP与PKG均已签名、公证、粘附票据并通过Gatekeeper,20项展开验包通过。发行标签 `v1.5.0-film-mixer-20261102`,上传与下载核验结果以 [Release.json](verification/Release.json) 中匹配本版的记录为准。历史[1.4.3 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.4.3-mask-fold-20261102)及更早发行包、标签和验收记录保留。
|
||||
|
||||
1.3.1 的历史验收包含 Sony 默认、可见复位、浮动浏览器、系统窗口缩放、两种布局、最近排序与关闭重开。原生检查单独覆盖几何/布局持久化和鼠标事件;当时自动化没有独立确认自由标题栏/边缘拖动。1.4.0 另在独立合成工程中完成上文的宿主检查,用户确认中心拖动后保留其试调状态。
|
||||
+14
-2
@@ -1,6 +1,18 @@
|
||||
# 大鱼调色恢复说明
|
||||
|
||||
## 当前 1.4.3(33):蒙版折叠与数量标记
|
||||
当前交接:[大鱼调色FxPlug4交接.md](大鱼调色FxPlug4交接.md)。
|
||||
|
||||
## 当前1.5.0(34):胶片与通道混合器
|
||||
|
||||
正式路径 `/Library/Plug-Ins/FxPlug/大鱼调色.app`;Bundle ID `com.dayu.color` / `com.dayu.color.XPC`。实际编译源码 `06d531c443b0bb2f179022a4e64148394f5d0690`;APP公证 `164abf2b-4e67-4504-b72a-04122da9e381` Accepted,签名、票据和Gatekeeper通过。安装与启动从唯一正式位置执行,FCP12.4已验收,记录见 `verification/Delivery.json` 与 `verification/HostFilmMixer1.5.0.json`。
|
||||
|
||||
主分支远程 `https://dayu.media/git/dayu/dayu-color.git`,无LFS或子模块。新增胶片与RGB混合的全部源码、Metal、参数/模板均在仓库,不依赖本机Color Finale、REA缓存或父工程。42个参数追加,944字节GPU前缀和1104字节旧版完整前缀保持。恢复时使用固定标签/提交,证书与私钥须单独恢复,不能由Git替代。
|
||||
|
||||
远端独立clone已完成Release构建及349项检查,四种尺寸原版组件对照184项通过。组件证据、域/顺序及限制见 `research/ColorFinaleFilmMixer.md`。当前用户媒体、完整预设、FCP资源库和验收导出只在本机,不进入仓库或安装包。安装包与Release元数据见本轮Package/Release记录。
|
||||
|
||||
正式PKG `../发行包/大鱼调色-1.5.0.pkg`,14,380,104字节,SHA-256 `3ecabc7a8bfd675b228a5f00016aa17a35b65b544055e57793ec3bff3d7e0294`;PKG公证 `05f849da-5567-4351-9556-742d17b95723` Accepted,签名、票据、Gatekeeper与20项展开验包通过。本轮未再次运行系统安装器,正式APP已有独立安装和宿主验收。发行标签 `v1.5.0-film-mixer-20261102`;发布与全量下载结果见匹配本版的 `verification/Release.json`。
|
||||
|
||||
## 历史 1.4.3(33):蒙版折叠与数量标记
|
||||
|
||||
当前正式版1.4.3(33),APP实际编译源码 `26a888f4534792481c6a9933091cb0b23307cd24`,公证 `e755670d-8fb3-46d2-95c3-1206f014d16d` Accepted。签名、票据、Gatekeeper、唯一正式安装及正式路径293项既有原生检查通过。正式位置和Bundle ID不变。
|
||||
|
||||
@@ -12,7 +24,7 @@ FCP12.4验证用户现有蜘蛛盘蒙版的收起/展开,完整77276字节预
|
||||
|
||||
|
||||
|
||||
本轮正式安装包 `../发行包/大鱼调色-1.4.3.pkg`,14,340,650字节,SHA-256 `41bba698a70a7629438688a4be74947f424f3af04190090c44f248827b4c3bb2`;PKG公证 `f9218078-8fd0-4a0c-9240-4b1acf7d9655` Accepted,签名/票据/Gatekeeper与20项展开验包通过。APP已有独立正式安装及宿主验收,本轮未再次运行系统安装器。Release标签 `v1.4.3-mask-fold-20261102` 待完整下载校验后发布。
|
||||
本轮正式安装包 `../发行包/大鱼调色-1.4.3.pkg`,14,340,650字节,SHA-256 `41bba698a70a7629438688a4be74947f424f3af04190090c44f248827b4c3bb2`;PKG公证 `f9218078-8fd0-4a0c-9240-4b1acf7d9655` Accepted,签名/票据/Gatekeeper与20项展开验包通过。APP已有独立正式安装及宿主验收,本轮未再次运行系统安装器。Release标签 `v1.4.3-mask-fold-20261102` 已发布,标签提交 `301b31438e8da95dc4e6e1c09498ad814a0ebcfc`;[Release371](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.4.3-mask-fold-20261102) / 附件16在草稿和发布后均完整下载校验14,340,650字节及SHA-256一致。发行标签已从远端独立恢复244文件,全部字节比较及full/strict fsck通过,见 `verification/MaskFoldingReleaseRecovery.json`。核验下载副本和恢复clone已清理,仓库可见性不变。
|
||||
|
||||
## 历史 1.4.2(31):真实素材与中间起点跟踪
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
# Color Finale 胶片与通道混合:本机移植记录
|
||||
|
||||
2026-11-02,基线 `b640b5da06f4c4455bb79c9b6bc16daa3088fa92`,正式1.4.3(33)。当前为研究检查点,尚未替换正式程序。
|
||||
|
||||
## 目标身份与保存位置
|
||||
|
||||
参考为本机 ColorFinale 2.16.2(625)。插件 SHA-256 `49121a6f5487060d322a59e7658166ab772e8a56f7dc1bcfa9d433a89436b30f`;RenderingEngine `32dca93459347e5ad363cb145d0ccf84b933b2045eee2c9535676a01744b84e3`;GradeKit `e868a8c6df64bf03b7c24af5657c5ac7a2259a1943dfe06e01dbb7881df018a3`。
|
||||
|
||||
REA/Ghidra12.1.4目标绑定;Hopper在本机不可用,未改环境或安装工具。原始反编译、AIR和原版运行探针数据仅在 `/Users/mac/Library/Caches/CodexBuilds/ColorResearch/dayu-film-mixer-20261102/` 及其父目录的本轮 evidence/snapshot 文件中。产品不得依赖这些缓存或 Color Finale 的安装。
|
||||
|
||||
在改动前通过现有正式插件保存当前用户完整预设到 `.../com.dayu.color/fcp-qa/film-mixer-before-user.json`,77437字节;界面显示286个轨迹键。该私有预设不入Git或发行包。接手源码工作区干净,main与远程完整SHA一致,无待补推分支。
|
||||
|
||||
## 已观察的原版合同
|
||||
|
||||
| 模块 | 观察 | 证据 |
|
||||
| --- | --- | --- |
|
||||
| 通道混合器 | RGB三个输出行各读取RGB三系数,独立保持亮度、保持饱和度;缺省恒等矩阵,两保持选项为关 | `ev_de17c8b567e4f5b5975b7f65df03a00b6b48ccbc1053283619c02b95a8543387`、`ev_05d57fdd47b4aeca7b6928f1e37f3dd1f7d8ea482cb53c62689f0ed01d0194a4`;原版AIR `ChannelMixer` |
|
||||
| 减色 | gammaAll/Cyan/Magenta/Yellow、density、densitySwitch、valueSwitch进入SubSat;通道归一化幂函数再以白归一化,不是简单RGB幂函数 | `ev_90babd33318d6df4735fc2b4fd8ff79a76e6a035939d53e9dff1abdd99c0fa0d`;AIR `SubSat`、`compute_norm` |
|
||||
| 晕光 | 原图clamp边缘→CIGaussianBlur(scatter)→HalationKernel;R/G使用boost/dyeTransmission,B保持 | `ev_a187b1b5479b8dcd3419136e4d6c7b4de8b1fd692e3469f8ce760277fc82e5b3`;AIR `HalationKernel` |
|
||||
| 辉光 | sensitivity、blurRadius、intensity送入独立通用kernel,后续Fx包装仍需追查 | `ev_91b77df09f4b079fb6dd3ec48048b920a1712de647717a18349585dab51035d2` |
|
||||
| 颗粒 | seed、intensity、grainSize、filmResponse、correlation及RGB标准差;PCG哈希+Box-Muller正态噪声;grainSize>1由MPS高斯扩散;逐通道响应与相关性混合 | `ev_ff3cd2863e3fcf6d834c2a9e80a550bb6c2c85fa28ccdd1f8c4ac941aba9f469`、`ev_591f74d294cd90958b4b5212f004171b38a49fc1799547b93b062c29f04b68ef`、`ev_6ddb156a25bce95378ef3b21653a84779d5a9a9f4924820f46a14d103359ff5e`;AIR `BoxMullerPCG`、`GrainFilter` |
|
||||
|
||||
RenderingEngine `default.metallib` SHA-256 `6fd43083a38e76c95c6256a331eabb85d97b48c32d3418e8fee4c1d28480c7ff`;`metal_kernels.metallib` `ee21f6115ef96937d7e2c41e5293bcdb8a0fbaeee9570c60e547f550399920a3`。用本机Apple Metal工具只读解析指令;静态观察不能替代实际输出对照。
|
||||
|
||||
原版最终根级顺序已由身份匹配的既有证据 `ev_c0a2873d5bcdbddba37830f470f8face16b6ffef6f4ca3da012a3abd863f3164` 建立:图层树→减色→晕光→辉光→颗粒→暗角→输出;ACES输出可选八种印片LMT。各Fx的数值映射、工作域、暗角和LMT仍在追查,不能宣称已经移植或等效。
|
||||
|
||||
## 本工程接入边界
|
||||
|
||||
保留原参数ID及944字节GPU前缀;新的参数仅追加。新增可重复通道混合器与胶片工具,沿用现有启停、折叠、蒙版、数量标记和相邻插入。旧工程缺省为严格中性,保留schema1尾层、schema2锚点及286键用户状态。
|
||||
|
||||
Cube只允许可静态表示的颜色数学;空间效果、颗粒和蒙版必须明确拒绝,完整预设保留其状态。待本机原版图像对照、原生回归和正式宿主验收完成后再记录结论。
|
||||
|
||||
## 开发检查点
|
||||
|
||||
已追加两种工具、42个宿主浮点参数及完整预设v5;旧ID与1104字节完整前缀保留。CST及原调色/蒙版/跟踪调度不重排;两个新根工具位于原显示域链/蜘蛛盘之后,schema1尾层之前。减色与颗粒用既有sRGB编码边界,晕光/辉光/暗角用宿主线性纹理;这属于本工程接入合同,并不声称与任意ACES管理的原版整条CMS完全等效。
|
||||
|
||||
原版Fx包装确认辉光使用固定2.5像素稀疏高斯预滤→向量Sobel阈值→用户diffusion高斯扩散→相加;晕光scatter缺省5,透射参数/500,boost缺省1;颗粒PCG与Box-Muller直接原版shader输出逐样本相符,相关性=1−2×colorVariation。暗角直接复用同一系统CIVignetteEffect及参数映射。证据:`ev_f0221c32adbaa1e108aa560f0f8fa60c067619ac9f5b06225df548e2671a448f`、`ev_932531fcd8aaebf06eabd6e22f1a56615ba2462f6efc3fb53cfdbdb9fd618816`、`ev_b500f2f762efd1dbbd8ae7efab9d48016482ff1463775039d25504cb4ccd9d3f`、`ev_850af09a4640201b65745c78a10a0e0a0ef67eee9614d129517f6bf13c54c11e`。
|
||||
|
||||
当前原生346项通过;独立原版CI/Metal对照仍在修正辉光边界采样。CI读取bitmap的上下行与Metal纹理相反,对照工具已有往返控制;产品CI→Metal往返验证无翻转。颗粒比对采用原版BoxMullerPCG/GrainFilter明确尺寸/种子,避免把Core Image内部切块的噪声坐标当作固定全帧坐标。此检查点尚未正式安装和宿主验收。
|
||||
|
||||
|
||||
独立原版对照38项现已全部通过:四组通道保持选项、12组减色、3种晕光半径、3种辉光阈值、4种PCG种子与12组颗粒。最大线性RGB绝对差0.0001328(通道双保持),低于预先记录的0.00015浮点容差;其余各项有各自阈值。辉光普通区域采用可分离预滤,最外一圈直接求原25点邻域,保留原版clamp边界,避免把裁切中间图的边界当作原图边界。见 `verification/FilmMixerReference.json`。这只覆盖声明的有限组件和参数,不代表原版整条CMS、全部素材或全部印片外观等价。
|
||||
|
||||
|
||||
正式构建准备:1.5.0(34),349项原生检查通过;独立原版对照在64×48、63×47、1×17、17×1四种尺寸共184项全部通过,含零矩阵/灰矩阵退化分支。上下纹理方向的颗粒固定全帧坐标验证通过;元数据旧前缀、原有跟踪/钢笔检查仍包含在原生回归中。静态3D Cube允许通道矩阵和纯减色,拒绝活跃的晕光/辉光/颗粒/暗角。FCP夹具只有三个独立合成项目,FCPXML1.12严格DTD与素材检查通过,不把内部FxPlug ID冒充模板发布参数路径;通过正式检视器设置验收参数。
|
||||
|
||||
兼容边界:新模块关闭/零混合以及旧工程缺省走原融合链;活跃减色沿用原SubSat对0…1的限幅。晕光/辉光保留邻域alpha权重,所有新处理保留入口alpha,非正alpha旁路;颗粒全帧种子不依赖Core Image内部切块顺序。原厂八种印片外观是ACES输出的另外一组资源,本轮五组胶片处理未使用这些资源,也不以相机F-Log名称冒充印片外观。
|
||||
## 正式1.5.0(34)验收完成
|
||||
|
||||
实际编译源码 `06d531c443b0bb2f179022a4e64148394f5d0690`。正式安装349项原生检查通过,FCP12.4对用户旧234参数、资产路径、蜘蛛盘及287键蒙版载荷核验保持。新工具、胶片椭圆蒙版、折叠数量、独立初始化叠层及删除撤销/重做通过。正式ProRes导出验证颗粒两帧保持,组合/颗粒完整预设冷重开前后逐字节相同。三项目原生FCPXML回导严格校验与字段比较通过。见 `verification/HostFilmMixer1.5.0.json`;四尺寸184项独立组件对照见 `verification/FilmMixerReference.json`。本轮交付五组胶片处理及矩阵,不含八种ACES印片外观。
|
||||
|
||||
APP和PKG均Developer ID签名、公证Accepted、票据/Gatekeeper通过;PKG有20项展开验包,未再次执行安装脚本。发行包、标签、全量下载和恢复结果分别见 `verification/Package.json`、`verification/Release.json` 与本版恢复记录。
|
||||
@@ -0,0 +1,122 @@
|
||||
# 大鱼调色交接:1.4.3 基线与 Color Finale 胶片模拟接续
|
||||
|
||||
更新日期:2026-11-02(Asia/Shanghai)。本轮只整理交接文档,未改程序、未重新安装或重启宿主,也未开始胶片模块的算法迁移。下一阶段目标是从本机 Color Finale 分析并移植胶片模拟模块。
|
||||
|
||||
## 1. 先认准项目与可恢复基线
|
||||
|
||||
| 项目 | 当前值 |
|
||||
| --- | --- |
|
||||
| 当前源码根目录 | `/Volumes/备份/大鱼调色/大鱼调色` |
|
||||
| 远程 / 分支 | `https://dayu.media/git/dayu/dayu-color.git` / `main` |
|
||||
| 交接文档编辑前 main | `7814a03f95f9f3c3461af2566e7412c1e5c561e1`;后续文档提交在此节点之上 |
|
||||
| 正式 APP | `/Library/Plug-Ins/FxPlug/大鱼调色.app`,1.4.3(33) |
|
||||
| 主 / XPC Bundle ID | `com.dayu.color` / `com.dayu.color.XPC` |
|
||||
| APP 实际编译源码 | `26a888f4534792481c6a9933091cb0b23307cd24` |
|
||||
| 已发布标签 | `v1.4.3-mask-fold-20261102` |
|
||||
| 标签对应提交 | `301b31438e8da95dc4e6e1c09498ad814a0ebcfc`,含最终交付记录,区别于 APP 编译节点 |
|
||||
| FCP 模板 | `/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef` |
|
||||
| 固定构建缓存 | `/Users/mac/Library/Caches/CodexBuilds/com.dayu.color` |
|
||||
| 父“大鱼调色盘”源码 | `/Volumes/备份/大鱼调色/大鱼调色盘`,只读参考固定提交 `f8950384e514685c8809fe8e8ee2dd5f16ad0bd7` |
|
||||
|
||||
接手后先查看实际工作区、分支和远端;不要用本表覆盖其他任务的新改动。当前大鱼调色是独立 FxPlug 程序,不依赖父项目或 Color Finale APP 才能运行。历史各轮说明已归档到 [历史交接](research/handoffs/DayuColorThrough1.4.3-20261102.md)。
|
||||
|
||||
## 2. 已完成并应保留的行为
|
||||
|
||||
- 一级调色包含输入 CST → 工作空间一级处理 → 输出 CST;后续基础调整、HSL、曲线等仍按既有显示域链处理。胶片接入时要重新确定域和位置,不能把父项目的顺序直接套进来。
|
||||
- 各模块标题只控制展开/折叠,眼睛控制启用/旁路。再次添加工具在点击处相邻插入初始化层,旧 schema1 尾层保留位置;新增层参数独立。
|
||||
- 每工具蒙版含椭圆、矩形、钢笔、线性渐变、HSL、亮度选区;支持组合、反转、羽化和强度。矩形/椭圆/闭合钢笔有区域运动跟踪。
|
||||
- 1.4.1 已有用户实际鼠标确认钢笔可绘制并闭合;1.4.0 已有中心拖动确认。自动化鼠标未可靠进入 FCP 的画面回调,不能把其余手势扩大为实鼠验收。
|
||||
- 1.4.2 修复中间帧起跟、4K细纹误失跟、取消/失跟后的宿主任务结束、偏移片段单帧定位和边界互等。运动分析最高1280×720,先低通再降采样;调色渲染和输出分辨率不变。区域仿射跟踪不是人物分割或非刚性描边。
|
||||
- 1.4.3 蒙版面板随所属模块一起折叠;标题栏蒙版按钮旁显示数量标记,无蒙版时隐藏。计入已停用蒙版,原模块和独立层分别计数,删除/撤销即时更新。
|
||||
|
||||
正式1.4.3通过293项既有原生检查。FCP12.4验证折叠/展开、数量2/1、删除到零和撤销、正常退出冷重开;用户当时完整77276字节预设逐字节一致,286个轨迹键保留,独立合成片段8471字节预设操作前后及重开也一致。293项检查不是对尚未实现的胶片模块的验收。
|
||||
|
||||
最近用户试调位于独立验收项目“大鱼调色_28_中间帧双向”,不能当作随时可复位的空白实例。完整预设和 FCPXML 仅在本机 `.../com.dayu.color/fcp-qa/`:`fold31-before.json`、`fold33-user-after.json`、`fold33-fixture-reopen.json` 等;不要写进 Git、PKG 或覆盖原素材。
|
||||
|
||||
## 3. 源码接入入口
|
||||
|
||||
下表路径相对于当前源码根目录。
|
||||
|
||||
| 入口 | 用途 |
|
||||
| --- | --- |
|
||||
| `大鱼调色/Plugin/DYModel.mm`、`DYModel.h` | 参数描述、分组、默认值、宿主参数与预设 |
|
||||
| `大鱼调色/Plugin/DYUniforms.h` | CPU/Metal ABI;当前自检1104字节,`cm`偏移944的前缀有静态断言 |
|
||||
| `大鱼调色/Plugin/DYRenderer.mm` | Metal设备、渲染调度、LUT资源、输入输出与导出 |
|
||||
| `大鱼调色/Plugin/DYGrade.metal` | 现有 GPU 包装、色彩管理及逐像素处理入口 |
|
||||
| `大鱼调色/Plugin/DYToolRender.inc.h`、`DYToolGPU.h` | 独立工具计划、逐层处理与蒙版混合 |
|
||||
| `大鱼调色/Plugin/DYToolState.mm`、`DYToolState.h` | `DYToolTypes`、工具默认状态、schema1/2、after锚点、蒙版与安全归档 |
|
||||
| `大鱼调色/Plugin/DYInspector.mm` | 模块布局、`toggleSection:`、`DYMaskCountBadge`、蒙版数量刷新 |
|
||||
| `大鱼调色/Plugin/DYToolInspector.inc.h` | 相邻插入、独立层界面及其布局 |
|
||||
| `大鱼调色/Plugin/DYMaskPanel.inc.h` | 蒙版控件、状态和跟踪按钮 |
|
||||
| `大鱼调色/Plugin/DYToolHostMethods.inc.h` | FxAnalyzer 生命周期;胶片任务无需顺带改写 |
|
||||
| `tools/build_kernels.py`、`tools/kernels/` | 可版本恢复的 AIR/Metal 生成与链接,不能只替换某个本机 metallib |
|
||||
| `tools/build_template.py`、`template/sources/` | 原生模板与参数档案;模型改变后重建并核对 |
|
||||
|
||||
当前 `DYToolTypes` 有12类,未注册独立胶片模拟工具。相机输入项里的 Blackmagic Film / Fujifilm F-Log 是色彩管理输入名称,不能据此认定已有胶片模拟模块。完整预设当前为 v4,已有9000/9001/9002自定义载荷及9003画布会话;参数ID、归档兼容和既有 Uniform 前缀不能挪作新用途。
|
||||
|
||||
## 4. Color Finale 参考身份与已有证据
|
||||
|
||||
本次只复核了本机包元数据和可执行文件摘要,未新做胶片函数分析或原版输出对照。
|
||||
|
||||
| 项目 | 本机已核对值 |
|
||||
| --- | --- |
|
||||
| APP | `/Applications/ColorFinale.app`,2.16.2(625),`com.colorfinale.app` |
|
||||
| 主插件二进制 | `/Applications/ColorFinale.app/Contents/PlugIns/ColorFinale.pluginkit/Contents/MacOS/ColorFinale` |
|
||||
| 插件 Bundle ID | `com.colorfinale.ColorFinaleFxPlug` |
|
||||
| 二进制 SHA-256 | `49121a6f5487060d322a59e7658166ab772e8a56f7dc1bcfa9d433a89436b30f` |
|
||||
| 胶片界面定位线索 | `Contents/PlugIns/ColorFinale.pluginkit/Contents/Resources/zh-Hans.lproj/FTFilmEmulationViewController.strings`(相对APP) |
|
||||
| 既有只读研究 | [ColorFinaleMasksFollowup.md](research/ColorFinaleMasksFollowup.md) 与对应 JSON |
|
||||
| 既有本机 REA 缓存 | `/Users/mac/Library/Caches/CodexBuilds/ColorResearch/dayu-mask-followup-20261101/` |
|
||||
|
||||
现有 REA 证据主要对应蒙版/跟踪,不能当作胶片模块已分析。下一轮先核对目标摘要、可用会话及保留证据;仅复用身份匹配的资料。原版胶片的参数、默认值、阶段、数学、资源依赖和实际图像行为均需要单独取证。
|
||||
|
||||
REA 技能入口:`/Users/mac/.agents/skills/reverse-engineer-anything/SKILL.md`。分析原厂二进制时使用其目标绑定和证据流程;查看当前完整源码则直接读工程,不为普通源码阅读启动逆向工具。静态字符串/类名只是定位线索,不能代替执行行为或图像对照。
|
||||
|
||||
## 5. 父项目可以参考什么
|
||||
|
||||
`research/color-finale/` 内四份研究资料是父工程提交 `4458dc0c0ae7f51046b8cfa4b19626e80f7cf6ca` 的快照,见 [快照来源](research/color-finale/README.md)。其中“已接入”“正式版”等表述属于父工程,不能当作当前大鱼调色的完成项。快照里部分相对链接没有随包文件,应回到父工程查找。
|
||||
|
||||
父工程固定提交 `f8950384e514685c8809fe8e8ee2dd5f16ad0bd7` 中可只读参考:
|
||||
|
||||
- `research/film-processing-contract.md`、`research/colorfinale-film-chart-findings.md`;
|
||||
- `Core/DYFilm.h`、`Core/DYFilmCPU.hpp`;
|
||||
- `Sources/DYFilmState.h`、`DYFilmState.inc`、`DYPanelFilm.inc`、`DYFilmEditor.inc`;
|
||||
- `Tools/film_test.mm`、`film_panel_test.inc`、`test_film.py` 与 `verification/film-development.json`。
|
||||
|
||||
父合同记录的是独立算法v1:减色→晕光→辉光→暗角→颗粒,父工程根级状态、线性域处理及保守拒绝活跃胶片的LUT导出。可复用其工程组织、时间一致性和边界测试思路;不代表当前工程已有相同链路,更不代表与 Color Finale 数学或同名胶片外观一致。不要把父工程“只在根级”的约束当作用户已经确定的本工程设计。
|
||||
|
||||
## 6. 下一阶段建议的工作顺序
|
||||
|
||||
1. **先建立原版功能与参数表。** 从本机胶片面板定位 Film Look、减色、Halation、Bloom、Vignette、Grain 等候选功能,逐项确认本机版本是否具备、名称、默认、范围、单位、开关、预设及资源依赖;候选清单不是已证实功能清单。
|
||||
2. **确认处理域和顺序。** 跟进面板状态→归档/参数→渲染调度→CPU/Metal/表格资源,明确与输入、工作空间、输出CST、HDR、alpha和混合的关系。先记录已观察、推断、未知,再决定当前大鱼的接入位置。
|
||||
3. **确定模块形态。** 尚未定为全局胶片阶段还是可重复工具。若进入现有工具模块体系,接好独立初始化、眼睛、折叠、蒙版及数量标记;若全局阶段有不同语义,先把具体设计说明写清。保留旧工程缺省时的旁路与原画面。
|
||||
4. **做可比较的图像验证。** 同一输入、同一色彩空间、同一参数分别取得原版与大鱼输出,覆盖灰阶/色块/高光、真实素材、不同分辨率及透明边缘。不能只靠“视觉像胶片”或加一个LUT宣称等价;确属独立重建的部分写明差异。
|
||||
5. **补齐空间与时间行为。** 晕光/辉光若涉及邻域需独立中间纹理和预算;颗粒若随时间变化需精确帧时间、固定种子/状态、随机访问/并发/重开的一致性。零强度与关闭保持中性,保留负值/HDR、alpha与非有限值处理。
|
||||
6. **完成持久化、导出和正式验收。** 新参数ID不复用,归档/预设兼容旧版本;纯色变换与空间/时间效果的Cube能力分别判定,不能把颗粒、晕光等错误写成静态3D LUT。随后做撤销/重做、保存重开、旧工程、蒙版/重复层、FCP实际渲染和正式交付。
|
||||
|
||||
## 7. 构建、交付与恢复入口
|
||||
|
||||
沿用本机全局规则与项目现有工具。本轮是文档更新,未生成新构建或移动已发布标签;下一轮真正改程序后再递增构建与版本。
|
||||
|
||||
```sh
|
||||
# 在源码根目录;模型改变时先更新原生参数档案和模板
|
||||
python3 tools/build_template.py --refresh-model --overwrite
|
||||
# Release构建、由内到外签名、公证Accepted、票据、唯一安装;等待宿主验收
|
||||
python3 tools/deliver.py
|
||||
# 宿主验收通过后才在交付进程输入complete,并补写本轮hostVerification记录
|
||||
python3 Packaging/build_pkg.py --pkg-forge-repo /Users/mac/Documents/dayu-git/repositories/pkg-forge
|
||||
```
|
||||
|
||||
- 正式宿主测试使用固定位置的已公证APP;不从DerivedData启动临时GUI,不强制结束宿主绕过保存。
|
||||
- 产品交付锁:`/Users/mac/.codex/app-delivery-locks/com.dayu.color.lock`。Git检查点用 `tools/checkpoint.py` 的仓库锁;只提交已审查的本任务文件。
|
||||
- 签名团队 `B3W25FX5H5`;Application / Installer身份和公证profile按本机规则重新验证。公证profile `codex-dayu-notary-B3W25FX5H5`,钥匙串 `/Users/mac/Library/Keychains/login.keychain-db`。文档中不存凭据。
|
||||
- 正式PKG生成后,标签先推送核验,再用 `Packaging/publish_release.py` 上传草稿;完整下载核对大小及SHA-256后发布,再核验已发布下载。保持现有仓库可见性,不覆盖旧附件或移动标签。
|
||||
- 无LFS/子模块。恢复任一已保存源码:克隆上述远程,检出明确提交或标签,再依 RECOVERY 构建;证书私钥、用户媒体与预设独立保存。
|
||||
|
||||
当前发行包:`/Volumes/备份/大鱼调色/发行包/大鱼调色-1.4.3.pkg`,14,340,650字节,SHA-256 `41bba698a70a7629438688a4be74947f424f3af04190090c44f248827b4c3bb2`。APP公证 `e755670d-8fb3-46d2-95c3-1206f014d16d`,PKG公证 `f9218078-8fd0-4a0c-9240-4b1acf7d9655`,均Accepted;签名/票据/Gatekeeper、20项展开验包通过。PKG未再次运行安装器,APP已有独立正式安装和宿主验收。
|
||||
|
||||
[Release371](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.4.3-mask-fold-20261102) / 附件16已在草稿与发布后完整下载核验。对应证据:[Delivery](verification/Delivery.json)、[Package](verification/Package.json)、[Release](verification/Release.json)、[本轮宿主验收](verification/HostMaskFolding1.4.3.json)、[编译源码恢复](verification/MaskFoldingRecovery.json)、[发行标签恢复](verification/MaskFoldingReleaseRecovery.json)、[RECOVERY](RECOVERY.md)。
|
||||
|
||||
## 8. 新对话的接手提示
|
||||
|
||||
> 阅读 `/Volumes/备份/大鱼调色/大鱼调色/大鱼调色FxPlug4交接.md`。以当前正式1.4.3(33)和已推送源码为基线,接下来分析本机Color Finale 2.16.2(625)的胶片模拟模块,先产出功能/参数/处理域与顺序的证据表,再按现有大鱼调色架构移植并完成正式交付。父“大鱼调色盘”的胶片代码仅作有出处的参考;保留用户现有调色、蒙版、轨迹、相邻叠层、折叠和数量标记行为。
|
||||
@@ -0,0 +1,183 @@
|
||||
# 历史交接归档:截至 1.4.3(33)
|
||||
|
||||
本文归档自提交 `7814a03f95f9f3c3461af2566e7412c1e5c561e1` 的根目录交接文档。原文件 SHA-256:`2c750076d4c44e8f024298f3da23f093f79735bd8b0cb81e26e499b42702f6dd`。正文保留,调整了相对链接。下文“当前”等表述属于各轮历史记录;现行接手入口为 [大鱼调色FxPlug4交接.md](../../大鱼调色FxPlug4交接.md)。
|
||||
|
||||
# 大鱼调色:1.4.3(33)蒙版折叠与数量标记交接
|
||||
|
||||
当前正式版1.4.3(33),APP实际编译源码 `26a888f4534792481c6a9933091cb0b23307cd24`,公证 `e755670d-8fb3-46d2-95c3-1206f014d16d` Accepted。签名、票据、Gatekeeper、唯一正式安装及正式路径293项既有原生检查通过。正式位置和Bundle ID不变。
|
||||
|
||||
修复模块折叠时蒙版面板仍显示的问题;内容高度和行显示都遵循模块折叠状态。标题蒙版按钮旁新增已添加数量标记,无蒙版时隐藏;原模块和独立层各自计数,停用蒙版仍计入,折叠后保留标记。状态徽标不拦截鼠标,按钮提示和辅助说明同步数量。未改渲染、跟踪算法或数据结构。
|
||||
|
||||
FCP12.4验证用户现有蜘蛛盘蒙版的收起/展开,完整77276字节预设与修改前逐字节一致,286个轨迹键保留;独立合成片段验证原HSL2个蒙版(含1个停用)、独立HSL1个,分别折叠/展开,删除2→1→0与撤销0→1→2即时刷新。两层折叠后蒙版面板为0,数量2/1保留。正常退出冷重开,完整8471字节预设前后及重开均逐字节一致。未强制结束宿主。32版为折叠修复候选,33版纳入用户补充的数量标记;32未发布。
|
||||
|
||||
入口:[本轮说明](../../research/MaskFolding1.4.3.md)、[正式宿主验收](../../verification/HostMaskFolding1.4.3.json)、[远端源码恢复](../../verification/MaskFoldingRecovery.json)、[副本清理](../../verification/MaskFoldingCleanup.json)。远端独立恢复240个文件并比较全部字节、full/strict fsck、原生模型模板和Metal重建通过;着色器摘要沿用上一版且与正式库一致。用户媒体和预设留在本机,无LFS/子模块。PKG和Release最终结果以对应版本验证记录为准。
|
||||
|
||||
本轮正式安装包 `../发行包/大鱼调色-1.4.3.pkg`,14,340,650字节,SHA-256 `41bba698a70a7629438688a4be74947f424f3af04190090c44f248827b4c3bb2`;PKG公证 `f9218078-8fd0-4a0c-9240-4b1acf7d9655` Accepted,签名/票据/Gatekeeper与20项展开验包通过。APP已有独立正式安装及宿主验收,本轮未再次运行系统安装器。Release标签 `v1.4.3-mask-fold-20261102` 已发布,标签提交 `301b31438e8da95dc4e6e1c09498ad814a0ebcfc`;[Release371](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.4.3-mask-fold-20261102) / 附件16在草稿和发布后均完整下载校验14,340,650字节及SHA-256一致。发行标签已从远端独立恢复244文件,全部字节比较及full/strict fsck通过,见 `verification/MaskFoldingReleaseRecovery.json`。核验下载副本和恢复clone已清理,仓库可见性不变。
|
||||
|
||||
## 以下为1.4.2(31)的历史交接
|
||||
|
||||
# 大鱼调色:1.4.2(31)中间帧与真实素材跟踪修复交接
|
||||
|
||||
当前正式版1.4.2(31),APP实际编译源码 `123a6c85078e8aa41fe55577b6dab5622ed7d128`。APP公证 `0bb9a94e-c54a-4d87-95ec-51338579c04f` Accepted,签名、票据、Gatekeeper、唯一正式安装及正式路径293项原生检查通过。固定位置 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,Bundle ID和签名团队不变。PKG与Release最终结果见对应版本记录。
|
||||
|
||||
中间起点以宿主分析首帧为准,不再依赖预览缓存。4K细纹先低通再按比例缩到最高1280×720运动分析,调色渲染输出分辨率不变;拟合容差与置信度一致归一化,保留失效与过期写入保护。失跟显示具体原因、保留可信帧数并正常结束宿主任务;首帧反向使用有效种子范围正常结束;单帧经源时间到时间线转换,已有相同轨迹也正常前进。
|
||||
|
||||
FCP12.4正式31版在同一4K60素材的25p时间线中:中间双向285键、首帧正向285键;取消保留159键后任务闲置,可重新跟完整段;切换画面在2秒失跟、保留50键,连续重试无弹窗且任务闲置。带4秒前置片段的连续单帧7:17→7:18→7:19→7:18;首帧反向保持响应。正常退出冷重开完整预设77087字节逐字节一致。原工程、原媒体与原65键设置保留,验收只在独立副本进行。候选27–30发现的生命周期、单帧和边界问题均有记录,未发布候选包。
|
||||
|
||||
新增层相邻插入、加大的蒙版面板、实际鼠标钢笔/中心拖动确认等1.4.1与1.4.0历史保留。仍不是完整Color Finale移植或人物分割,遮挡/变形可能需要手工修正再从当前帧继续。Motion、Intel、变速/裁剪/非方像素工程未实机验收。
|
||||
|
||||
入口:[实现与边界](../../research/TrackingMidpoint1.4.2.md)、[正式宿主验收](../../verification/HostTrackingMidpoint1.4.2.json)、[原生及离线聚合](../../verification/TrackingMidpoint1.4.2.json)、[编译源码远端恢复](../../verification/TrackingMidpointRecovery.json)、[本轮清理](../../verification/TrackingMidpointCleanup.json)、[恢复方法](../../RECOVERY.md)。
|
||||
|
||||
|
||||
本轮正式PKG `../发行包/大鱼调色-1.4.2.pkg`:14,339,640字节,SHA-256 `d137e3516b9c4abc1e6959b83693f5ed09e040cf018b2e29508cc92246fe76f2`;PKG公证 `2de9f8bb-91b5-41dc-924c-1136ae7bf73f` Accepted,签名/票据/Gatekeeper与20项展开验包通过。本轮未再次运行系统安装器,正式APP已有独立安装与宿主验收。Release标签 `v1.4.2-tracking-midpoint-20261102` 已发布,标签提交 `38bf12326e74f2f026bc4c7627729121b6aa261d`;[Release370](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.4.2-tracking-midpoint-20261102) / 附件15在草稿与发布后均完整下载核对14,339,640字节及SHA-256一致,仓库可见性保持原状。发行标签从远端独立恢复237个文件,见 `verification/TrackingMidpointReleaseRecovery.json`,全部字节比较和full/strict fsck通过;核验下载副本与恢复clone已清理。
|
||||
|
||||
## 以下为1.4.1(26)的历史交接
|
||||
|
||||
# 大鱼调色:1.4.1(26)相邻插入、蒙版面板和钢笔修复交接
|
||||
|
||||
当前正式版为1.4.1(26)。APP编译源码 `0eb56aed126c825ca89712ce90f8cc1c05b03d89` 已推送;公证 `1ddc5499-2da3-4d98-8b2d-09272b0ee326` Accepted,正式位置 `/Library/Plug-Ins/FxPlug/大鱼调色.app`。PKG和Release结果以本版本验证记录为准。
|
||||
|
||||
新添加工具紧接点击处插入,重复点击原层也插在原层与既有子层之间;参数初始化且相互独立。schema2保存after锚点,实际渲染也插入对应阶段;旧schema1末尾工具保持原位置与画面。蒙版参数和数值为13pt、按钮32–36pt、滑杆单独整行,跟踪按钮两列并保留完整中文。
|
||||
|
||||
钢笔入口现可进入空白草稿绘制态,放点/拖柄、首点或Return/面板完成闭合、Delete回退、取消/重画、即时预览、单次撤销及连续手势已实现。修正画面提示文字上下翻转。同步内存草稿与延后作者提交分离,避免宿主回调内读写、过期目标与跨帧草稿覆盖。
|
||||
|
||||
跟踪按Color Finale只读行为证据独立适配实际路径范围、300特征、亚像素精炼、21×21光流及最高4K灰度帧,保留严格失效与过期写入保护。独立CPU/Metal18项通过。不能称为完整Color Finale移植;B样条、编组、人物/图像/外部蒙版、完整轨迹区段编辑等仍有差异,未做同一真实视频的完整轨迹等价对照。
|
||||
|
||||
正式版281项原生检查通过。FCP12.4实测相邻插入/初始化独立参数、大号面板/绘制态、钢笔蒙版正向99键、一次撤销和重做、保存重开完整预设逐字节一致。**用户已用实际鼠标确认钢笔可以绘制并闭合**,原答复“可以绘制并闭合”;自动化鼠标未触发画面回调。其它曲柄/删除等手势的模拟宿主原生OSC回归通过,不扩大为全部实机手势验收。1.4.0用户确认的中心拖动历史保留。
|
||||
|
||||
入口:[本轮实现](../../research/MaskWorkflow1.4.1.md)、[Color Finale证据与差异](../../research/ColorFinaleMasksFollowup.md)、[实际宿主记录](../../verification/HostMaskWorkflow1.4.1.json)、[远端独立恢复](../../verification/MaskWorkflowRecovery.json)、[副本清理](../../verification/MaskWorkflowCleanup.json)、[恢复与构建](../../RECOVERY.md)。正式包和下载核验见Package.json/Release.json。
|
||||
|
||||
## 以下为1.4.0(24)的历史交接
|
||||
|
||||
更新日期:2026-11-01,Asia/Shanghai。当前 APP 已完成正式签名、公证、票据、唯一安装与宿主工作流检查;PKG/Release 状态以本仓库相应验证记录为准。
|
||||
|
||||
## 本轮结果与入口
|
||||
|
||||
十二个模块标题右侧已有“添加蒙版”和“再加一层”。第二个HSL等新增工具使用独立UUID、初始化参数、折叠/启停/复位/删除和自己的蒙版;新增工具依次排在原模块之后。原固定float ID、9001资产和1104字节ABI不变,无蒙版旧工程保留原融合内核。新增一级使用Rec.709/Gamma2.4同域默认,新增肤色保护强度零。
|
||||
|
||||
六种蒙版是椭圆、矩形、钢笔、线性渐变、HSL、亮度;支持相加/减去/相交、启停、反转、羽化、强度和几何数值。几何跟踪从父库固定节点 `f8950384e514685c8809fe8e8ee2dd5f16ad0bd7` 移植Metal光流和仿射RANSAC,并适配本产品FxAnalyzer生命周期;支持正向、反向、双向、单帧、取消及单次撤销,过期目标不回写。当前没有新增对Color Finale二进制的依赖,父工程未修改。
|
||||
|
||||
作者状态:`DYToolState.h/.mm`,9002静态工具文档、9003不保存的OSC会话。渲染:`DYToolRender.inc.h`、`DYToolGPU.h`、`DYGrade.metal`、`tools/build_masked_kernel.py`。面板:`DYMaskPanel.inc.h`、`DYInspector.mm`。原生画面与跟踪:`DYToolOSC.inc.h`、`DYToolHost*.inc.h`、`DYToolFlow.inc.h`、`DYTracking.metal`、`MaskCore/`。归档使用安全类白名单,预设v4包含完整工具/蒙版/轨迹,兼容v1–3。
|
||||
|
||||
实际编译源码 `dbf25fe6719f17075362538dad0404951102524d` 已推送。APP公证 `40fdaaaa-1821-4cc8-bec3-c5dc6d8b9f77` Accepted;正式位置仍为 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,Bundle ID仍为 `com.dayu.color`。Release前后均通过222项原生检查。FCP12.4独立合成工程实测HSL第二层0→32而原层0,独立椭圆/矩形、数值编辑、正向99键、双向100键、新增层单帧2键与播放头前进;一次撤销/重做及正常退出重开后完整预设逐字节一致。
|
||||
|
||||
**用户已确认实际鼠标可拖动蒙版中心。** 初次自动化坐标点击未进入宿主回调,随后用户实测“可以拖动,蒙版随鼠标移动”;真实hit/mouseDown/mouseDragged日志已捕获,原层中心由0.6/0.5变成0.378/0.379,新增层矩形仍为0.5/0.5。用户试调结果保留,不再自动复位或重启宿主。旋转、缩放和钢笔手势未实机确认,原生模拟宿主相关检查通过;不要扩大为所有手势都已实测。Motion、Intel、变速/裁剪/非方像素工程未实测;跟踪不含透视/剪切。新增工具标量为静态作者值,只有蒙版轨迹随时间求值;空间蒙版拒绝Cube导出,应保存完整预设。
|
||||
|
||||
旧模板实例可能保留关闭OSC的10005值,可先存完整预设,再应用新版效果并载入;不自动覆盖旧效果。当前模板使用父库Boolean发布契约,最新插件解析。中间20–23版均未发布最终包,旧生成APP备份在24版宿主确认后清理。远端独立恢复210文件、strict/full fsck、模型模板和着色器重建一致,临时clone已清理。
|
||||
|
||||
证据:[实现说明](../../research/ToolMaskImplementation.md)、[移植来源](../../research/ToolMaskPort.json)、[正式安装](../../verification/Delivery.json)、[222项原生检查](../../verification/InstalledSelfTest.json)、[宿主结果及缺口](../../verification/HostToolMasks.json)、[远端恢复](../../verification/ToolMaskRecovery.json)、[副本清理](../../verification/ToolMaskCleanup.json)。打包入口 `Packaging/build_pkg.py`,发布入口 `Packaging/publish_release.py`;版本标签、PKG公证和下载摘要见 `verification/Package.json`、`verification/Release.json`,不要将历史版本记录当作当前发行成功。
|
||||
|
||||
## 以下为1.3.1接手时的历史快照
|
||||
|
||||
下面各节中的“当前”“下一阶段”和“尚未实现”均指本轮开发前的1.3.1(19),保留作为兼容背景;最新实现以上文和实现说明为准。历史说明整理本身未编译、替换或操作当时的FCP窗口。
|
||||
|
||||
## 1. 下一阶段目标与当前边界
|
||||
|
||||
用户最新需求:继续增加**蒙版、跟踪,以及自行添加工具的能力**。明确例子是:一层 HSL 不够时,可以再添加一个 HSL,分别调整。
|
||||
|
||||
这里的核心是“同类工具可有多个独立实例”。新增 HSL 不能只是另一张面板共用原 HSL 的参数。蒙版应能绑定到具体工具实例,跟踪结果应驱动对应蒙版。
|
||||
|
||||
**上述功能尚未在“大鱼调色”实现。** 当前 1.3.1 是固定模块调色器;“大鱼调色盘”的图层、蒙版和跟踪代码只是下一阶段参考,不能把父库已完成的功能写成当前产品已完成。
|
||||
|
||||
建议开发次序:工具实例和第二个 HSL → 每实例蒙版 → 宿主画面控件 → 蒙版跟踪 → 持久化、撤销和正式交付。设计、源码入口、迁移风险及验收清单见 [蒙版跟踪与工具栈续作方案](../../research/MaskTrackingAndToolStack.md)。其中标为“建议”的内容是接手方案,不代表用户已经逐项指定所有类型和操作。
|
||||
|
||||
## 2. 实际项目与可恢复节点
|
||||
|
||||
| 项目 | 当前值 |
|
||||
| --- | --- |
|
||||
| 主源码目录 | `/Volumes/备份/大鱼调色/大鱼调色` |
|
||||
| 远程 / 分支 | `https://dayu.media/git/dayu/dayu-color.git` / `main` |
|
||||
| 文档整理前 main | `bbdd47d1d74e241f1f144bb2c245204e86973b3f` |
|
||||
| 本次交接标签 | `handoff-mask-tracking-tools-20261101`;最终提交可通过此标签解析 |
|
||||
| 当前正式版本 | **1.3.1(19)** |
|
||||
| APP 实际编译源码 | `dbb7ca4a995ef832178a32f35939aed7d3a85012` |
|
||||
| 正式版本标签 | `v1.3.1-browser-recents-20261101` |
|
||||
| 正式版本标签提交 | `281721bda11484c23f294b4f0d9e0b30ef829288` |
|
||||
| 主 ID / 插件 ID | `com.dayu.color` / `com.dayu.color.XPC` |
|
||||
| 唯一正式 APP | `/Library/Plug-Ins/FxPlug/大鱼调色.app` |
|
||||
| 唯一 FCP 模板 | `/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef` |
|
||||
| 固定构建缓存 | `/Users/mac/Library/Caches/CodexBuilds/com.dayu.color` |
|
||||
| 工程 / Scheme | `大鱼调色.xcodeproj` / `Wrapper Application`,Release |
|
||||
|
||||
工作目录、APP 编译提交、发行标签提交与后续文档提交是不同概念。恢复正式程序源码取编译提交;恢复含包记录的发行节点取版本标签;继续下一阶段从最新 main 或本次交接标签开始。已有历史版本、标签和安装包保留。
|
||||
|
||||
## 3. 已交付行为,后续须保留
|
||||
|
||||
- 一级调色将输入转换、工作空间、一级参数和输出转换放在一张卡片中。使用大鱼 CST 的固定源码数学取代新实例的输入还原 LUT;四个可见旁路选项已移除,一级眼睛统一启停。旧输入 LUT、旧参数 ID 和兼容解释仍保留。
|
||||
- 新实例及全部还原:输入 **Sony S-Log3(28)/ S-Gamut3.Cine(27)**;工作 **DaVinci Intermediate(10)/ DaVinci Wide Gamut(16)**;输出 **Gamma 2.4(1002)/ Rec.709(22)**;自动色调映射关闭。不要根据曲线名称覆盖用户手选色域。
|
||||
- 一级白平衡采用原 CST 色轮,保留原图、+104° 方位、/5 精细拖动、双击复位和方向键微调。底部可见“复位”只将该色轮方向、强度置零。原 BASIS 强度平方×4 的数学不变。
|
||||
- 蜘蛛盘来自“大鱼调色盘”,默认联动 6×6、31 节点;两轴可分别选择 6/8/12/16/24。固定、多选、同列自由点联动、整环/整列、复位、归档和 Cube 导出已接入。中性盘精确直通。
|
||||
- 新实例默认展开**一级调色、蜘蛛盘校色仪、基础调整**,其他模块折叠,全部眼睛打开。标题仅折叠,眼睛仅启停;状态独立保存。黑白混合默认 0%。
|
||||
- 风格 LUT 最多五层。库路径 `/Users/mac/Movies/大鱼调色LUT/look LUTs`。后台导入、取消、最后一次选择生效和 UTF-8/16/32 等编码兼容均保留。
|
||||
- LUT 浏览器在 FCP 中使用独立宿主浮动窗口。网格/列表、缩略图大小、可调整侧栏、窗口/布局偏好按库保存。最近使用分类第一位,成功应用后去重、最新优先,最多 40 个;全部及文件夹也优先显示最近项。旧版未记录的所有历史不能凭空补造;首次打开可从已有当前 LUT 初始化。
|
||||
- 33³ Cube 导出包含开启的 CST、一级白平衡、蜘蛛盘及其它逐像素色彩操作,遵循眼睛开关,折叠不影响导出;不含纹理、清晰度、去朦胧和逐画面统计。将来出现空间蒙版/跟踪后必须重新定义并明确提示导出边界。
|
||||
|
||||
## 4. 当前实现结构与兼容约束
|
||||
|
||||
| 文件 / 位置 | 接手用途 |
|
||||
| --- | --- |
|
||||
| `大鱼调色/Plugin/DYModel.h/.mm` | 234 个固定 float 参数、参数 ID、默认值、资产与界面归档 |
|
||||
| `大鱼调色/Plugin/DYUniforms.h` | 当前 CPU/Metal 缓冲 1104 字节;原 944 字节前缀保持;CST 在偏移 944 追加 |
|
||||
| `大鱼调色/Plugin/DYInspector.mm` | 固定卡片、标题/眼睛、预设 v3、LUT 提交与浏览器宿主 API |
|
||||
| `大鱼调色/Plugin/DYNewPanels.inc.h` | 一级白平衡色轮、可见复位、蜘蛛盘面板 |
|
||||
| `大鱼调色/Plugin/DYColorTables.mm` | HSL、白平衡、颜色分级等 LUT 构建与缓存 |
|
||||
| `大鱼调色/Plugin/DYRenderer.mm` | CST 前段、固定调色链、蜘蛛盘、Metal 资源、预览、Cube 导出 |
|
||||
| `大鱼调色/Plugin/DYGrade.metal`、`tools/kernels/*.ll` | Metal 边界和已版本化运算内核;当前固定调色链有融合执行,尚非工具栈 |
|
||||
| `大鱼调色/Plugin/DYPlugIn.mm` | FxTileableEffect、按宿主时间生成渲染状态、归档白名单及导出 |
|
||||
| `大鱼调色/Plugin/DYLUTBrowser.mm`、`DYLUTLibrary.mm` | 窗口/布局、异步确认、最近使用;不要混入工具作者数据 |
|
||||
|
||||
当前两项 custom 参数:`9000 DYInspectorToken`(schema 2,folds 字典),`9001 DYAssetState`(LUT paths、spiderMesh、spiderLinked)。**9001 注册为 NOT_ANIMATABLE**,不能简单把动态工具塞进去就宣称支持宿主参数关键帧。预设 JSON 版本是 **3**;插件临时渲染状态的 schema 是 **1**;它们是不同格式的版本号。
|
||||
|
||||
当前 HSL 只有一组 `hsl*` 固定字段和一份 HSL 查表。重复工具需要独立身份、参数、缓存和撤销目标。父库 `DYGrade` 是 1032 字节,与本项目 `DYUniforms` 不同;不能直接复制其参数号、POD、Bundle ID 或整个插件入口覆盖当前产品。
|
||||
|
||||
归档、预设、复制、相等性、hash、允许解码类和渲染状态都必须一起演进。旧字段与数学 ID 不重排;旧工程无新增状态时保留原画面。UI 折叠键在多工具场景下应按实例 ID 隔离,不能全部共用 `hsl`。
|
||||
|
||||
## 5. 可复用参考:父级“大鱼调色盘”
|
||||
|
||||
只读目录 `/Volumes/备份/大鱼调色/大鱼调色盘`;远程 `https://dayu.media/git/dayu/dayu-colorplate.git`。本次核对干净 HEAD `f8950384e514685c8809fe8e8ee2dd5f16ad0bd7`。其正式 2.0.0(68)编译源码为 `d05994d5f4547687511bef524efe8c881e8a5c9c`,标签 `v2.0.0-build68`。
|
||||
|
||||
先读父库 `HANDOFF.md`、`research/tracking-host-lifecycle.md` 及 `verification/release-2.0.0-build68.json`。该库记录了矩形/椭圆/闭合钢笔区域、前后/双向/单帧、位置/旋转/独立横纵缩放、取消保留可信段和一次撤销等实现与宿主证据。它输出仿射分解后的这些变换,不能宣传为透视/剪切跟踪或任意遮挡均可靠。
|
||||
|
||||
下一阶段按具体功能复用其作者状态、蒙版数学、OSC 和 FxAnalyzer 生命周期适配,源文件导航见续作方案。父库现有交接另有胶片/CMS等任务,**不属于本次“大鱼调色”新增范围**。不改动兄弟仓库、不替换兄弟 APP、不恢复或覆盖其用户调色文件。
|
||||
|
||||
## 6. 验证现状与用户工作保护
|
||||
|
||||
| 证据 | 本版本实际覆盖 |
|
||||
| --- | --- |
|
||||
| `verification/InstalledSelfTest.json` | 正式路径常规 158 项原生检查 |
|
||||
| `verification/BrowserNative.json` | 正式路径 201 项,含独立 CST 像素参照、色轮/蜘蛛盘、归档与渲染 |
|
||||
| `verification/BrowserCustomization.json` | 23 项离屏浏览器、几何/布局/历史检查 |
|
||||
| `verification/BrowserRegression.json` | 67 项回归,含 3,025 项目录虚拟化、取消及应用确认 |
|
||||
| `verification/SpiderMath.json` | 25 种网格、204,683 项数学检查 |
|
||||
| `verification/HostBrowserAndReset.json` | FCP 12.4 的 Sony 默认、可见复位、独立窗口及系统缩放、两种布局、最近排序、浏览器关闭重开 |
|
||||
| `verification/BrowserRecovery.json` | 编译节点远端恢复 178 文件、fsck、Metal 重建与正式库一致 |
|
||||
| `verification/BrowserReleaseRecovery.json` | 发行节点远端恢复 184 文件、fsck |
|
||||
|
||||
自由标题栏/窗口边缘拖动未由自动化独立确认。用户开始操作浏览器后,保留其当时的网格布局、约 197.97 缩略图大小、窗口位置和 LUT 选择,**未再次重启 FCP 或全部还原**。这些是当时观察,不是要求下一轮强制恢复的偏好;接手以用户最新操作为准。浏览器关闭重开已测,不写成此次已重新冷启动宿主。Motion、Intel、旧系统未验收。
|
||||
|
||||
测试库位于 `/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/大鱼调色_验收.fcpbundle`;本轮独立项目 `大鱼调色_1.3.1_浏览器与复位`。只读/引用现有 LUT,未导入或删除用户 LUT。新功能用独立合成运动素材验收,不修改用户正在工作的调色、跟踪或媒体。
|
||||
|
||||
## 7. 正式交付与发布记录
|
||||
|
||||
- APP 公证:`9e93dc7f-04a3-44f9-a1e4-792bd7b31533`,Accepted。
|
||||
- PKG 公证:`85cad776-c3d7-4037-9643-24041b269002`,Accepted。
|
||||
- 正式包:`/Volumes/备份/大鱼调色/发行包/大鱼调色-1.3.1.pkg`;14,073,683 字节。
|
||||
- SHA-256:`954b10c581f31d23a8c417a6f37b24fae19939786dce8733b4d6f09c7ed3adae`。
|
||||
- [1.3.1 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.3.1-browser-recents-20261101),Release ID 366,附件 ID 12;附件下载链接见 `verification/Release.json`。
|
||||
- APP/PKG 的 Developer ID、票据、Gatekeeper、20 项展开验包通过。草稿与正式链接均完整下载校验,只上传一次。正式 APP 已安装,本轮未重复执行 PKG 安装器。
|
||||
|
||||
详细恢复与历史仍在 [RECOVERY.md](../../RECOVERY.md)。本次整理不修改上述正式发行标签、附件或程序版本。
|
||||
|
||||
## 8. 下一位接手的操作入口
|
||||
|
||||
1. 读取本文件、续作方案和本机 `/Users/mac/.codex/AGENTS.md`;核对 main、本地未提交改动、远端及同产品任务,保留用户正在操作的 FCP 状态。
|
||||
2. 先完成工具实例/参数/顺序/迁移合同,以“两个独立 HSL”形成可验收的第一阶段;避免先给所有模块套一个全局蒙版而日后重做。
|
||||
3. 再按续作方案接蒙版、OSC、精确时间分析、取消和单次 Undo/Redo。每阶段提交并立即推送;只暂存本任务文件。
|
||||
4. 模型修改后刷新模板:`python3 tools/build_template.py --refresh-model --overwrite`。
|
||||
5. 编译和 CLI 检查可在固定缓存执行;用户可见验收必须从正式安装的已公证版本进行。正式交付使用 `python3 tools/deliver.py`,它持有产品锁并等待宿主验收输入 `complete`。
|
||||
6. PKG 入口:`python3 Packaging/build_pkg.py --pkg-forge-repo /Users/mac/Documents/dayu-git/repositories/pkg-forge`。发布入口:`python3 Packaging/publish_release.py --tag <新标签> --notes <对应说明>`。不要复用本次版本号、覆盖旧包或移动旧标签。
|
||||
7. 产品身份、正式路径、逐层签名、公证、票据、PluginKit 唯一登记、生成副本清理、Release 完整下载及远端恢复都继续按全局约定执行。证书/profile/权限在下次发布时重新复核,凭据不进文档或源码。
|
||||
|
||||
可直接用于下一聊的任务描述:
|
||||
|
||||
> 先读“大鱼调色FxPlug4交接.md”和 research/MaskTrackingAndToolStack.md,从当前 1.3.1(19)继续。我要能添加多个独立工具,例如第二个 HSL,并给具体工具添加蒙版及蒙版跟踪。参考父级“大鱼调色盘”,保留当前 CST、折叠/眼睛、蜘蛛盘、LUT 浏览器和最近使用行为,保护已有工程和当前用户操作,分阶段验证并完成正式交付。
|
||||
@@ -3062,18 +3062,540 @@
|
||||
"pid": 2188,
|
||||
"step": 0.01,
|
||||
"title": "色彩平衡"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"key": "mixer00",
|
||||
"kind": "float",
|
||||
"max": 2,
|
||||
"min": -2,
|
||||
"mixerTab": 0,
|
||||
"offset": 1104,
|
||||
"pid": 2276,
|
||||
"step": 0.01,
|
||||
"title": "红输出 ← 红输入"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"key": "mixer01",
|
||||
"kind": "float",
|
||||
"max": 2,
|
||||
"min": -2,
|
||||
"mixerTab": 0,
|
||||
"offset": 1108,
|
||||
"pid": 2277,
|
||||
"step": 0.01,
|
||||
"title": "红输出 ← 绿输入"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"key": "mixer02",
|
||||
"kind": "float",
|
||||
"max": 2,
|
||||
"min": -2,
|
||||
"mixerTab": 0,
|
||||
"offset": 1112,
|
||||
"pid": 2278,
|
||||
"step": 0.01,
|
||||
"title": "红输出 ← 蓝输入"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"key": "mixer10",
|
||||
"kind": "float",
|
||||
"max": 2,
|
||||
"min": -2,
|
||||
"mixerTab": 1,
|
||||
"offset": 1120,
|
||||
"pid": 2280,
|
||||
"step": 0.01,
|
||||
"title": "绿输出 ← 红输入"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"key": "mixer11",
|
||||
"kind": "float",
|
||||
"max": 2,
|
||||
"min": -2,
|
||||
"mixerTab": 1,
|
||||
"offset": 1124,
|
||||
"pid": 2281,
|
||||
"step": 0.01,
|
||||
"title": "绿输出 ← 绿输入"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"key": "mixer12",
|
||||
"kind": "float",
|
||||
"max": 2,
|
||||
"min": -2,
|
||||
"mixerTab": 1,
|
||||
"offset": 1128,
|
||||
"pid": 2282,
|
||||
"step": 0.01,
|
||||
"title": "绿输出 ← 蓝输入"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"key": "mixer20",
|
||||
"kind": "float",
|
||||
"max": 2,
|
||||
"min": -2,
|
||||
"mixerTab": 2,
|
||||
"offset": 1136,
|
||||
"pid": 2284,
|
||||
"step": 0.01,
|
||||
"title": "蓝输出 ← 红输入"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"key": "mixer21",
|
||||
"kind": "float",
|
||||
"max": 2,
|
||||
"min": -2,
|
||||
"mixerTab": 2,
|
||||
"offset": 1140,
|
||||
"pid": 2285,
|
||||
"step": 0.01,
|
||||
"title": "蓝输出 ← 绿输入"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"key": "mixer22",
|
||||
"kind": "float",
|
||||
"max": 2,
|
||||
"min": -2,
|
||||
"mixerTab": 2,
|
||||
"offset": 1144,
|
||||
"pid": 2286,
|
||||
"step": 0.01,
|
||||
"title": "蓝输出 ← 蓝输入"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"key": "mixerPreserveLuma",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1156,
|
||||
"pid": 2289,
|
||||
"step": 0.01,
|
||||
"title": "保持亮度"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"key": "mixerPreserveSaturation",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1160,
|
||||
"pid": 2290,
|
||||
"step": 0.01,
|
||||
"title": "保持饱和度"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"key": "mixerMix",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1164,
|
||||
"pid": 2291,
|
||||
"step": 0.01,
|
||||
"title": "通道混合强度"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"key": "mixerEnabled",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1152,
|
||||
"pid": 2288,
|
||||
"step": 0.01,
|
||||
"title": "通道混合器"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"filmTab": -1,
|
||||
"key": "filmMix",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1172,
|
||||
"pid": 2293,
|
||||
"step": 0.01,
|
||||
"title": "胶片混合强度"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"filmTab": 0,
|
||||
"key": "filmSubtractive",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1176,
|
||||
"pid": 2294,
|
||||
"step": 0.01,
|
||||
"title": "启用减色"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"filmTab": 0,
|
||||
"key": "filmGammaAll",
|
||||
"kind": "float",
|
||||
"max": 4,
|
||||
"min": 0.25,
|
||||
"offset": 1180,
|
||||
"pid": 2295,
|
||||
"step": 0.01,
|
||||
"title": "整体减色"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"filmTab": 0,
|
||||
"key": "filmGammaCyan",
|
||||
"kind": "float",
|
||||
"max": 4,
|
||||
"min": 0.25,
|
||||
"offset": 1184,
|
||||
"pid": 2296,
|
||||
"step": 0.01,
|
||||
"title": "青色减色"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"filmTab": 0,
|
||||
"key": "filmGammaMagenta",
|
||||
"kind": "float",
|
||||
"max": 4,
|
||||
"min": 0.25,
|
||||
"offset": 1188,
|
||||
"pid": 2297,
|
||||
"step": 0.01,
|
||||
"title": "洋红减色"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"filmTab": 0,
|
||||
"key": "filmGammaYellow",
|
||||
"kind": "float",
|
||||
"max": 4,
|
||||
"min": 0.25,
|
||||
"offset": 1192,
|
||||
"pid": 2298,
|
||||
"step": 0.01,
|
||||
"title": "黄色减色"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"filmTab": 0,
|
||||
"key": "filmDensity",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": -1,
|
||||
"offset": 1196,
|
||||
"pid": 2299,
|
||||
"step": 0.01,
|
||||
"title": "密度"
|
||||
},
|
||||
{
|
||||
"default": 2,
|
||||
"filmTab": 0,
|
||||
"key": "filmDensityMode",
|
||||
"kind": "popup",
|
||||
"max": 2,
|
||||
"min": 1,
|
||||
"offset": 1200,
|
||||
"options": [
|
||||
"模式 1 · 最大值",
|
||||
"模式 2 · 平均值"
|
||||
],
|
||||
"pid": 2300,
|
||||
"step": 0.01,
|
||||
"title": "密度模式",
|
||||
"values": [
|
||||
2,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": 6,
|
||||
"key": "filmValueMode",
|
||||
"kind": "float",
|
||||
"max": 6,
|
||||
"min": 1,
|
||||
"offset": 1204,
|
||||
"pid": 2301,
|
||||
"step": 0.01,
|
||||
"title": "胶片亮度模型"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"filmTab": 1,
|
||||
"key": "filmHalation",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1208,
|
||||
"pid": 2302,
|
||||
"step": 0.01,
|
||||
"title": "启用晕光"
|
||||
},
|
||||
{
|
||||
"default": 5,
|
||||
"filmTab": 1,
|
||||
"key": "filmScatter",
|
||||
"kind": "float",
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"offset": 1212,
|
||||
"pid": 2303,
|
||||
"step": 1,
|
||||
"title": "散射半径"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"filmTab": 1,
|
||||
"key": "filmTransmission",
|
||||
"kind": "float",
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"offset": 1216,
|
||||
"pid": 2304,
|
||||
"step": 1,
|
||||
"title": "染料透射"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"filmTab": 1,
|
||||
"key": "filmBoost",
|
||||
"kind": "float",
|
||||
"max": 5,
|
||||
"min": 0,
|
||||
"offset": 1220,
|
||||
"pid": 2305,
|
||||
"step": 0.01,
|
||||
"title": "晕光增强"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"filmTab": 2,
|
||||
"key": "filmBloom",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1224,
|
||||
"pid": 2306,
|
||||
"step": 0.01,
|
||||
"title": "启用辉光"
|
||||
},
|
||||
{
|
||||
"default": 50,
|
||||
"filmTab": 2,
|
||||
"key": "filmSensitivity",
|
||||
"kind": "float",
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"offset": 1228,
|
||||
"pid": 2307,
|
||||
"step": 1,
|
||||
"title": "辉光灵敏度"
|
||||
},
|
||||
{
|
||||
"default": 30,
|
||||
"filmTab": 2,
|
||||
"key": "filmDiffusion",
|
||||
"kind": "float",
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"offset": 1232,
|
||||
"pid": 2308,
|
||||
"step": 1,
|
||||
"title": "辉光扩散"
|
||||
},
|
||||
{
|
||||
"default": 50,
|
||||
"filmTab": 2,
|
||||
"key": "filmIntensity",
|
||||
"kind": "float",
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"offset": 1236,
|
||||
"pid": 2309,
|
||||
"step": 1,
|
||||
"title": "辉光强度"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"filmTab": 3,
|
||||
"key": "filmGrain",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1240,
|
||||
"pid": 2310,
|
||||
"step": 0.01,
|
||||
"title": "启用颗粒"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"filmTab": 3,
|
||||
"key": "filmGrainAmount",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1244,
|
||||
"pid": 2311,
|
||||
"step": 0.01,
|
||||
"title": "颗粒数量"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"filmTab": 3,
|
||||
"key": "filmGrainSize",
|
||||
"kind": "float",
|
||||
"max": 20,
|
||||
"min": 1,
|
||||
"offset": 1248,
|
||||
"pid": 2312,
|
||||
"step": 1,
|
||||
"title": "颗粒大小"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"filmTab": 3,
|
||||
"key": "filmGrainResponse",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": -1,
|
||||
"offset": 1252,
|
||||
"pid": 2313,
|
||||
"step": 0.01,
|
||||
"title": "胶片响应"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"filmTab": 3,
|
||||
"key": "filmGrainColor",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1256,
|
||||
"pid": 2314,
|
||||
"step": 0.01,
|
||||
"title": "颜色变化"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"filmTab": 3,
|
||||
"key": "filmGrainHold",
|
||||
"kind": "popup",
|
||||
"max": 5,
|
||||
"min": 1,
|
||||
"offset": 1260,
|
||||
"options": [
|
||||
"每帧更新",
|
||||
"保持 2 帧",
|
||||
"保持 3 帧",
|
||||
"保持 4 帧",
|
||||
"保持 5 帧"
|
||||
],
|
||||
"pid": 2315,
|
||||
"step": 0.01,
|
||||
"title": "颗粒帧保持",
|
||||
"values": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"filmTab": 3,
|
||||
"key": "filmGrainSeed",
|
||||
"kind": "float",
|
||||
"max": 65535,
|
||||
"min": 0,
|
||||
"offset": 1264,
|
||||
"pid": 2316,
|
||||
"step": 1,
|
||||
"title": "颗粒种子"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"filmTab": 4,
|
||||
"key": "filmVignette",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1268,
|
||||
"pid": 2317,
|
||||
"step": 0.01,
|
||||
"title": "启用暗角"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"filmTab": 4,
|
||||
"key": "filmVignetteIntensity",
|
||||
"kind": "float",
|
||||
"max": 2,
|
||||
"min": -2,
|
||||
"offset": 1272,
|
||||
"pid": 2318,
|
||||
"step": 0.01,
|
||||
"title": "暗角强度"
|
||||
},
|
||||
{
|
||||
"default": 50,
|
||||
"filmTab": 4,
|
||||
"key": "filmVignetteRadius",
|
||||
"kind": "float",
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"offset": 1276,
|
||||
"pid": 2319,
|
||||
"step": 1,
|
||||
"title": "暗角半径"
|
||||
},
|
||||
{
|
||||
"default": 0.5,
|
||||
"filmTab": 4,
|
||||
"key": "filmVignetteFalloff",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1280,
|
||||
"pid": 2320,
|
||||
"step": 0.01,
|
||||
"title": "暗角过渡"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"key": "filmEnabled",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1168,
|
||||
"pid": 2292,
|
||||
"step": 0.01,
|
||||
"title": "胶片模拟"
|
||||
}
|
||||
],
|
||||
"sourceSHA256": {
|
||||
"template/tools/dump_model.mm": "04e04446aa351d774913bc25b06512fefe7969bdf4c6e471a91f1e9d6c4fc3b5",
|
||||
"大鱼调色/Plugin/DYCSTTypes.h": "3372e3cd77248eeb374e54675d2902befceea8e00a2afc4f9543116ef3027696",
|
||||
"大鱼调色/Plugin/DYColorManagement.h": "b0a4cd1b8c45dbce90a7b4f30f72ebf95ecd382895e74e3bfeda0f7cdb185157",
|
||||
"大鱼调色/Plugin/DYFilmMath.h": "e41d44790c6bb42db7c68520d442b39c381b4db4056d40a44426e21f62e9bf6b",
|
||||
"大鱼调色/Plugin/DYFilmTypes.h": "c35a43b5b93988e8517e5db8f281da0dfd1e02f5b0e7bfb62e7345cec444a36d",
|
||||
"大鱼调色/Plugin/DYModel.h": "80e88add97deeac7a9dc47d12f68b0245905786297de2e6553b3da15c729da6e",
|
||||
"大鱼调色/Plugin/DYModel.mm": "beadabb0773e911581dedc263f55a49e03dde6e6d1fc2329df18cb384710d234",
|
||||
"大鱼调色/Plugin/DYModel.mm": "48d0e8a36f41001c63e0f95faa99f8dd910b0227d7b93ff2a90006673c3e3c36",
|
||||
"大鱼调色/Plugin/DYSpiderState.h": "0c80747e41e8fc97762e301b011bd08c18865a825eaafde086ed79ace37b22f9",
|
||||
"大鱼调色/Plugin/DYToolState.h": "28088ec819307a60f2e52334fd807a514c3ff8a550bc0efbe7069b68a6242320",
|
||||
"大鱼调色/Plugin/DYToolState.mm": "9ddc4b7509ad63fc24d1724359b4a218609f90b971eee57f6cdeda0c1b309129",
|
||||
"大鱼调色/Plugin/DYUniforms.h": "8ef480025c739b29f55884ba0c7218e9d6fd8d80c46cfc72d6ee3da90215abe4",
|
||||
"大鱼调色/Plugin/DYToolState.mm": "6502e412532f2be2589188c1b99579ae59ab279d814805e38b0c8042e921a5bd",
|
||||
"大鱼调色/Plugin/DYUniforms.h": "8c494532d534b65622039605073b554bafd92ec0efe1e0d207d822b59862a1cb",
|
||||
"大鱼调色/Plugin/MaskCore/DYMask.h": "5b9aa44390d4a1fca1baf5e34cb9eefc8483c939a65cc2a0412b7b41fc85bc16",
|
||||
"大鱼调色/Plugin/MaskCore/DYMaskOperator.h": "43fa701ad574f38ce0ab4f4d3900bb034edaaa1adc09821d2f4443ee2b687ba2",
|
||||
"大鱼调色/Plugin/SpiderCore/DYColorMath.h": "bdd6278e17ff4208ad94a8b0e834c817c0a3475f205dd79898e8fd88e84a19c9",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"passed": true,
|
||||
"sha256": "9b8f6e407545429b77c1de88d4cceb738760771c5a7f1dbd9732bdcc95c23738",
|
||||
"sha256": "7476fb5a3cfad5f4dafb7a887dcc787b9cbcba6ad64df3b4939b336444cf8bfc",
|
||||
"version": "5.13",
|
||||
"displayversion": "5.6.7",
|
||||
"filterCount": 1,
|
||||
"nativeFloatParameters": 234,
|
||||
"nativeFloatParameters": 276,
|
||||
"customParameters": 3,
|
||||
"publications": [
|
||||
{
|
||||
|
||||
@@ -540,6 +540,48 @@
|
||||
<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="2276" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="红输出 ← 绿输入" id="2277" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="红输出 ← 蓝输入" id="2278" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="绿输出 ← 红输入" id="2280" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="绿输出 ← 绿输入" id="2281" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="绿输出 ← 蓝输入" id="2282" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="蓝输出 ← 红输入" id="2284" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="蓝输出 ← 绿输入" id="2285" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="蓝输出 ← 蓝输入" id="2286" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="保持亮度" id="2289" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="保持饱和度" id="2290" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="通道混合强度" id="2291" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="通道混合器" id="2288" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="胶片混合强度" id="2293" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="启用减色" id="2294" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="整体减色" id="2295" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="青色减色" id="2296" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="洋红减色" id="2297" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="黄色减色" id="2298" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="密度" id="2299" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="密度模式" id="2300" flags="12889161760" default="2" value="2" />
|
||||
<parameter name="胶片亮度模型" id="2301" flags="12889161760" default="6" value="6" />
|
||||
<parameter name="启用晕光" id="2302" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="散射半径" id="2303" flags="12889161760" default="5" value="5" />
|
||||
<parameter name="染料透射" id="2304" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="晕光增强" id="2305" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="启用辉光" id="2306" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="辉光灵敏度" id="2307" flags="12889161760" default="50" value="50" />
|
||||
<parameter name="辉光扩散" id="2308" flags="12889161760" default="30" value="30" />
|
||||
<parameter name="辉光强度" id="2309" flags="12889161760" default="50" value="50" />
|
||||
<parameter name="启用颗粒" id="2310" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="颗粒数量" id="2311" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="颗粒大小" id="2312" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="胶片响应" id="2313" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="颜色变化" id="2314" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="颗粒帧保持" id="2315" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="颗粒种子" id="2316" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="启用暗角" id="2317" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="暗角强度" id="2318" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="暗角半径" id="2319" flags="12889161760" default="50" value="50" />
|
||||
<parameter name="暗角过渡" id="2320" flags="12889161760" default="0.5" value="0.5" />
|
||||
<parameter name="胶片模拟" id="2292" flags="12889161760" default="1" value="1" />
|
||||
<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" />
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ CONTENT_TAGS={'scenenode','layer','group','filter','behavior','mask'}
|
||||
def sha(data):return hashlib.sha256(data).hexdigest()
|
||||
|
||||
def model_identity():
|
||||
files=['大鱼调色/Plugin/DYModel.h','大鱼调色/Plugin/DYModel.mm','大鱼调色/Plugin/DYUniforms.h','大鱼调色/Plugin/DYColorManagement.h','大鱼调色/Plugin/DYCSTTypes.h','大鱼调色/Plugin/DYSpiderState.h','大鱼调色/Plugin/SpiderCore/DYColorMath.h','大鱼调色/Plugin/SpiderCore/DYSpiderMesh.hpp','template/tools/dump_model.mm','大鱼调色/Plugin/DYToolState.h','大鱼调色/Plugin/DYToolState.mm','大鱼调色/Plugin/MaskCore/DYMaskOperator.h','大鱼调色/Plugin/MaskCore/DYMask.h']
|
||||
files=['大鱼调色/Plugin/DYModel.h','大鱼调色/Plugin/DYModel.mm','大鱼调色/Plugin/DYUniforms.h','大鱼调色/Plugin/DYColorManagement.h','大鱼调色/Plugin/DYCSTTypes.h','大鱼调色/Plugin/DYSpiderState.h','大鱼调色/Plugin/SpiderCore/DYColorMath.h','大鱼调色/Plugin/SpiderCore/DYSpiderMesh.hpp','template/tools/dump_model.mm','大鱼调色/Plugin/DYFilmTypes.h','大鱼调色/Plugin/DYFilmMath.h','大鱼调色/Plugin/DYToolState.h','大鱼调色/Plugin/DYToolState.mm','大鱼调色/Plugin/MaskCore/DYMaskOperator.h','大鱼调色/Plugin/MaskCore/DYMask.h']
|
||||
return {name:sha((ROOT/name).read_bytes()) for name in files}
|
||||
|
||||
def refresh_metadata():
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Isolated synthetic FCP acceptance; never edits a library or user media."""
|
||||
from pathlib import Path
|
||||
import json,uuid,xml.etree.ElementTree as E
|
||||
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
qa=Path('/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa')
|
||||
model=json.loads((root/'template/sources/RegisteredParameters.json').read_text())
|
||||
by_key={p['key']:p for p in model['parameters']}
|
||||
movie=qa/'大鱼调色_蒙版合成运动.mov'
|
||||
chart=qa/'大鱼调色验收图.png'
|
||||
assert movie.is_file() and chart.is_file()
|
||||
xml=E.Element('fcpxml',version='1.12');resources=E.SubElement(xml,'resources')
|
||||
E.SubElement(resources,'format',id='f1',width='960',height='540',frameDuration='1/25s',colorSpace='1-1-1 (Rec. 709)')
|
||||
E.SubElement(resources,'format',id='f2',width='1920',height='1080',frameDuration='1/25s',colorSpace='1-1-1 (Rec. 709)')
|
||||
E.SubElement(resources,'format',id='f3',width='1920',height='1080',name='FFVideoFormatRateUndefined')
|
||||
for ident,path,fmt,duration in [('a1',movie,'f1','4s'),('a2',chart,'f3','0s')]:
|
||||
asset=E.SubElement(resources,'asset',id=ident,name=path.stem,start='0s',duration=duration,format=fmt,hasVideo='1',videoSources='1')
|
||||
E.SubElement(asset,'media-rep',kind='original-media',src=path.resolve().as_uri())
|
||||
template=Path('/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef')
|
||||
E.SubElement(resources,'effect',id='fx',name='大鱼调色',uid='~/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef',src=template.as_uri())
|
||||
event=E.SubElement(E.SubElement(xml,'library'),'event',name='大鱼调色_1.5_胶片与通道验收',uid=str(uuid.uuid4()).upper())
|
||||
settings=[('大鱼调色_1.5_胶片与混合器','a1','f1',dict(mixer01=.2,filmSubtractive=1,filmGammaCyan=1.2,filmHalation=1,filmScatter=5,filmBloom=1,filmSensitivity=25,filmDiffusion=5,filmIntensity=25,filmGrain=1,filmGrainAmount=.25,filmGrainHold=2,filmVignette=1,filmVignetteIntensity=.5,filmVignetteRadius=30)),('大鱼调色_1.5_初始化与叠层','a1','f1',{}),('大鱼调色_1.5_颗粒时间验收','a2','f2',dict(filmGrain=1,filmGrainAmount=.65,filmGrainHold=2))]
|
||||
for name,asset,fmt,values in settings:
|
||||
project=E.SubElement(event,'project',name=name,uid=str(uuid.uuid4()).upper())
|
||||
sequence=E.SubElement(project,'sequence',format=fmt,duration='4s',tcStart='0s',tcFormat='NDF',audioLayout='stereo',audioRate='48k')
|
||||
spine=E.SubElement(sequence,'spine');clip=E.SubElement(spine,'video' if asset=='a2' else 'asset-clip',ref=asset,name=name,offset='0s',start='0s',duration='4s')
|
||||
effect=E.SubElement(clip,'filter-video',ref='fx',name='大鱼调色',enabled='1')
|
||||
# Hidden FxPlug IDs are not invented as Motion/FCPXML parameter paths.
|
||||
# Apply the intended settings through the formal native inspector in host QA.
|
||||
E.indent(xml);output=qa/'film-mixer-1.5.fcpxml'
|
||||
output.write_text('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE fcpxml>\n'+E.tostring(xml,encoding='unicode')+'\n')
|
||||
print(output)
|
||||
+12
-2
@@ -29,6 +29,16 @@ def identity(path,expected):
|
||||
def unregister(path):
|
||||
reg=run('pluginkit','-m','-A','-D','-v','-i','com.dayu.color.XPC')
|
||||
if any(l.rstrip().endswith('\t'+str(path)) for l in reg.splitlines()):run('pluginkit','-r',str(path))
|
||||
def self_test(executable,report):
|
||||
result=subprocess.run([str(executable),'--self-test'],cwd=ROOT,text=True,capture_output=True)
|
||||
report.write_text(result.stdout)
|
||||
report.with_suffix('.stderr').write_text(result.stderr)
|
||||
try:parsed=json.loads(result.stdout)
|
||||
except json.JSONDecodeError:raise RuntimeError('原生自检未返回有效结果,诊断已保留:'+str(report))
|
||||
if result.returncode or not parsed.get('pass'):
|
||||
failed=[x.get('name') for x in parsed.get('results',[]) if not x.get('pass',True)]
|
||||
raise RuntimeError('原生自检未通过,正式旧版未替换。诊断:'+str(report)+';失败项:'+str(failed))
|
||||
return parsed
|
||||
def main():
|
||||
hosts_closed();CACHE.mkdir(parents=True,exist_ok=True);LOCK.parent.mkdir(parents=True,exist_ok=True);LOCK.mkdir()
|
||||
(LOCK/'owner.json').write_text(json.dumps(dict(PID=os.getpid(),cwd=str(ROOT),product='大鱼调色',started=datetime.datetime.now(datetime.timezone.utc).isoformat())))
|
||||
@@ -49,7 +59,7 @@ 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'))
|
||||
preflight=self_test(plugin/'Contents/MacOS/大鱼调色 XPC Service',CACHE/'release-preflight.json')
|
||||
(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'
|
||||
@@ -66,7 +76,7 @@ def main():
|
||||
os.replace(stage,DEST);stage=None
|
||||
try:
|
||||
identity(DEST,'com.dayu.color');run('codesign','--verify','--deep','--strict',str(DEST));run('xcrun','stapler','validate',str(DEST));gate=run('spctl','--assess','--type','execute','--verbose=2',str(DEST))
|
||||
installedTest=json.loads(run(str(DEST/PLUGIN/'Contents/MacOS/大鱼调色 XPC Service'),'--self-test'))
|
||||
installedTest=self_test(DEST/PLUGIN/'Contents/MacOS/大鱼调色 XPC Service',CACHE/'installed-self-test.json')
|
||||
if not installedTest.get('pass'):raise RuntimeError('正式安装版原生集成自检失败')
|
||||
(ROOT/'verification/InstalledSelfTest.json').write_text(json.dumps(installedTest,ensure_ascii=False,indent=2)+'\n')
|
||||
run('open',str(DEST))
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
// Read-only research probe. Loads only the user's installed reference framework.
|
||||
// No reference binary, texture, preset or disassembly is bundled with Dayu.
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreImage/CoreImage.h>
|
||||
#import <objc/runtime.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
int main(int argc,const char **argv){@autoreleasepool{
|
||||
NSString *path=@"/Applications/ColorFinale.app/Contents/PlugIns/ColorFinale.pluginkit/Contents/Frameworks/RenderingEngine.framework/Versions/A/RenderingEngine";
|
||||
void *handle=dlopen(path.fileSystemRepresentation,RTLD_NOW|RTLD_LOCAL);
|
||||
if(!handle){fprintf(stderr,"%s\n",dlerror());return 1;}
|
||||
NSMutableDictionary *out=[NSMutableDictionary dictionary];
|
||||
for(NSString *name in @[@"FTChannelMixerFilter",@"FTFilmSaturationFilter",@"FTHalationFilter",@"FTBloomFilter",@"FTGrainFilter",@"FTGrainProcessor",@"FTNoiseGeneratorSimple"]){
|
||||
Class cls=NSClassFromString(name);NSMutableDictionary *entry=[NSMutableDictionary dictionary];
|
||||
for(int meta=0;meta<2;meta++){
|
||||
unsigned count=0;Method *methods=class_copyMethodList(meta?object_getClass(cls):cls,&count);NSMutableArray *list=[NSMutableArray array];
|
||||
for(unsigned i=0;i<count;i++)[list addObject:@{@"selector":NSStringFromSelector(method_getName(methods[i])),@"encoding":@(method_getTypeEncoding(methods[i]))}];free(methods);entry[meta?@"class":@"instance"]=list;
|
||||
}
|
||||
if([cls isSubclassOfClass:CIFilter.class]){@try{CIFilter *filter=[[cls alloc]init];[filter setDefaults];entry[@"attributes"]=filter.attributes?:@{};entry[@"inputKeys"]=filter.inputKeys?:@[];
|
||||
NSMutableDictionary *values=[NSMutableDictionary dictionary];
|
||||
for(NSString *key in @[@"gammaAll",@"gammaCyan",@"gammaMagenta",@"gammaYellow",@"density",@"densitySwitch",@"valueSwitch",@"scatter",@"dyeTransmission",@"boost",@"sensitivity",@"blurRadius",@"intensity",@"grainSize",@"filmResponse",@"correlation",@"stdRed",@"stdGreen",@"stdBlue",@"seed"]){@try{id value=[filter valueForKey:key];if([value isKindOfClass:NSNumber.class])values[key]=value;}@catch(NSException *e){}}
|
||||
for(NSString *key in @[@"colorKernel",@"genericKernel"]){@try{id value=[filter valueForKey:key];if(value)values[key]=[value name]?:@"";}@catch(NSException *e){}}
|
||||
entry[@"defaults"]=values;
|
||||
}@catch(NSException *e){entry[@"exception"]=e.reason;}}
|
||||
if([name isEqual:@"FTNoiseGeneratorSimple"]){id object=[[cls alloc]init];entry[@"defaults"]=@{@"radius":[object valueForKey:@"radius"],@"blurSize":[object valueForKey:@"blurSize"]};}
|
||||
out[name]=entry;
|
||||
}
|
||||
NSData *json=[NSJSONSerialization dataWithJSONObject:out options:NSJSONWritingPrettyPrinted|NSJSONWritingSortedKeys error:nil];
|
||||
if(!json)return 2;fwrite(json.bytes,1,json.length,stdout);fputc('\n',stdout);return 0;
|
||||
}}
|
||||
@@ -0,0 +1,68 @@
|
||||
// Executes the user's installed Color Finale only as a read-only test oracle.
|
||||
// Product builds and product rendering never load these reference frameworks.
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreImage/CoreImage.h>
|
||||
#import <Metal/Metal.h>
|
||||
#import <MetalPerformanceShaders/MetalPerformanceShaders.h>
|
||||
#include <dlfcn.h>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
#include "../大鱼调色/Plugin/DYFilmMath.h"
|
||||
using Floats=std::vector<float>;
|
||||
static id<MTLDevice> gpu;
|
||||
static id<MTLCommandQueue> queue;
|
||||
static CIContext *context;
|
||||
static unsigned W=64,H=48;
|
||||
static void require(bool p,NSString *m){if(!p)@throw [NSException exceptionWithName:@"FilmReference" reason:m userInfo:nil];}
|
||||
static float encode(float v){return v<=.0031308f?v*12.92f:1.055f*powf(fmaxf(0,v),1/2.4f)-.055f;}
|
||||
static float decode(float v){return v<=.04045f?v/12.92f:powf(fmaxf(0,(v+.055f)/1.055f),2.4f);}
|
||||
static id<MTLTexture> texture(const Floats& data={}){MTLTextureDescriptor *d=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA32Float width:W height:H mipmapped:NO];d.storageMode=MTLStorageModeShared;d.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite|MTLTextureUsageRenderTarget;id<MTLTexture>t=[gpu newTextureWithDescriptor:d];require(t!=nil,@"texture allocation");if(!data.empty())[t replaceRegion:MTLRegionMake2D(0,0,W,H) mipmapLevel:0 withBytes:data.data() bytesPerRow:W*16];return t;}
|
||||
static Floats read(id<MTLTexture> t){Floats v(W*H*4);[t getBytes:v.data() bytesPerRow:W*16 fromRegion:MTLRegionMake2D(0,0,W,H) mipmapLevel:0];return v;}
|
||||
static void finish(id<MTLCommandBuffer> c){[c commit];[c waitUntilCompleted];require(c.status==MTLCommandBufferStatusCompleted,c.error.description?:@"GPU command");}
|
||||
static CIImage *image(id<MTLTexture> t){return [CIImage imageWithMTLTexture:t options:@{kCIImageColorSpace:NSNull.null}];}
|
||||
static Floats render(CIImage *ci){require(ci!=nil,@"reference output image");Floats v(W*H*4);[context render:ci toBitmap:v.data() rowBytes:W*16 bounds:CGRectMake(0,0,W,H) format:kCIFormatRGBAf colorSpace:nil];Floats top(v.size());for(unsigned y=0;y<H;y++)memcpy(top.data()+y*W*4,v.data()+(H-1-y)*W*4,W*16);return top;}
|
||||
static id<MTLComputePipelineState> pipeline(id<MTLLibrary> library,NSString *name){NSError *error=nil;id<MTLFunction> f=[library newFunctionWithName:name];require(f!=nil,name);id<MTLComputePipelineState>p=[gpu newComputePipelineStateWithFunction:f error:&error];require(p!=nil,error.description);return p;}
|
||||
static void dispatch(id<MTLComputeCommandEncoder> e){[e dispatchThreads:MTLSizeMake(W,H,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[e endEncoding];}
|
||||
static Floats point(id<MTLLibrary> library,id<MTLTexture> src,id<MTLTexture> aux,DYUniforms u,int operation){id<MTLTexture>out=texture();id<MTLCommandBuffer>c=[queue commandBuffer];id<MTLComputeCommandEncoder>e=[c computeCommandEncoder];[e setComputePipelineState:pipeline(library,@"dyFilmPoint")];[e setTexture:src atIndex:0];[e setTexture:aux?:src atIndex:1];[e setTexture:out atIndex:2];[e setBytes:&u length:sizeof(u) atIndex:0];struct {int operation;float radius;unsigned frame,reserved;}p={operation,0,u.filmFrameKey,0};[e setBytes:&p length:sizeof(p) atIndex:1];dispatch(e);finish(c);return read(out);}
|
||||
static NSDictionary *difference(const Floats&a,const Floats&b){double maximum=0,sum=0;unsigned count=0,nonfinite=0,different=0;for(size_t i=0;i<a.size();i++){if(i%4==3)continue;if(a[(i/4)*4+3]<=0)continue;double d=fabs(a[i]-b[i]);if(!std::isfinite(d))nonfinite++;else{maximum=fmax(maximum,d);sum+=d*d;count++;if(d>1e-5)different++;}}return @{@"maximum":@(maximum),@"rms":@(sqrt(sum/fmax(1,count))),@"nonfinite":@(nonfinite),@"different":@(different)};}
|
||||
int main(int argc,const char **argv){@autoreleasepool{@try{
|
||||
require(argc==2||argc==4,@"Usage: verify_film_reference /absolute/path/default.metallib [width height]");if(argc==4){W=atoi(argv[2]);H=atoi(argv[3]);require(W>0&&H>0&&W<=4096&&H<=4096,@"bounded reference dimensions");}gpu=MTLCreateSystemDefaultDevice();queue=[gpu newCommandQueue];context=[CIContext contextWithMTLDevice:gpu options:@{kCIContextWorkingColorSpace:NSNull.null,kCIContextOutputColorSpace:NSNull.null}];NSError *error=nil;
|
||||
id<MTLLibrary> dayu=[gpu newLibraryWithURL:[NSURL fileURLWithPath:@(argv[1])] error:&error];require(dayu!=nil,error.description);
|
||||
NSString *framework=@"/Applications/ColorFinale.app/Contents/PlugIns/ColorFinale.pluginkit/Contents/Frameworks/RenderingEngine.framework/Versions/A";
|
||||
require(dlopen([[framework stringByAppendingPathComponent:@"RenderingEngine"]fileSystemRepresentation],RTLD_NOW|RTLD_LOCAL)!=nullptr,@"load installed reference framework");
|
||||
id<MTLLibrary> original=[gpu newLibraryWithURL:[NSURL fileURLWithPath:[framework stringByAppendingPathComponent:@"Resources/metal_kernels.metallib"]] error:&error];require(original!=nil,error.description);
|
||||
Floats linear(W*H*4),encoded(linear.size());for(unsigned y=0;y<H;y++)for(unsigned x=0;x<W;x++){unsigned i=(y*W+x)*4;float a=(x%11==0&&W>1)?0:(x%3==0?.25f:1);for(int k=0;k<3;k++){float c=float((x*17+y*23+k*71)%257)/256;if(x%17==0)c=k==0?1.3f:k==1?-.02f:c;linear[i+k]=float((__fp16)(decode(c)*a));encoded[i+k]=encode(a>0?linear[i+k]/a:0)*a;}linear[i+3]=encoded[i+3]=a;}
|
||||
id<MTLTexture>source=texture(linear),codes=texture(encoded);Floats probe=render(image(source));require([difference(linear,probe)[@"maximum"]doubleValue]==0,@"CI bitmap orientation control");id<MTLTexture>roundtrip=texture();id<MTLCommandBuffer>roundtripCommands=[queue commandBuffer];[context render:image(source) toMTLTexture:roundtrip commandBuffer:roundtripCommands bounds:CGRectMake(0,0,W,H) colorSpace:nil];finish(roundtripCommands);require([difference(linear,read(roundtrip))[@"maximum"]doubleValue]==0,@"CI texture orientation control");NSMutableArray *rows=[NSMutableArray array];bool passed=true;
|
||||
auto check=[&](NSString*name,const Floats&a,const Floats&b,double tolerance){NSDictionary *d=difference(a,b);BOOL ok=[d[@"nonfinite"]intValue]==0&&[d[@"maximum"]doubleValue]<tolerance;NSMutableDictionary *r=[d mutableCopy];r[@"name"]=name;r[@"pass"]=@(ok);r[@"tolerance"]=@(tolerance);[rows addObject:r];passed&=ok;};
|
||||
DYUniforms u={};u.mixerMix=1;u.mixerRed=(DYFloat4){.75,.3,-.05,0};u.mixerGreen=(DYFloat4){.15,.85,0,0};u.mixerBlue=(DYFloat4){.05,-.1,1.05,0};u.film.gammaAll=u.film.gammaCyan=u.film.gammaMagenta=u.film.gammaYellow=1;u.film.valueMode=6;
|
||||
for(int matrixCase=0;matrixCase<3;matrixCase++){
|
||||
if(matrixCase==1)u.mixerRed=u.mixerGreen=u.mixerBlue=(DYFloat4){0,0,0,0};
|
||||
if(matrixCase==2)u.mixerRed=u.mixerGreen=u.mixerBlue=(DYFloat4){1.f/3,1.f/3,1.f/3,0};
|
||||
for(int options=0;options<4;options++){
|
||||
u.mixerPreserveLuma=options&1;u.mixerPreserveSaturation=(options>>1)&1;CIFilter *f=[[NSClassFromString(@"FTChannelMixerFilter")alloc]init];[f setDefaults];[f setValue:image(codes) forKey:kCIInputImageKey];[f setValue:[CIVector vectorWithX:u.mixerRed.x Y:u.mixerRed.y Z:u.mixerRed.z]forKey:@"inputRVector"];[f setValue:[CIVector vectorWithX:u.mixerGreen.x Y:u.mixerGreen.y Z:u.mixerGreen.z]forKey:@"inputGVector"];[f setValue:[CIVector vectorWithX:u.mixerBlue.x Y:u.mixerBlue.y Z:u.mixerBlue.z]forKey:@"inputBVector"];[f setValue:@(u.mixerPreserveLuma>0) forKey:@"inputPreserveLuma"];[f setValue:@(u.mixerPreserveSaturation>0)forKey:@"inputPreserveSaturation"];
|
||||
Floats expected=render(f.outputImage);for(size_t i=0;i<expected.size()/4;i++)for(int k=0;k<3;k++){float a=expected[i*4+3];expected[i*4+k]=a>0?decode(expected[i*4+k]/a)*a:0;}check([NSString stringWithFormat:@"original-mixer-case-%d-options-%d",matrixCase,options],expected,point(dayu,source,nil,u,0),.00015);
|
||||
}
|
||||
}
|
||||
for(int mode=1;mode<=2;mode++)for(float density:{-.4f,0.f,.65f})for(float gamma:{.75f,1.3f}){
|
||||
u.film.densityMode=mode;u.film.density=density;u.film.gammaAll=gamma;u.film.gammaCyan=1.2;u.film.gammaMagenta=.9;u.film.gammaYellow=1.1;CIFilter *f=[[NSClassFromString(@"FTFilmSaturationFilter")alloc]init];[f setDefaults];[f setValue:image(codes)forKey:kCIInputImageKey];[f setValue:@(gamma)forKey:@"gammaAll"];[f setValue:@1.2 forKey:@"gammaCyan"];[f setValue:@.9 forKey:@"gammaMagenta"];[f setValue:@1.1 forKey:@"gammaYellow"];[f setValue:@(density)forKey:@"density"];[f setValue:@(mode)forKey:@"densitySwitch"];
|
||||
Floats expected=render(f.outputImage);for(size_t i=0;i<expected.size()/4;i++)for(int k=0;k<3;k++){float a=expected[i*4+3];expected[i*4+k]=a>0?decode(expected[i*4+k]/a)*a:0;}check([NSString stringWithFormat:@"original-subtractive-%d-%.2f-%.2f",mode,density,gamma],expected,point(dayu,source,nil,u,1),.00012);
|
||||
}
|
||||
for(float scatter:{1.f,5.f,20.f}){
|
||||
u.film.scatter=scatter;u.film.boost=1.7;u.film.dyeTransmission=70;CIFilter *f=[[NSClassFromString(@"FTHalationFilter")alloc]init];[f setDefaults];[f setValue:image(source)forKey:kCIInputImageKey];[f setValue:@(scatter)forKey:@"scatter"];[f setValue:@1.7 forKey:@"boost"];[f setValue:@(70.f/500)forKey:@"dyeTransmission"];
|
||||
CIImage *blur=[[[image(source)imageByClampingToExtent]imageByApplyingFilter:@"CIGaussianBlur" withInputParameters:@{kCIInputRadiusKey:@(scatter)}]imageByCroppingToRect:CGRectMake(0,0,W,H)];id<MTLTexture>aux=texture(render(blur));check([NSString stringWithFormat:@"original-halation-radius-%.0f",scatter],render(f.outputImage),point(dayu,source,aux,u,2),.00012);
|
||||
}
|
||||
for(float sensitivity:{20.f,50.f,80.f}){
|
||||
DYFilmSettings settings={};settings.sensitivity=sensitivity;settings.intensity=70;
|
||||
CIFilter *filter=[[NSClassFromString(@"FTBloomFilter")alloc]init];[filter setValue:image(source)forKey:kCIInputImageKey];[filter setValue:@2.5 forKey:@"blurRadius"];[filter setValue:@(sensitivity/100)forKey:@"sensitivity"];[filter setValue:@.7 forKey:@"intensity"];
|
||||
id<MTLTexture>horizontal=texture(),vertical=texture(),edges=texture();id<MTLCommandBuffer>commands=[queue commandBuffer];
|
||||
for(int direction=0;direction<2;direction++){id<MTLComputeCommandEncoder>e=[commands computeCommandEncoder];[e setComputePipelineState:pipeline(dayu,@"dyFilmSparseBlur")];[e setTexture:direction?horizontal:source atIndex:0];[e setTexture:direction?vertical:horizontal atIndex:1];[e setBytes:&direction length:4 atIndex:0];dispatch(e);}
|
||||
id<MTLComputeCommandEncoder>e=[commands computeCommandEncoder];[e setComputePipelineState:pipeline(dayu,@"dyFilmBloomEdges")];[e setTexture:vertical atIndex:0];[e setTexture:source atIndex:1];[e setTexture:edges atIndex:2];[e setBytes:&settings length:sizeof(settings) atIndex:0];dispatch(e);finish(commands);
|
||||
Floats actual=read(edges),expected=render(filter.outputImage);unsigned inside=0,border=0;for(unsigned y=0;y<H;y++)for(unsigned x=0;x<W;x++)if(expected[(y*W+x)*4+3]>0&&fabs(actual[(y*W+x)*4]-expected[(y*W+x)*4])>.01){if(x>=8&&x<W-8&&y>=8&&y<H-8)inside++;else border++;}fprintf(stderr,"bloom %.0f mismatches interior=%u border=%u\n",sensitivity,inside,border);check([NSString stringWithFormat:@"original-bloom-edge-sensitivity-%.0f",sensitivity],expected,actual,.00001);
|
||||
}
|
||||
for(unsigned seed:{0u,1u,7919u,0xffffffffu}){
|
||||
auto noise=[&](id<MTLLibrary>lib,NSString *name){id<MTLTexture>out=texture();id<MTLCommandBuffer>c=[queue commandBuffer];id<MTLComputeCommandEncoder>e=[c computeCommandEncoder];[e setComputePipelineState:pipeline(lib,name)];[e setTexture:out atIndex:0];[e setBytes:&seed length:4 atIndex:0];if([name isEqual:@"dyFilmNoise"]){unsigned bottom=0;[e setBytes:&bottom length:4 atIndex:1];}dispatch(e);finish(c);return out;};
|
||||
id<MTLTexture>ref=noise(original,@"BoxMullerPCG"),ours=noise(dayu,@"dyFilmNoise");check([NSString stringWithFormat:@"original-pcg-box-muller-%u",seed],read(ref),read(ours),.00002);
|
||||
for(float color:{0.f,.35f,1.f}){u.film.grainAmount=.5;u.film.grainSize=1;u.film.grainResponse=.4;u.film.grainColor=color;float corr=1-2*color,other=1-corr,norm=sqrtf(corr*corr+other*other);float params[9]={.4f,.6f,corr/norm,other/norm,corr/norm,other/norm,.025f,.025f,.025f};id<MTLTexture>referenceOutput=texture();id<MTLCommandBuffer>commands=[queue commandBuffer];id<MTLComputeCommandEncoder>encoder=[commands computeCommandEncoder];[encoder setComputePipelineState:pipeline(original,@"GrainFilter")];[encoder setTexture:codes atIndex:0];[encoder setTexture:ref atIndex:1];[encoder setTexture:referenceOutput atIndex:2];[encoder setBytes:params length:sizeof(params) atIndex:0];dispatch(encoder);finish(commands);Floats expected=read(referenceOutput);for(size_t i=0;i<expected.size()/4;i++)for(int k=0;k<3;k++){float a=expected[i*4+3];expected[i*4+k]=a>0?decode(expected[i*4+k]/a)*a:0;}check([NSString stringWithFormat:@"original-grain-%u-%.2f",seed,color],expected,point(dayu,source,ours,u,4),.0002);}
|
||||
}
|
||||
NSDictionary *result=@{@"pass":@(passed),@"checks":@(rows.count),@"width":@(W),@"height":@(H),@"gpu":gpu.name,@"referenceVersion":@"ColorFinale 2.16.2 (625)",@"scope":@"Independent installed-reference CI/Metal output versus authored production Metal point kernels; source grayscale/color/HDR/negative and fractional-alpha vectors; reference frame seed is explicit.",@"results":rows};NSData *json=[NSJSONSerialization dataWithJSONObject:result options:NSJSONWritingPrettyPrinted|NSJSONWritingSortedKeys error:nil];fwrite(json.bytes,1,json.length,stdout);puts("");return passed?0:1;
|
||||
}@catch(NSException *e){fprintf(stderr,"%s\n",e.reason.UTF8String);return 2;}}}
|
||||
@@ -2,15 +2,17 @@
|
||||
"status": "verified",
|
||||
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"bundleID": "com.dayu.color",
|
||||
"version": "1.4.3",
|
||||
"build": "33",
|
||||
"version": "1.5.0",
|
||||
"build": "34",
|
||||
"team": "B3W25FX5H5",
|
||||
"notaryID": "e755670d-8fb3-46d2-95c3-1206f014d16d",
|
||||
"notaryID": "164abf2b-4e67-4504-b72a-04122da9e381",
|
||||
"notaryStatus": "Accepted",
|
||||
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
|
||||
"sourceCommit": "26a888f4534792481c6a9933091cb0b23307cd24",
|
||||
"sourceCommit": "06d531c443b0bb2f179022a4e64148394f5d0690",
|
||||
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
|
||||
"templateSHA256": "9b8f6e407545429b77c1de88d4cceb738760771c5a7f1dbd9732bdcc95c23738",
|
||||
"shaderSHA256": "b3258b903ed485b4b738a823a7de929bca9380365ad2de9c2c7781660293df7e",
|
||||
"hostVerification": "verification/HostMaskFolding1.4.3.json"
|
||||
"templateSHA256": "7476fb5a3cfad5f4dafb7a887dcc787b9cbcba6ad64df3b4939b336444cf8bfc",
|
||||
"shaderSHA256": "b05051fa34cf68bfb7fd3cc77f277620c7e744f927c35dd956e144ed1f748679",
|
||||
"hostVerification": "verification/HostFilmMixer1.5.0.json",
|
||||
"nativeChecks": 349,
|
||||
"referenceChecks": 184
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"status": "verified-formal-install-and-host",
|
||||
"baseline": "1.4.3 (33)",
|
||||
"nativePass": true,
|
||||
"checks": 349,
|
||||
"referenceComparison": {
|
||||
"passed": true,
|
||||
"checks": 184,
|
||||
"dimensions": [
|
||||
[
|
||||
64,
|
||||
48
|
||||
],
|
||||
[
|
||||
63,
|
||||
47
|
||||
],
|
||||
[
|
||||
1,
|
||||
17
|
||||
],
|
||||
[
|
||||
17,
|
||||
1
|
||||
]
|
||||
]
|
||||
},
|
||||
"formalInstallUnchanged": false,
|
||||
"formalVersion": "1.5.0",
|
||||
"formalBuild": "34",
|
||||
"compiledSource": "06d531c443b0bb2f179022a4e64148394f5d0690",
|
||||
"hostVerification": "verification/HostFilmMixer1.5.0.json",
|
||||
"packageVerification": "verification/Package.json",
|
||||
"targetVersion": "1.5.0",
|
||||
"targetBuild": "34"
|
||||
}
|
||||
文件差异过大,未显示。
加载差异
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"status": "verified",
|
||||
"remote": "https://dayu.media/git/dayu/dayu-color.git",
|
||||
"commit": "eeeee102cd78b8f99be743be634739286fed8a76",
|
||||
"clone": "/Users/mac/Library/Caches/CodexRecovery/dayu-color-film-1.5.0",
|
||||
"lfs": false,
|
||||
"submodules": false,
|
||||
"releaseBuild": true,
|
||||
"nativeChecks": 349,
|
||||
"nativePass": true,
|
||||
"sourceHasAllFilmMath": true,
|
||||
"generatedAppsRemoved": [
|
||||
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/RecoveryDerivedData/Build/Products/Release/大鱼调色.app",
|
||||
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/RecoveryDerivedData/Build/Products/Release/大鱼调色 XPC Service.pluginkit"
|
||||
]
|
||||
}
|
||||
文件差异过大,未显示。
加载差异
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"status": "passed",
|
||||
"targetVersion": "1.5.0",
|
||||
"build": "34",
|
||||
"sourceCommit": "06d531c443b0bb2f179022a4e64148394f5d0690",
|
||||
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"host": "Final Cut Pro 12.4",
|
||||
"baseline": {
|
||||
"version": 4,
|
||||
"presetBytes": 77437,
|
||||
"presetSHA256": "02b4f0e8ff52b9d27449d208fd7b2b09ed92440a578f09688a1a5f461cfcc172",
|
||||
"floatParameterCount": 234,
|
||||
"toolLayers": 0,
|
||||
"masks": 1,
|
||||
"trackKeys": 287
|
||||
},
|
||||
"nativeChecks": 349,
|
||||
"referenceCases": 184,
|
||||
"privacy": "User media, project and full presets stay local; report contains aggregate counts and hashes.",
|
||||
"userCompatibility": {
|
||||
"allExisting234ValuesUnchanged": true,
|
||||
"assetPathsAndSpiderUnchanged": true,
|
||||
"toolsAndAll287KeysByteIdentical": true,
|
||||
"uiTrustedKeys": 286,
|
||||
"newDefaultParameters": 42,
|
||||
"afterVersion": 5,
|
||||
"afterBytes": 78460,
|
||||
"afterSHA256": "40772a5b481f197a4f1bf75e51f14159d02416ef68a7e68fca2397c2fc26e094"
|
||||
},
|
||||
"hostGrainExport": {
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"fps": "25/1",
|
||||
"duration": "4.000000",
|
||||
"codec": "prores",
|
||||
"frames": [
|
||||
"7719df2ae1cf5ea9375041270cf71e926472250e6813797b31f0a7a76bed11fb",
|
||||
"7719df2ae1cf5ea9375041270cf71e926472250e6813797b31f0a7a76bed11fb",
|
||||
"84b06b3dbb1f4acf6540a93f3f9ddfec1e806ca09bf6523bcf2f4853c292b252",
|
||||
"84b06b3dbb1f4acf6540a93f3f9ddfec1e806ca09bf6523bcf2f4853c292b252",
|
||||
"36fb6225db64ecafbc98bac0c864b9b7406226ff452e1b8c32b52f7fe282c4e1",
|
||||
"36fb6225db64ecafbc98bac0c864b9b7406226ff452e1b8c32b52f7fe282c4e1"
|
||||
],
|
||||
"adjacentEqual": [
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
true
|
||||
],
|
||||
"presetHold": 2
|
||||
},
|
||||
"hostChecks": {
|
||||
"newModulesVisible": true,
|
||||
"mixerThreeOutputsAndPreserveControls": true,
|
||||
"filmFiveTabs": true,
|
||||
"subtractiveHalationBloomVignetteAdjusted": true,
|
||||
"filmMaskCount": 1,
|
||||
"foldHidesMaskControlsKeepsBadge": true,
|
||||
"independentMixerLayerInitialized": true,
|
||||
"layerDeleteUndoRedoRestored": true,
|
||||
"normalQuitConfirmed": true,
|
||||
"coldReopenAllStatePreserved": true
|
||||
},
|
||||
"combinedPresetBefore": {
|
||||
"bytes": 8987,
|
||||
"sha256": "6c7c08c8b17add17c22d165b2190eff3919c742b8dfae46703ff399cabd71581"
|
||||
},
|
||||
"roundtrip": {
|
||||
"projects": 3,
|
||||
"format": "FCPXML 1.14",
|
||||
"strictDTD": "pass",
|
||||
"missingMedia": 0,
|
||||
"comparedFields": "match",
|
||||
"differences": []
|
||||
},
|
||||
"hostCombinedExport": {
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"fps": "25/1",
|
||||
"durationSeconds": 4,
|
||||
"allFramesDecode": true
|
||||
},
|
||||
"coldReopen": {
|
||||
"combined": {
|
||||
"semanticEqual": true,
|
||||
"byteIdentical": true,
|
||||
"bytes": 8987,
|
||||
"sha256": "6c7c08c8b17add17c22d165b2190eff3919c742b8dfae46703ff399cabd71581"
|
||||
},
|
||||
"grain": {
|
||||
"semanticEqual": true,
|
||||
"byteIdentical": true,
|
||||
"bytes": 8420,
|
||||
"sha256": "f87d0cf75c77c01ffa5076592f133f3a957a0480077752f0fcdef8be765c468d"
|
||||
}
|
||||
},
|
||||
"passResult": true,
|
||||
"appSourceIdenticalToReferenceCandidate": "eeeee102cd78b8f99be743be634739286fed8a76"
|
||||
}
|
||||
+289
-10
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"bundlePath": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit",
|
||||
"checks": 293,
|
||||
"checks": 349,
|
||||
"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,14 +12,14 @@
|
||||
"error": "未提供错误信息",
|
||||
"name": "runtime-directory",
|
||||
"pass": true,
|
||||
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/1625CF86-D762-4A0B-9515-6DE9981F8A19"
|
||||
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/395FA613-8C28-4323-B4F3-6447EE317F60"
|
||||
},
|
||||
{
|
||||
"descriptors": 234,
|
||||
"descriptors": 276,
|
||||
"name": "descriptor-unique-id-offset-key",
|
||||
"pass": true,
|
||||
"sections": 15,
|
||||
"uniformBytes": 1104
|
||||
"sections": 17,
|
||||
"uniformBytes": 1296
|
||||
},
|
||||
{
|
||||
"name": "finite-real-model-defaults",
|
||||
@@ -65,7 +65,7 @@
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"modules": 12,
|
||||
"modules": 14,
|
||||
"name": "default-primary-spider-base-expanded-all-eyes-on",
|
||||
"pass": true
|
||||
},
|
||||
@@ -154,7 +154,7 @@
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "complete-version-four-preset-includes-mesh",
|
||||
"name": "complete-version-five-preset-includes-mesh",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
@@ -816,7 +816,7 @@
|
||||
"error": "未提供错误信息",
|
||||
"name": "renderer-export-33cube",
|
||||
"pass": true,
|
||||
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/1625CF86-D762-4A0B-9515-6DE9981F8A19/diagnostic-export.cube"
|
||||
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/395FA613-8C28-4323-B4F3-6447EE317F60/diagnostic-export.cube"
|
||||
},
|
||||
{
|
||||
"bytes": 1186074,
|
||||
@@ -836,7 +836,7 @@
|
||||
},
|
||||
{
|
||||
"heartbeats": 0,
|
||||
"maximumGapMS": 84.72579158842564,
|
||||
"maximumGapMS": 110.79099983908236,
|
||||
"name": "external-activation-main-loop-responsive",
|
||||
"pass": true
|
||||
},
|
||||
@@ -1339,6 +1339,285 @@
|
||||
"name": "cube-export-follows-identical-anchored-tool-order",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-neutral-production-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "new-tools-default-to-neutral",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "new-neutral-tools-preserve-existing-alpha",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "channel-mixer-production-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"changedComponents": 5387,
|
||||
"maxAbsoluteError": 0.283203125,
|
||||
"name": "channel-mixer-affects-real-frame",
|
||||
"nonfiniteComponents": 0,
|
||||
"nonzeroComponents": 9832,
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "channel-mixer-eye-bypass-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "channel-mixer-eye-exact-bypass",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "channel-mixer-zero-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "channel-mixer-zero-exact-bypass",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-stage-0-production",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"changedComponents": 7368,
|
||||
"maxAbsoluteError": 0.135498046875,
|
||||
"name": "film-stage-0-finite-active-alpha",
|
||||
"nonfiniteComponents": 0,
|
||||
"nonzeroComponents": 9832,
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-stage-0-zero-mix",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "film-stage-0-zero-is-exact",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-stage-0-eye-off",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "film-stage-0-eye-preserves-old-frame",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-stage-1-production",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"changedComponents": 4916,
|
||||
"maxAbsoluteError": 0.3251953125,
|
||||
"name": "film-stage-1-finite-active-alpha",
|
||||
"nonfiniteComponents": 0,
|
||||
"nonzeroComponents": 9832,
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-stage-1-zero-mix",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "film-stage-1-zero-is-exact",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-stage-1-eye-off",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "film-stage-1-eye-preserves-old-frame",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-stage-2-production",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"changedComponents": 7374,
|
||||
"maxAbsoluteError": 0.37451171875,
|
||||
"name": "film-stage-2-finite-active-alpha",
|
||||
"nonfiniteComponents": 0,
|
||||
"nonzeroComponents": 9832,
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-stage-2-zero-mix",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "film-stage-2-zero-is-exact",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-stage-2-eye-off",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "film-stage-2-eye-preserves-old-frame",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-stage-3-production",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"changedComponents": 7351,
|
||||
"maxAbsoluteError": 0.1650390625,
|
||||
"name": "film-stage-3-finite-active-alpha",
|
||||
"nonfiniteComponents": 0,
|
||||
"nonzeroComponents": 9832,
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "grain-random-access-repeat",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "grain-identical-frozen-frame-is-bit-exact",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "grain-next-frozen-frame",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "grain-frame-changes-noise",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-stage-3-zero-mix",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "film-stage-3-zero-is-exact",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-stage-3-eye-off",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "film-stage-3-eye-preserves-old-frame",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-stage-4-production",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"changedComponents": 7374,
|
||||
"maxAbsoluteError": 0.85009765625,
|
||||
"name": "film-stage-4-finite-active-alpha",
|
||||
"nonfiniteComponents": 0,
|
||||
"nonzeroComponents": 5168,
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-stage-4-zero-mix",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "film-stage-4-zero-is-exact",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-stage-4-eye-off",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "film-stage-4-eye-preserves-old-frame",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "grain-top-origin-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "grain-bottom-origin-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"changedComponents": 0,
|
||||
"maxAbsoluteError": 0,
|
||||
"name": "grain-canonical-coordinates-survive-texture-origin",
|
||||
"nonfiniteComponents": 0,
|
||||
"nonzeroComponents": 9832,
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "grain-exact-ntsc-signed-frame-and-hold",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "film-mixer-adjacent-schema-two-valid",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-mixer-adjacent-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "film-mixer-adjacent-layers-affect-frame",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "film-mixer-mask-archive-exact-roundtrip",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "film-zero-mask-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "film-zero-mask-exact-source",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "grain-rejected-by-static-cube",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "pure-subtractive-cube-supported",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "channel-mixer-cube-supported",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "tracking-captures-real-full-input-texture",
|
||||
"pass": true
|
||||
@@ -1537,6 +1816,6 @@
|
||||
"pass": true
|
||||
}
|
||||
],
|
||||
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/1625CF86-D762-4A0B-9515-6DE9981F8A19",
|
||||
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/395FA613-8C28-4323-B4F3-6447EE317F60",
|
||||
"scope": "Native model and renderer integration with real Metal/IOSurface textures and fake FxPlug host selectors; no GUI or live host document."
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"passResult": true,
|
||||
"tag": "v1.4.3-mask-fold-20261102",
|
||||
"releaseCommit": "301b31438e8da95dc4e6e1c09498ad814a0ebcfc",
|
||||
"appCompiledSource": "26a888f4534792481c6a9933091cb0b23307cd24",
|
||||
"restoredFiles": 244,
|
||||
"fsck": "full strict passed",
|
||||
"everyTrackedFileByteCompared": true,
|
||||
"packageBytes": 14340650,
|
||||
"packageSHA256": "41bba698a70a7629438688a4be74947f424f3af04190090c44f248827b4c3bb2",
|
||||
"formalNativeAndHostReportsRecovered": true,
|
||||
"compiledSourceRebuildRecord": "verification/MaskFoldingRecovery.json",
|
||||
"LFS": false,
|
||||
"submodules": false,
|
||||
"cloneCleaned": true
|
||||
}
|
||||
+16
-16
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.4.3.pkg",
|
||||
"sha256": "41bba698a70a7629438688a4be74947f424f3af04190090c44f248827b4c3bb2",
|
||||
"bytes": 14340650,
|
||||
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.5.0.pkg",
|
||||
"sha256": "3ecabc7a8bfd675b228a5f00016aa17a35b65b544055e57793ec3bff3d7e0294",
|
||||
"bytes": 14380104,
|
||||
"testUnsigned": false,
|
||||
"installationExecuted": false,
|
||||
"checks": [
|
||||
@@ -31,34 +31,34 @@
|
||||
"source": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"payload": "Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"bundleID": "com.dayu.color",
|
||||
"version": "1.4.3",
|
||||
"build": "33"
|
||||
"version": "1.5.0",
|
||||
"build": "34"
|
||||
},
|
||||
{
|
||||
"source": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/pkg-inputs/大鱼调色",
|
||||
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.29f7e0ee-d1bf-4b70-bb5c-21ccae60aa70/282BF18F-3687-45E3-8DC8-DA8A2CD0F8B3/大鱼调色"
|
||||
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.210510f9-2b2c-4b85-8a6d-055789dd7acf/8FC61176-5CC6-435D-BD1C-99D0AF0117E6/大鱼调色"
|
||||
}
|
||||
],
|
||||
"signature": "Package \"大鱼调色-1.4.3.pkg\":\n Status: signed by a developer certificate issued by Apple for distribution\n Notarization: trusted by the Apple notary service\n Signed with a trusted timestamp on: 2026-11-02 04:37:48 +0000\n Certificate Chain:\n 1. Developer ID Installer: zhong luo (B3W25FX5H5)\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n C0 19 01 3C 67 88 8F 34 65 56 C5 91 3C E5 B6 12 4C 5D A6 DA F9 D8 \n DA 00 37 52 DF F0 F3 E6 00 B4\n ------------------------------------------------------------------------\n 2. Developer ID Certification Authority\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n 7A FC 9D 01 A6 2F 03 A2 DE 96 37 93 6D 4A FE 68 09 0D 2D E1 8D 03 \n F2 9C 88 CF B0 B1 BA 63 58 7F\n ------------------------------------------------------------------------\n 3. Apple Root CA\n Expires: 2035-02-09 21:40:36 +0000\n SHA256 Fingerprint:\n B0 B1 73 0E CB C7 FF 45 05 14 2C 49 F1 29 5E 6E DA 6B CA ED 7E 2C \n 68 C5 BE 91 B5 A1 10 01 F0 24",
|
||||
"gatekeeper": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.4.3.pkg: accepted\nsource=Notarized Developer ID",
|
||||
"signature": "Package \"大鱼调色-1.5.0.pkg\":\n Status: signed by a developer certificate issued by Apple for distribution\n Notarization: trusted by the Apple notary service\n Signed with a trusted timestamp on: 2026-11-02 06:12:29 +0000\n Certificate Chain:\n 1. Developer ID Installer: zhong luo (B3W25FX5H5)\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n C0 19 01 3C 67 88 8F 34 65 56 C5 91 3C E5 B6 12 4C 5D A6 DA F9 D8 \n DA 00 37 52 DF F0 F3 E6 00 B4\n ------------------------------------------------------------------------\n 2. Developer ID Certification Authority\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n 7A FC 9D 01 A6 2F 03 A2 DE 96 37 93 6D 4A FE 68 09 0D 2D E1 8D 03 \n F2 9C 88 CF B0 B1 BA 63 58 7F\n ------------------------------------------------------------------------\n 3. Apple Root CA\n Expires: 2035-02-09 21:40:36 +0000\n SHA256 Fingerprint:\n B0 B1 73 0E CB C7 FF 45 05 14 2C 49 F1 29 5E 6E DA 6B CA ED 7E 2C \n 68 C5 BE 91 B5 A1 10 01 F0 24",
|
||||
"gatekeeper": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.5.0.pkg: accepted\nsource=Notarized Developer ID",
|
||||
"pass": true,
|
||||
"scope": "Expanded package structural and payload verification only; no installer scripts executed and no host quit or registration performed.",
|
||||
"notarization": {
|
||||
"name": "大鱼调色-1.4.3.pkg",
|
||||
"id": "f9218078-8fd0-4a0c-9240-4b1acf7d9655",
|
||||
"id": "05f849da-5567-4351-9556-742d17b95723",
|
||||
"message": "Successfully received submission info",
|
||||
"createdDate": "2026-11-02T04:37:49.851Z",
|
||||
"status": "Accepted"
|
||||
"name": "大鱼调色-1.5.0.pkg",
|
||||
"status": "Accepted",
|
||||
"createdDate": "2026-11-02T06:12:31.089Z"
|
||||
},
|
||||
"appCompiledSource": "26a888f4534792481c6a9933091cb0b23307cd24",
|
||||
"appBuild": "33",
|
||||
"appCompiledSource": "06d531c443b0bb2f179022a4e64148394f5d0690",
|
||||
"appBuild": "34",
|
||||
"packageBuilderRemote": "https://dayu.media/git/dayu/pkg-forge.git",
|
||||
"packageBuilderCommit": "eb53707c0e67d8ddeab8c1270bb079f1050cfafe",
|
||||
"templateSHA256": {
|
||||
"大鱼调色.moef": "9b8f6e407545429b77c1de88d4cceb738760771c5a7f1dbd9732bdcc95c23738",
|
||||
"大鱼调色.moef": "7476fb5a3cfad5f4dafb7a887dcc787b9cbcba6ad64df3b4939b336444cf8bfc",
|
||||
"large.png": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a",
|
||||
"small.png": "41fec3138aee904fc39d6982e6fde809243ffec55298dbfe966f4f48d89caf8a"
|
||||
},
|
||||
"installedAppHostAcceptance": "verification/HostMaskFolding1.4.3.json",
|
||||
"installedAppHostAcceptance": "verification/HostFilmMixer1.5.0.json",
|
||||
"installScope": "本轮仅生成并验包,未再次执行系统安装;正式 APP 已有独立宿主验收。"
|
||||
}
|
||||
+18
-7
@@ -1,15 +1,26 @@
|
||||
{
|
||||
"status": "prepared-not-published",
|
||||
"passResult": false,
|
||||
"version": "1.4.3",
|
||||
"build": "33",
|
||||
"passResult": true,
|
||||
"repository": "dayu/dayu-color",
|
||||
"repositoryID": 52,
|
||||
"private": false,
|
||||
"repositoryVisibilityUnchanged": true,
|
||||
"tag": "v1.4.3-mask-fold-20261102",
|
||||
"appCompiledSource": "26a888f4534792481c6a9933091cb0b23307cd24",
|
||||
"releaseCommit": "301b31438e8da95dc4e6e1c09498ad814a0ebcfc",
|
||||
"releaseID": 371,
|
||||
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.4.3-mask-fold-20261102",
|
||||
"assetID": 16,
|
||||
"assetName": "大鱼调色-1.4.3.pkg",
|
||||
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.4.3-mask-fold-20261102/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.4.3.pkg",
|
||||
"bytes": 14340650,
|
||||
"sha256": "41bba698a70a7629438688a4be74947f424f3af04190090c44f248827b4c3bb2",
|
||||
"priorReleasePreserved": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.4.2-tracking-midpoint-20261102"
|
||||
"existingAssetReused": true,
|
||||
"verification": "Authenticated full download SHA-256 and byte count, then release/asset read-back.",
|
||||
"credentialSource": "macOS Keychain: dayu-git-api",
|
||||
"status": "published-and-fully-verified",
|
||||
"version": "1.4.3",
|
||||
"build": "33",
|
||||
"appCompiledSource": "26a888f4534792481c6a9933091cb0b23307cd24",
|
||||
"draftDownloadVerification": "verification/ReleaseDraftDownload1.4.3.json",
|
||||
"repositoryVisibilityUnchanged": true,
|
||||
"hostVerification": "verification/HostMaskFolding1.4.3.json",
|
||||
"temporaryDownloadCleaned": true
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"passResult": true,
|
||||
"version": "1.4.3",
|
||||
"build": "33",
|
||||
"releaseID": 371,
|
||||
"assetID": 16,
|
||||
"releaseCommit": "301b31438e8da95dc4e6e1c09498ad814a0ebcfc",
|
||||
"draft": true,
|
||||
"method": "Complete download through existing authenticated browser session; verified before publishing",
|
||||
"bytes": 14340650,
|
||||
"sha256": "41bba698a70a7629438688a4be74947f424f3af04190090c44f248827b4c3bb2",
|
||||
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.4.3-mask-fold-20261102/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.4.3.pkg"
|
||||
}
|
||||
@@ -378,6 +378,8 @@
|
||||
"-framework",
|
||||
Metal,
|
||||
"-framework",
|
||||
MetalPerformanceShaders,
|
||||
"-framework",
|
||||
QuartzCore,
|
||||
"-lcompression",
|
||||
"-lz",
|
||||
@@ -409,6 +411,8 @@
|
||||
"-framework",
|
||||
Metal,
|
||||
"-framework",
|
||||
MetalPerformanceShaders,
|
||||
"-framework",
|
||||
QuartzCore,
|
||||
"-lcompression",
|
||||
"-lz",
|
||||
@@ -435,6 +439,8 @@
|
||||
"-framework",
|
||||
Metal,
|
||||
"-framework",
|
||||
MetalPerformanceShaders,
|
||||
"-framework",
|
||||
QuartzCore,
|
||||
"-lcompression",
|
||||
"-lz",
|
||||
@@ -460,6 +466,8 @@
|
||||
"-framework",
|
||||
Metal,
|
||||
"-framework",
|
||||
MetalPerformanceShaders,
|
||||
"-framework",
|
||||
QuartzCore,
|
||||
"-lcompression",
|
||||
"-lz",
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "DYFilmMath.h"
|
||||
#include "DYFilmTime.h"
|
||||
#import "DYDiagnostics.h"
|
||||
#import "DYModel.h"
|
||||
#import "DYRenderer.h"
|
||||
@@ -217,7 +219,7 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
|
||||
NSWindow *interactionWindow=[[[NSWindow alloc]initWithContentRect:NSMakeRect(0,0,400,780) styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:NO]autorelease];interactionWindow.contentView=inspector;[inspector layoutSubtreeIfNeeded];
|
||||
NSArray *graphics=[inspector valueForKey:@"graphics"];NSView *wheel=nil;for(NSView *graphic in graphics)if([NSStringFromClass(graphic.class)isEqual:@"DYPrimaryBalanceWheel"])wheel=graphic;
|
||||
run.need(@"primary-balance-wheel-restored-and-palette-loaded",wheel&&[wheel valueForKey:@"wheel"]!=nil);
|
||||
BOOL merged=cards.count==12&&[cards[0][@"section"][@"key"]isEqual:@"primary"]&&[cards[1][@"section"][@"key"]isEqual:@"spider"];for(NSDictionary *card in cards)merged&=![@[@"input",@"output"]containsObject:card[@"section"][@"key"]];
|
||||
BOOL merged=cards.count==14&&[cards[0][@"section"][@"key"]isEqual:@"primary"]&&[cards[1][@"section"][@"key"]isEqual:@"spider"];for(NSDictionary *card in cards)merged&=![@[@"input",@"output"]containsObject:card[@"section"][@"key"]];
|
||||
NSDictionary *controls=[inspector valueForKey:@"controls"];for(NSDictionary *record in controls.allValues)merged&=![[record[@"descriptor"]objectForKey:@"key"]hasPrefix:@"cmbypass"];
|
||||
run.record(@"single-primary-card-no-bypass-checkboxes",merged);
|
||||
auto mouseFor=[&](NSView *view,NSEventType type,NSPoint point,NSEventModifierFlags flags=0,NSInteger clicks=1){return [NSEvent mouseEventWithType:type location:[view convertPoint:point toView:nil] modifierFlags:flags timestamp:0 windowNumber:interactionWindow.windowNumber context:nil eventNumber:0 clickCount:clicks pressure:type==NSEventTypeLeftMouseUp?0:1];};
|
||||
@@ -239,7 +241,7 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
|
||||
run.record(@"spider-single-drag-spoke-following-and-pin",dragged.x[0]>initialMesh.x[0]&&dragged.x[1]>initialMesh.x[1]&&dragged.x[3]>initialMesh.x[3]&&dragged.x[4]==initialMesh.x[4]&&dragged.x[5]==initialMesh.x[5]&&dragged.pins[2]);
|
||||
run.record(@"spider-drag-one-host-undo-group",uiHost->_undoStarts==starts+1&&uiHost->_undoEnds==ends+1&&!uiHost->_undoActive);
|
||||
error=nil;NSData *spiderArchive=[NSKeyedArchiver archivedDataWithRootObject:spiderSaved requiringSecureCoding:YES error:&error];DYAssetState *decodedSpider=[NSKeyedUnarchiver unarchivedObjectOfClass:DYAssetState.class fromData:spiderArchive error:&error];run.record(@"spider-archive-retains-mesh-pins-and-lut-paths",decodedSpider&&[decodedSpider isEqual:spiderSaved],@{@"error":reason(error)});
|
||||
NSDictionary *snapshot=[inspector performSelector:@selector(presetSnapshot)];NSData *presetJSON=[NSJSONSerialization dataWithJSONObject:snapshot options:0 error:&error];NSDictionary *decodedPreset=[NSJSONSerialization JSONObjectWithData:presetJSON options:0 error:&error];run.record(@"complete-version-four-preset-includes-mesh",[decodedPreset[@"version"]isEqual:@4]&&[DYSpiderFromJSON(decodedPreset[@"spider"])isEqual:spiderSaved.spiderMesh]);
|
||||
NSDictionary *snapshot=[inspector performSelector:@selector(presetSnapshot)];NSData *presetJSON=[NSJSONSerialization dataWithJSONObject:snapshot options:0 error:&error];NSDictionary *decodedPreset=[NSJSONSerialization JSONObjectWithData:presetJSON options:0 error:&error];run.record(@"complete-version-five-preset-includes-mesh",[decodedPreset[@"version"]isEqual:@5]&&[DYSpiderFromJSON(decodedPreset[@"spider"])isEqual:spiderSaved.spiderMesh]);
|
||||
NSDictionary *portable=DYSpiderJSON(spiderSaved.spiderMesh,spiderSaved.spiderLinked);NSData *decodedPortable=DYSpiderFromJSON(portable);run.record(@"spider-json-preset-exact-roundtrip",[decodedPortable isEqual:spiderSaved.spiderMesh]);
|
||||
NSMutableDictionary *badJSON=[[portable mutableCopy]autorelease];badJSON[@"hues"]=@7;run.record(@"spider-json-rejects-unsupported-topology",!DYSpiderFromJSON(badJSON));auto corrupt=dragged;corrupt.x[0]=NAN;run.record(@"spider-archive-rejects-nonfinite-coordinates",!DYSpiderMeshIsValid([NSData dataWithBytes:&corrupt length:sizeof(corrupt)]));
|
||||
[disc changeHueCount:12 saturationCount:8];spiderSaved=DYReadAssets(uiHost,kCMTimeZero);auto dense=DYSpiderMesh(spiderSaved.spiderMesh);run.record(@"spider-independent-resolution-and-resample",dense.hues==12&&dense.rings==7&&fabs(dy::meshDelta(dense,0,.6).x)>0);
|
||||
@@ -419,6 +421,7 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
|
||||
}
|
||||
#include "DYToolDiagnostics.inc.h"
|
||||
#include "DYToolInsertionDiagnostics.inc.h"
|
||||
#include "DYFilmDiagnostics.inc.h"
|
||||
#include "DYToolTrackingDiagnostics.inc.h"
|
||||
#include "DYToolCanvasDiagnostics.inc.h"
|
||||
#include "DYToolPenDiagnostics.inc.h"
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
DYToolDocument *empty=[[[DYToolDocument alloc]init]autorelease];
|
||||
auto uploadFilm=[&](const Pixels& pixels){[[source metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,width,height) mipmapLevel:0 withBytes:pixels.data() bytesPerRow:width*8];};
|
||||
auto filmRender=[&](DYUniforms value,NSDictionary *tools,NSString *name){NSError *failure=nil;BOOL ok=[renderer renderSource:source destination:destination uniforms:value paths:@{} spider:nil tools:tools?:empty.document error:&failure];run.need(name,ok,@{@"error":reason(failure)});return read(destination,gpu);};
|
||||
uploadFilm(input);DYUniforms neutral=DYToolUniforms(@{@"type":@"mixer"});neutral.mixerSectionEnabled=1;
|
||||
Pixels before=filmRender(neutral,nil,@"film-neutral-production-render");
|
||||
run.record(@"new-tools-default-to-neutral",!DYChannelMixerActive(neutral)&&!DYFilmActive(defaults.film)&&DYToolTypes().count==14&&DYToolIsNeutral(DYNewTool(@"film"))&&DYToolIsNeutral(DYNewTool(@"mixer")));
|
||||
BOOL alpha=YES;for(size_t i=0;i<before.size()/4;i++)alpha&=before[i*4+3]==input[i*4+3];run.record(@"new-neutral-tools-preserve-existing-alpha",alpha);
|
||||
DYUniforms matrix=neutral;matrix.mixerRed=(DYFloat4){.8,.25,-.05,0};matrix.mixerBlue=(DYFloat4){.1,0,.9,0};
|
||||
Pixels mixed=filmRender(matrix,nil,@"channel-mixer-production-render");auto delta=difference(before,mixed);run.record(@"channel-mixer-affects-real-frame",delta.different>50&&delta.nonfinite==0,measure(delta));
|
||||
matrix.mixerSectionEnabled=0;Pixels bypass=filmRender(matrix,nil,@"channel-mixer-eye-bypass-render");run.record(@"channel-mixer-eye-exact-bypass",difference(before,bypass).maximum==0);
|
||||
matrix.mixerSectionEnabled=1;matrix.mixerMix=0;bypass=filmRender(matrix,nil,@"channel-mixer-zero-render");run.record(@"channel-mixer-zero-exact-bypass",difference(before,bypass).maximum==0);
|
||||
for(int stage=0;stage<5;stage++){
|
||||
DYUniforms value=neutral;value.film.enabled=1;
|
||||
if(stage==0){value.film.subtractiveEnabled=1;value.film.gammaCyan=1.4;value.film.gammaYellow=.8;value.film.density=.35;}
|
||||
if(stage==1){value.film.halationEnabled=1;value.film.scatter=4;value.film.boost=2;value.film.dyeTransmission=60;}
|
||||
if(stage==2){value.film.bloomEnabled=1;value.film.sensitivity=1;value.film.diffusion=3;value.film.intensity=75;}
|
||||
if(stage==3){value.film.grainEnabled=1;value.film.grainAmount=.7;value.film.grainColor=.35;value.film.grainSize=3;value.filmFrameKey=7;}
|
||||
if(stage==4){value.film.vignetteEnabled=1;value.film.vignetteIntensity=1;value.film.vignetteRadius=15;}
|
||||
Pixels after=filmRender(value,nil,[NSString stringWithFormat:@"film-stage-%d-production",stage]);Difference change=difference(before,after);BOOL sameAlpha=YES;for(size_t i=0;i<after.size()/4;i++)sameAlpha&=after[i*4+3]==before[i*4+3];run.record([NSString stringWithFormat:@"film-stage-%d-finite-active-alpha",stage],change.different>20&&change.nonfinite==0&&sameAlpha,measure(change));
|
||||
if(stage==3){Pixels repeat=filmRender(value,nil,@"grain-random-access-repeat");run.record(@"grain-identical-frozen-frame-is-bit-exact",difference(after,repeat).maximum==0);value.filmFrameKey=8;Pixels next=filmRender(value,nil,@"grain-next-frozen-frame");run.record(@"grain-frame-changes-noise",difference(after,next).different>100);}
|
||||
value.film.mix=0;bypass=filmRender(value,nil,[NSString stringWithFormat:@"film-stage-%d-zero-mix",stage]);run.record([NSString stringWithFormat:@"film-stage-%d-zero-is-exact",stage],difference(before,bypass).maximum==0);
|
||||
value.film.mix=1;value.film.enabled=0;bypass=filmRender(value,nil,[NSString stringWithFormat:@"film-stage-%d-eye-off",stage]);run.record([NSString stringWithFormat:@"film-stage-%d-eye-preserves-old-frame",stage],difference(before,bypass).maximum==0);
|
||||
}
|
||||
DYUniforms originGrain=neutral;originGrain.film.enabled=1;originGrain.film.grainEnabled=1;originGrain.film.grainAmount=.7;originGrain.filmFrameKey=31;
|
||||
Pixels topGrain=filmRender(originGrain,nil,@"grain-top-origin-render"),bottomInput(input.size());for(NSUInteger y=0;y<height;y++)memcpy(bottomInput.data()+y*width*4,input.data()+(height-1-y)*width*4,width*8);uploadFilm(bottomInput);[source setDiagnosticImageOrigin:kFxImageOrigin_BOTTOM_LEFT];Pixels bottomGrain=filmRender(originGrain,nil,@"grain-bottom-origin-render");run.record(@"grain-canonical-coordinates-survive-texture-origin",difference(topGrain,bottomGrain).maximum==0,measure(difference(topGrain,bottomGrain)));[source setDiagnosticImageOrigin:kFxImageOrigin_TOP_LEFT];uploadFilm(input);
|
||||
CMTime duration=CMTimeMake(1001,30000),origin=CMTimeMake(17,3);BOOL rational=YES;
|
||||
for(int i=-12;i<=12;i++){CMTime t=CMTimeAdd(origin,CMTimeMultiply(duration,i));rational&=DYFilmFrameIndex(t,duration,origin)==i;for(int hold=1;hold<=5;hold++)rational&=DYFilmFrameKey(i,hold,0)==(uint32_t)(int64_t)floor(double(i)/hold);}
|
||||
rational&=DYFilmFrameIndex(CMTimeMake(-1,1000000),duration,kCMTimeZero)==-1;
|
||||
run.record(@"grain-exact-ntsc-signed-frame-and-hold",rational);
|
||||
NSMutableDictionary *doc=DYMutablePlist(empty.document);NSMutableDictionary *mixer=(id)DYInsertTool(doc,@"mixer",@"base:mixer");mixer[@"values"][@"mixer01"]=@.3;
|
||||
NSMutableDictionary *film=(id)DYInsertTool(doc,@"film",mixer[@"id"]);film[@"values"][@"filmSubtractive"]=@1;film[@"values"][@"filmGammaCyan"]=@1.5;
|
||||
run.record(@"film-mixer-adjacent-schema-two-valid",DYValidToolDocument(doc)&&[[DYToolDisplayOrder(doc) objectAtIndex:13]isEqual:mixer[@"id"]]&&[[DYToolDisplayOrder(doc)objectAtIndex:14]isEqual:film[@"id"]]);
|
||||
Pixels layered=filmRender(neutral,doc,@"film-mixer-adjacent-render");run.record(@"film-mixer-adjacent-layers-affect-frame",difference(before,layered).different>50);
|
||||
NSMutableDictionary *mask=DYMutablePlist(DYNewMask(DYMaskRectangle));DYMaskParameters p=DYMaskAtTime(mask,kCMTimeZero);p.strength=0;mask[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];[mixer[@"masks"]addObject:mask];[film[@"masks"]addObject:DYMutablePlist(DYNewMask(DYMaskEllipse))];
|
||||
DYToolDocument *saved=[[[DYToolDocument alloc]init]autorelease];saved.document=doc;NSData *archive=[NSKeyedArchiver archivedDataWithRootObject:saved requiringSecureCoding:YES error:&error];DYToolDocument *restored=[NSKeyedUnarchiver unarchivedObjectOfClass:DYToolDocument.class fromData:archive error:&error];run.record(@"film-mixer-mask-archive-exact-roundtrip",[saved isEqual:restored]);
|
||||
NSMutableDictionary *baseMask=DYMutablePlist(empty.document);baseMask[@"baseMasks"][@"film"]=@[mask];DYUniforms masked=neutral;masked.film.enabled=1;masked.film.grainEnabled=1;masked.film.grainAmount=.5;Pixels zeroMask=filmRender(masked,baseMask,@"film-zero-mask-render");run.record(@"film-zero-mask-exact-source",difference(before,zeroMask).maximum==0);
|
||||
NSURL *cube=[NSURL fileURLWithPath:[runtime stringByAppendingPathComponent:@"film-mixer.cube"]];error=nil;
|
||||
BOOL rejected=![renderer exportLUT:cube uniforms:masked paths:@{} spider:nil tools:empty.document error:&error];run.record(@"grain-rejected-by-static-cube",rejected&&error!=nil);
|
||||
masked.film.grainEnabled=0;masked.film.subtractiveEnabled=1;masked.film.gammaAll=1.1;error=nil;run.record(@"pure-subtractive-cube-supported",[renderer exportLUT:cube uniforms:masked paths:@{} spider:nil tools:empty.document error:&error],@{@"error":reason(error)});
|
||||
masked=matrix;masked.mixerMix=1;error=nil;run.record(@"channel-mixer-cube-supported",[renderer exportLUT:cube uniforms:masked paths:@{} spider:nil tools:empty.document error:&error],@{@"error":reason(error)});
|
||||
uploadFilm(input);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// Included after DYGrade.metal's sRGB boundary helpers.
|
||||
#include "DYFilmMath.h"
|
||||
struct DYFilmPass {int operation;float radius;uint frameKey;uint reserved;};
|
||||
kernel void dyFilmPoint(texture2d<float,access::read> source [[texture(0)]],texture2d<float,access::read> auxiliary [[texture(1)]],texture2d<float,access::write> output [[texture(2)]],constant DYUniforms& uniforms [[buffer(0)]],constant DYFilmPass& pass [[buffer(1)]],uint2 pos [[thread_position_in_grid]]){
|
||||
if(pos.x>=output.get_width()||pos.y>=output.get_height())return;
|
||||
float4 pixel=source.read(pos);if(!(pixel.a>0)){output.write(pixel,pos);return;}
|
||||
float3 c=pixel.rgb/pixel.a,result=c;DYFilmSettings film=uniforms.film;
|
||||
if(pass.operation==0)result=dyDecode(dyFilmMixer(dyEncode(c),uniforms));
|
||||
else if(pass.operation==1)result=dyDecode(dyFilmSubtractive(dyEncode(c),film));
|
||||
else if(pass.operation==2){float3 b=auxiliary.read(pos).rgb;float3 w=float3(film.boost,film.dyeTransmission/500.f,0);result=(c+b*w)/(1+w);}
|
||||
else if(pass.operation==3)result=c+auxiliary.read(pos).rgb;
|
||||
else if(pass.operation==4)result=dyDecode(dyFilmGrain(dyEncode(c),auxiliary.read(pos).rgb,film));
|
||||
else if(pass.operation==5){float4 filtered=auxiliary.read(pos);result=filtered.rgb/pixel.a;}
|
||||
float amount=pass.operation==0?uniforms.mixerMix:1;
|
||||
pixel.rgb=dyLimit((c*(1-amount)+result*amount)*pixel.a);output.write(pixel,pos);
|
||||
}
|
||||
kernel void dyFilmNoise(texture2d<float,access::write> output [[texture(0)]],constant uint& seed [[buffer(0)]],constant uint& bottomOrigin [[buffer(1)]],uint2 pos [[thread_position_in_grid]]){
|
||||
if(pos.x>=output.get_width()||pos.y>=output.get_height())return;uint y=bottomOrigin?output.get_height()-1-pos.y:pos.y;output.write(float4(dyFilmNormal(pos.x,y,seed),1),pos);
|
||||
}
|
||||
// Separable form of the reference's sparse 5x5 prefilter: same 25 weighted
|
||||
// samples, followed by its 3x3 vector Sobel norm. Only two 5-tap passes.
|
||||
kernel void dyFilmSparseBlur(texture2d<float,access::sample> source [[texture(0)]],texture2d<float,access::write> output [[texture(1)]],constant int& vertical [[buffer(0)]],uint2 pos [[thread_position_in_grid]]){
|
||||
if(pos.x>=output.get_width()||pos.y>=output.get_height())return;constexpr sampler f(coord::pixel,address::clamp_to_edge,filter::linear);
|
||||
float3 value=0;float total=0;float radius=2.5f;
|
||||
for(int i=-2;i<=2;i++){float weight=exp(-float(i*i)/(2*radius*radius));float2 delta=vertical?float2(0,i*radius):float2(i*radius,0);value+=source.sample(f,float2(pos)+.5f+delta).rgb*weight;total+=weight;}
|
||||
output.write(float4(value/total,1),pos);
|
||||
}
|
||||
inline float3 dyFilmBorderPrefilter(texture2d<float,access::sample> source,float2 coordinate){
|
||||
constexpr sampler f(coord::pixel,address::clamp_to_edge,filter::linear);float3 value=0;float sum=0;
|
||||
for(int x=-2;x<=2;x++)for(int y=-2;y<=2;y++){float weight=exp(-float(x*x+y*y)/12.5f);value+=source.sample(f,coordinate+float2(x,y)*2.5f).rgb*weight;sum+=weight;}return value/sum;
|
||||
}
|
||||
kernel void dyFilmBloomEdges(texture2d<float,access::sample> blurred [[texture(0)]],texture2d<float,access::sample> original [[texture(1)]],texture2d<float,access::write> output [[texture(2)]],constant DYFilmSettings& film [[buffer(0)]],uint2 pos [[thread_position_in_grid]]){
|
||||
if(pos.x>=output.get_width()||pos.y>=output.get_height())return;constexpr sampler f(coord::pixel,address::clamp_to_edge,filter::linear);
|
||||
float3 gx=0,gy=0;
|
||||
bool border=pos.x==0||pos.y==0||pos.x+1==output.get_width()||pos.y+1==output.get_height();
|
||||
for(int x=-1;x<=1;x++)for(int y=-1;y<=1;y++){float2 coordinate=float2(pos)+.5f+float2(x,y);float3 c=border?dyFilmBorderPrefilter(original,coordinate):blurred.sample(f,coordinate).rgb;gx+=c*float(y)*(x==0?2.f:1.f);gy+=c*float(x)*(y==0?2.f:1.f);}
|
||||
float magnitude=sqrt(dot(gx,gx)+dot(gy,gy)),a=original.read(pos).a;
|
||||
float strength=magnitude>=film.sensitivity/100.f?film.intensity/100.f:0;
|
||||
output.write(float4(float3(strength*a),a),pos);
|
||||
}
|
||||
kernel void dyFilmMix(texture2d<float,access::read> before [[texture(0)]],texture2d<float,access::read> after [[texture(1)]],texture2d<float,access::write> output [[texture(2)]],constant float& amount [[buffer(0)]],uint2 pos [[thread_position_in_grid]]){
|
||||
if(pos.x>=output.get_width()||pos.y>=output.get_height())return;float4 a=before.read(pos),b=after.read(pos);output.write(float4(dyLimit(mix(a.rgb,b.rgb,amount)),a.a),pos);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
#pragma once
|
||||
#include "DYUniforms.h"
|
||||
#include "SpiderCore/DYColorMath.h"
|
||||
// Re-expressed mathematical contracts from the local reference's AIR.
|
||||
// Research identities, operating domains and deviations: ColorFinaleFilmMixer.md.
|
||||
inline float dyFilmMax(float3 c){return c.x>c.y?(c.x>c.z?c.x:c.z):(c.y>c.z?c.y:c.z);}
|
||||
inline float dyFilmMin(float3 c){return c.x<c.y?(c.x<c.z?c.x:c.z):(c.y<c.z?c.y:c.z);}
|
||||
inline float dyFilmLuma(float3 c){return c.x*.2126f+c.y*.7152f+c.z*.0722f;}
|
||||
inline float dyFilmSat(float3 c){float m=dyFilmMax(c);return m!=0?(m-dyFilmMin(c))/m:0;}
|
||||
inline float3 dyFilmPositive(float3 c){for(int i=0;i<3;i++)if(c[i]<0)c[i]=0;return c;}
|
||||
inline bool DYChannelMixerActive(DYUniforms u){return u.mixerSectionEnabled>.5f&&u.mixerMix>0&&(u.mixerRed.x!=1||u.mixerRed.y!=0||u.mixerRed.z!=0||u.mixerGreen.x!=0||u.mixerGreen.y!=1||u.mixerGreen.z!=0||u.mixerBlue.x!=0||u.mixerBlue.y!=0||u.mixerBlue.z!=1);}
|
||||
inline float3 dyFilmMixer(float3 c,DYUniforms u){
|
||||
float3 r={c.x*u.mixerRed.x+c.y*u.mixerRed.y+c.z*u.mixerRed.z,c.x*u.mixerGreen.x+c.y*u.mixerGreen.y+c.z*u.mixerGreen.z,c.x*u.mixerBlue.x+c.y*u.mixerBlue.y+c.z*u.mixerBlue.z};
|
||||
if(u.mixerPreserveLuma>.5f){r=dyFilmPositive(r);float ratio=dyFilmLuma(c)/dyFilmLuma(r);if(!isfinite(ratio))ratio=1;r*=ratio;}
|
||||
if(u.mixerPreserveSaturation>.5f){float3 p=dyFilmPositive(r);float source=dyFilmSat(c),ratio=source/dyFilmSat(p);if(isfinite(ratio)){float y=dyFilmLuma(p);r=source==0?float3{y,y,y}:float3{y,y,y}*(1-ratio)+p*ratio;}}
|
||||
return r;
|
||||
}
|
||||
inline float dyFilmNorm(float3 c,int mode){
|
||||
if(mode==2)return dyFilmMax(c);
|
||||
if(mode==1)return (c.x+c.y+c.z)/3;
|
||||
if(mode==6){float3 e={exp(c.x*3),exp(c.y*3),exp(c.z*3)};return (e.x*c.x+e.y*c.y+e.z*c.z)/(e.x+e.y+e.z);}
|
||||
return dyFilmMax(c);
|
||||
}
|
||||
inline float3 dyFilmSubtractive(float3 input,DYFilmSettings p){
|
||||
float3 c=input;for(int i=0;i<3;i++)c[i]=dyClamp(c[i],0,1);
|
||||
float n=dyFilmNorm(c,int(p.densityMode));if(n<=0)return float3{0,0,0};
|
||||
float v=dyFilmNorm(c,int(p.valueMode));float weight=n*(1-p.density)+v*p.density;
|
||||
float gamma[3]={p.gammaAll*p.gammaCyan,p.gammaAll*p.gammaMagenta,p.gammaAll*p.gammaYellow};
|
||||
// Both UI density choices (mean/max), and softmax value, normalize white to 1.
|
||||
for(int i=0;i<3;i++)c[i]=dyClamp(weight*pow(c[i]/n,gamma[i]),0,1);
|
||||
return c;
|
||||
}
|
||||
inline DYUInt dyFilmPCG(DYUInt value){DYUInt state=value*747796405u+2891336453u;DYUInt word=((state>>((state>>28u)+4u))^state)*277803737u;return (word>>22u)^word;}
|
||||
inline float3 dyFilmNormal(DYUInt x,DYUInt y,DYUInt seed){
|
||||
DYUInt h=dyFilmPCG(dyFilmPCG(dyFilmPCG(x)^y)^seed);
|
||||
float u1=(float(dyFilmPCG(h^2769414579u)>>8)+.5f)/16777216.f;
|
||||
float u2=(float(dyFilmPCG(h^1675113877u)>>8)+.5f)/16777216.f;
|
||||
float u3=(float(dyFilmPCG(h^2135587861u)>>8)+.5f)/16777216.f;
|
||||
float u4=(float(dyFilmPCG(h^476689394u)>>8)+.5f)/16777216.f;
|
||||
float a=sqrt(-2*log(u1>1e-7f?u1:1e-7f)),b=sqrt(-2*log(u3>1e-7f?u3:1e-7f));
|
||||
return {a*cos(6.28318530718f*u2),a*sin(6.28318530718f*u2),b*cos(6.28318530718f*u4)};
|
||||
}
|
||||
inline float3 dyFilmGrain(float3 c,float3 noise,DYFilmSettings p){
|
||||
float corr=1-2*p.grainColor,other=1-corr,den=sqrt(corr*corr+other*other);
|
||||
float3 n={(corr*noise.y+other*noise.x)/den,noise.y,(corr*noise.y+other*noise.z)/den};
|
||||
float amount=.05f*p.grainAmount*((p.grainSize-1)*.5f+1),offset=p.grainResponse>=0?1-p.grainResponse:1;
|
||||
for(int i=0;i<3;i++){float response=p.grainResponse*c[i]+offset;if(response<0)response=0;c[i]+=n[i]*response*amount;}
|
||||
return c;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// All work uses the renderer instance's lock and frozen state. No vendor code
|
||||
// or vendor runtime is loaded by the product.
|
||||
- (BOOL)renderFilmTool:(NSString*)type source:(FxImageTile*)source destination:(FxImageTile*)destination uniforms:(DYUniforms)u masks:(NSArray*)masks entry:(NSMutableDictionary*)entry error:(NSError**)error {
|
||||
BOOL mixer=[type isEqual:@"mixer"],active=mixer?DYChannelMixerActive(u):DYFilmActive(u.film);
|
||||
if(!active)return [self copyTile:source to:destination entry:entry error:error];
|
||||
id<MTLDevice>d=entry[@"device"];id<MTLTexture>before=[source metalTextureForDevice:d];
|
||||
if(!before)return fail(error,@"胶片输入纹理不可用");
|
||||
// At most two working, two auxiliary half-float textures and two float32
|
||||
// bloom prefilters. Allocate lazily; reuse between all five stages.
|
||||
uint64_t bytes=uint64_t(before.width)*before.height*(mixer?16:DYFilmBloomActive(u.film)?64:32);
|
||||
uint64_t budget=MIN(uint64_t(2)*1024*1024*1024,MAX(uint64_t(512)*1024*1024,d.recommendedMaxWorkingSetSize/3));
|
||||
if(bytes>budget)return fail(error,@"当前画面超过胶片处理内存预算,请降低工程分辨率后重试。");
|
||||
NSMutableArray *textures=[NSMutableArray array];id<MTLTexture>slots[6]={nil,nil,nil,nil,nil,nil};
|
||||
auto texture=[&](int slot)->id<MTLTexture>{if(!slots[slot]){MTLTextureDescriptor *desc=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:slot>=4?MTLPixelFormatRGBA32Float:MTLPixelFormatRGBA16Float width:before.width height:before.height mipmapped:NO];desc.storageMode=MTLStorageModePrivate;desc.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite|MTLTextureUsageRenderTarget;id<MTLTexture>t=[d newTextureWithDescriptor:desc];if(t){[textures addObject:t];slots[slot]=t;[t release];}}return slots[slot];};
|
||||
CIContext *context=entry[@"filmCIContext"];if(!context){context=[CIContext contextWithMTLDevice:d options:@{kCIContextWorkingColorSpace:NSNull.null,kCIContextOutputColorSpace:NSNull.null,kCIContextCacheIntermediates:@NO}];if(!context)return fail(error,@"胶片空间处理器不可用");entry[@"filmCIContext"]=context;}
|
||||
CGRect bounds=CGRectMake(0,0,before.width,before.height);id<MTLCommandBuffer>commands=[entry[@"queue"]commandBuffer];
|
||||
auto image=[&](id<MTLTexture>t){return [CIImage imageWithMTLTexture:t options:@{kCIImageColorSpace:NSNull.null}];};
|
||||
auto blur=[&](id<MTLTexture>input,id<MTLTexture>output,float radius,BOOL clamp){
|
||||
CIImage *ci=image(input);if(!ci)return NO;if(clamp)ci=[ci imageByClampingToExtent];
|
||||
ci=[[ci imageByApplyingFilter:@"CIGaussianBlur" withInputParameters:@{kCIInputRadiusKey:@(radius)}]imageByCroppingToRect:bounds];
|
||||
[context render:ci toMTLTexture:output commandBuffer:commands bounds:bounds colorSpace:nil];return YES;
|
||||
};
|
||||
auto encode=[&](NSString *name,id<MTLTexture>a,id<MTLTexture>b,id<MTLTexture>out,const void *data,NSUInteger length){
|
||||
id<MTLComputeCommandEncoder>ce=[commands computeCommandEncoder];[ce setComputePipelineState:entry[name]];[ce setTexture:a atIndex:0];if(b)[ce setTexture:b atIndex:1];[ce setTexture:out atIndex:b?2:1];if(data)[ce setBytes:data length:length atIndex:0];[ce dispatchThreads:MTLSizeMake(out.width,out.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[ce endEncoding];
|
||||
};
|
||||
id<MTLTexture>current=before;
|
||||
auto point=[&](int operation,id<MTLTexture>aux){id<MTLTexture>out=texture(current==slots[0]?1:0);if(!out)return NO;struct {int operation;float radius;unsigned frameKey,reserved;}pass={operation,0,u.filmFrameKey,0};id<MTLComputeCommandEncoder>ce=[commands computeCommandEncoder];[ce setComputePipelineState:entry[@"dyFilmPoint"]];[ce setTexture:current atIndex:0];[ce setTexture:aux?:current atIndex:1];[ce setTexture:out atIndex:2];[ce setBytes:&u length:sizeof(u) atIndex:0];[ce setBytes:&pass length:sizeof(pass) atIndex:1];[ce dispatchThreads:MTLSizeMake(out.width,out.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[ce endEncoding];current=out;return YES;};
|
||||
@try{
|
||||
if(mixer){if(!point(0,nil))return fail(error,@"无法分配通道混合缓冲区");}
|
||||
else {
|
||||
if(DYFilmSubActive(u.film)&&!point(1,nil))return fail(error,@"无法分配减色缓冲区");
|
||||
if(DYFilmHaloActive(u.film)){id<MTLTexture>aux=texture(2);if(!aux||!blur(current,aux,u.film.scatter,YES)||!point(2,aux))return fail(error,@"晕光空间处理失败");}
|
||||
if(DYFilmBloomActive(u.film)){
|
||||
id<MTLTexture>a=texture(4),b=texture(5),edges=texture(2),spread=texture(3);if(!a||!b||!edges||!spread)return fail(error,@"无法分配辉光缓冲区");
|
||||
int direction=0;encode(@"dyFilmSparseBlur",current,nil,a,&direction,sizeof(direction));direction=1;encode(@"dyFilmSparseBlur",a,nil,b,&direction,sizeof(direction));
|
||||
encode(@"dyFilmBloomEdges",b,current,edges,&u.film,sizeof(u.film));if(!blur(edges,spread,u.film.diffusion,NO)||!point(3,spread))return fail(error,@"辉光空间处理失败");
|
||||
}
|
||||
if(DYFilmGrainActive(u.film)){
|
||||
id<MTLTexture>noise=texture(2);if(!noise)return fail(error,@"无法分配颗粒缓冲区");
|
||||
id<MTLComputeCommandEncoder>ce=[commands computeCommandEncoder];[ce setComputePipelineState:entry[@"dyFilmNoise"]];[ce setTexture:noise atIndex:0];[ce setBytes:&u.filmFrameKey length:4 atIndex:0];unsigned bottom=source.imageOrigin==kFxImageOrigin_BOTTOM_LEFT;[ce setBytes:&bottom length:4 atIndex:1];[ce dispatchThreads:MTLSizeMake(noise.width,noise.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[ce endEncoding];
|
||||
if(u.film.grainSize>1){id<MTLTexture>smooth=texture(3);if(!smooth)return fail(error,@"无法分配颗粒扩散缓冲区");
|
||||
// Reference radius=2. Recover the same sigma search without frame state.
|
||||
double sigma=1,step=1;for(int iteration=0;iteration<20000;iteration++){double density=exp(-4/(sigma*sigma))/(sigma*sigma*6.283185307179586);if(.02/5<density){if(step<=.02)break;sigma-=step;step*=.1;}sigma+=step;if(sigma>1000){sigma=1;break;}}
|
||||
MPSImageGaussianBlur *gaussian=[[[MPSImageGaussianBlur alloc]initWithDevice:d sigma:float(sigma*u.film.grainSize/5)]autorelease];gaussian.edgeMode=MPSImageEdgeModeClamp;[gaussian encodeToCommandBuffer:commands sourceTexture:noise destinationTexture:smooth];noise=smooth;
|
||||
}
|
||||
if(!point(4,noise))return fail(error,@"颗粒处理失败");
|
||||
}
|
||||
if(DYFilmVignetteActive(u.film)){
|
||||
id<MTLTexture>aux=texture(2);if(!aux)return fail(error,@"无法分配暗角缓冲区");CIImage *ci=image(current);if(!ci)return fail(error,@"暗角输入不可用");
|
||||
ci=[ci imageByApplyingFilter:@"CIVignetteEffect" withInputParameters:@{kCIInputCenterKey:[CIVector vectorWithX:before.width*.5 Y:before.height*.5],kCIInputIntensityKey:@(u.film.vignetteIntensity),kCIInputRadiusKey:@(u.film.vignetteRadius/100.f*MAX(before.width,before.height)),@"inputFalloff":@(u.film.vignetteFalloff)}];[context render:ci toMTLTexture:aux commandBuffer:commands bounds:bounds colorSpace:nil];if(!point(5,aux))return fail(error,@"暗角处理失败");
|
||||
}
|
||||
if(u.film.mix<1){id<MTLTexture>out=texture(current==slots[0]?1:0);if(!out)return fail(error,@"无法分配胶片混合缓冲区");encode(@"dyFilmMix",before,current,out,&u.film.mix,4);current=out;}
|
||||
}
|
||||
// Finish the effect before the module's existing mask blend. Source and
|
||||
// result retain identical alpha, and an empty mask group means full coverage.
|
||||
if(masks.count){id<MTLTexture>out=texture(current==slots[0]?1:0);if(!out)return fail(error,@"无法分配胶片蒙版缓冲区");DYToolMaskHeader header{};header.section=(int)[DYToolTypes()indexOfObject:type];id<MTLBuffer>buffer=[self maskBuffer:@{type:masks} tile:source device:d header:&header];[self encodeBlend:before after:current output:out masks:buffer header:header entry:entry commands:commands];current=out;}
|
||||
[commands commit];[commands waitUntilCompleted];if(commands.status!=MTLCommandBufferStatusCompleted)return fail(error,commands.error.localizedDescription);
|
||||
DYExportTile *result=[[[DYExportTile alloc]initWithTexture:current registry:d.registryID]autorelease];[result setBounds:source.tilePixelBounds origin:source.imageOrigin];[result setPixelAspect:source.pixelAspect];return [self copyTile:result to:destination entry:entry error:error];
|
||||
}@catch(NSException *exception){return fail(error,[@"胶片处理失败:" stringByAppendingString:exception.reason?:@""]);}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#import <CoreMedia/CoreMedia.h>
|
||||
#include <stdint.h>
|
||||
// Exact signed rational floor. Freeze once in pluginState, never from wall time.
|
||||
inline int64_t DYFilmFrameIndex(CMTime time,CMTime duration,CMTime origin){
|
||||
if(!CMTIME_IS_NUMERIC(time))return 0;
|
||||
if(!CMTIME_IS_NUMERIC(duration)||duration.value<=0)duration=CMTimeMake(1,30);
|
||||
if(CMTIME_IS_NUMERIC(origin)&&origin.epoch==time.epoch)time=CMTimeSubtract(time,origin);
|
||||
__int128 n=(__int128)time.value*duration.timescale,d=(__int128)time.timescale*duration.value;
|
||||
if(d<=0)return 0;__int128 q=n/d;if(n<0&&n%d)q--;
|
||||
if(q>INT64_MAX)return INT64_MAX;if(q<INT64_MIN)return INT64_MIN;return (int64_t)q;
|
||||
}
|
||||
inline uint32_t DYFilmFrameKey(int64_t frame,float hold,float seed){
|
||||
int64_t divisor=(int64_t)llroundf(hold);if(divisor<1)divisor=1;if(divisor>5)divisor=5;
|
||||
int64_t value=frame/divisor;if(frame<0&&frame%divisor)value--;
|
||||
return (uint32_t)value+(uint32_t)llroundf(seed);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
// Host float parameters, appended after the complete 1.4.3 uniform prefix.
|
||||
typedef struct DYFilmSettings {
|
||||
float enabled,mix;
|
||||
float subtractiveEnabled,gammaAll,gammaCyan,gammaMagenta,gammaYellow,density,densityMode,valueMode;
|
||||
float halationEnabled,scatter,dyeTransmission,boost;
|
||||
float bloomEnabled,sensitivity,diffusion,intensity;
|
||||
float grainEnabled,grainAmount,grainSize,grainResponse,grainColor,grainHold,grainSeed;
|
||||
float vignetteEnabled,vignetteIntensity,vignetteRadius,vignetteFalloff;
|
||||
} DYFilmSettings;
|
||||
|
||||
inline bool DYFilmSubActive(DYFilmSettings p){return p.subtractiveEnabled>.5f&&(p.gammaAll!=1||p.gammaCyan!=1||p.gammaMagenta!=1||p.gammaYellow!=1||p.density!=0);}
|
||||
inline bool DYFilmHaloActive(DYFilmSettings p){return p.halationEnabled>.5f&&p.scatter>0&&(p.boost>0||p.dyeTransmission>0);}
|
||||
inline bool DYFilmBloomActive(DYFilmSettings p){return p.bloomEnabled>.5f&&p.intensity>0;}
|
||||
inline bool DYFilmGrainActive(DYFilmSettings p){return p.grainEnabled>.5f&&p.grainAmount>0&&p.grainSize>0;}
|
||||
inline bool DYFilmVignetteActive(DYFilmSettings p){return p.vignetteEnabled>.5f&&p.vignetteIntensity!=0;}
|
||||
inline bool DYFilmSpatialActive(DYFilmSettings p){return DYFilmHaloActive(p)||DYFilmBloomActive(p)||DYFilmGrainActive(p)||DYFilmVignetteActive(p);}
|
||||
inline bool DYFilmActive(DYFilmSettings p){return p.enabled>.5f&&p.mix>0&&(DYFilmSubActive(p)||DYFilmSpatialActive(p));}
|
||||
@@ -323,3 +323,5 @@ kernel void dyToolSkin(texture2d<float,access::read> before [[texture(0)]],textu
|
||||
}
|
||||
|
||||
fragment half4 dyToolCopyFragment(DYRaster in [[stage_in]],texture2d<half> source [[texture(0)]]){constexpr sampler f(coord::normalized,address::clamp_to_edge,filter::linear);return source.sample(f,in.uv);}
|
||||
|
||||
#include "DYFilmKernels.inc.h"
|
||||
@@ -204,7 +204,7 @@ static NSArray *DYPresentationSections(void) {
|
||||
for(NSString *key in @[@"temperature",@"tint",@"exposure",@"contrast",@"highlights",@"shadows",@"whites",@"blacks",@"texture",@"clarity",@"dehaze",@"vibrance",@"saturation",@"skinEnabled",@"copyAutoGrade"]){NSDictionary*d=byKey[key];if(d)[rows addObject:d];}
|
||||
base[@"rows"]=rows;base[@"extraEnabled"]=bySection[@"color"][@"enabled"];
|
||||
base[@"title"]=@"基础调整";
|
||||
return @[primary,bySection[@"spider"],base,bySection[@"skin"],bySection[@"look"],bySection[@"hsl"],bySection[@"curve"],bySection[@"grading"],bySection[@"primaries"],bySection[@"levels"],bySection[@"blackwhite"],bySection[@"balance"]];
|
||||
return @[primary,bySection[@"spider"],base,bySection[@"skin"],bySection[@"look"],bySection[@"hsl"],bySection[@"curve"],bySection[@"grading"],bySection[@"primaries"],bySection[@"levels"],bySection[@"blackwhite"],bySection[@"balance"],bySection[@"mixer"],bySection[@"film"]];
|
||||
}
|
||||
|
||||
|
||||
@@ -579,6 +579,9 @@ static NSImage *DYWheelImage(void) {
|
||||
if([key isEqual:@"levels"]||[key isEqual:@"balance"]) {
|
||||
NSSegmentedControl *tabs=[NSSegmentedControl segmentedControlWithLabels:[key isEqual:@"levels"]?@[@"RGB",@"红",@"绿",@"蓝"]:@[@"阴影",@"中间调",@"高光"] trackingMode:NSSegmentSwitchTrackingSelectOne target:self action:@selector(tabChanged:)];tabs.identifier=key;tabs.selectedSegment=0;tabs.controlSize=NSControlSizeSmall;tabs.accessibilityLabel=[section[@"title"] stringByAppendingString:@"通道"];[card addSubview:tabs];[body addObject:tabs];
|
||||
}
|
||||
if([key isEqual:@"mixer"]||[key isEqual:@"film"]){
|
||||
NSSegmentedControl *tabs=[NSSegmentedControl segmentedControlWithLabels:[key isEqual:@"mixer"]?@[@"红输出",@"绿输出",@"蓝输出"]:@[@"减色",@"晕光",@"辉光",@"颗粒",@"暗角"] trackingMode:NSSegmentSwitchTrackingSelectOne target:self action:@selector(tabChanged:)];tabs.identifier=key;tabs.selectedSegment=0;tabs.controlSize=NSControlSizeSmall;tabs.accessibilityLabel=[section[@"title"]stringByAppendingString:@"分组"];[card addSubview:tabs];[body addObject:tabs];
|
||||
}
|
||||
if([key isEqual:@"curve"]) {
|
||||
DYCurvePanel *graph=[[[DYCurvePanel alloc]initWithFrame:NSZeroRect]autorelease];graph.delegate=self;graph.identifier=@"curveGraph";[card addSubview:graph];[body addObject:graph];[_graphics addObject:graph];
|
||||
}
|
||||
@@ -677,6 +680,7 @@ static NSImage *DYWheelImage(void) {
|
||||
if([section isEqual:@"grading"]){int wheel=0,axis=0;if(sscanf(key.UTF8String,"grade%d_%d",&wheel,&axis)==2)return axis==2;}
|
||||
if([section isEqual:@"levels"]){int channel=0,axis=0;if(sscanf(key.UTF8String,"level%d_%d",&channel,&axis)==2)return channel==tab;}
|
||||
if([section isEqual:@"balance"]){int channel=0,axis=0;if(sscanf(key.UTF8String,"balance%d_%d",&channel,&axis)==2)return channel==tab;}
|
||||
if([section isEqual:@"mixer"]||[section isEqual:@"film"]){for(NSDictionary *d in DYToolSection(section)[@"rows"])if([d[@"key"]isEqual:key]){NSNumber *group=d[[section isEqual:@"mixer"]?@"mixerTab":@"filmTab"];return !group||group.intValue<0||group.intValue==tab;}}
|
||||
if([section isEqual:@"look"]){int slot=0;if(sscanf(key.UTF8String,"asset:look%d",&slot)==1)return slot<_visibleLooks;if([key isEqual:@"postLUTStrength"])return YES;int number=0;if(sscanf(key.UTF8String,"look%dStrength",&number)==1)return number-1<_visibleLooks;return NO;}
|
||||
return YES;
|
||||
}
|
||||
@@ -1065,7 +1069,7 @@ static NSImage *DYWheelImage(void) {
|
||||
DYUniforms effective;DYReadUniforms(_manager,t,&effective);values[@"cmConfigured"]=@(effective.cm.configured);values[@"blackWhiteMix"]=@(effective.cm.blackWhiteMix);
|
||||
DYAssetState *state=DYReadAssets(_manager,t);paths=[[state.paths copy]autorelease]?:@{};spider=DYSpiderJSON(state.spiderMesh,state.spiderLinked);NSData *toolData=[NSPropertyListSerialization dataWithPropertyList:DYReadTools(_manager,t).document format:NSPropertyListBinaryFormat_v1_0 options:0 error:nil];tools=[toolData base64EncodedStringWithOptions:0];
|
||||
} @finally {[action endAction:self];}
|
||||
return @{@"format":@"com.dayu.color.preset",@"version":@4,@"values":values,@"paths":paths,@"spider":spider,@"tools":tools?:@""};
|
||||
return @{@"format":@"com.dayu.color.preset",@"version":@5,@"values":values,@"paths":paths,@"spider":spider,@"tools":tools?:@""};
|
||||
}
|
||||
- (void)savePreset:(id)sender {
|
||||
NSDictionary *snapshot=[self presetSnapshot];if(!snapshot)return;
|
||||
@@ -1080,7 +1084,7 @@ static NSImage *DYWheelImage(void) {
|
||||
NSError *error=nil;NSData *data=[NSData dataWithContentsOfURL:panel.URL options:0 error:&error];
|
||||
if(!data||data.length>32*1024*1024){[self showError:error.localizedDescription?:@"预设文件过大"];return;}
|
||||
id json=[NSJSONSerialization JSONObjectWithData:data options:0 error:&error];
|
||||
if(![json isKindOfClass:NSDictionary.class]||![json[@"format"] isEqual:@"com.dayu.color.preset"]||![@[@1,@2,@3,@4]containsObject:json[@"version"]]||![json[@"values"] isKindOfClass:NSDictionary.class]||![json[@"paths"] isKindOfClass:NSDictionary.class]){[self showError:@"这不是有效的大鱼调色预设。"];return;}
|
||||
if(![json isKindOfClass:NSDictionary.class]||![json[@"format"] isEqual:@"com.dayu.color.preset"]||![@[@1,@2,@3,@4,@5]containsObject:json[@"version"]]||![json[@"values"] isKindOfClass:NSDictionary.class]||![json[@"paths"] isKindOfClass:NSDictionary.class]){[self showError:@"这不是有效的大鱼调色预设。"];return;}
|
||||
NSDictionary *values=json[@"values"],*paths=json[@"paths"];NSData *mesh=[json[@"version"]integerValue]>=3?DYSpiderFromJSON(json[@"spider"]):nil;if([json[@"version"]integerValue]>=3&&!mesh){[self showError:@"预设包含无效蜘蛛盘,当前调色未修改。"];return;}
|
||||
NSDictionary *tools=[[[DYToolDocument alloc]init]autorelease].document;if([json[@"version"]integerValue]>=4){id encoded=json[@"tools"];NSData *binary=[encoded isKindOfClass:NSString.class]?[[[NSData alloc]initWithBase64EncodedString:encoded options:0]autorelease]:nil;tools=binary?[NSPropertyListSerialization propertyListWithData:binary options:NSPropertyListImmutable format:NULL error:nil]:nil;if(!DYValidToolDocument(tools)){[self showError:@"预设包含无效工具或蒙版,当前调色未修改。"];return;}}
|
||||
for(NSDictionary *d in DYDescriptors()) {
|
||||
@@ -1099,7 +1103,7 @@ static NSImage *DYWheelImage(void) {
|
||||
[action startAction:self];
|
||||
@try {
|
||||
CMTime t=action.currentTime;id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];
|
||||
for(NSDictionary *d in DYDescriptors())if(values[d[@"key"]])[set setFloatValue:[values[d[@"key"]] doubleValue] toParameter:[d[@"pid"] unsignedIntValue] atTime:t];
|
||||
for(NSDictionary *d in DYDescriptors()){id value=values[d[@"key"]];if(!value&&[d[@"offset"]integerValue]>=1104)value=d[@"default"];if(value)[set setFloatValue:[value doubleValue] toParameter:[d[@"pid"]unsignedIntValue] atTime:t];}
|
||||
if([json[@"version"]isEqual:@1]&&!values[@"cmConfigured"]){[set setFloatValue:-1 toParameter:2236 atTime:t];[set setFloatValue:1 toParameter:2270 atTime:t];}
|
||||
DYAssetState *assets=[[[DYAssetState alloc] init] autorelease];assets.paths=validPaths;assets.spiderMesh=mesh;assets.spiderLinked=mesh?[json[@"spider"][@"linked"]boolValue]:YES;DYWriteAssets(_manager,assets,t);DYWriteTools(_manager,tools,t);
|
||||
} @finally {[action endAction:self];}
|
||||
|
||||
@@ -155,6 +155,34 @@ static void initialize(){static dispatch_once_t once;dispatch_once(&once,^{
|
||||
NSMutableArray*levels=[NSMutableArray array];for(int c=0;c<4;c++)for(int a=0;a<5;a++)[levels addObject:scalar([NSString stringWithFormat:@"level%d_%d",c,a],[NSString stringWithFormat:@"%@ %@",@[@"RGB",@"红",@"绿",@"蓝"][c],@[@"输入黑",@"伽马",@"输入白",@"输出黑",@"输出白"][a]],624+a*16+c*4,a==1?.1:0,a==1?10:255,a==1?1:(a==2||a==4)?255:0)];section(@"levels",@"色阶",608,levels);
|
||||
NSMutableArray*bw=[NSMutableArray array];for(int c=0;c<6;c++)[bw addObject:scalar([NSString stringWithFormat:@"bw%d",c],[NSString stringWithFormat:@"黑白 %@",@[@"红",@"黄",@"绿",@"青",@"蓝",@"洋红"][c]],c<4?720+c*4:736+(c-4)*4,0,200,((double[]){40,60,40,60,20,80})[c])];[bw addObject:scalar(@"bwHue",@"着色色相",744,0,360)];[bw addObject:scalar(@"bwSat",@"着色饱和度",748,0,100)];[bw insertObject:scalar(@"blackWhiteMix",@"黑白混合",offsetof(DYUniforms,cm)+offsetof(DYCMSettings,blackWhiteMix),0,1,0) atIndex:0];section(@"blackwhite",@"黑白混色",704,bw,1);
|
||||
NSMutableArray*balance=[NSMutableArray arrayWithObject:row(@"preserveLuma",@"保持明度",756,0,1,1,@"bool")];for(int c=0;c<3;c++)for(int a=0;a<3;a++)[balance addObject:scalar([NSString stringWithFormat:@"balance%d_%d",c,a],[NSString stringWithFormat:@"%@ %@",@[@"阴影",@"中间调",@"高光"][c],@[@"青 ↔ 红",@"洋红 ↔ 绿",@"黄 ↔ 蓝"][a]],768+c*16+a*4)];section(@"balance",@"色彩平衡",752,balance);
|
||||
NSMutableArray *mixer=[NSMutableArray array];
|
||||
for(int output=0;output<3;output++)for(int input=0;input<3;input++){
|
||||
NSMutableDictionary *d=[[scalar([NSString stringWithFormat:@"mixer%d%d",output,input],[NSString stringWithFormat:@"%@输出 ← %@输入",@[@"红",@"绿",@"蓝"][output],@[@"红",@"绿",@"蓝"][input]],offsetof(DYUniforms,mixerRed)+output*16+input*4,-2,2,output==input?1:0)mutableCopy]autorelease];
|
||||
d[@"mixerTab"]=@(output);[descriptors replaceObjectAtIndex:descriptors.count-1 withObject:d];[mixer addObject:d];
|
||||
}
|
||||
[mixer addObject:row(@"mixerPreserveLuma",@"保持亮度",offsetof(DYUniforms,mixerPreserveLuma),0,1,0,@"bool")];
|
||||
[mixer addObject:row(@"mixerPreserveSaturation",@"保持饱和度",offsetof(DYUniforms,mixerPreserveSaturation),0,1,0,@"bool")];
|
||||
[mixer addObject:scalar(@"mixerMix",@"通道混合强度",offsetof(DYUniforms,mixerMix),0,1,1)];
|
||||
section(@"mixer",@"通道混合器",offsetof(DYUniforms,mixerSectionEnabled),mixer);
|
||||
NSMutableArray *film=[NSMutableArray array];
|
||||
auto filmRow=[&](NSString *key,NSString *title,NSUInteger offset,double lo,double hi,double value,int tab,NSString *kind=@"float"){
|
||||
NSMutableDictionary *d=[[row(key,title,offsetof(DYUniforms,film)+offset,lo,hi,value,kind)mutableCopy]autorelease];d[@"filmTab"]=@(tab);[descriptors replaceObjectAtIndex:descriptors.count-1 withObject:d];[film addObject:d];return d;
|
||||
};
|
||||
#define FR(f,key,title,lo,hi,value,tab) filmRow(key,title,offsetof(DYFilmSettings,f),lo,hi,value,tab)
|
||||
#define FE(f,key,title,tab) filmRow(key,title,offsetof(DYFilmSettings,f),0,1,0,tab,@"bool")
|
||||
FR(mix,@"filmMix",@"胶片混合强度",0,1,1,-1);
|
||||
FE(subtractiveEnabled,@"filmSubtractive",@"启用减色",0);
|
||||
FR(gammaAll,@"filmGammaAll",@"整体减色",.25,4,1,0);FR(gammaCyan,@"filmGammaCyan",@"青色减色",.25,4,1,0);FR(gammaMagenta,@"filmGammaMagenta",@"洋红减色",.25,4,1,0);FR(gammaYellow,@"filmGammaYellow",@"黄色减色",.25,4,1,0);FR(density,@"filmDensity",@"密度",-1,1,0,0);
|
||||
NSMutableDictionary *density=FR(densityMode,@"filmDensityMode",@"密度模式",1,2,2,0);density[@"kind"]=@"popup";density[@"values"]=@[@2,@1];density[@"options"]=@[@"模式 1 · 最大值",@"模式 2 · 平均值"];
|
||||
row(@"filmValueMode",@"胶片亮度模型",offsetof(DYUniforms,film)+offsetof(DYFilmSettings,valueMode),1,6,6,@"float");
|
||||
FE(halationEnabled,@"filmHalation",@"启用晕光",1);FR(scatter,@"filmScatter",@"散射半径",0,100,5,1);FR(dyeTransmission,@"filmTransmission",@"染料透射",0,100,0,1);FR(boost,@"filmBoost",@"晕光增强",0,5,1,1);
|
||||
FE(bloomEnabled,@"filmBloom",@"启用辉光",2);FR(sensitivity,@"filmSensitivity",@"辉光灵敏度",0,100,50,2);FR(diffusion,@"filmDiffusion",@"辉光扩散",0,100,30,2);FR(intensity,@"filmIntensity",@"辉光强度",0,100,50,2);
|
||||
FE(grainEnabled,@"filmGrain",@"启用颗粒",3);FR(grainAmount,@"filmGrainAmount",@"颗粒数量",0,1,0,3);FR(grainSize,@"filmGrainSize",@"颗粒大小",1,20,1,3);FR(grainResponse,@"filmGrainResponse",@"胶片响应",-1,1,0,3);FR(grainColor,@"filmGrainColor",@"颜色变化",0,1,0,3);
|
||||
NSMutableDictionary *hold=FR(grainHold,@"filmGrainHold",@"颗粒帧保持",1,5,1,3);hold[@"kind"]=@"popup";hold[@"options"]=@[@"每帧更新",@"保持 2 帧",@"保持 3 帧",@"保持 4 帧",@"保持 5 帧"];hold[@"values"]=@[@1,@2,@3,@4,@5];FR(grainSeed,@"filmGrainSeed",@"颗粒种子",0,65535,0,3);
|
||||
FE(vignetteEnabled,@"filmVignette",@"启用暗角",4);FR(vignetteIntensity,@"filmVignetteIntensity",@"暗角强度",-2,2,1,4);FR(vignetteRadius,@"filmVignetteRadius",@"暗角半径",0,100,50,4);FR(vignetteFalloff,@"filmVignetteFalloff",@"暗角过渡",0,1,.5,4);
|
||||
section(@"film",@"胶片模拟",offsetof(DYUniforms,film)+offsetof(DYFilmSettings,enabled),film);
|
||||
#undef FR
|
||||
#undef FE
|
||||
});}
|
||||
NSArray<NSDictionary*> *DYSections(void){initialize();return sections;} NSArray<NSDictionary*> *DYDescriptors(void){initialize();return descriptors;}
|
||||
void DYDefaultUniforms(DYUniforms*u){memset(u,0,sizeof(*u));for(NSDictionary*r in DYDescriptors())if([r[@"offset"]integerValue]>=0)*(float*)((uint8_t*)u+[r[@"offset"]unsignedIntegerValue])=[r[@"default"]floatValue];u->primariesM0=(DYFloat3){1,0,0};u->primariesM1=(DYFloat3){0,1,0};u->primariesM2=(DYFloat3){0,0,1};}
|
||||
|
||||
+3
-2
@@ -5,6 +5,7 @@
|
||||
#import "DYColorTables.h"
|
||||
#import "DYAutoGrade.h"
|
||||
#import "DYToolState.h"
|
||||
#include "DYFilmTime.h"
|
||||
#import <CoreImage/CoreImage.h>
|
||||
#import <os/log.h>
|
||||
#include "MaskCore/DYTracker.hpp"
|
||||
@@ -19,13 +20,13 @@
|
||||
#include "DYToolHostMethods.inc.h"
|
||||
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager{if((self=[super init])){_apiManager=manager;_renderer=[DYRenderer new];[self initializeToolHost];NSNotificationCenter*n=NSNotificationCenter.defaultCenter;[n addObserver:self selector:@selector(exportRequested:) name:@"DYExportLUT" object:manager];[n addObserver:self selector:@selector(autoRequested:) name:@"DYAutoGrade" object:manager];[n addObserver:self selector:@selector(autoRequested:) name:@"DYAutoWhiteBalance" object:manager];[n addObserver:self selector:@selector(whiteBalanceRequested:) name:@"DYWhiteBalanceColor" object:manager];}return self;}
|
||||
- (void)dealloc{[self tearDownToolHost];[NSNotificationCenter.defaultCenter removeObserver:self];[_renderer release];[super dealloc];}
|
||||
- (BOOL)properties:(NSDictionary**)p error:(NSError**)e{*p=@{kFxPropertyKey_MayRemapTime:@NO,kFxPropertyKey_PixelTransformSupport:@(kFxPixelTransform_ScaleTranslate),kFxPropertyKey_VariesWhenParamsAreStatic:@NO,kFxPropertyKey_DesiredProcessingColorInfo:@(kFxImageColorInfo_RGB_LINEAR),kFxPropertyKey_NeedsFullBuffer:@YES};return YES;}
|
||||
- (BOOL)properties:(NSDictionary**)p error:(NSError**)e{*p=@{kFxPropertyKey_MayRemapTime:@NO,kFxPropertyKey_PixelTransformSupport:@(kFxPixelTransform_ScaleTranslate),kFxPropertyKey_VariesWhenParamsAreStatic:@YES,kFxPropertyKey_DesiredProcessingColorInfo:@(kFxImageColorInfo_RGB_LINEAR),kFxPropertyKey_NeedsFullBuffer:@YES};return YES;}
|
||||
- (BOOL)addParametersWithError:(NSError**)e{return DYCreateParameters(_apiManager,e);}
|
||||
- (NSSet<Class>*)classesForCustomParameterID:(UInt32)pid{return pid==DYToolsParameterID?[NSSet setWithObjects:DYToolDocument.class,NSDictionary.class,NSArray.class,NSString.class,NSNumber.class,NSData.class,nil]:pid==DYAssetsParameterID?[NSSet setWithObjects:DYAssetState.class,NSDictionary.class,NSString.class,NSData.class,nil]:[NSSet setWithObjects:DYInspectorToken.class,NSDictionary.class,NSString.class,NSNumber.class,nil];}
|
||||
- (NSView*)createViewForParameterID:(UInt32)pid{[self scheduleToolCanvasRegistration];return pid==DYInspectorParameterID?[[DYInspector alloc]initWithAPIManager:_apiManager renderer:_renderer]:[[NSView alloc]initWithFrame:NSZeroRect];}
|
||||
- (BOOL)parameterChanged:(UInt32)pid atTime:(CMTime)t error:(NSError**)e{if(pid==DYToolsParameterID)[self adoptToolCanvasDocument:DYReadTools(_apiManager,t).document];if(pid==DYToolsParameterID||pid==2013||pid==2014||(pid>=2236&&pid<2400)||pid==DYAssetsParameterID)[_renderer invalidatePreview];dispatch_async(dispatch_get_main_queue(),^{[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:self.apiManager];});return YES;}
|
||||
- (BOOL)pluginState:(NSData**)state atTime:(CMTime)t quality:(FxQuality)q error:(NSError**)e{
|
||||
DYUniforms u;DYReadUniforms(_apiManager,t,&u);DYAssetState*a=DYReadAssets(_apiManager,t);DYToolDocument *tools=DYReadTools(_apiManager,t);[self adoptToolCanvasDocument:tools.document];double copyAuto=0;[[_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)]getFloatValue:©Auto fromParameter:8800 atTime:t];NSDictionary*s=@{@"schema":@2,@"tools":DYToolRenderSnapshot(tools.document,t),@"copyAuto":@(copyAuto>.5),@"uniforms":[NSData dataWithBytes:&u length:sizeof(u)],@"paths":a.paths?:@{},@"spider":a.spiderMesh?:[NSData data]};*state=[NSPropertyListSerialization dataWithPropertyList:s format:NSPropertyListBinaryFormat_v1_0 options:0 error:e];return *state!=nil;
|
||||
DYUniforms u;DYReadUniforms(_apiManager,t,&u);CMTime frameDuration=kCMTimeInvalid,origin=kCMTimeZero;id<FxTimingAPI_v4>timing=[_apiManager apiForProtocol:@protocol(FxTimingAPI_v4)];if([timing respondsToSelector:@selector(frameDuration:)])[timing frameDuration:&frameDuration];if([timing respondsToSelector:@selector(startTimeForEffect:)])[timing startTimeForEffect:&origin];int64_t frame=DYFilmFrameIndex(t,frameDuration,origin);u.filmFrameKey=DYFilmFrameKey(frame,u.film.grainHold,u.film.grainSeed);DYAssetState*a=DYReadAssets(_apiManager,t);DYToolDocument *tools=DYReadTools(_apiManager,t);[self adoptToolCanvasDocument:tools.document];double copyAuto=0;[[_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)]getFloatValue:©Auto fromParameter:8800 atTime:t];NSMutableDictionary *snapshot=DYMutablePlist(DYToolRenderSnapshot(tools.document,t));for(NSMutableDictionary *node in snapshot[@"layers"]){DYUniforms layer=DYToolUniforms(node);if([node[@"type"]isEqual:@"film"])node[@"filmFrameKey"]=@(DYFilmFrameKey(frame,layer.film.grainHold,layer.film.grainSeed));}NSDictionary*s=@{@"schema":@2,@"tools":snapshot,@"copyAuto":@(copyAuto>.5),@"uniforms":[NSData dataWithBytes:&u length:sizeof(u)],@"paths":a.paths?:@{},@"spider":a.spiderMesh?:[NSData data]};*state=[NSPropertyListSerialization dataWithPropertyList:s format:NSPropertyListBinaryFormat_v1_0 options:0 error:e];return *state!=nil;
|
||||
}
|
||||
- (BOOL)destinationImageRect:(FxRect*)rect sourceImages:(NSArray<FxImageTile*>*)src destinationImage:(FxImageTile*)dst pluginState:(NSData*)s atTime:(CMTime)t error:(NSError**)e{if(!src.count)return NO;*rect=src[0].imagePixelBounds;return YES;}
|
||||
- (BOOL)sourceTileRect:(FxRect*)rect sourceImageIndex:(NSUInteger)i sourceImages:(NSArray<FxImageTile*>*)src destinationTileRect:(FxRect)dstRect destinationImage:(FxImageTile*)dst pluginState:(NSData*)s atTime:(CMTime)t error:(NSError**)e{if(i>=src.count)return NO;*rect=src[i].imagePixelBounds;return YES;}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
#import "DYModel.h"
|
||||
#include "DYSpiderState.h"
|
||||
#include "DYToolGPU.h"
|
||||
#include "DYFilmMath.h"
|
||||
#import <CoreImage/CoreImage.h>
|
||||
#import <MetalPerformanceShaders/MetalPerformanceShaders.h>
|
||||
#import "DYColorTables.h"
|
||||
#import "DYLUTLibrary.h"
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
@@ -65,6 +68,7 @@ static void bypassIdleSkin(DYUniforms *u){
|
||||
}
|
||||
@end
|
||||
@implementation DYRenderer
|
||||
#include "DYFilmRender.inc.h"
|
||||
#include "DYToolRender.inc.h"
|
||||
- (instancetype)init{if((self=[super init])){_previewLock=[NSObject new];_devices=[NSMutableDictionary new];_luts=[NSMutableDictionary new];_preparedLUTs=[NSMutableDictionary new];_activeLUTPaths=[NSSet new];_lutPreparationQueue=dispatch_queue_create("com.dayu.color.lut-upload",DISPATCH_QUEUE_SERIAL);dispatch_set_target_queue(_lutPreparationQueue,dispatch_get_global_queue(QOS_CLASS_USER_INITIATED,0));_tables=[DYColorTables new];}return self;}
|
||||
- (void)dealloc{[_devices release];[_luts release];[_preparedLUTs release];[_activeLUTPaths release];dispatch_release(_lutPreparationQueue);[_tables release];[_preview release];[_lookLUTPreview release];[_previewLock release];[super dealloc];}
|
||||
@@ -99,7 +103,7 @@ static void bypassIdleSkin(DYUniforms *u){
|
||||
NSURL*url=[[NSBundle bundleForClass:self.class]URLForResource:@"default" withExtension:@"metallib"];
|
||||
id<MTLLibrary>lib=[d newLibraryWithURL:url error:err];if(!lib){[d release];return nil;}
|
||||
id<MTLCommandQueue>q=[d newCommandQueue];entry=[NSMutableDictionary dictionaryWithDictionary:@{@"device":d,@"library":lib,@"queue":q,@"pipelines":[NSMutableDictionary dictionary]}];
|
||||
for(NSString*fn in @[@"dyUnpremultiply",@"dyWhitesSceneStatistics",@"dyLUTExportKernel",@"dyInputAnalysis",@"dyColorManagement",@"dyToolBlend",@"dyToolSkin"]){id<MTLFunction>f=[lib newFunctionWithName:fn];if(!f){fail(err,[fn stringByAppendingString:@" 缺失"]);[lib release];[q release];[d release];return nil;}id<MTLComputePipelineState>p=[d newComputePipelineStateWithFunction:f error:err];[f release];if(!p){[lib release];[q release];[d release];return nil;}entry[fn]=p;[p release];}
|
||||
for(NSString*fn in @[@"dyUnpremultiply",@"dyWhitesSceneStatistics",@"dyLUTExportKernel",@"dyInputAnalysis",@"dyColorManagement",@"dyToolBlend",@"dyToolSkin",@"dyFilmPoint",@"dyFilmNoise",@"dyFilmSparseBlur",@"dyFilmBloomEdges",@"dyFilmMix"]){id<MTLFunction>f=[lib newFunctionWithName:fn];if(!f){fail(err,[fn stringByAppendingString:@" 缺失"]);[lib release];[q release];[d release];return nil;}id<MTLComputePipelineState>p=[d newComputePipelineStateWithFunction:f error:err];[f release];if(!p){[lib release];[q release];[d release];return nil;}entry[fn]=p;[p release];}
|
||||
float identity[32];for(int z=0;z<2;z++)for(int y=0;y<2;y++)for(int x=0;x<2;x++){int i=((z*2+y)*2+x)*4;identity[i]=x;identity[i+1]=y;identity[i+2]=z;identity[i+3]=1;}id<MTLTexture>neutral=texture3D(d,identity,2);if(!neutral){fail(err,@"无法分配中性 LUT");return nil;}entry[@"identity"]=neutral;
|
||||
// Preparing before the first frame may use registry 0. Reuse those pipelines
|
||||
// when the host subsequently supplies that device's actual registry ID.
|
||||
@@ -129,7 +133,7 @@ static void bypassIdleSkin(DYUniforms *u){
|
||||
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;
|
||||
}
|
||||
- (BOOL)renderSource:(FxImageTile*)src destination:(FxImageTile*)dst uniforms:(DYUniforms)u paths:(NSDictionary*)paths error:(NSError**)err{return [self renderSource:src destination:dst uniforms:u paths:paths spider:nil error:err];}
|
||||
- (BOOL)renderSource:(FxImageTile*)src destination:(FxImageTile*)dst uniforms:(DYUniforms)u paths:(NSDictionary*)paths spider:(NSData *)spider error:(NSError**)err{return [self renderLegacy:src destination:dst uniforms:u paths:paths spider:spider masks:@{} error:err];}
|
||||
- (BOOL)renderSource:(FxImageTile*)src destination:(FxImageTile*)dst uniforms:(DYUniforms)u paths:(NSDictionary*)paths spider:(NSData *)spider error:(NSError**)err{return [self renderSource:src destination:dst uniforms:u paths:paths spider:spider tools:nil error:err];}
|
||||
- (BOOL)renderLegacy:(FxImageTile*)src destination:(FxImageTile*)dst uniforms:(DYUniforms)u paths:(NSDictionary*)paths spider:(NSData *)spider masks:(NSDictionary*)masks error:(NSError**)err{return [self renderLegacy:src destination:dst uniforms:u paths:paths spider:spider masks:masks stageFirst:-1 stageLast:-1 skinReference:nil originalReference:nil captureOriginal:nullptr suppressBlackWhite:NO error:err];}
|
||||
- (BOOL)renderLegacy:(FxImageTile*)src destination:(FxImageTile*)dst uniforms:(DYUniforms)u paths:(NSDictionary*)paths spider:(NSData *)spider masks:(NSDictionary*)masks stageFirst:(NSInteger)stageFirst stageLast:(NSInteger)stageLast skinReference:(FxImageTile*)skinReference originalReference:(FxImageTile*)originalReference captureOriginal:(DYExportTile**)captureOriginal suppressBlackWhite:(BOOL)suppressBlackWhite error:(NSError**)err{@synchronized(self){@autoreleasepool{
|
||||
BOOL segmented=stageFirst>=0;if(segmented&&(stageFirst>stageLast||stageLast>11))return fail(err,@"原生工具分段范围无效");
|
||||
@@ -190,6 +194,7 @@ static void bypassIdleSkin(DYUniforms *u){
|
||||
}}}
|
||||
- (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)u paths:(NSDictionary*)paths error:(NSError**)err{return [self exportLUT:url uniforms:u paths:paths spider:nil error:err];}
|
||||
- (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)u paths:(NSDictionary*)paths spider:(NSData*)spider error:(NSError**)err{@synchronized(self){
|
||||
if(DYFilmActive(u.film)&&DYFilmSpatialActive(u.film))return fail(err,@"胶片空间和颗粒处理不能保存到静态 Cube,请保存完整预设。");
|
||||
NSMutableDictionary *e=[self device:0 error:err];if(!e)return NO;id<MTLDevice>d=e[@"device"];const NSUInteger n=33,count=n*n*n,width=n*n,height=n;
|
||||
MTLTextureDescriptor *desc=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA16Float width:width height:height mipmapped:NO];desc.storageMode=MTLStorageModeShared;desc.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite|MTLTextureUsageRenderTarget;
|
||||
id<MTLTexture>input=[d newTextureWithDescriptor:desc],output=[d newTextureWithDescriptor:desc];if(!input||!output){[input release];[output release];return fail(err,@"无法分配 LUT 色格");}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
BOOL found=NO;float low=1,high=1;for(NSDictionary *mask in node[@"masks"]){if(![mask[@"enabled"]boolValue])continue;DYMaskParameters p=DYMaskAtTime(mask,kCMTimeInvalid);float a=0,b=p.strength==0?0:1;NSInteger combine=[mask[@"combine"]integerValue];if(!found){low=combine==1?1-b:a;high=combine==1?1-a:b;found=YES;}else if(combine==1){low*=1-b;high*=1-a;}else if(combine==2){low*=a;high*=b;}else{low=1-(1-low)*(1-a);high=1-(1-high)*(1-b);}}
|
||||
if(found&&high==0)return [self copyTile:source to:destination entry:entry error:error];
|
||||
DYUniforms layer=DYToolUniforms(node);NSString *type=node[@"type"];
|
||||
if([type isEqual:@"mixer"]||[type isEqual:@"film"]){layer.filmFrameKey=[node[@"filmFrameKey"]unsignedIntValue];return [self renderFilmTool:type source:source destination:destination uniforms:layer masks:node[@"masks"] entry:entry error:error];}
|
||||
if(![type isEqual:@"skin"])return [self renderLegacy:source destination:destination uniforms:layer paths:node[@"paths"] spider:node[@"spider"] masks:@{type:node[@"masks"]} error:error];
|
||||
id<MTLDevice>d=entry[@"device"];id<MTLTexture>before=[source metalTextureForDevice:d],input=[original metalTextureForDevice:d],after=[destination metalTextureForDevice:d];
|
||||
id<MTLCommandBuffer>cb=[entry[@"queue"]commandBuffer];id<MTLComputeCommandEncoder>ce=[cb computeCommandEncoder];[ce setComputePipelineState:entry[@"dyToolSkin"]];[ce setTexture:before atIndex:0];[ce setTexture:input atIndex:1];[ce setTexture:after atIndex:2];[ce setBytes:&layer length:sizeof(layer) atIndex:0];[ce dispatchThreads:MTLSizeMake(after.width,after.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[ce endEncoding];[cb commit];[cb waitUntilCompleted];if(cb.status!=MTLCommandBufferStatusCompleted)return fail(error,cb.error.localizedDescription);
|
||||
@@ -40,10 +41,10 @@
|
||||
DYExportTile *blended=[[DYExportTile alloc]initWithTexture:blend registry:d.registryID];[blended setBounds:source.tilePixelBounds origin:source.imageOrigin];[blended setPixelAspect:source.pixelAspect];[blend release];if(ok)ok=[self copyTile:blended to:destination entry:entry error:error];else fail(error,cb.error.localizedDescription);[blended release];return ok;
|
||||
}
|
||||
- (BOOL)renderSource:(FxImageTile*)src destination:(FxImageTile*)dst uniforms:(DYUniforms)u paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools error:(NSError**)error {@synchronized(self){@autoreleasepool{
|
||||
if(!tools)return [self renderLegacy:src destination:dst uniforms:u paths:paths spider:spider masks:@{} error:error];if(!DYValidToolDocument(tools))return fail(error,@"工具或蒙版数据损坏,未更改原工程");
|
||||
if(!tools)tools=@{@"schema":@1,@"layers":@[],@"baseMasks":@{}};if(!DYValidToolDocument(tools))return fail(error,@"工具或蒙版数据损坏,未更改原工程");
|
||||
NSArray *layers=tools[@"layers"];BOOL active=NO,anchored=NO;for(NSDictionary *node in layers)if(!DYToolIsNeutral(node)){active=YES;anchored|=![DYToolRootAnchor(tools,node[@"id"])isEqual:@"tail"];}
|
||||
// No active extra tool keeps the exact historical fused path, including HDR.
|
||||
if(!active)return [self renderLegacy:src destination:dst uniforms:u paths:paths spider:spider masks:tools[@"baseMasks"] error:error];
|
||||
if(!active&&!DYChannelMixerActive(u)&&!DYFilmActive(u.film))return [self renderLegacy:src destination:dst uniforms:u paths:paths spider:spider masks:tools[@"baseMasks"] error:error];
|
||||
NSMutableDictionary *entry=[self device:dst.deviceRegistryID error:error];if(!entry)return NO;id<MTLDevice>d=entry[@"device"];id<MTLTexture>input=[src metalTextureForDevice:d];if(!input)return fail(error,@"宿主图像纹理不可用");
|
||||
MTLTextureDescriptor *desc=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA16Float width:input.width height:input.height mipmapped:NO];desc.storageMode=MTLStorageModePrivate;desc.usage=MTLTextureUsageRenderTarget|MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite;
|
||||
DYExportTile *tile=nil,*skinReference=nil,*originalReference=nil;NSArray *order=DYToolDisplayOrder(tools);NSMutableDictionary *groups=[NSMutableDictionary dictionary];for(NSString *ID in order){NSDictionary *node=DYToolWithID(tools,ID);if(!node||DYToolIsNeutral(node))continue;NSString *root=DYToolRootAnchor(tools,ID);if(!groups[root])groups[root]=[NSMutableArray array];[groups[root]addObject:node];}
|
||||
@@ -88,12 +89,15 @@
|
||||
if(u.spiderSectionEnabled>.5&&u.spiderMix>0&&spider.length){DYUniforms sp=DYToolUniforms(@{@"type":@"spider"});sp.spiderSectionEnabled=u.spiderSectionEnabled;sp.spiderMix=u.spiderMix;DYExportTile *next=makeTile();if(!next)return fail(error,@"无法分配蜘蛛盘缓冲区");BOOL ok=[self renderLegacy:tile destination:next uniforms:sp paths:@{} spider:spider masks:@{@"spider":tools[@"baseMasks"][@"spider"]?:@[]} error:error];if(!ok){[next release];return NO;}replace(next);}
|
||||
if(!apply(@"base:spider"))return NO;
|
||||
}
|
||||
// New end-of-chain base tools do not move any historical color stages.
|
||||
for(NSString *type in @[@"mixer",@"film"]){BOOL enabled=[type isEqual:@"mixer"]?DYChannelMixerActive(u):DYFilmActive(u.film);if(enabled){DYExportTile *next=makeTile();if(!next)return fail(error,@"无法分配胶片工具缓冲区");BOOL ok=[self renderFilmTool:type source:tile destination:next uniforms:u masks:tools[@"baseMasks"][type]?:@[] entry:entry error:error];if(!ok){[next release];return NO;}replace(next);}if(!apply([@"base:" stringByAppendingString:type]))return NO;}
|
||||
// Schema 1 extra layers (and children inserted after those layers) retain
|
||||
// their old end-of-chain order. Saving does not silently migrate old looks.
|
||||
if(!apply(@"tail"))return NO;return [self copyTile:tile to:dst entry:entry error:error];
|
||||
}@finally{[originalReference release];[skinReference release];[tile release];}
|
||||
}}}
|
||||
- (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)u paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools error:(NSError**)error {@synchronized(self){
|
||||
if(DYFilmActive(u.film)&&DYFilmSpatialActive(u.film))return fail(error,@"当前胶片含晕光、辉光、颗粒或暗角,无法完整保存到静态 Cube。请保存完整预设,或关闭这些处理后再导出。");for(NSDictionary *node in tools[@"layers"]){DYUniforms layer=DYToolUniforms(node);if([node[@"type"]isEqual:@"film"]&&DYFilmActive(layer.film)&&DYFilmSpatialActive(layer.film))return fail(error,@"新增胶片层含空间或时间处理,无法完整保存到静态 Cube。请保存完整预设。");}
|
||||
for(NSArray *masks in [tools[@"baseMasks"]allValues])if(masks.count)return fail(error,@"当前调色含空间蒙版或跟踪,Cube 无法保存这些信息。请先保存完整预设,或移除蒙版后导出。");for(NSDictionary *node in tools[@"layers"])if([node[@"masks"]count])return fail(error,@"新增工具含蒙版,无法完整导出为 Cube。请保存完整预设。");
|
||||
_toolDocument=tools;BOOL ok=NO;@try{ok=[self exportLUT:url uniforms:u paths:paths spider:spider error:error];}@finally{_toolDocument=nil;}return ok;
|
||||
}}
|
||||
@@ -1,9 +1,10 @@
|
||||
#import "DYToolState.h"
|
||||
#include "DYSpiderState.h"
|
||||
#include "DYFilmMath.h"
|
||||
#include <set>
|
||||
#import <objc/runtime.h>
|
||||
|
||||
NSArray *DYToolTypes(void){return @[@"primary",@"spider",@"base",@"skin",@"look",@"hsl",@"curve",@"grading",@"primaries",@"levels",@"blackwhite",@"balance"];}
|
||||
NSArray *DYToolTypes(void){return @[@"primary",@"spider",@"base",@"skin",@"look",@"hsl",@"curve",@"grading",@"primaries",@"levels",@"blackwhite",@"balance",@"mixer",@"film"];}
|
||||
NSDictionary *DYToolSection(NSString *type){for(NSDictionary *s in DYSections())if([s[@"key"]isEqual:type])return s;return nil;}
|
||||
NSMutableDictionary *DYMutablePlist(NSDictionary *value){if(!value)return [NSMutableDictionary dictionary];NSData *data=[NSPropertyListSerialization dataWithPropertyList:value format:NSPropertyListBinaryFormat_v1_0 options:0 error:nil];return [NSPropertyListSerialization propertyListWithData:data options:NSPropertyListMutableContainersAndLeaves format:NULL error:nil];}
|
||||
static NSDictionary *DYEmptyTools(){return @{@"schema":@1,@"layers":@[],@"baseMasks":@{}};}
|
||||
@@ -71,7 +72,7 @@ DYUniforms DYToolUniforms(NSDictionary *node){DYUniforms u;DYDefaultUniforms(&u)
|
||||
NSArray *parts=[type isEqual:@"primary"]?@[@"input",@"primary",@"output"]:[type isEqual:@"base"]?@[@"base",@"color"]:@[type];for(NSString *part in parts){NSDictionary *s=DYToolSection(part);for(NSDictionary *d in DYDescriptors())if([d[@"pid"]isEqual:s[@"enabled"]])*(float*)((uint8_t*)&u+[d[@"offset"]unsignedIntegerValue])=1;}
|
||||
if([type isEqual:@"primary"]){u.primarySectionEnabled=1;u.cm.configured=1;u.cm.inputTransfer=u.cm.outputTransfer;u.cm.inputGamut=u.cm.outputGamut;}
|
||||
for(NSDictionary *d in DYDescriptors()){NSNumber *v=node[@"values"][d[@"key"]];if(v&&[d[@"offset"]integerValue]>=0)*(float*)((uint8_t*)&u+[d[@"offset"]unsignedIntegerValue])=v.floatValue;}return u;}
|
||||
BOOL DYToolIsNeutral(NSDictionary *node){NSString *type=node[@"type"];DYUniforms u=DYToolUniforms(node);NSDictionary *section=DYToolSection(type);BOOL enabled=YES;if([type isEqual:@"primary"])enabled=u.primarySectionEnabled>.5;else if([type isEqual:@"base"])enabled=u.baseSectionEnabled>.5||u.colorSectionEnabled>.5;else for(NSDictionary *d in DYDescriptors())if([d[@"pid"]isEqual:section[@"enabled"]])enabled=*(float*)((uint8_t*)&u+[d[@"offset"]unsignedIntegerValue])>.5;if(!enabled)return YES;if([type isEqual:@"skin"])return u.skinProtection.y==0;if([node[@"type"]isEqual:@"spider"]&&[node[@"spider"]length]){auto mesh=DYSpiderMesh(node[@"spider"]);for(float v:dy::meshSamples(mesh))if(v!=0)return NO;}if([node[@"paths"]count])return NO;for(NSDictionary *d in DYDescriptors()){NSNumber *v=node[@"values"][d[@"key"]];if(v&&v.floatValue!=[d[@"default"]floatValue])return NO;}return YES;}
|
||||
BOOL DYToolIsNeutral(NSDictionary *node){NSString *type=node[@"type"];DYUniforms u=DYToolUniforms(node);NSDictionary *section=DYToolSection(type);BOOL enabled=YES;if([type isEqual:@"primary"])enabled=u.primarySectionEnabled>.5;else if([type isEqual:@"base"])enabled=u.baseSectionEnabled>.5||u.colorSectionEnabled>.5;else for(NSDictionary *d in DYDescriptors())if([d[@"pid"]isEqual:section[@"enabled"]])enabled=*(float*)((uint8_t*)&u+[d[@"offset"]unsignedIntegerValue])>.5;if(!enabled)return YES;if([type isEqual:@"mixer"])return !DYChannelMixerActive(u);if([type isEqual:@"film"])return !DYFilmActive(u.film);if([type isEqual:@"skin"])return u.skinProtection.y==0;if([node[@"type"]isEqual:@"spider"]&&[node[@"spider"]length]){auto mesh=DYSpiderMesh(node[@"spider"]);for(float v:dy::meshSamples(mesh))if(v!=0)return NO;}if([node[@"paths"]count])return NO;for(NSDictionary *d in DYDescriptors()){NSNumber *v=node[@"values"][d[@"key"]];if(v&&v.floatValue!=[d[@"default"]floatValue])return NO;}return YES;}
|
||||
|
||||
@implementation DYToolManager {
|
||||
id<PROAPIAccessing> _host;NSString *_nodeID,*_type;NSInteger _depth;CMTime _time;NSMutableDictionary *_pending;DYInspectorToken *_token;
|
||||
|
||||
@@ -17,6 +17,7 @@ typedef uint32_t DYUInt;
|
||||
#endif
|
||||
|
||||
#include "DYColorManagement.h"
|
||||
#include "DYFilmTypes.h"
|
||||
|
||||
typedef struct DYUniforms {
|
||||
float exposure; // offset 0
|
||||
@@ -125,6 +126,11 @@ typedef struct DYUniforms {
|
||||
float primarySectionEnabled;
|
||||
float spiderSectionEnabled;
|
||||
float spiderMix;
|
||||
float legacyPadding;
|
||||
DYFloat4 mixerRed,mixerGreen,mixerBlue;
|
||||
float mixerSectionEnabled,mixerPreserveLuma,mixerPreserveSaturation,mixerMix;
|
||||
DYFilmSettings film;
|
||||
DYUInt filmFrameKey; // frozen render time, never an author parameter
|
||||
} DYUniforms;
|
||||
|
||||
typedef struct DYVertex2D { DYFloat2 position; DYFloat2 textureCoordinate; } DYVertex2D;
|
||||
@@ -141,6 +147,7 @@ typedef struct DYRenderOptions {
|
||||
#define DY_ABI_ASSERT _Static_assert
|
||||
#endif
|
||||
DY_ABI_ASSERT(offsetof(DYUniforms, cm) == 944, "DYUniforms must match recovered GPU ABI");
|
||||
DY_ABI_ASSERT(offsetof(DYUniforms, mixerRed) == 1104, "complete 1.4.3 prefix stays fixed");
|
||||
DY_ABI_ASSERT(offsetof(DYUniforms, exposure) == 0, "exposure offset");
|
||||
DY_ABI_ASSERT(offsetof(DYUniforms, contrast) == 4, "contrast offset");
|
||||
DY_ABI_ASSERT(offsetof(DYUniforms, highlights) == 8, "highlights offset");
|
||||
|
||||
+3
-3
@@ -17,9 +17,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XPC!</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.4.3</string>
|
||||
<string>1.5.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>33</string>
|
||||
<string>34</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
<key>PlugInKit</key>
|
||||
@@ -71,7 +71,7 @@
|
||||
<key>uuid</key>
|
||||
<string>1C17B73B-F229-4C09-A434-EAF6DFF5F22A</string>
|
||||
<key>version</key>
|
||||
<string>1.4.3</string>
|
||||
<string>1.5.0</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>className</key>
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.4.3</string>
|
||||
<string>1.5.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>33</string>
|
||||
<string>34</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
+34
-163
@@ -1,179 +1,50 @@
|
||||
# 大鱼调色:1.4.3(33)蒙版折叠与数量标记交接
|
||||
# 大鱼调色FxPlug4交接:1.5.0胶片与通道混合器
|
||||
|
||||
当前正式版1.4.3(33),APP实际编译源码 `26a888f4534792481c6a9933091cb0b23307cd24`,公证 `e755670d-8fb3-46d2-95c3-1206f014d16d` Accepted。签名、票据、Gatekeeper、唯一正式安装及正式路径293项既有原生检查通过。正式位置和Bundle ID不变。
|
||||
2026-11-02(Asia/Shanghai)。当前正式1.5.0(34),APP已经签名、公证、粘附并安装,FCP12.4宿主验收完成。安装包/Release最终结果读取 `verification/Package.json`、`verification/Release.json`,与APP编译节点分别记录。
|
||||
|
||||
修复模块折叠时蒙版面板仍显示的问题;内容高度和行显示都遵循模块折叠状态。标题蒙版按钮旁新增已添加数量标记,无蒙版时隐藏;原模块和独立层各自计数,停用蒙版仍计入,折叠后保留标记。状态徽标不拦截鼠标,按钮提示和辅助说明同步数量。未改渲染、跟踪算法或数据结构。
|
||||
## 身份与恢复
|
||||
|
||||
FCP12.4验证用户现有蜘蛛盘蒙版的收起/展开,完整77276字节预设与修改前逐字节一致,286个轨迹键保留;独立合成片段验证原HSL2个蒙版(含1个停用)、独立HSL1个,分别折叠/展开,删除2→1→0与撤销0→1→2即时刷新。两层折叠后蒙版面板为0,数量2/1保留。正常退出冷重开,完整8471字节预设前后及重开均逐字节一致。未强制结束宿主。32版为折叠修复候选,33版纳入用户补充的数量标记;32未发布。
|
||||
- 源码:`/Volumes/备份/大鱼调色/大鱼调色`;远程 `https://dayu.media/git/dayu/dayu-color.git`,main。
|
||||
- 正式:`/Library/Plug-Ins/FxPlug/大鱼调色.app`,主ID `com.dayu.color`、XPC `com.dayu.color.XPC`。
|
||||
- APP实际编译源码:`06d531c443b0bb2f179022a4e64148394f5d0690`。
|
||||
- APP公证:`164abf2b-4e67-4504-b72a-04122da9e381` Accepted;团队B3W25FX5H5。
|
||||
- 固定构建缓存:`/Users/mac/Library/Caches/CodexBuilds/com.dayu.color`。
|
||||
- 模板唯一位置:`/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef`。
|
||||
- 无LFS/子模块;程序不依赖Color Finale安装、REA缓存或父“大鱼调色盘”。
|
||||
|
||||
入口:[本轮说明](research/MaskFolding1.4.3.md)、[正式宿主验收](verification/HostMaskFolding1.4.3.json)、[远端源码恢复](verification/MaskFoldingRecovery.json)、[副本清理](verification/MaskFoldingCleanup.json)。远端独立恢复240个文件并比较全部字节、full/strict fsck、原生模型模板和Metal重建通过;着色器摘要沿用上一版且与正式库一致。用户媒体和预设留在本机,无LFS/子模块。PKG和Release最终结果以对应版本验证记录为准。
|
||||
正式PKG `../发行包/大鱼调色-1.5.0.pkg`,14,380,104字节,SHA-256 `3ecabc7a8bfd675b228a5f00016aa17a35b65b544055e57793ec3bff3d7e0294`。PKG公证 `05f849da-5567-4351-9556-742d17b95723` Accepted,20项展开验包通过;本轮未再次运行系统安装器。发行标签 `v1.5.0-film-mixer-20261102`,最终发布及远端恢复结果见本版记录。
|
||||
|
||||
本轮正式安装包 `../发行包/大鱼调色-1.4.3.pkg`,14,340,650字节,SHA-256 `41bba698a70a7629438688a4be74947f424f3af04190090c44f248827b4c3bb2`;PKG公证 `f9218078-8fd0-4a0c-9240-4b1acf7d9655` Accepted,签名/票据/Gatekeeper与20项展开验包通过。APP已有独立正式安装及宿主验收,本轮未再次运行系统安装器。Release标签 `v1.4.3-mask-fold-20261102` 待完整下载校验后发布。
|
||||
## 本轮实现
|
||||
|
||||
## 以下为1.4.2(31)的历史交接
|
||||
通道混合器采用RGB三输出×三输入矩阵,含保持亮度、保持饱和度与混合。胶片含减色、晕光、辉光、颗粒、暗角,五页参数各自启停。两类工具沿用原启停、折叠、蒙版、数量标记、区域跟踪和相邻初始化层;工具类型由12追加到14,原索引不移动。
|
||||
|
||||
# 大鱼调色:1.4.2(31)中间帧与真实素材跟踪修复交接
|
||||
42个宿主参数只追加,旧参数ID、944字节GPU前缀及1104字节完整旧Uniform前缀保留。完整预设v5兼容v1–v4;读旧预设时新参数恢复中性。schema1尾层、schema2锚点、已有9000–9003载荷保留。新工具置于既有显示域/蜘蛛盘之后、历史尾层之前,不能因此推断UI中全部旧工具都按视觉顺序渲染。
|
||||
|
||||
当前正式版1.4.2(31),APP实际编译源码 `123a6c85078e8aa41fe55577b6dab5622ed7d128`。APP公证 `0bb9a94e-c54a-4d87-95ec-51338579c04f` Accepted,签名、票据、Gatekeeper、唯一正式安装及正式路径293项原生检查通过。固定位置 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,Bundle ID和签名团队不变。PKG与Release最终结果见对应版本记录。
|
||||
减色与颗粒用既有sRGB编码边界,晕光/辉光/暗角在线性纹理上。减色是原SubSat归一化幂函数,活跃时限幅0–1。晕光为高斯散射后R/G通道加权归一化;辉光为稀疏预滤→向量Sobel→扩散→相加。颗粒使用PCG/Box-Muller、MPS扩散、精确有理帧和规范化全帧坐标;与原版CI内部切块的空间噪声排列不做全局逐像素等效承诺。暗角复用相同系统CIVignetteEffect。纯矩阵和减色支持Cube,活跃空间/时间效果及蒙版明确拒绝Cube。
|
||||
|
||||
中间起点以宿主分析首帧为准,不再依赖预览缓存。4K细纹先低通再按比例缩到最高1280×720运动分析,调色渲染输出分辨率不变;拟合容差与置信度一致归一化,保留失效与过期写入保护。失跟显示具体原因、保留可信帧数并正常结束宿主任务;首帧反向使用有效种子范围正常结束;单帧经源时间到时间线转换,已有相同轨迹也正常前进。
|
||||
原厂八种印片外观属于另外的ACES输出资源,本版五组处理未纳入这些外观。不能把F-Log输入菜单当作胶片外观,也不能将本工程接入域声称为原版任意ACES链等效。来源、证据ID与边界见[研究记录](research/ColorFinaleFilmMixer.md)。
|
||||
|
||||
FCP12.4正式31版在同一4K60素材的25p时间线中:中间双向285键、首帧正向285键;取消保留159键后任务闲置,可重新跟完整段;切换画面在2秒失跟、保留50键,连续重试无弹窗且任务闲置。带4秒前置片段的连续单帧7:17→7:18→7:19→7:18;首帧反向保持响应。正常退出冷重开完整预设77087字节逐字节一致。原工程、原媒体与原65键设置保留,验收只在独立副本进行。候选27–30发现的生命周期、单帧和边界问题均有记录,未发布候选包。
|
||||
## 验收与用户资料
|
||||
|
||||
新增层相邻插入、加大的蒙版面板、实际鼠标钢笔/中心拖动确认等1.4.1与1.4.0历史保留。仍不是完整Color Finale移植或人物分割,遮挡/变形可能需要手工修正再从当前帧继续。Motion、Intel、变速/裁剪/非方像素工程未实机验收。
|
||||
- 349项原生检查;四种尺寸64×48、63×47、1×17、17×1共184项原版组件对照通过。
|
||||
- FCP12.4正式版加载;用户234个既有参数、资产路径、蜘蛛盘和蒙版载荷逐项/逐字节保持。界面显示286个可信跟踪键,载荷共287键(含作者键)。
|
||||
- 新模块、五页胶片控制、独立混合器初始化、胶片椭圆蒙版、折叠数量1、删除/撤销/重做通过。
|
||||
- 1080p/25fps/4秒ProRes正式导出验证grainHold2:0/1、2/3、4/5帧分别相同,组间不同。
|
||||
- 960×540/25fps/4秒组合导出全部帧解码通过;三个项目FCPXML1.14原生回导严格校验与比较通过。
|
||||
- 正常退出冷重开,组合预设8987字节、颗粒预设8420字节前后均逐字节相同。
|
||||
|
||||
入口:[实现与边界](research/TrackingMidpoint1.4.2.md)、[正式宿主验收](verification/HostTrackingMidpoint1.4.2.json)、[原生及离线聚合](verification/TrackingMidpoint1.4.2.json)、[编译源码远端恢复](verification/TrackingMidpointRecovery.json)、[本轮清理](verification/TrackingMidpointCleanup.json)、[恢复方法](RECOVERY.md)。
|
||||
记录:`verification/HostFilmMixer1.5.0.json`、`FilmMixerNative.json`、`FilmMixerReference.json`、`FilmMixerRecovery.json`。私有完整预设与FCPXML只在本机 `.../com.dayu.color/fcp-qa/`,文件名前缀 `film-mixer-`。不写入Git、PKG或覆盖用户原素材。
|
||||
|
||||
## 源码入口
|
||||
|
||||
本轮正式PKG `../发行包/大鱼调色-1.4.2.pkg`:14,339,640字节,SHA-256 `d137e3516b9c4abc1e6959b83693f5ed09e040cf018b2e29508cc92246fe76f2`;PKG公证 `2de9f8bb-91b5-41dc-924c-1136ae7bf73f` Accepted,签名/票据/Gatekeeper与20项展开验包通过。本轮未再次运行系统安装器,正式APP已有独立安装与宿主验收。Release标签 `v1.4.2-tracking-midpoint-20261102` 已发布,标签提交 `38bf12326e74f2f026bc4c7627729121b6aa261d`;[Release370](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.4.2-tracking-midpoint-20261102) / 附件15在草稿与发布后均完整下载核对14,339,640字节及SHA-256一致,仓库可见性保持原状。发行标签从远端独立恢复237个文件,见 `verification/TrackingMidpointReleaseRecovery.json`,全部字节比较和full/strict fsck通过;核验下载副本与恢复clone已清理。
|
||||
- `DYFilmTypes.h`、`DYFilmMath.h`:状态/中性判断与共享数学。
|
||||
- `DYFilmKernels.inc.h`:原生Metal点处理、PCG、辉光预滤与Sobel;由DYGrade.metal包含,经tools/build_kernels.py构建。
|
||||
- `DYFilmRender.inc.h`:惰性缓冲、CI/MPS空间阶段、内存预算、混合及现有蒙版。
|
||||
- `DYFilmTime.h`、DYPlugIn.mm:冻结宿主帧长/起点,精确签名帧索引和1–5帧保持。
|
||||
- DYModel.mm / DYUniforms.h:只追加描述符、Uniform;DYInspector.mm五页分组和RGB三输出分组。
|
||||
- DYToolState.mm / DYToolRender.inc.h:新类型、独立初始化、相邻锚点、尾层和Cube限制。
|
||||
- tools/verify_film_reference.mm:本机原版只读CI/Metal对照,不参与产品运行。
|
||||
|
||||
## 以下为1.4.1(26)的历史交接
|
||||
按本机全局规则继续交付。`tools/deliver.py`持有产品锁,正式宿主完成后才输入complete;其自检输出现在会先保存诊断再判定,避免失败时丢失输出。首次预检曾在与恢复自检并行时退出1,旧工具未保留当次JSON;未替换旧版。随后串行349项、正式安装349项和独立恢复349项全部通过,不把未知原因写成已证实的程序缺陷。
|
||||
|
||||
# 大鱼调色:1.4.1(26)相邻插入、蒙版面板和钢笔修复交接
|
||||
|
||||
当前正式版为1.4.1(26)。APP编译源码 `0eb56aed126c825ca89712ce90f8cc1c05b03d89` 已推送;公证 `1ddc5499-2da3-4d98-8b2d-09272b0ee326` Accepted,正式位置 `/Library/Plug-Ins/FxPlug/大鱼调色.app`。PKG和Release结果以本版本验证记录为准。
|
||||
|
||||
新添加工具紧接点击处插入,重复点击原层也插在原层与既有子层之间;参数初始化且相互独立。schema2保存after锚点,实际渲染也插入对应阶段;旧schema1末尾工具保持原位置与画面。蒙版参数和数值为13pt、按钮32–36pt、滑杆单独整行,跟踪按钮两列并保留完整中文。
|
||||
|
||||
钢笔入口现可进入空白草稿绘制态,放点/拖柄、首点或Return/面板完成闭合、Delete回退、取消/重画、即时预览、单次撤销及连续手势已实现。修正画面提示文字上下翻转。同步内存草稿与延后作者提交分离,避免宿主回调内读写、过期目标与跨帧草稿覆盖。
|
||||
|
||||
跟踪按Color Finale只读行为证据独立适配实际路径范围、300特征、亚像素精炼、21×21光流及最高4K灰度帧,保留严格失效与过期写入保护。独立CPU/Metal18项通过。不能称为完整Color Finale移植;B样条、编组、人物/图像/外部蒙版、完整轨迹区段编辑等仍有差异,未做同一真实视频的完整轨迹等价对照。
|
||||
|
||||
正式版281项原生检查通过。FCP12.4实测相邻插入/初始化独立参数、大号面板/绘制态、钢笔蒙版正向99键、一次撤销和重做、保存重开完整预设逐字节一致。**用户已用实际鼠标确认钢笔可以绘制并闭合**,原答复“可以绘制并闭合”;自动化鼠标未触发画面回调。其它曲柄/删除等手势的模拟宿主原生OSC回归通过,不扩大为全部实机手势验收。1.4.0用户确认的中心拖动历史保留。
|
||||
|
||||
入口:[本轮实现](research/MaskWorkflow1.4.1.md)、[Color Finale证据与差异](research/ColorFinaleMasksFollowup.md)、[实际宿主记录](verification/HostMaskWorkflow1.4.1.json)、[远端独立恢复](verification/MaskWorkflowRecovery.json)、[副本清理](verification/MaskWorkflowCleanup.json)、[恢复与构建](RECOVERY.md)。正式包和下载核验见Package.json/Release.json。
|
||||
|
||||
## 以下为1.4.0(24)的历史交接
|
||||
|
||||
更新日期:2026-11-01,Asia/Shanghai。当前 APP 已完成正式签名、公证、票据、唯一安装与宿主工作流检查;PKG/Release 状态以本仓库相应验证记录为准。
|
||||
|
||||
## 本轮结果与入口
|
||||
|
||||
十二个模块标题右侧已有“添加蒙版”和“再加一层”。第二个HSL等新增工具使用独立UUID、初始化参数、折叠/启停/复位/删除和自己的蒙版;新增工具依次排在原模块之后。原固定float ID、9001资产和1104字节ABI不变,无蒙版旧工程保留原融合内核。新增一级使用Rec.709/Gamma2.4同域默认,新增肤色保护强度零。
|
||||
|
||||
六种蒙版是椭圆、矩形、钢笔、线性渐变、HSL、亮度;支持相加/减去/相交、启停、反转、羽化、强度和几何数值。几何跟踪从父库固定节点 `f8950384e514685c8809fe8e8ee2dd5f16ad0bd7` 移植Metal光流和仿射RANSAC,并适配本产品FxAnalyzer生命周期;支持正向、反向、双向、单帧、取消及单次撤销,过期目标不回写。当前没有新增对Color Finale二进制的依赖,父工程未修改。
|
||||
|
||||
作者状态:`DYToolState.h/.mm`,9002静态工具文档、9003不保存的OSC会话。渲染:`DYToolRender.inc.h`、`DYToolGPU.h`、`DYGrade.metal`、`tools/build_masked_kernel.py`。面板:`DYMaskPanel.inc.h`、`DYInspector.mm`。原生画面与跟踪:`DYToolOSC.inc.h`、`DYToolHost*.inc.h`、`DYToolFlow.inc.h`、`DYTracking.metal`、`MaskCore/`。归档使用安全类白名单,预设v4包含完整工具/蒙版/轨迹,兼容v1–3。
|
||||
|
||||
实际编译源码 `dbf25fe6719f17075362538dad0404951102524d` 已推送。APP公证 `40fdaaaa-1821-4cc8-bec3-c5dc6d8b9f77` Accepted;正式位置仍为 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,Bundle ID仍为 `com.dayu.color`。Release前后均通过222项原生检查。FCP12.4独立合成工程实测HSL第二层0→32而原层0,独立椭圆/矩形、数值编辑、正向99键、双向100键、新增层单帧2键与播放头前进;一次撤销/重做及正常退出重开后完整预设逐字节一致。
|
||||
|
||||
**用户已确认实际鼠标可拖动蒙版中心。** 初次自动化坐标点击未进入宿主回调,随后用户实测“可以拖动,蒙版随鼠标移动”;真实hit/mouseDown/mouseDragged日志已捕获,原层中心由0.6/0.5变成0.378/0.379,新增层矩形仍为0.5/0.5。用户试调结果保留,不再自动复位或重启宿主。旋转、缩放和钢笔手势未实机确认,原生模拟宿主相关检查通过;不要扩大为所有手势都已实测。Motion、Intel、变速/裁剪/非方像素工程未实测;跟踪不含透视/剪切。新增工具标量为静态作者值,只有蒙版轨迹随时间求值;空间蒙版拒绝Cube导出,应保存完整预设。
|
||||
|
||||
旧模板实例可能保留关闭OSC的10005值,可先存完整预设,再应用新版效果并载入;不自动覆盖旧效果。当前模板使用父库Boolean发布契约,最新插件解析。中间20–23版均未发布最终包,旧生成APP备份在24版宿主确认后清理。远端独立恢复210文件、strict/full fsck、模型模板和着色器重建一致,临时clone已清理。
|
||||
|
||||
证据:[实现说明](research/ToolMaskImplementation.md)、[移植来源](research/ToolMaskPort.json)、[正式安装](verification/Delivery.json)、[222项原生检查](verification/InstalledSelfTest.json)、[宿主结果及缺口](verification/HostToolMasks.json)、[远端恢复](verification/ToolMaskRecovery.json)、[副本清理](verification/ToolMaskCleanup.json)。打包入口 `Packaging/build_pkg.py`,发布入口 `Packaging/publish_release.py`;版本标签、PKG公证和下载摘要见 `verification/Package.json`、`verification/Release.json`,不要将历史版本记录当作当前发行成功。
|
||||
|
||||
## 以下为1.3.1接手时的历史快照
|
||||
|
||||
下面各节中的“当前”“下一阶段”和“尚未实现”均指本轮开发前的1.3.1(19),保留作为兼容背景;最新实现以上文和实现说明为准。历史说明整理本身未编译、替换或操作当时的FCP窗口。
|
||||
|
||||
## 1. 下一阶段目标与当前边界
|
||||
|
||||
用户最新需求:继续增加**蒙版、跟踪,以及自行添加工具的能力**。明确例子是:一层 HSL 不够时,可以再添加一个 HSL,分别调整。
|
||||
|
||||
这里的核心是“同类工具可有多个独立实例”。新增 HSL 不能只是另一张面板共用原 HSL 的参数。蒙版应能绑定到具体工具实例,跟踪结果应驱动对应蒙版。
|
||||
|
||||
**上述功能尚未在“大鱼调色”实现。** 当前 1.3.1 是固定模块调色器;“大鱼调色盘”的图层、蒙版和跟踪代码只是下一阶段参考,不能把父库已完成的功能写成当前产品已完成。
|
||||
|
||||
建议开发次序:工具实例和第二个 HSL → 每实例蒙版 → 宿主画面控件 → 蒙版跟踪 → 持久化、撤销和正式交付。设计、源码入口、迁移风险及验收清单见 [蒙版跟踪与工具栈续作方案](research/MaskTrackingAndToolStack.md)。其中标为“建议”的内容是接手方案,不代表用户已经逐项指定所有类型和操作。
|
||||
|
||||
## 2. 实际项目与可恢复节点
|
||||
|
||||
| 项目 | 当前值 |
|
||||
| --- | --- |
|
||||
| 主源码目录 | `/Volumes/备份/大鱼调色/大鱼调色` |
|
||||
| 远程 / 分支 | `https://dayu.media/git/dayu/dayu-color.git` / `main` |
|
||||
| 文档整理前 main | `bbdd47d1d74e241f1f144bb2c245204e86973b3f` |
|
||||
| 本次交接标签 | `handoff-mask-tracking-tools-20261101`;最终提交可通过此标签解析 |
|
||||
| 当前正式版本 | **1.3.1(19)** |
|
||||
| APP 实际编译源码 | `dbb7ca4a995ef832178a32f35939aed7d3a85012` |
|
||||
| 正式版本标签 | `v1.3.1-browser-recents-20261101` |
|
||||
| 正式版本标签提交 | `281721bda11484c23f294b4f0d9e0b30ef829288` |
|
||||
| 主 ID / 插件 ID | `com.dayu.color` / `com.dayu.color.XPC` |
|
||||
| 唯一正式 APP | `/Library/Plug-Ins/FxPlug/大鱼调色.app` |
|
||||
| 唯一 FCP 模板 | `/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef` |
|
||||
| 固定构建缓存 | `/Users/mac/Library/Caches/CodexBuilds/com.dayu.color` |
|
||||
| 工程 / Scheme | `大鱼调色.xcodeproj` / `Wrapper Application`,Release |
|
||||
|
||||
工作目录、APP 编译提交、发行标签提交与后续文档提交是不同概念。恢复正式程序源码取编译提交;恢复含包记录的发行节点取版本标签;继续下一阶段从最新 main 或本次交接标签开始。已有历史版本、标签和安装包保留。
|
||||
|
||||
## 3. 已交付行为,后续须保留
|
||||
|
||||
- 一级调色将输入转换、工作空间、一级参数和输出转换放在一张卡片中。使用大鱼 CST 的固定源码数学取代新实例的输入还原 LUT;四个可见旁路选项已移除,一级眼睛统一启停。旧输入 LUT、旧参数 ID 和兼容解释仍保留。
|
||||
- 新实例及全部还原:输入 **Sony S-Log3(28)/ S-Gamut3.Cine(27)**;工作 **DaVinci Intermediate(10)/ DaVinci Wide Gamut(16)**;输出 **Gamma 2.4(1002)/ Rec.709(22)**;自动色调映射关闭。不要根据曲线名称覆盖用户手选色域。
|
||||
- 一级白平衡采用原 CST 色轮,保留原图、+104° 方位、/5 精细拖动、双击复位和方向键微调。底部可见“复位”只将该色轮方向、强度置零。原 BASIS 强度平方×4 的数学不变。
|
||||
- 蜘蛛盘来自“大鱼调色盘”,默认联动 6×6、31 节点;两轴可分别选择 6/8/12/16/24。固定、多选、同列自由点联动、整环/整列、复位、归档和 Cube 导出已接入。中性盘精确直通。
|
||||
- 新实例默认展开**一级调色、蜘蛛盘校色仪、基础调整**,其他模块折叠,全部眼睛打开。标题仅折叠,眼睛仅启停;状态独立保存。黑白混合默认 0%。
|
||||
- 风格 LUT 最多五层。库路径 `/Users/mac/Movies/大鱼调色LUT/look LUTs`。后台导入、取消、最后一次选择生效和 UTF-8/16/32 等编码兼容均保留。
|
||||
- LUT 浏览器在 FCP 中使用独立宿主浮动窗口。网格/列表、缩略图大小、可调整侧栏、窗口/布局偏好按库保存。最近使用分类第一位,成功应用后去重、最新优先,最多 40 个;全部及文件夹也优先显示最近项。旧版未记录的所有历史不能凭空补造;首次打开可从已有当前 LUT 初始化。
|
||||
- 33³ Cube 导出包含开启的 CST、一级白平衡、蜘蛛盘及其它逐像素色彩操作,遵循眼睛开关,折叠不影响导出;不含纹理、清晰度、去朦胧和逐画面统计。将来出现空间蒙版/跟踪后必须重新定义并明确提示导出边界。
|
||||
|
||||
## 4. 当前实现结构与兼容约束
|
||||
|
||||
| 文件 / 位置 | 接手用途 |
|
||||
| --- | --- |
|
||||
| `大鱼调色/Plugin/DYModel.h/.mm` | 234 个固定 float 参数、参数 ID、默认值、资产与界面归档 |
|
||||
| `大鱼调色/Plugin/DYUniforms.h` | 当前 CPU/Metal 缓冲 1104 字节;原 944 字节前缀保持;CST 在偏移 944 追加 |
|
||||
| `大鱼调色/Plugin/DYInspector.mm` | 固定卡片、标题/眼睛、预设 v3、LUT 提交与浏览器宿主 API |
|
||||
| `大鱼调色/Plugin/DYNewPanels.inc.h` | 一级白平衡色轮、可见复位、蜘蛛盘面板 |
|
||||
| `大鱼调色/Plugin/DYColorTables.mm` | HSL、白平衡、颜色分级等 LUT 构建与缓存 |
|
||||
| `大鱼调色/Plugin/DYRenderer.mm` | CST 前段、固定调色链、蜘蛛盘、Metal 资源、预览、Cube 导出 |
|
||||
| `大鱼调色/Plugin/DYGrade.metal`、`tools/kernels/*.ll` | Metal 边界和已版本化运算内核;当前固定调色链有融合执行,尚非工具栈 |
|
||||
| `大鱼调色/Plugin/DYPlugIn.mm` | FxTileableEffect、按宿主时间生成渲染状态、归档白名单及导出 |
|
||||
| `大鱼调色/Plugin/DYLUTBrowser.mm`、`DYLUTLibrary.mm` | 窗口/布局、异步确认、最近使用;不要混入工具作者数据 |
|
||||
|
||||
当前两项 custom 参数:`9000 DYInspectorToken`(schema 2,folds 字典),`9001 DYAssetState`(LUT paths、spiderMesh、spiderLinked)。**9001 注册为 NOT_ANIMATABLE**,不能简单把动态工具塞进去就宣称支持宿主参数关键帧。预设 JSON 版本是 **3**;插件临时渲染状态的 schema 是 **1**;它们是不同格式的版本号。
|
||||
|
||||
当前 HSL 只有一组 `hsl*` 固定字段和一份 HSL 查表。重复工具需要独立身份、参数、缓存和撤销目标。父库 `DYGrade` 是 1032 字节,与本项目 `DYUniforms` 不同;不能直接复制其参数号、POD、Bundle ID 或整个插件入口覆盖当前产品。
|
||||
|
||||
归档、预设、复制、相等性、hash、允许解码类和渲染状态都必须一起演进。旧字段与数学 ID 不重排;旧工程无新增状态时保留原画面。UI 折叠键在多工具场景下应按实例 ID 隔离,不能全部共用 `hsl`。
|
||||
|
||||
## 5. 可复用参考:父级“大鱼调色盘”
|
||||
|
||||
只读目录 `/Volumes/备份/大鱼调色/大鱼调色盘`;远程 `https://dayu.media/git/dayu/dayu-colorplate.git`。本次核对干净 HEAD `f8950384e514685c8809fe8e8ee2dd5f16ad0bd7`。其正式 2.0.0(68)编译源码为 `d05994d5f4547687511bef524efe8c881e8a5c9c`,标签 `v2.0.0-build68`。
|
||||
|
||||
先读父库 `HANDOFF.md`、`research/tracking-host-lifecycle.md` 及 `verification/release-2.0.0-build68.json`。该库记录了矩形/椭圆/闭合钢笔区域、前后/双向/单帧、位置/旋转/独立横纵缩放、取消保留可信段和一次撤销等实现与宿主证据。它输出仿射分解后的这些变换,不能宣传为透视/剪切跟踪或任意遮挡均可靠。
|
||||
|
||||
下一阶段按具体功能复用其作者状态、蒙版数学、OSC 和 FxAnalyzer 生命周期适配,源文件导航见续作方案。父库现有交接另有胶片/CMS等任务,**不属于本次“大鱼调色”新增范围**。不改动兄弟仓库、不替换兄弟 APP、不恢复或覆盖其用户调色文件。
|
||||
|
||||
## 6. 验证现状与用户工作保护
|
||||
|
||||
| 证据 | 本版本实际覆盖 |
|
||||
| --- | --- |
|
||||
| `verification/InstalledSelfTest.json` | 正式路径常规 158 项原生检查 |
|
||||
| `verification/BrowserNative.json` | 正式路径 201 项,含独立 CST 像素参照、色轮/蜘蛛盘、归档与渲染 |
|
||||
| `verification/BrowserCustomization.json` | 23 项离屏浏览器、几何/布局/历史检查 |
|
||||
| `verification/BrowserRegression.json` | 67 项回归,含 3,025 项目录虚拟化、取消及应用确认 |
|
||||
| `verification/SpiderMath.json` | 25 种网格、204,683 项数学检查 |
|
||||
| `verification/HostBrowserAndReset.json` | FCP 12.4 的 Sony 默认、可见复位、独立窗口及系统缩放、两种布局、最近排序、浏览器关闭重开 |
|
||||
| `verification/BrowserRecovery.json` | 编译节点远端恢复 178 文件、fsck、Metal 重建与正式库一致 |
|
||||
| `verification/BrowserReleaseRecovery.json` | 发行节点远端恢复 184 文件、fsck |
|
||||
|
||||
自由标题栏/窗口边缘拖动未由自动化独立确认。用户开始操作浏览器后,保留其当时的网格布局、约 197.97 缩略图大小、窗口位置和 LUT 选择,**未再次重启 FCP 或全部还原**。这些是当时观察,不是要求下一轮强制恢复的偏好;接手以用户最新操作为准。浏览器关闭重开已测,不写成此次已重新冷启动宿主。Motion、Intel、旧系统未验收。
|
||||
|
||||
测试库位于 `/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/大鱼调色_验收.fcpbundle`;本轮独立项目 `大鱼调色_1.3.1_浏览器与复位`。只读/引用现有 LUT,未导入或删除用户 LUT。新功能用独立合成运动素材验收,不修改用户正在工作的调色、跟踪或媒体。
|
||||
|
||||
## 7. 正式交付与发布记录
|
||||
|
||||
- APP 公证:`9e93dc7f-04a3-44f9-a1e4-792bd7b31533`,Accepted。
|
||||
- PKG 公证:`85cad776-c3d7-4037-9643-24041b269002`,Accepted。
|
||||
- 正式包:`/Volumes/备份/大鱼调色/发行包/大鱼调色-1.3.1.pkg`;14,073,683 字节。
|
||||
- SHA-256:`954b10c581f31d23a8c417a6f37b24fae19939786dce8733b4d6f09c7ed3adae`。
|
||||
- [1.3.1 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.3.1-browser-recents-20261101),Release ID 366,附件 ID 12;附件下载链接见 `verification/Release.json`。
|
||||
- APP/PKG 的 Developer ID、票据、Gatekeeper、20 项展开验包通过。草稿与正式链接均完整下载校验,只上传一次。正式 APP 已安装,本轮未重复执行 PKG 安装器。
|
||||
|
||||
详细恢复与历史仍在 [RECOVERY.md](RECOVERY.md)。本次整理不修改上述正式发行标签、附件或程序版本。
|
||||
|
||||
## 8. 下一位接手的操作入口
|
||||
|
||||
1. 读取本文件、续作方案和本机 `/Users/mac/.codex/AGENTS.md`;核对 main、本地未提交改动、远端及同产品任务,保留用户正在操作的 FCP 状态。
|
||||
2. 先完成工具实例/参数/顺序/迁移合同,以“两个独立 HSL”形成可验收的第一阶段;避免先给所有模块套一个全局蒙版而日后重做。
|
||||
3. 再按续作方案接蒙版、OSC、精确时间分析、取消和单次 Undo/Redo。每阶段提交并立即推送;只暂存本任务文件。
|
||||
4. 模型修改后刷新模板:`python3 tools/build_template.py --refresh-model --overwrite`。
|
||||
5. 编译和 CLI 检查可在固定缓存执行;用户可见验收必须从正式安装的已公证版本进行。正式交付使用 `python3 tools/deliver.py`,它持有产品锁并等待宿主验收输入 `complete`。
|
||||
6. PKG 入口:`python3 Packaging/build_pkg.py --pkg-forge-repo /Users/mac/Documents/dayu-git/repositories/pkg-forge`。发布入口:`python3 Packaging/publish_release.py --tag <新标签> --notes <对应说明>`。不要复用本次版本号、覆盖旧包或移动旧标签。
|
||||
7. 产品身份、正式路径、逐层签名、公证、票据、PluginKit 唯一登记、生成副本清理、Release 完整下载及远端恢复都继续按全局约定执行。证书/profile/权限在下次发布时重新复核,凭据不进文档或源码。
|
||||
|
||||
可直接用于下一聊的任务描述:
|
||||
|
||||
> 先读“大鱼调色FxPlug4交接.md”和 research/MaskTrackingAndToolStack.md,从当前 1.3.1(19)继续。我要能添加多个独立工具,例如第二个 HSL,并给具体工具添加蒙版及蒙版跟踪。参考父级“大鱼调色盘”,保留当前 CST、折叠/眼睛、蜘蛛盘、LUT 浏览器和最近使用行为,保护已有工程和当前用户操作,分阶段验证并完成正式交付。
|
||||
上一阶段详细基线保留于[1.4.3胶片接续原文](research/handoffs/DayuColorFilmStart1.4.3-20261102.md),更早历史见[历史交接](research/handoffs/DayuColorThrough1.4.3-20261102.md)。
|
||||
在新工单中引用
屏蔽一个用户