比较提交
| 作者 | SHA1 | 提交日期 | |
|---|---|---|---|
|
|
edfb74b171 | ||
|
|
bbdd47d1d7 | ||
|
|
281721bda1 | ||
|
|
827ddb8a32 | ||
|
|
dbb7ca4a99 | ||
|
|
5e94042db9 | ||
|
|
f8cc898546 | ||
|
|
6528f888af | ||
|
|
132d98c584 | ||
|
|
eb2dc311cb | ||
|
|
c2818cbb11 | ||
|
|
ac164245aa | ||
|
|
cf5a97cac9 | ||
|
|
8074444259 | ||
|
|
c2c65aaaff | ||
|
|
48b00c8579 | ||
|
|
d2bf0696bd | ||
|
|
76537da0a6 |
没有与搜索条件相匹配的文件
@@ -0,0 +1,18 @@
|
||||
大鱼调色 1.2.0(17),适用于 Apple Silicon Mac,最低 macOS 14.6。
|
||||
|
||||
- 输入还原改为大鱼 CST 的输入转换、工作空间一级调色和输出转换,曲线与色域独立选择。
|
||||
- 标题只展开/折叠,小眼睛只启用/旁路,独立保存。默认一级调色与基础调整展开,其余折叠,所有眼睛开启。
|
||||
- 保留旧工程输入 LUT/相机档位兼容;风格 LUT、编码兼容、后台加载及自动分析继续可用。
|
||||
- Cube 导出包含 CST 与一级调色;黑白新增默认 0% 混合,默认画面中性。
|
||||
- 153 项原生检查及 21 组独立 CST 像素对照通过;FCP 12.4 默认、独立开关、参数保留、Sony/ACES 选择、保存重开及风格库应用验收通过。
|
||||
|
||||
安装包包含原生 FxPlug APP 和 FCP 模板,不含用户 LUT、预设或媒体。安装前保存工作并正常退出 Final Cut Pro/Motion。APP 和 PKG 均完成正式签名、公证、票据与 Gatekeeper 核验,20 项展开验包通过;本轮未重复执行 PKG 安装。
|
||||
|
||||
版本标签:`v1.2.0-cst-fold-20261101`
|
||||
APP 实际编译源码:`48b00c85799b0226ba32aba3f2e5397aa0e509ed`
|
||||
APP 公证:`f25ae46e-92da-4470-842e-128bdb232aa8`,Accepted
|
||||
PKG 公证:`c7b97b0f-57c8-45d3-a4d7-7db8e8694487`,Accepted
|
||||
|
||||
附件:`大鱼调色-1.2.0.pkg`
|
||||
大小:13,818,397 字节
|
||||
SHA-256:`9fba4f0c1a313a6da8374b683f7e6b41af70388d7a7a180e26b9e236a9ba64a1`
|
||||
@@ -0,0 +1,20 @@
|
||||
大鱼调色 1.3.0(18),适用于 Apple Silicon Mac,最低 macOS 14.6。
|
||||
|
||||
- 输入转换、工作空间、一级调色与输出转换合并到一级调色卡片,移除四个旁路选项;眼睛统一启停。
|
||||
- 一级白平衡迁入原 CST 色轮,保留精细拖动和双击复位,并支持方向键微调。
|
||||
- 从“大鱼调色盘”移植可变蜘蛛盘,支持联动/独立 6、8、12、16、24 点数、固定点、多选、整环/整列和复位,随工程与预设保存,Cube 导出也包含蜘蛛盘。
|
||||
- 默认展开一级调色、蜘蛛盘校色仪、基础调整,其余折叠,所有眼睛打开。折叠与停用分别保存。
|
||||
- 保留旧工程、旧 LUT 和旧预设兼容。198 项正式版原生检查、25 种网格的 204,683 项数学检查通过;FCP 12.4 的键盘调整、菜单撤销/重做、网格密度、默认及保存重开验证通过。
|
||||
|
||||
FCP 自动化坐标鼠标注入未激活远程视图,因此宿主内拖动和双击未确认;原生 AppKit 事件检查已覆盖精细拖动、复位和一次拖动的撤销配对。Motion、Intel 和旧系统未验收。
|
||||
|
||||
安装包包含原生 FxPlug APP 和 FCP 模板,不含用户 LUT、预设或媒体。安装前保存工作并正常退出 Final Cut Pro/Motion。APP 与 PKG 均完成 Developer ID 签名、公证、票据与 Gatekeeper 核验,20 项真实展开验包通过。本轮正式 APP 已完成唯一安装,未重复执行 PKG 安装脚本。
|
||||
|
||||
版本标签:`v1.3.0-spider-balance-20261101`
|
||||
APP 实际编译源码:`c2818cbb1157093f80efd2a85cea0cf1509f565e`
|
||||
APP 公证:`5de714ac-dd28-4d2b-926f-6c0f424d0e5d`,Accepted
|
||||
PKG 公证:`f6b25757-1e6b-4260-9667-5baecce8b3d4`,Accepted
|
||||
|
||||
附件:`大鱼调色-1.3.0.pkg`
|
||||
大小:14,066,399 字节
|
||||
SHA-256:`36c251722d3c9e4aaed8d5a09bf5afd3bf84039e9d1161c63635ab9d8224f506`
|
||||
@@ -0,0 +1,20 @@
|
||||
大鱼调色 1.3.1(19),适用于 Apple Silicon Mac,最低 macOS 14.6。
|
||||
|
||||
- 一级白平衡色轮增加可见的“复位”按钮,只重置本色轮方向和强度;双击复位继续保留。
|
||||
- LUT 缩略图浏览器改用宿主独立浮动窗口,支持系统移动/缩放;增加网格/列表布局和可调整侧栏,保存窗口及布局偏好。宿主会限制最大窗口尺寸。
|
||||
- “最近使用”固定在分类最前,只记录成功应用的 LUT,去重并按最新优先显示,最多保留 40 个;全部和文件夹列表也优先显示最近使用。
|
||||
- 新实例和全部还原的输入默认为 Sony S-Log3 / S-Gamut3.Cine,输出仍为 Gamma 2.4 / Rec.709。
|
||||
- 201 项正式版原生检查、23 项浏览器专项检查和 3,025 项大目录回归通过。FCP 12.4 的默认、可见复位、浮动窗口/系统缩放、布局、最近排序及浏览器关闭重开检查通过。
|
||||
|
||||
自动化未独立确认自由标题栏/边缘拖动;原生隐藏窗口的几何、缩放和持久化检查通过。用户开始使用后保留当前选择与布局,未再次重启宿主。Motion、Intel、旧系统未验收。
|
||||
|
||||
安装包包含原生 FxPlug APP 和 FCP 模板,不含用户 LUT、预设、最近使用记录或媒体。安装前保存工作并正常退出 Final Cut Pro/Motion。APP 与 PKG 均完成 Developer ID 签名、公证、票据和 Gatekeeper 核验,20 项展开验包通过。本轮 APP 已唯一安装,未重复执行 PKG 安装器。
|
||||
|
||||
版本标签:`v1.3.1-browser-recents-20261101`
|
||||
APP 实际编译源码:`dbb7ca4a995ef832178a32f35939aed7d3a85012`
|
||||
APP 公证:`9e93dc7f-04a3-44f9-a1e4-792bd7b31533`,Accepted
|
||||
PKG 公证:`85cad776-c3d7-4037-9643-24041b269002`,Accepted
|
||||
|
||||
附件:`大鱼调色-1.3.1.pkg`
|
||||
大小:14,073,683 字节
|
||||
SHA-256:`954b10c581f31d23a8c417a6f37b24fae19939786dce8733b4d6f09c7ed3adae`
|
||||
@@ -1,51 +1,51 @@
|
||||
# 大鱼调色
|
||||
|
||||
原生 FxPlug 4 调色器。主方案为 **Wrapper Application**,包含独立 XPC 插件,正式安装在 `/Library/Plug-Ins/FxPlug/大鱼调色.app`。
|
||||
原生 FxPlug 4 调色器,当前正式版本 **1.3.1(19)**。唯一安装位置为 `/Library/Plug-Ins/FxPlug/大鱼调色.app`;Final Cut Pro 中从“效果 → 大鱼调色”添加。
|
||||
|
||||
支持 17 种相机输入转换、自选输入 LUT、基础光影、白平衡、局部增强、肤色保护、五层风格 LUT、RGB 曲线、8 色与自定义 HSL、四个色轮、三原色、色阶、黑白和色彩平衡。包含自动调色、复制时自动分析、系统吸管、JSON 预设和 Cube 导出。
|
||||
## 色彩管理与一级调色
|
||||
|
||||
- [分析与范围](research/ANALYSIS.md)
|
||||
- [Color Finale 移植研究与算法来源](research/ALGORITHM_SOURCES.md)
|
||||
- [恢复、依赖与正式交付](RECOVERY.md)
|
||||
- [GPU 数学来源与验证](tools/kernels/README.md)
|
||||
- [正式安装记录](verification/Delivery.json)
|
||||
- [LUT 后台加载的 FCP 验收](verification/HostLUTLoading.json)
|
||||
- [N12 外部 LUT 导入与应用验收](verification/HostExternalLUT.json)
|
||||
- [外部 LUT 问题定位及回归](verification/ExternalLUTActivation.json)
|
||||
- [LUT 编码兼容与回归](verification/LUTEncoding.json)
|
||||
- [混合编码 LUT 的 FCP 验收](verification/HostLUTEncoding.json)
|
||||
- [LUT 加载响应压力测试](verification/LUTResponsiveness.json)
|
||||
- [程序图标与插件缩略图验收](verification/BrandAssets.json)
|
||||
- [分组展开与启用验收](verification/HostGroupFolding.json)
|
||||
- [主题与 LUT 库的 FCP 验收](verification/HostThemeLUT.json)
|
||||
- [早期调色链的 FCP 验收](verification/Host.json)
|
||||
前段已改为 **输入转换 → 工作空间一级调色 → 输出转换**,复用大鱼 CST 仓库的固定源码与原生 GPU 数学。曲线和色域独立选择,工作空间统一供一级调色及输出使用,不经相机还原 LUT 近似。
|
||||
|
||||
当前正式版本为 1.1.5(16),交付标签 `v1.1.5-lut-encoding-20261101`。所有调色分组统一为展开即启用、折叠即停用;新建实例与全部还原只展开基础调节。折叠保留参数和 LUT 路径,重新展开继续使用;打开已保存的调色时按各组实际启用状态展开。基础调节同时控制其光影、白平衡与颜色子组。
|
||||
新实例输入为 Sony S-Log3 / S-Gamut3.Cine,输出为 Gamma 2.4 / Rec.709,工作空间为 DaVinci Intermediate / DaVinci Wide Gamut,自动色调映射关闭。请按素材实际编码选择相机输入;不会根据片段或曲线名称猜测、覆盖手选色域。一级调色包含曝光、色彩平衡、饱和度、对比度与轴心、分区影调、黑白点、趾部/肩部压缩。输入、工作空间和输出已合并到一级调色卡片,四个旁路选项移除,由一级眼睛统一启停。一级白平衡改用原 CST 色轮,支持精细拖动、方向键微调、双击复位,以及可见的“复位”按钮;按钮只重置一级白平衡。
|
||||
|
||||
程序图标与 FCP 缩略图采用统一的光谱鱼。两张原始生成图及提示词保存在 `design/`;运行 `python3 tools/build_brand_assets.py` 使用 macOS 工具导出 ICNS、640×360 与 240×135 的效果预览。
|
||||
CST 后的基础调整、HSL、曲线、色轮、五层风格 LUT 等仍属于既有显示域调色链。保留肤色保护、三原色、色阶、黑白、自动调色、吸管、预设和 Cube 导出。Cube 导出包含 CST、一级调色(含白平衡色轮)、蜘蛛盘及其它已启用的逐像素颜色操作。折叠不影响导出,眼睛关闭的模块不计入;纹理、清晰度、去朦胧和逐画面统计不写入 LUT。导出为 33³ Cube,应应用于与导出时相同编码的输入,避免重复叠加 CST/一级处理。
|
||||
|
||||
主题与 LUT 浏览库自 1.1.0(6)提供,源码标签 `v1.1.0-theme-lut-20261031`。灰、蓝、紫、绿、橙五套主题切换后跨实例记忆。风格 LUT 左侧网格按钮打开缩略图浏览器,右侧文件夹按钮打开 `~/Movies/大鱼调色LUT/look LUTs`。可导入文件或目录,按目录与名称过滤,单击应用,缩略图大小与目录会保存。
|
||||
旧工程的输入 LUT / 相机档位和原画面保持兼容;在一级调色中看到“旧版输入 → 改用 CST”时,可明确切换。编辑 CST 参数也会启用新链路。旧参数 ID、LUT 路径与预设读取保留。
|
||||
|
||||
缩略图使用当前素材先经过输入 LUT 的画面;没有源帧时显示本产品生成的色卡。显示方向与宿主图像原点一致,自动分析保留自己的原始数据。浏览器优先采用 FxPlug 宿主窗口,不能使用时回退为锚定弹出面板。品牌保留大鱼,吸管仍为系统取色器。
|
||||
## 模块界面
|
||||
|
||||
算法背景资料补充了同系列工程的 **Color Finale 移植研究**,涵盖调色工具、LUT 预览、图层与蒙版工作流;归档记录、适用范围及当前实现的来源区分见 [算法说明](research/ALGORITHM_SOURCES.md)。Camera Raw 查表数据与组合行为采用 Compositor 的 MIT 许可实现,许可证随资源保留。
|
||||
新实例和“全部还原”默认展开 **一级调色、蜘蛛盘校色仪、基础调整**,其余折叠,所有眼睛开启。标题只控制展开;眼睛只负责启用/停用,两者分别保存,正常重开仍保留。折叠保留参数、LUT 选择和效果。黑白混合默认 0%,避免全眼睛开启时直接变成黑白。
|
||||
|
||||
`大鱼调色/Plugin` 保存模型、AppKit 检查器、IOSurface/Metal 渲染与 CPU 查表;`tools/kernels` 保存可重建的 GPU 数学文本;`template` 是 FCP 效果入口。正式构建使用仓库中的源码和资源。
|
||||
蜘蛛盘直接移植“大鱼调色盘”的可变网格与数学,默认联动 6×6;支持 6/8/12/16/24 点数、独立两轴、固定点、多选、整环/整列和复位,随工程与预设保存。中性盘精确直通。
|
||||
|
||||
选择自有 LUT 后,预设记录其绝对路径;跨机器搬移时同时保留 LUT 文件并重新选择。LUT 导出只保存逐像素颜色,不包含纹理、清晰度或逐画面分析。
|
||||
LUT 缩略图浏览器使用宿主的独立可调整窗口:拖动标题栏移动,拖动窗口边缘调整大小;文件夹与预览之间的分隔条可调整侧栏宽度,底部可切换网格/列表和缩略图大小。位置、大小、布局与分类按库记忆,宿主可能限制最大窗口尺寸。“最近使用”固定在分类首位,仅在成功应用后记录、去重并按最新优先显示,保留最多 40 个;当前文件夹和全部列表也优先显示最近使用项。旧版已保存的当前 LUT 可在首次打开时作为历史起点,不虚构旧版未记录的其它历史。
|
||||
|
||||
`tools/create_lut_host_fixture.py` 可重建独立 FCP 验收 XML 和四个合成测试 LUT;它只写产品缓存,不会向用户库自动导入。LUT 核心检查见 `verification/LUTLibrary.json`,主题与浏览库实现说明见 `research/ThemeLUT-analysis.md`。
|
||||
五套主题跨实例记忆。风格 LUT 网格打开缩略图浏览库;用户库为 `~/Movies/大鱼调色LUT/look LUTs`。后台扫描、导入、解析、预览、取消和最后一次选择生效的机制保留;支持既有 UTF-8/16/32 与旧编码 Cube 兼容。用户文件不进入源码或安装包。
|
||||
|
||||
`tools/create_group_fold_host_fixture.py` 可创建独立的合成验收时间线,用于检查新实例仅基础调节默认启用、分组展开/折叠与数值保留。风格 LUT 总组停用会旁路全部五层;停用的输入或风格 LUT 不加载其文件。
|
||||
## 下一阶段
|
||||
|
||||
LUT 文件夹扫描、逐项校验/复制和选择文件后的解析均在后台执行;导入期间可继续搜索、滚动和选择,刷新按钮临时变为“取消”。失败或取消会移除本次新复制的文件并保留既有库。目录与缩略图只为可见范围创建控件,预览逐项出现;快速切换时仅应用最后一次选择。24个65级合成LUT与3,025项库的响应测试见 [LUTResponsiveness.json](verification/LUTResponsiveness.json)。
|
||||
用户计划增加每工具蒙版、蒙版跟踪和可重复添加工具,例如第二个独立 HSL。这些功能尚未在当前版本实现;接手入口为 [最新交接](大鱼调色FxPlug4交接.md) 与 [续作方案](research/MaskTrackingAndToolStack.md)。
|
||||
|
||||
1.1.4 修复外部 Cube 的旧编码标题导致整批导入失败:标题、注释兼容旧编码,尺寸和数值仍严格校验,报错包含文件名。点击缩略图时先在后台解析并准备 GPU 纹理,宿主接受后才确认选择;已选表独立保留,不受缩略图缓存淘汰影响。用户提供的 N12 目录 26 个 LUT 已全部导入、生成缩略图并完成 Metal 渲染,FCP 中两份“青橙色”、64 级 LUT、快速切换和保存重开通过。用户 LUT 不进入源码或安装包。
|
||||
## 验证与恢复
|
||||
|
||||
1.1.5 增加整份 Cube 的 UTF-16/UTF-32 大小端、有无 BOM 识别,在后台转换工作副本,保留导入文件的原始字节。支持常见换行及 Unicode 空白,标题、注释继续兼容 ASCII 指令下的旧编码。16 份 UTF-8/16/32 与 GB18030、Big5、Shift JIS、Windows-1252、MacRoman、ISO-8859-1 样本已在 FCP 中全部导入、预览和逐项应用,无 BOM UTF-32 保存重开通过。损坏的编码、非法数字仍会报错,不使用有损转码猜测颜色值。
|
||||
- [本轮交接](大鱼调色FxPlug4交接.md)
|
||||
- [CST 来源与集成边界](research/CSTIntegration.md)
|
||||
- [CST 固定源码节点与摘要](research/CSTIntegration.json)
|
||||
- [蜘蛛盘与色轮来源和适配](research/SpiderAndBalanceIntegration.md)
|
||||
- [201 项正式版原生与独立像素对照](verification/BrowserNative.json)
|
||||
- [浏览器布局与最近使用专项检查](verification/BrowserCustomization.json)
|
||||
- [大规模 LUT 加载与取消回归](verification/BrowserRegression.json)
|
||||
- [204,683 项网格数学检查](verification/SpiderMath.json)
|
||||
- [正式 FCP 界面与保存重开](verification/HostBrowserAndReset.json)
|
||||
- [正式安装与公证](verification/Delivery.json)
|
||||
- [远端独立恢复与着色器重建](verification/BrowserRecovery.json)
|
||||
- [完整恢复说明和历史](RECOVERY.md)
|
||||
- [原有算法来源](research/ALGORITHM_SOURCES.md)
|
||||
|
||||
正式 PKG 打包使用 PKG 工坊源码中的 `pkg-forge` 技能。运行 `python3 Packaging/build_pkg.py --pkg-forge-repo /实际/PKG工坊源码目录`,默认输出到上级“发行包”目录;先使用 `--prepare-only` 可只检查清单。打包使用已验证的正式 APP,并从相同 APP 资源中核对、整理 FCP 模板与缩略图,不重签或重建调色 APP。生成包将要求正常退出四种 FCP/Motion 宿主并在登录用户会话验证注册;签名公证和真实展开验包由该技能的原打包器与校验器完成。已有同名版本包不会覆盖。
|
||||
构建使用 `Wrapper Application` 方案、Release。运行 `python3 tools/deliver.py` 完成签名、公证、唯一安装和正式宿主验收;更改模型后运行 `python3 tools/build_template.py --refresh-model --overwrite`。`tools/create_browser_host_fixture.py` 重建独立合成验收 XML,不写用户 LUT 库。
|
||||
|
||||
当前正式安装包:[大鱼调色-1.1.5.pkg](../发行包/大鱼调色-1.1.5.pkg),包含1.1.5(16)正式APP及相同版本的FCP模板/预览图;本机Apple Silicon,最低macOS14.6。签名、公证与20项真实展开验包记录见 [Package.json](verification/Package.json)。本轮没有重复执行系统安装;包内APP与已验收的正式安装逐字节一致。
|
||||
正式发行包由 PKG 工坊技能生成,包含 APP 与 FCP 模板,不含用户 LUT、预设或媒体。安装与发布证据分别保存在 [Package.json](verification/Package.json) 和 [Release.json](verification/Release.json);以其中记录的版本和成功状态为准。
|
||||
|
||||
正式包已保存到[1.1.5 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.1.5-lut-encoding-20261101),完整下载核对大小与 SHA-256 通过。运行 `python3 Packaging/publish_release.py --tag v1.1.5-lut-encoding-20261101 --notes Packaging/Release-1.1.5.md` 可复用 PKG 技能核对同一附件;不会重复上传。安装包不进入普通 Git,发布记录见 [Release.json](verification/Release.json)。
|
||||
正式安装包:[大鱼调色-1.3.1.pkg](../发行包/大鱼调色-1.3.1.pkg);已发布至 [1.3.1 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.3.1-browser-recents-20261101),完整下载字节数和 SHA-256 校验通过。历史发行包保留。
|
||||
|
||||
FCP 已验证 Sony 默认、可见复位、浮动浏览器、系统窗口缩放、两种布局、最近排序与关闭重开。原生检查单独覆盖几何/布局持久化和鼠标事件;自动化没有独立确认自由标题栏/边缘拖动。用户开始使用后保留其当前布局与选择,未为额外测试再次重启宿主。
|
||||
+67
-2
@@ -1,10 +1,53 @@
|
||||
# 大鱼调色恢复说明
|
||||
|
||||
## 当前 1.3.1(19):色轮复位、可调整浏览器与最近使用
|
||||
|
||||
实际编译 `dbb7ca4a995ef832178a32f35939aed7d3a85012`,APP 公证 `9e93dc7f-04a3-44f9-a1e4-792bd7b31533`,Accepted;票据、Gatekeeper、唯一正式安装与 FCP 12.4 加载通过。发行标签 `v1.3.1-browser-recents-20261101`,包目标 `../发行包/大鱼调色-1.3.1.pkg`。本版本发布结果见 verification/Package.json 和 verification/Release.json。
|
||||
|
||||
新实例及全部还原的输入默认为 Sony S-Log3(数学 ID 28)与 Sony S-Gamut3.Cine(27);输出 Gamma 2.4 / Rec.709、工作 DI/DWG 不变。一级白平衡的可见复位按钮只写方向和强度为零,保持双击复位与一次撤销。
|
||||
|
||||
浏览器在 CustomParameterAction scope 中取得并立即请求 FxRemoteWindowAPI_v2 的最小/最大尺寸窗口;首个子视图在 reply 返回前同步附着。当前 FCP 实测独立浮动窗口生效。支持网格/列表、缩略图大小、可拖动分隔条和按库保存的窗口/布局偏好;旧宿主保留可分离弹出框回退。窗口尺寸受宿主 80% 上限及屏幕约束。
|
||||
|
||||
最近使用保存在当前 XPC 的 NSUserDefaults,key 以库的规范路径隔离;只记录成功且最新的宿主应用确认,失败、取消、过时回调不写。最多 40 个,去重最新优先,最近分类第一位,全部/文件夹也最近优先。首次打开可从已有当前 LUT 初始化;不能补造旧版本未记录的所有历史。LUT 文件不改动,历史偏好不进 Git/PKG。
|
||||
|
||||
verification/BrowserNative.json 为正式路径 201 项;BrowserCustomization.json 为 23 项真实离屏 AppKit 窗口/布局/历史检查;BrowserRegression.json 含 3,025 项虚拟化、取消和应用确认回归。FCP 的 Sony 默认、可见复位、浮动窗口及系统缩放、两种布局、最近排序和关闭重开见 HostBrowserAndReset.json。自由标题栏/边缘拖动未由自动化独立确认;用户开始操作后保留当前状态,未再重启 FCP。Motion、Intel、旧系统未验收。
|
||||
|
||||
远端独立恢复编译提交 178 文件、full/strict fsck 及 Metal 重建与正式库一致,见 verification/BrowserRecovery.json。恢复历史版本时仍使用其各自标签和验证记录,不把当前 Sony 默认替代历史中明确保存的设置。
|
||||
|
||||
## 历史 1.3.0(18)交付
|
||||
|
||||
实际编译源码 `c2818cbb1157093f80efd2a85cea0cf1509f565e`;APP 公证 `5de714ac-dd28-4d2b-926f-6c0f424d0e5d`,Accepted,票据和 Gatekeeper 通过,唯一正式路径 `/Library/Plug-Ins/FxPlug/大鱼调色.app`。版本标签 `v1.3.0-spider-balance-20261101`,最终发行记录见 verification/Package.json 和 verification/Release.json 的本版本条目。
|
||||
|
||||
输入、工作空间、一级和输出合并一个卡片,移除四个可见旁路;旧阶段/旁路参数继续注册,打开旧工程不重解释原值,明确编辑 CST 或复位才清理旧旁路。一级白平衡复用原 CST 图像及 +104°、/5 精细拖动和原 BASIS 强度换算,角度范围修正为 0–360°,旧数值不重解释。
|
||||
|
||||
蜘蛛盘原样数学和交互源来自 dayu-colorplate 的 `f8950384e514685c8809fe8e8ee2dd5f16ad0bd7`;资源与来源摘要均已入仓库,不依赖兄弟 APP 运行。默认联动 6×6,可变 6/8/12/16/24,两轴独立;完整网格与固定点保存至现有 DYAssetState,预设 schema 3 含 JSON 网格并继续读取旧预设。InspectorToken 仍 schema 2。默认一级调色、蜘蛛盘、基础调整展开,其余折叠,所有眼睛开启。
|
||||
|
||||
正式版常规 155 项自检、带独立 CST 参照的 198 项集成检查通过;25 个网格的 204,683 项数学检查通过。远端独立恢复实际编译提交的 168 个文件,strict/full fsck 及着色器重建与正式库摘要一致,见 verification/SpiderRecovery.json。兄弟仓库只读参考,未修改。
|
||||
|
||||
FCP 12.4 已验证合并面板、默认、色轮/蜘蛛盘键盘修改、宿主菜单撤销/重做、两轴密度、固定点操作、整环选择及正常保存重开,验收实例最后全部还原。自动化坐标鼠标注入未激活 FxPlug 远程视图,因此未确认实时宿主拖动/双击;原生 AppKit 鼠标事件和一次拖动撤销配对检查单独通过,不混为宿主操作。记录见 verification/HostSpiderAndBalance.json。Motion、Intel、旧系统仍未验收。
|
||||
|
||||
正式构建、安装与启动由 tools/deliver.py 执行;PKG 由 Packaging/build_pkg.py 调用 PKG 工坊并真实展开验包,不重复执行系统安装。发布器先草稿、完整下载校验后发布,不移动历史标签或覆盖历史附件。签名凭据和用户 LUT 不进仓库。
|
||||
|
||||
## 历史 1.2.0(17)交付
|
||||
|
||||
版本标签 `v1.2.0-cst-fold-20261101`;实际编译源码 `48b00c85799b0226ba32aba3f2e5397aa0e509ed`。正式 APP 公证 `f25ae46e-92da-4470-842e-128bdb232aa8`,Accepted,票据和 Gatekeeper 通过;唯一安装路径及服务进程已在 FCP 12.4 核对。签名团队 B3W25FX5H5,固定缓存和公证配置不变。
|
||||
|
||||
前段复用 `dayu/dayu-cst` 的 `973766b51dbcab3ab5092f1955d753575cd32d89` 源码:输入曲线/色域 → 工作空间一级 → 输出曲线/色域,源码副本与摘要均在本仓库,不依赖另一份 CST APP 才能生产运行。原始 944 字节调色 ABI 前缀保留,新增控制追加其后。来源见 research/CSTIntegration.json。
|
||||
|
||||
一级调色与基础调整默认展开,其他模块折叠,全部眼睛开启;折叠独立写入 InspectorToken,不修改渲染参数。新 InspectorToken schema 2,旧 schema 1 及旧输入 LUT/预设继续读取。旧工程默认旁路新 CST,直到明确迁移;黑白新增混合,旧工程保留原黑白效果。新默认 Rec.709/Gamma 2.4 往返保持中性。
|
||||
|
||||
153 项原生检查通过,21 组独立 CST 像素对照最大分量误差 0.0000152587890625,正式路径常规自检 110 项通过;FCP 新实例默认、折叠、眼睛、0.70 曝光、Sony/ACES 选择及保存重开通过。风格库 N12 的 26 项可见并可应用。宿主观察不冒充逐像素导出一致,Motion/Intel/旧系统未验收。
|
||||
|
||||
远端独立克隆实际编译节点,151 个提交文件校核、full/strict fsck,以及着色器重建均通过,重建 SHA 与正式库一致。详见 verification/CSTRecovery.json。无 LFS、无子模块。签名私钥和用户 LUT 仍须独立恢复。
|
||||
|
||||
安装包/Release 的版本、摘要、标签、附件下载校验分别见 verification/Package.json 和 verification/Release.json;尚未产生本版本成功记录时不能据历史记录宣称发布完成。本轮 APP 已完成唯一安装,PKG 只展开验包,不重复运行安装脚本。
|
||||
|
||||
|
||||
远程:https://dayu.media/git/dayu/dayu-color.git,分支main。
|
||||
初始化基线:10987dd6bcc6986ea321eff75b37d4e8b48e966d;后续节点见git log。
|
||||
产品主ID:com.dayu.color,XPC:com.dayu.color.XPC;唯一正式位置:/Library/Plug-Ins/FxPlug/大鱼调色.app。
|
||||
|
||||
当前交付标签:v1.1.5-lut-encoding-20261101。APP 1.1.5(16)编译源码:59b058a3c8b9e5387381574da6bbc05af437527c;标签另含最终宿主验收与恢复记录。Apple 公证 ID b47b6fe8-b7a9-4112-93b9-de85b03ca598,Accepted;正式签名、票据、Gatekeeper 与宿主重开均通过,见 verification/Delivery.json 和 verification/HostLUTEncoding.json。
|
||||
历史 1.1.5 交付标签:v1.1.5-lut-encoding-20261101。APP 1.1.5(16)编译源码:59b058a3c8b9e5387381574da6bbc05af437527c;标签另含最终宿主验收与恢复记录。Apple 公证 ID b47b6fe8-b7a9-4112-93b9-de85b03ca598,Accepted;正式签名、票据、Gatekeeper 与宿主重开均通过,见 verification/Delivery.json 和 verification/HostLUTEncoding.json。
|
||||
|
||||
外部LUT版本 v1.1.4-external-lut-20261101 保留,编译源码497eef29fe8eaa5fb7025aa045b6dfa46a9acc14,原公证ID d9d9b05a-58b5-4a7a-aac2-6433b87d901d。
|
||||
|
||||
@@ -12,7 +55,7 @@
|
||||
|
||||
分组折叠版本 v1.1.2-group-fold-20261031 保留,编译源码 cdcb30a6aa1519bfb2f183165fef11cbf278bc7c,原公证 ID 398b020c-9e1e-4c2b-b637-e8e3af2a8f59。
|
||||
|
||||
所有调色分组展开即启用、折叠即停用,关闭时参数不可见;仅基础调节在新实例和全部还原后默认展开。折叠保留数值和 LUT 路径;打开已保存实例时按其实际启用状态展开。基础调节同时控制原光影与颜色两个子组。风格 LUT 总组停用时全部五层均旁路,关闭的输入或风格 LUT 不加载文件。肤色保护的百分比字段按0–100范围显示和保存。
|
||||
历史 1.1.2–1.1.5 行为(已由 1.2.0 取代):所有调色分组展开即启用、折叠即停用,关闭时参数不可见;仅基础调节在新实例和全部还原后默认展开。折叠保留数值和 LUT 路径;打开已保存实例时按其实际启用状态展开。基础调节同时控制原光影与颜色两个子组。风格 LUT 总组停用时全部五层均旁路,关闭的输入或风格 LUT 不加载文件。肤色保护的百分比字段按0–100范围显示和保存。
|
||||
|
||||
FCP12.4正式安装版本的11组标题/眼睛联动、隐藏参数、黑白红45与肤色65%跨折叠及保存重开保留、全部还原后只展开基础调节的验收见 verification/HostGroupFolding.json。仅在独立合成验收项目中改值,最后恢复默认;用户媒体和其他产品未作改动。
|
||||
|
||||
@@ -139,3 +182,25 @@ python3 Packaging/build_pkg.py --pkg-forge-repo /实际/PKG工坊源码目录 --
|
||||
正式Release:https://dayu.media/git/dayu/dayu-color/releases/tag/v1.1.5-lut-encoding-20261101;Release ID355,附件ID8,关联原标签06968514fc5205a83fbf3c5a3dbb1be0f6f3e79b,标签未移动。仅上传一次大鱼调色-1.1.5.pkg,13,752,153字节,SHA256 bf2a4acc57a3c08176be0f317c90551120bfcfb21a7224a690191884c8a3d071。
|
||||
|
||||
草稿Web下载对令牌请求返回404,但正常登录会话可下载。通过Edge实际下载草稿附件、核对全部字节和SHA后才由API发布;发布后再次用上传器完整下载正式链接并回读Release/附件,复用同一个附件且校验通过。草稿下载的临时副本按来源、创建时间和摘要核实后清理,本地正式发行包保留。详见verification/Release.json;此过程没有重新构建或改动已验包安装包,也未再次安装PKG。
|
||||
|
||||
## 1.2.0 正式 PKG
|
||||
|
||||
正式包 `../发行包/大鱼调色-1.2.0.pkg`,13,818,397 字节,SHA-256 `9fba4f0c1a313a6da8374b683f7e6b41af70388d7a7a180e26b9e236a9ba64a1`。PKG 公证 `c7b97b0f-57c8-45d3-a4d7-7db8e8694487`,Accepted;Installer 团队 B3W25FX5H5、票据、Gatekeeper 及 20 项展开验包通过。包内 APP 与已验收正式安装一致,未重复运行安装器。
|
||||
|
||||
正式 Release 已发布并完整下载校验:[1.2.0 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.2.0-cst-fold-20261101),Release ID 363,附件 ID 10。关联标签完整提交 `8074444259fbacc758ec003aa91a6331b6224a85`,APP 实际编译 `48b00c85799b0226ba32aba3f2e5397aa0e509ed`;附件 13,818,397 字节,SHA-256 `9fba4f0c1a313a6da8374b683f7e6b41af70388d7a7a180e26b9e236a9ba64a1`。草稿下载验证后才发布,发布后再次用上传器完整下载并回读核对;仅一次附件上传,未覆盖历史附件或移动标签。浏览器临时下载副本已按大小、摘要和来源核实清理,本地正式发行包保留。
|
||||
|
||||
## 1.3.0 正式 PKG
|
||||
|
||||
正式包 `../发行包/大鱼调色-1.3.0.pkg`,14,066,399 字节,SHA-256 `36c251722d3c9e4aaed8d5a09bf5afd3bf84039e9d1161c63635ab9d8224f506`。PKG 公证 `f6b25757-1e6b-4260-9667-5baecce8b3d4`,Accepted;Installer 团队 B3W25FX5H5、可信时间戳、票据、Gatekeeper 和 20 项真实展开验包通过。包内 APP 与已验收正式安装一致,未重复运行安装器。APP 编译源码 `c2818cbb1157093f80efd2a85cea0cf1509f565e`。正式包保留,临时展开副本由打包入口清理。
|
||||
|
||||
正式 Release 已发布并完成草稿、正式链接两次完整下载校验:[1.3.0 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.3.0-spider-balance-20261101),Release ID 365,附件 ID 11,关联标签提交 `6528f888affe0acdd4292bc0c5ae0dac3a89b5a5`,实际 APP 编译 `c2818cbb1157093f80efd2a85cea0cf1509f565e`。附件 14,066,399 字节,SHA-256 `36c251722d3c9e4aaed8d5a09bf5afd3bf84039e9d1161c63635ab9d8224f506`;只上传一次,未覆盖历史附件或移动标签。草稿浏览器下载副本已按来源、创建时间、字节数和摘要确认后清理,正式发行包保留。标签远端恢复 172 文件、full/strict fsck 通过,见 verification/SpiderReleaseRecovery.json。
|
||||
|
||||
## 1.3.1 正式 PKG
|
||||
|
||||
正式包 `../发行包/大鱼调色-1.3.1.pkg`,14,073,683 字节,SHA-256 `954b10c581f31d23a8c417a6f37b24fae19939786dce8733b4d6f09c7ed3adae`。PKG 公证 `85cad776-c3d7-4037-9643-24041b269002`,Accepted;Installer 团队 B3W25FX5H5、可信时间戳、票据、Gatekeeper 和 20 项真实展开验包通过。包内 APP 与已验收的正式安装一致,APP 实际编译 `dbb7ca4a995ef832178a32f35939aed7d3a85012`;未重复执行系统安装。
|
||||
|
||||
正式 Release 已发布并完整下载校验:[1.3.1 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.3.1-browser-recents-20261101),Release ID 366、附件 ID 12;标签提交 `281721bda11484c23f294b4f0d9e0b30ef829288`,APP 编译 `dbb7ca4a995ef832178a32f35939aed7d3a85012`。附件 14,073,683 字节,SHA-256 `954b10c581f31d23a8c417a6f37b24fae19939786dce8733b4d6f09c7ed3adae`。草稿经已登录会话完整下载校验后发布,正式链接再次完整下载校验;只上传一次并复用同一附件。临时下载副本已核实清理,正式发行包保留。交付标签远端独立恢复 184 文件与 full/strict fsck 通过,见 verification/BrowserReleaseRecovery.json。
|
||||
|
||||
## 蒙版、跟踪与可重复工具的文档交接(2026-11-01)
|
||||
|
||||
文档整理前 main 为 `bbdd47d1d74e241f1f144bb2c245204e86973b3f`。交接标签 `handoff-mask-tracking-tools-20261101` 保存最新 `大鱼调色FxPlug4交接.md` 及 `research/MaskTrackingAndToolStack.md`,区分正式 1.3.1(19)与尚未实现的多个独立 HSL、每实例蒙版和跟踪。本文档提交未重新构建、安装或发布 APP/PKG,不移动原发行标签;父级“大鱼调色盘”只读参考。接续时保护用户当前窗口、布局、LUT 选择和工程。
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"repository": "https://dayu.media/git/dayu/dayu-cst.git",
|
||||
"commit": "973766b51dbcab3ab5092f1955d753575cd32d89",
|
||||
"files": [
|
||||
{
|
||||
"source": "tools/kernels/CSTKernel.ll",
|
||||
"destination": "tools/kernels/CSTKernel.ll",
|
||||
"sha256": "78c2414d1c086dc7eaa043308f0febd32691b1ad49629febdcc1138b232cefc8"
|
||||
},
|
||||
{
|
||||
"source": "tools/kernels/BasisKernel.ll",
|
||||
"destination": "tools/kernels/BasisKernel.ll",
|
||||
"sha256": "221ca94c52a997aa8cb2b2155bb8c7ad57bf0829b0241857664a75e78329a4b3"
|
||||
},
|
||||
{
|
||||
"source": "大鱼CST/Plugin/DayuShaderTypes.h",
|
||||
"destination": "大鱼调色/Plugin/DYCSTTypes.h",
|
||||
"sha256": "3372e3cd77248eeb374e54675d2902befceea8e00a2afc4f9543116ef3027696"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
# CST 色彩管理集成
|
||||
|
||||
本轮以 dayu-cst 的固定源码节点复用 CSTKernel / BasisKernel;原路径和摘要见 CSTIntegration.json,参考仓库保持只读。新处理顺序为输入转换 → 工作空间一级调色 → 输出转换 → 原有基础调整与风格链。曲线和色域独立选择,工作曲线由同一个参数供一级与输出使用,不通过跨实例通知同步。
|
||||
|
||||
沿用大鱼调色的宿主线性 RGB 边界:CST 前恢复编码值,三个阶段内部不使用 3D LUT、不裁切至 0–1;返回宿主线性后再进入原有显示域调色链。此版本的后续 HSL、曲线与风格 LUT 仍是既有显示域工具,不宣称全链路改造成场景线性调色。CST 源内核使用 half 输入,保留其原生精度边界。
|
||||
|
||||
新实例默认输入/输出 Gamma 2.4、Rec.709,工作 DaVinci Intermediate / DaVinci Wide Gamut;自动色调映射默认关闭。按实际素材选择相机曲线/色域。选择自动映射时复用参考代码的场景/显示映射标志。一级默认参数直接沿用 CST 源码。
|
||||
|
||||
一级调色、基础调整默认展开;其余折叠;所有模块眼睛开启。黑白模块增加混合(默认 0),保证眼睛开启不强制把初始画面变成黑白。折叠写入独立的 InspectorToken,仅保存界面状态,不修改任何调色参数、启用位或 LUT 路径。眼睛只修改启用位。
|
||||
|
||||
旧 InspectorToken schema 1 仍可读取:默认跳过新 CST,并保留旧版黑白强度。旧输入 LUT / 相机输入也维持原路径,直到用户明确编辑 CST 参数或选择“旧版输入 → 改用 CST”。新旧模型的前 944 字节 ABI 与所有旧参数 ID 保留。
|
||||
|
||||
Cube 导出改用生产渲染路径生成 33³ 色格,包含新的 CST 与一级参数;关闭不可写入 Cube 的空间细节工具和逐画面统计。用户 LUT 和宿主资料不进入仓库。
|
||||
|
||||
原生模型、真实 AppKit 折叠动作、IOSurface/Metal 和 Cube 导出已通过 153 项检查,其中 21 组参数与正式大鱼 CST 着色器直接逐像素对照(包含 17 个相机输入组合、ACEScct/Linear/新增曲线/显示曲线工作空间)。本机 Apple M4 的最大线性预乘分量误差为 0.0000152587890625。具体输入、原库摘要与边界见 verification/CSTIntegration.json。正式宿主与发行由独立记录确认。
|
||||
|
||||
为避免全眼睛开启让中性查表裁切 HDR,未调整的曲线/HSL/色轮/三原色/色阶/色彩平衡在渲染副本旁路;无其他实际调整时肤色保护也无需执行。原参数、眼睛和界面数值不变。默认输入与输出相同、一级中性且映射关闭时跳过可证明为恒等的往返,避免累积 half 量化误差。
|
||||
@@ -0,0 +1,95 @@
|
||||
# 续作方案:工具实例、蒙版与跟踪
|
||||
|
||||
2026-11-01。**这是下一阶段方案,尚未实现。** 用户明确要增加蒙版、跟踪和可添加工具,并举例“一层 HSL 不够,再加一个 HSL”。本文的具体类型、按钮和实施顺序为建议,不把参考库现有全部功能自动扩为新产品的承诺。
|
||||
|
||||
## 一、先解决多个 HSL 的身份和执行问题
|
||||
|
||||
当前固定 HSL 在 `DYModel.mm` 注册,使用 `DYUniforms` 的一组 `hsl*` 字段,`DYColorTables.mm` 构造一份 24 参数 HSL 查表。`DYGrade.metal` 调用融合的 `dy_grade`,蜘蛛盘随后执行。CST 位于原有显示域调色链之前。
|
||||
|
||||
推荐为可添加工具建立统一实例模型;先开放 HSL,一旦成立再扩展支持的类型。一个实例至少保存稳定 UUID、工具类型及版本、名称、启用状态、混合强度、独立参数和其蒙版引用;作者文档保存有序实例列表。显示名称和列表位置都不能代替身份。
|
||||
|
||||
界面最小闭环:添加工具 → HSL → 出现第二张独立 HSL 卡片 → 调整各自参数 → 单独启停/折叠 → 保存重开仍互不覆盖。复制、删除、重命名、排序是适合此模型的后续操作建议;若本阶段提供,均须使用同一作者状态和单次宿主撤销。
|
||||
|
||||
折叠只写 `folds[nodeID]` 一类界面状态,眼睛写实例启用;不能共用现有 `folds["hsl"]`。所有控件回调、异步加载、选中目标和 Undo 都绑定 nodeID + 参数键,不能绑定可能因插入/删除变化的数组下标。
|
||||
|
||||
### 渲染与旧参数的适配
|
||||
|
||||
先写清工具顺序和每个阶段的颜色域。保持 CST 输入/一级/输出的现有全局前段;新增 HSL 不应再执行一次 CST 或其它全局调整。当前固定链有融合内核,**不能为每个工具直接重复调用整个 `renderSource`**,否则会重复曝光、LUT、统计或空间处理。
|
||||
|
||||
原固定 HSL 可用稳定的兼容实例映射到原参数 ID,以保留旧工程和已有宿主动画;新增 HSL 必须有自己的参数存储与缓存。若需要将原链拆成可重排阶段,先做旧路径与拆分路径数值回归,再让新文档使用新计划。若先采用附加工具段,也必须在界面和文档明确其实际执行位置,不能让 UI 顺序与渲染顺序不同。
|
||||
|
||||
无新增状态的旧工程必须沿用原路径;显式迁移后记录格式版本,避免同一 HSL 同时从旧融合链和新实例链执行两次。旧参数 ID、枚举值、944 字节 ABI 前缀不能重排。新工具使用中性参数时应直通;关闭工具、混合为零或空新增列表应恢复原结果。
|
||||
|
||||
每个实例的查表/中间纹理缓存至少按 device、类型、完整有效参数和相关域信息隔离。第一层调值不能污染第二层。建立完整帧/分块、半透明、负值/HDR、重排以及连续多实例的检查,不把“面板能多开”当成多工具渲染已完成。
|
||||
|
||||
## 二、作者状态、动画和预设先定合同
|
||||
|
||||
本项目现有 `DYAssetState` 在参数 9001,标志含 `NOT_ANIMATABLE`。可以保留它存 LUT/蜘蛛盘资源;若新增工具参数需要宿主关键帧,须另行选择可动画的参数方案或明确时间化作者状态,不能直接塞入 9001 后默认为支持关键帧。
|
||||
|
||||
需区分:宿主可动画参数、工具/蒙版作者数据、逐帧求值后的不可变渲染计划,以及可丢弃缓存。轨迹作者数据随工程保存,运行计划按给定 CMTime 求值,不能由 UI 当前播放头或可变全局选择决定渲染。
|
||||
|
||||
所有新增类型应覆盖 NSSecureCoding 白名单、copy、isEqual、hash、验证、资源路径、预设、宿主归档和渲染状态。当前 InspectorToken schema 2、预设 JSON v3、临时 render-state schema 1 分属不同格式。不要用一次任意“schema++”代替各格式的明确迁移。
|
||||
|
||||
对新数据设置数量/大小/嵌套上限,验证有限数值、合法工具类型、UUID 唯一和引用完整性。失败加载保持旧作者文档;不加载任意类。必要时为当前插件增加明确文档格式,而不是依赖不可版本化的 UI 对象。
|
||||
|
||||
## 三、把蒙版绑定到工具实例
|
||||
|
||||
建议先移植矩形、椭圆和闭合钢笔;羽化、反转、强度和组合规则应有明确数学定义。其它 HSL/亮度键、人物或外部蒙版只作为父库的后续候选,未获本轮逐项指定。
|
||||
|
||||
每个工具保存自己的蒙版列表和当前蒙版 ID。首阶段优先正常混合:`output = mix(toolInput, toolResult, clamp(maskCoverage * toolOpacity, 0, 1))`。多蒙版的加/减/交集顺序、无蒙版的覆盖语义、空路径和禁用蒙版的含义须先确定并测试。不要用一个全局蒙版同时影响所有 HSL。
|
||||
|
||||
CPU、Metal、预览和 OSC 共用坐标合同:源图/目的图范围、宿主 tile bounds、top/bottom origin、非方形像素、缩放/旋转及视图变换都要处理。计算蒙版不能依赖检查器或浏览器尺寸。保留 alpha,明确直通 RGB 与预乘 RGB 的转换和混合边界。
|
||||
|
||||
画面控件通过宿主的 OSC 机制绘制,使用当前效果实例和稳定工具/蒙版 ID 隔离。点击效果标题、开关显示控件、关闭工具窗口后是否保留轮廓等行为在正式 FCP 中验证。不要自建一张静帧预览来冒充宿主当前画面的编辑和跟踪。
|
||||
|
||||
## 四、跟踪移植的范围与易错点
|
||||
|
||||
父库正式68采用 Metal 图像金字塔/正反光流与确定性 RANSAC,输出位置、旋转和独立横纵缩放。其输出合同不包括透视/剪切。建议复用前向、后向、同参考帧双向和前后单帧;连续范围、单帧参考区间、取消行为均按精确帧长定义,不猜帧率。
|
||||
|
||||
从宿主分析接口取得实际源帧。当前 `lookLUTPreview` 只是 320×180 预览,不足以替代最终跟踪输入;也不能靠拖动播放头或缓存最后一帧伪造完整分析。需要检查、实现并验证 FxAnalyzer / FxAnalysisAPI 生命周期和真实帧调度。
|
||||
|
||||
分析开始时冻结效果实例、文档/工具/蒙版 ID、形状 revision、参考 CMTime、范围和帧长。每次结果发布验证目标仍匹配;切片段、切实例、删除工具、编辑蒙版或新一轮分析后,过时回调不得写回当前文档。
|
||||
|
||||
将手工键和自动轨迹分开保存;手工修正优先,合并只替换指定区间的可替换自动结果,保留区间外轨迹、羽化和强度动画。取消保留可信段;空结果不制造作者编辑。低置信度/丢失要有明确提示,不能静默填成功或持续外推。
|
||||
|
||||
**先读父库 `research/tracking-host-lifecycle.md`。** 它记录过提前返回后不收尾、跨 action 分组无效、预览刷新吃掉 Undo/Redo、旧实例在切片段后持续刷新等实际问题。当前可复用方案在准备好结果后,单个有效 action 内完成命名 Undo 起止和完整作者状态写入,然后 endAction;分析收尾保证一次,迟到/重复收尾不再编辑。别恢复早期58–67的已知问题流程。
|
||||
|
||||
## 五、参考库导航(只读)
|
||||
|
||||
本次核对:`/Volumes/备份/大鱼调色/大鱼调色盘`,HEAD `f8950384e514685c8809fe8e8ee2dd5f16ad0bd7`;正式68源码 `d05994d5f4547687511bef524efe8c881e8a5c9c`。接手时先检查差异,若参考更新则固定并记录新节点。
|
||||
|
||||
| 参考入口 | 复用方向 |
|
||||
| --- | --- |
|
||||
| `HANDOFF.md`、`verification/release-2.0.0-build68.json` | 正式68的真实完成范围与宿主证据 |
|
||||
| `Sources/DYSettings.h/.mm` | 作者文档、图层、每层蒙版与归档 |
|
||||
| `Sources/DYPanelLayers.inc` | 图层/工具列表操作与编辑目标 |
|
||||
| `Sources/DYMaskState.h/.mm` | 精确 CMTime、手动/自动键、形状与变换求值 |
|
||||
| `Core/DYMask.h`、`DYMaskOperator.h`、`DYLayerPlan.h` | 蒙版数学、组合/源阶段、渲染计划 |
|
||||
| `Sources/DYPanelMasks.inc`、`DYInspectorMaskControls.inc` | 蒙版编辑器、宿主检查器入口 |
|
||||
| `Core/DYTracker.hpp`、`Sources/DYMetalTracker.h/.mm` | 光流后端、RANSAC、结果/区间合并 |
|
||||
| `Sources/DYPlugin.mm` | FxAnalyzer、目标冻结、取消/收尾、预览归属、Undo 提交 |
|
||||
| `Sources/DYRenderer.mm`、`Shaders/DYColor.metal` | 计划执行、纹理与蒙版合成,需适配本项目 |
|
||||
| `research/tracking-host-lifecycle.md` | 宿主生命周期、单 action 撤销和旧实例刷新防护 |
|
||||
| `Tools/test_tracking.py`、`Tools/test_mask_refinement.py` | 参考测试和合成运动素材思路,不能替代本产品验收 |
|
||||
|
||||
父库有独立 Bundle ID、参数表、1032 字节 DYGrade、作者格式和更大的产品范围。本项目为 1104 字节 DYUniforms。按功能适配源码,保留本产品颜色链和品牌/安装身份;不整仓覆盖、不盲抄 PID/结构体,不把父库已验收数量记成本项目通过。移入源码时记录来源节点、文件摘要与必要资源,构建不得依赖兄弟 APP 或另一目录运行时存在。
|
||||
|
||||
## 六、建议里程碑与验收
|
||||
|
||||
| 阶段 | 可交付行为 | 最低验收重点 |
|
||||
| --- | --- | --- |
|
||||
| A:两个 HSL | 独立添加、调值、眼睛和折叠;实例保存 | 不共用参数/缓存;旧工程画面不变;删除/插入不串目标;单次 Undo/Redo;重开与预设 |
|
||||
| B:每实例蒙版 | 两个 HSL 分别影响不同区域 | 蒙版/羽化/反转/透明度 CPU–GPU 对照;原点、tile、4K与非方形画面;关闭精确旁路 |
|
||||
| C:宿主控件 | 在 FCP 检视器画与改蒙版 | 当前实例隔离、真实拖动/绘制、工具窗口关闭后的行为、一次手势一次撤销 |
|
||||
| D:跟踪 | 实际运动帧驱动对应蒙版 | 前后/双向/单帧;取消可信段;低置信度;手工键优先;精确 CMTime;切片段/旧回调隔离 |
|
||||
| E:正式回归 | 保存、导出、性能与发行 | 冷重开轨迹完整一致;一次 Undo/Redo 的作者文档核对;旧预设/工程、CST/蜘蛛盘/LUT 回归;正式交付 |
|
||||
|
||||
用本产品独立合成源验证平移、旋转、独立轴缩放、边界/透明、局部遮挡或目标离画;量化中心和尺寸误差,并区分算法样本与实机结果。对任意遮挡不能作无证据保证。导出后检查完整运动序列,不能只看静态首帧轮廓。
|
||||
|
||||
新增无蒙版、无逐帧依赖的逐像素 HSL 可表达为 LUT;空间蒙版和跟踪不能完整写入普通 3D Cube。到实现时应明确选择阻止完整导出、或让用户明确导出全局部分,并在 UI 说明;不得静默丢掉局部调色后仍称完整一致。
|
||||
|
||||
## 七、工作与交付边界
|
||||
|
||||
本轮只交接,不实现这些功能、不改变正式 1.3.1(19)。下一轮遵循 `/Users/mac/.codex/AGENTS.md`:先保护当前工作,保存并推送阶段检查点;构建/CLI 测试在固定缓存,用户可见测试走已签名公证的唯一正式安装。新增功能后递增版本/构建号,刷新模型模板,完整签名、公证、安装、FCP 验收、清理、PKG、Release 完整下载与远端恢复。
|
||||
|
||||
用户正在使用浏览器时,不为额外测试重启或复位其工程。优先用新合成测试库,完整保留其 LUT、预设、最近使用和现有轨迹。此任务不需要 NAS 后端部署,不新增生产服务。
|
||||
@@ -0,0 +1,25 @@
|
||||
# 蜘蛛盘和一级白平衡色轮的移植
|
||||
|
||||
参考仓库只读,来源节点及逐文件 SHA-256 在 `SpiderAndBalanceSources.json`;生产构建只使用当前仓库内的源码、图像与 Metal 资源。
|
||||
|
||||
## 蜘蛛盘
|
||||
|
||||
复用“大鱼调色盘”的可变网格、交互和 CPU/Metal 数学。新实例为 6×6(31 个节点),色相与饱和度点数可联动或独立选择 6、8、12、16、24。保留单点同列自由点联动、固定点仍可直接拖动、⌘ 多选、Shift 固定、框选、整环/整列选择、右键复位与键盘微调。
|
||||
|
||||
本项目的 AppKit 适配遵循原工程的手动内存管理,网格仍使用原始结构。中性网格在生产渲染中精确直通;变形网格在既有调色链后运行原始 `dyVariableSpider` 和 `dyLimit`,透明度按原预乘边界处理。眼睛和混合控制独立于折叠,Cube 导出复用相同路径。
|
||||
|
||||
网格、固定点、密度及联动状态保存在现有 DYAssetState 自定义参数中。预设 schema 3 增加 JSON 蜘蛛盘数据,旧预设恢复为中性新盘;旧模型和参数 ID 继续注册。主线程只写小型状态,渲染侧按 Metal device 缓存样本网格。
|
||||
|
||||
## 一级白平衡
|
||||
|
||||
复用“大鱼 CST”的色轮图像和交互换算:+104° 方位校正、拖动距离 /5、圆形强度约束、双击归零。一级色轮直接写原 BASIS 的方向与强度参数,取代可见的两根滑块;角度参数范围修正为 0–360°,旧存储数值保持原解释。原 BASIS 的强度平方后乘 4 换算不变。
|
||||
|
||||
色轮与蜘蛛盘每次拖动都由 FxUndoAPI 合并成一次宿主撤销;视图移除或释放时结束未完成动作。
|
||||
|
||||
## 面板与兼容
|
||||
|
||||
输入转换、工作空间、一级参数、输出转换合并为一个一级调色卡片。移除可见的四个旧旁路选项,一级眼睛统一启停;旧阶段开关和旁路参数仍保留注册,避免仅打开旧工程就改变画面。用户明确编辑 CST/色轮或复位时才清理旧旁路。
|
||||
|
||||
新实例与全部还原默认展开一级调色、蜘蛛盘校色仪、基础调整,其他模块折叠,所有眼睛开启。折叠状态仍由 InspectorToken schema 2 保存,与渲染状态分离。
|
||||
|
||||
验证分为原生数学/像素检查、AppKit 回调检查和正式 FCP 操作记录。数学覆盖见 `verification/SpiderMath.json`,原生集成见 `verification/SpiderAndBalance.json`;正式宿主记录单独保存,不以离屏回调代替用户界面验收。
|
||||
@@ -0,0 +1,41 @@
|
||||
[
|
||||
{
|
||||
"repository": "https://dayu.media/git/dayu/dayu-colorplate.git",
|
||||
"commit": "f8950384e514685c8809fe8e8ee2dd5f16ad0bd7",
|
||||
"source": "Core/DYColorMath.h",
|
||||
"destination": "大鱼调色/Plugin/SpiderCore/DYColorMath.h",
|
||||
"sha256": "bdd6278e17ff4208ad94a8b0e834c817c0a3475f205dd79898e8fd88e84a19c9"
|
||||
},
|
||||
{
|
||||
"repository": "https://dayu.media/git/dayu/dayu-colorplate.git",
|
||||
"commit": "f8950384e514685c8809fe8e8ee2dd5f16ad0bd7",
|
||||
"source": "Core/DYSpiderMesh.hpp",
|
||||
"destination": "大鱼调色/Plugin/SpiderCore/DYSpiderMesh.hpp",
|
||||
"sha256": "81ecf1f0bae4030615144c7cd7ca492f93f2d718ff9e45da8242f97848e3d754"
|
||||
},
|
||||
{
|
||||
"repository": "https://dayu.media/git/dayu/dayu-cst.git",
|
||||
"commit": "973766b51dbcab3ab5092f1955d753575cd32d89",
|
||||
"source": "大鱼CST/Plugin/Resources/Basis_balanceWheel.png",
|
||||
"destination": "大鱼调色/Plugin/Resources/Basis_balanceWheel.png",
|
||||
"sha256": "56d6cc32611f90b53dfa2ae221d5d1c9633ae494b32bc3050ec85b8ad1220989"
|
||||
},
|
||||
{
|
||||
"repository": "https://dayu.media/git/dayu/dayu-colorplate.git",
|
||||
"commit": "f8950384e514685c8809fe8e8ee2dd5f16ad0bd7",
|
||||
"source": "Sources/DYPanel.mm",
|
||||
"sourceSHA256": "80c6d07abab2d9a78a6c7070e2edf395289a952c731d05423681727aed97035e",
|
||||
"section": "DYSpider class and point-count controls",
|
||||
"adaptedDestination": "DYSpiderDisc.inc.h / DYNewPanels.inc.h",
|
||||
"adaptations": "Host parameter adapter, manual ownership and this product theme; original geometry and control math retained."
|
||||
},
|
||||
{
|
||||
"repository": "https://dayu.media/git/dayu/dayu-cst.git",
|
||||
"commit": "973766b51dbcab3ab5092f1955d753575cd32d89",
|
||||
"source": "大鱼CST/Plugin/DayuCustomViews.mm",
|
||||
"sourceSHA256": "18e3bece1f627a24b875e9d02cbe938c183f6ed2ae9081e668ba460e5bf5d051",
|
||||
"section": "DayuBalanceWheelView: +104 degree orientation, /5 drag scale and radial clamp",
|
||||
"adaptedDestination": "DYNewPanels.inc.h",
|
||||
"adaptations": "Host parameter adapter, manual ownership and this product theme; original geometry and control math retained."
|
||||
}
|
||||
]
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"archivesBase64": {
|
||||
"9000": "AAAAAAAAAb0qYnBsaXN0MDDUAQIDBAUGBwxYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05TS2V5ZWRBcmNoaXZlctIICQoLXERhdGFJc0xlZ2FjeV8QD0JsaW5kRGF0YU9iamVjdIACgAGjDQ4PVSRudWxsTxD+YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVtDdXN0b20gRGF0YYABowsMEVUkbnVsbNINDg8QVnNjaGVtYVYkY2xhc3MQAYAC0hITFBVaJGNsYXNzbmFtZVgkY2xhc3Nlc18QEERZSW5zcGVjdG9yVG9rZW6iFhdfEBBEWUluc3BlY3RvclRva2VuWE5TT2JqZWN0CBEaJCkyN0lMWFpeZGlwd3l7gIuUp6q9AAAAAAAAAQEAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAMYIAAgAEQAaACQAKQAyADcASQBOAFsAbQBvAHEAdQB7AXwAAAAAAAACAQAAAAAAAAAQAAAAAAAAAAAAAAAAAAABfQA=",
|
||||
"9001": "AAAAAAAAAe8qYnBsaXN0MDDUAQIDBAUGBwxYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05TS2V5ZWRBcmNoaXZlctIICQoLXERhdGFJc0xlZ2FjeV8QD0JsaW5kRGF0YU9iamVjdIACgAGjDQ4PVSRudWxsTxEBL2JwbGlzdDAw1AECAwQFBgcKWCR2ZXJzaW9uWSRhcmNoaXZlclQkdG9wWCRvYmplY3RzEgABhqBfEA9OU0tleWVkQXJjaGl2ZXLRCAlbQ3VzdG9tIERhdGGAAaULDBEXHVUkbnVsbNINDg8QVXBhdGhzViRjbGFzc4ACgATTEhMOFBUWV05TLmtleXNaTlMub2JqZWN0c6CggAPSGBkaG1okY2xhc3NuYW1lWCRjbGFzc2VzXE5TRGljdGlvbmFyeaIaHFhOU09iamVjdNIYGR4fXERZQXNzZXRTdGF0ZaIgHFxEWUFzc2V0U3RhdGUIERokKTI3SUxYWmBma3F4enyDi5aXmJqfqrPAw8zR3uEAAAAAAAABAQAAAAAAAAAhAAAAAAAAAAAAAAAAAAAA7ggACAARABoAJAApADIANwBJAE4AWwBtAG8AcQB1AHsBrgAAAAAAAAIBAAAAAAAAABAAAAAAAAAAAAAAAAAAAAGvAA=="
|
||||
"9000": "AAAAAAAAAisqYnBsaXN0MDDUAQIDBAUGBwxYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05TS2V5ZWRBcmNoaXZlctIICQoLXERhdGFJc0xlZ2FjeV8QD0JsaW5kRGF0YU9iamVjdIACgAGjDQ4PVSRudWxsTxEBa2JwbGlzdDAw1AECAwQFBgcKWCR2ZXJzaW9uWSRhcmNoaXZlclQkdG9wWCRvYmplY3RzEgABhqBfEA9OU0tleWVkQXJjaGl2ZXLRCAlbQ3VzdG9tIERhdGGAAaULDBMZH1UkbnVsbNMNDg8QERJVZm9sZHNWc2NoZW1hViRjbGFzc4ACEAKABNMUFQ8WFxhXTlMua2V5c1pOUy5vYmplY3RzoKCAA9IaGxwdWiRjbGFzc25hbWVYJGNsYXNzZXNcTlNEaWN0aW9uYXJ5ohweWE5TT2JqZWN00hobICFfEBBEWUluc3BlY3RvclRva2VuoiIeXxAQRFlJbnNwZWN0b3JUb2tlbgAIABEAGgAkACkAMgA3AEkATABYAFoAYABmAG0AcwB6AIEAgwCFAIcAjgCWAKEAogCjAKUAqgC1AL4AywDOANcA3ADvAPIAAAAAAAACAQAAAAAAAAAjAAAAAAAAAAAAAAAAAAABBQgACAARABoAJAApADIANwBJAE4AWwBtAG8AcQB1AHsB6gAAAAAAAAIBAAAAAAAAABAAAAAAAAAAAAAAAAAAAAHrAA==",
|
||||
"9001": "AAAAAAAAAjcqYnBsaXN0MDDUAQIDBAUGBwxYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05TS2V5ZWRBcmNoaXZlctIICQoLXERhdGFJc0xlZ2FjeV8QD0JsaW5kRGF0YU9iamVjdIACgAGjDQ4PVSRudWxsTxEBd2JwbGlzdDAw1AECAwQFBgcKWCR2ZXJzaW9uWSRhcmNoaXZlclQkdG9wWCRvYmplY3RzEgABhqBfEA9OU0tleWVkQXJjaGl2ZXLRCAlbQ3VzdG9tIERhdGGAAaULDBUbIVUkbnVsbNQNDg8QERITFFVwYXRoc1YkY2xhc3Ncc3BpZGVyTGlua2VkWnNwaWRlck1lc2iAAoAECYAA0xYXDhgZGldOUy5rZXlzWk5TLm9iamVjdHOgoIAD0hwdHh9aJGNsYXNzbmFtZVgkY2xhc3Nlc1xOU0RpY3Rpb25hcnmiHiBYTlNPYmplY3TSHB0iI1xEWUFzc2V0U3RhdGWiJCBcRFlBc3NldFN0YXRlAAgAEQAaACQAKQAyADcASQBMAFgAWgBgAGYAbwB1AHwAiQCUAJYAmACZAJsAogCqALUAtgC3ALkAvgDJANIA3wDiAOsA8AD9AQAAAAAAAAACAQAAAAAAAAAlAAAAAAAAAAAAAAAAAAABDQgACAARABoAJAApADIANwBJAE4AWwBtAG8AcQB1AHsB9gAAAAAAAAIBAAAAAAAAABAAAAAAAAAAAAAAAAAAAAH3AA=="
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
@@ -44,10 +44,834 @@
|
||||
"offset": 56,
|
||||
"pid": 2014,
|
||||
"step": 0.01,
|
||||
"title": "输入强度"
|
||||
"title": "旧版输入强度"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"key": "cmConfigured",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
"min": -1,
|
||||
"offset": 944,
|
||||
"pid": 2236,
|
||||
"step": 0.01,
|
||||
"title": "CST 配置版本"
|
||||
},
|
||||
{
|
||||
"cmTab": 0,
|
||||
"default": 1,
|
||||
"key": "cminputEnabled",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 964,
|
||||
"pid": 2241,
|
||||
"step": 0.01,
|
||||
"title": "输入转换启用"
|
||||
},
|
||||
{
|
||||
"cmTab": 0,
|
||||
"default": 28,
|
||||
"key": "cminputTransfer",
|
||||
"kind": "popup",
|
||||
"max": 1003,
|
||||
"min": 0,
|
||||
"notAnimatable": true,
|
||||
"offset": 948,
|
||||
"options": [
|
||||
"KOLOR Default",
|
||||
"ACEScct",
|
||||
"Apple Log",
|
||||
"Apple Log 2",
|
||||
"ARRI LogC3",
|
||||
"ARRI LogC4",
|
||||
"Blackmagic Film Gen 5",
|
||||
"Canon C-Log",
|
||||
"Canon C-Log 2",
|
||||
"Canon C-Log 3",
|
||||
"DaVinci Intermediate",
|
||||
"DJI D-Log",
|
||||
"DJI D-Log 2",
|
||||
"DJI D-Log M",
|
||||
"Fujifilm F-Log",
|
||||
"Fujifilm F-Log2",
|
||||
"Fujifilm F-Log2 C",
|
||||
"GoPro GP-Log",
|
||||
"GoPro GP-Log2",
|
||||
"GoPro GP-Log2 (Official, 0 EV)",
|
||||
"Insta I-Log",
|
||||
"Leica L-Log",
|
||||
"Linear",
|
||||
"Nikon N-Log",
|
||||
"Panasonic V-Log",
|
||||
"Phantom Log 1",
|
||||
"Phantom Log 2",
|
||||
"REDLog3G10",
|
||||
"Samsung Log",
|
||||
"Sony S-Log2",
|
||||
"Sony S-Log3",
|
||||
"Gamma 2.2",
|
||||
"Gamma 2.4",
|
||||
"Gamma 2.6"
|
||||
],
|
||||
"pid": 2237,
|
||||
"step": 1,
|
||||
"title": "输入曲线",
|
||||
"values": [
|
||||
99,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
30,
|
||||
29,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
1001,
|
||||
1002,
|
||||
1003
|
||||
]
|
||||
},
|
||||
{
|
||||
"cmTab": 0,
|
||||
"default": 27,
|
||||
"key": "cminputGamut",
|
||||
"kind": "popup",
|
||||
"max": 1003,
|
||||
"min": 0,
|
||||
"notAnimatable": true,
|
||||
"offset": 952,
|
||||
"options": [
|
||||
"KOLOR Default",
|
||||
"ACES AP0",
|
||||
"ACES AP1",
|
||||
"Apple Log 2",
|
||||
"ARRI WG3",
|
||||
"ARRI WG4",
|
||||
"Blackmagic Wide Gamut",
|
||||
"Canon Cinema Gamut",
|
||||
"DaVinci Wide Gamut",
|
||||
"DJI Action 5",
|
||||
"DJI Air 2S",
|
||||
"DJI D-Gamut",
|
||||
"DJI D-Gamut 2",
|
||||
"DJI Mavic2 Pro",
|
||||
"DJI Mavic 3 Pro",
|
||||
"DJI Mini 4 Pro",
|
||||
"DJI Mini 5 Pro",
|
||||
"DJI Pocket 3",
|
||||
"Fujifilm F-GamutC",
|
||||
"GoPro GP-Log",
|
||||
"P3-DCI",
|
||||
"P3 D65",
|
||||
"Panasonic V-Gamut",
|
||||
"Rec.709 / BT.709",
|
||||
"Rec.2020 / BT.2020",
|
||||
"RED Wide Gamut RGB",
|
||||
"Sony S-Gamut",
|
||||
"Sony S-Gamut3",
|
||||
"Sony S-Gamut3.Cine"
|
||||
],
|
||||
"pid": 2238,
|
||||
"step": 1,
|
||||
"title": "输入色域",
|
||||
"values": [
|
||||
99,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
16,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
28,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27
|
||||
]
|
||||
},
|
||||
{
|
||||
"cmTab": 0,
|
||||
"default": 10,
|
||||
"key": "cmworkingTransfer",
|
||||
"kind": "popup",
|
||||
"max": 1003,
|
||||
"min": 0,
|
||||
"notAnimatable": true,
|
||||
"offset": 956,
|
||||
"options": [
|
||||
"KOLOR Default",
|
||||
"ACEScct",
|
||||
"Apple Log",
|
||||
"Apple Log 2",
|
||||
"ARRI LogC3",
|
||||
"ARRI LogC4",
|
||||
"Blackmagic Film Gen 5",
|
||||
"Canon C-Log",
|
||||
"Canon C-Log 2",
|
||||
"Canon C-Log 3",
|
||||
"DaVinci Intermediate",
|
||||
"DJI D-Log",
|
||||
"DJI D-Log 2",
|
||||
"DJI D-Log M",
|
||||
"Fujifilm F-Log",
|
||||
"Fujifilm F-Log2",
|
||||
"Fujifilm F-Log2 C",
|
||||
"GoPro GP-Log",
|
||||
"GoPro GP-Log2",
|
||||
"GoPro GP-Log2 (Official, 0 EV)",
|
||||
"Insta I-Log",
|
||||
"Leica L-Log",
|
||||
"Linear",
|
||||
"Nikon N-Log",
|
||||
"Panasonic V-Log",
|
||||
"Phantom Log 1",
|
||||
"Phantom Log 2",
|
||||
"REDLog3G10",
|
||||
"Samsung Log",
|
||||
"Sony S-Log2",
|
||||
"Sony S-Log3",
|
||||
"Gamma 2.2",
|
||||
"Gamma 2.4",
|
||||
"Gamma 2.6"
|
||||
],
|
||||
"pid": 2239,
|
||||
"step": 1,
|
||||
"title": "工作曲线",
|
||||
"values": [
|
||||
99,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
30,
|
||||
29,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
1001,
|
||||
1002,
|
||||
1003
|
||||
]
|
||||
},
|
||||
{
|
||||
"cmTab": 0,
|
||||
"default": 16,
|
||||
"key": "cmworkingGamut",
|
||||
"kind": "popup",
|
||||
"max": 1003,
|
||||
"min": 0,
|
||||
"notAnimatable": true,
|
||||
"offset": 960,
|
||||
"options": [
|
||||
"KOLOR Default",
|
||||
"ACES AP0",
|
||||
"ACES AP1",
|
||||
"Apple Log 2",
|
||||
"ARRI WG3",
|
||||
"ARRI WG4",
|
||||
"Blackmagic Wide Gamut",
|
||||
"Canon Cinema Gamut",
|
||||
"DaVinci Wide Gamut",
|
||||
"DJI Action 5",
|
||||
"DJI Air 2S",
|
||||
"DJI D-Gamut",
|
||||
"DJI D-Gamut 2",
|
||||
"DJI Mavic2 Pro",
|
||||
"DJI Mavic 3 Pro",
|
||||
"DJI Mini 4 Pro",
|
||||
"DJI Mini 5 Pro",
|
||||
"DJI Pocket 3",
|
||||
"Fujifilm F-GamutC",
|
||||
"GoPro GP-Log",
|
||||
"P3-DCI",
|
||||
"P3 D65",
|
||||
"Panasonic V-Gamut",
|
||||
"Rec.709 / BT.709",
|
||||
"Rec.2020 / BT.2020",
|
||||
"RED Wide Gamut RGB",
|
||||
"Sony S-Gamut",
|
||||
"Sony S-Gamut3",
|
||||
"Sony S-Gamut3.Cine"
|
||||
],
|
||||
"pid": 2240,
|
||||
"step": 1,
|
||||
"title": "工作色域",
|
||||
"values": [
|
||||
99,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
16,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
28,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27
|
||||
]
|
||||
},
|
||||
{
|
||||
"cmTab": 0,
|
||||
"default": 1,
|
||||
"key": "cmmix",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1076,
|
||||
"pid": 2269,
|
||||
"step": 0.01,
|
||||
"title": "CST 混合"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 1,
|
||||
"key": "cmbasisEnabled",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 968,
|
||||
"pid": 2242,
|
||||
"step": 0.01,
|
||||
"title": "一级调色启用"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmexposure",
|
||||
"kind": "float",
|
||||
"max": 5,
|
||||
"min": -5,
|
||||
"offset": 988,
|
||||
"pid": 2247,
|
||||
"step": 0.01,
|
||||
"title": "一级曝光"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmbalanceAngle",
|
||||
"kind": "float",
|
||||
"max": 360,
|
||||
"min": 0,
|
||||
"offset": 992,
|
||||
"pid": 2248,
|
||||
"step": 1,
|
||||
"title": "色彩平衡方向"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmbalanceStrength",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 996,
|
||||
"pid": 2249,
|
||||
"step": 0.01,
|
||||
"title": "色彩平衡强度"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 1,
|
||||
"key": "cmsaturation",
|
||||
"kind": "float",
|
||||
"max": 2,
|
||||
"min": 0,
|
||||
"offset": 1000,
|
||||
"pid": 2250,
|
||||
"step": 0.01,
|
||||
"title": "一级饱和度"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmcontrast",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": -1,
|
||||
"offset": 1004,
|
||||
"pid": 2251,
|
||||
"step": 0.01,
|
||||
"title": "一级对比度"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmpivot",
|
||||
"kind": "float",
|
||||
"max": 3,
|
||||
"min": -3,
|
||||
"offset": 1008,
|
||||
"pid": 2252,
|
||||
"step": 0.01,
|
||||
"title": "对比度轴心"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmhiContrast",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": -1,
|
||||
"offset": 1012,
|
||||
"pid": 2253,
|
||||
"step": 0.01,
|
||||
"title": "高光对比度"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmhiPivot",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": -1,
|
||||
"offset": 1016,
|
||||
"pid": 2254,
|
||||
"step": 0.01,
|
||||
"title": "高光轴心"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmshadowContrast",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": -1,
|
||||
"offset": 1020,
|
||||
"pid": 2255,
|
||||
"step": 0.01,
|
||||
"title": "阴影对比度"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmshadowPivot",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": -1,
|
||||
"offset": 1024,
|
||||
"pid": 2256,
|
||||
"step": 0.01,
|
||||
"title": "阴影轴心"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 1,
|
||||
"key": "cmwhite",
|
||||
"kind": "float",
|
||||
"max": 1.5,
|
||||
"min": 0.5,
|
||||
"offset": 1028,
|
||||
"pid": 2257,
|
||||
"step": 0.01,
|
||||
"title": "白点"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0.5,
|
||||
"key": "cmshoulder",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1032,
|
||||
"pid": 2258,
|
||||
"step": 0.01,
|
||||
"title": "肩部压缩"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmhighlights",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": -1,
|
||||
"offset": 1036,
|
||||
"pid": 2259,
|
||||
"step": 0.01,
|
||||
"title": "一级高光"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmmidtones",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": -1,
|
||||
"offset": 1040,
|
||||
"pid": 2260,
|
||||
"step": 0.01,
|
||||
"title": "一级中间调"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmshadows",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": -1,
|
||||
"offset": 1044,
|
||||
"pid": 2261,
|
||||
"step": 0.01,
|
||||
"title": "一级阴影"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmblack",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": -1,
|
||||
"offset": 1048,
|
||||
"pid": 2262,
|
||||
"step": 0.01,
|
||||
"title": "黑点"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0.5,
|
||||
"key": "cmtoe",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1052,
|
||||
"pid": 2263,
|
||||
"step": 0.01,
|
||||
"title": "趾部压缩"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0.5,
|
||||
"key": "cmchromaMix",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1056,
|
||||
"pid": 2264,
|
||||
"step": 0.01,
|
||||
"title": "色度混合"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmbypassExposure",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1060,
|
||||
"pid": 2265,
|
||||
"step": 0.01,
|
||||
"title": "旁路一级曝光"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmbypassBalance",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1064,
|
||||
"pid": 2266,
|
||||
"step": 0.01,
|
||||
"title": "旁路一级色彩"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmbypassContrast",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1068,
|
||||
"pid": 2267,
|
||||
"step": 0.01,
|
||||
"title": "旁路一级对比"
|
||||
},
|
||||
{
|
||||
"cmTab": 1,
|
||||
"default": 0,
|
||||
"key": "cmbypassTone",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1072,
|
||||
"pid": 2268,
|
||||
"step": 0.01,
|
||||
"title": "旁路一级影调"
|
||||
},
|
||||
{
|
||||
"cmTab": 2,
|
||||
"default": 1,
|
||||
"key": "cmoutputEnabled",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 972,
|
||||
"pid": 2243,
|
||||
"step": 0.01,
|
||||
"title": "输出转换启用"
|
||||
},
|
||||
{
|
||||
"cmTab": 2,
|
||||
"default": 1002,
|
||||
"key": "cmoutputTransfer",
|
||||
"kind": "popup",
|
||||
"max": 1003,
|
||||
"min": 0,
|
||||
"notAnimatable": true,
|
||||
"offset": 976,
|
||||
"options": [
|
||||
"KOLOR Default",
|
||||
"ACEScct",
|
||||
"Apple Log",
|
||||
"Apple Log 2",
|
||||
"ARRI LogC3",
|
||||
"ARRI LogC4",
|
||||
"Blackmagic Film Gen 5",
|
||||
"Canon C-Log",
|
||||
"Canon C-Log 2",
|
||||
"Canon C-Log 3",
|
||||
"DaVinci Intermediate",
|
||||
"DJI D-Log",
|
||||
"DJI D-Log 2",
|
||||
"DJI D-Log M",
|
||||
"Fujifilm F-Log",
|
||||
"Fujifilm F-Log2",
|
||||
"Fujifilm F-Log2 C",
|
||||
"GoPro GP-Log",
|
||||
"GoPro GP-Log2",
|
||||
"GoPro GP-Log2 (Official, 0 EV)",
|
||||
"Insta I-Log",
|
||||
"Leica L-Log",
|
||||
"Linear",
|
||||
"Nikon N-Log",
|
||||
"Panasonic V-Log",
|
||||
"Phantom Log 1",
|
||||
"Phantom Log 2",
|
||||
"REDLog3G10",
|
||||
"Samsung Log",
|
||||
"Sony S-Log2",
|
||||
"Sony S-Log3",
|
||||
"Gamma 2.2",
|
||||
"Gamma 2.4",
|
||||
"Gamma 2.6"
|
||||
],
|
||||
"pid": 2244,
|
||||
"step": 1,
|
||||
"title": "输出曲线",
|
||||
"values": [
|
||||
99,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
30,
|
||||
29,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
1001,
|
||||
1002,
|
||||
1003
|
||||
]
|
||||
},
|
||||
{
|
||||
"cmTab": 2,
|
||||
"default": 22,
|
||||
"key": "cmoutputGamut",
|
||||
"kind": "popup",
|
||||
"max": 1003,
|
||||
"min": 0,
|
||||
"notAnimatable": true,
|
||||
"offset": 980,
|
||||
"options": [
|
||||
"KOLOR Default",
|
||||
"ACES AP0",
|
||||
"ACES AP1",
|
||||
"Apple Log 2",
|
||||
"ARRI WG3",
|
||||
"ARRI WG4",
|
||||
"Blackmagic Wide Gamut",
|
||||
"Canon Cinema Gamut",
|
||||
"DaVinci Wide Gamut",
|
||||
"DJI Action 5",
|
||||
"DJI Air 2S",
|
||||
"DJI D-Gamut",
|
||||
"DJI D-Gamut 2",
|
||||
"DJI Mavic2 Pro",
|
||||
"DJI Mavic 3 Pro",
|
||||
"DJI Mini 4 Pro",
|
||||
"DJI Mini 5 Pro",
|
||||
"DJI Pocket 3",
|
||||
"Fujifilm F-GamutC",
|
||||
"GoPro GP-Log",
|
||||
"P3-DCI",
|
||||
"P3 D65",
|
||||
"Panasonic V-Gamut",
|
||||
"Rec.709 / BT.709",
|
||||
"Rec.2020 / BT.2020",
|
||||
"RED Wide Gamut RGB",
|
||||
"Sony S-Gamut",
|
||||
"Sony S-Gamut3",
|
||||
"Sony S-Gamut3.Cine"
|
||||
],
|
||||
"pid": 2245,
|
||||
"step": 1,
|
||||
"title": "输出色域",
|
||||
"values": [
|
||||
99,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
16,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
28,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27
|
||||
]
|
||||
},
|
||||
{
|
||||
"cmTab": 2,
|
||||
"default": 0,
|
||||
"key": "cmtoneMapping",
|
||||
"kind": "popup",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"notAnimatable": true,
|
||||
"offset": 984,
|
||||
"options": [
|
||||
"关闭",
|
||||
"开启"
|
||||
],
|
||||
"pid": 2246,
|
||||
"step": 0.01,
|
||||
"title": "自动色调映射",
|
||||
"values": [
|
||||
0,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"key": "inputEnabled",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
@@ -55,7 +879,7 @@
|
||||
"offset": 132,
|
||||
"pid": 2033,
|
||||
"step": 0.01,
|
||||
"title": "输入 / LUT"
|
||||
"title": "输入转换 / CST"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
@@ -368,6 +1192,39 @@
|
||||
"step": 1,
|
||||
"title": "复制时自动调色"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"key": "primaryMasterEnabled",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1084,
|
||||
"pid": 2271,
|
||||
"step": 0.01,
|
||||
"title": "一级调色总开关"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"key": "spiderMix",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1092,
|
||||
"pid": 2273,
|
||||
"step": 0.01,
|
||||
"title": "蜘蛛盘混合"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"key": "spiderEnabled",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1088,
|
||||
"pid": 2272,
|
||||
"step": 0.01,
|
||||
"title": "蜘蛛盘校色仪"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"key": "baseEnabled",
|
||||
@@ -413,7 +1270,7 @@
|
||||
"title": "肤色色相"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"default": 1,
|
||||
"key": "skinEnabled",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
@@ -523,7 +1380,7 @@
|
||||
"title": "风格 5 强度"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"default": 1,
|
||||
"key": "lookEnabled",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
@@ -1106,7 +1963,7 @@
|
||||
"title": "蓝 扩展点4 X"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"default": 1,
|
||||
"key": "curveEnabled",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
@@ -1491,7 +2348,7 @@
|
||||
"title": "显示自定义色选区"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"default": 1,
|
||||
"key": "hslEnabled",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
@@ -1656,7 +2513,7 @@
|
||||
"title": "平衡"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"default": 1,
|
||||
"key": "gradingEnabled",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
@@ -1733,7 +2590,7 @@
|
||||
"title": "蓝原色 饱和度"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"default": 1,
|
||||
"key": "primariesEnabled",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
@@ -1964,7 +2821,7 @@
|
||||
"title": "蓝 输出白"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"default": 1,
|
||||
"key": "levelsEnabled",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
@@ -2064,6 +2921,17 @@
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"key": "blackWhiteMix",
|
||||
"kind": "float",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"offset": 1080,
|
||||
"pid": 2270,
|
||||
"step": 0.01,
|
||||
"title": "黑白混合"
|
||||
},
|
||||
{
|
||||
"default": 1,
|
||||
"key": "blackwhiteEnabled",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
@@ -2184,7 +3052,7 @@
|
||||
"title": "高光 黄 ↔ 蓝"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"default": 1,
|
||||
"key": "balanceEnabled",
|
||||
"kind": "bool",
|
||||
"max": 1,
|
||||
@@ -2197,8 +3065,13 @@
|
||||
],
|
||||
"sourceSHA256": {
|
||||
"template/tools/dump_model.mm": "2ef22e010e0cae15b73107d39fb2c125f6049b1e5405e88078f936cf29e79350",
|
||||
"大鱼调色/Plugin/DYModel.h": "66507eb37e0c0e3426a10ab45f7388fd53fcba570a715a6574396056731d5129",
|
||||
"大鱼调色/Plugin/DYModel.mm": "cf46784f302014d7c025249c5ebbd02505a5e70739ec3ffc0d269890601bb5c5",
|
||||
"大鱼调色/Plugin/DYUniforms.h": "06db5ec83703aa320c9569a7de08617a2fdbc535ac29f438558959d485aa2138"
|
||||
"大鱼调色/Plugin/DYCSTTypes.h": "3372e3cd77248eeb374e54675d2902befceea8e00a2afc4f9543116ef3027696",
|
||||
"大鱼调色/Plugin/DYColorManagement.h": "b0a4cd1b8c45dbce90a7b4f30f72ebf95ecd382895e74e3bfeda0f7cdb185157",
|
||||
"大鱼调色/Plugin/DYModel.h": "80e88add97deeac7a9dc47d12f68b0245905786297de2e6553b3da15c729da6e",
|
||||
"大鱼调色/Plugin/DYModel.mm": "bbc393bd1b5fb4e98ce800a017d8ea3544e0904035c86421dac8cf6fcb05a6a0",
|
||||
"大鱼调色/Plugin/DYSpiderState.h": "0c80747e41e8fc97762e301b011bd08c18865a825eaafde086ed79ace37b22f9",
|
||||
"大鱼调色/Plugin/DYUniforms.h": "8ef480025c739b29f55884ba0c7218e9d6fd8d80c46cfc72d6ee3da90215abe4",
|
||||
"大鱼调色/Plugin/SpiderCore/DYColorMath.h": "bdd6278e17ff4208ad94a8b0e834c817c0a3475f205dd79898e8fd88e84a19c9",
|
||||
"大鱼调色/Plugin/SpiderCore/DYSpiderMesh.hpp": "81ecf1f0bae4030615144c7cd7ca492f93f2d718ff9e45da8242f97848e3d754"
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"passed": true,
|
||||
"sha256": "ebf8b7aa7a6781b9ce611375a838d89997656b0fc01077b2a7e5b1b2a2c373e1",
|
||||
"sha256": "86d62016bf9089d1eda07cc6a533bcb82d905df18351f48e73d6fb87945e09de",
|
||||
"version": "5.13",
|
||||
"displayversion": "5.6.7",
|
||||
"filterCount": 1,
|
||||
"nativeFloatParameters": 196,
|
||||
"nativeFloatParameters": 234,
|
||||
"customParameters": 2,
|
||||
"publications": [
|
||||
{
|
||||
|
||||
+54
-16
@@ -293,17 +293,51 @@
|
||||
<baseFlags>8589934608</baseFlags>
|
||||
<parameter name="大鱼调色" id="9000" flags="12884901888">
|
||||
<numberOfKeypoints>0</numberOfKeypoints>
|
||||
<defaultVal>*********PoeMb-gOLBoA11I*E61-*I4-klM75NZQbBdPqtN743mMqVdRaJmJ0FoPr-M74xWOaJXR5AG**44c3wE1otHGqJtNKF-QaBcOLNZQh660Ec9L2FVR437QolZNq3XSJwE1o7gOKtYF43oMIxWOaJXR6*0U*4X1EsDJGFiRKlgHl1yMb-gOLBoA11I*E61-*I4-kdM75NZQbBdPqtN743mMqVdRaJmJ0FoPr-M74xWOaJXR5AG**44c3wE1otHGqJtNKF-QaBcOLNZQh260Jh1RLBoPqoUF43oMM*-ckgA2JIYPbJgPB6B1UwEJbBXO4JhMJMYMqlVQrAE*M*0oV6H3-JO74BgMLBnPa3hNJUYMqlVQrBZQpwE22FNGKtnQ4JXR4xmJ4xfNKuW3VRT2--2KIZiQr-ZMrFjQZFjOqJiK2tHHq7eNKBo0-2O70YmBoZAK3dSN4ZkRrZvU6iIduex*********E2*********4********************AM6**U*2E*O*0E*8E*m*1Q*GE-C*3g*PE-j*52*RE-v*Lk********0*E*********E*******************-TE*</defaultVal>
|
||||
<dataValue>*********PoeMb-gOLBoA11I*E61-*I4-klM75NZQbBdPqtN743mMqVdRaJmJ0FoPr-M74xWOaJXR5AG**44c3wE1otHGqJtNKF-QaBcOLNZQh660Ec9L2FVR437QolZNq3XSJwE1o7gOKtYF43oMIxWOaJXR6*0U*4X1EsDJGFiRKlgHl1yMb-gOLBoA11I*E61-*I4-kdM75NZQbBdPqtN743mMqVdRaJmJ0FoPr-M74xWOaJXR5AG**44c3wE1otHGqJtNKF-QaBcOLNZQh260Jh1RLBoPqoUF43oMM*-ckgA2JIYPbJgPB6B1UwEJbBXO4JhMJMYMqlVQrAE*M*0oV6H3-JO74BgMLBnPa3hNJUYMqlVQrBZQpwE22FNGKtnQ4JXR4xmJ4xfNKuW3VRT2--2KIZiQr-ZMrFjQZFjOqJiK2tHHq7eNKBo0-2O70YmBoZAK3dSN4ZkRrZvU6iIduex*********E2*********4********************AM6**U*2E*O*0E*8E*m*1Q*GE-C*3g*PE-j*52*RE-v*Lk********0*E*********E*******************-TE*</dataValue>
|
||||
<defaultVal>*********WgeMb-gOLBoA11I*E61-*I4-klM75NZQbBdPqtN743mMqVdRaJmJ0FoPr-M74xWOaJXR5AG**44c3wE1otHGqJtNKF-QaBcOLNZQh660Ec9L2FVR437QolZNq3XSJwE1o7gOKtYF43oMIxWOaJXR6*0U*4X1EsDJGFiRKlgHl2-Oq7kP4ZnR1*kp*20*kE3-UQ8K0FqNL7nOKxiKGFVQaBcOLNZQZEYR4xkK0FjMadZMrFn2U*-Ve-T2*xCIohZSKJYEL7XO4ZqNL9F0*ZPErJnR4xh62FVR44**OI91-AN5pIYPbJgPBAB1UwE2F7JNaxgN5BKQqBcNKpVJWFXP43nQs*02*8*-BAI3EwK3lVLHZAiOqJtQpdCImtjMadZMrFnc80**x6O4lkRKWFXP43nQqtVPKJM74BgMLBnNLBQHZB2OKBoOKxiML7tcVkSK2tHHq7eNKBooVcP603T2--2KIZiQr-ZMrFjQZFjOqJicW6SLl*EF3Z7PbBkNKBoPr7IPqhZPU*6*-2*4U*Y*0Y*AU*r*2Y*H*-M*3c*M*-a*4o*Qk-u*62*Uk03*6Q*XU0K*82*cU0X*8I*eU0p*9s*mk1C*BQ*r*1j*D6********0*E*********X*******************--EU*0**F*-c*7**d*16*Bk-7*2s*Kk-h*4w*QE-p*5g-uU********6-*********-********************5f**</defaultVal>
|
||||
<dataValue>*********WgeMb-gOLBoA11I*E61-*I4-klM75NZQbBdPqtN743mMqVdRaJmJ0FoPr-M74xWOaJXR5AG**44c3wE1otHGqJtNKF-QaBcOLNZQh660Ec9L2FVR437QolZNq3XSJwE1o7gOKtYF43oMIxWOaJXR6*0U*4X1EsDJGFiRKlgHl2-Oq7kP4ZnR1*kp*20*kE3-UQ8K0FqNL7nOKxiKGFVQaBcOLNZQZEYR4xkK0FjMadZMrFn2U*-Ve-T2*xCIohZSKJYEL7XO4ZqNL9F0*ZPErJnR4xh62FVR44**OI91-AN5pIYPbJgPBAB1UwE2F7JNaxgN5BKQqBcNKpVJWFXP43nQs*02*8*-BAI3EwK3lVLHZAiOqJtQpdCImtjMadZMrFnc80**x6O4lkRKWFXP43nQqtVPKJM74BgMLBnNLBQHZB2OKBoOKxiML7tcVkSK2tHHq7eNKBooVcP603T2--2KIZiQr-ZMrFjQZFjOqJicW6SLl*EF3Z7PbBkNKBoPr7IPqhZPU*6*-2*4U*Y*0Y*AU*r*2Y*H*-M*3c*M*-a*4o*Qk-u*62*Uk03*6Q*XU0K*82*cU0X*8I*eU0p*9s*mk1C*BQ*r*1j*D6********0*E*********X*******************--EU*0**F*-c*7**d*16*Bk-7*2s*Kk-h*4w*QE-p*5g-uU********6-*********-********************5f**</dataValue>
|
||||
</parameter>
|
||||
<parameter name="LUT 文件" id="9001" flags="12889161776">
|
||||
<numberOfKeypoints>0</numberOfKeypoints>
|
||||
<defaultVal>*********SweMb-gOLBoA11I*E61-*I4-klM75NZQbBdPqtN743mMqVdRaJmJ0FoPr-M74xWOaJXR5AG**44c3wE1otHGqJtNKF-QaBcOLNZQh660Ec9L2FVR437QolZNq3XSJwE1o7gOKtYF43oMIxWOaJXR6*0U*4X1EsDJGFiRKlgHl2-9q7kP4ZnR1*kp*20*kE3-UQ8K0FqNL7nOKxiKGFVQaBcOLNZQZEYR4xkK0FjMadZMrFn2U*-Ve-T2*xCIohZSKJYEL7XO4ZqNL9F0*ZPErJnR4xh62FVR44**OI91-2L5JIYPbJgPB6B1UwEJL-VR4VnJWFXP43nQs*0U*HH2VAC3-IKJotH9ahZSLBOHZAiPq7eNKBoQu0UU*DG4-YO4pcYMqlVQrBiMKpZK0FXP43nQqJnL2tHF4ZXR4ZjPa3mSO6O53VCIoxWOaJXRB6M4FsTL2FNELBnNLFHR43oNO6U53l2KI3nQqJoIrFVR4I62FcY8H6rGIlMKa-aOr3sSbm1WtOLa7eTefD*kwnFri2********-*E*********V********************vUU*0**F*-c*7**d*16*Bk-7*2s*Kk-h*4w*QE-p*5g-fU********6-*********-********************4j**</defaultVal>
|
||||
<dataValue>*********SweMb-gOLBoA11I*E61-*I4-klM75NZQbBdPqtN743mMqVdRaJmJ0FoPr-M74xWOaJXR5AG**44c3wE1otHGqJtNKF-QaBcOLNZQh660Ec9L2FVR437QolZNq3XSJwE1o7gOKtYF43oMIxWOaJXR6*0U*4X1EsDJGFiRKlgHl2-9q7kP4ZnR1*kp*20*kE3-UQ8K0FqNL7nOKxiKGFVQaBcOLNZQZEYR4xkK0FjMadZMrFn2U*-Ve-T2*xCIohZSKJYEL7XO4ZqNL9F0*ZPErJnR4xh62FVR44**OI91-2L5JIYPbJgPB6B1UwEJL-VR4VnJWFXP43nQs*0U*HH2VAC3-IKJotH9ahZSLBOHZAiPq7eNKBoQu0UU*DG4-YO4pcYMqlVQrBiMKpZK0FXP43nQqJnL2tHF4ZXR4ZjPa3mSO6O53VCIoxWOaJXRB6M4FsTL2FNELBnNLFHR43oNO6U53l2KI3nQqJoIrFVR4I62FcY8H6rGIlMKa-aOr3sSbm1WtOLa7eTefD*kwnFri2********-*E*********V********************vUU*0**F*-c*7**d*16*Bk-7*2s*Kk-h*4w*QE-p*5g-fU********6-*********-********************4j**</dataValue>
|
||||
<defaultVal>*********XQeMb-gOLBoA11I*E61-*I4-klM75NZQbBdPqtN743mMqVdRaJmJ0FoPr-M74xWOaJXR5AG**44c3wE1otHGqJtNKF-QaBcOLNZQh660Ec9L2FVR437QolZNq3XSJwE1o7gOKtYF43oMIxWOaJXR6*0U*4X1EsDJGFiRKlgHl2-Rq7kP4ZnR1*kp*20*kE3-UQ8K0FqNL7nOKxiKGFVQaBcOLNZQZEYR4xkK0FjMadZMrFn2U*-Ve-T2*xCIohZSKJYEL7XO4ZqNL9F0*ZPErJnR4xh62FVR44**OI91-IP6JIYPbJgPBEB1UwE2F6H33JkMLFcQpMYMqlVQrBQQr-dN4JmH4ZiOqJYKbBkOKFZQYpZQqW**c*20M**olML1VUN4ZRCImtfNLZnKYtH9axWOaJXR5CUc6*1oVkR5VxO74BgMLBnPa3hNJUYMqlVQrBZQplCIoFdMrFdPqtVQbaW5W-MHZBDMadZMrHG5-oW6pl2KI3nQqJoIrFVR4KW70-QF3Z-QrBZR3BoMLFZ**U*2E*O*0E*8E*m*1Q*GE-A*3U*KU-U*4M*Pk-p*5k*WE0I*7M*a*0N*7g*cU0e*9I*hU0r*9Y*jU17*B6*rk1W*Cg*w*1x*E*********0*E*********Z*******************-1EU*0**F*-c*7**d*16*Bk-7*2s*Kk-h*4w*QE-p*5g-xU********6-*********-********************5r**</defaultVal>
|
||||
<dataValue>*********XQeMb-gOLBoA11I*E61-*I4-klM75NZQbBdPqtN743mMqVdRaJmJ0FoPr-M74xWOaJXR5AG**44c3wE1otHGqJtNKF-QaBcOLNZQh660Ec9L2FVR437QolZNq3XSJwE1o7gOKtYF43oMIxWOaJXR6*0U*4X1EsDJGFiRKlgHl2-Rq7kP4ZnR1*kp*20*kE3-UQ8K0FqNL7nOKxiKGFVQaBcOLNZQZEYR4xkK0FjMadZMrFn2U*-Ve-T2*xCIohZSKJYEL7XO4ZqNL9F0*ZPErJnR4xh62FVR44**OI91-IP6JIYPbJgPBEB1UwE2F6H33JkMLFcQpMYMqlVQrBQQr-dN4JmH4ZiOqJYKbBkOKFZQYpZQqW**c*20M**olML1VUN4ZRCImtfNLZnKYtH9axWOaJXR5CUc6*1oVkR5VxO74BgMLBnPa3hNJUYMqlVQrBZQplCIoFdMrFdPqtVQbaW5W-MHZBDMadZMrHG5-oW6pl2KI3nQqJoIrFVR4KW70-QF3Z-QrBZR3BoMLFZ**U*2E*O*0E*8E*m*1Q*GE-A*3U*KU-U*4M*Pk-p*5k*WE0I*7M*a*0N*7g*cU0e*9I*hU0r*9Y*jU17*B6*rk1W*Cg*w*1x*E*********0*E*********Z*******************-1EU*0**F*-c*7**d*16*Bk-7*2s*Kk-h*4w*QE-p*5g-xU********6-*********-********************5r**</dataValue>
|
||||
</parameter>
|
||||
<parameter name="相机输入" id="2013" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="输入强度" id="2014" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="输入 / LUT" id="2033" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="旧版输入强度" id="2014" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="CST 配置版本" id="2236" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="输入转换启用" id="2241" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="输入曲线" id="2237" flags="12889161776" default="28" value="28" />
|
||||
<parameter name="输入色域" id="2238" flags="12889161776" default="27" value="27" />
|
||||
<parameter name="工作曲线" id="2239" flags="12889161776" default="10" value="10" />
|
||||
<parameter name="工作色域" id="2240" flags="12889161776" default="16" value="16" />
|
||||
<parameter name="CST 混合" id="2269" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="一级调色启用" id="2242" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="一级曝光" id="2247" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="色彩平衡方向" id="2248" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="色彩平衡强度" id="2249" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="一级饱和度" id="2250" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="一级对比度" id="2251" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="对比度轴心" id="2252" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="高光对比度" id="2253" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="高光轴心" id="2254" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="阴影对比度" id="2255" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="阴影轴心" id="2256" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="白点" id="2257" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="肩部压缩" id="2258" flags="12889161760" default="0.5" value="0.5" />
|
||||
<parameter name="一级高光" id="2259" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="一级中间调" id="2260" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="一级阴影" id="2261" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="黑点" id="2262" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="趾部压缩" id="2263" flags="12889161760" default="0.5" value="0.5" />
|
||||
<parameter name="色度混合" id="2264" flags="12889161760" default="0.5" value="0.5" />
|
||||
<parameter name="旁路一级曝光" id="2265" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="旁路一级色彩" id="2266" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="旁路一级对比" id="2267" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="旁路一级影调" id="2268" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="输出转换启用" id="2243" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="输出曲线" id="2244" flags="12889161776" default="1002" value="1002" />
|
||||
<parameter name="输出色域" id="2245" flags="12889161776" default="22" value="22" />
|
||||
<parameter name="自动色调映射" id="2246" flags="12889161776" default="0" value="0" />
|
||||
<parameter name="输入转换 / CST" id="2033" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="曝光" id="2000" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="曝光 启用" id="2020" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="对比度" id="2001" flags="12889161760" default="0" value="0" />
|
||||
@@ -330,12 +364,15 @@
|
||||
<parameter name="清晰度 启用" id="2031" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="去朦胧" id="2012" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="去朦胧 启用" id="2032" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="复制时自动调色" id="8800" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="复制时自动调色" id="8800" flags="12889161776" default="0" value="0" />
|
||||
<parameter name="一级调色总开关" id="2271" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="蜘蛛盘混合" id="2273" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="蜘蛛盘校色仪" id="2272" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="基础调色" id="2034" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="白平衡与颜色" id="2035" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="保护程度" id="2117" flags="12889161760" default="60" value="60" />
|
||||
<parameter name="肤色色相" id="2118" flags="12889161760" default="28" value="28" />
|
||||
<parameter name="肤色保护" id="2116" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="肤色保护" id="2116" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="风格 1 强度" id="2015" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="风格 2 启用" id="2040" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="风格 2 强度" id="2016" flags="12889161760" default="1" value="1" />
|
||||
@@ -345,7 +382,7 @@
|
||||
<parameter name="风格 4 强度" id="2018" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="风格 5 启用" id="2043" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="风格 5 强度" id="2019" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="风格 LUT" id="2036" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="风格 LUT" id="2036" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="主曲线 阴影" id="2046" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="主曲线 暗部" id="2047" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="主曲线 亮部" id="2048" flags="12889161760" default="0" value="0" />
|
||||
@@ -398,7 +435,7 @@
|
||||
<parameter name="蓝 扩展点3 X" id="2234" flags="12889161760" default="-1" value="-1" />
|
||||
<parameter name="蓝 扩展点4 偏移" id="2231" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="蓝 扩展点4 X" id="2235" flags="12889161760" default="-1" value="-1" />
|
||||
<parameter name="曲线" id="2044" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="曲线" id="2044" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="红 色相" id="2068" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="橙 色相" id="2069" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="黄 色相" id="2070" flags="12889161760" default="0" value="0" />
|
||||
@@ -433,7 +470,7 @@
|
||||
<parameter name="自定义 明亮度" id="2098" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="自定义 明亮度范围" id="2142" flags="12889161760" default="40" value="40" />
|
||||
<parameter name="显示自定义色选区" id="2144" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="HSL 混色" id="2045" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="HSL 混色" id="2045" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="阴影 色相" id="2106" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="阴影 饱和度" id="2107" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="阴影 明亮度" id="2113" flags="12889161760" default="0" value="0" />
|
||||
@@ -448,14 +485,14 @@
|
||||
<parameter name="全局 明亮度" id="2150" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="混合" id="2101" flags="12889161760" default="50" value="50" />
|
||||
<parameter name="平衡" id="2102" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="颜色分级" id="2100" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="颜色分级" id="2100" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="红原色 色相" id="2121" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="红原色 饱和度" id="2122" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="绿原色 色相" id="2123" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="绿原色 饱和度" id="2124" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="蓝原色 色相" id="2125" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="蓝原色 饱和度" id="2126" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="三原色" id="2120" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="三原色" id="2120" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="RGB 输入黑" id="2156" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="RGB 伽马" id="2160" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="RGB 输入白" id="2164" flags="12889161760" default="255" value="255" />
|
||||
@@ -476,7 +513,7 @@
|
||||
<parameter name="蓝 输入白" id="2167" flags="12889161760" default="255" value="255" />
|
||||
<parameter name="蓝 输出黑" id="2171" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="蓝 输出白" id="2175" flags="12889161760" default="255" value="255" />
|
||||
<parameter name="色阶" id="2152" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="色阶" id="2152" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="黑白 红" id="2180" flags="12889161760" default="40" value="40" />
|
||||
<parameter name="黑白 黄" id="2181" flags="12889161760" default="60" value="60" />
|
||||
<parameter name="黑白 绿" id="2182" flags="12889161760" default="40" value="40" />
|
||||
@@ -485,7 +522,8 @@
|
||||
<parameter name="黑白 洋红" id="2185" flags="12889161760" default="80" value="80" />
|
||||
<parameter name="着色色相" id="2186" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="着色饱和度" id="2187" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="黑白混色" id="2176" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="黑白混合" id="2270" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="黑白混色" id="2176" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="保持明度" id="2189" flags="12889161760" default="1" value="1" />
|
||||
<parameter name="阴影 青 ↔ 红" id="2192" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="阴影 洋红 ↔ 绿" id="2193" flags="12889161760" default="0" value="0" />
|
||||
@@ -496,7 +534,7 @@
|
||||
<parameter name="高光 青 ↔ 红" id="2200" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="高光 洋红 ↔ 绿" id="2201" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="高光 黄 ↔ 蓝" id="2202" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="色彩平衡" id="2188" flags="12889161760" default="0" value="0" />
|
||||
<parameter name="色彩平衡" id="2188" 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
@@ -15,7 +15,7 @@ def main():
|
||||
work.mkdir(parents=True, exist_ok=True)
|
||||
args.output.parent.mkdir(parents=True, exist_ok=True)
|
||||
objects = []
|
||||
for name in ('DYGradeKernel', 'DYStatisticsKernel', 'DYLUTExportKernel'):
|
||||
for name in ('DYGradeKernel', 'DYStatisticsKernel', 'DYLUTExportKernel', 'CSTKernel', 'BasisKernel'):
|
||||
target = work / (name + '.air')
|
||||
subprocess.run(['xcrun', 'metal-opt', str(root / 'tools/kernels' / (name + '.ll')),
|
||||
'-o', str(target)], check=True)
|
||||
|
||||
+2
-2
@@ -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','template/tools/dump_model.mm']
|
||||
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']
|
||||
return {name:sha((ROOT/name).read_bytes()) for name in files}
|
||||
|
||||
def refresh_metadata():
|
||||
@@ -82,7 +82,7 @@ def build(model):
|
||||
E.SubElement(param,'defaultVal').text=text;E.SubElement(param,'dataValue').text=text
|
||||
for row in model['parameters']:
|
||||
value=format(float(row['default']),'.17g')
|
||||
E.SubElement(filt,'parameter',name=row['title'],id=str(row['pid']),flags='12889161760',default=value,value=value)
|
||||
E.SubElement(filt,'parameter',name=row['title'],id=str(row['pid']),flags='12889161776' if row.get('notAnimatable') else '12889161760',default=value,value=value)
|
||||
for node in host:filt.append(node)
|
||||
source.append(filt)
|
||||
copyright=E.parse(SOURCES/'CopyrightRig.xml').getroot()
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Create an isolated chart project for browser layout, recent use and reset QA."""
|
||||
from pathlib import Path
|
||||
import runpy
|
||||
import xml.etree.ElementTree as ET
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
runpy.run_path(str(root/'tools/create_host_fixture.py'))
|
||||
qa=Path.home()/'Library/Caches/CodexBuilds/com.dayu.color/fcp-qa'
|
||||
tree=ET.parse(qa/'大鱼调色_正式版验收.fcpxml')
|
||||
tree.find('.//event').set('name','大鱼调色_浏览器与复位验收')
|
||||
tree.find('.//project').set('name','大鱼调色_1.3.1_浏览器与复位')
|
||||
ET.indent(tree)
|
||||
output=qa/'大鱼调色_1.3.1_浏览器与复位.fcpxml'
|
||||
output.write_text('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE fcpxml>\n'+ET.tostring(tree.getroot(),encoding='unicode')+'\n')
|
||||
print(output)
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Generate the isolated synthetic CST/disclosure acceptance timeline."""
|
||||
from pathlib import Path
|
||||
import runpy
|
||||
import xml.etree.ElementTree as ET
|
||||
root = Path(__file__).resolve().parent.parent
|
||||
runpy.run_path(str(root / 'tools/create_host_fixture.py'))
|
||||
qa = Path.home() / 'Library/Caches/CodexBuilds/com.dayu.color/fcp-qa'
|
||||
tree = ET.parse(qa / '大鱼调色_正式版验收.fcpxml')
|
||||
tree.find('.//event').set('name', '大鱼调色_CST与独立折叠验收')
|
||||
tree.find('.//project').set('name', '大鱼调色_1.2_CST与独立折叠')
|
||||
output = qa / '大鱼调色_1.2_CST与独立折叠.fcpxml'
|
||||
ET.indent(tree)
|
||||
output.write_text('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE fcpxml>\n' + ET.tostring(tree.getroot(), encoding='unicode') + '\n')
|
||||
print(output)
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Create an isolated synthetic FCP project for the native spider and wheel."""
|
||||
from pathlib import Path
|
||||
import runpy
|
||||
import xml.etree.ElementTree as ET
|
||||
root=Path(__file__).resolve().parent.parent
|
||||
runpy.run_path(str(root/'tools/create_host_fixture.py'))
|
||||
qa=Path.home()/'Library/Caches/CodexBuilds/com.dayu.color/fcp-qa'
|
||||
tree=ET.parse(qa/'大鱼调色_正式版验收.fcpxml')
|
||||
tree.find('.//event').set('name','大鱼调色_蜘蛛盘与白平衡验收')
|
||||
tree.find('.//project').set('name','大鱼调色_1.3_蜘蛛盘与白平衡')
|
||||
ET.indent(tree)
|
||||
output=qa/'大鱼调色_1.3_蜘蛛盘与白平衡.fcpxml'
|
||||
output.write_text('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE fcpxml>\n'+ET.tostring(tree.getroot(),encoding='unicode')+'\n')
|
||||
print(output)
|
||||
文件差异过大,未显示。
加载差异
文件差异过大,未显示。
加载差异
@@ -0,0 +1,39 @@
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "../大鱼调色/Plugin/DYLUTBrowser.h"
|
||||
#import "../大鱼调色/Plugin/DYLUTLibrary.h"
|
||||
@interface DYLUTBrowser (Probe)
|
||||
- (void)layoutBrowser;
|
||||
- (void)layoutChanged:(id)sender;
|
||||
- (void)rebuildGrid;
|
||||
- (void)folderClicked:(NSButton *)button;
|
||||
- (void)thumbnailClicked:(id)tile;
|
||||
@end
|
||||
static NSMutableArray *checks;
|
||||
static void require(BOOL pass,NSString *name){[checks addObject:@{@"name":name,@"pass":@(pass)}];if(!pass){fprintf(stderr,"FAIL %s\n",name.UTF8String);exit(1);}}
|
||||
static void pump(BOOL(^done)(void)){double end=NSProcessInfo.processInfo.systemUptime+15;while(!done()&&NSProcessInfo.processInfo.systemUptime<end)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.005]];require(done(),@"asynchronous browser task completed");}
|
||||
int main(int argc,const char **argv){@autoreleasepool{
|
||||
checks=[NSMutableArray new];require(argc==2,@"report destination supplied");[NSApplication sharedApplication];[NSApp setActivationPolicy:NSApplicationActivationPolicyProhibited];
|
||||
NSURL *root=[NSURL fileURLWithPath:[NSTemporaryDirectory()stringByAppendingPathComponent:[@"dayu-browser-layout-" stringByAppendingString:NSUUID.UUID.UUIDString]]];NSFileManager *fm=NSFileManager.defaultManager;[fm createDirectoryAtURL:root withIntermediateDirectories:YES attributes:nil error:nil];
|
||||
NSString *cube=@"LUT_3D_SIZE 2\n0 0 0\n1 0 0\n0 1 0\n1 1 0\n0 0 1\n1 0 1\n0 1 1\n1 1 1\n";
|
||||
for(NSString *name in @[@"Alpha.cube",@"Middle.cube",@"Zulu.cube"])[cube writeToURL:[root URLByAppendingPathComponent:name] atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
||||
DYLUTLibrary *library=[[[DYLUTLibrary alloc]initWithRootURL:root]autorelease];require([library reload:nil],@"isolated library loaded");NSString *alpha=[library.entries[0]objectForKey:@"path"],*middle=[library.entries[1]objectForKey:@"path"],*zulu=[library.entries[2]objectForKey:@"path"];
|
||||
[library recordUsedPath:alpha];[library recordUsedPath:zulu];[library recordUsedPath:alpha];require([library.recentPaths isEqual:@[alpha,zulu]],@"recent use deduplicates and puts latest first");
|
||||
DYLUTLibrary *reopened=[[[DYLUTLibrary alloc]initWithRootURL:root]autorelease];require([reopened.recentPaths isEqual:library.recentPaths],@"recent history survives a new library instance");
|
||||
__block void(^ack)(NSError *)=nil;DYLUTBrowser *browser=[[DYLUTBrowser alloc]initWithLibrary:library preview:nil selectedPath:nil palette:@{} selection:^NSProgress *(NSString *path,void(^completion)(NSError *)){[ack release];ack=[completion copy];return [NSProgress discreteProgressWithTotalUnitCount:1];}];
|
||||
pump(^{return [browser valueForKey:@"libraryTask"]==nil;});require([[[browser valueForKey:@"folderPaths"]firstObject]isEqual:@"@recent"],@"recent category is first in the sidebar");
|
||||
require([[[browser valueForKey:@"visibleEntries"]valueForKey:@"path"]isEqual:@[alpha,zulu]],@"recent category contains only used LUTs in order");
|
||||
NSButton *all=nil;for(NSButton *button in [browser valueForKey:@"folderButtons"])if([button.identifier isEqual:@"*"])all=button;[browser folderClicked:all];
|
||||
require([[[browser valueForKey:@"visibleEntries"]valueForKey:@"path"]isEqual:@[alpha,zulu,middle]],@"all LUTs also put recent uses before unused names");
|
||||
id tile=[[browser valueForKey:@"tiles"]objectForKey:middle];[tile setEnabled:YES];[browser thumbnailClicked:tile];require([library.recentPaths isEqual:@[alpha,zulu]],@"loading does not update recent history");ack([NSError errorWithDomain:@"host" code:1 userInfo:nil]);require([library.recentPaths isEqual:@[alpha,zulu]],@"host rejection does not update history");
|
||||
[browser thumbnailClicked:tile];ack(nil);require([library.recentPaths isEqual:@[middle,alpha,zulu]],@"only successful host application records recent use");
|
||||
NSSearchField *search=[browser valueForKey:@"search"];search.stringValue=@"Zulu";[browser rebuildGrid];require([[browser valueForKey:@"visibleEntries"]count]==1,@"search respects recent-first ordering");search.stringValue=@"";[browser rebuildGrid];
|
||||
NSView *view=[browser valueForKey:@"root"];[view setFrameSize:NSMakeSize(1200,760)];[browser layoutBrowser];NSInteger wide=[[browser valueForKey:@"columns"]integerValue];[view setFrameSize:NSMakeSize(720,420)];[browser layoutBrowser];require(wide>[[browser valueForKey:@"columns"]integerValue],@"grid reflows when the browser size changes");
|
||||
NSPopUpButton *layout=[browser valueForKey:@"layoutMenu"];[layout selectItemAtIndex:1];[browser layoutChanged:nil];require([[browser valueForKey:@"columns"]integerValue]==1&&[[browser valueForKey:@"tileHeight"]doubleValue]==70,@"list layout has full-width rows");
|
||||
NSSplitView *split=[browser valueForKey:@"splitView"];[split setPosition:240 ofDividerAtIndex:0];[browser layoutBrowser];NSScrollView *folders=[browser valueForKey:@"folderScroll"],*grid=[browser valueForKey:@"gridScroll"];require(fabs(folders.frame.size.width-240)<2&&NSMaxX(folders.frame)<=NSMinX(grid.frame),@"sidebar divider changes folder width without overlapping previews");
|
||||
[browser close];[browser release];browser=[[DYLUTBrowser alloc]initWithLibrary:library preview:nil selectedPath:nil palette:@{} selection:nil];pump(^{return [browser valueForKey:@"libraryTask"]==nil;});require([(NSPopUpButton*)[browser valueForKey:@"layoutMenu"]indexOfSelectedItem]==1&&fabs([[browser valueForKey:@"sidebarWidth"]doubleValue]-240)<2,@"layout and sidebar width survive reopening");
|
||||
NSPanel *host=[[[NSPanel alloc]initWithContentRect:NSMakeRect(120,160,900,620) styleMask:NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMaskResizable backing:NSBackingStoreBuffered defer:NO]autorelease];__block int closes=0;[browser showInRemoteParent:host.contentView close:^{closes++;}];pump(^{return [browser valueForKey:@"presentationWindow"]==host;});require(!host.visible&&browser.visible,@"remote-parent checks never display a test window");
|
||||
NSRect desired=NSMakeRect(190,210,1000,680);[host setFrame:desired display:NO];NSString *frameKey=[@"com.dayu.color.lookLUTPreview.windowFrame|" stringByAppendingString:library.rootURL.path];require(NSEqualRects(NSRectFromString([NSUserDefaults.standardUserDefaults stringForKey:frameKey]),host.frame),@"window position and size are remembered");[browser close];[browser close];require(closes==1,@"remote close callback runs once");[browser release];[ack release];ack=nil;
|
||||
for(int i=0;i<50;i++)[library recordUsedPath:[root.path stringByAppendingPathComponent:[NSString stringWithFormat:@"History-%d.cube",i]]];require(library.recentPaths.count==40&&[library.recentPaths[0]hasSuffix:@"History-49.cube"],@"recent history stays bounded at 40 newest paths");
|
||||
NSArray *keys=NSUserDefaults.standardUserDefaults.dictionaryRepresentation.allKeys;for(NSString *key in keys)if([key containsString:library.rootURL.path])[NSUserDefaults.standardUserDefaults removeObjectForKey:key];require([fm removeItemAtURL:root error:nil],@"isolated fixtures and preferences cleaned");
|
||||
NSDictionary *report=@{@"pass":@YES,@"checks":checks,@"scope":@"Real AppKit browser objects, hidden host-owned window fixture, asynchronous acknowledgement and root-scoped history; no visible test app or user LUT changes."};[[NSJSONSerialization dataWithJSONObject:report options:NSJSONWritingPrettyPrinted error:nil]writeToFile:[NSString stringWithUTF8String:argv[1]] atomically:YES];printf("PASS %lu browser checks\n",(unsigned long)checks.count);[checks release];return 0;
|
||||
}}
|
||||
+1
-1
@@ -93,7 +93,7 @@ static Pixels render(id<MTLRenderPipelineState> pipeline, bool dayu, id<MTLTextu
|
||||
[e setFragmentTexture:source atIndex:0];
|
||||
for (NSUInteger i=0;i<textures.count;++i) [e setFragmentTexture:textures[i] atIndex:i+1];
|
||||
[e setFragmentBytes:&u length:sizeof(u) atIndex:0]; float scene=.73f; [e setFragmentBytes:&scene length:4 atIndex:1];
|
||||
if(dayu) { DYRenderOptions options={}; options.outputPremultiplied=premultiplied; [e setFragmentBytes:&options length:sizeof(options) atIndex:2]; }
|
||||
if(dayu) { DYRenderOptions options={}; options.outputPremultiplied=premultiplied; [e setFragmentBytes:&options length:sizeof(options) atIndex:2];[e setFragmentBytes:&u length:sizeof(u) atIndex:3];float empty[2]={0,0};simd_int2 size={0,0};[e setFragmentBytes:empty length:sizeof(empty) atIndex:4];[e setFragmentBytes:&size length:sizeof(size) atIndex:5]; }
|
||||
else { float disabledWatermark[8]={}; [e setFragmentBytes:disabledWatermark length:sizeof(disabledWatermark) atIndex:2]; }
|
||||
[e drawPrimitives:MTLPrimitiveTypeTriangleStrip vertexStart:0 vertexCount:4]; [e endEncoding]; finish(commands);
|
||||
Pixels output(width*height*4); [destination getBytes:output.data() bytesPerRow:width*8 fromRegion:MTLRegionMake2D(0,0,width,height) mipmapLevel:0]; return output;
|
||||
|
||||
@@ -101,6 +101,7 @@ int main(int argc,const char *argv[]) {@autoreleasepool {
|
||||
[acknowledgements addObject:[[completion copy]autorelease]];NSProgress *task=[NSProgress discreteProgressWithTotalUnitCount:1];[applyTasks addObject:task];return task;
|
||||
}];
|
||||
pump(^{return [ackBrowser valueForKey:@"libraryTask"]==nil;});
|
||||
[ackBrowser setValue:@"*" forKey:@"folder"];[ackBrowser rebuildGrid]; // This fixture tests two acknowledgements, regardless of saved/default category.
|
||||
NSDictionary *ackTiles=[ackBrowser valueForKey:@"tiles"];NSArray *ackPaths=ackTiles.allKeys;require(ackPaths.count>=2,@"acknowledgement fixture has selectable thumbnails");
|
||||
id firstTile=ackTiles[ackPaths[0]],secondTile=ackTiles[ackPaths[1]];[firstTile setEnabled:YES];[secondTile setEnabled:YES];
|
||||
[ackBrowser thumbnailClicked:firstTile];
|
||||
@@ -125,5 +126,6 @@ int main(int argc,const char *argv[]) {@autoreleasepool {
|
||||
#endif
|
||||
report[@"checks"]=checks;report[@"scope"]=@"Synthetic 24 x 65-cube import with real main-run-loop heartbeat and snapshot reads; headless browser cancellation, latest selection and 3,025-entry virtualization. No user library or visible test app.";
|
||||
NSData *json=[NSJSONSerialization dataWithJSONObject:report options:NSJSONWritingPrettyPrinted error:&error];require([json writeToFile:[NSString stringWithUTF8String:argv[1]] atomically:YES],@"report written");
|
||||
for(NSString *key in NSUserDefaults.standardUserDefaults.dictionaryRepresentation.allKeys)if([key containsString:destination.path])[NSUserDefaults.standardUserDefaults removeObjectForKey:key];
|
||||
require([fm removeItemAtURL:root error:&error],@"isolated fixtures removed");printf("PASS: import %.3fs, main gap %.1fms, %lu ticks\n",duration,maxGap*1000,(unsigned long)ticks);[checks release];return 0;
|
||||
}}
|
||||
@@ -0,0 +1,32 @@
|
||||
// Reused sibling topology/math checks; source recorded in SpiderAndBalanceSources.json.
|
||||
#import <Metal/Metal.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#include "../大鱼调色/Plugin/SpiderCore/DYSpiderMesh.hpp"
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <random>
|
||||
static int checks=0;
|
||||
static void require(bool value,const char*why){checks++;if(!value){fprintf(stderr,"FAIL %s\n",why);exit(1);}}
|
||||
int main(){@autoreleasepool{
|
||||
static_assert(sizeof(dy::SpiderMesh)==4988,"archive ABI");
|
||||
NSString*source=[NSString stringWithContentsOfFile:@"大鱼调色/Plugin/SpiderCore/DYColorMath.h" encoding:NSUTF8StringEncoding error:nil];
|
||||
source=[source stringByAppendingString:@"\nkernel void meshProbe(device const float4*input[[buffer(0)]],device float4*out[[buffer(1)]],constant int2&size[[buffer(2)]],device const float*samples[[buffer(3)]],uint i[[thread_position_in_grid]]){out[i]=float4(dyVariableSpider(input[i].xyz,size.x,size.y,samples),1);}\n"];
|
||||
NSError*error=nil;id<MTLDevice>device=MTLCreateSystemDefaultDevice();require(device,"Metal device");MTLCompileOptions*options=[MTLCompileOptions new];options.fastMathEnabled=NO;id<MTLLibrary>lib=[device newLibraryWithSource:source options:options error:&error];if(!lib)fprintf(stderr,"%s\n",error.localizedDescription.UTF8String);require(lib,"shared polar implementation compiles for Metal");id<MTLComputePipelineState>pipeline=[device newComputePipelineStateWithFunction:[lib newFunctionWithName:@"meshProbe"] error:&error];require(pipeline,"Metal pipeline");id<MTLCommandQueue>queue=[device newCommandQueue];
|
||||
std::vector<simd_float4>corpus;std::mt19937 rng(571030);std::uniform_real_distribution<float>values(-.2,4);
|
||||
for(int i=0;i<1000;i++){auto rgb=dyHSVRGB(float3{float(i)/1000,float(i%71)/70,1});corpus.push_back(simd_float4{rgb.x,rgb.y,rgb.z,1});corpus.push_back(simd_float4{values(rng),values(rng),values(rng),1});}
|
||||
for(float gray:{0.f,.001f,.5f,1.f,4.f})corpus.push_back(simd_float4{gray,gray,gray,1});
|
||||
id<MTLBuffer>input=[device newBufferWithBytes:corpus.data() length:corpus.size()*sizeof(simd_float4) options:MTLResourceStorageModeShared],output=[device newBufferWithLength:corpus.size()*sizeof(simd_float4) options:MTLResourceStorageModeShared];float maxError=0;int grids=0;
|
||||
for(int hues:{6,8,12,16,24})for(int saturation:{6,8,12,16,24}){
|
||||
auto neutral=dy::neutralMesh(hues,saturation);require(dy::validMesh(neutral),"all 25 supported topologies validate");auto samples=dy::meshSamples(neutral);
|
||||
for(auto c:corpus){auto n=dyVariableSpider(float3{c.x,c.y,c.z},hues,saturation-1,samples.data());require(n.x==c.x&&n.y==c.y&&n.z==c.z,"every neutral grid is exact identity including HDR and gray");}
|
||||
std::bitset<dy::SpiderMeshCapacity>selection;selection[2]=1;auto moved=dy::moveMesh(neutral,selection,-.035,.04);require(moved.pins[2]&&moved.x[0]<neutral.x[0]&&moved.x[saturation-1]==neutral.x[saturation-1],"one anchor moves free spoke points and leaves neighboring hue fixed");require(moved.x[saturation-2]==neutral.x[saturation-2],"outer boundary stays constrained");samples=dy::meshSamples(moved);
|
||||
id<MTLBuffer>buffer=[device newBufferWithBytes:samples.data() length:samples.size()*sizeof(float) options:MTLResourceStorageModeShared];simd_int2 size={hues,saturation-1};id<MTLCommandBuffer>cmd=[queue commandBuffer];id<MTLComputeCommandEncoder>enc=[cmd computeCommandEncoder];[enc setComputePipelineState:pipeline];[enc setBuffer:input offset:0 atIndex:0];[enc setBuffer:output offset:0 atIndex:1];[enc setBytes:&size length:sizeof(size) atIndex:2];[enc setBuffer:buffer offset:0 atIndex:3];[enc dispatchThreads:MTLSizeMake(corpus.size(),1,1) threadsPerThreadgroup:MTLSizeMake(64,1,1)];[enc endEncoding];[cmd commit];[cmd waitUntilCompleted];require(cmd.status==MTLCommandBufferStatusCompleted,"Metal dispatch completed");const auto*gpu=(const simd_float4*)output.contents;int changed=0;
|
||||
for(size_t i=0;i<corpus.size();i++){auto c=corpus[i];auto cpu=dyVariableSpider(float3{c.x,c.y,c.z},hues,saturation-1,samples.data());for(int k=0;k<3;k++){float relative=fabs(cpu[k]-gpu[i][k])/std::max(1.f,fabs(cpu[k]));maxError=std::max(maxError,relative);require(std::isfinite(gpu[i][k])&&relative<5e-5,"CPU Metal parity for each deformed grid");}changed+=fabs(cpu.x-c.x)+fabs(cpu.y-c.y)+fabs(cpu.z-c.z)>.001;}
|
||||
require(changed>0,"grid edit changes visible colors");grids++;
|
||||
// Uniform translation survives resampling between every pair of resolutions.
|
||||
auto translated=neutral;for(int i=0;i<dy::meshCount(translated);i++){translated.x[i]+=.02;translated.y[i]-=.01;}
|
||||
auto other=dy::resampleMesh(translated,saturation,hues);for(int i=0;i<dy::meshCount(other);i++){auto q=dy::meshNeutral(other,i);require(fabs(other.x[i]-q.x-.02)<2e-7&&fabs(other.y[i]-q.y+.01)<2e-7,"resampling preserves displacement including seam center and outer boundary");}
|
||||
}
|
||||
auto legacy=dyDefaultGrade();legacy.spiderX[7]+=.04;auto mesh=dy::legacyMesh(legacy);auto projected=dy::meshLegacyGrade(legacy,mesh);require(!memcmp(&legacy,&projected,sizeof(legacy)),"legacy grid no-op projection preserves every byte");auto invalid=mesh;invalid.hues=7;require(!dy::validMesh(invalid),"invalid resolution rejected");invalid=mesh;invalid.x[0]=NAN;require(!dy::validMesh(invalid),"nonfinite coordinate rejected");invalid=mesh;invalid.pins[4]=0;require(!dy::validMesh(invalid),"missing boundary constraint rejected");
|
||||
printf("PASS spider_mesh: %d assertions, %d topologies, %lu colors/grid, CPU/Metal max relative error %.9g\n",checks,grids,(unsigned long)corpus.size(),maxError);
|
||||
}}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"passResult": true,
|
||||
"roots": [
|
||||
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color",
|
||||
"/Volumes/备份/大鱼调色",
|
||||
"/Library/Plug-Ins/FxPlug",
|
||||
"/Applications",
|
||||
"/Users/mac/Library/Plug-Ins/FxPlug",
|
||||
"/Users/mac/Downloads",
|
||||
"/Users/mac/Desktop"
|
||||
],
|
||||
"candidates": [
|
||||
{
|
||||
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"version": "1.3.1",
|
||||
"build": "19"
|
||||
}
|
||||
],
|
||||
"cleanup": "Final Release APP, loose XPC, submission ZIP, old formal backup and package staging removed by delivery/package scripts. Only this task synthetic failure fixture removed; user history and active settings preserved.",
|
||||
"scope": "Only listed roots inspected; historical distribution packages and unrelated products preserved."
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"pass" : true,
|
||||
"checks" : [
|
||||
{
|
||||
"name" : "report destination supplied",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "isolated library loaded",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "recent use deduplicates and puts latest first",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "recent history survives a new library instance",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "asynchronous browser task completed",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "recent category is first in the sidebar",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "recent category contains only used LUTs in order",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "all LUTs also put recent uses before unused names",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "loading does not update recent history",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "host rejection does not update history",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "only successful host application records recent use",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "search respects recent-first ordering",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "grid reflows when the browser size changes",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "list layout has full-width rows",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "sidebar divider changes folder width without overlapping previews",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "asynchronous browser task completed",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "layout and sidebar width survive reopening",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "asynchronous browser task completed",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "remote-parent checks never display a test window",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "window position and size are remembered",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "remote close callback runs once",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "recent history stays bounded at 40 newest paths",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "isolated fixtures and preferences cleaned",
|
||||
"pass" : true
|
||||
}
|
||||
],
|
||||
"scope" : "Real AppKit browser objects, hidden host-owned window fixture, asynchronous acknowledgement and root-scoped history; no visible test app or user LUT changes."
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/大鱼调色_1.3.1_浏览器与复位.fcpxml",
|
||||
"status": "pass",
|
||||
"dtd": "/Applications/Final Cut Pro.app/Contents/Frameworks/Interchange.framework/Versions/A/Resources/FCPXMLv1_12.dtd",
|
||||
"errors": [],
|
||||
"warnings": [],
|
||||
"checks": {
|
||||
"dtd": true,
|
||||
"xml": true,
|
||||
"local_media": {
|
||||
"checked": 1,
|
||||
"missing": 0
|
||||
}
|
||||
},
|
||||
"version": "1.12",
|
||||
"summary": {
|
||||
"projects": 1,
|
||||
"assets": 1,
|
||||
"elements": 15
|
||||
},
|
||||
"host_validation": "not_performed_by_this_command"
|
||||
}
|
||||
文件差异过大,未显示。
加载差异
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"passResult": true,
|
||||
"repository": "https://dayu.media/git/dayu/dayu-color.git",
|
||||
"sourceCommit": "dbb7ca4a995ef832178a32f35939aed7d3a85012",
|
||||
"restoredFiles": 178,
|
||||
"fsck": "full strict passed",
|
||||
"rebuiltShaderSHA256": "034fdf3de0c8ab0ac8eacc8f8a4bd6fbb8ee8c8c93ed3af61363c8175f0196e2",
|
||||
"clone": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/browser-remote-restore-obhflq1b",
|
||||
"cloneCleaned": true,
|
||||
"formalShaderSHA256": "034fdf3de0c8ab0ac8eacc8f8a4bd6fbb8ee8c8c93ed3af61363c8175f0196e2"
|
||||
}
|
||||
@@ -0,0 +1,284 @@
|
||||
{
|
||||
"sourceBytes" : 197731344,
|
||||
"mainHeartbeatMaxGapMS" : 6.234458414837718,
|
||||
"bulkFiles" : 24,
|
||||
"checks" : [
|
||||
{
|
||||
"name" : "isolated source folder created",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "synthetic 65-cube file written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "anchor fixture written",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "preexisting library item imported",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "import completion is on main queue",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "bulk import succeeds",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "background operation completes within timeout",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "all files and previous entry preserved",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "main run loop stays responsive while importing",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "cancelled import returns cancellation",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "background operation completes within timeout",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "cancel exercised after copy had begun",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "cancel rolls back newly copied files only",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "cancelled scan reports cancellation",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "background operation completes within timeout",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "cancelled scan preserves previous snapshot",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "cold selection prepares off thread and completes on main",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "background operation completes within timeout",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "invalid selection reports failure asynchronously",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "background operation completes within timeout",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "3000 catalog files in independent folders created",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "background operation completes within timeout",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "large directory list creates only visible folder controls",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "large catalog creates only visible thumbnail controls",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "scrolling keeps thumbnail view count bounded",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "search remains usable after catalog loading",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "background operation completes within timeout",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "rapid selection applies only the latest LUT",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "background operation completes within timeout",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "clear selection supersedes pending LUT application",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "scan after browser close completes",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "background operation completes within timeout",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "closing during import cancels without changing existing library",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "background operation completes within timeout",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "acknowledgement fixture has selectable thumbnails",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "thumbnail stays loading until host application acknowledges",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "host rejection preserves previous selection and reports the error",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "new thumbnail click cancels previous application task",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "late older acknowledgement cannot mark a stale LUT selected",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "only acknowledged latest thumbnail becomes selected",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "removal also waits for host acknowledgement",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "acknowledged removal clears selection",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "closing the browser cancels pending host application",
|
||||
"pass" : true
|
||||
},
|
||||
{
|
||||
"name" : "completion after close cannot change the selection",
|
||||
"pass" : true
|
||||
}
|
||||
],
|
||||
"initialLiveThumbnailViews" : 28,
|
||||
"snapshotsReadDuringImport" : 1521,
|
||||
"mainHeartbeatTicks" : 1521,
|
||||
"scope" : "Synthetic 24 x 65-cube import with real main-run-loop heartbeat and snapshot reads; headless browser cancellation, latest selection and 3,025-entry virtualization. No user library or visible test app.",
|
||||
"pass" : true,
|
||||
"largeCatalogEntries" : 3025,
|
||||
"cubeDimension" : 65,
|
||||
"initialLiveFolderViews" : 15,
|
||||
"importSeconds" : 7.5717383332084864
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"passResult": true,
|
||||
"repository": "https://dayu.media/git/dayu/dayu-color.git",
|
||||
"tag": "v1.3.1-browser-recents-20261101",
|
||||
"releaseCommit": "281721bda11484c23f294b4f0d9e0b30ef829288",
|
||||
"restoredFiles": 184,
|
||||
"fsck": "full strict passed",
|
||||
"compiledSource": "dbb7ca4a995ef832178a32f35939aed7d3a85012",
|
||||
"compiledSourceRecovery": "verification/BrowserRecovery.json",
|
||||
"cloneCleaned": true
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"pass": true,
|
||||
"productBundleID": "com.dayu.color",
|
||||
"checkedRoots": [
|
||||
"/Volumes/备份/大鱼调色/大鱼调色",
|
||||
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color",
|
||||
"/Library/Plug-Ins/FxPlug",
|
||||
"/Applications",
|
||||
"/Users/mac/Library/Plug-Ins/FxPlug",
|
||||
"/Users/mac/Desktop",
|
||||
"/Users/mac/Downloads"
|
||||
],
|
||||
"outerApps": [
|
||||
{
|
||||
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"version": "1.2.0",
|
||||
"build": "17"
|
||||
}
|
||||
],
|
||||
"scope": "Bounded current-product inventory; unrelated products and user archives not deleted.",
|
||||
"deliveryGeneratedCopiesRemoved": true,
|
||||
"recoveryCloneRemoved": true,
|
||||
"formalPackageRetained": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.2.0.pkg"
|
||||
}
|
||||
文件差异过大,未显示。
加载差异
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"pass": true,
|
||||
"repository": "https://dayu.media/git/dayu/dayu-color.git",
|
||||
"sourceCommit": "48b00c85799b0226ba32aba3f2e5397aa0e509ed",
|
||||
"restoredFiles": 151,
|
||||
"fsck": "full strict passed",
|
||||
"rebuiltShaderSHA256": "47b7c184e6f243406f0482b1a4a0312f0d0700a0b51196e51ab17a90ef0f29cc",
|
||||
"formalShaderSHA256": "47b7c184e6f243406f0482b1a4a0312f0d0700a0b51196e51ab17a90ef0f29cc",
|
||||
"clone": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/cst-remote-restore-0tb5r75b",
|
||||
"cloneCleaned": true
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"pass": true,
|
||||
"tag": "v1.2.0-cst-fold-20261101",
|
||||
"tagCommit": "8074444259fbacc758ec003aa91a6331b6224a85",
|
||||
"restoredFiles": 156,
|
||||
"fsck": "strict full passed",
|
||||
"packageRecordMatches": true,
|
||||
"cloneCleaned": true
|
||||
}
|
||||
+7
-27
@@ -2,35 +2,15 @@
|
||||
"status": "verified",
|
||||
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"bundleID": "com.dayu.color",
|
||||
"version": "1.1.5",
|
||||
"build": "16",
|
||||
"version": "1.3.1",
|
||||
"build": "19",
|
||||
"team": "B3W25FX5H5",
|
||||
"notaryID": "b47b6fe8-b7a9-4112-93b9-de85b03ca598",
|
||||
"notaryID": "9e93dc7f-04a3-44f9-a1e4-792bd7b31533",
|
||||
"notaryStatus": "Accepted",
|
||||
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
|
||||
"sourceCommit": "59b058a3c8b9e5387381574da6bbc05af437527c",
|
||||
"sourceCommit": "dbb7ca4a995ef832178a32f35939aed7d3a85012",
|
||||
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
|
||||
"templateSHA256": "ebf8b7aa7a6781b9ce611375a838d89997656b0fc01077b2a7e5b1b2a2c373e1",
|
||||
"shaderSHA256": "9d89ed3197cf987a37ad7320911d23b8510b5461ffca2bd16397c8b963e02132",
|
||||
"hostVerification": "verification/HostLUTEncoding.json",
|
||||
"sourceRecoveryVerification": "verification/LUTEncodingRecovery.json",
|
||||
"responsivenessVerification": "verification/LUTEncoding.json",
|
||||
"registry": "com.dayu.color.XPC(1.1)\t78D73EB2-7FCE-41CD-8E6A-6AABC8ACACDB\t2026-11-01 07:39:57 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit\n (1 plug-in)",
|
||||
"appInventory": [
|
||||
{
|
||||
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"version": "1.1.5",
|
||||
"build": "16"
|
||||
}
|
||||
],
|
||||
"inventoryScope": [
|
||||
"project and fixed product cache",
|
||||
"system FxPlug and Applications",
|
||||
"user FxPlug, Downloads and Desktop"
|
||||
],
|
||||
"packageVerification": "verification/Package.json",
|
||||
"packageStagingCleanup": {
|
||||
"identifier": "com.dayu.color.installer.c8d19ea6-1117-4621-ae47-48a41ea4ca10",
|
||||
"remainingMatchedDirectories": []
|
||||
}
|
||||
"templateSHA256": "86d62016bf9089d1eda07cc6a533bcb82d905df18351f48e73d6fb87945e09de",
|
||||
"shaderSHA256": "034fdf3de0c8ab0ac8eacc8f8a4bd6fbb8ee8c8c93ed3af61363c8175f0196e2",
|
||||
"hostVerification": "verification/HostBrowserAndReset.json"
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"passResult": true,
|
||||
"date": "2026-11-01",
|
||||
"version": "1.3.1",
|
||||
"build": "19",
|
||||
"hostVersion": "12.4",
|
||||
"sourceCommit": "dbb7ca4a995ef832178a32f35939aed7d3a85012",
|
||||
"formalServiceProcesses": [
|
||||
"95818 /Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit/Contents/MacOS/大鱼调色 XPC Service"
|
||||
],
|
||||
"checks": [
|
||||
{
|
||||
"name": "sony-new-instance-default",
|
||||
"passResult": true,
|
||||
"observed": "New isolated FCP instance displays Sony S-Log3 and Sony S-Gamut3.Cine; output Gamma 2.4 / Rec.709."
|
||||
},
|
||||
{
|
||||
"name": "visible-primary-reset",
|
||||
"passResult": true,
|
||||
"observed": "Wheel adjusted to 256 degrees / 0.5%; visible 复位 button restored 0 degrees / 0%."
|
||||
},
|
||||
{
|
||||
"name": "host-owned-floating-browser",
|
||||
"passResult": true,
|
||||
"observed": "Browser opens in a separate FCP floating window with system close, zoom and minimize controls; no anchored popover in this host."
|
||||
},
|
||||
{
|
||||
"name": "window-resize-and-reflow",
|
||||
"passResult": true,
|
||||
"observed": "System zoom resized the floating window; grid/footer reflowed. Frame preference observed {{0, 110}, {1449, 916}}. Exact titlebar/border drag was not independently confirmed through automation."
|
||||
},
|
||||
{
|
||||
"name": "recent-first-and-success-acknowledgement",
|
||||
"passResult": true,
|
||||
"observed": "Applied 复古胶片风 then 复古清新干净1 from existing N12 library. 最近使用 is first category and contains exactly the latter followed by the former; newest also first in the folder."
|
||||
},
|
||||
{
|
||||
"name": "list-layout",
|
||||
"passResult": true,
|
||||
"observed": "Selected 列表; each LUT displayed as a full-width row with thumbnail and name."
|
||||
},
|
||||
{
|
||||
"name": "close-reopen-persistence",
|
||||
"passResult": true,
|
||||
"observed": "Done and reopen retained 列表, 最近使用 category, two-item order and current selection."
|
||||
},
|
||||
{
|
||||
"name": "user-live-use-preserved",
|
||||
"passResult": true,
|
||||
"observed": "User began manipulating the browser; their current grid layout, thumbnail size and selection were preserved. Further host restart/reset was stopped."
|
||||
}
|
||||
],
|
||||
"testData": "New isolated synthetic project 大鱼调色_1.3.1_浏览器与复位; existing LUTs read/applied, never imported or deleted.",
|
||||
"limitations": [
|
||||
"Live titlebar/border mouse drag was attempted but exact motion was not confirmed independently; native hidden-window geometry/resize/persistence and real host window zoom were checked separately.",
|
||||
"A full FCP process restart was not repeated after the user began interacting; browser close/reopen and native persisted preference recovery passed. Motion, Intel and older macOS not tested."
|
||||
],
|
||||
"finalState": "User is actively using the formally installed new browser; no preference rollback or test-instance reset performed after user interaction.",
|
||||
"userStateObserved": {
|
||||
"windowFrame": "{{225, 90}, {1469, 936}}",
|
||||
"layout": "grid",
|
||||
"thumbnailSize": 197.9713040865385,
|
||||
"preferencesPreserved": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"pass": true,
|
||||
"date": "2026-11-01",
|
||||
"hostVersion": "12.4",
|
||||
"version": "1.2.0",
|
||||
"build": "17",
|
||||
"sourceCommit": "48b00c85799b0226ba32aba3f2e5397aa0e509ed",
|
||||
"shaderSHA256": "47b7c184e6f243406f0482b1a4a0312f0d0700a0b51196e51ab17a90ef0f29cc",
|
||||
"formalServiceProcesses": [
|
||||
"91273 /Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit/Contents/MacOS/大鱼调色 XPC Service"
|
||||
],
|
||||
"checks": [
|
||||
{
|
||||
"name": "formal-version-loaded",
|
||||
"pass": true,
|
||||
"observed": "Inspector 1.2.0; XPC executable at the formal installation"
|
||||
},
|
||||
{
|
||||
"name": "new-instance-defaults",
|
||||
"pass": true,
|
||||
"observed": "13 module eyes on; primary and basic expanded; all other modules collapsed"
|
||||
},
|
||||
{
|
||||
"name": "fold-independent-of-enable",
|
||||
"pass": true,
|
||||
"observed": "Primary exposure 0.70 retained across collapse, eye off and expand; expansion did not re-enable"
|
||||
},
|
||||
{
|
||||
"name": "separate-transfer-gamut",
|
||||
"pass": true,
|
||||
"observed": "Sony S-Log3 selected without overwriting gamut; S-Gamut3.Cine selected separately"
|
||||
},
|
||||
{
|
||||
"name": "working-space",
|
||||
"pass": true,
|
||||
"observed": "ACEScct and ACES AP1 selected independently"
|
||||
},
|
||||
{
|
||||
"name": "normal-reopen",
|
||||
"pass": true,
|
||||
"observed": "Normal quit and reopen retained Sony input, ACES working space, exposure 0.70, primary collapsed and eye off"
|
||||
},
|
||||
{
|
||||
"name": "reset-defaults",
|
||||
"pass": true,
|
||||
"observed": "Reset all restored neutral controls, all eyes on, primary/basic expanded and others collapsed"
|
||||
},
|
||||
{
|
||||
"name": "style-library",
|
||||
"pass": true,
|
||||
"observed": "N12 folder 26 entries; previews populated; selected look confirmed by host"
|
||||
},
|
||||
{
|
||||
"name": "legacy-document",
|
||||
"pass": true,
|
||||
"observed": "Old acceptance project opened with its selected look and original enable values retained; no old-project edits"
|
||||
}
|
||||
],
|
||||
"testData": "Synthetic chart in a new acceptance project; user LUT files only read, never imported or deleted.",
|
||||
"finalState": "Acceptance instance reset to defaults. Old project values unchanged.",
|
||||
"limitations": [
|
||||
"CST numeric comparisons are recorded separately in CSTIntegration.json; no claim of pixel-exact live-host export equivalence.",
|
||||
"Motion, Intel and older macOS not tested. PKG installation not repeated."
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"passResult": true,
|
||||
"date": "2026-11-01",
|
||||
"hostVersion": "12.4",
|
||||
"version": "1.3.0",
|
||||
"build": "18",
|
||||
"sourceCommit": "c2818cbb1157093f80efd2a85cea0cf1509f565e",
|
||||
"shaderSHA256": "034fdf3de0c8ab0ac8eacc8f8a4bd6fbb8ee8c8c93ed3af61363c8175f0196e2",
|
||||
"formalServiceProcesses": [
|
||||
"93869 /Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit/Contents/MacOS/大鱼调色 XPC Service"
|
||||
],
|
||||
"testData": "Isolated synthetic chart project 大鱼调色_1.3_蜘蛛盘与白平衡; no user media or LUT modifications.",
|
||||
"checks": [
|
||||
{
|
||||
"name": "formal-installed-version",
|
||||
"passResult": true,
|
||||
"observed": "Inspector shows 1.3.0; active XPC path is the unique formal installation."
|
||||
},
|
||||
{
|
||||
"name": "merged-primary-without-bypasses",
|
||||
"passResult": true,
|
||||
"observed": "Input/working controls, native primary wheel and output controls are children of one primary card. Four former bypass checkboxes are absent."
|
||||
},
|
||||
{
|
||||
"name": "new-default-layout",
|
||||
"passResult": true,
|
||||
"observed": "12 module eyes on; primary, spider and basic expanded; remaining 9 cards collapsed."
|
||||
},
|
||||
{
|
||||
"name": "wheel-host-adjustment-and-undo",
|
||||
"passResult": true,
|
||||
"observed": "Native wheel keyboard adjustment 0.5% to 1.0%; host Edit > Undo restored 0.5% at 256 degrees."
|
||||
},
|
||||
{
|
||||
"name": "spider-variable-density",
|
||||
"passResult": true,
|
||||
"observed": "Linked 6x6 to 12x12; unlink and choose saturation 8 retained hue 12."
|
||||
},
|
||||
{
|
||||
"name": "spider-host-adjustment-fixed-and-selection",
|
||||
"passResult": true,
|
||||
"observed": "Main point 1 moved by keyboard from X 0.5847 to 0.5897 after Fix; select ring selected 12 points."
|
||||
},
|
||||
{
|
||||
"name": "spider-host-undo-redo",
|
||||
"passResult": true,
|
||||
"observed": "Host Edit > Undo restored X 0.5847; Edit > Redo restored X 0.5897."
|
||||
},
|
||||
{
|
||||
"name": "fold-eye-independence",
|
||||
"passResult": true,
|
||||
"observed": "Spider collapsed and eye off separately; expanding after reopen retained eye off."
|
||||
},
|
||||
{
|
||||
"name": "normal-quit-and-reopen",
|
||||
"passResult": true,
|
||||
"observed": "Primary/spider collapsed states, spider eye off, unlinked 12x8 grid, point 1 X 0.5897 Y 0.5000, and primary wheel 256 degrees / 0.5% retained."
|
||||
},
|
||||
{
|
||||
"name": "reset-defaults",
|
||||
"passResult": true,
|
||||
"observed": "All eyes on; primary/spider/basic expanded, others collapsed; wheel 0% and spider linked 6x6 restored."
|
||||
}
|
||||
],
|
||||
"limitations": [
|
||||
"Coordinate mouse injection into the remote FxPlug view did not activate controls in this automation session. Live-host drag and double-click were not confirmed; native AppKit mouse-event integration and one-gesture undo pairing passed separately in SpiderAndBalance.json.",
|
||||
"No claim of pixel-exact live-host export; GPU/CPU and independent CST pixel checks are separate. Motion, Intel and old macOS were not tested."
|
||||
],
|
||||
"finalState": "Acceptance instance reset to defaults; FCP left on the isolated synthetic project."
|
||||
}
|
||||
+333
-23
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"bundlePath": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit",
|
||||
"checks": 92,
|
||||
"checks": 158,
|
||||
"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,21 +12,25 @@
|
||||
"error": "未提供错误信息",
|
||||
"name": "runtime-directory",
|
||||
"pass": true,
|
||||
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/6C00009B-0E3E-4F6A-84FB-501C35480F69"
|
||||
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/6821FF9D-5C7C-4DF8-9087-EB12C14C98FD"
|
||||
},
|
||||
{
|
||||
"descriptors": 196,
|
||||
"descriptors": 234,
|
||||
"name": "descriptor-unique-id-offset-key",
|
||||
"pass": true,
|
||||
"sections": 12,
|
||||
"uniformBytes": 944
|
||||
"sections": 15,
|
||||
"uniformBytes": 1104
|
||||
},
|
||||
{
|
||||
"name": "finite-real-model-defaults",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "only-basic-adjustments-enabled-by-default",
|
||||
"name": "new-input-default-sony-slog3-sgamut3-cine",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "all-module-eyes-enabled-by-default",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
@@ -47,7 +51,7 @@
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"archiveBytes": 620,
|
||||
"archiveBytes": 659,
|
||||
"error": "未提供错误信息",
|
||||
"name": "secure-asset-archive-roundtrip",
|
||||
"pass": true
|
||||
@@ -60,6 +64,151 @@
|
||||
"name": "asset-copy-is-independent",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"modules": 12,
|
||||
"name": "default-primary-spider-base-expanded-all-eyes-on",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "all-disclosure-actions-preserve-every-render-parameter",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "eye-only-toggles-enable-retains-disclosure",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "expanding-disabled-module-keeps-it-disabled",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "inspector-recreation-restores-independent-disclosure",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "secure-disclosure-archive-roundtrip",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "legacy-inspector-retains-input-and-blackwhite-behavior",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "working-space-shared-by-primary-and-output",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "basis-raw-controls-use-reference-conversion",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "unsupported-basis-curve-adapts-through-intermediate",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "primary-balance-wheel-restored-and-palette-loaded",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "single-primary-card-no-bypass-checkboxes",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"angleDegrees": 277.8014221191406,
|
||||
"name": "balance-wheel-reference-orientation-and-fine-drag",
|
||||
"pass": true,
|
||||
"strength": 0.1196703314781189
|
||||
},
|
||||
{
|
||||
"name": "balance-drag-one-host-undo-group",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "balance-visible-reset-button",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "balance-button-resets-only-wheel-one-undo",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "balance-double-click-neutral",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-default-six-by-six-31-nodes",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-single-drag-spoke-following-and-pin",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-drag-one-host-undo-group",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "spider-archive-retains-mesh-pins-and-lut-paths",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "complete-version-three-preset-includes-mesh",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-json-preset-exact-roundtrip",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-json-rejects-unsupported-topology",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-archive-rejects-nonfinite-coordinates",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-independent-resolution-and-resample",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-reset-preserves-density",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-command-multiselect",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-ring-selection",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-spoke-selection",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-shift-pin",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-pinned-anchor-still-draggable",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-right-click-reset-unpins",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-escape-restores-coordinates-and-pins",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "native-interaction-window-never-visible",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "metal-device",
|
||||
"pass": true
|
||||
@@ -81,6 +230,150 @@
|
||||
"nonzeroComponents": 9832,
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "",
|
||||
"name": "blackwhite-full-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"changedComponents": 7368,
|
||||
"maxAbsoluteError": 0.5289306640625,
|
||||
"name": "blackwhite-mix-100-affects-frame",
|
||||
"nonfiniteComponents": 0,
|
||||
"nonzeroComponents": 9832,
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "",
|
||||
"name": "blackwhite-half-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "blackwhite-half-mix-is-continuous",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "",
|
||||
"name": "blackwhite-eye-off-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "blackwhite-eye-bypasses-retained-mix",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"affectedComponents": 1288,
|
||||
"error": "未提供错误信息",
|
||||
"maximumError": 0,
|
||||
"name": "spider-production-cpu-parity-6-6",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-eye-retains-but-bypasses-6-6",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"affectedComponents": 1240,
|
||||
"error": "未提供错误信息",
|
||||
"maximumError": 0,
|
||||
"name": "spider-production-cpu-parity-6-8",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-eye-retains-but-bypasses-6-8",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"affectedComponents": 1161,
|
||||
"error": "未提供错误信息",
|
||||
"maximumError": 0,
|
||||
"name": "spider-production-cpu-parity-6-24",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-eye-retains-but-bypasses-6-24",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"affectedComponents": 612,
|
||||
"error": "未提供错误信息",
|
||||
"maximumError": 0,
|
||||
"name": "spider-production-cpu-parity-12-6",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-eye-retains-but-bypasses-12-6",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"affectedComponents": 604,
|
||||
"error": "未提供错误信息",
|
||||
"maximumError": 0,
|
||||
"name": "spider-production-cpu-parity-12-8",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-eye-retains-but-bypasses-12-8",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"affectedComponents": 571,
|
||||
"error": "未提供错误信息",
|
||||
"maximumError": 0,
|
||||
"name": "spider-production-cpu-parity-12-24",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-eye-retains-but-bypasses-12-24",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"affectedComponents": 315,
|
||||
"error": "未提供错误信息",
|
||||
"maximumError": 0,
|
||||
"name": "spider-production-cpu-parity-24-6",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-eye-retains-but-bypasses-24-6",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"affectedComponents": 314,
|
||||
"error": "未提供错误信息",
|
||||
"maximumError": 0,
|
||||
"name": "spider-production-cpu-parity-24-8",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-eye-retains-but-bypasses-24-8",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"affectedComponents": 309,
|
||||
"error": "未提供错误信息",
|
||||
"maximumError": 0,
|
||||
"name": "spider-production-cpu-parity-24-24",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "spider-eye-retains-but-bypasses-24-24",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "",
|
||||
"name": "primary-master-active-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "",
|
||||
"name": "primary-master-inactive-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "primary-master-controls-complete-cst-pipeline",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"invalidComponents": 0,
|
||||
"name": "renderer-alpha-contract",
|
||||
@@ -122,6 +415,23 @@
|
||||
"name": "preview-invalidation-clears-analysis-and-browser",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "",
|
||||
"name": "cst-export-production-sample",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "cube-export-includes-cst-primary-and-matches-production",
|
||||
"pass": true,
|
||||
"triples": 35937
|
||||
},
|
||||
{
|
||||
"error": "未提供错误信息",
|
||||
"name": "cube-export-includes-spider-warp",
|
||||
"pass": true,
|
||||
"triples": 35937
|
||||
},
|
||||
{
|
||||
"error": "",
|
||||
"name": "renderer-exposure-pass",
|
||||
@@ -180,7 +490,7 @@
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"changedComponents": 7354,
|
||||
"changedComponents": 7347,
|
||||
"maxAbsoluteError": 0.13134765625,
|
||||
"name": "hsl-real-table-frame",
|
||||
"nonfiniteComponents": 0,
|
||||
@@ -189,13 +499,13 @@
|
||||
},
|
||||
{
|
||||
"error": "",
|
||||
"name": "folded-hsl-bypasses-retained-adjustments-render",
|
||||
"name": "disabled-hsl-bypasses-retained-adjustments-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"changedComponents": 0,
|
||||
"maxAbsoluteError": 0,
|
||||
"name": "folded-hsl-bypasses-retained-adjustments",
|
||||
"name": "disabled-hsl-bypasses-retained-adjustments",
|
||||
"nonfiniteComponents": 0,
|
||||
"nonzeroComponents": 9832,
|
||||
"pass": true
|
||||
@@ -206,8 +516,8 @@
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"changedComponents": 7357,
|
||||
"maxAbsoluteError": 0.094482421875,
|
||||
"changedComponents": 7347,
|
||||
"maxAbsoluteError": 0.09033203125,
|
||||
"name": "grading-real-table-frame",
|
||||
"nonfiniteComponents": 0,
|
||||
"nonzeroComponents": 9832,
|
||||
@@ -215,13 +525,13 @@
|
||||
},
|
||||
{
|
||||
"error": "",
|
||||
"name": "folded-grading-bypasses-retained-adjustments-render",
|
||||
"name": "disabled-grading-bypasses-retained-adjustments-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"changedComponents": 0,
|
||||
"maxAbsoluteError": 0,
|
||||
"name": "folded-grading-bypasses-retained-adjustments",
|
||||
"name": "disabled-grading-bypasses-retained-adjustments",
|
||||
"nonfiniteComponents": 0,
|
||||
"nonzeroComponents": 9832,
|
||||
"pass": true
|
||||
@@ -449,13 +759,13 @@
|
||||
},
|
||||
{
|
||||
"error": "",
|
||||
"name": "folded-input-bypasses-retained-profile-render",
|
||||
"name": "disabled-input-bypasses-retained-profile-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"changedComponents": 0,
|
||||
"maxAbsoluteError": 0,
|
||||
"name": "folded-input-bypasses-retained-profile",
|
||||
"name": "disabled-input-bypasses-retained-profile",
|
||||
"nonfiniteComponents": 0,
|
||||
"nonzeroComponents": 9832,
|
||||
"pass": true
|
||||
@@ -491,13 +801,13 @@
|
||||
},
|
||||
{
|
||||
"error": "",
|
||||
"name": "folded-look-bypasses-retained-LUTs-render",
|
||||
"name": "disabled-look-bypasses-retained-LUTs-render",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"changedComponents": 0,
|
||||
"maxAbsoluteError": 0,
|
||||
"name": "folded-look-bypasses-retained-LUTs",
|
||||
"name": "disabled-look-bypasses-retained-LUTs",
|
||||
"nonfiniteComponents": 0,
|
||||
"nonzeroComponents": 9832,
|
||||
"pass": true
|
||||
@@ -506,10 +816,10 @@
|
||||
"error": "未提供错误信息",
|
||||
"name": "renderer-export-33cube",
|
||||
"pass": true,
|
||||
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/6C00009B-0E3E-4F6A-84FB-501C35480F69/diagnostic-export.cube"
|
||||
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/6821FF9D-5C7C-4DF8-9087-EB12C14C98FD/diagnostic-export.cube"
|
||||
},
|
||||
{
|
||||
"bytes": 1186070,
|
||||
"bytes": 1186074,
|
||||
"name": "export-33cube-data-contract",
|
||||
"nonzeroRows": 35937,
|
||||
"pass": true,
|
||||
@@ -525,8 +835,8 @@
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"heartbeats": 4,
|
||||
"maximumGapMS": 5.919541465118527,
|
||||
"heartbeats": 0,
|
||||
"maximumGapMS": 82.96920848079026,
|
||||
"name": "external-activation-main-loop-responsive",
|
||||
"pass": true
|
||||
},
|
||||
@@ -565,6 +875,6 @@
|
||||
"pass": true
|
||||
}
|
||||
],
|
||||
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/6C00009B-0E3E-4F6A-84FB-501C35480F69",
|
||||
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/6821FF9D-5C7C-4DF8-9087-EB12C14C98FD",
|
||||
"scope": "Native model and renderer integration with real Metal/IOSurface textures and fake FxPlug host selectors; no GUI or live host document."
|
||||
}
|
||||
+16
-16
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.1.5.pkg",
|
||||
"sha256": "bf2a4acc57a3c08176be0f317c90551120bfcfb21a7224a690191884c8a3d071",
|
||||
"bytes": 13752153,
|
||||
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.3.1.pkg",
|
||||
"sha256": "954b10c581f31d23a8c417a6f37b24fae19939786dce8733b4d6f09c7ed3adae",
|
||||
"bytes": 14073683,
|
||||
"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.1.5",
|
||||
"build": "16"
|
||||
"version": "1.3.1",
|
||||
"build": "19"
|
||||
},
|
||||
{
|
||||
"source": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/pkg-inputs/大鱼调色",
|
||||
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.c8d19ea6-1117-4621-ae47-48a41ea4ca10/1F33731D-2B0E-486C-8F6B-88E78433618D/大鱼调色"
|
||||
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.65103cc9-6665-4d36-b01f-133a9a371475/740F02F8-EDB2-42B1-B5C8-D2D7138B46E7/大鱼调色"
|
||||
}
|
||||
],
|
||||
"signature": "Package \"大鱼调色-1.1.5.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-01 07:46:31 +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.1.5.pkg: accepted\nsource=Notarized Developer ID",
|
||||
"signature": "Package \"大鱼调色-1.3.1.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-01 12:55:56 +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.3.1.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": {
|
||||
"message": "Successfully received submission info",
|
||||
"name": "大鱼调色-1.1.5.pkg",
|
||||
"status": "Accepted",
|
||||
"createdDate": "2026-11-01T07:46:33.136Z",
|
||||
"id": "90a38636-93bb-4693-8db2-16b9a815e409"
|
||||
"createdDate": "2026-11-01T12:55:58.535Z",
|
||||
"id": "85cad776-c3d7-4037-9643-24041b269002",
|
||||
"name": "大鱼调色-1.3.1.pkg"
|
||||
},
|
||||
"appCompiledSource": "59b058a3c8b9e5387381574da6bbc05af437527c",
|
||||
"appBuild": "16",
|
||||
"appCompiledSource": "dbb7ca4a995ef832178a32f35939aed7d3a85012",
|
||||
"appBuild": "19",
|
||||
"packageBuilderRemote": "https://dayu.media/git/dayu/pkg-forge.git",
|
||||
"packageBuilderCommit": "191da9dc0abfda83fcc5939f6fc90e4c9019f4d9",
|
||||
"packageBuilderCommit": "eb53707c0e67d8ddeab8c1270bb079f1050cfafe",
|
||||
"templateSHA256": {
|
||||
"大鱼调色.moef": "ebf8b7aa7a6781b9ce611375a838d89997656b0fc01077b2a7e5b1b2a2c373e1",
|
||||
"大鱼调色.moef": "86d62016bf9089d1eda07cc6a533bcb82d905df18351f48e73d6fb87945e09de",
|
||||
"large.png": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a",
|
||||
"small.png": "41fec3138aee904fc39d6982e6fde809243ffec55298dbfe966f4f48d89caf8a"
|
||||
},
|
||||
"installedAppHostAcceptance": "verification/HostLUTEncoding.json",
|
||||
"installedAppHostAcceptance": "verification/HostBrowserAndReset.json",
|
||||
"installScope": "本轮仅生成并验包,未再次执行系统安装;正式 APP 已有独立宿主验收。"
|
||||
}
|
||||
+19
-23
@@ -3,37 +3,33 @@
|
||||
"repository": "dayu/dayu-color",
|
||||
"repositoryID": 52,
|
||||
"private": false,
|
||||
"tag": "v1.1.5-lut-encoding-20261101",
|
||||
"releaseCommit": "06968514fc5205a83fbf3c5a3dbb1be0f6f3e79b",
|
||||
"releaseID": 355,
|
||||
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.1.5-lut-encoding-20261101",
|
||||
"assetID": 8,
|
||||
"assetName": "大鱼调色-1.1.5.pkg",
|
||||
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.1.5-lut-encoding-20261101/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.1.5.pkg",
|
||||
"bytes": 13752153,
|
||||
"sha256": "bf2a4acc57a3c08176be0f317c90551120bfcfb21a7224a690191884c8a3d071",
|
||||
"tag": "v1.3.1-browser-recents-20261101",
|
||||
"releaseCommit": "281721bda11484c23f294b4f0d9e0b30ef829288",
|
||||
"releaseID": 366,
|
||||
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.3.1-browser-recents-20261101",
|
||||
"assetID": 12,
|
||||
"assetName": "大鱼调色-1.3.1.pkg",
|
||||
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.3.1-browser-recents-20261101/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.3.1.pkg",
|
||||
"bytes": 14073683,
|
||||
"sha256": "954b10c581f31d23a8c417a6f37b24fae19939786dce8733b4d6f09c7ed3adae",
|
||||
"existingAssetReused": true,
|
||||
"verification": "Authenticated full download SHA-256 and byte count, then release/asset read-back.",
|
||||
"credentialSource": "macOS Keychain: dayu-git-api",
|
||||
"verifiedAt": "2026-11-01T08:23:02.166677+00:00",
|
||||
"status": "published-and-download-verified",
|
||||
"packageVerification": "verification/Package.json",
|
||||
"verifiedAt": "2026-11-01T13:00:20.219723+00:00",
|
||||
"prePublishDraftDownload": {
|
||||
"passResult": true,
|
||||
"path": "/Volumes/备份/大鱼调色-1.1.5.pkg",
|
||||
"bytes": 13752153,
|
||||
"sha256": "bf2a4acc57a3c08176be0f317c90551120bfcfb21a7224a690191884c8a3d071",
|
||||
"sourceURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.1.5-lut-encoding-20261101/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.1.5.pkg",
|
||||
"source": "Completed authenticated Microsoft Edge download from the draft release asset URL, located through its Open containing folder action.",
|
||||
"whereFromsPresent": false,
|
||||
"whereFromsMatches": false,
|
||||
"birthtime": 1793521155.9,
|
||||
"releaseID": 355,
|
||||
"assetID": 8,
|
||||
"path": "/Volumes/备份/大鱼调色-1.3.1.pkg",
|
||||
"bytes": 14073683,
|
||||
"sha256": "954b10c581f31d23a8c417a6f37b24fae19939786dce8733b4d6f09c7ed3adae",
|
||||
"sourceURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.3.1-browser-recents-20261101/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.3.1.pkg",
|
||||
"source": "Completed authenticated Edge draft download; downloads view changed to completed and file verified at the saved download destination.",
|
||||
"birthtime": 1793537923.88,
|
||||
"releaseID": 366,
|
||||
"assetID": 12,
|
||||
"temporaryCopyRemoved": true
|
||||
},
|
||||
"publisherSourceCommit": "557bea72d68dde09db2c40ae220b12fc68db87a7",
|
||||
"actualAppCompiledSource": "59b058a3c8b9e5387381574da6bbc05af437527c",
|
||||
"actualAppCompiledSource": "dbb7ca4a995ef832178a32f35939aed7d3a85012",
|
||||
"assetUploads": 1,
|
||||
"credentialValueRecorded": false
|
||||
}
|
||||
文件差异过大,未显示。
加载差异
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"roots": [
|
||||
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color",
|
||||
"/Volumes/备份/大鱼调色",
|
||||
"/Library/Plug-Ins/FxPlug",
|
||||
"/Applications",
|
||||
"/Users/mac/Library/Plug-Ins/FxPlug",
|
||||
"/Users/mac/Downloads",
|
||||
"/Users/mac/Desktop"
|
||||
],
|
||||
"candidates": [
|
||||
{
|
||||
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
|
||||
"version": "1.3.0",
|
||||
"build": "18"
|
||||
}
|
||||
],
|
||||
"phase": "After formal install and package generation",
|
||||
"passResult": true,
|
||||
"scope": "Only the listed roots inspected. Other products and user archives preserved.",
|
||||
"cleanup": "Delivery script removed its Release APP, loose XPC, submission ZIP and previous formal backup after successful acceptance; PKG builder removed its staging copies."
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"pass": true,
|
||||
"output": "PASS spider_mesh: 204683 assertions, 25 topologies, 2005 colors/grid, CPU/Metal max relative error 1.78813934e-06",
|
||||
"assertions": 204683,
|
||||
"topologies": 25,
|
||||
"colorsPerGrid": 2005,
|
||||
"maxRelativeError": 1.78813934e-06,
|
||||
"source": "tools/verify_spider_mesh.mm",
|
||||
"coreSourceSHA256": "bdd6278e17ff4208ad94a8b0e834c817c0a3475f205dd79898e8fd88e84a19c9"
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"passResult": true,
|
||||
"repository": "https://dayu.media/git/dayu/dayu-color.git",
|
||||
"sourceCommit": "c2818cbb1157093f80efd2a85cea0cf1509f565e",
|
||||
"restoredFiles": 168,
|
||||
"fsck": "full strict passed",
|
||||
"rebuiltShaderSHA256": "034fdf3de0c8ab0ac8eacc8f8a4bd6fbb8ee8c8c93ed3af61363c8175f0196e2",
|
||||
"clone": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/spider-remote-restore-_wlti6wz",
|
||||
"cloneCleaned": true,
|
||||
"formalShaderSHA256": "034fdf3de0c8ab0ac8eacc8f8a4bd6fbb8ee8c8c93ed3af61363c8175f0196e2"
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"passResult": true,
|
||||
"repository": "https://dayu.media/git/dayu/dayu-color.git",
|
||||
"tag": "v1.3.0-spider-balance-20261101",
|
||||
"releaseCommit": "6528f888affe0acdd4292bc0c5ae0dac3a89b5a5",
|
||||
"restoredFiles": 172,
|
||||
"fsck": "full strict passed",
|
||||
"compiledSource": "c2818cbb1157093f80efd2a85cea0cf1509f565e",
|
||||
"compiledSourceRecovery": "verification/SpiderRecovery.json",
|
||||
"cloneCleaned": true
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
#ifndef DAYU_SHADER_TYPES_H
|
||||
#define DAYU_SHADER_TYPES_H
|
||||
#include <simd/simd.h>
|
||||
typedef struct CSTParams { int inputGamut, inputTransfer, outputGamut, outputTransfer, toneMapping; } CSTParams;
|
||||
typedef struct BasisParams {
|
||||
int colorspace;
|
||||
float exposure, balanceTarget, balanceStrength, contrast, pivot, highlights, midtones, shadows;
|
||||
float trimLow, trimHigh, trimToeStrength, trimShoulderStrength, shadowContrast, shadowPivot, hiContrast, hiPivot, chromaMix;
|
||||
unsigned char bypassBalance, bypassTone, bypassExposure, bypassContrast;
|
||||
float saturation;
|
||||
} BasisParams;
|
||||
typedef struct DayuRenderParams {
|
||||
CSTParams input;
|
||||
CSTParams output;
|
||||
BasisParams basis;
|
||||
int stages;
|
||||
int sourceLinear;
|
||||
int destinationLinear;
|
||||
int reserved;
|
||||
// Additional curve-only adapters for working encodings absent from original BASIS.
|
||||
CSTParams basisInput;
|
||||
CSTParams basisOutput;
|
||||
} DayuRenderParams;
|
||||
#ifndef __METAL_VERSION__
|
||||
_Static_assert(sizeof(CSTParams)==20, "CST target layout");
|
||||
_Static_assert(sizeof(BasisParams)==80, "BASIS target layout");
|
||||
_Static_assert(sizeof(DayuRenderParams)==176, "Integrated layout; legacy prefix remains 136 bytes");
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,63 @@
|
||||
// Raw, animatable CST controls. The first 944 bytes of DYUniforms stay unchanged.
|
||||
#pragma once
|
||||
#include "DYCSTTypes.h"
|
||||
typedef struct DYCMSettings {
|
||||
float configured;
|
||||
float inputTransfer;
|
||||
float inputGamut;
|
||||
float workingTransfer;
|
||||
float workingGamut;
|
||||
float inputEnabled;
|
||||
float basisEnabled;
|
||||
float outputEnabled;
|
||||
float outputTransfer;
|
||||
float outputGamut;
|
||||
float toneMapping;
|
||||
float exposure;
|
||||
float balanceAngle;
|
||||
float balanceStrength;
|
||||
float saturation;
|
||||
float contrast;
|
||||
float pivot;
|
||||
float hiContrast;
|
||||
float hiPivot;
|
||||
float shadowContrast;
|
||||
float shadowPivot;
|
||||
float white;
|
||||
float shoulder;
|
||||
float highlights;
|
||||
float midtones;
|
||||
float shadows;
|
||||
float black;
|
||||
float toe;
|
||||
float chromaMix;
|
||||
float bypassExposure;
|
||||
float bypassBalance;
|
||||
float bypassContrast;
|
||||
float bypassTone;
|
||||
float mix;
|
||||
float blackWhiteMix;
|
||||
} DYCMSettings;
|
||||
#ifndef __METAL_VERSION__
|
||||
#include <math.h>
|
||||
static inline int DYBasisMode(int c) {
|
||||
if(c==99)return 0;if(c>=1&&c<=11)return c;
|
||||
switch(c){case 14:return 12;case 15:return 13;case 16:return 14;case 19:return 15;case 20:return 16;case 21:return 17;case 22:return 18;case 25:return 19;case 27:return 20;case 28:return 21;default:return -1;}
|
||||
}
|
||||
static inline DayuRenderParams DYCMRender(DYCMSettings s) {
|
||||
DayuRenderParams p={0};
|
||||
p.input=(CSTParams){(int)lroundf(s.inputGamut),(int)lroundf(s.inputTransfer),(int)lroundf(s.workingGamut),(int)lroundf(s.workingTransfer),0};
|
||||
p.output=(CSTParams){p.input.outputGamut,p.input.outputTransfer,(int)lroundf(s.outputGamut),(int)lroundf(s.outputTransfer),(int)lroundf(s.toneMapping)};
|
||||
p.stages=(s.inputEnabled>.5?1:0)|(s.basisEnabled>.5?2:0)|(s.outputEnabled>.5?4:0);
|
||||
if(s.toneMapping>.5){p.input.toneMapping=(p.input.inputTransfer>1000?2:0)+(p.input.outputTransfer>1000?1:0);p.output.toneMapping=(p.output.inputTransfer>1000?2:0)+(p.output.outputTransfer>1000?1:0);}
|
||||
int mode=DYBasisMode(p.input.outputTransfer);p.basis.colorspace=mode<0?10:mode;
|
||||
if(mode<0){p.reserved|=8;p.basisInput=(CSTParams){p.input.outputGamut,p.input.outputTransfer,p.input.outputGamut,10,0};p.basisOutput=(CSTParams){p.input.outputGamut,10,p.input.outputGamut,p.input.outputTransfer,0};}
|
||||
BasisParams *b=&p.basis;
|
||||
b->exposure=exp2f(s.exposure);b->balanceTarget=s.balanceAngle;b->balanceStrength=s.balanceStrength*s.balanceStrength*4;
|
||||
b->contrast=exp2f(s.contrast);b->pivot=exp2f(s.pivot);b->highlights=s.highlights;b->midtones=s.midtones*.3330000042915344f;b->shadows=s.shadows*1.5f;
|
||||
b->trimLow=1.0+(double)s.black*-.5;b->trimHigh=s.white;b->trimToeStrength=1+15*s.toe;b->trimShoulderStrength=1+7*s.shoulder;
|
||||
b->shadowContrast=(double)s.shadowContrast*-1.3;b->shadowPivot=exp2f(.20000000298023224f*s.shadowPivot);b->hiContrast=s.hiContrast*2;b->hiPivot=exp2f(-.20000000298023224f*s.hiPivot);b->chromaMix=s.chromaMix;
|
||||
b->bypassExposure=s.bypassExposure>.5;b->bypassBalance=s.bypassBalance>.5;b->bypassContrast=s.bypassContrast>.5;b->bypassTone=s.bypassTone>.5;b->saturation=s.saturation;
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
+153
-8
@@ -3,6 +3,8 @@
|
||||
#import "DYRenderer.h"
|
||||
#import "DYAutoGrade.h"
|
||||
#import "DYLUTLibrary.h"
|
||||
#import "DYInspector.h"
|
||||
#include "DYSpiderState.h"
|
||||
#include <string>
|
||||
#import <CoreVideo/CoreVideo.h>
|
||||
#import <IOSurface/IOSurface.h>
|
||||
@@ -18,15 +20,39 @@
|
||||
@public
|
||||
NSMutableDictionary *_values,*_custom;
|
||||
BOOL _duplicate;
|
||||
@public
|
||||
int _undoStarts,_undoEnds;BOOL _undoActive;
|
||||
}
|
||||
@end
|
||||
@interface DYInspector (DiagnosticActions)
|
||||
- (void)refresh;
|
||||
- (void)resetAll:(id)sender;
|
||||
@end
|
||||
@protocol DYSpiderProbe
|
||||
@property(nonatomic,copy) NSData *meshData;
|
||||
@property(nonatomic,retain) NSMutableIndexSet *selection,*pinned;
|
||||
@property(nonatomic,copy) void(^changed)(DYGrade,NSData*);
|
||||
@property(nonatomic,copy) void(^gesture)(BOOL);
|
||||
@property(nonatomic,readonly) NSInteger hueCount,saturationCount;
|
||||
- (void)changeHueCount:(int)hues saturationCount:(int)saturation;
|
||||
- (void)resetMesh;
|
||||
- (NSPoint)point:(NSInteger)index;
|
||||
- (void)selectRing;
|
||||
- (void)selectSpoke;
|
||||
- (void)resetSelected;
|
||||
@end
|
||||
@implementation DYDiagnosticManager
|
||||
- (instancetype)init {if((self=[super init])){_values=[NSMutableDictionary new];_custom=[NSMutableDictionary new];}return self;}
|
||||
- (void)dealloc {[_values release];[_custom release];[super dealloc];}
|
||||
- (id)apiForProtocol:(Protocol *)protocol {
|
||||
NSString *name=NSStringFromProtocol(protocol);
|
||||
return [@[@"FxParameterCreationAPI_v5",@"FxParameterRetrievalAPI_v6",@"FxParameterSettingAPI_v6"]containsObject:name]?self:nil;
|
||||
return [@[@"FxParameterCreationAPI_v5",@"FxParameterRetrievalAPI_v6",@"FxParameterSettingAPI_v6",@"FxCustomParameterActionAPI_v4",@"FxUndoAPI"]containsObject:name]?self:nil;
|
||||
}
|
||||
- (BOOL)startUndoGroup:(NSString *)title{_undoStarts++;_undoActive=YES;return YES;}
|
||||
- (BOOL)endUndoGroup{_undoEnds++;_undoActive=NO;return YES;}
|
||||
- (void)startAction:(id)sender{}
|
||||
- (void)endAction:(id)sender{}
|
||||
- (CMTime)currentTime{return kCMTimeZero;}
|
||||
- (BOOL)addFloatSliderWithName:(NSString *)name parameterID:(UInt32)pid defaultValue:(double)value parameterMin:(double)minimum parameterMax:(double)maximum sliderMin:(double)sliderMinimum sliderMax:(double)sliderMaximum delta:(double)delta parameterFlags:(FxParameterFlags)flags {
|
||||
if(_values[@(pid)]||_custom[@(pid)]){_duplicate=YES;return NO;}_values[@(pid)]=@(value);return YES;
|
||||
}
|
||||
@@ -109,6 +135,21 @@ static Pixels render(Run& run,DYRenderer *renderer,DYDiagnosticTile *source,DYDi
|
||||
NSError *error=nil;BOOL ok=[renderer renderSource:source destination:destination uniforms:uniforms paths:paths error:&error];
|
||||
run.need(name,ok,@{@"error":ok?@"":reason(error)});return read(destination,gpu);
|
||||
}
|
||||
static Pixels referenceFrame(id<MTLDevice> gpu,id<MTLLibrary> library,const Pixels &premult,NSUInteger width,NSUInteger height,DayuRenderParams params,NSError **error){
|
||||
MTLTextureDescriptor *td=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA16Float width:width height:height mipmapped:NO];td.storageMode=MTLStorageModeShared;td.usage=MTLTextureUsageShaderRead;
|
||||
id<MTLTexture>source=[gpu newTextureWithDescriptor:td];td.pixelFormat=MTLPixelFormatRGBA32Float;td.usage=MTLTextureUsageRenderTarget;id<MTLTexture>dest=[gpu newTextureWithDescriptor:td];
|
||||
Pixels encoded(premult.size());for(NSUInteger i=0;i<width*height;i++){float alpha=premult[i*4+3];for(int c=0;c<3;c++){float v=alpha>0?(float)(__fp16)((float)premult[i*4+c]/alpha):0;encoded[i*4+c]=v<=.0031308f?v*12.92f:1.055f*powf(v,1/2.4f)-.055f;}encoded[i*4+3]=alpha;}
|
||||
[source replaceRegion:MTLRegionMake2D(0,0,width,height) mipmapLevel:0 withBytes:encoded.data() bytesPerRow:width*8];
|
||||
MTLRenderPipelineDescriptor *pd=[MTLRenderPipelineDescriptor new];pd.vertexFunction=[library newFunctionWithName:@"vertexShader"];pd.fragmentFunction=[library newFunctionWithName:@"fragmentShader"];pd.colorAttachments[0].pixelFormat=MTLPixelFormatRGBA32Float;
|
||||
id<MTLRenderPipelineState>pipeline=[gpu newRenderPipelineStateWithDescriptor:pd error:error];[pd.vertexFunction release];[pd.fragmentFunction release];[pd release];
|
||||
Pixels result;if(pipeline){id<MTLCommandQueue>q=[gpu newCommandQueue];id<MTLCommandBuffer>cb=[q commandBuffer];MTLRenderPassDescriptor *rp=[MTLRenderPassDescriptor renderPassDescriptor];rp.colorAttachments[0].texture=dest;rp.colorAttachments[0].loadAction=MTLLoadActionDontCare;rp.colorAttachments[0].storeAction=MTLStoreActionStore;id<MTLRenderCommandEncoder>e=[cb renderCommandEncoderWithDescriptor:rp];
|
||||
float w=width,h=height;DYVertex2D vertices[]={{{w/2,-h/2},{1,1}},{{-w/2,-h/2},{0,1}},{{w/2,h/2},{1,0}},{{-w/2,h/2},{0,0}}};vector_uint2 vp={(unsigned)width,(unsigned)height};id<MTLBuffer>hist=[gpu newBufferWithLength:800 options:MTLResourceStorageModeShared];
|
||||
[e setRenderPipelineState:pipeline];[e setVertexBytes:vertices length:sizeof(vertices) atIndex:0];[e setVertexBytes:&vp length:sizeof(vp) atIndex:1];[e setFragmentTexture:source atIndex:0];[e setFragmentTexture:source atIndex:1];[e setFragmentBytes:¶ms length:sizeof(params) atIndex:0];[e setFragmentBuffer:hist offset:0 atIndex:1];[e drawPrimitives:MTLPrimitiveTypeTriangleStrip vertexStart:0 vertexCount:4];[e endEncoding];[cb commit];[cb waitUntilCompleted];
|
||||
if(cb.status==MTLCommandBufferStatusCompleted){std::vector<float>pixels(width*height*4);[dest getBytes:pixels.data() bytesPerRow:width*16 fromRegion:MTLRegionMake2D(0,0,width,height) mipmapLevel:0];result.resize(premult.size());for(NSUInteger i=0;i<width*height;i++){float a=premult[i*4+3];for(int c=0;c<3;c++){float v=pixels[i*4+c];float linear=v<=.04045f?v/12.92f:powf((v+.055f)/1.055f,2.4f);result[i*4+c]=a>0?(__fp16)((float)(__fp16)linear*a):0;}result[i*4+3]=a;}}
|
||||
[hist release];[q release];
|
||||
}
|
||||
[pipeline release];[source release];[dest release];return result;
|
||||
}
|
||||
static float *field(DYUniforms *u,NSDictionary *row){return (float *)((uint8_t *)u+[row[@"offset"]unsignedIntegerValue]);}
|
||||
}
|
||||
|
||||
@@ -127,9 +168,10 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
|
||||
for(NSDictionary *row in descriptors)if([row[@"offset"]integerValue]>=0){float value=*field(&defaults,row);finite&=std::isfinite(value);matches&=value==[row[@"default"]floatValue];}
|
||||
for(int c=0;c<3;c++)finite&=std::isfinite(defaults.primariesM0[c])&&std::isfinite(defaults.primariesM1[c])&&std::isfinite(defaults.primariesM2[c]);
|
||||
run.need(@"finite-real-model-defaults",finite&&matches);
|
||||
run.record(@"new-input-default-sony-slog3-sgamut3-cine",defaults.cm.inputTransfer==28&&defaults.cm.inputGamut==27&&defaults.cm.outputTransfer==1002&&defaults.cm.outputGamut==22);
|
||||
bool initialGroups=true;
|
||||
for(NSDictionary *section in sections){BOOL base=[@[@"base",@"color"]containsObject:section[@"key"]];for(NSDictionary *row in descriptors)if([row[@"pid"]isEqual:section[@"enabled"]])initialGroups&=([row[@"default"]doubleValue]>=.5)==base;}
|
||||
run.record(@"only-basic-adjustments-enabled-by-default",initialGroups);
|
||||
for(NSDictionary *section in sections){BOOL base=YES;for(NSDictionary *row in descriptors)if([row[@"pid"]isEqual:section[@"enabled"]])initialGroups&=([row[@"default"]doubleValue]>=.5)==base;}
|
||||
run.record(@"all-module-eyes-enabled-by-default",initialGroups);
|
||||
DYDiagnosticManager *manager=[[[DYDiagnosticManager alloc]init]autorelease];error=nil;
|
||||
run.need(@"native-parameter-creation",DYCreateParameters(manager,&error)&&!manager->_duplicate&&manager->_values.count==descriptors.count&&manager->_custom.count==2,@{@"error":reason(error)});
|
||||
id<FxParameterSettingAPI_v6> setter=[manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];id<FxParameterRetrievalAPI_v6> getter=[manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
|
||||
@@ -142,13 +184,100 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
|
||||
run.record(@"secure-asset-archive-roundtrip",decoded&&[assets isEqual:decoded],@{@"archiveBytes":@(archive.length),@"error":reason(error)});
|
||||
BOOL wrote=DYWriteAssets(manager,assets,kCMTimeZero);DYAssetState *readBack=DYReadAssets(manager,kCMTimeZero);run.record(@"native-custom-asset-get-set",wrote&&[readBack isEqual:assets]);
|
||||
DYAssetState *copy=[[assets copy]autorelease];copy.paths=@{};run.record(@"asset-copy-is-independent",assets.paths.count==2&©.paths.count==0);
|
||||
// Exercise the real AppKit actions against a separate, in-memory host.
|
||||
[NSApplication sharedApplication];
|
||||
DYDiagnosticManager *uiHost=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(uiHost,nil);
|
||||
DYInspector *inspector=[[[DYInspector alloc]initWithAPIManager:uiHost]autorelease];[inspector refresh];
|
||||
NSArray *cards=[inspector valueForKey:@"cards"];BOOL initialUI=YES;
|
||||
for(NSDictionary *card in cards)initialUI&=([card[@"collapsed"]boolValue]!=[@[@"primary",@"spider",@"base"]containsObject:card[@"section"][@"key"]])&&[(NSButton*)card[@"enabled"]state]==NSControlStateValueOn;
|
||||
run.record(@"default-primary-spider-base-expanded-all-eyes-on",initialUI,@{@"modules":@(cards.count)});
|
||||
DYUniforms uiBefore,uiAfter;DYReadUniforms(uiHost,kCMTimeZero,&uiBefore);BOOL foldingIndependent=YES;
|
||||
for(NSDictionary *card in cards){NSButton *header=card[@"header"];BOOL was=[card[@"collapsed"]boolValue];[header performClick:nil];[inspector refresh];DYReadUniforms(uiHost,kCMTimeZero,&uiAfter);foldingIndependent&=[card[@"collapsed"]boolValue]!=was&&memcmp(&uiBefore,&uiAfter,sizeof(uiBefore))==0;[header performClick:nil];[inspector refresh];}
|
||||
run.record(@"all-disclosure-actions-preserve-every-render-parameter",foldingIndependent);
|
||||
NSDictionary *first=cards[0];if(![first[@"collapsed"]boolValue]){[(NSButton*)first[@"header"]performClick:nil];[inspector refresh];}BOOL wasFolded=[first[@"collapsed"]boolValue];[(NSButton*)first[@"enabled"]performClick:nil];[inspector refresh];DYReadUniforms(uiHost,kCMTimeZero,&uiAfter);
|
||||
run.record(@"eye-only-toggles-enable-retains-disclosure",[first[@"collapsed"]boolValue]==wasFolded&&uiAfter.inputSectionEnabled==0);
|
||||
[(NSButton*)first[@"header"]performClick:nil];[inspector refresh];DYReadUniforms(uiHost,kCMTimeZero,&uiAfter);
|
||||
run.record(@"expanding-disabled-module-keeps-it-disabled",uiAfter.inputSectionEnabled==0&&![first[@"collapsed"]boolValue]);
|
||||
DYInspector *reopened=[[[DYInspector alloc]initWithAPIManager:uiHost]autorelease];[reopened refresh];NSArray *reopenedCards=[reopened valueForKey:@"cards"];
|
||||
run.record(@"inspector-recreation-restores-independent-disclosure",![reopenedCards[0][@"collapsed"]boolValue]&&[(NSButton*)reopenedCards[0][@"enabled"]state]==NSControlStateValueOff);
|
||||
DYInspectorToken *uiToken=uiHost->_custom[@(DYInspectorParameterID)];error=nil;NSData *foldArchive=[NSKeyedArchiver archivedDataWithRootObject:uiToken requiringSecureCoding:YES error:&error];DYInspectorToken *foldDecoded=[NSKeyedUnarchiver unarchivedObjectOfClass:DYInspectorToken.class fromData:foldArchive error:&error];
|
||||
run.record(@"secure-disclosure-archive-roundtrip",[foldDecoded isEqual:uiToken],@{@"error":reason(error)});
|
||||
DYInspectorToken *old=[[[DYInspectorToken alloc]init]autorelease];old.schema=1;uiHost->_custom[@(DYInspectorParameterID)]=old;DYReadUniforms(uiHost,kCMTimeZero,&uiAfter);
|
||||
run.record(@"legacy-inspector-retains-input-and-blackwhite-behavior",uiAfter.cm.configured==-1&&uiAfter.cm.blackWhiteMix==1);
|
||||
DayuRenderParams cp=DYCMRender(defaults.cm);run.record(@"working-space-shared-by-primary-and-output",cp.input.outputTransfer==cp.output.inputTransfer&&cp.input.outputGamut==cp.output.inputGamut&&cp.basis.colorspace==10);
|
||||
DYCMSettings converted=defaults.cm;converted.exposure=1.25;converted.contrast=.4;converted.balanceStrength=.3;converted.midtones=.6;converted.shadows=-.4;converted.black=.2;converted.shadowContrast=.3;converted.hiContrast=-.2;DayuRenderParams mapped=DYCMRender(converted);
|
||||
run.record(@"basis-raw-controls-use-reference-conversion",fabs(mapped.basis.exposure-exp2f(1.25))<1e-6&&fabs(mapped.basis.contrast-exp2f(.4))<1e-6&&fabs(mapped.basis.balanceStrength-.36)<1e-6&&fabs(mapped.basis.midtones-.1998)<1e-5&&fabs(mapped.basis.shadows+.6)<1e-6&&fabs(mapped.basis.trimLow-.9)<1e-6&&fabs(mapped.basis.shadowContrast+.39)<1e-6&&fabs(mapped.basis.hiContrast+.4)<1e-6);
|
||||
converted.workingTransfer=30;mapped=DYCMRender(converted);run.record(@"unsupported-basis-curve-adapts-through-intermediate",(mapped.reserved&8)&&mapped.basis.colorspace==10&&mapped.basisInput.inputTransfer==30&&mapped.basisOutput.outputTransfer==30);
|
||||
[inspector resetAll:nil];[inspector refresh];
|
||||
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"]];
|
||||
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];};
|
||||
[wheel setFrameSize:NSMakeSize(310,232)];NSPoint wheelCenter=NSMakePoint(155,126);int starts=uiHost->_undoStarts,ends=uiHost->_undoEnds;
|
||||
[wheel mouseDown:mouseFor(wheel,NSEventTypeLeftMouseDown,wheelCenter)];[wheel mouseDragged:mouseFor(wheel,NSEventTypeLeftMouseDragged,NSMakePoint(wheelCenter.x+25,wheelCenter.y+10))];[wheel mouseUp:mouseFor(wheel,NSEventTypeLeftMouseUp,NSMakePoint(wheelCenter.x+50,wheelCenter.y+20))];DYReadUniforms(uiHost,kCMTimeZero,&uiAfter);
|
||||
float expectedStrength=hypotf(10,4)/90.f,expectedAngle=fmodf(atan2f(4,10)*180/M_PI+360-104,360);
|
||||
run.record(@"balance-wheel-reference-orientation-and-fine-drag",fabs(uiAfter.cm.balanceStrength-expectedStrength)<1e-5&&fabs(uiAfter.cm.balanceAngle-expectedAngle)<1e-4&&uiAfter.cm.balanceAngle>1,@{@"angleDegrees":@(uiAfter.cm.balanceAngle),@"strength":@(uiAfter.cm.balanceStrength)});
|
||||
run.record(@"balance-drag-one-host-undo-group",uiHost->_undoStarts==starts+1&&uiHost->_undoEnds==ends+1&&!uiHost->_undoActive);
|
||||
NSButton *balanceReset=[wheel valueForKey:@"reset"];run.need(@"balance-visible-reset-button",[balanceReset.title isEqual:@"复位"]&&[balanceReset.accessibilityLabel isEqual:@"复位一级白平衡"]);
|
||||
DYUniforms beforeReset=uiAfter;starts=uiHost->_undoStarts;ends=uiHost->_undoEnds;[balanceReset performClick:nil];DYReadUniforms(uiHost,kCMTimeZero,&uiAfter);
|
||||
DYUniforms resetExpected=beforeReset;resetExpected.cm.balanceAngle=0;resetExpected.cm.balanceStrength=0;
|
||||
run.record(@"balance-button-resets-only-wheel-one-undo",memcmp(&resetExpected,&uiAfter,sizeof(uiAfter))==0&&uiHost->_undoStarts==starts+1&&uiHost->_undoEnds==ends+1);
|
||||
[wheel mouseDown:mouseFor(wheel,NSEventTypeLeftMouseDown,wheelCenter,0,2)];DYReadUniforms(uiHost,kCMTimeZero,&uiAfter);run.record(@"balance-double-click-neutral",uiAfter.cm.balanceStrength==0&&uiAfter.cm.balanceAngle==0);
|
||||
NSView *spiderPanel=[inspector valueForKey:@"spiderPanel"];NSView<DYSpiderProbe> *disc=(id)[spiderPanel valueForKey:@"disc"];[disc setFrameSize:NSMakeSize(310,300)];auto initialMesh=DYSpiderMesh(disc.meshData);
|
||||
run.record(@"spider-default-six-by-six-31-nodes",initialMesh.hues==6&&initialMesh.rings==5&&dy::meshCount(initialMesh)==31);
|
||||
auto selectNode=[&](int index,NSEventModifierFlags flags){NSPoint pt=[disc point:index];[disc mouseDown:mouseFor(disc,NSEventTypeLeftMouseDown,pt,flags)];[disc mouseUp:mouseFor(disc,NSEventTypeLeftMouseUp,pt,flags)];};
|
||||
auto dragNode=[&](int index,float dx,float dy){NSPoint pt=[disc point:index];[disc mouseDown:mouseFor(disc,NSEventTypeLeftMouseDown,pt)];[disc mouseDragged:mouseFor(disc,NSEventTypeLeftMouseDragged,NSMakePoint(pt.x+dx*.5,pt.y+dy*.5))];[disc mouseDragged:mouseFor(disc,NSEventTypeLeftMouseDragged,NSMakePoint(pt.x+dx,pt.y+dy))];[disc mouseUp:mouseFor(disc,NSEventTypeLeftMouseUp,NSMakePoint(pt.x+dx,pt.y+dy))];};
|
||||
starts=uiHost->_undoStarts;ends=uiHost->_undoEnds;dragNode(2,18,8);DYAssetState *spiderSaved=DYReadAssets(uiHost,kCMTimeZero);auto dragged=DYSpiderMesh(spiderSaved.spiderMesh);
|
||||
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-three-preset-includes-mesh",[decodedPreset[@"version"]isEqual:@3]&&[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);
|
||||
[disc resetMesh];auto resetDense=DYSpiderMesh(DYReadAssets(uiHost,kCMTimeZero).spiderMesh);run.record(@"spider-reset-preserves-density",resetDense.hues==12&&resetDense.rings==7&&dy::meshSamples(resetDense)[4]==0);
|
||||
[disc changeHueCount:6 saturationCount:6];selectNode(1,0);selectNode(2,NSEventModifierFlagCommand);run.record(@"spider-command-multiselect",disc.selection.count==2);[disc selectRing];run.record(@"spider-ring-selection",disc.selection.count==12);[disc.selection removeAllIndexes];selectNode(0,0);[disc selectSpoke];run.record(@"spider-spoke-selection",disc.selection.count==5);
|
||||
selectNode(3,NSEventModifierFlagShift);run.record(@"spider-shift-pin",[disc.pinned containsIndex:3]);float pinnedX=DYSpiderMesh(disc.meshData).x[3];dragNode(3,8,0);run.record(@"spider-pinned-anchor-still-draggable",DYSpiderMesh(disc.meshData).x[3]>pinnedX);
|
||||
NSPoint resetPoint=[disc point:3];[disc rightMouseDown:mouseFor(disc,NSEventTypeRightMouseDown,resetPoint)];run.record(@"spider-right-click-reset-unpins",!DYSpiderMesh(disc.meshData).pins[3]);
|
||||
[disc resetMesh];NSData *beforeCancel=[[disc.meshData copy]autorelease];NSPoint anchor=[disc point:2];[disc mouseDown:mouseFor(disc,NSEventTypeLeftMouseDown,anchor)];[disc mouseDragged:mouseFor(disc,NSEventTypeLeftMouseDragged,NSMakePoint(anchor.x+10,anchor.y+5))];[disc keyDown:[NSEvent keyEventWithType:NSEventTypeKeyDown location:NSZeroPoint modifierFlags:0 timestamp:0 windowNumber:interactionWindow.windowNumber context:nil characters:@"\x1b" charactersIgnoringModifiers:@"\x1b" isARepeat:NO keyCode:53]];run.record(@"spider-escape-restores-coordinates-and-pins",[beforeCancel isEqual:disc.meshData]);
|
||||
run.record(@"native-interaction-window-never-visible",!interactionWindow.visible);[inspector resetAll:nil];[inspector refresh];
|
||||
id<MTLDevice> gpu=MTLCreateSystemDefaultDevice();run.need(@"metal-device",gpu!=nil);gpuName=gpu.name;
|
||||
const NSUInteger width=64,height=48;DYDiagnosticTile *source=[[[DYDiagnosticTile alloc]initWithDevice:gpu width:width height:height]autorelease],*destination=[[[DYDiagnosticTile alloc]initWithDevice:gpu width:width height:height]autorelease];
|
||||
run.need(@"real-iosurface-image-tiles",source&&destination&&source.ioSurface&&destination.ioSurface);
|
||||
Pixels input(width*height*4);for(NSUInteger y=0;y<height;y++)for(NSUInteger x=0;x<width;x++){size_t p=(y*width+x)*4;float alpha=float((x+y)%5)/4.f;input[p]=(__fp16)((.08f+.75f*float(x)/(width-1))*alpha);input[p+1]=(__fp16)((.05f+.8f*float(y)/(height-1))*alpha);input[p+2]=(__fp16)((.1f+.65f*float((x*7+y*3)%64)/63.f)*alpha);input[p+3]=(__fp16)alpha;}
|
||||
[[source metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,width,height) mipmapLevel:0 withBytes:input.data() bytesPerRow:width*8];
|
||||
// Color-tool parity fixtures deliberately use a display-space identity
|
||||
// input; the user's new Sony camera default is checked independently above.
|
||||
defaults.cm.inputTransfer=1002;defaults.cm.inputGamut=22;
|
||||
DYRenderer *renderer=[[[DYRenderer alloc]init]autorelease];Pixels neutral=render(run,renderer,source,destination,gpu,defaults,@{},@"renderer-default-pass");Difference neutralDifference=difference(input,neutral);
|
||||
run.record(@"transparent-premultiplied-neutral",neutralDifference.nonfinite==0&&neutralDifference.maximum<=.001,measure(neutralDifference));
|
||||
NSString *cstReference=NSProcessInfo.processInfo.environment[@"DY_DIAGNOSTIC_CST_REFERENCE"];
|
||||
if(cstReference.length){
|
||||
error=nil;id<MTLLibrary>oracle=[gpu newLibraryWithURL:[NSURL fileURLWithPath:cstReference] error:&error];run.need(@"independent-installed-cst-reference-loaded",oracle!=nil,@{@"path":cstReference,@"error":reason(error)});
|
||||
const int cases[][3]={{28,27,10},{2,23,10},{4,4,10},{5,5,10},{6,6,10},{8,7,10},{9,7,10},{11,10,10},{12,28,10},{15,23,10},{16,17,10},{21,23,10},{22,21,10},{25,24,10},{27,25,10},{30,23,10},{29,23,10},{28,27,1},{28,27,20},{28,27,30},{28,27,1002}};
|
||||
for(unsigned index=0;index<sizeof(cases)/sizeof(cases[0]);index++){@autoreleasepool{
|
||||
DYUniforms candidate=defaults;candidate.cm.configured=1;candidate.cm.inputTransfer=cases[index][0];candidate.cm.inputGamut=cases[index][1];candidate.cm.workingTransfer=cases[index][2];candidate.cm.toneMapping=1;candidate.cm.exposure=.35;candidate.cm.contrast=.15;candidate.cm.saturation=1.1;candidate.cm.balanceAngle=(index%4)*90+.12;candidate.cm.balanceStrength=.03;
|
||||
DayuRenderParams p=DYCMRender(candidate.cm);Pixels expected=referenceFrame(gpu,oracle,input,width,height,p,&error);Pixels actual=render(run,renderer,source,destination,gpu,candidate,@{},[NSString stringWithFormat:@"cst-case-%02u-render",index]);
|
||||
BOOL same=expected.size()==actual.size();double worst=0;float refValue=0,gotValue=0;NSUInteger nonfinite=0;for(NSUInteger i=0;i<expected.size()&&same;i++){float a=expected[i],b=actual[i];if(!std::isfinite(a)||!std::isfinite(b)){nonfinite++;same=NO;break;}double delta=fabs(a-b);worst=fmax(worst,delta);same&=delta<=.004+.003*fabs(a);if(!same){refValue=a;gotValue=b;}}
|
||||
run.record([NSString stringWithFormat:@"cst-case-%02u-independent-pixels",index],same,@{@"inputCurve":@(p.input.inputTransfer),@"inputGamut":@(p.input.inputGamut),@"workingCurve":@(p.input.outputTransfer),@"maximumError":@(worst),@"referenceValue":@(refValue),@"actualValue":@(gotValue),@"nonfinite":@(nonfinite),@"components":@(actual.size())});
|
||||
}}[oracle release];
|
||||
}
|
||||
DYUniforms monochrome=defaults;monochrome.cm.blackWhiteMix=1;Pixels mono=render(run,renderer,source,destination,gpu,monochrome,@{},@"blackwhite-full-render");
|
||||
Difference monoDiff=difference(neutral,mono);run.record(@"blackwhite-mix-100-affects-frame",monoDiff.different>100&&monoDiff.nonfinite==0,measure(monoDiff));
|
||||
monochrome.cm.blackWhiteMix=.5;Pixels halfMono=render(run,renderer,source,destination,gpu,monochrome,@{},@"blackwhite-half-render");BOOL smooth=YES;for(NSUInteger i=0;i<mono.size();i++)smooth&=fabs((float)halfMono[i]-.5f*((float)mono[i]+(float)neutral[i]))<.001;
|
||||
run.record(@"blackwhite-half-mix-is-continuous",smooth);
|
||||
monochrome.blackWhiteSectionEnabled=0;Pixels monoOff=render(run,renderer,source,destination,gpu,monochrome,@{},@"blackwhite-eye-off-render");run.record(@"blackwhite-eye-bypasses-retained-mix",difference(neutral,monoOff).maximum==0);
|
||||
for(int hues:{6,12,24})for(int saturation:{6,8,24}){@autoreleasepool{
|
||||
auto mesh=dy::neutralMesh(hues,saturation);std::bitset<dy::SpiderMeshCapacity>selected;selected[2]=1;mesh=dy::moveMesh(mesh,selected,-.035f,.04f);NSData *data=[NSData dataWithBytes:&mesh length:sizeof(mesh)];DYUniforms warped=defaults;
|
||||
error=nil;BOOL ok=[renderer renderSource:source destination:destination uniforms:warped paths:@{} spider:data error:&error];Pixels frame=read(destination,gpu);auto samples=dy::meshSamples(mesh);BOOL parity=ok;double maximum=0;NSUInteger affected=0;
|
||||
for(NSUInteger i=0;i<width*height;i++){float alpha=input[i*4+3];float3 rgb={0,0,0};if(alpha>0)for(int c=0;c<3;c++)rgb[c]=(__fp16)((float)input[i*4+c]/alpha);float3 expected=dyLimit(dyVariableSpider(rgb,hues,saturation-1,samples.data()));for(int c=0;c<3;c++){float value=alpha>0?(__fp16)((float)(__fp16)expected[c]*alpha):0;double delta=fabs(value-(float)frame[i*4+c]);maximum=fmax(maximum,delta);parity&=std::isfinite(frame[i*4+c])&&delta<.003;affected+=fabs((float)frame[i*4+c]-(float)neutral[i*4+c])>.001;}}
|
||||
run.record([NSString stringWithFormat:@"spider-production-cpu-parity-%d-%d",hues,saturation],parity&&affected>0,@{@"maximumError":@(maximum),@"affectedComponents":@(affected),@"error":reason(error)});
|
||||
warped.spiderSectionEnabled=0;[renderer renderSource:source destination:destination uniforms:warped paths:@{} spider:data error:&error];run.record([NSString stringWithFormat:@"spider-eye-retains-but-bypasses-%d-%d",hues,saturation],difference(neutral,read(destination,gpu)).maximum==0);
|
||||
}}
|
||||
DYUniforms masterProbe=defaults;masterProbe.cm.configured=1;masterProbe.cm.exposure=.7;Pixels masterOn=render(run,renderer,source,destination,gpu,masterProbe,@{},@"primary-master-active-render");masterProbe.primarySectionEnabled=0;Pixels masterOff=render(run,renderer,source,destination,gpu,masterProbe,@{},@"primary-master-inactive-render");run.record(@"primary-master-controls-complete-cst-pipeline",difference(neutral,masterOn).different>100&&difference(neutral,masterOff).maximum==0);
|
||||
auto checkFoldedGroup=[&](DYUniforms active,NSUInteger offset,NSDictionary *paths,NSString *name){
|
||||
*(float *)((uint8_t *)&active+offset)=0;
|
||||
Pixels folded=render(run,renderer,source,destination,gpu,active,paths,[name stringByAppendingString:@"-render"]);
|
||||
@@ -188,16 +317,31 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
|
||||
[orientationRenderer invalidatePreview];run.record(@"preview-invalidation-clears-analysis-and-browser",![orientationRenderer preview]&&![orientationRenderer lookLUTPreview]);
|
||||
[source setDiagnosticImageOrigin:kFxImageOrigin_TOP_LEFT];
|
||||
[[source metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,width,height) mipmapLevel:0 withBytes:input.data() bytesPerRow:width*8];
|
||||
DYUniforms cstExport=defaults;cstExport.cm.configured=1;cstExport.cm.exposure=.7f;
|
||||
NSURL *cstCube=[NSURL fileURLWithPath:[runtime stringByAppendingPathComponent:@"cst-export.cube"]];error=nil;BOOL cstExported=[renderer exportLUT:cstCube uniforms:cstExport paths:@{} error:&error];
|
||||
NSString *cubeText=cstExported?[NSString stringWithContentsOfURL:cstCube encoding:NSUTF8StringEncoding error:&error]:nil;std::vector<float>cubeValues;
|
||||
for(NSString *line in [cubeText componentsSeparatedByCharactersInSet:NSCharacterSet.newlineCharacterSet]){float r,g,b;if(sscanf(line.UTF8String,"%f %f %f",&r,&g,&b)==3){cubeValues.push_back(r);cubeValues.push_back(g);cubeValues.push_back(b);}}
|
||||
Pixels gray(input.size());float grayLinear=powf((.5f+.055f)/1.055f,2.4f);for(NSUInteger i=0;i<width*height;i++){for(int c=0;c<3;c++)gray[i*4+c]=grayLinear;gray[i*4+3]=1;}
|
||||
[[source metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,width,height) mipmapLevel:0 withBytes:gray.data() bytesPerRow:width*8];Pixels grayRendered=render(run,renderer,source,destination,gpu,cstExport,@{},@"cst-export-production-sample");
|
||||
BOOL cstCubeMatches=cstExported&&cubeValues.size()==33*33*33*3;for(int c=0;c<3&&cstCubeMatches;c++){float code=cubeValues[((16*33+16)*33+16)*3+c];float linear=code<=.04045f?code/12.92f:powf((code+.055f)/1.055f,2.4f);cstCubeMatches&=fabs(linear-(float)grayRendered[c])<.002&&fabs(code-.5f)>.01;}
|
||||
run.record(@"cube-export-includes-cst-primary-and-matches-production",cstCubeMatches,@{@"error":reason(error),@"triples":@(cubeValues.size()/3)});
|
||||
[[source metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,width,height) mipmapLevel:0 withBytes:input.data() bytesPerRow:width*8];
|
||||
auto exportMesh=dy::neutralMesh();for(int i=0;i<dy::meshCount(exportMesh);i++){exportMesh.x[i]+=.02f;exportMesh.y[i]-=.01f;}NSData *exportMeshData=[NSData dataWithBytes:&exportMesh length:sizeof(exportMesh)];
|
||||
NSURL *meshCube=[NSURL fileURLWithPath:[runtime stringByAppendingPathComponent:@"spider-export.cube"]];BOOL meshExported=[renderer exportLUT:meshCube uniforms:defaults paths:@{} spider:exportMeshData error:&error];NSString *meshText=meshExported?[NSString stringWithContentsOfURL:meshCube encoding:NSUTF8StringEncoding error:&error]:nil;std::vector<float>meshValues;
|
||||
for(NSString *line in [meshText componentsSeparatedByCharactersInSet:NSCharacterSet.newlineCharacterSet]){float r,g,b;if(sscanf(line.UTF8String,"%f %f %f",&r,&g,&b)==3){meshValues.push_back(r);meshValues.push_back(g);meshValues.push_back(b);}}
|
||||
auto meshSamples=dy::meshSamples(exportMesh);float3 exportInput={0,0,0};float codes[3]={.5f,.25f,.75f};for(int c=0;c<3;c++)exportInput[c]=(__fp16)powf((codes[c]+.055f)/1.055f,2.4f);float3 exportExpected=dyLimit(dyVariableSpider(exportInput,6,5,meshSamples.data()));BOOL meshCubeMatches=meshValues.size()==33*33*33*3;
|
||||
for(int c=0;c<3&&meshCubeMatches;c++){float code=meshValues[((24*33+8)*33+16)*3+c],linear=code<=.04045f?code/12.92f:powf((code+.055f)/1.055f,2.4f);meshCubeMatches&=fabs(linear-exportExpected[c])<.002;}
|
||||
run.record(@"cube-export-includes-spider-warp",meshCubeMatches,@{@"triples":@(meshValues.size()/3),@"error":reason(error)});
|
||||
DYUniforms u=defaults;u.exposure=.8f;Pixels exposed=render(run,renderer,source,destination,gpu,u,@{},@"renderer-exposure-pass");Difference exposureDifference=difference(neutral,exposed);run.record(@"exposure-affects-actual-frame",exposureDifference.nonfinite==0&&exposureDifference.different>100,measure(exposureDifference));
|
||||
u.baseSectionEnabled=0;Pixels bypass=render(run,renderer,source,destination,gpu,u,@{},@"renderer-base-bypass-pass");Difference bypassDifference=difference(neutral,bypass);run.record(@"base-group-bypass",bypassDifference.nonfinite==0&&bypassDifference.maximum==0,measure(bypassDifference));
|
||||
u=defaults;u.temperature=35;u.tint=-20;Pixels wb=render(run,renderer,source,destination,gpu,u,@{},@"renderer-white-balance-pass");Difference wbDifference=difference(neutral,wb);run.record(@"white-balance-real-table-frame",wbDifference.nonfinite==0&&wbDifference.different>100,measure(wbDifference));
|
||||
u.colorSectionEnabled=0;bypass=render(run,renderer,source,destination,gpu,u,@{},@"renderer-color-bypass-pass");bypassDifference=difference(neutral,bypass);run.record(@"color-group-bypass",bypassDifference.nonfinite==0&&bypassDifference.maximum==0,measure(bypassDifference));
|
||||
u=defaults;u.hslSectionEnabled=1;u.hslHueA.x=28;u.hslSatA.y=45;u.hslLumB.z=-18;Pixels hsl=render(run,renderer,source,destination,gpu,u,@{},@"renderer-hsl-pass");Difference hslDifference=difference(neutral,hsl);run.record(@"hsl-real-table-frame",hslDifference.nonfinite==0&&hslDifference.different>100,measure(hslDifference));
|
||||
checkFoldedGroup(u,offsetof(DYUniforms,hslSectionEnabled),@{},@"folded-hsl-bypasses-retained-adjustments");
|
||||
checkFoldedGroup(u,offsetof(DYUniforms,hslSectionEnabled),@{},@"disabled-hsl-bypasses-retained-adjustments");
|
||||
u=defaults;u.colorGradingSectionEnabled=1;u.colorGradingHueSatA.x=210;u.colorGradingHueSatA.y=42;u.colorGradingLuma.x=18;Pixels grading=render(run,renderer,source,destination,gpu,u,@{},@"renderer-grading-pass");Difference gradingDifference=difference(neutral,grading);run.record(@"grading-real-table-frame",gradingDifference.nonfinite==0&&gradingDifference.different>100,measure(gradingDifference));
|
||||
checkFoldedGroup(u,offsetof(DYUniforms,colorGradingSectionEnabled),@{},@"folded-grading-bypasses-retained-adjustments");
|
||||
checkFoldedGroup(u,offsetof(DYUniforms,colorGradingSectionEnabled),@{},@"disabled-grading-bypasses-retained-adjustments");
|
||||
for(int profile=1;profile<=17;profile++){@autoreleasepool{u=defaults;u.inputSectionEnabled=1;u.inputProfile=profile;Pixels transformed=render(run,renderer,source,destination,gpu,u,@{},[NSString stringWithFormat:@"input-profile-%02d-load-render",profile]);Difference delta=difference(neutral,transformed);run.record([NSString stringWithFormat:@"input-profile-%02d-finite-nonzero",profile],delta.nonfinite==0&&delta.nonzero>100,measure(delta));}}
|
||||
checkFoldedGroup(u,offsetof(DYUniforms,inputSectionEnabled),@{},@"folded-input-bypasses-retained-profile");
|
||||
checkFoldedGroup(u,offsetof(DYUniforms,inputSectionEnabled),@{},@"disabled-input-bypasses-retained-profile");
|
||||
DYRenderer *analysisRenderer=[[[DYRenderer alloc]init]autorelease];u=defaults;u.inputSectionEnabled=1;u.inputProfile=1;render(run,analysisRenderer,source,destination,gpu,u,@{},@"renderer-input-analysis-pass");
|
||||
NSData *inputPreview=[analysisRenderer preview];bool analysisDifferent=inputPreview.length==preview.length&&preview.length==320*180*16;double analysisMaximum=0;size_t analysisChanges=0;
|
||||
if(analysisDifferent){const float *a=(const float *)preview.bytes,*b=(const float *)inputPreview.bytes;for(NSUInteger i=0;i<preview.length/4;i++){if(!std::isfinite(a[i])||!std::isfinite(b[i])){analysisDifferent=false;break;}if(i%4!=3){double delta=std::fabs(double(a[i])-b[i]);analysisMaximum=std::max(analysisMaximum,delta);if(delta>1e-5)analysisChanges++;}}}
|
||||
@@ -205,7 +349,7 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
|
||||
NSString *lookFile=[runtime stringByAppendingPathComponent:@"diagnostic-look.cube"];NSMutableString *cube=[NSMutableString stringWithString:@"TITLE \"Self test look\"\nLUT_3D_SIZE 2\nDOMAIN_MIN 0 0 0\nDOMAIN_MAX 1 1 1\n"];
|
||||
for(int b=0;b<2;b++)for(int g=0;g<2;g++)for(int r=0;r<2;r++)[cube appendFormat:@"%.8f %.8f %.8f\n",.7f*r+.1f,.8f*g+.05f,.85f*b+.02f];error=nil;run.need(@"temporary-look-file",[cube writeToFile:lookFile atomically:YES encoding:NSUTF8StringEncoding error:&error],@{@"error":reason(error)});
|
||||
NSDictionary *paths=@{@"look0":lookFile,@"look1":lookFile,@"look2":lookFile,@"look3":lookFile,@"look4":lookFile};u=defaults;u.lookSectionEnabled=1;u.postLUTStrength=.35f;u.extraPostLUTStrengths=(DYFloat4){.4f,.5f,.6f,.7f};Pixels looks=render(run,renderer,source,destination,gpu,u,paths,@"renderer-five-look-pass");Difference looksDifference=difference(neutral,looks);run.record(@"five-look-mixes-affect-frame",looksDifference.nonfinite==0&&looksDifference.different>100,measure(looksDifference));
|
||||
checkFoldedGroup(u,offsetof(DYUniforms,lookSectionEnabled),paths,@"folded-look-bypasses-retained-LUTs");
|
||||
checkFoldedGroup(u,offsetof(DYUniforms,lookSectionEnabled),paths,@"disabled-look-bypasses-retained-LUTs");
|
||||
NSURL *exportURL=[NSURL fileURLWithPath:[runtime stringByAppendingPathComponent:@"diagnostic-export.cube"]];error=nil;run.need(@"renderer-export-33cube",[renderer exportLUT:exportURL uniforms:u paths:paths error:&error],@{@"error":reason(error),@"path":exportURL.path});
|
||||
NSString *exported=[NSString stringWithContentsOfURL:exportURL encoding:NSUTF8StringEncoding error:&error];NSUInteger triples=0,nonzero=0;bool exportFinite=true;for(NSString *line in [exported componentsSeparatedByCharactersInSet:NSCharacterSet.newlineCharacterSet]){float r,g,b;if(sscanf(line.UTF8String,"%f %f %f",&r,&g,&b)==3){triples++;exportFinite&=std::isfinite(r)&&std::isfinite(g)&&std::isfinite(b);if(r!=0||g!=0||b!=0)nonzero++;}}
|
||||
run.record(@"export-33cube-data-contract",[exported containsString:@"LUT_3D_SIZE 33"]&&triples==33*33*33&&exportFinite&&nonzero>0,@{@"rows":@(triples),@"nonzeroRows":@(nonzero),@"bytes":@([[[NSFileManager defaultManager]attributesOfItemAtPath:exportURL.path error:nil][NSFileSize]unsignedLongLongValue])});
|
||||
@@ -221,9 +365,10 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
|
||||
[externalRenderer prepareLUTPath:external completion:^(NSError *failure){preparationError=[failure retain];prepared=YES;}];
|
||||
double deadline=NSProcessInfo.processInfo.systemUptime+30;
|
||||
while(!prepared&&NSProcessInfo.processInfo.systemUptime<deadline)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.01]];
|
||||
double activationEnd=NSProcessInfo.processInfo.systemUptime;maxGap=std::max(maxGap,activationEnd-last);
|
||||
[heartbeat invalidate];
|
||||
run.need(@"external-decode-and-gpu-upload-complete",prepared&&!preparationError,@{@"error":reason(preparationError)});[preparationError release];
|
||||
run.record(@"external-activation-main-loop-responsive",beats>0&&maxGap<.15,@{@"heartbeats":@(beats),@"maximumGapMS":@(maxGap*1000)});
|
||||
run.record(@"external-activation-main-loop-responsive",maxGap<.15,@{@"heartbeats":@(beats),@"maximumGapMS":@(maxGap*1000)});
|
||||
DYUniforms externalUniforms=defaults;externalUniforms.lookSectionEnabled=1;externalUniforms.postLUTStrength=1;
|
||||
NSDictionary *externalPaths=@{@"look0":external};
|
||||
Pixels externalFrame=render(run,externalRenderer,source,destination,gpu,externalUniforms,externalPaths,@"external-first-frame-after-preparation");
|
||||
|
||||
+35
-1
@@ -1,5 +1,6 @@
|
||||
#include <metal_stdlib>
|
||||
#include "DYUniforms.h"
|
||||
#include "SpiderCore/DYColorMath.h"
|
||||
using namespace metal;
|
||||
|
||||
// The linked, versioned AIR helper owns color arithmetic only. Its source is in
|
||||
@@ -38,12 +39,23 @@ fragment half4 dyFragment(DYRaster in [[stage_in]],
|
||||
texture3d<float> colorGrading [[texture(9)]],
|
||||
constant DYUniforms& uniforms [[buffer(0)]],
|
||||
constant float& sceneLevel [[buffer(1)]],
|
||||
constant DYRenderOptions& options [[buffer(2)]]) {
|
||||
constant DYRenderOptions& options [[buffer(2)]],
|
||||
constant DYUniforms& colorUniforms [[buffer(3)]],
|
||||
device const float* spiderSamples [[buffer(4)]],
|
||||
constant int2& spiderSize [[buffer(5)]]) {
|
||||
constexpr sampler sampleFilter(coord::normalized, address::clamp_to_edge, filter::linear);
|
||||
half4 sample = source.sample(sampleFilter, in.uv);
|
||||
if (!(sample.a > half(0.0))) return half4(0.0h);
|
||||
half4 result = dy_grade(sample, in.uv, source, preLUT, look1, look2, look3,
|
||||
look4, look5, hslMixer, whiteBalance, colorGrading, uniforms, sceneLevel);
|
||||
if(options.blackWhiteMix>0.0f && options.blackWhiteMix<1.0f) {
|
||||
half4 color=dy_grade(sample,in.uv,source,preLUT,look1,look2,look3,look4,look5,hslMixer,whiteBalance,colorGrading,colorUniforms,sceneLevel);
|
||||
result.rgb=mix(color.rgb,result.rgb,half(options.blackWhiteMix));
|
||||
}
|
||||
if(spiderSize.x>0 && uniforms.spiderSectionEnabled>.5f && uniforms.spiderMix>0.0f){
|
||||
float3 color=float3(result.rgb);float3 warped=dyVariableSpider(color,spiderSize.x,spiderSize.y,spiderSamples);
|
||||
result.rgb=half3(dyLimit(mix(color,warped,uniforms.spiderMix)));
|
||||
}
|
||||
result.a = sample.a;
|
||||
if (options.outputPremultiplied) result.rgb *= result.a;
|
||||
return result;
|
||||
@@ -110,3 +122,25 @@ kernel void dyInputAnalysis(texture2d<half> source [[texture(0)]],
|
||||
encoded=round(clamp(encoded,0.0f,1.0f)*255.0f)/255.0f;
|
||||
outRGBA[pixel.y*320+pixel.x]=float4(encoded,float(sample.a));
|
||||
}
|
||||
|
||||
// CST/BASIS arithmetic is reused verbatim from the versioned dayu-cst source.
|
||||
float4 cst_air(half4 sample, constant CSTParams& params);
|
||||
float4 basis_air(half4 sample, constant BasisParams& params);
|
||||
inline float3 dyEncode(float3 linear) {
|
||||
return select(1.055f*pow(max(linear,float3(0)),float3(1.0f/2.4f))-.055f,linear*12.92f,linear<=.0031308f);
|
||||
}
|
||||
inline float3 dyDecode(float3 encoded) {
|
||||
return select(pow(max((encoded+.055f)/1.055f,float3(0)),float3(2.4f)),encoded/12.92f,encoded<=.04045f);
|
||||
}
|
||||
kernel void dyColorManagement(texture2d<float,access::read> source [[texture(0)]],
|
||||
texture2d<half,access::write> destination [[texture(1)]],
|
||||
constant DayuRenderParams& p [[buffer(0)]],constant float& amount [[buffer(1)]],uint2 pos [[thread_position_in_grid]]) {
|
||||
if(pos.x>=source.get_width()||pos.y>=source.get_height())return;
|
||||
float4 sample=source.read(pos);if(!(sample.a>0)){destination.write(half4(0),pos);return;}
|
||||
float4 raw=float4(dyEncode(sample.rgb),sample.a),c=raw;
|
||||
if(p.stages&1)c=cst_air(half4(c),p.input);
|
||||
if(p.stages&2){if(p.reserved&8)c=cst_air(half4(c),p.basisInput);c=basis_air(half4(c),p.basis);if(p.reserved&8)c=cst_air(half4(c),p.basisOutput);}
|
||||
if(p.stages&4)c=cst_air(half4(c),p.output);
|
||||
c.rgb=mix(raw.rgb,c.rgb,amount);
|
||||
destination.write(half4(half3(dyDecode(c.rgb)),half(sample.a)),pos);
|
||||
}
|
||||
+123
-46
@@ -4,6 +4,7 @@
|
||||
#import "DYLUTLibrary.h"
|
||||
#import "DYLUTBrowser.h"
|
||||
#import "DYRenderer.h"
|
||||
#include "DYSpiderState.h"
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
@@ -167,16 +168,25 @@ static NSArray *DYPresentationSections(void) {
|
||||
NSMutableDictionary *bySection=[NSMutableDictionary dictionary],*byKey=[NSMutableDictionary dictionary];
|
||||
for(NSDictionary *s in DYSections())bySection[s[@"key"]]=s;
|
||||
for(NSDictionary *d in DYDescriptors())byKey[d[@"key"]]=d;
|
||||
NSMutableDictionary *input=[[bySection[@"input"] mutableCopy]autorelease];input[@"rows"]=@[byKey[@"preLUTStrength"]];
|
||||
NSMutableDictionary *primary=[[bySection[@"primary"]mutableCopy]autorelease];NSMutableArray *cmRows=[NSMutableArray array];
|
||||
for(NSString *part in @[@"input",@"primary",@"output"]){
|
||||
[cmRows addObject:@{@"key":[@"heading:" stringByAppendingString:part],@"title":[part isEqual:@"input"]?@"输入与工作空间":[part isEqual:@"output"]?@"输出转换":@"一级调色"}];
|
||||
for(NSDictionary *d in bySection[part][@"rows"]){NSString *key=d[@"key"];if([key hasPrefix:@"cmbypass"]||[key isEqual:@"cmbalanceStrength"])continue;
|
||||
if([key isEqual:@"cmbalanceAngle"])[cmRows addObject:@{@"key":@"primaryBalance",@"kind":@"balanceWheel",@"title":@"一级白平衡色轮"}];else[cmRows addObject:d];}
|
||||
}
|
||||
primary[@"rows"]=cmRows;primary[@"enabled"]=byKey[@"primaryMasterEnabled"][@"pid"];primary[@"enableParameters"]=@[bySection[@"input"][@"enabled"],bySection[@"primary"][@"enabled"],bySection[@"output"][@"enabled"]];
|
||||
NSMutableDictionary *base=[[bySection[@"base"] mutableCopy]autorelease];NSMutableArray *rows=[NSMutableArray array];
|
||||
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"];
|
||||
return @[input,base,bySection[@"skin"],bySection[@"look"],bySection[@"hsl"],bySection[@"curve"],bySection[@"grading"],bySection[@"primaries"],bySection[@"levels"],bySection[@"blackwhite"],bySection[@"balance"]];
|
||||
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"]];
|
||||
}
|
||||
|
||||
|
||||
@protocol DYGraphicDelegate <NSObject>
|
||||
- (void)writeGraphicValues:(NSDictionary *)values;
|
||||
- (void)writeSpiderMesh:(NSData *)mesh linked:(BOOL)linked;
|
||||
- (void)graphicGesture:(BOOL)begin title:(NSString *)title;
|
||||
@end
|
||||
|
||||
/// The graph uses the same sorted monotone Hermite tangent limiter as the GPU.
|
||||
@@ -367,6 +377,8 @@ static NSImage *DYWheelImage(void) {
|
||||
- (void)layout {[super layout];CGFloat w=self.bounds.size.width/2,h=self.bounds.size.height/2;for(NSInteger i=0;i<4;i++)[_wheels[i] setFrame:NSMakeRect((i%2)*w,(i/2)*h,w,h)];}
|
||||
@end
|
||||
|
||||
#include "DYNewPanels.inc.h"
|
||||
|
||||
@interface DYInspector () <DYGraphicDelegate> {
|
||||
id<PROAPIAccessing> _manager;
|
||||
NSScrollView *_scroll;
|
||||
@@ -386,7 +398,8 @@ static NSImage *DYWheelImage(void) {
|
||||
NSArray *_themeButtons;
|
||||
NSMutableDictionary *_tabs;
|
||||
NSInteger _visibleLooks;
|
||||
BOOL _refreshing;
|
||||
BOOL _refreshing,_graphicUndoOpen;
|
||||
DYSpiderPanel *_spiderPanel;
|
||||
NSMutableDictionary *_assetLoads,*_assetLoadIDs;
|
||||
NSUInteger _nextAssetLoadID;
|
||||
NSProgress *_menuScan;
|
||||
@@ -443,6 +456,8 @@ static NSImage *DYWheelImage(void) {
|
||||
return self;
|
||||
}
|
||||
- (void)dealloc {
|
||||
[self graphicGesture:NO title:nil];_spiderPanel.delegate=nil;
|
||||
for(id graphic in _graphics)if([graphic isKindOfClass:DYPrimaryBalanceWheel.class])[(DYPrimaryBalanceWheel*)graphic setDelegate:nil];
|
||||
for(NSProgress *p in _assetLoads.allValues)[p cancel];[_assetLoads release];[_assetLoadIDs release];[_menuScan cancel];[_menuScan release];[_pendingAssetMenuCommand release];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[_brand release]; [_subtitle release]; [_resetAll release]; [_save release]; [_load release]; [_export release];
|
||||
@@ -459,7 +474,7 @@ static NSImage *DYWheelImage(void) {
|
||||
- (NSSize)intrinsicContentSize { return NSMakeSize(360,780); }
|
||||
- (void)viewDidMoveToWindow {
|
||||
[super viewDidMoveToWindow];
|
||||
if(!self.window)[self cancelAssetLoads];
|
||||
if(!self.window){[self graphicGesture:NO title:nil];[self cancelAssetLoads];}
|
||||
if(self.window) {
|
||||
[self refresh];
|
||||
NSAccessibilityPostNotification(self,NSAccessibilityLayoutChangedNotification);
|
||||
@@ -495,7 +510,7 @@ static NSImage *DYWheelImage(void) {
|
||||
[header setButtonType:NSButtonTypePushOnPushOff];
|
||||
header.bordered=NO; header.alignment=NSTextAlignmentLeft; header.font=[NSFont boldSystemFontOfSize:12];
|
||||
header.contentTintColor=DYInk(); header.target=self; header.action=@selector(toggleSection:); header.tag=index;
|
||||
header.doubleClickAction=@selector(resetSection:); header.toolTip=@"展开启用,折叠停用;双击还原本组";
|
||||
header.doubleClickAction=@selector(resetSection:); header.toolTip=@"展开或折叠界面;双击还原本组";
|
||||
[card addSubview:header];
|
||||
NSButton *enabled=DYButton(@"",self,@selector(groupEnabled:));enabled.bordered=NO;[enabled setButtonType:NSButtonTypePushOnPushOff];enabled.image=[NSImage imageWithSystemSymbolName:@"eye" accessibilityDescription:@"启用本组"];
|
||||
enabled.tag=index; enabled.contentTintColor=DYAccent(); enabled.toolTip=@"启用或旁路本组";
|
||||
@@ -507,8 +522,8 @@ static NSImage *DYWheelImage(void) {
|
||||
[card addSubview:reset];
|
||||
NSMutableArray *body=[NSMutableArray array];
|
||||
NSString *key=section[@"key"]?:@"";
|
||||
if([key localizedCaseInsensitiveContainsString:@"input"]) {
|
||||
[body addObject:[self assetRowForKey:@"input" title:@"输入色彩" inCard:card]];
|
||||
if([key isEqual:@"primary"]) {
|
||||
NSButton *migrate=DYButton(@"旧版输入 → 改用 CST",self,@selector(useCST:));migrate.identifier=@"legacyInput";migrate.toolTip=@"保留旧工程输入效果;点击后改用上方 CST 设置,可撤销";[card addSubview:migrate];[body addObject:migrate];
|
||||
}
|
||||
if([key localizedCaseInsensitiveContainsString:@"look"]) {
|
||||
for(NSInteger i=0;i<5;i++) {
|
||||
@@ -539,12 +554,15 @@ static NSImage *DYWheelImage(void) {
|
||||
if([key isEqual:@"grading"]) {
|
||||
DYWheelPanel *wheels=[[[DYWheelPanel alloc]initWithFrame:NSZeroRect]autorelease];wheels.delegate=self;wheels.identifier=@"gradingWheels";[card addSubview:wheels];[body addObject:wheels];[_graphics addObject:wheels];
|
||||
}
|
||||
if([key isEqual:@"spider"]){_spiderPanel=[[[DYSpiderPanel alloc]initWithFrame:NSZeroRect]autorelease];_spiderPanel.delegate=self;_spiderPanel.identifier=@"spiderGraph";[card addSubview:_spiderPanel];[body addObject:_spiderPanel];}
|
||||
for(NSDictionary *d in section[@"rows"]) {
|
||||
DYFlippedView *row=[[[DYFlippedView alloc] initWithFrame:NSZeroRect] autorelease];
|
||||
row.identifier=d[@"key"];
|
||||
row.accessibilityLabel=d[@"title"];
|
||||
[card addSubview:row]; [body addObject:row];
|
||||
NSNumber *pid=d[@"pid"]; if(!pid)continue;
|
||||
NSNumber *pid=d[@"pid"];
|
||||
if([d[@"kind"]isEqual:@"balanceWheel"]){DYPrimaryBalanceWheel *wheel=[[[DYPrimaryBalanceWheel alloc]initWithFrame:NSZeroRect]autorelease];wheel.identifier=@"primaryBalance";wheel.delegate=self;[row addSubview:wheel];[_graphics addObject:wheel];continue;}
|
||||
if(!pid){NSTextField *heading=DYLabel(d[@"title"],11);heading.font=[NSFont boldSystemFontOfSize:11];heading.textColor=DYAccent();[row addSubview:heading];continue;}
|
||||
NSTextField *label=DYLabel(d[@"title"]?:d[@"key"],11); label.toolTip=d[@"title"];
|
||||
[row addSubview:label];
|
||||
NSMutableDictionary *record=[NSMutableDictionary dictionaryWithDictionary:@{@"descriptor":d,@"row":row,@"label":label}];
|
||||
@@ -552,7 +570,7 @@ static NSImage *DYWheelImage(void) {
|
||||
NSButton *eye=DYButton(@"",self,@selector(itemEnabled:));eye.bordered=NO;[eye setButtonType:NSButtonTypePushOnPushOff];eye.image=[NSImage imageWithSystemSymbolName:@"eye" accessibilityDescription:@"启用"];eye.tag=[pid integerValue];eye.contentTintColor=DYAccent();eye.accessibilityLabel=[d[@"title"] stringByAppendingString:@"启用"];eye.toolTip=@"启用或旁路此项";[row addSubview:eye];record[@"itemEnabled"]=eye;
|
||||
}
|
||||
NSString *kind=d[@"kind"]?:@"float";
|
||||
if([kind isEqualToString:@"bool"]) {
|
||||
if([kind isEqualToString:@"bool"]||[d[@"key"]hasPrefix:@"cmbypass"]) {
|
||||
NSButton *toggle=[NSButton checkboxWithTitle:@"" target:self action:@selector(scalarChanged:)];
|
||||
toggle.tag=[pid integerValue]; toggle.contentTintColor=DYAccent(); toggle.accessibilityLabel=d[@"title"];
|
||||
[row addSubview:toggle]; record[@"toggle"]=toggle;
|
||||
@@ -589,7 +607,7 @@ static NSImage *DYWheelImage(void) {
|
||||
}
|
||||
for(NSView *row in body)if(![ordered containsObject:row])row.hidden=YES;body=ordered;
|
||||
}
|
||||
NSMutableDictionary *record=[NSMutableDictionary dictionaryWithDictionary:@{@"section":section,@"view":card,@"header":header,@"enabled":enabled,@"reset":reset,@"body":body,@"collapsed":@(![section[@"defaultEnabled"]boolValue])}];
|
||||
NSMutableDictionary *record=[NSMutableDictionary dictionaryWithDictionary:@{@"section":section,@"view":card,@"header":header,@"enabled":enabled,@"reset":reset,@"body":body,@"collapsed":@(![@[@"primary",@"spider",@"base"]containsObject:key])}];
|
||||
if([key isEqual:@"look"]){NSButton *add=DYButton(@"+",self,@selector(addLook:));add.bordered=NO;add.font=[NSFont boldSystemFontOfSize:20];add.accessibilityLabel=@"添加风格 LUT";[card addSubview:add];record[@"add"]=add;}
|
||||
[_cards addObject:record];
|
||||
index++;
|
||||
@@ -611,6 +629,7 @@ static NSImage *DYWheelImage(void) {
|
||||
}
|
||||
- (BOOL)showRow:(NSView *)row section:(NSString *)section {
|
||||
NSString *key=row.identifier?:@"";NSInteger tab=[_tabs[section]integerValue];
|
||||
if([key isEqual:@"legacyInput"])return [_tabs[@"legacyInput"]boolValue];
|
||||
if([section isEqual:@"curve"] && ![key isEqual:@"curveGraph"])return NO;
|
||||
if([section isEqual:@"hsl"]) {
|
||||
int axis=0,color=0;if(sscanf(key.UTF8String,"hsl%d_%d",&axis,&color)==2)return color==tab;
|
||||
@@ -622,7 +641,7 @@ static NSImage *DYWheelImage(void) {
|
||||
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;
|
||||
}
|
||||
- (CGFloat)heightForRow:(NSView *)row {return [row.identifier isEqual:@"curveGraph"]?240:[row.identifier isEqual:@"gradingWheels"]?292:32;}
|
||||
- (CGFloat)heightForRow:(NSView *)row {if([row.identifier isEqual:@"spiderGraph"])return 444;if([row.identifier isEqual:@"primaryBalance"])return 232;if([row.identifier hasPrefix:@"heading:"])return 27;return [row.identifier isEqual:@"curveGraph"]?240:[row.identifier isEqual:@"gradingWheels"]?292:32;}
|
||||
- (void)layout {
|
||||
[super layout];
|
||||
CGFloat w=MAX(280,self.bounds.size.width),h=self.bounds.size.height;
|
||||
@@ -648,6 +667,8 @@ static NSImage *DYWheelImage(void) {
|
||||
for(NSView *row in body) {
|
||||
BOOL show=!collapsed&&[self showRow:row section:key];row.hidden=!show;if(!show)continue;
|
||||
CGFloat rh=[self heightForRow:row];row.frame=NSMakeRect(12,rowY,cw-24,rh-1);rowY+=rh;
|
||||
if([row.identifier isEqual:@"primaryBalance"])for(NSView *v in row.subviews)v.frame=row.bounds;
|
||||
if([row.identifier hasPrefix:@"heading:"])for(NSView *v in row.subviews)v.frame=NSMakeRect(3,7,row.bounds.size.width-6,18);
|
||||
if([row.identifier isEqual:@"autoControls"]||[row.identifier isEqual:@"sampleControls"]) {
|
||||
CGFloat buttonWidth=(row.bounds.size.width-4*(row.subviews.count-1))/MAX((NSUInteger)1,row.subviews.count);NSInteger i=0;
|
||||
for(NSView *button in row.subviews)[button setFrame:NSMakeRect((buttonWidth+4)*i++,3,buttonWidth,25)];
|
||||
@@ -689,8 +710,9 @@ static NSImage *DYWheelImage(void) {
|
||||
if(d[@"enabled"]) {double enabled=1;[get getFloatValue:&enabled fromParameter:[d[@"enabled"] unsignedIntValue] atTime:t];[r[@"itemEnabled"] setState:enabled>=.5?NSControlStateValueOn:NSControlStateValueOff];[r[@"itemEnabled"] setImage:[NSImage imageWithSystemSymbolName:enabled>=.5?@"eye":@"eye.slash" accessibilityDescription:enabled>=.5?@"启用":@"旁路"]];for(NSString *control in @[@"slider",@"field",@"popup"]) [r[control] setAlphaValue:enabled>=.5?1:.45];}
|
||||
[r[@"slider"] setDoubleValue:v]; [r[@"field"] setStringValue:DYNumber(v,d)];
|
||||
[r[@"toggle"] setState:v>=.5?NSControlStateValueOn:NSControlStateValueOff];
|
||||
NSPopUpButton *popup=r[@"popup"]; if(popup.numberOfItems>0) [popup selectItemAtIndex:MAX(0,MIN((NSInteger)llround(v),popup.numberOfItems-1))];
|
||||
NSPopUpButton *popup=r[@"popup"]; if(popup.numberOfItems>0){NSArray *values=d[@"values"];NSInteger index=values?[values indexOfObject:@((int)llround(v))]:(NSInteger)llround(v);[popup selectItemAtIndex:index==NSNotFound?0:MAX(0,MIN(index,popup.numberOfItems-1))];}
|
||||
}
|
||||
for(NSDictionary *d in DYDescriptors())if([@[@"cmbalanceAngle",@"cmbalanceStrength"]containsObject:d[@"key"]]){double v=[d[@"default"]doubleValue];[get getFloatValue:&v fromParameter:[d[@"pid"]unsignedIntValue] atTime:t];graphicValues[d[@"key"]]=@(v);}
|
||||
for(id graphic in _graphics)[graphic setValues:graphicValues];
|
||||
for(NSMutableDictionary *c in _cards) {
|
||||
NSNumber *pid=c[@"section"][@"enabled"];
|
||||
@@ -698,19 +720,21 @@ static NSImage *DYWheelImage(void) {
|
||||
NSNumber *extra=c[@"section"][@"extraEnabled"];double extraValue=0;
|
||||
if(extra)[get getFloatValue:&extraValue fromParameter:extra.unsignedIntValue atTime:t];
|
||||
BOOL enabled=v>=.5||extraValue>=.5;
|
||||
BOOL collapsed=!enabled;groupingChanged|=collapsed!=[c[@"collapsed"]boolValue];c[@"collapsed"]=@(collapsed);
|
||||
[c[@"header"]setState:enabled?NSControlStateValueOn:NSControlStateValueOff];
|
||||
[c[@"header"]setToolTip:enabled?@"折叠并停用本组,保留参数值;双击还原本组":@"展开并启用本组,恢复之前的参数值;双击还原本组"];
|
||||
[c[@"header"]setAccessibilityHelp:[c[@"header"]toolTip]];
|
||||
[c[@"header"]setNeedsDisplay:YES];
|
||||
[c[@"enabled"] setState:enabled?NSControlStateValueOn:NSControlStateValueOff];
|
||||
[c[@"enabled"]setImage:[NSImage imageWithSystemSymbolName:enabled?@"eye":@"eye.slash" accessibilityDescription:enabled?@"折叠并停用本组":@"展开并启用本组"]];
|
||||
[c[@"enabled"]setToolTip:enabled?@"折叠并停用本组,保留参数值":@"展开并启用本组,恢复之前的参数值"];
|
||||
[c[@"enabled"]setAccessibilityHelp:[c[@"enabled"]toolTip]];
|
||||
// Visibility and rendering share the host's section enable value.
|
||||
for(NSView *row in c[@"body"])row.alphaValue=1;
|
||||
DYInspectorToken *token=nil;[get getCustomParameterValue:&token fromParameter:DYInspectorParameterID atTime:t];
|
||||
NSNumber *saved=[token isKindOfClass:DYInspectorToken.class]?token.folds[c[@"section"][@"key"]]:nil;
|
||||
BOOL collapsed=saved?saved.boolValue:[c[@"collapsed"]boolValue];groupingChanged|=collapsed!=[c[@"collapsed"]boolValue];c[@"collapsed"]=@(collapsed);
|
||||
[c[@"header"]setState:collapsed?NSControlStateValueOff:NSControlStateValueOn];
|
||||
[c[@"header"]setToolTip:collapsed?@"展开界面,不改变启用状态;双击还原本组":@"折叠界面,保持当前效果;双击还原本组"];
|
||||
[c[@"header"]setAccessibilityHelp:[c[@"header"]toolTip]];[c[@"header"]setNeedsDisplay:YES];
|
||||
[c[@"enabled"]setState:enabled?NSControlStateValueOn:NSControlStateValueOff];
|
||||
[c[@"enabled"]setImage:[NSImage imageWithSystemSymbolName:enabled?@"eye":@"eye.slash" accessibilityDescription:enabled?@"停用本组":@"启用本组"]];
|
||||
[c[@"enabled"]setToolTip:enabled?@"停用本组,保留参数和展开状态":@"启用本组,保留展开状态"];[c[@"enabled"]setAccessibilityHelp:[c[@"enabled"]toolTip]];
|
||||
for(NSView *row in c[@"body"])row.alphaValue=enabled?1:.45;
|
||||
}
|
||||
DYAssetState *assets=DYReadAssets(_manager,t);
|
||||
DYAssetState *assets=DYReadAssets(_manager,t);[_spiderPanel setMesh:assets.spiderMesh linked:assets.spiderLinked];
|
||||
double profile=0,configured=0;[get getFloatValue:&profile fromParameter:2013 atTime:t];[get getFloatValue:&configured fromParameter:2236 atTime:t];
|
||||
DYInspectorToken *oldToken=nil;[get getCustomParameterValue:&oldToken fromParameter:DYInspectorParameterID atTime:t];
|
||||
_tabs[@"legacyInput"]=@(configured<.5&&(configured<0||profile>.5||[assets.paths[@"input"]length]||oldToken.schema<2));
|
||||
for(NSString *key in _assetButtons) {
|
||||
NSString *path=assets.paths[key]; NSButton *button=_assetButtons[key][@"choose"];
|
||||
NSString *name=path.length?path.lastPathComponent.stringByDeletingPathExtension:@"无";
|
||||
@@ -731,7 +755,7 @@ static NSImage *DYWheelImage(void) {
|
||||
if(_refreshing)return;
|
||||
NSNumber *pid=@(sender.tag); NSDictionary *r=_controls[pid],*d=r[@"descriptor"]; if(!d)return;
|
||||
double v;
|
||||
if([sender isKindOfClass:[NSPopUpButton class]])v=[(NSPopUpButton *)sender indexOfSelectedItem];
|
||||
if([sender isKindOfClass:[NSPopUpButton class]]){NSInteger i=[(NSPopUpButton *)sender indexOfSelectedItem];v=d[@"values"]?[d[@"values"][i]doubleValue]:i;}
|
||||
else if([sender isKindOfClass:[NSButton class]])v=[(NSButton *)sender state]==NSControlStateValueOn?1:0;
|
||||
else {
|
||||
if([sender isKindOfClass:[NSTextField class]]) {
|
||||
@@ -745,7 +769,12 @@ static NSImage *DYWheelImage(void) {
|
||||
v=fmax([d[@"min"] doubleValue],fmin([d[@"max"] doubleValue],v));
|
||||
id<FxCustomParameterActionAPI_v4> action=[self actionAPI];if(!action)return;
|
||||
[action startAction:self];
|
||||
@try { id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)]; [set setFloatValue:v toParameter:pid.unsignedIntValue atTime:action.currentTime]; }
|
||||
@try { id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)]; [set setFloatValue:v toParameter:pid.unsignedIntValue atTime:action.currentTime];if([d[@"key"]hasPrefix:@"cm"]||[d[@"key"]isEqual:@"blackWhiteMix"]){
|
||||
id<FxParameterRetrievalAPI_v6>get=[_manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];DYInspectorToken *old=nil;[get getCustomParameterValue:&old fromParameter:DYInspectorParameterID atTime:action.currentTime];
|
||||
if([d[@"key"]hasPrefix:@"cm"]){[set setFloatValue:1 toParameter:2236 atTime:action.currentTime];[self clearPrimaryBypasses:set time:action.currentTime];}
|
||||
else if(old.schema<2){double cfg=0;[get getFloatValue:&cfg fromParameter:2236 atTime:action.currentTime];if(cfg<.5)[set setFloatValue:-1 toParameter:2236 atTime:action.currentTime];}
|
||||
if(old.schema<2){DYInspectorToken *token=[[old copy]autorelease];token.schema=2;[set setCustomParameterValue:token toParameter:DYInspectorParameterID atTime:action.currentTime];}
|
||||
} }
|
||||
@finally { [action endAction:self]; }
|
||||
[self postChanged];
|
||||
}
|
||||
@@ -753,7 +782,7 @@ static NSImage *DYWheelImage(void) {
|
||||
NSDictionary *r=_controls[@(sender.tag)],*d=r[@"descriptor"];if(!d)return;
|
||||
id<FxCustomParameterActionAPI_v4> action=[self actionAPI];if(!action)return;
|
||||
[action startAction:self];
|
||||
@try {id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];[set setFloatValue:[d[@"default"] doubleValue] toParameter:(UInt32)sender.tag atTime:action.currentTime];}
|
||||
@try {id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];[set setFloatValue:[d[@"default"] doubleValue] toParameter:(UInt32)sender.tag atTime:action.currentTime];if([d[@"key"]hasPrefix:@"cm"]){[set setFloatValue:1 toParameter:2236 atTime:action.currentTime];[self clearPrimaryBypasses:set time:action.currentTime];}}
|
||||
@finally {[action endAction:self];}
|
||||
[self postChanged];
|
||||
}
|
||||
@@ -771,10 +800,20 @@ static NSImage *DYWheelImage(void) {
|
||||
[action startAction:self];
|
||||
@try {
|
||||
CMTime t=action.currentTime;id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];
|
||||
for(NSString *key in values) {NSDictionary *d=byKey[key];double v=[values[key] doubleValue];if(!d||!std::isfinite(v))continue;v=fmax([d[@"min"]doubleValue],fmin([d[@"max"]doubleValue],v));[set setFloatValue:v toParameter:[d[@"pid"]unsignedIntValue] atTime:t];}
|
||||
BOOL primaryEdit=NO;for(NSString *key in values) {NSDictionary *d=byKey[key];primaryEdit|=[key hasPrefix:@"cm"];double v=[values[key] doubleValue];if(!d||!std::isfinite(v))continue;v=fmax([d[@"min"]doubleValue],fmin([d[@"max"]doubleValue],v));[set setFloatValue:v toParameter:[d[@"pid"]unsignedIntValue] atTime:t];}
|
||||
if(primaryEdit){[set setFloatValue:1 toParameter:2236 atTime:t];[self clearPrimaryBypasses:set time:t];}
|
||||
} @finally {[action endAction:self];}
|
||||
[self postChanged];
|
||||
}
|
||||
- (void)clearPrimaryBypasses:(id<FxParameterSettingAPI_v6>)set time:(CMTime)t{for(NSDictionary *d in DYDescriptors())if([d[@"key"]hasPrefix:@"cmbypass"])[set setFloatValue:0 toParameter:[d[@"pid"]unsignedIntValue] atTime:t];}
|
||||
- (void)graphicGesture:(BOOL)begin title:(NSString *)title{
|
||||
if(begin==_graphicUndoOpen)return;id<FxCustomParameterActionAPI_v4>a=[self actionAPI];if(!a)return;[a startAction:self];
|
||||
@try{id<FxUndoAPI>undo=[_manager apiForProtocol:@protocol(FxUndoAPI)];if(begin)_graphicUndoOpen=[undo startUndoGroup:title?:@"调整颜色"];else{[undo endUndoGroup];_graphicUndoOpen=NO;}}@finally{[a endAction:self];}
|
||||
}
|
||||
- (void)writeSpiderMesh:(NSData *)mesh linked:(BOOL)linked{
|
||||
if(mesh.length&&!DYSpiderMeshIsValid(mesh))return;id<FxCustomParameterActionAPI_v4>a=[self actionAPI];if(!a)return;[a startAction:self];
|
||||
@try{DYAssetState *state=[[DYReadAssets(_manager,a.currentTime)copy]autorelease];state.spiderMesh=mesh;state.spiderLinked=linked;DYWriteAssets(_manager,state,a.currentTime);}@finally{[a endAction:self];}[self postChanged];
|
||||
}
|
||||
- (void)setSectionEnabled:(BOOL)enabled atIndex:(NSInteger)index {
|
||||
if(index<0||index>=_cards.count)return;
|
||||
NSDictionary *section=_cards[index][@"section"];
|
||||
@@ -785,6 +824,8 @@ static NSImage *DYWheelImage(void) {
|
||||
id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];
|
||||
[set setFloatValue:enabled?1:0 toParameter:pid.unsignedIntValue atTime:action.currentTime];
|
||||
NSNumber *extra=section[@"extraEnabled"];if(extra)[set setFloatValue:enabled?1:0 toParameter:extra.unsignedIntValue atTime:action.currentTime];
|
||||
for(NSNumber *linked in section[@"enableParameters"])[set setFloatValue:enabled?1:0 toParameter:linked.unsignedIntValue atTime:action.currentTime];
|
||||
|
||||
}
|
||||
@finally {[action endAction:self];}
|
||||
[self postChanged];
|
||||
@@ -792,7 +833,19 @@ static NSImage *DYWheelImage(void) {
|
||||
- (void)groupEnabled:(NSButton *)sender { [self setSectionEnabled:sender.state==NSControlStateValueOn atIndex:sender.tag]; }
|
||||
- (void)toggleSection:(NSButton *)sender {
|
||||
if(sender.tag<0||sender.tag>=_cards.count)return;
|
||||
[self setSectionEnabled:[_cards[sender.tag][@"collapsed"]boolValue] atIndex:sender.tag];
|
||||
id<FxCustomParameterActionAPI_v4> action=[self actionAPI];if(!action)return;[action startAction:self];
|
||||
@try {
|
||||
id<FxParameterRetrievalAPI_v6> get=[_manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];
|
||||
DYInspectorToken *old=nil;[get getCustomParameterValue:&old fromParameter:DYInspectorParameterID atTime:action.currentTime];DYInspectorToken *token=[old isKindOfClass:DYInspectorToken.class]?[[old copy]autorelease]:[[[DYInspectorToken alloc]init]autorelease];
|
||||
NSMutableDictionary *folds=[[token.folds mutableCopy]autorelease];
|
||||
for(NSDictionary *card in _cards)folds[card[@"section"][@"key"]]=card[@"collapsed"];
|
||||
NSString *key=_cards[sender.tag][@"section"][@"key"];folds[key]=@(![_cards[sender.tag][@"collapsed"]boolValue]);token.folds=folds;
|
||||
[set setCustomParameterValue:token toParameter:DYInspectorParameterID atTime:action.currentTime];
|
||||
}@finally{[action endAction:self];}[self postChanged];
|
||||
}
|
||||
- (void)useCST:(id)sender {
|
||||
id<FxCustomParameterActionAPI_v4> a=[self actionAPI];if(!a)return;[a startAction:self];
|
||||
@try{id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];[set setFloatValue:1 toParameter:2236 atTime:a.currentTime];[self clearPrimaryBypasses:set time:a.currentTime];} @finally{[a endAction:self];}[self postChanged];
|
||||
}
|
||||
- (void)resetSection:(NSButton *)sender {
|
||||
[self cancelAssetLoads];
|
||||
@@ -802,11 +855,16 @@ 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 section[@"rows"]) {[set setFloatValue:[d[@"default"] doubleValue] toParameter:[d[@"pid"] unsignedIntValue] atTime:t];if(d[@"enabled"])[set setFloatValue:1 toParameter:[d[@"enabled"] unsignedIntValue] atTime:t];}
|
||||
for(NSDictionary *d in section[@"rows"]) {if(!d[@"pid"])continue;[set setFloatValue:[d[@"default"] doubleValue] toParameter:[d[@"pid"] unsignedIntValue] atTime:t];if(d[@"enabled"])[set setFloatValue:1 toParameter:[d[@"enabled"] unsignedIntValue] atTime:t];}
|
||||
double defaultEnabled=[section[@"defaultEnabled"]doubleValue];
|
||||
NSNumber *enabled=section[@"enabled"];if(enabled)[set setFloatValue:defaultEnabled toParameter:enabled.unsignedIntValue atTime:t];
|
||||
if([@[@"input",@"primary",@"output"]containsObject:section[@"key"]])[set setFloatValue:1 toParameter:2236 atTime:t];
|
||||
if([section[@"key"]isEqual:@"blackwhite"]){DYInspectorToken *old=nil;[[_manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)]getCustomParameterValue:&old fromParameter:DYInspectorParameterID atTime:t];if(old.schema<2){DYInspectorToken *current=[[old copy]autorelease];current.schema=2;[set setCustomParameterValue:current toParameter:DYInspectorParameterID atTime:t];[set setFloatValue:-1 toParameter:2236 atTime:t];}}
|
||||
|
||||
NSNumber *extra=section[@"extraEnabled"];if(extra)[set setFloatValue:defaultEnabled toParameter:extra.unsignedIntValue atTime:t];
|
||||
NSString *key=section[@"key"]?:@"";
|
||||
if([key isEqual:@"primary"]){for(NSDictionary *d in DYDescriptors())if([d[@"key"]hasPrefix:@"cm"])[set setFloatValue:[d[@"default"]doubleValue] toParameter:[d[@"pid"]unsignedIntValue] atTime:t];[set setFloatValue:1 toParameter:2236 atTime:t];for(NSNumber *linked in section[@"enableParameters"])[set setFloatValue:1 toParameter:linked.unsignedIntValue atTime:t];[set setFloatValue:0 toParameter:2013 atTime:t];DYAssetState *state=[[DYReadAssets(_manager,t)copy]autorelease];NSMutableDictionary *paths=[[state.paths mutableCopy]autorelease];[paths removeObjectForKey:@"input"];state.paths=paths;DYWriteAssets(_manager,state,t);}
|
||||
if([key isEqual:@"spider"]){DYAssetState *state=[[DYReadAssets(_manager,t)copy]autorelease];auto m=DYSpiderMesh(state.spiderMesh);m=dy::neutralMesh(m.hues,m.rings+1);state.spiderMesh=[NSData dataWithBytes:&m length:sizeof(m)];DYWriteAssets(_manager,state,t);}
|
||||
if([key localizedCaseInsensitiveContainsString:@"input"]||[key localizedCaseInsensitiveContainsString:@"look"]) {
|
||||
DYAssetState *assets=[[DYReadAssets(_manager,t) copy] autorelease];
|
||||
if(!assets)assets=[[[DYAssetState alloc] init] autorelease];
|
||||
@@ -827,6 +885,8 @@ static NSImage *DYWheelImage(void) {
|
||||
CMTime t=action.currentTime;id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];
|
||||
for(NSDictionary *d in DYDescriptors())[set setFloatValue:[d[@"default"] doubleValue] toParameter:[d[@"pid"] unsignedIntValue] atTime:t];
|
||||
DYAssetState *assets=[[[DYAssetState alloc] init] autorelease];assets.paths=@{};DYWriteAssets(_manager,assets,t);
|
||||
[set setCustomParameterValue:[[[DYInspectorToken alloc]init]autorelease] toParameter:DYInspectorParameterID atTime:t];
|
||||
for(NSMutableDictionary *card in _cards)card[@"collapsed"]=@(![@[@"primary",@"spider",@"base"]containsObject:card[@"section"][@"key"]]);
|
||||
} @finally {[action endAction:self];}
|
||||
[self postChanged];
|
||||
}
|
||||
@@ -873,14 +933,29 @@ static NSImage *DYWheelImage(void) {
|
||||
id<FxCustomParameterActionAPI_v4> a=[self actionAPI];if(!a)return;[a startAction:self];NSString *selected=nil;@try{selected=[DYReadAssets(_manager,a.currentTime).paths[sender.identifier]copy];}@finally{[a endAction:self];}
|
||||
__block DYInspector *owner=self;NSString *key=[[sender.identifier copy]autorelease];
|
||||
_browser=[[DYLUTBrowser alloc]initWithLibrary:_library preview:[_renderer lookLUTPreview] selectedPath:selected palette:DYThemePalette() selection:^NSProgress *(NSString *path,void (^completion)(NSError *)){return [owner setAssetPath:path forKey:key completion:completion];}];[selected release];
|
||||
id<FxRemoteWindowAPI> remote=[_manager apiForProtocol:@protocol(FxRemoteWindowAPI_v3)];
|
||||
if(!remote)remote=[_manager apiForProtocol:@protocol(FxRemoteWindowAPI_v2)];if(!remote)remote=[_manager apiForProtocol:@protocol(FxRemoteWindowAPI)];
|
||||
DYLUTBrowser *browser=_browser;id<FxRemoteWindowAPI_v3> closer=[_manager apiForProtocol:@protocol(FxRemoteWindowAPI_v3)];
|
||||
if(remote){[remote remoteWindowOfSize:CGSizeMake(760,560) reply:^(FxXPView *parent,NSError *error){dispatch_async(dispatch_get_main_queue(),^{
|
||||
if(_browser!=browser)return;
|
||||
if(parent){[browser showInRemoteParent:parent close:^{[closer closeRemoteWindow];}];}
|
||||
else [browser showRelativeToView:sender];
|
||||
});}];}else [browser showRelativeToView:sender];
|
||||
// Remote-window APIs must be acquired and invoked inside the custom
|
||||
// parameter action, while the SDK's API permissions are still installed.
|
||||
[a startAction:self];
|
||||
@try{
|
||||
id<FxRemoteWindowAPI_v3> v3=[_manager apiForProtocol:@protocol(FxRemoteWindowAPI_v3)];
|
||||
id<FxRemoteWindowAPI_v2> sizable=v3?:[_manager apiForProtocol:@protocol(FxRemoteWindowAPI_v2)];
|
||||
id<FxRemoteWindowAPI> remote=sizable?:[_manager apiForProtocol:@protocol(FxRemoteWindowAPI)];
|
||||
DYLUTBrowser *browser=_browser;
|
||||
void (^attach)(FxXPView *,NSError *)=^(FxXPView *parent,NSError *error){
|
||||
void (^views)(void)=^{
|
||||
if(owner->_browser!=browser)return;
|
||||
if(parent)[browser showInRemoteParent:parent close:^{
|
||||
id<FxCustomParameterActionAPI_v4> action=[owner actionAPI];if(!action)return;[action startAction:owner];
|
||||
@try{[v3 closeRemoteWindow];}@finally{[action endAction:owner];}
|
||||
}];else [browser showRelativeToView:sender];
|
||||
};
|
||||
// Attach before reply returns: the SDK immediately reads child size.
|
||||
if(NSThread.isMainThread)views();else dispatch_sync(dispatch_get_main_queue(),views);
|
||||
};
|
||||
if(sizable)[sizable remoteWindowWithMinimumSize:DYLUTBrowser.minimumContentSize maximumSize:DYLUTBrowser.maximumContentSize reply:attach];
|
||||
else if(remote)[remote remoteWindowOfSize:DYLUTBrowser.preferredContentSize reply:attach];
|
||||
else [_browser showRelativeToView:sender];
|
||||
}@finally{[a endAction:self];}
|
||||
}
|
||||
- (void)lookEnabled:(NSButton *)sender {NSInteger slot=[[sender.identifier substringFromIndex:4]integerValue];if(slot<1||slot>4)return;[self writeGraphicValues:@{[NSString stringWithFormat:@"look%ldEnabled",(long)slot+1]:@(sender.state==NSControlStateValueOn)}];}
|
||||
- (void)openLibraryFolder:(id)sender {
|
||||
@@ -923,7 +998,7 @@ static NSImage *DYWheelImage(void) {
|
||||
if(path.length)paths[key]=path;else [paths removeObjectForKey:key];
|
||||
assets.paths=paths;written=DYWriteAssets(_manager,assets,t);
|
||||
} @finally {[action endAction:self];}
|
||||
if(written)[self postChanged];else if(error)*error=[NSError errorWithDomain:@"com.dayu.color" code:1 userInfo:@{NSLocalizedDescriptionKey:@"宿主未接受此 LUT,原来的选择已保留"}];
|
||||
if(written){if(path.length&&[key hasPrefix:@"look"])[_library recordUsedPath:path];[self postChanged];}else if(error)*error=[NSError errorWithDomain:@"com.dayu.color" code:1 userInfo:@{NSLocalizedDescriptionKey:@"宿主未接受此 LUT,原来的选择已保留"}];
|
||||
return written;
|
||||
}
|
||||
- (void)showError:(NSString *)message {
|
||||
@@ -931,14 +1006,15 @@ static NSImage *DYWheelImage(void) {
|
||||
}
|
||||
- (NSDictionary *)presetSnapshot {
|
||||
id<FxCustomParameterActionAPI_v4> action=[self actionAPI];if(!action)return nil;
|
||||
NSMutableDictionary *values=[NSMutableDictionary dictionary];NSDictionary *paths=@{};
|
||||
NSMutableDictionary *values=[NSMutableDictionary dictionary];NSDictionary *paths=@{},*spider=nil;
|
||||
[action startAction:self];
|
||||
@try {
|
||||
CMTime t=action.currentTime;id<FxParameterRetrievalAPI_v6> get=[_manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
|
||||
for(NSDictionary *d in DYDescriptors()) {double v=[d[@"default"] doubleValue];[get getFloatValue:&v fromParameter:[d[@"pid"] unsignedIntValue] atTime:t];if(std::isfinite(v))values[d[@"key"]]=@(v);}
|
||||
paths=[[DYReadAssets(_manager,t).paths copy] autorelease]?:@{};
|
||||
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);
|
||||
} @finally {[action endAction:self];}
|
||||
return @{@"format":@"com.dayu.color.preset",@"version":@1,@"values":values,@"paths":paths};
|
||||
return @{@"format":@"com.dayu.color.preset",@"version":@3,@"values":values,@"paths":paths,@"spider":spider};
|
||||
}
|
||||
- (void)savePreset:(id)sender {
|
||||
NSDictionary *snapshot=[self presetSnapshot];if(!snapshot)return;
|
||||
@@ -953,11 +1029,11 @@ static NSImage *DYWheelImage(void) {
|
||||
NSError *error=nil;NSData *data=[NSData dataWithContentsOfURL:panel.URL options:0 error:&error];
|
||||
if(!data||data.length>2*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"]||![json[@"version"] isEqual:@1]||![json[@"values"] isKindOfClass:NSDictionary.class]||![json[@"paths"] isKindOfClass:NSDictionary.class]){[self showError:@"这不是有效的大鱼调色预设。"];return;}
|
||||
NSDictionary *values=json[@"values"],*paths=json[@"paths"];
|
||||
if(![json isKindOfClass:NSDictionary.class]||![json[@"format"] isEqual:@"com.dayu.color.preset"]||![@[@1,@2,@3]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"]isEqual:@3]?DYSpiderFromJSON(json[@"spider"]):nil;if([json[@"version"]isEqual:@3]&&!mesh){[self showError:@"预设包含无效蜘蛛盘,当前调色未修改。"];return;}
|
||||
for(NSDictionary *d in DYDescriptors()) {
|
||||
id v=values[d[@"key"]];if(!v)continue;
|
||||
if(![v isKindOfClass:NSNumber.class]||!std::isfinite([v doubleValue])||[v doubleValue]<[d[@"min"] doubleValue]||[v doubleValue]>[d[@"max"] doubleValue]){[self showError:@"预设包含无效参数,尚未修改当前调色。"];return;}
|
||||
if(![v isKindOfClass:NSNumber.class]||!std::isfinite([v doubleValue])||[v doubleValue]<[d[@"min"] doubleValue]||[v doubleValue]>[d[@"max"] doubleValue]||(d[@"values"]&&![d[@"values"]containsObject:v])){[self showError:@"预设包含无效参数,尚未修改当前调色。"];return;}
|
||||
}
|
||||
NSMutableDictionary *validPaths=[NSMutableDictionary dictionary];NSMutableArray *missing=[NSMutableArray array];
|
||||
for(NSString *key in @[@"input",@"look0",@"look1",@"look2",@"look3",@"look4"]) {
|
||||
@@ -971,7 +1047,8 @@ static NSImage *DYWheelImage(void) {
|
||||
@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];
|
||||
DYAssetState *assets=[[[DYAssetState alloc] init] autorelease];assets.paths=validPaths;DYWriteAssets(_manager,assets,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);
|
||||
} @finally {[action endAction:self];}
|
||||
[self postChanged];
|
||||
if(missing.count)[self showError:[@"调色参数已恢复,以下 LUT 文件需要重新选择:\n" stringByAppendingString:[missing componentsJoinedByString:@"\n"]]];
|
||||
|
||||
@@ -7,6 +7,9 @@ typedef NSProgress * (^DYLUTSelectionHandler)(NSString *path,void (^completion)(
|
||||
/// after decoding, GPU preparation and the host edit have actually succeeded.
|
||||
@interface DYLUTBrowser : NSWindowController
|
||||
@property(nonatomic,readonly) BOOL visible;
|
||||
+ (NSSize)minimumContentSize;
|
||||
+ (NSSize)maximumContentSize;
|
||||
+ (NSSize)preferredContentSize;
|
||||
- (instancetype)initWithLibrary:(DYLUTLibrary *)library
|
||||
preview:(NSData *)rgba
|
||||
selectedPath:(NSString *)path
|
||||
|
||||
+98
-40
@@ -15,6 +15,11 @@ static NSColor *DYBrowserColor(NSDictionary *palette, NSString *key) {
|
||||
|
||||
static NSString *const DYBrowserSizePreference=@"com.dayu.color.lookLUTPreview.thumbnailSize";
|
||||
static NSString *const DYBrowserFolderPreference=@"com.dayu.color.lookLUTPreview.selectedFolder";
|
||||
static NSString *const DYBrowserFramePreference=@"com.dayu.color.lookLUTPreview.windowFrame";
|
||||
static NSString *const DYBrowserLayoutPreference=@"com.dayu.color.lookLUTPreview.layout";
|
||||
static NSString *const DYBrowserSidebarPreference=@"com.dayu.color.lookLUTPreview.sidebarWidth";
|
||||
static NSString *const DYBrowserRecentFolder=@"@recent";
|
||||
static NSString *DYBrowserPreference(NSString *key,DYLUTLibrary *library){return [NSString stringWithFormat:@"%@|%@",key,library.rootURL.path];}
|
||||
|
||||
@interface DYBrowserCanvas : NSView
|
||||
@property(copy) NSDictionary *palette;
|
||||
@@ -41,6 +46,7 @@ static NSString *const DYBrowserFolderPreference=@"com.dayu.color.lookLUTPreview
|
||||
@property(copy) NSDictionary *palette;
|
||||
@property BOOL chosen;
|
||||
@property BOOL doubleClicked;
|
||||
@property BOOL listLayout;
|
||||
@end
|
||||
@implementation DYBrowserTile
|
||||
- (BOOL)isFlipped{return YES;}
|
||||
@@ -56,7 +62,7 @@ static NSString *const DYBrowserFolderPreference=@"com.dayu.color.lookLUTPreview
|
||||
NSRect bounds=NSInsetRect(self.bounds,1,1);
|
||||
NSBezierPath *outline=[NSBezierPath bezierPathWithRoundedRect:bounds xRadius:7 yRadius:7];
|
||||
[DYBrowserColor(_palette,_chosen?@"field":@"card") setFill];[outline fill];
|
||||
NSRect imageRect=NSMakeRect(2,2,MAX(1,bounds.size.width-2),MAX(1,bounds.size.height-25));
|
||||
NSRect imageRect=_listLayout?NSMakeRect(3,3,104,bounds.size.height-4):NSMakeRect(2,2,MAX(1,bounds.size.width-2),MAX(1,bounds.size.height-25));
|
||||
if(_thumbnail){
|
||||
[NSGraphicsContext saveGraphicsState];
|
||||
[[NSBezierPath bezierPathWithRoundedRect:imageRect xRadius:4 yRadius:4]addClip];
|
||||
@@ -71,8 +77,8 @@ static NSString *const DYBrowserFolderPreference=@"com.dayu.color.lookLUTPreview
|
||||
NSSize size=[message sizeWithAttributes:attributes];
|
||||
[message drawAtPoint:NSMakePoint(NSMidX(imageRect)-size.width/2,NSMidY(imageRect)-size.height/2) withAttributes:attributes];
|
||||
}
|
||||
NSMutableParagraphStyle *paragraph=[[[NSMutableParagraphStyle alloc]init]autorelease];paragraph.alignment=NSTextAlignmentCenter;paragraph.lineBreakMode=NSLineBreakByTruncatingMiddle;
|
||||
[_displayName drawInRect:NSMakeRect(7,NSMaxY(bounds)-24,bounds.size.width-14,18) withAttributes:@{NSFontAttributeName:[NSFont systemFontOfSize:11 weight:_chosen?NSFontWeightSemibold:NSFontWeightRegular],NSForegroundColorAttributeName:DYBrowserColor(_palette,@"text"),NSParagraphStyleAttributeName:paragraph}];
|
||||
NSMutableParagraphStyle *paragraph=[[[NSMutableParagraphStyle alloc]init]autorelease];paragraph.alignment=_listLayout?NSTextAlignmentLeft:NSTextAlignmentCenter;paragraph.lineBreakMode=NSLineBreakByTruncatingMiddle;
|
||||
[_displayName drawInRect:(_listLayout?NSMakeRect(120,NSMidY(bounds)-9,MAX(1,bounds.size.width-136),20):NSMakeRect(7,NSMaxY(bounds)-24,bounds.size.width-14,18)) withAttributes:@{NSFontAttributeName:[NSFont systemFontOfSize:11 weight:_chosen?NSFontWeightSemibold:NSFontWeightRegular],NSForegroundColorAttributeName:DYBrowserColor(_palette,@"text"),NSParagraphStyleAttributeName:paragraph}];
|
||||
[DYBrowserColor(_palette,_chosen?@"accent":@"border")setStroke];outline.lineWidth=_chosen?2:1;[outline stroke];
|
||||
}
|
||||
- (void)mouseDown:(NSEvent *)event{self.doubleClicked=event.clickCount>1;[super mouseDown:event];}
|
||||
@@ -100,7 +106,7 @@ static NSString *const DYBrowserFolderPreference=@"com.dayu.color.lookLUTPreview
|
||||
@end
|
||||
@implementation DYBrowserWork @end
|
||||
|
||||
@interface DYLUTBrowser () <NSWindowDelegate,NSPopoverDelegate,NSSearchFieldDelegate> {
|
||||
@interface DYLUTBrowser () <NSWindowDelegate,NSPopoverDelegate,NSSearchFieldDelegate,NSSplitViewDelegate> {
|
||||
DYLUTLibrary *_library;
|
||||
NSData *_preview;
|
||||
NSString *_selectedPath,*_folder;
|
||||
@@ -108,6 +114,7 @@ static NSString *const DYBrowserFolderPreference=@"com.dayu.color.lookLUTPreview
|
||||
DYLUTSelectionHandler _selection;
|
||||
void (^_closeAction)(void);
|
||||
NSPopover *_popover;
|
||||
NSWindow *_presentationWindow;NSSplitView *_splitView;NSPopUpButton *_layoutMenu;
|
||||
DYBrowserCanvas *_root,*_folderDocument,*_gridDocument;
|
||||
NSScrollView *_folderScroll,*_gridScroll;
|
||||
NSTextField *_titleLabel,*_countLabel,*_statusLabel,*_sizeLabel,*_emptyLabel;
|
||||
@@ -121,25 +128,35 @@ static NSString *const DYBrowserFolderPreference=@"com.dayu.color.lookLUTPreview
|
||||
NSCache *_thumbnailCache;
|
||||
dispatch_queue_t _previewQueue;
|
||||
DYBrowserWork *_work;
|
||||
BOOL _closed,_sizing,_visible,_remoteMode,_importing,_layingOut;
|
||||
BOOL _closed,_sizing,_visible,_remoteMode,_importing,_layingOut,_detached;
|
||||
NSProgress *_libraryTask,*_selectionTask;
|
||||
NSTimer *_progressTimer;
|
||||
NSUInteger _libraryGeneration,_selectionGeneration;
|
||||
NSInteger _columns;
|
||||
CGFloat _tileWidth,_tileHeight;
|
||||
CGFloat _tileWidth,_tileHeight,_sidebarWidth;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation DYLUTBrowser
|
||||
+ (NSSize)minimumContentSize{return NSMakeSize(720,420);}
|
||||
+ (NSSize)maximumContentSize{return NSMakeSize(1800,1200);}
|
||||
+ (NSSize)preferredContentSize{
|
||||
NSString *key=[NSString stringWithFormat:@"%@|%@",DYBrowserFramePreference,DYLUTLibrary.defaultRootURL.path];
|
||||
NSString *saved=[[NSUserDefaults standardUserDefaults]stringForKey:key];NSRect frame=saved?NSRectFromString(saved):NSZeroRect;
|
||||
if(!std::isfinite(frame.size.width)||!std::isfinite(frame.size.height)||frame.size.width<720||frame.size.height<420)return NSMakeSize(900,620);
|
||||
return NSMakeSize(MIN(1800,frame.size.width),MIN(1200,MAX(420,frame.size.height-28)));
|
||||
}
|
||||
static NSTextField *BrowserLabel(NSString *title,CGFloat size){NSTextField *label=[NSTextField labelWithString:title];label.font=[NSFont systemFontOfSize:size];label.lineBreakMode=NSLineBreakByTruncatingTail;return label;}
|
||||
static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *button=[NSButton buttonWithTitle:title target:target action:action];button.font=[NSFont systemFontOfSize:11];button.bezelStyle=NSBezelStyleRounded;return button;}
|
||||
- (instancetype)initWithLibrary:(DYLUTLibrary *)library preview:(NSData *)rgba selectedPath:(NSString *)path palette:(NSDictionary *)palette selection:(DYLUTSelectionHandler)selection{
|
||||
NSPanel *panel=[[[NSPanel alloc]initWithContentRect:NSMakeRect(0,0,760,560) styleMask:NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMaskResizable backing:NSBackingStoreBuffered defer:NO]autorelease];
|
||||
if((self=[super initWithWindow:panel])){
|
||||
NSString *savedFolder=[[NSUserDefaults standardUserDefaults]stringForKey:DYBrowserFolderPreference];
|
||||
NSString *savedFolder=[[NSUserDefaults standardUserDefaults]stringForKey:DYBrowserPreference(DYBrowserFolderPreference,library)]?:[[NSUserDefaults standardUserDefaults]stringForKey:DYBrowserFolderPreference];
|
||||
if(!library.recentPaths.count&&path.length)[library recordUsedPath:path];
|
||||
if(!savedFolder)savedFolder=library.recentPaths.count?DYBrowserRecentFolder:@"*";
|
||||
_library=[library retain];_preview=[rgba copy];_selectedPath=[path copy];_folder=[(savedFolder?:@"*") copy];_selection=[selection copy];
|
||||
_folderButtons=[NSMutableArray new];_tiles=[NSMutableDictionary new];_queuedPaths=[NSMutableSet new];_thumbnailCache=[NSCache new];_thumbnailCache.countLimit=600;_thumbnailCache.totalCostLimit=64*1024*1024;_previewQueue=dispatch_queue_create("com.dayu.color.lut-thumbnails",DISPATCH_QUEUE_SERIAL);dispatch_set_target_queue(_previewQueue,dispatch_get_global_queue(QOS_CLASS_UTILITY,0));
|
||||
panel.title=@"风格 LUT";panel.minSize=NSMakeSize(760,420);panel.releasedWhenClosed=NO;panel.hidesOnDeactivate=NO;panel.delegate=self;
|
||||
panel.title=@"风格 LUT";panel.contentMinSize=self.class.minimumContentSize;panel.contentMaxSize=self.class.maximumContentSize;panel.releasedWhenClosed=NO;panel.hidesOnDeactivate=NO;panel.delegate=self;
|
||||
_root=[[DYBrowserCanvas alloc]initWithFrame:NSMakeRect(0,0,760,560)];_root.accessibilityLabel=@"LUT 缩略图浏览库";panel.contentView=_root;
|
||||
_titleLabel=[BrowserLabel(@"LUT 文件夹",14)retain];_titleLabel.font=[NSFont systemFontOfSize:14 weight:NSFontWeightSemibold];
|
||||
_countLabel=[BrowserLabel(@"0 个 LUT",11)retain];
|
||||
@@ -153,7 +170,11 @@ static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *b
|
||||
_refresh=[BrowserButton(@"刷新",self,@selector(reloadLibrary:))retain];
|
||||
_none=[BrowserButton(@"无 LUT",self,@selector(clearSelection:))retain];
|
||||
_done=[BrowserButton(@"完成",self,@selector(done:))retain];_done.keyEquivalent=@"\r";
|
||||
double size=[[NSUserDefaults standardUserDefaults]objectForKey:DYBrowserSizePreference]?[[NSUserDefaults standardUserDefaults]doubleForKey:DYBrowserSizePreference]:96;
|
||||
NSUserDefaults *preferences=NSUserDefaults.standardUserDefaults;
|
||||
NSNumber *storedSize=[preferences objectForKey:DYBrowserPreference(DYBrowserSizePreference,library)]?:[preferences objectForKey:DYBrowserSizePreference];double size=storedSize?storedSize.doubleValue:120;
|
||||
_layoutMenu=[[NSPopUpButton alloc]initWithFrame:NSZeroRect pullsDown:NO];[_layoutMenu addItemsWithTitles:@[@"网格",@"列表"]];_layoutMenu.font=[NSFont systemFontOfSize:11];_layoutMenu.target=self;_layoutMenu.action=@selector(layoutChanged:);_layoutMenu.accessibilityLabel=@"LUT 浏览布局";
|
||||
[_layoutMenu selectItemAtIndex:[preferences integerForKey:DYBrowserPreference(DYBrowserLayoutPreference,library)]==1?1:0];
|
||||
double sidebar=[preferences doubleForKey:DYBrowserPreference(DYBrowserSidebarPreference,library)];_sidebarWidth=std::isfinite(sidebar)&&sidebar>=128?MIN(360,sidebar):162;
|
||||
if(!std::isfinite(size))size=96;
|
||||
_sizeSlider=[[NSSlider alloc]initWithFrame:NSZeroRect];_sizeSlider.minValue=70;_sizeSlider.maxValue=255;_sizeSlider.doubleValue=fmax(70,fmin(255,size));_sizeSlider.continuous=YES;_sizeSlider.target=self;_sizeSlider.action=@selector(sizeChanged:);_sizeSlider.accessibilityLabel=@"LUT 缩略图大小";
|
||||
_folderScroll=[[NSScrollView alloc]initWithFrame:NSZeroRect];_folderScroll.hasVerticalScroller=YES;_folderScroll.autohidesScrollers=YES;_folderScroll.borderType=NSNoBorder;_folderScroll.drawsBackground=NO;_folderScroll.accessibilityLabel=@"LUT 文件夹列表";
|
||||
@@ -164,12 +185,14 @@ static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *b
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(folderScrolled:) name:NSViewBoundsDidChangeNotification object:_folderScroll.contentView];
|
||||
_gridScroll.contentView.postsBoundsChangedNotifications=YES;
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(gridScrolled:) name:NSViewBoundsDidChangeNotification object:_gridScroll.contentView];
|
||||
for(NSView *view in @[_titleLabel,_countLabel,_statusLabel,_sizeLabel,_search,_importFiles,_importFolder,_reveal,_refresh,_none,_done,_sizeSlider,_folderScroll,_gridScroll])[_root addSubview:view];
|
||||
_splitView=[[NSSplitView alloc]initWithFrame:NSMakeRect(12,80,736,425)];_splitView.vertical=YES;_splitView.dividerStyle=NSSplitViewDividerStyleThin;_splitView.accessibilityLabel=@"调整 LUT 文件夹与预览宽度";
|
||||
_folderScroll.frame=NSMakeRect(0,0,162,425);_gridScroll.frame=NSMakeRect(163,0,573,425);[_splitView addSubview:_folderScroll];[_splitView addSubview:_gridScroll];
|
||||
for(NSView *view in @[_titleLabel,_countLabel,_statusLabel,_sizeLabel,_search,_importFiles,_importFolder,_reveal,_refresh,_none,_done,_sizeSlider,_layoutMenu,_splitView])[_root addSubview:view];
|
||||
[_gridDocument addSubview:_emptyLabel];
|
||||
_root.postsFrameChangedNotifications=YES;_root.postsBoundsChangedNotifications=YES;
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(browserRootResized:) name:NSViewFrameDidChangeNotification object:_root];
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(browserRootResized:) name:NSViewBoundsDidChangeNotification object:_root];
|
||||
[self reloadLibrary:nil];[self updatePalette:palette];[self layoutBrowser];
|
||||
_splitView.delegate=self;[self reloadLibrary:nil];[self updatePalette:palette];[self layoutBrowser];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -181,40 +204,65 @@ static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *b
|
||||
[_library release];[_preview release];[_selectedPath release];[_folder release];[_palette release];[_selection release];[_closeAction release];
|
||||
[_root release];[_folderDocument release];[_gridDocument release];[_folderScroll release];[_gridScroll release];
|
||||
[_titleLabel release];[_countLabel release];[_statusLabel release];[_sizeLabel release];[_emptyLabel release];[_search release];
|
||||
[_importFiles release];[_importFolder release];[_reveal release];[_refresh release];[_none release];[_done release];[_sizeSlider release];
|
||||
[_importFiles release];[_importFolder release];[_reveal release];[_refresh release];[_none release];[_done release];[_sizeSlider release];[_layoutMenu release];_splitView.delegate=nil;[_splitView release];[_presentationWindow release];
|
||||
[_folderButtons release];[_folderPaths release];[_tiles release];[_visibleEntries release];[_queuedPaths release];[_thumbnailCache release];
|
||||
dispatch_release(_previewQueue);[super dealloc];
|
||||
}
|
||||
- (void)showRelativeToView:(NSView *)view{
|
||||
if(_closed||_remoteMode||!view.window)return;
|
||||
if(_popover.shown)return;
|
||||
// A plug-in process is prohibited from making its own NSPanel key. Only
|
||||
// FxRemoteWindow or a host-anchored popover may present this content.
|
||||
if(_closed||_remoteMode||!view.window||_popover.shown)return;
|
||||
self.window.contentView=[[[NSView alloc]initWithFrame:NSMakeRect(0,0,1,1)]autorelease];
|
||||
[_root removeFromSuperview];_root.frame=NSMakeRect(0,0,760,560);_root.autoresizingMask=NSViewWidthSizable|NSViewHeightSizable;
|
||||
_popover=[[NSPopover alloc]init];_popover.behavior=NSPopoverBehaviorTransient;_popover.animates=YES;_popover.delegate=self;_popover.contentSize=NSMakeSize(760,560);
|
||||
NSViewController *controller=[[[NSViewController alloc]init]autorelease];controller.view=_root;_popover.contentViewController=controller;
|
||||
NSSize size=self.class.preferredContentSize;[_root removeFromSuperview];_root.frame=(NSRect){NSZeroPoint,size};_root.autoresizingMask=NSViewWidthSizable|NSViewHeightSizable;
|
||||
_popover=[[NSPopover alloc]init];_popover.behavior=NSPopoverBehaviorSemitransient;_popover.animates=YES;_popover.delegate=self;_popover.contentSize=size;
|
||||
NSViewController *controller=[[[NSViewController alloc]init]autorelease];controller.title=@"风格 LUT";controller.view=_root;_popover.contentViewController=controller;
|
||||
[self layoutBrowser];
|
||||
@try {[_popover showRelativeToRect:view.bounds ofView:view preferredEdge:NSRectEdgeMaxX];_visible=_popover.shown;}
|
||||
@catch(NSException *exception){[self finishClosing];}
|
||||
}
|
||||
- (BOOL)visible{return !_closed&&(_remoteMode?_visible:_popover.shown);}
|
||||
- (BOOL)visible{return !_closed&&((_remoteMode||_detached)?_visible:_popover.shown);}
|
||||
- (void)showInRemoteParent:(NSView *)parent close:(void (^)(void))closeAction{
|
||||
if(_closed||!parent||self.visible)return;
|
||||
_remoteMode=YES;_visible=YES;[_closeAction release];_closeAction=[closeAction copy];
|
||||
self.window.contentView=[[[NSView alloc]initWithFrame:NSMakeRect(0,0,1,1)]autorelease];
|
||||
[_root removeFromSuperview];_root.frame=parent.bounds;_root.autoresizingMask=NSViewWidthSizable|NSViewHeightSizable;parent.autoresizesSubviews=YES;_root.hidden=NO;
|
||||
[parent addSubview:_root];[self layoutBrowser];[_root setNeedsDisplay:YES];
|
||||
// The SDK reads the first child size as soon as its reply returns.
|
||||
// Restore geometry only after that first synchronous attachment is complete.
|
||||
dispatch_async(dispatch_get_main_queue(),^{if(!_closed)[self configurePresentationWindow];});
|
||||
NSAccessibilityPostNotification(parent,NSAccessibilityLayoutChangedNotification);
|
||||
}
|
||||
- (void)configurePresentationWindow{
|
||||
NSWindow *window=_root.window;if(!window||window==self.window)return;
|
||||
if(_presentationWindow!=window){[_presentationWindow release];_presentationWindow=[window retain];
|
||||
for(NSNotificationName name in @[NSWindowDidMoveNotification,NSWindowDidResizeNotification])[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(presentationGeometryChanged:) name:name object:window];
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(presentationWindowClosed:) name:NSWindowWillCloseNotification object:window];
|
||||
}
|
||||
window.title=@"风格 LUT";window.contentMinSize=self.class.minimumContentSize;window.contentMaxSize=self.class.maximumContentSize;
|
||||
if(_detached)window.styleMask|=NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMaskResizable;
|
||||
NSString *saved=[NSUserDefaults.standardUserDefaults stringForKey:DYBrowserPreference(DYBrowserFramePreference,_library)];
|
||||
NSRect frame=saved?NSRectFromString(saved):[window frameRectForContentRect:(NSRect){window.frame.origin,self.class.preferredContentSize}];
|
||||
if(std::isfinite(frame.origin.x)&&std::isfinite(frame.origin.y)&&std::isfinite(frame.size.width)&&std::isfinite(frame.size.height)&&frame.size.width>=720&&frame.size.height>=420){
|
||||
NSRect screen=(window.screen?:NSScreen.mainScreen).visibleFrame;frame.size.width=MIN(MAX(720,frame.size.width),MIN(1800,screen.size.width));frame.size.height=MIN(MAX(448,frame.size.height),MIN(1228,screen.size.height));
|
||||
frame.origin.x=MAX(NSMinX(screen),MIN(frame.origin.x,NSMaxX(screen)-frame.size.width));frame.origin.y=MAX(NSMinY(screen),MIN(frame.origin.y,NSMaxY(screen)-frame.size.height));[window setFrame:frame display:YES];
|
||||
}
|
||||
[self layoutBrowser];
|
||||
}
|
||||
- (void)presentationGeometryChanged:(NSNotification *)notification{
|
||||
if(_closed||!_presentationWindow)return;NSRect frame=_presentationWindow.frame;
|
||||
if(std::isfinite(frame.size.width)&&std::isfinite(frame.size.height)&&frame.size.width>=720&&frame.size.height>=420)[NSUserDefaults.standardUserDefaults setObject:NSStringFromRect(frame) forKey:DYBrowserPreference(DYBrowserFramePreference,_library)];
|
||||
[self layoutBrowser];
|
||||
}
|
||||
- (void)presentationWindowClosed:(NSNotification *)notification{[self finishClosing];}
|
||||
- (BOOL)popoverShouldDetach:(NSPopover *)popover{return YES;}
|
||||
- (void)popoverDidDetach:(NSPopover *)popover{_detached=YES;_visible=YES;[self configurePresentationWindow];}
|
||||
- (void)browserRootResized:(NSNotification *)notification{if(!_closed)[self layoutBrowser];}
|
||||
- (void)windowDidResize:(NSNotification *)notification{[self layoutBrowser];}
|
||||
- (void)windowWillClose:(NSNotification *)notification{[self finishClosing];}
|
||||
- (BOOL)popoverShouldClose:(NSPopover *)popover{return !_importing;}
|
||||
- (void)popoverDidClose:(NSNotification *)notification{[self finishClosing];}
|
||||
- (void)popoverDidClose:(NSNotification *)notification{if([notification.userInfo[NSPopoverCloseReasonKey]isEqual:NSPopoverCloseReasonDetachToWindow])return;[self finishClosing];}
|
||||
- (void)close{
|
||||
if(_closed)return;
|
||||
if(_popover.shown){[_popover close];if(!_closed)[self finishClosing];}
|
||||
if(_detached&&_presentationWindow){[_presentationWindow performClose:nil];if(!_closed)[self finishClosing];}
|
||||
else if(_popover.shown){[_popover close];if(!_closed)[self finishClosing];}
|
||||
else [self finishClosing];
|
||||
}
|
||||
- (void)finishClosing{
|
||||
@@ -232,25 +280,32 @@ static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *b
|
||||
}
|
||||
- (void)layoutBrowser{
|
||||
if(_layingOut)return;_layingOut=YES;
|
||||
CGFloat w=_root.bounds.size.width,h=_root.bounds.size.height,left=162;
|
||||
_titleLabel.frame=NSMakeRect(12,15,145,20);_countLabel.frame=NSMakeRect(12,39,145,18);
|
||||
_search.frame=NSMakeRect(left+14,14,MAX(125,w-left-351),24);
|
||||
_importFiles.frame=NSMakeRect(w-322,12,100,28);_importFolder.frame=NSMakeRect(w-218,12,113,28);_refresh.frame=NSMakeRect(w-101,12,82,28);
|
||||
_folderScroll.frame=NSMakeRect(12,66,150,MAX(80,h-121));_gridScroll.frame=NSMakeRect(left+12,50,MAX(80,w-left-26),MAX(80,h-105));
|
||||
_reveal.frame=NSMakeRect(14,h-44,left-23,27);_none.frame=NSMakeRect(left+13,h-44,75,27);
|
||||
_sizeLabel.frame=NSMakeRect(left+101,h-39,74,18);_sizeSlider.frame=NSMakeRect(left+173,h-41,MAX(70,MIN(150,w-left-420)),20);
|
||||
CGFloat w=_root.bounds.size.width,h=_root.bounds.size.height;
|
||||
_titleLabel.frame=NSMakeRect(14,12,160,20);_countLabel.frame=NSMakeRect(180,14,120,18);
|
||||
_search.frame=NSMakeRect(14,46,MAX(125,w-350),24);
|
||||
_importFiles.frame=NSMakeRect(w-322,44,100,28);_importFolder.frame=NSMakeRect(w-218,44,113,28);_refresh.frame=NSMakeRect(w-101,44,82,28);
|
||||
_splitView.frame=NSMakeRect(12,80,MAX(400,w-24),MAX(140,h-135));[_splitView adjustSubviews];
|
||||
CGFloat sidebar=MAX(128,MIN(_sidebarWidth,MIN(360,_splitView.bounds.size.width*.45)));[_splitView setPosition:sidebar ofDividerAtIndex:0];
|
||||
_reveal.frame=NSMakeRect(w-153,9,139,27);_none.frame=NSMakeRect(14,h-44,75,27);_layoutMenu.frame=NSMakeRect(100,h-44,97,27);
|
||||
_sizeLabel.frame=NSMakeRect(211,h-39,74,18);_sizeSlider.frame=NSMakeRect(288,h-41,MIN(150,MAX(80,w-550)),20);
|
||||
_done.frame=NSMakeRect(w-98,h-44,78,27);
|
||||
CGFloat statusX=NSMaxX(_sizeSlider.frame)+14;_statusLabel.frame=NSMakeRect(statusX,h-39,MAX(0,w-statusX-112),18);
|
||||
CGFloat fw=MAX(100,_folderScroll.contentSize.width);
|
||||
_folderDocument.frame=NSMakeRect(0,0,fw,MAX(_folderPaths.count*35+4,_folderScroll.contentSize.height));
|
||||
[self updateVisibleFolders];
|
||||
CGFloat available=MAX(80,_gridScroll.contentSize.width),tileWidth=_sizeSlider.doubleValue,gap=10;
|
||||
NSInteger columns=MAX(1,(NSInteger)floor((available+gap)/(tileWidth+gap)));tileWidth=MIN(tileWidth,(available-gap*(columns-1)-14)/columns);tileWidth=MAX(70,tileWidth);
|
||||
_columns=columns;_tileWidth=tileWidth;_tileHeight=ceil(tileWidth*9/16)+24;
|
||||
BOOL list=_layoutMenu.indexOfSelectedItem==1;NSInteger columns=list?1:MAX(1,(NSInteger)floor((available+gap)/(tileWidth+gap)));tileWidth=list?MAX(110,available-14):MIN(tileWidth,(available-gap*(columns-1)-14)/columns);tileWidth=MAX(70,tileWidth);
|
||||
_columns=columns;_tileWidth=tileWidth;_tileHeight=list?70:ceil(tileWidth*9/16)+24;
|
||||
NSInteger rows=(_visibleEntries.count+columns-1)/columns;CGFloat contentHeight=MAX(_gridScroll.contentSize.height,rows*(_tileHeight+gap)+12);
|
||||
_gridDocument.frame=NSMakeRect(0,0,available,contentHeight);_emptyLabel.frame=NSMakeRect(20,MAX(36,_gridScroll.contentSize.height/2-45),MAX(50,available-40),90);
|
||||
_layingOut=NO;[self updateVisibleTiles];
|
||||
}
|
||||
- (CGFloat)splitView:(NSSplitView *)split constrainMinCoordinate:(CGFloat)proposed ofSubviewAt:(NSInteger)index{return 128;}
|
||||
- (CGFloat)splitView:(NSSplitView *)split constrainMaxCoordinate:(CGFloat)proposed ofSubviewAt:(NSInteger)index{return MIN(360,split.bounds.size.width*.45);}
|
||||
- (void)splitViewDidResizeSubviews:(NSNotification *)notification{
|
||||
if(_closed||_layingOut)return;_sidebarWidth=_folderScroll.frame.size.width;[NSUserDefaults.standardUserDefaults setDouble:_sidebarWidth forKey:DYBrowserPreference(DYBrowserSidebarPreference,_library)];[self layoutBrowser];
|
||||
}
|
||||
- (void)layoutChanged:(id)sender{[NSUserDefaults.standardUserDefaults setInteger:_layoutMenu.indexOfSelectedItem forKey:DYBrowserPreference(DYBrowserLayoutPreference,_library)];[self layoutBrowser];}
|
||||
- (void)resetThumbnailWork {
|
||||
_work.cancelled=YES;_work.owner=nil;[_work release];_work=[DYBrowserWork new];_work.owner=self;[_queuedPaths removeAllObjects];
|
||||
}
|
||||
@@ -263,7 +318,7 @@ static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *b
|
||||
for(NSUInteger i=first;i<end;i++){
|
||||
NSDictionary *entry=_visibleEntries[i];NSString *path=entry[@"path"];[wanted addObject:path];DYBrowserTile *tile=_tiles[path];
|
||||
if(!tile){tile=[[[DYBrowserTile alloc]initWithFrame:NSZeroRect]autorelease];tile.identifier=path;tile.displayName=entry[@"name"];tile.toolTip=entry[@"relativePath"]?:path;tile.palette=_palette;tile.chosen=[path isEqualToString:_selectedPath];tile.target=self;tile.action=@selector(thumbnailClicked:);tile.enabled=YES;[_gridDocument addSubview:tile];_tiles[path]=tile;changed=YES;}
|
||||
tile.frame=NSMakeRect(7+(i%_columns)*(_tileWidth+10),8+(i/_columns)*step,_tileWidth,_tileHeight);
|
||||
tile.listLayout=_layoutMenu.indexOfSelectedItem==1;tile.frame=NSMakeRect(7+(i%_columns)*(_tileWidth+10),8+(i/_columns)*step,_tileWidth,_tileHeight);
|
||||
}
|
||||
for(NSString *path in _tiles.allKeys)if(![wanted containsObject:path]){[_tiles[path]removeFromSuperview];[_tiles removeObjectForKey:path];changed=YES;}
|
||||
if(changed||!_work)[self resetThumbnailWork];
|
||||
@@ -277,7 +332,7 @@ static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *b
|
||||
self.window.backgroundColor=DYBrowserColor(_palette,@"background");self.window.appearance=[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
|
||||
_root.appearance=[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
|
||||
for(NSTextField *label in @[_titleLabel,_countLabel,_statusLabel,_sizeLabel,_emptyLabel])label.textColor=DYBrowserColor(_palette,label==_titleLabel?@"text":@"secondary");
|
||||
for(NSButton *button in @[_importFiles,_importFolder,_reveal,_refresh,_none,_done])button.contentTintColor=DYBrowserColor(_palette,@"accent");
|
||||
for(NSButton *button in @[_importFiles,_importFolder,_reveal,_refresh,_none,_done,_layoutMenu])button.contentTintColor=DYBrowserColor(_palette,@"accent");
|
||||
_search.textColor=DYBrowserColor(_palette,@"text");_search.backgroundColor=DYBrowserColor(_palette,@"field");
|
||||
for(DYBrowserFolderButton *button in _folderButtons){button.palette=_palette;[button setNeedsDisplay:YES];}
|
||||
for(DYBrowserTile *tile in _tiles.allValues){tile.palette=_palette;[tile setNeedsDisplay:YES];}
|
||||
@@ -292,7 +347,7 @@ static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *b
|
||||
}
|
||||
- (void)setStatus:(NSString *)status{_statusLabel.stringValue=status?:@"";_statusLabel.toolTip=status;}
|
||||
- (void)rebuildFolders{
|
||||
NSMutableArray *paths=[NSMutableArray arrayWithObject:@"*"];NSMutableSet *seen=[NSMutableSet setWithObject:@"*"];
|
||||
NSMutableArray *paths=[NSMutableArray arrayWithObjects:DYBrowserRecentFolder,@"*",nil];NSMutableSet *seen=[NSMutableSet setWithArray:paths];
|
||||
for(NSString *folder in _library.folders){NSString *top=folder.length?[folder componentsSeparatedByString:@"/"].firstObject:@"";if(![seen containsObject:top]){[paths addObject:top];[seen addObject:top];}}
|
||||
if(![seen containsObject:_folder]){[_folder release];_folder=[@"*" copy];}
|
||||
[_folderPaths release];_folderPaths=[paths copy];[self updateVisibleFolders];
|
||||
@@ -306,7 +361,7 @@ static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *b
|
||||
for(NSUInteger i=first;i<end;i++){
|
||||
NSString *path=_folderPaths[i];DYBrowserFolderButton *button=existing[path];
|
||||
if(!button){button=[[[DYBrowserFolderButton alloc]initWithFrame:NSZeroRect]autorelease];button.bordered=NO;button.target=self;button.action=@selector(folderClicked:);button.identifier=path;
|
||||
button.title=[path isEqualToString:@"*"]?@"全部 LUT":path.length?[@"▸ " stringByAppendingString:path]:@"未分类";button.toolTip=path.length?path:_library.rootURL.path;button.palette=_palette;button.accessibilityLabel=[@"LUT 文件夹:" stringByAppendingString:button.title];[_folderDocument addSubview:button];}
|
||||
button.title=[path isEqual:DYBrowserRecentFolder]?@"最近使用":[path isEqualToString:@"*"]?@"全部 LUT":path.length?[@"▸ " stringByAppendingString:path]:@"未分类";button.toolTip=path.length?path:_library.rootURL.path;button.palette=_palette;button.accessibilityLabel=[@"LUT 文件夹:" stringByAppendingString:button.title];[_folderDocument addSubview:button];}
|
||||
button.chosen=[path isEqualToString:_folder];button.frame=NSMakeRect(4,4+i*35,MAX(92,_folderScroll.contentSize.width-8),33);[button setNeedsDisplay:YES];[buttons addObject:button];
|
||||
}
|
||||
for(NSButton *button in _folderButtons)if(![buttons containsObject:button])[button removeFromSuperview];[_folderButtons setArray:buttons];
|
||||
@@ -334,14 +389,14 @@ static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *b
|
||||
}
|
||||
- (void)folderClicked:(NSButton *)sender{
|
||||
[_folder release];_folder=[sender.identifier copy];
|
||||
[[NSUserDefaults standardUserDefaults]setObject:_folder forKey:DYBrowserFolderPreference];
|
||||
[[NSUserDefaults standardUserDefaults]setObject:_folder forKey:DYBrowserPreference(DYBrowserFolderPreference,_library)];
|
||||
for(DYBrowserFolderButton *button in _folderButtons){button.chosen=[button.identifier isEqualToString:_folder];[button setNeedsDisplay:YES];}
|
||||
[self rebuildGrid];
|
||||
}
|
||||
- (void)searchChanged:(id)sender{[self rebuildGrid];}
|
||||
- (void)controlTextDidChange:(NSNotification *)notification{if(notification.object==_search)[self rebuildGrid];}
|
||||
- (void)sizeChanged:(id)sender{
|
||||
[[NSUserDefaults standardUserDefaults]setDouble:_sizeSlider.doubleValue forKey:DYBrowserSizePreference];
|
||||
[[NSUserDefaults standardUserDefaults]setDouble:_sizeSlider.doubleValue forKey:DYBrowserPreference(DYBrowserSizePreference,_library)];
|
||||
_sizing=YES;[self layoutBrowser];
|
||||
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(refreshThumbnailSize) object:nil];
|
||||
[self performSelector:@selector(refreshThumbnailSize) withObject:nil afterDelay:.22];
|
||||
@@ -384,11 +439,14 @@ static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *b
|
||||
[self resetThumbnailWork];
|
||||
for(NSView *tile in _tiles.allValues)[tile removeFromSuperview];[_tiles removeAllObjects];
|
||||
NSString *query=[_search.stringValue stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet];NSMutableArray *entries=[NSMutableArray array];
|
||||
for(NSDictionary *entry in _library.entries){
|
||||
BOOL recent=[_folder isEqual:DYBrowserRecentFolder];NSArray *history=_library.recentPaths;
|
||||
for(NSDictionary *entry in (recent?_library.recentEntries:_library.entries)){
|
||||
NSString *folder=entry[@"relativeFolder"]?:@"";
|
||||
BOOL folderMatch=[_folder isEqualToString:@"*"]||[folder isEqualToString:_folder]||(_folder.length&&[folder hasPrefix:[_folder stringByAppendingString:@"/"]]);
|
||||
BOOL folderMatch=recent||[_folder isEqualToString:@"*"]||[folder isEqualToString:_folder]||(_folder.length&&[folder hasPrefix:[_folder stringByAppendingString:@"/"]]);
|
||||
if(folderMatch&&(!query.length||[entry[@"name"]localizedCaseInsensitiveContainsString:query]||[entry[@"relativePath"]localizedCaseInsensitiveContainsString:query]))[entries addObject:entry];
|
||||
}
|
||||
if(!recent)[entries sortUsingComparator:^NSComparisonResult(NSDictionary *a,NSDictionary *b){NSUInteger i=[history indexOfObject:a[@"path"]],j=[history indexOfObject:b[@"path"]];if(i==j)return [a[@"relativePath"]localizedStandardCompare:b[@"relativePath"]];return i<j?NSOrderedAscending:NSOrderedDescending;}];
|
||||
_emptyLabel.stringValue=recent?@"尚未使用 LUT。成功应用后会在这里按最近使用排序。":@"此文件夹还没有 LUT。\n点“导入文件”或“导入文件夹”添加 .cube 文件。";
|
||||
[_visibleEntries release];_visibleEntries=[entries copy];_countLabel.stringValue=[NSString stringWithFormat:@"%lu 个 LUT",(unsigned long)entries.count];_emptyLabel.hidden=entries.count>0;
|
||||
[_gridScroll.contentView scrollToPoint:NSZeroPoint];[self layoutBrowser];[_gridScroll reflectScrolledClipView:_gridScroll.contentView];
|
||||
NSAccessibilityPostNotification(_gridDocument,NSAccessibilityLayoutChangedNotification);
|
||||
@@ -400,7 +458,7 @@ static NSButton *BrowserButton(NSString *title,id target,SEL action){NSButton *b
|
||||
void (^applied)(NSError *)=^(NSError *error){
|
||||
if(_closed||generation!=_selectionGeneration)return;[_selectionTask release];_selectionTask=nil;
|
||||
if(error){[self setStatus:error.localizedDescription];return;}
|
||||
[_selectedPath release];_selectedPath=[path copy];
|
||||
[_selectedPath release];_selectedPath=[path copy];[_library recordUsedPath:path];[self rebuildGrid];
|
||||
for(DYBrowserTile *tile in _tiles.allValues){tile.chosen=[tile.identifier isEqualToString:path];[tile setNeedsDisplay:YES];}
|
||||
[self setStatus:[@"已选择 " stringByAppendingString:name]];if(closeAfter)[self close];
|
||||
};
|
||||
|
||||
@@ -48,6 +48,10 @@ FOUNDATION_EXPORT NSImage * _Nullable DYLUTThumbnail(NSString * _Nullable path,
|
||||
/// Relative folder names, including the root empty string; sorted naturally.
|
||||
@property(nonatomic,readonly,copy) NSArray<NSString *> *folders;
|
||||
@property(nonatomic,readonly,copy) NSSet<NSString *> *favoritePaths;
|
||||
/// Most recently acknowledged applications, newest first, scoped to this library.
|
||||
@property(nonatomic,readonly,copy) NSArray<NSString *> *recentPaths;
|
||||
@property(nonatomic,readonly,copy) NSArray<NSDictionary<NSString *,NSString *> *> *recentEntries;
|
||||
- (void)recordUsedPath:(NSString *)path;
|
||||
+ (NSURL *)defaultRootURL;
|
||||
- (instancetype)init;
|
||||
- (instancetype)initWithRootURL:(NSURL *)rootURL NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
@@ -373,6 +373,33 @@ static BOOL DYLUTEnsureDirectory(NSURL *directory,NSURL *root,NSError **error) {
|
||||
- (NSArray *)entries {@synchronized(self){return [[_entries copy]autorelease];}}
|
||||
- (NSArray *)folders {@synchronized(self){return [[_folders copy]autorelease];}}
|
||||
- (NSSet *)favoritePaths {@synchronized(self){return [[_favoritePaths copy]autorelease];}}
|
||||
- (NSString *)recentPreferenceKey {return [@"com.dayu.color.lookLUTPreview.recentPaths|" stringByAppendingString:_rootURL.path];}
|
||||
- (NSArray *)recentPaths {
|
||||
id saved=[[NSUserDefaults standardUserDefaults]objectForKey:[self recentPreferenceKey]];
|
||||
NSMutableArray *paths=[NSMutableArray array];
|
||||
if([saved isKindOfClass:NSArray.class])for(id path in saved){
|
||||
if([path isKindOfClass:NSString.class]&&[path isAbsolutePath]&&[[path pathExtension]caseInsensitiveCompare:@"cube"]==NSOrderedSame&&![paths containsObject:path])[paths addObject:path];
|
||||
if(paths.count==40)break;
|
||||
}
|
||||
return [[paths copy]autorelease];
|
||||
}
|
||||
- (NSArray *)recentEntries {
|
||||
NSMutableDictionary *known=[NSMutableDictionary dictionary];for(NSDictionary *entry in self.entries)known[entry[@"path"]]=entry;
|
||||
NSMutableArray *entries=[NSMutableArray array];for(NSString *path in self.recentPaths){
|
||||
NSDictionary *entry=known[path];
|
||||
if(!entry)entry=@{@"name":path.lastPathComponent.stringByDeletingPathExtension,@"path":path,@"relativePath":path,@"relativeFolder":@""};
|
||||
[entries addObject:entry];
|
||||
}
|
||||
return [[entries copy]autorelease];
|
||||
}
|
||||
- (void)recordUsedPath:(NSString *)path {
|
||||
if(![path isKindOfClass:NSString.class]||!path.isAbsolutePath||[path.pathExtension caseInsensitiveCompare:@"cube"]!=NSOrderedSame)return;
|
||||
@synchronized(NSUserDefaults.class){
|
||||
NSArray *saved=self.recentPaths;NSMutableArray *next=[[saved mutableCopy]autorelease];[next removeObject:path];[next insertObject:path atIndex:0];
|
||||
if(next.count>40)[next removeObjectsInRange:NSMakeRange(40,next.count-40)];
|
||||
if(![next isEqual:saved])[[NSUserDefaults standardUserDefaults]setObject:next forKey:[self recentPreferenceKey]];
|
||||
}
|
||||
}
|
||||
- (BOOL)reload:(NSError **)error {return [self reloadProgress:nil error:error];}
|
||||
- (BOOL)reloadProgress:(NSProgress *)progress error:(NSError **)error {@synchronized(_fileLock){
|
||||
BOOL isDirectory=NO;NSFileManager *fm=NSFileManager.defaultManager;
|
||||
|
||||
@@ -12,8 +12,12 @@ FOUNDATION_EXPORT void DYReadUniforms(id<PROAPIAccessing> manager,CMTime time,DY
|
||||
|
||||
@interface DYAssetState : NSObject<NSSecureCoding,NSCopying,FxCustomParameterInterpolation_v2>
|
||||
@property(copy) NSDictionary *paths;
|
||||
@property(nonatomic,copy) NSData *spiderMesh;
|
||||
@property BOOL spiderLinked;
|
||||
@end
|
||||
@interface DYInspectorToken : NSObject<NSSecureCoding,NSCopying,FxCustomParameterInterpolation_v2>
|
||||
@property(copy) NSDictionary *folds;
|
||||
@property NSInteger schema;
|
||||
@end
|
||||
FOUNDATION_EXPORT DYAssetState *DYReadAssets(id<PROAPIAccessing> manager,CMTime time);
|
||||
FOUNDATION_EXPORT BOOL DYWriteAssets(id<PROAPIAccessing> manager,DYAssetState *assets,CMTime time);
|
||||
+125
-17
@@ -1,5 +1,6 @@
|
||||
#import "DYModel.h"
|
||||
#include <cmath>
|
||||
#include "DYSpiderState.h"
|
||||
NSString *const DYModelChanged=@"DYModelChanged";
|
||||
static NSMutableArray *sections,*descriptors;
|
||||
static UInt32 PID(NSUInteger offset){return 2000+(UInt32)offset/4;}
|
||||
@@ -7,16 +8,116 @@ static NSDictionary *row(NSString*k,NSString*t,NSUInteger o,double lo,double hi,
|
||||
NSMutableDictionary*r=[@{@"key":k,@"title":t,@"pid":@(PID(o)),@"offset":@(o),@"min":@(lo),@"max":@(hi),@"default":@(d),@"step":@(hi-lo>10?1:.01),@"kind":kind?:@"float"}mutableCopy];
|
||||
[descriptors addObject:r];return [r autorelease];
|
||||
}
|
||||
static void section(NSString*k,NSString*t,NSUInteger offset,NSArray*rows,double def=0){
|
||||
static void section(NSString*k,NSString*t,NSUInteger offset,NSArray*rows,double def=1){
|
||||
NSDictionary*e=row([k stringByAppendingString:@"Enabled"],t,offset,0,1,def,@"bool");
|
||||
[sections addObject:@{@"key":k,@"title":t,@"enabled":e[@"pid"],@"defaultEnabled":@(def),@"rows":rows}];
|
||||
}
|
||||
static NSDictionary *scalar(NSString*k,NSString*t,NSUInteger o,double lo=-100,double hi=100,double def=0){return row(k,t,o,lo,hi,def,@"float");}
|
||||
NSArray<NSDictionary *> *DYCMSceneSpaces(void) { return @[
|
||||
@{ @"id":@99, @"name":@"KOLOR Default" },
|
||||
@{ @"id":@1, @"name":@"ACEScct" },
|
||||
@{ @"id":@2, @"name":@"Apple Log" },
|
||||
@{ @"id":@3, @"name":@"Apple Log 2" },
|
||||
@{ @"id":@4, @"name":@"ARRI LogC3" },
|
||||
@{ @"id":@5, @"name":@"ARRI LogC4" },
|
||||
@{ @"id":@6, @"name":@"Blackmagic Film Gen 5" },
|
||||
@{ @"id":@7, @"name":@"Canon C-Log" },
|
||||
@{ @"id":@8, @"name":@"Canon C-Log 2" },
|
||||
@{ @"id":@9, @"name":@"Canon C-Log 3" },
|
||||
@{ @"id":@10, @"name":@"DaVinci Intermediate" },
|
||||
@{ @"id":@11, @"name":@"DJI D-Log" },
|
||||
@{ @"id":@12, @"name":@"DJI D-Log 2" },
|
||||
@{ @"id":@13, @"name":@"DJI D-Log M" },
|
||||
@{ @"id":@14, @"name":@"Fujifilm F-Log" },
|
||||
@{ @"id":@15, @"name":@"Fujifilm F-Log2" },
|
||||
@{ @"id":@16, @"name":@"Fujifilm F-Log2 C" },
|
||||
@{ @"id":@17, @"name":@"GoPro GP-Log" },
|
||||
@{ @"id":@18, @"name":@"GoPro GP-Log2" },
|
||||
@{ @"id":@30, @"name":@"GoPro GP-Log2 (Official, 0 EV)" },
|
||||
@{ @"id":@29, @"name":@"Insta I-Log" },
|
||||
@{ @"id":@19, @"name":@"Leica L-Log" },
|
||||
@{ @"id":@20, @"name":@"Linear" },
|
||||
@{ @"id":@21, @"name":@"Nikon N-Log" },
|
||||
@{ @"id":@22, @"name":@"Panasonic V-Log" },
|
||||
@{ @"id":@23, @"name":@"Phantom Log 1" },
|
||||
@{ @"id":@24, @"name":@"Phantom Log 2" },
|
||||
@{ @"id":@25, @"name":@"REDLog3G10" },
|
||||
@{ @"id":@26, @"name":@"Samsung Log" },
|
||||
@{ @"id":@27, @"name":@"Sony S-Log2" },
|
||||
@{ @"id":@28, @"name":@"Sony S-Log3" }
|
||||
]; }
|
||||
NSArray<NSDictionary *> *DYCMDisplaySpaces(void) { return @[
|
||||
@{ @"id":@1001, @"name":@"Gamma 2.2" },
|
||||
@{ @"id":@1002, @"name":@"Gamma 2.4" },
|
||||
@{ @"id":@1003, @"name":@"Gamma 2.6" }
|
||||
]; }
|
||||
NSArray<NSDictionary *> *DYCMGamuts(void) { return @[
|
||||
@{ @"id":@99, @"name":@"KOLOR Default" },
|
||||
@{ @"id":@1, @"name":@"ACES AP0" },
|
||||
@{ @"id":@2, @"name":@"ACES AP1" },
|
||||
@{ @"id":@3, @"name":@"Apple Log 2" },
|
||||
@{ @"id":@4, @"name":@"ARRI WG3" },
|
||||
@{ @"id":@5, @"name":@"ARRI WG4" },
|
||||
@{ @"id":@6, @"name":@"Blackmagic Wide Gamut" },
|
||||
@{ @"id":@7, @"name":@"Canon Cinema Gamut" },
|
||||
@{ @"id":@16, @"name":@"DaVinci Wide Gamut" },
|
||||
@{ @"id":@8, @"name":@"DJI Action 5" },
|
||||
@{ @"id":@9, @"name":@"DJI Air 2S" },
|
||||
@{ @"id":@10, @"name":@"DJI D-Gamut" },
|
||||
@{ @"id":@28, @"name":@"DJI D-Gamut 2" },
|
||||
@{ @"id":@11, @"name":@"DJI Mavic2 Pro" },
|
||||
@{ @"id":@12, @"name":@"DJI Mavic 3 Pro" },
|
||||
@{ @"id":@13, @"name":@"DJI Mini 4 Pro" },
|
||||
@{ @"id":@14, @"name":@"DJI Mini 5 Pro" },
|
||||
@{ @"id":@15, @"name":@"DJI Pocket 3" },
|
||||
@{ @"id":@17, @"name":@"Fujifilm F-GamutC" },
|
||||
@{ @"id":@18, @"name":@"GoPro GP-Log" },
|
||||
@{ @"id":@19, @"name":@"P3-DCI" },
|
||||
@{ @"id":@20, @"name":@"P3 D65" },
|
||||
@{ @"id":@21, @"name":@"Panasonic V-Gamut" },
|
||||
@{ @"id":@22, @"name":@"Rec.709 / BT.709" },
|
||||
@{ @"id":@23, @"name":@"Rec.2020 / BT.2020" },
|
||||
@{ @"id":@24, @"name":@"RED Wide Gamut RGB" },
|
||||
@{ @"id":@25, @"name":@"Sony S-Gamut" },
|
||||
@{ @"id":@26, @"name":@"Sony S-Gamut3" },
|
||||
@{ @"id":@27, @"name":@"Sony S-Gamut3.Cine" }
|
||||
]; }
|
||||
|
||||
static NSDictionary *cmRow(NSString*k,NSString*t,NSUInteger o,double lo,double hi,double def,int tab,NSArray *choices=nil){
|
||||
NSMutableDictionary *d=[[row(k,t,offsetof(DYUniforms,cm)+o,lo,hi,def,choices?@"popup":@"float")mutableCopy]autorelease];d[@"cmTab"]=@(tab);
|
||||
if(choices){d[@"notAnimatable"]=@YES;d[@"options"]=[choices valueForKey:@"name"];d[@"values"]=[choices valueForKey:@"id"];}
|
||||
[descriptors replaceObjectAtIndex:descriptors.count-1 withObject:d];return d;
|
||||
}
|
||||
static void initialize(){static dispatch_once_t once;dispatch_once(&once,^{
|
||||
sections=[[NSMutableArray alloc]init];descriptors=[[NSMutableArray alloc]init];
|
||||
NSMutableDictionary*profile=[[scalar(@"inputProfile",@"相机输入",52,0,17)mutableCopy]autorelease];profile[@"kind"]=@"popup";profile[@"options"]=@[@"无",@"Apple Log",@"ARRI LogC3",@"ARRI LogC4",@"Blackmagic Film Gen5",@"Canon C-Log",@"Canon C-Log2",@"Canon C-Log3",@"DJI D-Log",@"DJI D-Log M",@"Fujifilm F-Log",@"Fujifilm F-Log2",@"Nikon N-Log",@"Panasonic V-Log",@"RED Log3G10",@"Sony S-Log2",@"Sony S-Log3",@"Sony HLG"];
|
||||
[descriptors replaceObjectAtIndex:0 withObject:profile];
|
||||
section(@"input",@"输入 / LUT",132,@[profile,scalar(@"preLUTStrength",@"输入强度",56,0,1,1)]);
|
||||
// Legacy IDs remain registered for existing FCP documents and presets.
|
||||
scalar(@"preLUTStrength",@"旧版输入强度",56,0,1,1);
|
||||
row(@"cmConfigured",@"CST 配置版本",offsetof(DYUniforms,cm)+offsetof(DYCMSettings,configured),-1,1,0,@"bool");
|
||||
NSArray *transfers=[DYCMSceneSpaces() arrayByAddingObjectsFromArray:DYCMDisplaySpaces()];
|
||||
NSMutableArray *cm=[NSMutableArray array];
|
||||
#define CM(f,t,lo,hi,def,tab) [cm addObject:cmRow(@"cm" #f,t,offsetof(DYCMSettings,f),lo,hi,def,tab)]
|
||||
#define CH(f,t,def,tab,list) [cm addObject:cmRow(@"cm" #f,t,offsetof(DYCMSettings,f),0,1003,def,tab,list)]
|
||||
CM(inputEnabled,@"输入转换启用",0,1,1,0);
|
||||
CH(inputTransfer,@"输入曲线",28,0,transfers);CH(inputGamut,@"输入色域",27,0,DYCMGamuts());
|
||||
CH(workingTransfer,@"工作曲线",10,0,transfers);CH(workingGamut,@"工作色域",16,0,DYCMGamuts());
|
||||
CM(mix,@"CST 混合",0,1,1,0);
|
||||
CM(basisEnabled,@"一级调色启用",0,1,1,1);
|
||||
CM(exposure,@"一级曝光",-5,5,0,1);CM(balanceAngle,@"色彩平衡方向",0,360,0,1);CM(balanceStrength,@"色彩平衡强度",0,1,0,1);CM(saturation,@"一级饱和度",0,2,1,1);
|
||||
CM(contrast,@"一级对比度",-1,1,0,1);CM(pivot,@"对比度轴心",-3,3,0,1);CM(hiContrast,@"高光对比度",-1,1,0,1);CM(hiPivot,@"高光轴心",-1,1,0,1);CM(shadowContrast,@"阴影对比度",-1,1,0,1);CM(shadowPivot,@"阴影轴心",-1,1,0,1);
|
||||
CM(white,@"白点",.5,1.5,1,1);CM(shoulder,@"肩部压缩",0,1,.5,1);CM(highlights,@"一级高光",-1,1,0,1);CM(midtones,@"一级中间调",-1,1,0,1);CM(shadows,@"一级阴影",-1,1,0,1);CM(black,@"黑点",-1,1,0,1);CM(toe,@"趾部压缩",0,1,.5,1);CM(chromaMix,@"色度混合",0,1,.5,1);
|
||||
CM(bypassExposure,@"旁路一级曝光",0,1,0,1);CM(bypassBalance,@"旁路一级色彩",0,1,0,1);CM(bypassContrast,@"旁路一级对比",0,1,0,1);CM(bypassTone,@"旁路一级影调",0,1,0,1);
|
||||
CM(outputEnabled,@"输出转换启用",0,1,1,2);CH(outputTransfer,@"输出曲线",1002,2,transfers);CH(outputGamut,@"输出色域",22,2,DYCMGamuts());
|
||||
[cm addObject:cmRow(@"cmtoneMapping",@"自动色调映射",offsetof(DYCMSettings,toneMapping),0,1,0,2,@[@{@"id":@0,@"name":@"关闭"},@{@"id":@1,@"name":@"开启"}])];
|
||||
#undef CM
|
||||
#undef CH
|
||||
NSMutableArray *input=[NSMutableArray array],*primary=[NSMutableArray array],*output=[NSMutableArray array];
|
||||
for(NSDictionary *d in cm){NSString *key=d[@"key"];if([@[@"cminputEnabled",@"cmbasisEnabled",@"cmoutputEnabled"]containsObject:key])continue;[([d[@"cmTab"]intValue]==0?input:[d[@"cmTab"]intValue]==1?primary:output) addObject:d];}
|
||||
section(@"input",@"输入转换 / CST",132,input);
|
||||
// Enable descriptors already exist; do not register the same offset twice.
|
||||
[sections addObject:@{@"key":@"primary",@"title":@"一级调色",@"enabled":@(PID(offsetof(DYUniforms,cm)+offsetof(DYCMSettings,basisEnabled))),@"defaultEnabled":@1,@"rows":primary}];
|
||||
[sections addObject:@{@"key":@"output",@"title":@"输出转换 / CST",@"enabled":@(PID(offsetof(DYUniforms,cm)+offsetof(DYCMSettings,outputEnabled))),@"defaultEnabled":@1,@"rows":output}];
|
||||
NSMutableArray*base=[NSMutableArray array];
|
||||
NSArray*names=@[@"曝光",@"对比度",@"高光",@"阴影",@"白色色阶",@"黑色色阶",@"色温",@"色调",@"饱和度",@"鲜艳度",@"纹理",@"清晰度",@"去朦胧"];
|
||||
NSArray*keys=@[@"exposure",@"contrast",@"highlights",@"shadows",@"whites",@"blacks",@"temperature",@"tint",@"saturation",@"vibrance",@"texture",@"clarity",@"dehaze"];
|
||||
@@ -26,9 +127,11 @@ static void initialize(){static dispatch_once_t once;dispatch_once(&once,^{
|
||||
[descriptors replaceObjectAtIndex:[descriptors indexOfObjectPassingTest:^BOOL(id obj,NSUInteger idx,BOOL*stop){return [obj[@"key"]isEqual:keys[i]];}] withObject:r];[base addObject:r];
|
||||
}
|
||||
NSDictionary*copyAuto=@{@"key":@"copyAutoGrade",@"title":@"复制时自动调色",@"pid":@8800,@"offset":@(-1),@"min":@0,@"max":@1,@"default":@0,@"step":@1,@"kind":@"bool",@"notAnimatable":@YES};[descriptors addObject:copyAuto];
|
||||
row(@"primaryMasterEnabled",@"一级调色总开关",offsetof(DYUniforms,primarySectionEnabled),0,1,1,@"bool");
|
||||
section(@"spider",@"蜘蛛盘校色仪",offsetof(DYUniforms,spiderSectionEnabled),@[scalar(@"spiderMix",@"蜘蛛盘混合",offsetof(DYUniforms,spiderMix),0,1,1)]);
|
||||
section(@"base",@"基础调色",136,[[[base subarrayWithRange:NSMakeRange(0,6)]arrayByAddingObjectsFromArray:[base subarrayWithRange:NSMakeRange(10,3)]]arrayByAddingObject:copyAuto],1);
|
||||
section(@"color",@"白平衡与颜色",140,@[base[6],base[7],base[9],base[8]],1);
|
||||
section(@"skin",@"肤色保护",464,@[scalar(@"skinStrength",@"保护程度",468,0,100,60),scalar(@"skinHue",@"肤色色相",472,0,60,28)],0);
|
||||
section(@"skin",@"肤色保护",464,@[scalar(@"skinStrength",@"保护程度",468,0,100,60),scalar(@"skinHue",@"肤色色相",472,0,60,28)],1);
|
||||
NSMutableArray*look=[NSMutableArray arrayWithObject:scalar(@"postLUTStrength",@"风格 1 强度",60,0,1,1)];
|
||||
for(int i=0;i<4;i++){[look addObject:row([NSString stringWithFormat:@"look%dEnabled",i+2],[NSString stringWithFormat:@"风格 %d 启用",i+2],160+i*4,0,1,1,@"bool")];[look addObject:scalar([NSString stringWithFormat:@"look%dStrength",i+2],[NSString stringWithFormat:@"风格 %d 强度",i+2],64+i*4,0,1,1)];}
|
||||
section(@"look",@"风格 LUT",144,look);
|
||||
@@ -49,12 +152,14 @@ static void initialize(){static dispatch_once_t once;dispatch_once(&once,^{
|
||||
[grade addObject:scalar(@"gradingBlending",@"混合",404,0,100,50)];[grade addObject:scalar(@"gradingBalance",@"平衡",408)];section(@"grading",@"颜色分级",400,grade);
|
||||
NSMutableArray*prim=[NSMutableArray array];for(int c=0;c<3;c++)for(int a=0;a<2;a++)[prim addObject:scalar([NSString stringWithFormat:@"primary%d_%d",c,a],[NSString stringWithFormat:@"%@原色 %@",@[@"红",@"绿",@"蓝"][c],a?@"饱和度":@"色相"],484+c*8+a*4)];section(@"primaries",@"三原色",480,prim);
|
||||
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)];section(@"blackwhite",@"黑白混色",704,bw,0);
|
||||
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);
|
||||
});}
|
||||
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};}
|
||||
void DYReadUniforms(id<PROAPIAccessing>m,CMTime t,DYUniforms*u){DYDefaultUniforms(u);id<FxParameterRetrievalAPI_v6>g=[m apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];for(NSDictionary*r in DYDescriptors()){if([r[@"offset"]integerValue]<0)continue;double v=[r[@"default"]doubleValue];if([g getFloatValue:&v fromParameter:[r[@"pid"]unsignedIntValue] atTime:t]&&std::isfinite(v))*(float*)((uint8_t*)u+[r[@"offset"]unsignedIntegerValue])=fmin([r[@"max"]doubleValue],fmax([r[@"min"]doubleValue],v));}}
|
||||
void DYReadUniforms(id<PROAPIAccessing>m,CMTime t,DYUniforms*u){DYDefaultUniforms(u);id<FxParameterRetrievalAPI_v6>g=[m apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];for(NSDictionary*r in DYDescriptors()){if([r[@"offset"]integerValue]<0)continue;double v=[r[@"default"]doubleValue];if([g getFloatValue:&v fromParameter:[r[@"pid"]unsignedIntValue] atTime:t]&&std::isfinite(v)){if(r[@"values"]&&![r[@"values"]containsObject:@((int)llround(v))])v=[r[@"default"]doubleValue];*(float*)((uint8_t*)u+[r[@"offset"]unsignedIntegerValue])=fmin([r[@"max"]doubleValue],fmax([r[@"min"]doubleValue],v));}}NSObject<NSSecureCoding,NSCopying> *token=nil;[g getCustomParameterValue:&token fromParameter:DYInspectorParameterID atTime:t];
|
||||
if([token isKindOfClass:DYInspectorToken.class]&&[(DYInspectorToken*)token schema]<2){if(u->cm.configured<.5)u->cm.configured=-1;u->cm.blackWhiteMix=1;}
|
||||
}
|
||||
BOOL DYCreateParameters(id<PROAPIAccessing>m,NSError**error){id<FxParameterCreationAPI_v5>a=[m apiForProtocol:@protocol(FxParameterCreationAPI_v5)];BOOL ok=a!=nil;
|
||||
ok=[a addCustomParameterWithName:@"大鱼调色" parameterID:DYInspectorParameterID defaultValue:[[[DYInspectorToken alloc]init]autorelease] parameterFlags:kFxParameterFlag_CUSTOM_UI|kFxParameterFlag_USE_FULL_VIEW_WIDTH|kFxParameterFlag_DONT_DISPLAY_IN_DASHBOARD|kFxParameterFlag_NOT_ANIMATABLE]&&ok;
|
||||
for(NSDictionary*r in DYDescriptors())ok=[a addFloatSliderWithName:r[@"title"] parameterID:[r[@"pid"]unsignedIntValue] defaultValue:[r[@"default"]doubleValue] parameterMin:[r[@"min"]doubleValue] parameterMax:[r[@"max"]doubleValue] sliderMin:[r[@"min"]doubleValue] sliderMax:[r[@"max"]doubleValue] delta:[r[@"step"]doubleValue] parameterFlags:kFxParameterFlag_HIDDEN|([r[@"notAnimatable"]boolValue]?kFxParameterFlag_NOT_ANIMATABLE:0)]&&ok;
|
||||
@@ -62,23 +167,26 @@ BOOL DYCreateParameters(id<PROAPIAccessing>m,NSError**error){id<FxParameterCreat
|
||||
if(!ok&&error)*error=[NSError errorWithDomain:FxPlugErrorDomain code:kFxError_InvalidParameter userInfo:@{NSLocalizedDescriptionKey:@"无法创建大鱼调色参数"}];return ok;}
|
||||
@implementation DYAssetState
|
||||
+ (BOOL)supportsSecureCoding{return YES;}
|
||||
- (instancetype)init{if((self=[super init]))_paths=[@{}copy];return self;}
|
||||
- (void)dealloc{[_paths release];[super dealloc];}
|
||||
- (void)encodeWithCoder:(NSCoder*)c{[c encodeObject:_paths forKey:@"paths"];}
|
||||
- (instancetype)initWithCoder:(NSCoder*)c{if((self=[self init])){NSSet*s=[NSSet setWithObjects:NSDictionary.class,NSString.class,nil];NSDictionary*d=[c decodeObjectOfClasses:s forKey:@"paths"];if(d)self.paths=d;}return self;}
|
||||
- (id)copyWithZone:(NSZone*)z{DYAssetState*v=[[[self class]allocWithZone:z]init];v.paths=_paths;return v;}
|
||||
- (instancetype)init{if((self=[super init])){_paths=[@{}copy];_spiderLinked=YES;}return self;}
|
||||
- (void)dealloc{[_spiderMesh release];[_paths release];[super dealloc];}
|
||||
- (void)encodeWithCoder:(NSCoder*)c{[c encodeObject:_paths forKey:@"paths"];[c encodeObject:_spiderMesh forKey:@"spiderMesh"];[c encodeBool:_spiderLinked forKey:@"spiderLinked"];}
|
||||
- (instancetype)initWithCoder:(NSCoder*)c{if((self=[self init])){NSSet*s=[NSSet setWithObjects:NSDictionary.class,NSString.class,nil];NSDictionary*d=[c decodeObjectOfClasses:s forKey:@"paths"];if(d)self.paths=d;if([c containsValueForKey:@"spiderMesh"])self.spiderMesh=[c decodeObjectOfClass:NSData.class forKey:@"spiderMesh"];_spiderLinked=[c containsValueForKey:@"spiderLinked"]?[c decodeBoolForKey:@"spiderLinked"]:YES;}return self;}
|
||||
- (id)copyWithZone:(NSZone*)z{DYAssetState*v=[[[self class]allocWithZone:z]init];v.paths=_paths;v.spiderMesh=_spiderMesh;v.spiderLinked=_spiderLinked;return v;}
|
||||
- (id)interpolateBetween:(id)r withWeight:(float)w{return w<.5?[[self copy]autorelease]:[[r copy]autorelease];}
|
||||
- (BOOL)isEqual:(id)o{return [o isKindOfClass:self.class]&&[_paths isEqual:[o paths]];}
|
||||
- (NSUInteger)hash{return _paths.hash;}
|
||||
- (BOOL)isEqual:(id)o{return [o isKindOfClass:self.class]&&[_paths isEqual:[o paths]]&&[_spiderMesh?:[NSData data] isEqual:[o spiderMesh]?:[NSData data]]&&_spiderLinked==[o spiderLinked];}
|
||||
- (void)setSpiderMesh:(NSData *)data{if(data.length&&!DYSpiderMeshIsValid(data))return;if(_spiderMesh!=data){[_spiderMesh release];_spiderMesh=[data copy];}}
|
||||
- (NSUInteger)hash{return _paths.hash^_spiderMesh.hash^_spiderLinked;}
|
||||
@end
|
||||
@implementation DYInspectorToken
|
||||
+ (BOOL)supportsSecureCoding{return YES;}
|
||||
- (void)encodeWithCoder:(NSCoder*)c{[c encodeInt:1 forKey:@"schema"];}
|
||||
- (instancetype)initWithCoder:(NSCoder*)c{return [self init];}
|
||||
- (id)copyWithZone:(NSZone*)z{return [[[self class]allocWithZone:z]init];}
|
||||
- (instancetype)init{if((self=[super init])){_folds=[@{} copy];_schema=2;}return self;}
|
||||
- (void)dealloc{[_folds release];[super dealloc];}
|
||||
- (void)encodeWithCoder:(NSCoder*)c{[c encodeInteger:_schema forKey:@"schema"];[c encodeObject:_folds forKey:@"folds"];}
|
||||
- (instancetype)initWithCoder:(NSCoder*)c{if((self=[self init])){NSDictionary *v=[c containsValueForKey:@"folds"]?[c decodeObjectOfClasses:[NSSet setWithObjects:NSDictionary.class,NSString.class,NSNumber.class,nil] forKey:@"folds"]:nil;if(v)self.folds=v;_schema=[c decodeIntegerForKey:@"schema"];}return self;}
|
||||
- (id)copyWithZone:(NSZone*)z{DYInspectorToken *v=[[[self class]allocWithZone:z]init];v.folds=_folds;v.schema=_schema;return v;}
|
||||
- (id)interpolateBetween:(id)r withWeight:(float)w{return [[self copy]autorelease];}
|
||||
- (BOOL)isEqual:(id)o{return [o isKindOfClass:self.class];}
|
||||
- (NSUInteger)hash{return 1;}
|
||||
- (BOOL)isEqual:(id)o{return [o isKindOfClass:self.class]&&_schema==[o schema]&&[_folds isEqual:[o folds]];}
|
||||
- (NSUInteger)hash{return _folds.hash;}
|
||||
@end
|
||||
DYAssetState*DYReadAssets(id<PROAPIAccessing>m,CMTime t){DYAssetState*v=nil;id<FxParameterRetrievalAPI_v6>g=[m apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];[g getCustomParameterValue:&v fromParameter:DYAssetsParameterID atTime:t];return [v isKindOfClass:DYAssetState.class]?v:[[[DYAssetState alloc]init]autorelease];}
|
||||
BOOL DYWriteAssets(id<PROAPIAccessing>m,DYAssetState*v,CMTime t){id<FxParameterSettingAPI_v6>s=[m apiForProtocol:@protocol(FxParameterSettingAPI_v6)];return [s setCustomParameterValue:v toParameter:DYAssetsParameterID atTime:t];}
|
||||
@@ -0,0 +1,86 @@
|
||||
// Native spider geometry/gestures and CST wheel interaction are ported from
|
||||
// the recorded sibling source repositories; the adapter writes this host model.
|
||||
#include "DYSpiderDisc.inc.h"
|
||||
@interface DYSpiderPanel : DYFlippedView
|
||||
@property(nonatomic,assign) id<DYGraphicDelegate> delegate;
|
||||
- (void)setMesh:(NSData *)mesh linked:(BOOL)linked;
|
||||
@end
|
||||
@implementation DYSpiderPanel {
|
||||
DYSpiderDisc *_disc; NSPopUpButton *_hues,*_saturation; NSButton *_link;
|
||||
NSTextField *_status; BOOL _linked;
|
||||
}
|
||||
- (instancetype)initWithFrame:(NSRect)frame {
|
||||
if((self=[super initWithFrame:frame])){
|
||||
_linked=YES;_disc=[[DYSpiderDisc alloc]initWithFrame:NSZeroRect];[self addSubview:_disc];
|
||||
__block DYSpiderPanel *owner=self;
|
||||
_disc.changed=^(DYGrade g,NSData *pins){if(owner.delegate)[owner.delegate writeSpiderMesh:owner->_disc.meshData linked:owner->_linked];};
|
||||
_disc.gesture=^(BOOL begin){[owner.delegate graphicGesture:begin title:@"调整蜘蛛盘"];};
|
||||
_status=[DYLabel(@"拖动一点,同列自由点联动。⌘ 多选,Shift 固定,右键复位。",10)retain];_status.maximumNumberOfLines=2;[self addSubview:_status];
|
||||
_disc.selectionChanged=^(NSString *text){owner->_status.stringValue=text;};
|
||||
for(int axis=0;axis<2;axis++){
|
||||
NSPopUpButton *menu=[[NSPopUpButton alloc]initWithFrame:NSZeroRect pullsDown:NO];for(int n:{6,8,12,16,24}){[menu addItemWithTitle:[NSString stringWithFormat:@"%d",n]];menu.lastItem.tag=n;}
|
||||
menu.font=[NSFont systemFontOfSize:11];menu.target=self;menu.action=@selector(resolutionChanged:);menu.accessibilityLabel=axis?@"蜘蛛盘饱和度点数":@"蜘蛛盘色相点数";[self addSubview:menu];if(axis)_saturation=menu;else _hues=menu;
|
||||
NSTextField *label=DYLabel(axis?@"饱和度":@"色相",10);label.tag=101+axis;[self addSubview:label];
|
||||
}
|
||||
_link=[[NSButton checkboxWithTitle:@"联动" target:self action:@selector(linkChanged:)]retain];_link.font=[NSFont systemFontOfSize:10];_link.accessibilityLabel=@"联动蜘蛛盘点数";[self addSubview:_link];
|
||||
NSArray *titles=@[@"固定 / 取消固定",@"重置蜘蛛盘",@"选择整环",@"选择色相列",@"复位所选"];
|
||||
for(int i=0;i<5;i++){NSButton *b=DYButton(titles[i],self,@selector(command:));b.tag=201+i;b.font=[NSFont systemFontOfSize:10];b.accessibilityLabel=titles[i];[self addSubview:b];}
|
||||
[self setMesh:nil linked:YES];
|
||||
}return self;
|
||||
}
|
||||
- (void)dealloc{_disc.changed=nil;_disc.gesture=nil;_disc.selectionChanged=nil;[_disc release];[_hues release];[_saturation release];[_link release];[_status release];[super dealloc];}
|
||||
- (void)setMesh:(NSData *)data linked:(BOOL)linked{auto m=DYSpiderMesh(data);_disc.meshData=[NSData dataWithBytes:&m length:sizeof(m)];_linked=linked;[_hues selectItemWithTag:m.hues];[_saturation selectItemWithTag:m.rings+1];_link.state=linked?NSControlStateValueOn:NSControlStateValueOff;}
|
||||
- (void)layout{[super layout];CGFloat w=self.bounds.size.width;_disc.frame=NSMakeRect(0,0,w,300);
|
||||
[[self viewWithTag:101]setFrame:NSMakeRect(0,307,32,20)];_hues.frame=NSMakeRect(33,301,60,27);
|
||||
[[self viewWithTag:102]setFrame:NSMakeRect(99,307,43,20)];_saturation.frame=NSMakeRect(142,301,60,27);_link.frame=NSMakeRect(MAX(205,w-61),304,61,23);
|
||||
_status.frame=NSMakeRect(2,334,w-4,36);CGFloat gap=5,bw=(w-gap)/2;
|
||||
for(int i=0;i<2;i++)[[self viewWithTag:201+i]setFrame:NSMakeRect(i*(bw+gap),375,bw,27)];bw=(w-gap*2)/3;
|
||||
for(int i=0;i<3;i++)[[self viewWithTag:203+i]setFrame:NSMakeRect(i*(bw+gap),406,bw,27)];}
|
||||
- (void)resolutionChanged:(NSPopUpButton *)sender{int h=(int)_hues.selectedTag,s=(int)_saturation.selectedTag;if(_linked)h=s=(int)sender.selectedTag;[_disc changeHueCount:h saturationCount:s];}
|
||||
- (void)linkChanged:(NSButton *)sender{_linked=sender.state==NSControlStateValueOn;if(_linked&&_disc.hueCount!=_disc.saturationCount)[_disc changeHueCount:(int)_disc.hueCount saturationCount:(int)_disc.hueCount];else[_delegate writeSpiderMesh:_disc.meshData linked:_linked];}
|
||||
- (void)command:(NSButton *)sender{switch(sender.tag){case 201:[_disc toggleLock];break;case 202:[_disc resetMesh];break;case 203:[_disc selectRing];break;case 204:[_disc selectSpoke];break;case 205:[_disc resetSelected];break;}}
|
||||
@end
|
||||
|
||||
@interface DYPrimaryBalanceWheel : NSView
|
||||
@property(nonatomic,assign) id<DYGraphicDelegate> delegate;
|
||||
- (void)setValues:(NSDictionary *)values;
|
||||
@end
|
||||
@implementation DYPrimaryBalanceWheel {
|
||||
NSPoint _offset,_dragStartMouse,_dragStartOffset;BOOL _dragging,_gestureActive;
|
||||
NSImage *_wheel;NSButton *_reset;float _angle,_strength;
|
||||
}
|
||||
- (instancetype)initWithFrame:(NSRect)frame{if((self=[super initWithFrame:frame])){NSString *path=[[NSBundle bundleForClass:self.class]pathForResource:@"Basis_balanceWheel" ofType:@"png"];if(path)_wheel=[[NSImage alloc]initWithContentsOfFile:path];self.accessibilityLabel=@"一级白平衡色轮";self.toolTip=@"拖动调整一级白平衡(精细移动);双击复位。方向键微调。";
|
||||
_reset=[DYButton(@"复位",self,@selector(resetBalance:))retain];_reset.accessibilityLabel=@"复位一级白平衡";_reset.toolTip=@"仅复位一级白平衡的方向和强度";[self addSubview:_reset];}return self;}
|
||||
- (void)dealloc{[self finishGesture];[_wheel release];[_reset release];[super dealloc];}
|
||||
- (void)layout{[super layout];_reset.frame=NSMakeRect(MAX(0,self.bounds.size.width-62),0,60,24);}
|
||||
- (BOOL)isAccessibilityElement{return YES;}
|
||||
- (NSString *)accessibilityRole{return NSAccessibilityButtonRole;}
|
||||
- (NSArray *)accessibilityChildren{return @[_reset];}
|
||||
- (NSString *)accessibilityHelp{return self.toolTip;}
|
||||
- (id)accessibilityValue{return [NSString stringWithFormat:@"方向 %.1f 度,强度 %.1f%%",_angle,_strength*100];}
|
||||
- (BOOL)accessibilityPerformPress{[self.window makeFirstResponder:self];return YES;}
|
||||
- (BOOL)acceptsFirstResponder{return YES;}
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent *)e{return YES;}
|
||||
- (CGFloat)maxDistance{return MAX(1,MIN(self.bounds.size.width,self.bounds.size.height-28)*.5-12);}
|
||||
- (NSPoint)center{return NSMakePoint(NSMidX(self.bounds),NSMidY(self.bounds)+10);}
|
||||
- (void)setValues:(NSDictionary *)values{_angle=[values[@"cmbalanceAngle"]floatValue];_strength=[values[@"cmbalanceStrength"]floatValue];double angle=(_angle+104)*M_PI/180;_offset=NSMakePoint(cos(angle)*_strength*self.maxDistance,sin(angle)*_strength*self.maxDistance);[self setNeedsDisplay:YES];}
|
||||
- (void)finishGesture{if(_gestureActive){_gestureActive=NO;[_delegate graphicGesture:NO title:@"调整一级白平衡"];}}
|
||||
- (void)resetBalance:(id)sender{[self finishGesture];_dragging=NO;[_delegate graphicGesture:YES title:@"复位一级白平衡"];_offset=NSZeroPoint;_angle=_strength=0;[_delegate writeGraphicValues:@{@"cmbalanceAngle":@0,@"cmbalanceStrength":@0}];[_delegate graphicGesture:NO title:@"复位一级白平衡"];[self setNeedsDisplay:YES];}
|
||||
- (void)viewWillMoveToWindow:(NSWindow *)w{if(!w)[self finishGesture];[super viewWillMoveToWindow:w];}
|
||||
- (void)pushValue{
|
||||
_strength=(float)(hypot(_offset.x,_offset.y)/self.maxDistance);_angle=(float)fmod(atan2(_offset.y,_offset.x)*180/M_PI+360-104,360);
|
||||
[_delegate writeGraphicValues:@{@"cmbalanceAngle":@(_angle),@"cmbalanceStrength":@(_strength)}];[self setNeedsDisplay:YES];
|
||||
}
|
||||
- (void)drawRect:(NSRect)dirty{NSPoint c=self.center;CGFloat r=self.maxDistance;[_wheel drawInRect:NSMakeRect(c.x-r,c.y-r,2*r,2*r) fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1];
|
||||
[NSColor.whiteColor setFill];[[NSBezierPath bezierPathWithOvalInRect:NSMakeRect(c.x+_offset.x-4,c.y+_offset.y-4,8,8)]fill];
|
||||
NSString *text=[NSString stringWithFormat:@"一级白平衡 %.1f° · %.1f%%",_angle,_strength*100];[text drawAtPoint:NSMakePoint(8,3) withAttributes:@{NSFontAttributeName:[NSFont systemFontOfSize:10],NSForegroundColorAttributeName:DYInk()}];
|
||||
}
|
||||
- (void)mouseDown:(NSEvent *)e{[self.window makeFirstResponder:self];if(e.clickCount==2){[self resetBalance:nil];return;}
|
||||
NSPoint p=[self convertPoint:e.locationInWindow fromView:nil],c=self.center;NSPoint knob=NSMakePoint(c.x+_offset.x,c.y+_offset.y);if(hypot(p.x-knob.x,p.y-knob.y)<self.maxDistance){_dragging=YES;_dragStartMouse=p;_dragStartOffset=_offset;}}
|
||||
- (void)mouseDragged:(NSEvent *)e{if(!_dragging)return;if(!_gestureActive){_gestureActive=YES;[_delegate graphicGesture:YES title:@"调整一级白平衡"];}
|
||||
NSPoint p=[self convertPoint:e.locationInWindow fromView:nil],v=NSMakePoint(_dragStartOffset.x+(p.x-_dragStartMouse.x)/5,_dragStartOffset.y+(p.y-_dragStartMouse.y)/5);double length=hypot(v.x,v.y);if(length>self.maxDistance){v.x=v.x/length*self.maxDistance;v.y=v.y/length*self.maxDistance;}_offset=v;[self pushValue];}
|
||||
- (void)mouseUp:(NSEvent *)e{if(_dragging)[self mouseDragged:e];_dragging=NO;[self finishGesture];}
|
||||
- (void)keyDown:(NSEvent *)e{unichar c=e.charactersIgnoringModifiers.length?[e.charactersIgnoringModifiers characterAtIndex:0]:0;float step=self.maxDistance*((e.modifierFlags&NSEventModifierFlagShift)?.02f:.005f);NSPoint v=_offset;
|
||||
if(c==NSLeftArrowFunctionKey)v.x-=step;else if(c==NSRightArrowFunctionKey)v.x+=step;else if(c==NSUpArrowFunctionKey)v.y+=step;else if(c==NSDownArrowFunctionKey)v.y-=step;else if(c==NSDeleteCharacter||c==NSBackspaceCharacter)v=NSZeroPoint;else{[super keyDown:e];return;}
|
||||
double length=hypot(v.x,v.y);if(length>self.maxDistance){v.x*=self.maxDistance/length;v.y*=self.maxDistance/length;}[_delegate graphicGesture:YES title:@"调整一级白平衡"];_offset=v;[self pushValue];[_delegate graphicGesture:NO title:@"调整一级白平衡"];}
|
||||
@end
|
||||
+5
-5
@@ -12,20 +12,20 @@
|
||||
- (void)dealloc{[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)addParametersWithError:(NSError**)e{return DYCreateParameters(_apiManager,e);}
|
||||
- (NSSet<Class>*)classesForCustomParameterID:(UInt32)pid{return pid==DYAssetsParameterID?[NSSet setWithObjects:DYAssetState.class,NSDictionary.class,NSString.class,nil]:[NSSet setWithObject:DYInspectorToken.class];}
|
||||
- (NSSet<Class>*)classesForCustomParameterID:(UInt32)pid{return 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{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==2013||pid==2014||pid==DYAssetsParameterID)[_renderer invalidatePreview];dispatch_async(dispatch_get_main_queue(),^{[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:self.apiManager];});return YES;}
|
||||
- (BOOL)parameterChanged:(UInt32)pid atTime:(CMTime)t error:(NSError**)e{if(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);double copyAuto=0;[[_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)]getFloatValue:©Auto fromParameter:8800 atTime:t];NSDictionary*s=@{@"schema":@1,@"copyAuto":@(copyAuto>.5),@"uniforms":[NSData dataWithBytes:&u length:sizeof(u)],@"paths":a.paths?:@{}};*state=[NSPropertyListSerialization dataWithPropertyList:s format:NSPropertyListBinaryFormat_v1_0 options:0 error:e];return *state!=nil;
|
||||
DYUniforms u;DYReadUniforms(_apiManager,t,&u);DYAssetState*a=DYReadAssets(_apiManager,t);double copyAuto=0;[[_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)]getFloatValue:©Auto fromParameter:8800 atTime:t];NSDictionary*s=@{@"schema":@1,@"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;}
|
||||
- (BOOL)renderDestinationImage:(FxImageTile*)dst sourceImages:(NSArray<FxImageTile*>*)src pluginState:(NSData*)s atTime:(CMTime)t error:(NSError**)e{
|
||||
if(!src.count||!src[0].ioSurface||!dst.ioSurface||!s.length)return NO;NSDictionary*p=[NSPropertyListSerialization propertyListWithData:s options:NSPropertyListImmutable format:NULL error:e];if(![p isKindOfClass:NSDictionary.class])return NO;NSData*b=p[@"uniforms"];if(![p[@"schema"]isEqual:@1]||![b isKindOfClass:NSData.class]||b.length!=sizeof(DYUniforms)||![p[@"paths"]isKindOfClass:NSDictionary.class])return NO;DYUniforms u;[b getBytes:&u length:sizeof(u)];BOOL ok=[_renderer renderSource:src[0] destination:dst uniforms:u paths:p[@"paths"] error:e];if(ok){BOOL analyze=NO;@synchronized(self){if(![p[@"copyAuto"]boolValue])_copyAnalyzed=NO;else if(!_copyAnalyzed){_copyAnalyzed=YES;analyze=YES;}}if(analyze){NSDictionary*values=DYAutoGrade([_renderer preview]);if(values)dispatch_async(dispatch_get_main_queue(),^{[self applyValues:values];});}}return ok;
|
||||
if(!src.count||!src[0].ioSurface||!dst.ioSurface||!s.length)return NO;NSDictionary*p=[NSPropertyListSerialization propertyListWithData:s options:NSPropertyListImmutable format:NULL error:e];if(![p isKindOfClass:NSDictionary.class])return NO;NSData*b=p[@"uniforms"];if(![p[@"schema"]isEqual:@1]||![b isKindOfClass:NSData.class]||b.length!=sizeof(DYUniforms)||![p[@"paths"]isKindOfClass:NSDictionary.class])return NO;DYUniforms u;[b getBytes:&u length:sizeof(u)];BOOL ok=[_renderer renderSource:src[0] destination:dst uniforms:u paths:p[@"paths"] spider:p[@"spider"] error:e];if(ok){BOOL analyze=NO;@synchronized(self){if(![p[@"copyAuto"]boolValue])_copyAnalyzed=NO;else if(!_copyAnalyzed){_copyAnalyzed=YES;analyze=YES;}}if(analyze){NSDictionary*values=DYAutoGrade([_renderer preview]);if(values)dispatch_async(dispatch_get_main_queue(),^{[self applyValues:values];});}}return ok;
|
||||
}
|
||||
- (void)alert:(NSString*)message{dispatch_async(dispatch_get_main_queue(),^{NSAlert*a=[NSAlert new];a.messageText=@"大鱼调色";a.informativeText=message?:@"操作未完成";[a runModal];[a release];});}
|
||||
- (void)exportRequested:(NSNotification*)n{
|
||||
NSURL*url=n.userInfo[@"url"];if(![url isKindOfClass:NSURL.class])return;id<FxCustomParameterActionAPI_v4>a=[_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];[a startAction:self];DYUniforms u;DYReadUniforms(_apiManager,a.currentTime,&u);NSDictionary*paths=[DYReadAssets(_apiManager,a.currentTime).paths copy];[a endAction:self];NSError*e=nil;BOOL ok=[_renderer exportLUT:url uniforms:u paths:paths error:&e];[paths release];if(!ok)[self alert:e.localizedDescription];
|
||||
NSURL*url=n.userInfo[@"url"];if(![url isKindOfClass:NSURL.class])return;id<FxCustomParameterActionAPI_v4>a=[_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];[a startAction:self];DYUniforms u;DYReadUniforms(_apiManager,a.currentTime,&u);DYAssetState *assets=DYReadAssets(_apiManager,a.currentTime);NSDictionary*paths=[assets.paths copy];NSData *mesh=[assets.spiderMesh copy];[a endAction:self];NSError*e=nil;BOOL ok=[_renderer exportLUT:url uniforms:u paths:paths spider:mesh error:&e];[mesh release];[paths release];if(!ok)[self alert:e.localizedDescription];
|
||||
}
|
||||
- (void)applyValues:(NSDictionary*)values{if(!values){[self alert:@"尚未拿到当前片段画面,请移动播放头后重试。"];return;}id<FxCustomParameterActionAPI_v4>a=[_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];[a startAction:self];@try{id<FxParameterSettingAPI_v6>s=[_apiManager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];for(NSDictionary*r in DYDescriptors()){NSNumber*v=values[r[@"key"]];if(v)[s setFloatValue:v.doubleValue toParameter:[r[@"pid"]unsignedIntValue] atTime:a.currentTime];}}@finally{[a endAction:self];}[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:_apiManager];}
|
||||
- (void)autoRequested:(NSNotification*)n{NSData*frame=[_renderer preview];[self applyValues:[n.name isEqual:@"DYAutoGrade"]?DYAutoGrade(frame):DYAutoWhiteBalance(frame)];}
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
- (NSProgress *)prepareLUTPath:(NSString *)path completion:(void (^)(NSError *error))completion;
|
||||
- (BOOL)renderSource:(FxImageTile*)source destination:(FxImageTile*)destination uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths error:(NSError**)error;
|
||||
- (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths error:(NSError**)error;
|
||||
- (BOOL)renderSource:(FxImageTile*)source destination:(FxImageTile*)destination uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider error:(NSError**)error;
|
||||
- (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider error:(NSError**)error;
|
||||
- (NSData*)preview;
|
||||
/// Display-encoded float RGBA, 320×180, with the visually top row first.
|
||||
/// Analysis preview retains the host texture's original row order separately.
|
||||
|
||||
+81
-11
@@ -1,4 +1,6 @@
|
||||
#import "DYRenderer.h"
|
||||
#import "DYModel.h"
|
||||
#include "DYSpiderState.h"
|
||||
#import "DYColorTables.h"
|
||||
#import "DYLUTLibrary.h"
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
@@ -8,6 +10,42 @@
|
||||
static BOOL fail(NSError**e,NSString*m){if(e)*e=[NSError errorWithDomain:@"com.dayu.color" code:1 userInfo:@{NSLocalizedDescriptionKey:m?:@"Metal 调色失败"}];return NO;}
|
||||
static NSArray *inputFiles(){return @[@"",@"apple_log_to_rec709",@"arri_logc3_to_rec709",@"arri_logc4_to_rec709",@"blackmagic_film_gen5_to_rec709",@"canon_clog_bt709_to_rec709",@"canon_clog2_cinema_gamut_to_rec709",@"canon_clog3_cinema_gamut_to_rec709",@"dji_dlog_to_rec709",@"dji_dlog_m_to_rec709",@"fujifilm_flog_to_rec709",@"fujifilm_flog2_to_rec709",@"nikon_nlog_to_rec709",@"panasonic_vlog_vgamut_to_rec709",@"red_log3g10_rwg_to_rec709",@"sony_slog2_sgamut_to_rec709",@"sony_slog3_sgamut3cine_to_rec709",@"sony_hlg_bt2020_to_rec709"];}
|
||||
static id<MTLTexture> texture3D(id<MTLDevice>d,const float*values,NSUInteger n){MTLTextureDescriptor*t=[MTLTextureDescriptor new];t.textureType=MTLTextureType3D;t.pixelFormat=MTLPixelFormatRGBA32Float;t.width=n;t.height=n;t.depth=n;t.storageMode=MTLStorageModeShared;t.usage=MTLTextureUsageShaderRead;id<MTLTexture>x=[d newTextureWithDescriptor:t];[t release];if(x)[x replaceRegion:MTLRegionMake3D(0,0,0,n,n,n) mipmapLevel:0 slice:0 withBytes:values bytesPerRow:n*16 bytesPerImage:n*n*16];return [x autorelease];}
|
||||
// A synthetic texture lattice uses exactly the production render path for Cube export.
|
||||
@interface DYExportTile : FxImageTile { id<MTLTexture> _tex; uint64_t _registry; }
|
||||
- (instancetype)initWithTexture:(id<MTLTexture>)texture registry:(uint64_t)registry;
|
||||
@end
|
||||
@implementation DYExportTile
|
||||
- (instancetype)initWithTexture:(id<MTLTexture>)texture registry:(uint64_t)registry{if((self=[super init])){_tex=[texture retain];_registry=registry;}return self;}
|
||||
- (void)dealloc{[_tex release];[super dealloc];}
|
||||
- (id<MTLTexture>)metalTextureForDevice:(id<MTLDevice>)d{return d.registryID==_registry?_tex:nil;}
|
||||
- (FxRect)tilePixelBounds{return (FxRect){0,0,(SInt32)_tex.width,(SInt32)_tex.height};}
|
||||
- (FxRect)imagePixelBounds{return self.tilePixelBounds;}
|
||||
- (uint64_t)deviceRegistryID{return _registry;}
|
||||
- (FxImageOrigin)imageOrigin{return kFxImageOrigin_TOP_LEFT;}
|
||||
@end
|
||||
static BOOL managed(DYUniforms u,NSDictionary *paths){return u.cm.configured>=0&&(u.cm.configured>.5||(![paths[@"input"]length]&&u.inputProfile<.5));}
|
||||
static BOOL identityCM(DYUniforms u){
|
||||
DYCMSettings s=u.cm;
|
||||
BOOL neutral=s.basisEnabled<.5||(s.exposure==0&&s.balanceStrength==0&&s.saturation==1&&s.contrast==0&&s.hiContrast==0&&s.shadowContrast==0&&s.white==1&&s.highlights==0&&s.midtones==0&&s.shadows==0&&s.black==0&&s.toe==.5f&&s.shoulder==.5f&&s.chromaMix==.5f);
|
||||
BOOL transforms=(u.inputSectionEnabled>.5)==(s.outputEnabled>.5)&&((u.inputSectionEnabled<.5)||(s.inputTransfer==s.outputTransfer&&s.inputGamut==s.outputGamut&&s.toneMapping<.5));
|
||||
return neutral&&transforms;
|
||||
}
|
||||
// An enabled but untouched display tool is mathematically neutral. Bypass its
|
||||
// finite-domain lookup so that the default "all eyes on" does not clip CST HDR.
|
||||
static void bypassNeutralTools(DYUniforms *u){
|
||||
for(NSDictionary *section in DYSections()){
|
||||
if(![@[@"curve",@"hsl",@"grading",@"primaries",@"levels",@"balance"]containsObject:section[@"key"]])continue;
|
||||
BOOL neutral=YES;for(NSDictionary *row in section[@"rows"]){NSInteger offset=[row[@"offset"]integerValue];if(offset<0)continue;if(*(float*)((uint8_t*)u+offset)!=[row[@"default"]floatValue]){neutral=NO;break;}}
|
||||
if(neutral)for(NSDictionary *row in DYDescriptors())if([row[@"pid"]isEqual:section[@"enabled"]])*(float*)((uint8_t*)u+[row[@"offset"]unsignedIntegerValue])=0;
|
||||
}
|
||||
}
|
||||
static void bypassIdleSkin(DYUniforms *u){
|
||||
if(u->curveSectionEnabled>.5||u->hslSectionEnabled>.5||u->colorGradingSectionEnabled>.5||u->primariesSectionEnabled>.5||u->levelsSectionEnabled>.5||u->blackWhiteSectionEnabled>.5||u->colorBalanceSectionEnabled>.5)return;
|
||||
if(u->preLUTStrength!=0||u->postLUTStrength!=0||simd_any(u->extraPostLUTStrengths!=0))return;
|
||||
const float *values=&u->exposure,*enabled=&u->exposureEnabled;
|
||||
for(int i=0;i<13;i++){BOOL group=(i>=6&&i<=9)?u->colorSectionEnabled>.5:u->baseSectionEnabled>.5;if(group&&enabled[i]>.5&&values[i]!=0)return;}
|
||||
u->skinProtection.x=0;
|
||||
}
|
||||
@interface DYRenderer(){
|
||||
NSMutableDictionary *_devices,*_luts,*_preparedLUTs;
|
||||
NSSet *_activeLUTPaths;
|
||||
@@ -16,6 +54,7 @@ static id<MTLTexture> texture3D(id<MTLDevice>d,const float*values,NSUInteger n){
|
||||
NSObject *_previewLock;
|
||||
NSData *_preview,*_lookLUTPreview;
|
||||
CFTimeInterval _lastPreview;
|
||||
BOOL _exporting;
|
||||
}
|
||||
@end
|
||||
@implementation DYRenderer
|
||||
@@ -52,7 +91,7 @@ static id<MTLTexture> texture3D(id<MTLDevice>d,const float*values,NSUInteger n){
|
||||
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"]){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"]){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.
|
||||
@@ -67,9 +106,9 @@ static id<MTLTexture> texture3D(id<MTLDevice>d,const float*values,NSUInteger n){
|
||||
return [self textureForTable:table entry:e error:err];
|
||||
}
|
||||
- (NSArray*)textures:(NSDictionary*)paths uniforms:(DYUniforms*)u entry:(NSDictionary*)e error:(NSError**)err{
|
||||
// Normalize only this render copy. Folded groups retain their host parameters
|
||||
// Normalize only this render copy. Disabled groups retain their host parameters
|
||||
// and paths, while inactive LUTs neither load files nor affect any layer.
|
||||
BOOL inputEnabled=u->inputSectionEnabled>.5;
|
||||
BOOL inputEnabled=u->inputSectionEnabled>.5&&!managed(*u,paths);
|
||||
NSString*input=inputEnabled?paths[@"input"]:nil;int profile=inputEnabled?(int)roundf(u->inputProfile):0;
|
||||
if(!inputEnabled){u->inputProfile=0;u->preLUTStrength=0;}
|
||||
if(!input.length&&profile>0&&profile<(int)inputFiles().count)input=[[NSBundle bundleForClass:self.class]pathForResource:inputFiles()[profile] ofType:@"dylut" inDirectory:@"InputLUTs"];
|
||||
@@ -81,22 +120,42 @@ static id<MTLTexture> texture3D(id<MTLDevice>d,const float*values,NSUInteger n){
|
||||
[DYColorTables fillPrimaries:u];id<MTLDevice>d=e[@"device"];
|
||||
id<MTLTexture>h=[_tables hslForDevice:d uniforms:u],w=[_tables whiteBalanceForDevice:d uniforms:u],g=[_tables gradingForDevice:d uniforms:u];if(!h||!w||!g){fail(err,_tables.lastError?:@"颜色查表构建失败");return nil;}[ts addObjectsFromArray:@[h,w,g]];return ts;
|
||||
}
|
||||
- (BOOL)renderSource:(FxImageTile*)src destination:(FxImageTile*)dst uniforms:(DYUniforms)u paths:(NSDictionary*)paths error:(NSError**)err{@synchronized(self){@autoreleasepool{
|
||||
- (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{@synchronized(self){@autoreleasepool{
|
||||
if(spider.length&&!DYSpiderMeshIsValid(spider))return fail(err,@"蜘蛛盘数据无效");
|
||||
if(u.primarySectionEnabled<.5){u.inputSectionEnabled=0;u.cm.basisEnabled=0;u.cm.outputEnabled=0;}
|
||||
|
||||
[_activeLUTPaths release];_activeLUTPaths=[[NSSet alloc]initWithArray:paths.allValues?:@[]];
|
||||
NSMutableDictionary*e=[self device:dst.deviceRegistryID error:err];if(!e)return NO;id<MTLDevice>d=e[@"device"];id<MTLTexture>input=[src metalTextureForDevice:d],output=[dst metalTextureForDevice:d];if(!input||!output)return fail(err,@"宿主图像纹理不可用");
|
||||
NSArray*ts=[self textures:paths uniforms:&u entry:e error:err];if(!ts)return NO;
|
||||
BOOL useCM=managed(u,paths);bypassNeutralTools(&u);float bwMix=fmaxf(0,fminf(1,u.cm.blackWhiteMix));if(bwMix<=0)u.blackWhiteSectionEnabled=0;
|
||||
NSArray*ts=[self textures:paths uniforms:&u entry:e error:err];if(!ts)return NO;bypassIdleSkin(&u);
|
||||
// Only a deformed active mesh allocates samples; device entries retain the
|
||||
// current buffer across frames. Neutral grids are exact identity at all densities.
|
||||
simd_int2 spiderSize={0,0};id<MTLBuffer>spiderBuffer=nil;
|
||||
if(u.spiderSectionEnabled>.5&&u.spiderMix>0&&spider.length){
|
||||
if(![e[@"spiderData"]isEqual:spider]){auto mesh=DYSpiderMesh(spider);auto samples=dy::meshSamples(mesh);BOOL changed=NO;for(float value:samples)changed|=value!=0;
|
||||
e[@"spiderData"]=spider;e[@"spiderActive"]=@(changed);if(changed){id<MTLBuffer>b=[d newBufferWithBytes:samples.data() length:samples.size()*sizeof(float) options:MTLResourceStorageModeShared];if(!b)return fail(err,@"无法分配蜘蛛盘缓冲区");e[@"spiderBuffer"]=b;[b release];e[@"spiderHues"]=@(mesh.hues);e[@"spiderRings"]=@(mesh.rings);}else[e removeObjectForKey:@"spiderBuffer"];
|
||||
}
|
||||
if([e[@"spiderActive"]boolValue]){spiderBuffer=e[@"spiderBuffer"];spiderSize={ [e[@"spiderHues"]intValue],[e[@"spiderRings"]intValue]};}
|
||||
}
|
||||
NSMutableDictionary*ps=e[@"pipelines"];NSNumber*format=@(output.pixelFormat);id<MTLRenderPipelineState>pipeline=ps[format];if(!pipeline){MTLRenderPipelineDescriptor*p=[MTLRenderPipelineDescriptor new];p.vertexFunction=[e[@"library"]newFunctionWithName:@"dyVertex"];p.fragmentFunction=[e[@"library"]newFunctionWithName:@"dyFragment"];p.colorAttachments[0].pixelFormat=output.pixelFormat;pipeline=[d newRenderPipelineStateWithDescriptor:p error:err];[p.vertexFunction release];[p.fragmentFunction release];[p release];if(!pipeline)return NO;ps[format]=pipeline;[pipeline release];}
|
||||
MTLTextureDescriptor*td=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA16Float width:input.width height:input.height mipmapped:NO];td.storageMode=MTLStorageModePrivate;td.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite;id<MTLTexture>straight=[d newTextureWithDescriptor:td];if(!straight)return fail(err,@"无法分配调色缓冲区");
|
||||
id<MTLCommandBuffer>cb=[e[@"queue"]commandBuffer];id<MTLComputeCommandEncoder>ce=[cb computeCommandEncoder];[ce setComputePipelineState:e[@"dyUnpremultiply"]];[ce setTexture:input atIndex:0];[ce setTexture:straight atIndex:1];[ce dispatchThreads:MTLSizeMake(input.width,input.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[ce endEncoding];
|
||||
if(useCM&&!identityCM(u)&&u.cm.mix>0){
|
||||
DayuRenderParams cm=DYCMRender(u.cm);cm.stages=(cm.stages&~1)|(u.inputSectionEnabled>.5?1:0);
|
||||
if(cm.stages){id<MTLTexture>converted=[d newTextureWithDescriptor:td];if(!converted){[straight release];return fail(err,@"无法分配 CST 缓冲区");}
|
||||
ce=[cb computeCommandEncoder];[ce setComputePipelineState:e[@"dyColorManagement"]];[ce setTexture:straight atIndex:0];[ce setTexture:converted atIndex:1];[ce setBytes:&cm length:sizeof(cm) atIndex:0];[ce setBytes:&u.cm.mix length:4 atIndex:1];[ce dispatchThreads:MTLSizeMake(input.width,input.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[ce endEncoding];[straight release];straight=converted;
|
||||
}
|
||||
}
|
||||
float level=.5;id<MTLBuffer>scene=[d newBufferWithBytes:&level length:4 options:MTLResourceStorageModeShared];
|
||||
if(u.whites>0&&u.whitesEnabled>.5&&u.baseSectionEnabled>.5){ce=[cb computeCommandEncoder];[ce setComputePipelineState:e[@"dyWhitesSceneStatistics"]];[ce setTexture:straight atIndex:0];[ce setTexture:ts[7] atIndex:1];[ce setBytes:&u length:sizeof(u) atIndex:0];[ce setBuffer:scene offset:0 atIndex:1];[ce dispatchThreadgroups:MTLSizeMake(1,1,1) threadsPerThreadgroup:MTLSizeMake(256,1,1)];[ce endEncoding];}
|
||||
BOOL preview=NO;@synchronized(_previewLock){preview=CACurrentMediaTime()-_lastPreview>.5;}id<MTLBuffer>pb=nil;if(preview){pb=[d newBufferWithLength:320*180*16 options:MTLResourceStorageModeShared];ce=[cb computeCommandEncoder];[ce setComputePipelineState:e[@"dyInputAnalysis"]];[ce setTexture:straight atIndex:0];[ce setTexture:ts[0] atIndex:1];float inputStrength=u.inputSectionEnabled>.5?u.preLUTStrength:0;[ce setBytes:&inputStrength length:4 atIndex:1];[ce setBuffer:pb offset:0 atIndex:0];[ce dispatchThreads:MTLSizeMake(320,180,1) threadsPerThreadgroup:MTLSizeMake(8,8,1)];[ce endEncoding];}
|
||||
if(!_exporting&&u.whites>0&&u.whitesEnabled>.5&&u.baseSectionEnabled>.5){ce=[cb computeCommandEncoder];[ce setComputePipelineState:e[@"dyWhitesSceneStatistics"]];[ce setTexture:straight atIndex:0];[ce setTexture:ts[7] atIndex:1];[ce setBytes:&u length:sizeof(u) atIndex:0];[ce setBuffer:scene offset:0 atIndex:1];[ce dispatchThreadgroups:MTLSizeMake(1,1,1) threadsPerThreadgroup:MTLSizeMake(256,1,1)];[ce endEncoding];}
|
||||
BOOL preview=NO;@synchronized(_previewLock){preview=!_exporting&&CACurrentMediaTime()-_lastPreview>.5;}id<MTLBuffer>pb=nil;if(preview){pb=[d newBufferWithLength:320*180*16 options:MTLResourceStorageModeShared];ce=[cb computeCommandEncoder];[ce setComputePipelineState:e[@"dyInputAnalysis"]];[ce setTexture:straight atIndex:0];[ce setTexture:ts[0] atIndex:1];float inputStrength=u.inputSectionEnabled>.5?u.preLUTStrength:0;[ce setBytes:&inputStrength length:4 atIndex:1];[ce setBuffer:pb offset:0 atIndex:0];[ce dispatchThreads:MTLSizeMake(320,180,1) threadsPerThreadgroup:MTLSizeMake(8,8,1)];[ce endEncoding];}
|
||||
MTLRenderPassDescriptor*rp=[MTLRenderPassDescriptor renderPassDescriptor];rp.colorAttachments[0].texture=output;rp.colorAttachments[0].loadAction=MTLLoadActionDontCare;rp.colorAttachments[0].storeAction=MTLStoreActionStore;id<MTLRenderCommandEncoder>re=[cb renderCommandEncoderWithDescriptor:rp];[re setRenderPipelineState:pipeline];
|
||||
float w=output.width,h=output.height;FxRect s=src.tilePixelBounds,t=dst.tilePixelBounds;float sw=s.right-s.left,sh=s.top-s.bottom;float l=(t.left-s.left)/sw,r=(t.right-s.left)/sw,top=(s.top-t.top)/sh,bottom=(s.top-t.bottom)/sh;
|
||||
if(src.imageOrigin==kFxImageOrigin_BOTTOM_LEFT){top=1-top;bottom=1-bottom;}
|
||||
DYVertex2D vs[]={{{w/2,-h/2},{r,bottom}},{{-w/2,-h/2},{l,bottom}},{{w/2,h/2},{r,top}},{{-w/2,h/2},{l,top}}};
|
||||
if(dst.imageOrigin==kFxImageOrigin_BOTTOM_LEFT)for(int i=0;i<4;i++)vs[i].position.y=-vs[i].position.y;
|
||||
vector_uint2 vp={(unsigned)output.width,(unsigned)output.height};[re setVertexBytes:vs length:sizeof(vs) atIndex:0];[re setVertexBytes:&vp length:sizeof(vp) atIndex:1];[re setViewport:(MTLViewport){0,0,w,h,0,1}];[re setFragmentTexture:straight atIndex:0];for(NSUInteger i=0;i<ts.count;i++)[re setFragmentTexture:ts[i] atIndex:i+1];[re setFragmentBytes:&u length:sizeof(u) atIndex:0];[re setFragmentBuffer:scene offset:0 atIndex:1];DYRenderOptions options={1,0,0,0};[re setFragmentBytes:&options length:sizeof(options) atIndex:2];[re drawPrimitives:MTLPrimitiveTypeTriangleStrip vertexStart:0 vertexCount:4];[re endEncoding];[cb commit];[cb waitUntilCompleted];BOOL ok=cb.status==MTLCommandBufferStatusCompleted;
|
||||
vector_uint2 vp={(unsigned)output.width,(unsigned)output.height};[re setVertexBytes:vs length:sizeof(vs) atIndex:0];[re setVertexBytes:&vp length:sizeof(vp) atIndex:1];[re setViewport:(MTLViewport){0,0,w,h,0,1}];[re setFragmentTexture:straight atIndex:0];for(NSUInteger i=0;i<ts.count;i++)[re setFragmentTexture:ts[i] atIndex:i+1];[re setFragmentBytes:&u length:sizeof(u) atIndex:0];[re setFragmentBuffer:scene offset:0 atIndex:1];DYRenderOptions options={1,bwMix,0,0};[re setFragmentBytes:&options length:sizeof(options) atIndex:2];DYUniforms color=u;color.blackWhiteSectionEnabled=0;[re setFragmentBytes:&color length:sizeof(color) atIndex:3];if(spiderBuffer)[re setFragmentBuffer:spiderBuffer offset:0 atIndex:4];else{float empty[2]={0,0};[re setFragmentBytes:empty length:sizeof(empty) atIndex:4];}[re setFragmentBytes:&spiderSize length:sizeof(spiderSize) atIndex:5];[re drawPrimitives:MTLPrimitiveTypeTriangleStrip vertexStart:0 vertexCount:4];[re endEncoding];[cb commit];[cb waitUntilCompleted];BOOL ok=cb.status==MTLCommandBufferStatusCompleted;
|
||||
if(ok&&pb){@synchronized(_previewLock){
|
||||
[_preview release];_preview=[[NSData alloc]initWithBytes:pb.contents length:320*180*16];
|
||||
// The analysis kernel reads physical texture rows. Its result remains intact
|
||||
@@ -111,8 +170,19 @@ static id<MTLTexture> texture3D(id<MTLDevice>d,const float*values,NSUInteger n){
|
||||
}}
|
||||
if(!ok)fail(err,cb.error.localizedDescription);[pb release];[straight release];[scene release];return ok;
|
||||
}}}
|
||||
- (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)u paths:(NSDictionary*)paths error:(NSError**)err{@synchronized(self){
|
||||
NSMutableDictionary*e=[self device:0 error:err];if(!e)return NO;NSArray*ts=[self textures:paths uniforms:&u entry:e error:err];if(!ts)return NO;id<MTLDevice>d=e[@"device"];uint32_t n=33;NSUInteger count=n*n*n;id<MTLBuffer>out=[d newBufferWithLength:count*3*4 options:MTLResourceStorageModeShared];if(!out)return fail(err,@"无法分配 LUT 输出");id<MTLCommandBuffer>cb=[e[@"queue"]commandBuffer];id<MTLComputeCommandEncoder>ce=[cb computeCommandEncoder];[ce setComputePipelineState:e[@"dyLUTExportKernel"]];for(NSUInteger i=0;i<ts.count;i++)[ce setTexture:ts[i] atIndex:i];[ce setBytes:&u length:sizeof(u) atIndex:0];[ce setBuffer:out offset:0 atIndex:1];[ce setBytes:&n length:4 atIndex:2];[ce dispatchThreads:MTLSizeMake(count,1,1) threadsPerThreadgroup:MTLSizeMake(64,1,1)];[ce endEncoding];[cb commit];[cb waitUntilCompleted];if(cb.status!=MTLCommandBufferStatusCompleted){[out release];return fail(err,cb.error.localizedDescription);}
|
||||
NSMutableString*s=[NSMutableString stringWithString:@"TITLE \"大鱼调色\"\n# 仅包含逐像素颜色;纹理、清晰度和画面分析不写入 LUT。\nLUT_3D_SIZE 33\nDOMAIN_MIN 0 0 0\nDOMAIN_MAX 1 1 1\n"];float*v=(float*)out.contents;for(NSUInteger i=0;i<count;i++){if(!std::isfinite(v[i*3])||!std::isfinite(v[i*3+1])||!std::isfinite(v[i*3+2])){[out release];return fail(err,@"LUT GPU 输出含无效值");}[s appendFormat:@"%.8f %.8f %.8f\n",v[i*3],v[i*3+1],v[i*3+2]];}[out release];return [s writeToURL:url atomically:YES encoding:NSUTF8StringEncoding error:err];
|
||||
- (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){
|
||||
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 色格");}
|
||||
std::vector<__fp16>values(count*4);for(NSUInteger i=0;i<count;i++){float v[3]={(float)(i%n)/(n-1),(float)((i/n)%n)/(n-1),(float)(i/(n*n))/(n-1)};for(int c=0;c<3;c++)values[i*4+c]=v[c]<=.04045f?v[c]/12.92f:powf((v[c]+.055f)/1.055f,2.4f);values[i*4+3]=1;}
|
||||
[input replaceRegion:MTLRegionMake2D(0,0,width,height) mipmapLevel:0 withBytes:values.data() bytesPerRow:width*8];
|
||||
DYExportTile *source=[[[DYExportTile alloc]initWithTexture:input registry:d.registryID]autorelease],*dest=[[[DYExportTile alloc]initWithTexture:output registry:d.registryID]autorelease];
|
||||
u.textureEnabled=0;u.clarityEnabled=0;u.dehazeEnabled=0;BOOL ok=NO;_exporting=YES;
|
||||
@try{ok=[self renderSource:source destination:dest uniforms:u paths:paths spider:spider error:err];}@finally{_exporting=NO;}
|
||||
if(ok)[output getBytes:values.data() bytesPerRow:width*8 fromRegion:MTLRegionMake2D(0,0,width,height) mipmapLevel:0];[input release];[output release];if(!ok)return NO;
|
||||
NSMutableString *text=[NSMutableString stringWithString:@"TITLE \"大鱼调色\"\n# 包含 CST 与逐像素颜色;不包含纹理、清晰度和逐画面分析。\nLUT_3D_SIZE 33\nDOMAIN_MIN 0 0 0\nDOMAIN_MAX 1 1 1\n"];
|
||||
for(NSUInteger i=0;i<count;i++){float rgb[3];for(int c=0;c<3;c++){float v=values[i*4+c];rgb[c]=v<=.0031308f?v*12.92f:1.055f*powf(v,1/2.4f)-.055f;if(!std::isfinite(rgb[c]))return fail(err,@"LUT 输出含无效值");}[text appendFormat:@"%.8f %.8f %.8f\n",rgb[0],rgb[1],rgb[2]];}
|
||||
return [text writeToURL:url atomically:YES encoding:NSUTF8StringEncoding error:err];
|
||||
}}
|
||||
@end
|
||||
@@ -0,0 +1,96 @@
|
||||
// Ported from dayu-colorplate; provenance in research/SpiderAndBalanceSources.json.
|
||||
@interface DYSpiderDisc : NSView
|
||||
@property(nonatomic) DYGrade grade;
|
||||
@property(nonatomic,copy) NSData *meshData;
|
||||
@property(nonatomic,readonly) NSInteger hueCount,saturationCount;
|
||||
- (void)changeHueCount:(int)hues saturationCount:(int)saturation;
|
||||
- (void)resetMesh;
|
||||
@property(nonatomic) NSInteger selected;
|
||||
@property(nonatomic,retain) NSMutableIndexSet *pinned,*selection;
|
||||
@property(nonatomic,copy) NSData *pinData;
|
||||
@property(nonatomic) BOOL interactionEnabled;
|
||||
- (void)selectRing;
|
||||
- (void)selectSpoke;
|
||||
- (void)resetSelected;
|
||||
@property(nonatomic,copy) void(^changed)(DYGrade,NSData*);
|
||||
@property(nonatomic,copy) void(^selectionChanged)(NSString*);
|
||||
@property(nonatomic,copy) void(^gesture)(BOOL);
|
||||
- (void)toggleLock;
|
||||
@end
|
||||
@implementation DYSpiderDisc {BOOL _dragging,_marquee,_gestureActive;NSPoint _dragOrigin,_marqueeEnd;DYGrade _dragGrade;dy::SpiderMesh _mesh,_dragMesh;BOOL _variableMesh;NSMutableIndexSet*_selectionStart,*_pinsStart;}
|
||||
- (void)dealloc{[self finishGesture];[_pinned release];[_selection release];[_selectionStart release];[_pinsStart release];[_changed release];[_selectionChanged release];[_gesture release];[super dealloc];}
|
||||
- (BOOL)isFlipped{return YES;}
|
||||
- (BOOL)acceptsFirstResponder{return YES;}
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent*)event{return YES;}
|
||||
- (BOOL)isAccessibilityElement{return YES;}
|
||||
- (NSString*)accessibilityRole{return NSAccessibilityButtonRole;}
|
||||
- (NSString*)accessibilityHelp{return @"拖动一点,同一色相列的自由点自动联动。固定点仍可直接拖动。Command 多选,Shift 固定,右键复位。Tab 切点,方向键微调,Escape 取消。";}
|
||||
- (id)accessibilityValue{NSInteger i=_selected>=0?_selected:(NSInteger)_selection.firstIndex;return i>=0&&i<[self nodeCount]?[NSString stringWithFormat:@"已选 %lu 点,主点 %ld,X %.4f,Y %.4f,固定点仍可拖动",(unsigned long)_selection.count,(long)i+1,_mesh.x[i],_mesh.y[i]]:@"拖动一点,周围自由点自动联动";}
|
||||
- (BOOL)accessibilityPerformPress{[self.window makeFirstResponder:self];if(!_selection.count)[_selection addIndex:0];[self describeSelection];self.needsDisplay=YES;return YES;}
|
||||
- (void)finishGesture{if(_gestureActive){_gestureActive=NO;if(_gesture)_gesture(NO);}}
|
||||
- (void)viewWillMoveToWindow:(NSWindow*)window{if(!window)[self finishGesture];[super viewWillMoveToWindow:window];}
|
||||
- (NSInteger)nodeCount{return dy::meshCount(_mesh);}
|
||||
- (NSInteger)hueCount{return _mesh.hues;}
|
||||
- (NSInteger)saturationCount{return _mesh.rings+1;}
|
||||
- (NSData*)meshData{return _variableMesh?[NSData dataWithBytes:&_mesh length:sizeof(_mesh)]:nil;}
|
||||
- (void)setMeshData:(NSData*)data{dy::SpiderMesh m{};BOOL variable=data.length==sizeof(m);if(variable){memcpy(&m,data.bytes,sizeof(m));if(!dy::validMesh(m))return;}else m=dy::legacyMesh(_grade,(const uint8_t*)self.pinData.bytes);BOOL topology=m.hues!=_mesh.hues||m.rings!=_mesh.rings;_mesh=m;_variableMesh=variable;if(topology){_dragging=_marquee=NO;[self finishGesture];[_selection removeAllIndexes];_selected=-1;}[self updatePins];self.needsDisplay=YES;}
|
||||
- (void)updatePins{self.pinned=[NSMutableIndexSet indexSet];for(int i=0;i<[self nodeCount];i++)if(_mesh.pins[i])[_pinned addIndex:i];}
|
||||
- (NSData*)pinData{uint8_t flags[81]={};auto m=dy::resampleMesh(_mesh,16,6);for(int i=0;i<81;i++)flags[i]=m.pins[i];return [NSData dataWithBytes:flags length:81];}
|
||||
- (void)setPinData:(NSData*)data{if(!_variableMesh){const uint8_t*p=data.length==81?(const uint8_t*)data.bytes:nullptr;_mesh=dy::legacyMesh(_grade,p);[self updatePins];}self.needsDisplay=YES;}
|
||||
- (void)notifyChange{for(int i=0;i<[self nodeCount];i++)_mesh.pins[i]=dy::meshBoundary(_mesh,i)||[_pinned containsIndex:i];_grade=dy::meshLegacyGrade(_grade,_mesh);if(_changed)_changed(_grade,self.pinData);[self describeSelection];self.needsDisplay=YES;}
|
||||
- (void)changeHueCount:(int)hues saturationCount:(int)saturation{if(!_interactionEnabled||!dySpiderResolution(hues)||!dySpiderResolution(saturation))return;if(hues==_mesh.hues&&saturation==_mesh.rings+1)return;[self finishGesture];_dragging=_marquee=NO;_mesh=dy::resampleMesh(_mesh,hues,saturation);_variableMesh=YES;[_selection removeAllIndexes];_selected=-1;[self updatePins];[self notifyChange];}
|
||||
- (void)resetMesh{_mesh=dy::neutralMesh(_mesh.hues,_mesh.rings+1);_variableMesh=YES;[_selection removeAllIndexes];_selected=-1;[self updatePins];[self notifyChange];}
|
||||
- (void)moveFrom:(DYGrade)g x:(float)x y:(float)y {
|
||||
if(!_selection.count||(x==0&&y==0))return;std::bitset<dy::SpiderMeshCapacity>selected;for(int i=0;i<[self nodeCount];i++)selected[i]=[_selection containsIndex:i];
|
||||
auto start=_dragging?_dragMesh:_mesh;auto moved=dy::moveMesh(start,selected,x,y);if(!memcmp(&moved,&_mesh,sizeof(moved)))return;_mesh=moved;_grade=g;_grade.spiderEnabled=1;[self updatePins];[self notifyChange];
|
||||
}
|
||||
- (void)keyDown:(NSEvent*)e {
|
||||
if(!_interactionEnabled)return;unichar c=e.charactersIgnoringModifiers.length?[e.charactersIgnoringModifiers characterAtIndex:0]:0;
|
||||
if(c==27){if(_dragging){_grade=_dragGrade;_mesh=_dragMesh;self.pinned=[[_pinsStart mutableCopy]autorelease];[self notifyChange];}if(_marquee)self.selection=[[_selectionStart mutableCopy]autorelease];_dragging=_marquee=NO;[self finishGesture];self.needsDisplay=YES;return;}
|
||||
if((e.modifierFlags&NSEventModifierFlagCommand)&&c=='a'){[_selection addIndexesInRange:NSMakeRange(0,[self nodeCount])];[self describeSelection];self.needsDisplay=YES;return;}
|
||||
if(c=='\t'){_selected=(_selected+(e.modifierFlags&NSEventModifierFlagShift?[self nodeCount]-1:1)+[self nodeCount])%[self nodeCount];[_selection removeAllIndexes];[_selection addIndex:_selected];[self describeSelection];self.needsDisplay=YES;return;}
|
||||
if(c==' '){[self toggleLock];return;}if(c==NSDeleteCharacter||c==NSBackspaceCharacter){[self resetSelected];return;}
|
||||
float step=e.modifierFlags&NSEventModifierFlagShift?.02f:.005f;
|
||||
if(c==NSLeftArrowFunctionKey)[self moveFrom:_grade x:-step y:0];else if(c==NSRightArrowFunctionKey)[self moveFrom:_grade x:step y:0];else if(c==NSUpArrowFunctionKey)[self moveFrom:_grade x:0 y:-step];else if(c==NSDownArrowFunctionKey)[self moveFrom:_grade x:0 y:step];else[super keyDown:e];
|
||||
}
|
||||
- (instancetype)initWithFrame:(NSRect)r{if((self=[super initWithFrame:r])){_grade=dyDefaultGrade();_mesh=dy::legacyMesh(_grade);_selected=-1;self.pinData=nil;self.selection=[NSMutableIndexSet indexSet];_interactionEnabled=YES;self.accessibilityLabel=@"蜘蛛盘,拖动一点联动同列自由点";}return self;}
|
||||
- (NSRect)discRect{CGFloat s=MIN(self.bounds.size.width,self.bounds.size.height)-32;return NSMakeRect((self.bounds.size.width-s)/2,(self.bounds.size.height-s)/2,s,s);}
|
||||
- (NSPoint)point:(NSInteger)i{NSRect r=self.discRect;return NSMakePoint(r.origin.x+_mesh.x[i]*r.size.width,r.origin.y+_mesh.y[i]*r.size.height);}
|
||||
- (void)setGrade:(DYGrade)g{if(memcmp(g.spiderX,_grade.spiderX,sizeof(g.spiderX))||memcmp(g.spiderY,_grade.spiderY,sizeof(g.spiderY))){_grade=g;self.meshData=nil;}else _grade=g;self.needsDisplay=YES;}
|
||||
- (void)drawRect:(NSRect)dirty{
|
||||
NSRect r=self.discRect;NSPoint c=NSMakePoint(NSMidX(r),NSMidY(r));CGFloat rad=r.size.width/2;
|
||||
for(int s=0;s<64;s++)for(int ring=1;ring<=5;ring++){double a=s*M_PI/32,b=(s+1)*M_PI/32;NSBezierPath*p=[NSBezierPath bezierPath];[p moveToPoint:NSMakePoint(c.x+cos(a)*(ring-1)*rad/5,c.y+sin(a)*(ring-1)*rad/5)];[p lineToPoint:NSMakePoint(c.x+cos(a)*ring*rad/5,c.y+sin(a)*ring*rad/5)];[p lineToPoint:NSMakePoint(c.x+cos(b)*ring*rad/5,c.y+sin(b)*ring*rad/5)];[p lineToPoint:NSMakePoint(c.x+cos(b)*(ring-1)*rad/5,c.y+sin(b)*(ring-1)*rad/5)];[p closePath];[[NSColor colorWithCalibratedHue:s/64. saturation:ring/5. brightness:.47 alpha:1]setFill];[p fill];}
|
||||
[[NSColor colorWithWhite:1 alpha:.30]setStroke];for(int ring=1;ring<=_mesh.rings;ring++){NSBezierPath *p=[NSBezierPath bezierPath];for(int s=0;s<=_mesh.hues;s++){NSPoint q=[self point:dy::meshIndex(_mesh,s%_mesh.hues,ring)];if(s==0)[p moveToPoint:q];else[p lineToPoint:q];}[p stroke];}
|
||||
for(int s=0;s<_mesh.hues;s++){NSBezierPath*p=[NSBezierPath bezierPath];[p moveToPoint:[self point:[self nodeCount]-1]];for(int ring=1;ring<=_mesh.rings;ring++)[p lineToPoint:[self point:dy::meshIndex(_mesh,s,ring)]];[p stroke];}
|
||||
for(int i=0;i<[self nodeCount];i++){NSPoint p=[self point:i];CGFloat z=[_selection containsIndex:i]?4.5:2.6;NSBezierPath *d=[NSBezierPath bezierPathWithOvalInRect:NSMakeRect(p.x-z,p.y-z,z*2,z*2)];[([_selection containsIndex:i]?DYAccent():[NSColor colorWithWhite:1 alpha:.85])setFill];[d fill];if([_selection containsIndex:i]){[NSColor.whiteColor setStroke];[d stroke];}if([_pinned containsIndex:i]){[NSColor.blackColor setFill];NSRectFill(NSMakeRect(p.x-1,p.y-1,2,2));}}
|
||||
if(_marquee){
|
||||
NSRect box=NSMakeRect(MIN(_dragOrigin.x,_marqueeEnd.x),MIN(_dragOrigin.y,_marqueeEnd.y),fabs(_dragOrigin.x-_marqueeEnd.x),fabs(_dragOrigin.y-_marqueeEnd.y));
|
||||
NSBezierPath*outline=[NSBezierPath bezierPathWithRect:box];outline.lineWidth=1.25;
|
||||
[DYAccent()setStroke];[outline stroke];
|
||||
}
|
||||
}
|
||||
- (void)describeSelection{if(_selectionChanged)_selectionChanged([NSString stringWithFormat:@"拖动主点,同列自由点联动 · 已选 %lu 点\n⌘ 多选 · Shift 固定 · 右键复位",(unsigned long)_selection.count]);}
|
||||
- (void)toggleLock{if(!_interactionEnabled||!_selection.count)return;BOOL all=YES;for(NSUInteger i=_selection.firstIndex;i!=NSNotFound;i=[_selection indexGreaterThanIndex:i])if(![_pinned containsIndex:i])all=NO;for(NSUInteger i=_selection.firstIndex;i!=NSNotFound;i=[_selection indexGreaterThanIndex:i]){if(all&&!dy::meshBoundary(_mesh,int(i)))[_pinned removeIndex:i];else[_pinned addIndex:i];}[self notifyChange];}
|
||||
- (void)selectRing{NSIndexSet*old=[[_selection copy]autorelease];for(NSUInteger i=old.firstIndex;i!=NSNotFound;i=[old indexGreaterThanIndex:i])if(i<[self nodeCount]-1)for(int s=0;s<_mesh.hues;s++)[_selection addIndex:dy::meshIndex(_mesh,s,int(i%_mesh.rings)+1)];[self describeSelection];self.needsDisplay=YES;}
|
||||
- (void)selectSpoke{NSIndexSet*old=[[_selection copy]autorelease];for(NSUInteger i=old.firstIndex;i!=NSNotFound;i=[old indexGreaterThanIndex:i])if(i<[self nodeCount]-1)for(int r=1;r<=_mesh.rings;r++)[_selection addIndex:dy::meshIndex(_mesh,int(i/_mesh.rings),r)];[self describeSelection];self.needsDisplay=YES;}
|
||||
- (void)resetSelected{if(!_interactionEnabled)return;auto d=dy::neutralMesh(_mesh.hues,_mesh.rings+1);for(NSUInteger i=_selection.firstIndex;i!=NSNotFound;i=[_selection indexGreaterThanIndex:i]){_mesh.x[i]=d.x[i];_mesh.y[i]=d.y[i];if(!dy::meshBoundary(_mesh,int(i)))[_pinned removeIndex:i];}[self notifyChange];}
|
||||
- (NSInteger)hitPoint:(NSPoint)p{float best=14;NSInteger chosen=-1;for(int i=0;i<[self nodeCount];i++){NSPoint q=[self point:i];float d=hypot(p.x-q.x,p.y-q.y);if(d<best){best=d;chosen=i;}}return chosen;}
|
||||
- (void)rightMouseDown:(NSEvent*)e{if(!_interactionEnabled)return;NSInteger i=[self hitPoint:[self convertPoint:e.locationInWindow fromView:nil]];if(i<0)return;_selected=i;[_selection removeAllIndexes];[_selection addIndex:i];[self resetSelected];[_selection removeAllIndexes];[self describeSelection];}
|
||||
- (void)mouseDown:(NSEvent*)e {
|
||||
if(!_interactionEnabled)return;[self.window makeFirstResponder:self];NSPoint p=[self convertPoint:e.locationInWindow fromView:nil];NSInteger chosen=[self hitPoint:p];
|
||||
_dragOrigin=_marqueeEnd=p;_dragGrade=_grade;_dragMesh=_mesh;[_selectionStart release];_selectionStart=[_selection mutableCopy];[_pinsStart release];_pinsStart=[_pinned mutableCopy];_dragging=_marquee=NO;_selected=chosen;
|
||||
BOOL additive=(e.modifierFlags&NSEventModifierFlagCommand)!=0;
|
||||
if(chosen>=0&&(e.modifierFlags&NSEventModifierFlagShift)){[_pinned addIndex:chosen];[self notifyChange];return;}
|
||||
if(chosen<0){_marquee=YES;if(!additive)[_selection removeAllIndexes];if(!additive)[_selectionStart removeAllIndexes];}
|
||||
else if(additive){if([_selection containsIndex:chosen])[_selection removeIndex:chosen];else[_selection addIndex:chosen];}
|
||||
else {if(![_selection containsIndex:chosen]){[_selection removeAllIndexes];[_selection addIndex:chosen];}if(e.clickCount>=2)[self resetSelected];else _dragging=YES;}
|
||||
[self describeSelection];self.needsDisplay=YES;
|
||||
}
|
||||
- (void)mouseDragged:(NSEvent*)e {
|
||||
if(!_interactionEnabled)return;NSPoint p=[self convertPoint:e.locationInWindow fromView:nil];
|
||||
if(_marquee){_marqueeEnd=p;NSRect box=NSMakeRect(MIN(_dragOrigin.x,p.x),MIN(_dragOrigin.y,p.y),fabs(p.x-_dragOrigin.x),fabs(p.y-_dragOrigin.y));self.selection=[[_selectionStart mutableCopy]autorelease];for(int i=0;i<[self nodeCount];i++)if(NSPointInRect([self point:i],box))[_selection addIndex:i];[self describeSelection];self.needsDisplay=YES;}
|
||||
else if(_dragging){if(!_gestureActive){_gestureActive=YES;if(_gesture)_gesture(YES);}NSRect r=self.discRect;[self moveFrom:_dragGrade x:(p.x-_dragOrigin.x)/r.size.width y:(p.y-_dragOrigin.y)/r.size.height];}
|
||||
}
|
||||
- (void)mouseUp:(NSEvent*)e{_dragging=_marquee=NO;[self finishGesture];self.needsDisplay=YES;}
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#import <Foundation/Foundation.h>
|
||||
#include "SpiderCore/DYSpiderMesh.hpp"
|
||||
static inline BOOL DYSpiderMeshIsValid(NSData *data){dy::SpiderMesh m{};if(data.length!=sizeof(m))return NO;memcpy(&m,data.bytes,sizeof(m));return dy::validMesh(m);}
|
||||
static inline dy::SpiderMesh DYSpiderMesh(NSData *data){dy::SpiderMesh m=dy::neutralMesh();if(DYSpiderMeshIsValid(data))memcpy(&m,data.bytes,sizeof(m));return m;}
|
||||
static inline NSDictionary *DYSpiderJSON(NSData *data,BOOL linked){auto m=DYSpiderMesh(data);NSMutableArray *x=[NSMutableArray array],*y=[NSMutableArray array],*pins=[NSMutableArray array];for(int i=0;i<dy::meshCount(m);i++){[x addObject:@(m.x[i])];[y addObject:@(m.y[i])];[pins addObject:@(m.pins[i])];}return @{@"hues":@(m.hues),@"saturation":@(m.rings+1),@"x":x,@"y":y,@"pins":pins,@"linked":@(linked)};}
|
||||
static inline NSData *DYSpiderFromJSON(id json){
|
||||
if(![json isKindOfClass:NSDictionary.class])return nil;
|
||||
for(NSString *key in @[@"hues",@"saturation",@"linked"])if(![json[key]isKindOfClass:NSNumber.class])return nil;
|
||||
double hues=[json[@"hues"]doubleValue],sat=[json[@"saturation"]doubleValue];if(!std::isfinite(hues)||!std::isfinite(sat)||hues!=floor(hues)||sat!=floor(sat)||hues<6||hues>24||sat<6||sat>24||!dySpiderResolution((int)hues)||!dySpiderResolution((int)sat))return nil;
|
||||
auto m=dy::neutralMesh((int)hues,(int)sat);NSUInteger count=dy::meshCount(m);for(NSString *key in @[@"x",@"y",@"pins"])if(![json[key]isKindOfClass:NSArray.class]||[json[key]count]!=count)return nil;
|
||||
for(NSUInteger i=0;i<count;i++){for(NSString *key in @[@"x",@"y",@"pins"])if(![json[key][i]isKindOfClass:NSNumber.class])return nil;double pin=[json[@"pins"][i]doubleValue];if(pin!=0&&pin!=1)return nil;m.x[i]=[json[@"x"][i]floatValue];m.y[i]=[json[@"y"][i]floatValue];m.pins[i]=(uint8_t)pin;}
|
||||
return dy::validMesh(m)?[NSData dataWithBytes:&m length:sizeof(m)]:nil;
|
||||
}
|
||||
+9
-2
@@ -16,6 +16,8 @@ typedef vector_float4 DYFloat4;
|
||||
typedef uint32_t DYUInt;
|
||||
#endif
|
||||
|
||||
#include "DYColorManagement.h"
|
||||
|
||||
typedef struct DYUniforms {
|
||||
float exposure; // offset 0
|
||||
float contrast; // offset 4
|
||||
@@ -119,12 +121,17 @@ typedef struct DYUniforms {
|
||||
DYFloat4 greenCurveExtraX; // offset 896
|
||||
DYFloat4 blueCurveExtra; // offset 912
|
||||
DYFloat4 blueCurveExtraX; // offset 928
|
||||
DYCMSettings cm; // appended; recovered color arithmetic reads only the stable prefix
|
||||
float primarySectionEnabled;
|
||||
float spiderSectionEnabled;
|
||||
float spiderMix;
|
||||
} DYUniforms;
|
||||
|
||||
typedef struct DYVertex2D { DYFloat2 position; DYFloat2 textureCoordinate; } DYVertex2D;
|
||||
typedef struct DYRenderOptions {
|
||||
DYUInt outputPremultiplied;
|
||||
DYUInt reserved[3];
|
||||
float blackWhiteMix;
|
||||
DYUInt reserved[2];
|
||||
} DYRenderOptions;
|
||||
|
||||
#ifndef __METAL_VERSION__
|
||||
@@ -133,7 +140,7 @@ typedef struct DYRenderOptions {
|
||||
#else
|
||||
#define DY_ABI_ASSERT _Static_assert
|
||||
#endif
|
||||
DY_ABI_ASSERT(sizeof(DYUniforms) == 944, "DYUniforms must match recovered GPU ABI");
|
||||
DY_ABI_ASSERT(offsetof(DYUniforms, cm) == 944, "DYUniforms must match recovered GPU ABI");
|
||||
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");
|
||||
|
||||
+2
-2
@@ -17,9 +17,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XPC!</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.1.5</string>
|
||||
<string>1.3.1</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>16</string>
|
||||
<string>19</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
<key>PlugInKit</key>
|
||||
|
||||
二进制文件未显示。
|
之后 宽度: | 高度: | 大小: 102 KiB |
@@ -0,0 +1,236 @@
|
||||
#pragma once
|
||||
#ifdef __METAL_VERSION__
|
||||
#include <metal_stdlib>
|
||||
using namespace metal;
|
||||
#define DYREF constant
|
||||
#else
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <simd/simd.h>
|
||||
using float3 = simd_float3;
|
||||
#define DYREF const
|
||||
using std::floor; using std::pow; using std::sqrt; using std::atan2; using std::log2; using std::exp2; using std::isfinite;
|
||||
#endif
|
||||
|
||||
// Plain scalar layout is identical in the Metal and C++ ABI.
|
||||
struct DYGrade {
|
||||
float exposure, contrast, saturation, temperature, tint;
|
||||
float shadows, highlights, blackPoint, whitePoint, gamma;
|
||||
float lift[3], gain[3], midtone[3];
|
||||
float curve[5];
|
||||
float spiderX[81], spiderY[81];
|
||||
float lutMix, mix;
|
||||
float localExposure, localSaturation;
|
||||
float maskX, maskY, maskW, maskH, maskAngle, feather, imageAspect;
|
||||
int spiderEnabled, maskEnabled, maskInvert, maskView, bypass;
|
||||
// Schema 4 extension. Keep the complete legacy 808-byte prefix above intact.
|
||||
float hslHue, hslSaturation, hslLightness;
|
||||
// R, Y, G, C, B, M and an independently adjustable skin-tone target.
|
||||
// Hue and half-width use turns; saturation is a multiplier, lightness is -1...1.
|
||||
float vectorHue[7], vectorSaturation[7], vectorLightness[7], vectorWidth[7];
|
||||
float skinHue;
|
||||
float rgbCurve[3][5];
|
||||
// Row-major RGB output-from-input matrix.
|
||||
float channelMixer[9];
|
||||
};
|
||||
inline float dyClamp(float x,float a,float b){return x<a?a:(x>b?b:x);}
|
||||
// For bounded lookup coordinates only: NaN selects the first sample, infinities
|
||||
// select an endpoint. Finite arithmetic and unrestricted HDR values elsewhere
|
||||
// are unchanged; this is not a color-range clamp.
|
||||
inline float dyUnitIndexCoordinate(float x){return isfinite(x)?dyClamp(x,0,1):(x>0?1:0);}
|
||||
inline float dySafePow(float x,float e){if(x<=0)return 0;if(e==1)return x;return exp2(dyClamp(log2(x)*e,-80,15));}
|
||||
inline float3 dyLimit(float3 c){for(int k=0;k<3;k++)c[k]=isfinite(c[k])?dyClamp(c[k],-65504,65504):0;return c;}
|
||||
inline float dyMix(float a,float b,float t){return a+(b-a)*t;}
|
||||
inline float dySmooth(float a,float b,float x){float t=dyClamp((x-a)/(b-a),0,1);return t*t*(3-2*t);}
|
||||
inline float dyLuma(float3 c){return c.x*.2126f+c.y*.7152f+c.z*.0722f;}
|
||||
inline float3 dyRGBHSV(float3 c){
|
||||
float mx=c.x>c.y?(c.x>c.z?c.x:c.z):(c.y>c.z?c.y:c.z);
|
||||
float mn=c.x<c.y?(c.x<c.z?c.x:c.z):(c.y<c.z?c.y:c.z);
|
||||
float d=mx-mn,h=0;
|
||||
if(d>1e-8f){if(mx==c.x)h=(c.y-c.z)/d;else if(mx==c.y)h=(c.z-c.x)/d+2;else h=(c.x-c.y)/d+4;h/=6;if(h<0)h+=1;}
|
||||
return float3{h,mx>1e-8f?d/mx:0,mx};
|
||||
}
|
||||
inline float3 dyHSVRGB(float3 h){
|
||||
if(!isfinite(h.x))return float3{h.x,h.x,h.x};
|
||||
float h6=(h.x-floor(h.x))*6;int k=int(floor(h6));float f=h6-k;
|
||||
float p=h.z*(1-h.y),q=h.z*(1-h.y*f),t=h.z*(1-h.y*(1-f));
|
||||
switch(k){case 0:return float3{h.z,t,p};case 1:return float3{q,h.z,p};case 2:return float3{p,h.z,t};case 3:return float3{p,q,h.z};case 4:return float3{t,p,h.z};default:return float3{h.z,p,q};}
|
||||
}
|
||||
// HSL tools are an independent implementation. Extended-range RGB is translated
|
||||
// and scaled into a unit working interval, then restored without clipping HDR or
|
||||
// negative values. Neutral controls bypass this conversion exactly.
|
||||
inline float3 dyRGBHSL(float3 c){
|
||||
float mx=c.x>c.y?(c.x>c.z?c.x:c.z):(c.y>c.z?c.y:c.z);
|
||||
float mn=c.x<c.y?(c.x<c.z?c.x:c.z):(c.y<c.z?c.y:c.z);
|
||||
float delta=mx-mn,l=(mx+mn)*.5f,h=0,s=0;
|
||||
if(delta>1e-8f){
|
||||
if(mx==c.x)h=(c.y-c.z)/delta;else if(mx==c.y)h=(c.z-c.x)/delta+2;else h=(c.x-c.y)/delta+4;
|
||||
h/=6;if(h<0)h+=1;
|
||||
float denominator=l<.5f?mx+mn:2-mx-mn;
|
||||
s=denominator>1e-8f?delta/denominator:0;
|
||||
}
|
||||
return float3{h,dyClamp(s,0,1),l};
|
||||
}
|
||||
inline float3 dyHSLRGB(float3 h){
|
||||
if(!isfinite(h.x))return float3{h.x,h.x,h.x};
|
||||
float light=dyClamp(h.z,0,1),sat=dyClamp(h.y,0,1);
|
||||
float chroma=(light<.5f?2*light:2*(1-light))*sat;
|
||||
float hue=(h.x-floor(h.x))*6,part=hue-floor(hue/2)*2;
|
||||
float second=chroma*(1-(part>1?part-1:1-part));
|
||||
float3 c;switch(int(floor(hue))){
|
||||
case 0:c=float3{chroma,second,0};break;case 1:c=float3{second,chroma,0};break;
|
||||
case 2:c=float3{0,chroma,second};break;case 3:c=float3{0,second,chroma};break;
|
||||
case 4:c=float3{second,0,chroma};break;default:c=float3{chroma,0,second};break;
|
||||
}
|
||||
return c+float3{light-chroma*.5f,light-chroma*.5f,light-chroma*.5f};
|
||||
}
|
||||
inline float dyHueDistance(float a,float b){float d=a-b;d-=floor(d+.5f);return d<0?-d:d;}
|
||||
inline float dyLightnessShift(float light,float amount){
|
||||
amount=dyClamp(amount,-1,1);return amount>=0?light+(1-light)*amount:light*(1+amount);
|
||||
}
|
||||
inline float3 dyHSLTools(float3 c,DYREF DYGrade& p){
|
||||
bool quick=p.hslHue!=0||p.hslSaturation!=1||p.hslLightness!=0,vectors=false;
|
||||
for(int i=0;i<7;i++)vectors=vectors||p.vectorHue[i]!=0||p.vectorSaturation[i]!=1||p.vectorLightness[i]!=0;
|
||||
if(!quick&&!vectors)return c;
|
||||
// Bounded finite input also prevents a huge channel span from overflowing.
|
||||
c=dyLimit(c);
|
||||
float minimum=c.x<c.y?(c.x<c.z?c.x:c.z):(c.y<c.z?c.y:c.z);
|
||||
float maximum=c.x>c.y?(c.x>c.z?c.x:c.z):(c.y>c.z?c.y:c.z);
|
||||
float offset=minimum<0?minimum:0,scale=maximum-offset;if(scale<1)scale=1;
|
||||
float3 base=float3{offset,offset,offset};float3 hsl=dyRGBHSL((c-base)/scale);
|
||||
if(quick){hsl.x+=p.hslHue;hsl.x-=floor(hsl.x);hsl.y=dyClamp(hsl.y*p.hslSaturation,0,1);hsl.z=dyLightnessShift(hsl.z,p.hslLightness);}
|
||||
if(vectors){
|
||||
// Select all zones from one immutable hue. A changed vector never moves
|
||||
// the selection region of a later vector. Neutral pixels receive no tint.
|
||||
float hue=hsl.x,hueShift=0,saturation=1,lightness=0;
|
||||
float chromaWeight=dySmooth(0,.06f,hsl.y);
|
||||
for(int i=0;i<7;i++){
|
||||
if(p.vectorHue[i]==0&&p.vectorSaturation[i]==1&&p.vectorLightness[i]==0)continue;
|
||||
float center=i<6?float(i)/6:p.skinHue;
|
||||
float weight=(1-dySmooth(0,dyClamp(p.vectorWidth[i],1.f/720,.5f),dyHueDistance(hue,center)))*chromaWeight;
|
||||
hueShift+=p.vectorHue[i]*weight;saturation+=(p.vectorSaturation[i]-1)*weight;lightness+=p.vectorLightness[i]*weight;
|
||||
}
|
||||
hsl.x+=hueShift;hsl.y=dyClamp(hsl.y*saturation,0,1);hsl.z=dyLightnessShift(hsl.z,lightness);
|
||||
}
|
||||
return dyHSLRGB(hsl)*scale+base;
|
||||
}
|
||||
inline int dySpiderIndex(int s,int ring){return ring<=0?80:((s+16)%16)*5+(ring>5?4:ring-1);}
|
||||
inline float3 dySpider(float3 c,DYREF DYGrade& p){
|
||||
float3 hsv=dyRGBHSV(c);if(hsv.z<=1e-8f)return c;float u=hsv.x*16,v=dyClamp(hsv.y,0,1)*5;
|
||||
if(!isfinite(u)||!isfinite(v))return c;
|
||||
int s=int(floor(u)),r=int(floor(v));float a=u-s,b=v-r;
|
||||
int i00=dySpiderIndex(s,r),i10=dySpiderIndex(s+1,r),i01=dySpiderIndex(s,r+1),i11=dySpiderIndex(s+1,r+1);
|
||||
float x=dyMix(dyMix(p.spiderX[i00],p.spiderX[i10],a),dyMix(p.spiderX[i01],p.spiderX[i11],a),b)-.5f;
|
||||
float y=dyMix(dyMix(p.spiderY[i00],p.spiderY[i10],a),dyMix(p.spiderY[i01],p.spiderY[i11],a),b)-.5f;
|
||||
// Compensate the chord contraction of the polar control mesh, so a neutral mesh is identity.
|
||||
float theta=hsv.x*6.28318530718f,rad=hsv.y*.5f;
|
||||
float ax=0,ay=0;
|
||||
for(int j=0;j<4;j++){
|
||||
int ss=s+(j%2),rr=r+(j/2);rr=rr>5?5:rr;
|
||||
float w=(j%2?a:1-a)*(j/2?b:1-b);
|
||||
float ang=float(ss%16)*6.28318530718f/16;
|
||||
ax+=cos(ang)*float(rr)*.1f*w;ay+=sin(ang)*float(rr)*.1f*w;
|
||||
}
|
||||
x+=cos(theta)*rad-ax;y+=sin(theta)*rad-ay;
|
||||
// Metal fast atan2(0,0) is undefined. A mapped neutral has no hue;
|
||||
// return its luminance directly, while still allowing a moved center to tint it.
|
||||
if(x*x+y*y<1e-16f)return float3{hsv.z,hsv.z,hsv.z};
|
||||
float hue=atan2(y,x)/6.28318530718f;if(hue<0)hue+=1;
|
||||
return dyHSVRGB(float3{hue,sqrt(x*x+y*y)*2,hsv.z});
|
||||
}
|
||||
inline float dyCurveControls(float x,DYREF float* controls){
|
||||
// Monotone cubic interpolation of five fixed abscissas; zero controls yield exact identity.
|
||||
// Preserve invalid color for the caller's transfer policy, without ever
|
||||
// converting NaN to an integer or using it as an array subscript.
|
||||
if(!isfinite(x))return x;
|
||||
float t=dyClamp(x,0,1)*4;int i=int(floor(t));if(i>3)i=3;t-=i;
|
||||
float y0=float(i)*.25f+controls[i],y1=float(i+1)*.25f+controls[i+1];
|
||||
float d=(y1-y0)*4;
|
||||
float left=i>0?(y0-(float(i-1)*.25f+controls[i-1]))*4:d;
|
||||
float right=i<3?((float(i+2)*.25f+controls[i+2])-y1)*4:d;
|
||||
float m0=left*d<=0?0:2*left*d/(left+d),m1=right*d<=0?0:2*right*d/(right+d);
|
||||
float t2=t*t,t3=t2*t;float out=(2*t3-3*t2+1)*y0+(t3-2*t2+t)*m0*.25f+(-2*t3+3*t2)*y1+(t3-t2)*m1*.25f;
|
||||
return x<0?x+controls[0]:(x>1?x+controls[4]:out);
|
||||
}
|
||||
inline float dyCurve(float x,DYREF DYGrade& p){return dyCurveControls(x,p.curve);}
|
||||
#ifdef __METAL_VERSION__
|
||||
#define DYSPIDER_BUFFER device const
|
||||
#else
|
||||
#define DYSPIDER_BUFFER const
|
||||
#endif
|
||||
inline bool dySpiderResolution(int n){return n==6||n==8||n==12||n==16||n==24;}
|
||||
inline int dyMeshIndex(int hue,int ring,int hues,int rings){return ring<=0?hues*rings:((hue+hues)%hues)*rings+(ring>rings?rings-1:ring-1);}
|
||||
// Samples are XY displacements from the undeformed polar mesh, interleaved.
|
||||
// This avoids polygon chord contraction and gives an exactly neutral mesh.
|
||||
inline float3 dyVariableSpider(float3 c,int hues,int rings,DYSPIDER_BUFFER float* samples){
|
||||
float3 hsv=dyRGBHSV(c);if(hsv.z<=1e-8f)return c;
|
||||
float u=hsv.x*hues,v=dyClamp(hsv.y,0,1)*rings;if(!isfinite(u)||!isfinite(v))return c;
|
||||
int h=int(floor(u)),r=int(floor(v));float a=u-h,b=v-r,dx=0,dy=0;
|
||||
for(int j=0;j<4;j++){int i=dyMeshIndex(h+j%2,r+j/2,hues,rings);float w=(j%2?a:1-a)*(j/2?b:1-b);dx+=samples[2*i]*w;dy+=samples[2*i+1]*w;}
|
||||
if(dx==0&&dy==0)return c;
|
||||
float theta=hsv.x*6.28318530718f,x=cos(theta)*hsv.y*.5f+dx,y=sin(theta)*hsv.y*.5f+dy;
|
||||
if(x*x+y*y<1e-16f)return float3{hsv.z,hsv.z,hsv.z};
|
||||
float hue=atan2(y,x)/6.28318530718f;if(hue<0)hue+=1;
|
||||
return dyHSVRGB(float3{hue,sqrt(x*x+y*y)*2,hsv.z});
|
||||
}
|
||||
inline float3 dyGradeColor(float3 c,DYREF DYGrade& p,int hues=0,int rings=0,DYSPIDER_BUFFER float* mesh=nullptr){
|
||||
c*=pow(2.f,p.exposure);
|
||||
c*=float3{pow(2.f,p.temperature*.22f+p.tint*.08f),pow(2.f,-p.tint*.16f),pow(2.f,-p.temperature*.22f+p.tint*.08f)};
|
||||
for(int k=0;k<3;k++){
|
||||
float v=c[k]+p.lift[k]*(1-c[k]);v*=1+p.gain[k];
|
||||
v=v>=0?dySafePow(v,1.f/dyClamp(1+p.midtone[k],.1f,4.f)):v;
|
||||
v=(v-p.blackPoint)/(p.whitePoint-p.blackPoint>1e-5f?p.whitePoint-p.blackPoint:1e-5f);
|
||||
v=(v-.5f)*p.contrast+.5f;
|
||||
v+=p.shadows*.22f*(1-dySmooth(0,.65f,v))+p.highlights*.22f*dySmooth(.3f,1,v);
|
||||
v=v>=0?dySafePow(v,1.f/dyClamp(p.gamma,.1f,10.f)):v;c[k]=dyCurve(v,p);
|
||||
bool rgbCurveActive=false;for(int j=0;j<5;j++)rgbCurveActive=rgbCurveActive||p.rgbCurve[k][j]!=0;
|
||||
if(rgbCurveActive)c[k]=dyCurveControls(c[k],p.rgbCurve[k]);
|
||||
}
|
||||
float y=dyLuma(c);c=float3{y,y,y}+(c-float3{y,y,y})*p.saturation;
|
||||
if(p.spiderEnabled)c=hues?dyVariableSpider(c,hues,rings,mesh):dySpider(c,p);
|
||||
c=dyHSLTools(c,p);
|
||||
bool mixerActive=false;for(int i=0;i<9;i++)mixerActive=mixerActive||p.channelMixer[i]!=(i%4==0?1:0);
|
||||
if(mixerActive){float3 input=c;for(int row=0;row<3;row++)c[row]=p.channelMixer[row*3]*input.x+p.channelMixer[row*3+1]*input.y+p.channelMixer[row*3+2]*input.z;}
|
||||
return c;
|
||||
}
|
||||
inline float dyMask(float x,float y,DYREF DYGrade& p){
|
||||
float aspect=p.imageAspect>0?p.imageAspect:1;
|
||||
float dx=(x-p.maskX)*aspect,dy=y-p.maskY,ca=cos(p.maskAngle),sa=sin(p.maskAngle);
|
||||
float u=(dx*ca+dy*sa)/(p.maskW*aspect*.5f),v=(-dx*sa+dy*ca)/(p.maskH*.5f);
|
||||
float d=sqrt(u*u+v*v);float a=1-dySmooth(1-dyClamp(p.feather,.001f,.99f),1,d);
|
||||
return p.maskInvert?1-a:a;
|
||||
}
|
||||
inline float3 dyLocal(float3 c,float a,DYREF DYGrade& p){
|
||||
float3 l=c*pow(2.f,p.localExposure);float y=dyLuma(l);
|
||||
l=float3{y,y,y}+(l-float3{y,y,y})*p.localSaturation;return c+(l-c)*a;
|
||||
}
|
||||
#ifndef __METAL_VERSION__
|
||||
inline DYGrade dyDefaultGrade(){
|
||||
DYGrade p{};p.contrast=p.saturation=p.whitePoint=p.gamma=p.lutMix=p.mix=p.localSaturation=1;
|
||||
p.hslSaturation=1;p.skinHue=1.f/12;
|
||||
for(int i=0;i<7;i++){p.vectorSaturation[i]=1;p.vectorWidth[i]=i<6?1.f/6:1.f/12;}
|
||||
for(int i=0;i<3;i++)p.channelMixer[i*4]=1;
|
||||
p.imageAspect=1;p.maskX=p.maskY=.5f;p.maskW=p.maskH=.3f;p.feather=.25f;
|
||||
for(int s=0;s<16;s++)for(int r=1;r<=5;r++){int i=dySpiderIndex(s,r);float a=s*6.28318530718f/16;p.spiderX[i]=.5f+cos(a)*r*.1f;p.spiderY[i]=.5f+sin(a)*r*.1f;}
|
||||
p.spiderX[80]=p.spiderY[80]=.5f;return p;
|
||||
}
|
||||
inline DYGrade dySanitizeGrade(DYGrade p){
|
||||
DYGrade d=dyDefaultGrade();float*a=(float*)&p;const float*b=(const float*)&d;
|
||||
for(size_t i=0;i<offsetof(DYGrade,spiderEnabled)/sizeof(float);i++)if(!std::isfinite(a[i]))a[i]=b[i];
|
||||
for(size_t i=offsetof(DYGrade,hslHue)/sizeof(float);i<sizeof(DYGrade)/sizeof(float);i++)if(!std::isfinite(a[i]))a[i]=b[i];
|
||||
p.exposure=dyClamp(p.exposure,-12,12);p.contrast=dyClamp(p.contrast,0,8);p.saturation=dyClamp(p.saturation,0,5);
|
||||
p.temperature=dyClamp(p.temperature,-4,4);p.tint=dyClamp(p.tint,-4,4);p.gamma=dyClamp(p.gamma,.1,10);
|
||||
p.blackPoint=dyClamp(p.blackPoint,-4,4);p.whitePoint=dyClamp(p.whitePoint,-4,16);if(p.whitePoint<=p.blackPoint+.01f){p.blackPoint=0;p.whitePoint=1;}
|
||||
for(int k=0;k<3;k++){p.lift[k]=dyClamp(p.lift[k],-2,2);p.gain[k]=dyClamp(p.gain[k],-2,2);p.midtone[k]=dyClamp(p.midtone[k],-.9,3);}
|
||||
for(int k=0;k<5;k++)p.curve[k]=dyClamp(p.curve[k],-4,4);
|
||||
for(int k=0;k<81;k++){p.spiderX[k]=dyClamp(p.spiderX[k],-4,4);p.spiderY[k]=dyClamp(p.spiderY[k],-4,4);}
|
||||
p.maskW=dyClamp(p.maskW,.001,4);p.maskH=dyClamp(p.maskH,.001,4);p.imageAspect=dyClamp(p.imageAspect,.01,100);
|
||||
p.feather=dyClamp(p.feather,.001,.99);p.localExposure=dyClamp(p.localExposure,-12,12);p.localSaturation=dyClamp(p.localSaturation,0,5);
|
||||
p.mix=dyClamp(p.mix,0,1);p.lutMix=dyClamp(p.lutMix,0,1);p.spiderEnabled=!!p.spiderEnabled;p.maskEnabled=!!p.maskEnabled;p.maskInvert=!!p.maskInvert;p.maskView=!!p.maskView;p.bypass=!!p.bypass;
|
||||
p.hslHue=dyClamp(p.hslHue,-.5f,.5f);p.hslSaturation=dyClamp(p.hslSaturation,0,2);p.hslLightness=dyClamp(p.hslLightness,-1,1);p.skinHue=dyClamp(p.skinHue,0,1);
|
||||
for(int i=0;i<7;i++){p.vectorHue[i]=dyClamp(p.vectorHue[i],-1.f/6,1.f/6);p.vectorSaturation[i]=dyClamp(p.vectorSaturation[i],0,2);p.vectorLightness[i]=dyClamp(p.vectorLightness[i],-1,1);p.vectorWidth[i]=dyClamp(p.vectorWidth[i],1.f/720,.5f);}
|
||||
for(int k=0;k<3;k++)for(int i=0;i<5;i++)p.rgbCurve[k][i]=dyClamp(p.rgbCurve[k][i],-4,4);
|
||||
for(int i=0;i<9;i++)p.channelMixer[i]=dyClamp(p.channelMixer[i],-4,4);
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
#include "DYColorMath.h"
|
||||
#include <bitset>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
namespace dy {
|
||||
enum {SpiderMeshCapacity=24*23+1};
|
||||
// Fixed, zero-initialized archive layout. Counts include the neutral center on
|
||||
// the saturation axis: Resolve's 6x6 is six hues and five rings plus center.
|
||||
struct SpiderMesh {int hues,rings;float x[SpiderMeshCapacity],y[SpiderMeshCapacity];uint8_t pins[SpiderMeshCapacity];};
|
||||
inline int meshCount(const SpiderMesh&m){return m.hues*m.rings+1;}
|
||||
inline int meshIndex(const SpiderMesh&m,int h,int r){return dyMeshIndex(h,r,m.hues,m.rings);}
|
||||
inline bool meshBoundary(const SpiderMesh&m,int i){return i==meshCount(m)-1||i%m.rings==m.rings-1;}
|
||||
inline simd_float2 meshNeutral(const SpiderMesh&m,int i){if(i==meshCount(m)-1)return {.5f,.5f};float a=float(i/m.rings)*6.28318530718f/m.hues,r=float(i%m.rings+1)*.5f/m.rings;return {.5f+cos(a)*r,.5f+sin(a)*r};}
|
||||
inline SpiderMesh neutralMesh(int hues=6,int saturation=6){SpiderMesh m{};m.hues=hues;m.rings=saturation-1;for(int i=0;i<meshCount(m);i++){auto q=meshNeutral(m,i);m.x[i]=q.x;m.y[i]=q.y;m.pins[i]=meshBoundary(m,i);}return m;}
|
||||
inline bool validMesh(const SpiderMesh&m){if(!dySpiderResolution(m.hues)||!dySpiderResolution(m.rings+1))return false;for(int i=0;i<meshCount(m);i++)if(!std::isfinite(m.x[i])||!std::isfinite(m.y[i])||fabs(m.x[i])>4||fabs(m.y[i])>4||m.pins[i]>1||(!m.pins[i]&&meshBoundary(m,i)))return false;return true;}
|
||||
inline SpiderMesh legacyMesh(const DYGrade&g,const uint8_t*pins=nullptr){auto m=neutralMesh(16,6);for(int i=0;i<81;i++){m.x[i]=g.spiderX[i];m.y[i]=g.spiderY[i];m.pins[i]=meshBoundary(m,i)||(pins&&pins[i]);}return m;}
|
||||
inline bool legacyMeshNeutral(const DYGrade&g){auto d=dyDefaultGrade();return !memcmp(g.spiderX,d.spiderX,sizeof(g.spiderX))&&!memcmp(g.spiderY,d.spiderY,sizeof(g.spiderY));}
|
||||
inline simd_float2 meshDelta(const SpiderMesh&m,float hue,float saturation){float u=hue*m.hues,v=saturation*m.rings;int h=int(floor(u)),r=int(floor(v));float a=u-h,b=v-r;simd_float2 d{};for(int j=0;j<4;j++){int i=meshIndex(m,h+j%2,r+j/2);auto q=meshNeutral(m,i);float w=(j%2?a:1-a)*(j/2?b:1-b);d+=(simd_float2{m.x[i],m.y[i]}-q)*w;}return d;}
|
||||
inline SpiderMesh resampleMesh(const SpiderMesh&from,int hues,int saturation){if(from.hues==hues&&from.rings+1==saturation)return from;auto m=neutralMesh(hues,saturation);for(int i=0;i<meshCount(m);i++){float h=i==meshCount(m)-1?0:float(i/m.rings)/m.hues,s=i==meshCount(m)-1?0:float(i%m.rings+1)/m.rings;auto d=meshDelta(from,h,s);m.x[i]=dyClamp(m.x[i]+d.x,-4,4);m.y[i]=dyClamp(m.y[i]+d.y,-4,4);
|
||||
// Retain user pins at coincident control coordinates; boundaries remain implicit.
|
||||
float sh=h*from.hues,sr=s*from.rings;int hi=int(lround(sh)),ri=int(lround(sr));if(fabs(sh-hi)<1e-5&&fabs(sr-ri)<1e-5)m.pins[i]|=from.pins[meshIndex(from,hi,ri)];}return m;}
|
||||
inline DYGrade meshLegacyGrade(DYGrade g,const SpiderMesh&m){if(m.hues==16&&m.rings==5){memcpy(g.spiderX,m.x,sizeof(g.spiderX));memcpy(g.spiderY,m.y,sizeof(g.spiderY));return g;}auto d=dyDefaultGrade();for(int i=0;i<81;i++){float h=i==80?0:float(i/5)/16,s=i==80?0:float(i%5+1)/5;auto delta=meshDelta(m,h,s);g.spiderX[i]=dyClamp(d.spiderX[i]+delta.x,-4,4);g.spiderY[i]=dyClamp(d.spiderY[i]+delta.y,-4,4);}return g;}
|
||||
inline std::vector<float> meshSamples(const SpiderMesh&m){std::vector<float>s(2*meshCount(m));for(int i=0;i<meshCount(m);i++){auto n=meshNeutral(m,i);s[2*i]=m.x[i]-n.x;s[2*i+1]=m.y[i]-n.y;}return s;}
|
||||
inline SpiderMesh moveMesh(const SpiderMesh&start,const std::bitset<SpiderMeshCapacity>&selected,float dx,float dy){auto m=start;if(selected.none()||!std::isfinite(dx)||!std::isfinite(dy))return m;
|
||||
auto delta=[&](int i){return simd_float2{selected[i]?dx:0,selected[i]?dy:0};};auto apply=[&](int i,simd_float2 d){m.x[i]=dyClamp(start.x[i]+d.x,-4,4);m.y[i]=dyClamp(start.y[i]+d.y,-4,4);};int center=meshCount(m)-1;apply(center,delta(center));
|
||||
for(int h=0;h<m.hues;h++){int left=0;for(int right=1;right<=m.rings;right++){int i=meshIndex(m,h,right);if(right!=m.rings&&!selected[i]&&!start.pins[i])continue;auto a=delta(meshIndex(m,h,left)),b=delta(i);for(int r=left+1;r<=right;r++)apply(meshIndex(m,h,r),a+(b-a)*(float(r-left)/(right-left)));left=right;}}
|
||||
for(int i=0;i<meshCount(m);i++)if(selected[i])m.pins[i]=1;return m;}
|
||||
}
|
||||
@@ -17,9 +17,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.1.5</string>
|
||||
<string>1.3.1</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>16</string>
|
||||
<string>19</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
# 大鱼调色:蒙版、跟踪与可重复工具交接
|
||||
|
||||
更新日期:2026-11-01,Asia/Shanghai。本次只整理文档,未编译、替换或重新安装应用,也未操作用户正在使用的 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 浏览器和最近使用行为,保护已有工程和当前用户操作,分阶段验证并完成正式交付。
|
||||
在新工单中引用
屏蔽一个用户