比较提交

...
共修改 31 个文件,包含 1418 行新增和 154 行删除

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

+2 -1
查看文件
@@ -42,6 +42,7 @@
"adaptations": [
"Dedicated com.dayu.color runtime cache",
"Standalone RGBA/alpha header, excluding unrelated layer engine",
"No dependency on the sibling installed application"
"No dependency on the sibling installed application",
"Batch GPU profile prepare, Core Image and restore on the same command buffer for uncancelled render calls"
]
}
+32 -3
查看文件
@@ -123,9 +123,38 @@ CGColorSpaceRef DYCreateCMSOutputColorSpace(dycm::Output output){
admission(uint64_t(input.width)*input.height,bytes);auto desc=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA32Float width:input.width height:input.height mipmapped:NO];desc.storageMode=MTLStorageModePrivate;desc.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite;
auto opaque=[_device newTextureWithDescriptor:desc],converted=[_device newTextureWithDescriptor:desc];if(!opaque||!converted)throw std::runtime_error("无法分配颜色转换图像");uint64_t actual=input.allocatedSize+output.allocatedSize+opaque.allocatedSize+converted.allocatedSize;
if(actual>bytes||2*uint64_t(input.width)*input.height*16>bytes-actual)throw std::runtime_error("颜色转换实际纹理及估算系统工作区超过预算");
auto dispatch=[&](id<MTLComputePipelineState>pipeline,NSArray*textures){check(cancelled);auto command=[_queue commandBuffer];auto encoder=[command computeCommandEncoder];if(!encoder)throw std::runtime_error("无法建立颜色转换编码器");[encoder setComputePipelineState:pipeline];for(NSUInteger i=0;i<textures.count;i++)[encoder setTexture:textures[i] atIndex:i];uint32_t parameters[2]={alpha==dycm::Alpha::Premultiplied,uint32_t(_profile.decodeHLG)};[encoder setBytes:parameters length:sizeof(parameters) atIndex:0];NSUInteger x=pipeline.threadExecutionWidth,y=std::min(NSUInteger(8),pipeline.maxTotalThreadsPerThreadgroup/x);[encoder dispatchThreads:MTLSizeMake(input.width,input.height,1) threadsPerThreadgroup:MTLSizeMake(x,y,1)];[encoder endEncoding];finish(command);};
dispatch(_prepare,@[input,opaque]);auto image=[CIImage imageWithMTLTexture:opaque options:@{kCIImageColorSpace:(__bridge id)_profile.conversionSource,kCIImageToneMapHDRtoSDR:@NO}];auto destination=[[CIRenderDestination alloc]initWithMTLTexture:converted commandBuffer:nil];configure(destination,_profile.target);
if(!image||!render(_context,image,destination,input.width,input.height,error)){[_context clearCaches];return NO;}check(cancelled);dispatch(_restore,@[input,converted,output]);[_context clearCaches];return YES;
auto dispatch=[&](id<MTLCommandBuffer>command,id<MTLComputePipelineState>pipeline,NSArray*textures){
check(cancelled);
auto encoder=[command computeCommandEncoder];if(!encoder)throw std::runtime_error("无法建立颜色转换编码器");
[encoder setComputePipelineState:pipeline];
for(NSUInteger i=0;i<textures.count;i++)[encoder setTexture:textures[i] atIndex:i];
uint32_t parameters[2]={alpha==dycm::Alpha::Premultiplied,uint32_t(_profile.decodeHLG)};
[encoder setBytes:parameters length:sizeof(parameters) atIndex:0];
NSUInteger x=pipeline.threadExecutionWidth,y=std::min(NSUInteger(8),pipeline.maxTotalThreadsPerThreadgroup/x);
[encoder dispatchThreads:MTLSizeMake(input.width,input.height,1) threadsPerThreadgroup:MTLSizeMake(x,y,1)];
[encoder endEncoding];
};
auto command=[_queue commandBuffer];
dispatch(command,_prepare,@[input,opaque]);
// Keep cancellation checkpoints for callers that supply a cancellation flag.
if(cancelled){finish(command);command=nil;}
auto image=[CIImage imageWithMTLTexture:opaque options:@{kCIImageColorSpace:(__bridge id)_profile.conversionSource,kCIImageToneMapHDRtoSDR:@NO}];
auto destination=[[CIRenderDestination alloc]initWithMTLTexture:converted commandBuffer:command];
configure(destination,_profile.target);
NSError *underlying=nil;
CIRenderTask *task=image?[_context startTaskToRender:image fromRect:CGRectMake(0,0,input.width,input.height)
toDestination:destination atPoint:CGPointZero error:&underlying]:nil;
if(!task){if(error)*error=underlying?:failure(@"系统颜色配置转换未开始");return NO;}
if(cancelled){
if(![task waitUntilCompletedAndReturnError:&underlying]){if(error)*error=underlying?:failure(@"系统颜色配置转换未完成");return NO;}
command=[_queue commandBuffer];
}
dispatch(command,_restore,@[input,converted,output]);
finish(command);
if(!cancelled&&![task waitUntilCompletedAndReturnError:&underlying]){
if(error)*error=underlying?:failure(@"系统颜色配置转换未完成");return NO;
}
return YES;
}@catch(NSException*e){[_context clearCaches];if(error)*error=failure(e.reason?:@"显卡颜色转换异常");return NO;}}
}catch(const std::exception&e){if(error)*error=failure(@(e.what()));return NO;}
}
+17
查看文件
@@ -0,0 +1,17 @@
# 大鱼调色 1.21.8(126)
- 合并多层调色的 GPU 工作,减少颜色转换、蒙版混合和预览取样之间的等待。
- 复用已解析的宿主色彩配置。几何蒙版跳过色键转换,保留羽化和部分覆盖的原有混合方式。
- 曲线、一级白平衡轮和颜色分级轮在拖动时合并参数写入,松手提交最终值,每次拖动可一次撤销。
- Apple M4 的 4K 曝光加 HSL 蒙版渲染约 87.7 → 75.0 毫秒,128 帧测试输出逐字节一致。正式安装通过 1,028 项自检与 Final Cut Pro 12.4 工作台验收。
适用于 Apple Silicon 和 macOS 14.6 或更新版本。安装前保存并退出 Final Cut Pro 和 Motion。
| 项目 | 内容 |
| --- | --- |
| 实际编译提交 | `38e9fb25a21d7ba573f09093ea4ca45a79664cf5` |
| 安装包 | `大鱼调色-1.21.8.pkg` |
| 字节数 | 44529845 |
| SHA-256 | `8df87b7762f8a0d11b32e6947f5e4f3a358dce7e44505b20f8534b3a0e3e14b9` |
| APP 公证 | `c439ff82-db8e-44a9-83e4-68c62588a2de` |
| PKG 公证 | `2aa1a8fa-d48f-45a5-8a56-9ac084d8c7b3` |
+10
查看文件
@@ -1,3 +1,13 @@
# 2026-11-09 蜘蛛盘跟手优化 1.21.7(125)
远程 `https://dayu.media/git/dayu/dayu-color.git`,分支 `main`。编译提交 `5aae670f56201a17cffe6aff3624d1b8cfad2308`,发行标签 `v1.21.7-spider-fluidity-20261109` 指向 `039e567aaa563a36da5bbef90d0ccd4afd690183`。独立 HTTPS 检出逐字节核对编译节点 859 个、发行标签 864 个跟踪文件和 Git 完整性,构建输入一致,无 LFS 或子模块。[恢复核验](verification/Recovery1.21.7.json)
克隆后用 `git switch --detach 5aae670f56201a17cffe6aff3624d1b8cfad2308` 取回实际编译节点。使用 Xcode 27.1、FxPlug SDK 4.3.5、Apple Silicon 和锁定的 ColorManagement 依赖,运行 `tools/deliver.py`。正式位置 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,主 ID `com.dayu.color`,服务 `com.dayu.color.XPC`。团队 B3W25FX5H5 的证书、私钥和公证登录独立恢复。正式安装通过 1,022 项原生检查和 FCP 12.4 蜘蛛盘工作台拖动、撤销。[安装](verification/Delivery1.21.7.json) · [宿主](verification/HostSpiderFluidity1.21.7.json)
从验收后的正式 APP 运行 `Packaging/build_pkg.py`。APP 公证 `0b71188e-188c-4c78-9087-28fa62a87a51` 与 PKG 公证 `e9cab355-85bf-4a16-922b-a811aacb5b05` 均 Accepted。公测 Release **421** 附件 **67** 下载为 44528083 字节,SHA-256 `e4d327d4a4fdbcb025e17dd6aa1e0e884c435392b70bcc2e7402d100c07a10ef`。[发行页](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.21.7-spider-fluidity-20261109) · [验包](verification/Package1.21.7.json) · [下载核验](verification/Release1.21.7.json) · [开发交接](开发交接.md)
---
# 2026-11-08 LUT 预览复用 1.21.6(124)
远程 `https://dayu.media/git/dayu/dayu-color.git`,分支 `main`。实际编译提交 `e0bd8342c0b2231028af64abd7b544b2be8f29d7`,发行标签 `v1.21.6-lut-preview-reuse-20261108` 指向 `3de998257d9f9e989093d58604c44a4eb1fb3fad`。独立 HTTPS 检出逐字节核对编译节点 849 个、发行节点 853 个文件及 Git 完整性,无 LFS 或子模块。[恢复核验](verification/Recovery1.21.6.json)
+6 -7
查看文件
@@ -2,13 +2,13 @@
"status": "verified",
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"bundleID": "com.dayu.color",
"version": "1.21.7",
"build": "125",
"version": "1.21.8",
"build": "126",
"team": "B3W25FX5H5",
"notaryID": "0b71188e-188c-4c78-9087-28fa62a87a51",
"notaryID": "c439ff82-db8e-44a9-83e4-68c62588a2de",
"notaryStatus": "Accepted",
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
"sourceCommit": "5aae670f56201a17cffe6aff3624d1b8cfad2308",
"sourceCommit": "38e9fb25a21d7ba573f09093ea4ca45a79664cf5",
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
"templateSHA256": "48d9ff4883cf189ae0a54b5cf412a898beb97b38d29d6cbc745d6cfa613dce60",
"installedTemplateSHA256": {
@@ -64,7 +64,6 @@
"CST 色彩空间转换/large.png": "816db272970491181aca4b872f09ca1900ebf0e7f21fee5bd6e2b4daedea5306",
"CST 色彩空间转换/small.png": "677353684eeaa1986bd21580eb0f2dcf4486f8cfba3985686c2ecb67afed5dbc"
},
"shaderSHA256": "e524e29a189fcf086b8aa7f75c7c0aba08b4a1666a454cbb34de98dd9165a0cb",
"nativeChecks": 1022,
"hostVerification": "verification/HostSpiderFluidity1.21.7.json"
"shaderSHA256": "5acc6fc7abda835021b38455dcd4ee582691d31869ed2cf844a1ca0e933dc8cc",
"hostVerification": "verification/HostRenderFluidity1.21.8.json"
}
+69
查看文件
@@ -0,0 +1,69 @@
{
"status": "verified",
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"bundleID": "com.dayu.color",
"version": "1.21.8",
"build": "126",
"team": "B3W25FX5H5",
"notaryID": "c439ff82-db8e-44a9-83e4-68c62588a2de",
"notaryStatus": "Accepted",
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
"sourceCommit": "38e9fb25a21d7ba573f09093ea4ca45a79664cf5",
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
"templateSHA256": "48d9ff4883cf189ae0a54b5cf412a898beb97b38d29d6cbc745d6cfa613dce60",
"installedTemplateSHA256": {
"大鱼调色/大鱼调色.moef": "48d9ff4883cf189ae0a54b5cf412a898beb97b38d29d6cbc745d6cfa613dce60",
"大鱼调色/large.png": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a",
"大鱼调色/small.png": "41fec3138aee904fc39d6982e6fde809243ffec55298dbfe966f4f48d89caf8a",
"一级调色/一级调色.moef": "e4612f58eee5bf07a0a44cc5f6d65f9ca207b7f6946da938ed05f7d254ca7924",
"一级调色/large.png": "b9b990a46f3fd9b6974a1aba1a3e9bff11a287fd1615d4cd0f9e7393c302631b",
"一级调色/small.png": "77b36c042fb82219651e5bd22c1057b644c06a528a8962d4afecdcb8cab52635",
"蜘蛛盘校色仪/蜘蛛盘校色仪.moef": "68e91d3747a119e684f659093cb520a7fbd495336e8a1552316e52031e975ad5",
"蜘蛛盘校色仪/large.png": "52de21d5fc598fda331cd472b937cf4aaf69a09c80d49e7b168ac7804e9cd040",
"蜘蛛盘校色仪/small.png": "ea9b69d12948c5cd5f6acd9d000822d9fff6df3beec9dd278077a8ab66d455cd",
"基础调整/基础调整.moef": "ca6a584dd168990870fa774df8ba3fcfce5ad2e8de4d28bd656057fdaa1dbdca",
"基础调整/large.png": "a25e2b5ed50628ebe77220719528d14f21c25b5eecf37a5d60f211d2179ece43",
"基础调整/small.png": "3da91ae3461b882f5e1a557b4191d9aedaa6d329da70999eb7f26cbfb63a057f",
"肤色保护/肤色保护.moef": "06fdf5964f487a7cca3d6dce6e68013d3c0ba5b5c73c4bb392c7b58f5d916212",
"肤色保护/large.png": "f124e8f3d93c2be76ba26ba06d8b9c0b42e2c10dcb6300ae6ee7b7d7c7eb3025",
"肤色保护/small.png": "51fe525e67903101920a994d3540f368780d3aa9c0e54ebdb847871c82d81562",
"风格 LUT/风格 LUT.moef": "595f722d3ac99555d4e22611907b6273a3fb36fea59b8949be58eb1f7d319501",
"风格 LUT/large.png": "a9a4b48885752282535ec3ec2ffbe19bcd27af7132337e4a4ad3d104a2082692",
"风格 LUT/small.png": "9ae76ba957b1e94a5a03a600140f59e98861917d13da9124082810c509400e36",
"HSL/HSL.moef": "97bcbf240f86f485299c298d90f9339aa87a2751cef475e3d6a1637144d4ab13",
"HSL/large.png": "eaa2e7b025dc59416fddb8de8b9c56f0a7d34ba70facd7aa45cfb84660f7da78",
"HSL/small.png": "3a54428bc6821e75935aa1be0f149aac6e6ce05fcc059b7f0e90ceef9a41981e",
"曲线/曲线.moef": "3f235de32384a3b268982609583702d28470ed91c756f1b13947454f22bf3fc0",
"曲线/large.png": "273899eb6aa60fc0f7c8d41cc0e1f5a15b4c88a8803c00020a085ea874160870",
"曲线/small.png": "c17a2343b076650344b1c53ce92acf32f7696d66e32bda2d156996d4e3b834f5",
"颜色分级/颜色分级.moef": "c49877ada4fa0ac49fa497b62f3a3e09bfe15f0d73b352bdfbeb0a9a2b7b1aad",
"颜色分级/large.png": "f9afe6c3a76080a2a7c7ea98f24e62a74ab2e6fd8b4ad16ba9eb6065fef5d2ed",
"颜色分级/small.png": "9e9d7759f829d25a01a77422c989949b02ad34de81013f6b91505c4a3d1397e9",
"三原色/三原色.moef": "6015ecc2cc89116b05d601df920ae674bad9ad4c6e7bad1f0eac889e08cda60d",
"三原色/large.png": "bf7bfc893e294fc38c0f97e5594b6ba6e5c7126b9aae643754c89647e8bd5a1f",
"三原色/small.png": "2e28988e6bae0503edadef22cf7793ce51a1b8e5930623b2eff3c01212e57ee8",
"色阶/色阶.moef": "b653b0981e0975605d2857a87bd495885d3370d3e9bcd9dc3a59b0012bf1f79e",
"色阶/large.png": "fcea12f4367039ea1512d2e23d51b9ca5198172dc5b10a1ff94a828fe94f4802",
"色阶/small.png": "41cd1a9c4d3b68972181534abe0e91bdb9e01ef5559b6b1f7ef6bf305f450a76",
"黑白混色/黑白混色.moef": "96f2d1fc2fe5ed2a8eabdf3a3bf5eb7fff145d55a0ce05807dcd834d2b8e9b32",
"黑白混色/large.png": "6df07fb223ab43b2b5b6115bef4a1a97eed5cbeb6afab84e005c3a2bdfe01979",
"黑白混色/small.png": "5382be0d29b4a195b8639b3c325f80e9b8cecaa9c12837ab5cf57b6ea877ecbc",
"色彩平衡/色彩平衡.moef": "be935b1e399e2a47394b54b24fc2e32eb0622ae0cd28f83e1d2d895c3c1133d6",
"色彩平衡/large.png": "fa2ce9071dee52d7ab9dc7cf6020f8679df3af707663c9a57a28fcde73e6801e",
"色彩平衡/small.png": "12a72a9f26e6ee41613b16ed2402f94a04837e55895addc8f5c25137ad7feaa6",
"通道混合器/通道混合器.moef": "7c5889c052534edd0043f439f59fe31a987c9c626d9097ce7f3d7280a888b1e3",
"通道混合器/large.png": "5ae9d2683450a3a515822520911885a774e202aa924465602f7369a1e67c0c4c",
"通道混合器/small.png": "23bfafb79287855e037f98f0ab5cee10914384824b1a65f0247cad2dd239ef1c",
"胶片模拟/胶片模拟.moef": "a559c654976ce711d01ef5b81ccaf01df8d81a9de501780cccc519fb72c4b7f2",
"胶片模拟/large.png": "d36a794f9640874f6ad7f3523b9eac92ba7c6ef8fa7b63c4594fc68e87c2eee7",
"胶片模拟/small.png": "f125deaf0c8d55ecc04e555cfb133c40ff3703f34a663548c6b38b3196780eb1",
"镜头畸变修复/镜头畸变修复.moef": "5ddb7e97d718d1b78cbc162b042aed1debdd0fecd12b8596590d5de5307c19ae",
"镜头畸变修复/large.png": "a00136fb9276c41518ba6096314fb6772ad1dc9be4f4d766409239fa923cfcd1",
"镜头畸变修复/small.png": "1b2480cfa33e1ab54a1ffcd81d9496aac1354b0d2974d6616fe7128965c2ede3",
"CST 色彩空间转换/CST 色彩空间转换.moef": "96d684ec87cbef801316abd83a1c247360d9adf9dca52ae84881c400c898f1da",
"CST 色彩空间转换/large.png": "816db272970491181aca4b872f09ca1900ebf0e7f21fee5bd6e2b4daedea5306",
"CST 色彩空间转换/small.png": "677353684eeaa1986bd21580eb0f2dcf4486f8cfba3985686c2ecb67afed5dbc"
},
"shaderSHA256": "5acc6fc7abda835021b38455dcd4ee582691d31869ed2cf844a1ca0e933dc8cc",
"hostVerification": "verification/HostRenderFluidity1.21.8.json"
}
@@ -0,0 +1,25 @@
{
"passResult": true,
"host": "Final Cut Pro 12.4",
"version": "1.21.8",
"build": 126,
"formalApp": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"loadedPlugin": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit",
"compiledCommit": "38e9fb25a21d7ba573f09093ea4ca45a79664cf5",
"shaderMatchesBenchmark": true,
"templateCount": 17,
"fixture": "1080p HD 25p SDR Rec.709, isolated QA library, synthetic chart, 00:00:02:18",
"observations": {
"inspectorVersion": "1.21.8",
"masterCurve": "Drove midpoint by mouse drag; output scope traces changed; one host undo restored the neutral diagonal and prior traces on reopen.",
"midtonesWheel": "Dragged center toward warm hues; scope traces updated; one host undo restored the neutral center on reopen.",
"primaryWhiteBalance": "0.0° / 0.0% → 302.9° / 5.6% on release → 0.0° / 0.0% after one host undo and reopen.",
"scopeValidSamples": 57600,
"playback": "Advanced 00:00:02:18 → 00:00:03:24 on the processed segment.",
"hostExitedNormally": true
},
"limits": [
"Remote inspector was used to confirm version and open the workbench. Actual mouse gestures were on the workbench.",
"Synthetic SDR host acceptance only. Rendering measurements exclude FCP presentation, export and Motion."
]
}
+39 -11
查看文件
@@ -1,6 +1,6 @@
{
"bundlePath": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit",
"checks": 1022,
"checks": 1028,
"gpu": "Apple M4",
"limitations": [
"Finite states and a 64x48 frame; live FCP discovery, inspector interaction, timeline persistence and real host export require separate acceptance.",
@@ -12,7 +12,7 @@
"error": "未提供错误信息",
"name": "runtime-directory",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/72917220-5F8E-4571-8D57-D116C023838D"
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/0C5A4B17-97FD-4E72-B40F-0AC4747D8B03"
},
{
"descriptors": 285,
@@ -1040,7 +1040,7 @@
"error": "未提供错误信息",
"name": "renderer-export-33cube",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/72917220-5F8E-4571-8D57-D116C023838D/diagnostic-export.cube"
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/0C5A4B17-97FD-4E72-B40F-0AC4747D8B03/diagnostic-export.cube"
},
{
"bytes": 1186074,
@@ -1059,8 +1059,8 @@
"pass": true
},
{
"heartbeats": 2,
"maximumGapMS": 17.81424999353476,
"heartbeats": 1,
"maximumGapMS": 20.025375008117408,
"name": "external-activation-main-loop-responsive",
"pass": true
},
@@ -1551,7 +1551,7 @@
"closePixels": 128,
"name": "workspace-offscreen-compact-icons-and-close-render-pixels",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/72917220-5F8E-4571-8D57-D116C023838D/workspace-topbar.png",
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/0C5A4B17-97FD-4E72-B40F-0AC4747D8B03/workspace-topbar.png",
"toolbarPixels": 3867
},
{
@@ -1622,7 +1622,7 @@
},
{
"name": "workspace-independent-style-fixture-inserted",
"node": "054FE82A-F1D5-498C-8A38-E75D1B42081A",
"node": "3070A4B4-7EE2-4A3E-AB0A-D1B82F28C5B9",
"pass": true,
"validDocument": true
},
@@ -1631,10 +1631,10 @@
"error": "none",
"name": "workspace-independent-style1-writes-target-node-inside-undo",
"nodePaths": {
"look0": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/72917220-5F8E-4571-8D57-D116C023838D/node.cube"
"look0": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/0C5A4B17-97FD-4E72-B40F-0AC4747D8B03/node.cube"
},
"pass": true,
"rootStyle1": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/72917220-5F8E-4571-8D57-D116C023838D/user-new.cube",
"rootStyle1": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/0C5A4B17-97FD-4E72-B40F-0AC4747D8B03/user-new.cube",
"undoStartsAfter": 3,
"undoStartsBefore": 2,
"written": true
@@ -1720,6 +1720,10 @@
"name": "workspace-toolbar-adds-real-uuid-and-synchronizes-regular-inspector",
"pass": true
},
{
"name": "workspace-curve-coalesces-pending-samples",
"pass": true
},
{
"name": "workspace-curve-xy-samples-use-one-undo-and-exact-uuid",
"pass": true
@@ -4214,6 +4218,30 @@
"name": "unified-moving-output-changes-actual-domain-order",
"pass": true
},
{
"error": "未提供错误信息",
"name": "unified-luma-key-input-reference",
"pass": true
},
{
"error": "未提供错误信息",
"name": "unified-luma-key-graded-reference",
"pass": true
},
{
"error": "未提供错误信息",
"name": "unified-luma-key-original-render",
"pass": true
},
{
"error": "未提供错误信息",
"name": "unified-luma-key-layer-render",
"pass": true
},
{
"name": "unified-mask-key-source-selects-original-or-current-color",
"pass": true
},
{
"name": "unified-inspector-output-visible-at-chain-tail",
"pass": true
@@ -4691,7 +4719,7 @@
{
"name": "viewer-real-osc-draws-minimal-curve-on-clear-canvas",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/72917220-5F8E-4571-8D57-D116C023838D/viewer-workspace.png"
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/0C5A4B17-97FD-4E72-B40F-0AC4747D8B03/viewer-workspace.png"
},
{
"name": "canvas-hsl-plot-captures-outside-and-commits-one-undo",
@@ -5090,6 +5118,6 @@
"pass": true
}
],
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/72917220-5F8E-4571-8D57-D116C023838D",
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/0C5A4B17-97FD-4E72-B40F-0AC4747D8B03",
"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.21.7.pkg",
"sha256": "e4d327d4a4fdbcb025e17dd6aa1e0e884c435392b70bcc2e7402d100c07a10ef",
"bytes": 44528083,
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.21.8.pkg",
"sha256": "8df87b7762f8a0d11b32e6947f5e4f3a358dce7e44505b20f8534b3a0e3e14b9",
"bytes": 44529845,
"testUnsigned": false,
"installationExecuted": false,
"checks": [
@@ -31,27 +31,27 @@
"source": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"payload": "Library/Plug-Ins/FxPlug/大鱼调色.app",
"bundleID": "com.dayu.color",
"version": "1.21.7",
"build": "125"
"version": "1.21.8",
"build": "126"
},
{
"source": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/pkg-inputs-uy0f2_6i/大鱼调色",
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.260bd8f1-4264-4678-a396-531b29cbcda4/1A86B0F0-7250-438C-B2C5-F0E138868178/大鱼调色"
"source": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/pkg-inputs-j75whllm/大鱼调色",
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.352ae960-0a77-47a3-bc73-e2810e707206/102718B0-DDE5-4ED6-A34F-5E457B2C42BC/大鱼调色"
}
],
"signature": "Package \"大鱼调色-1.21.7.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-09 03:37:18 +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.21.7.pkg: accepted\nsource=Notarized Developer ID",
"signature": "Package \"大鱼调色-1.21.8.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-09 04:15:54 +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.21.8.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": {
"id": "2aa1a8fa-d48f-45a5-8a56-9ac084d8c7b3",
"status": "Accepted",
"id": "e9cab355-85bf-4a16-922b-a811aacb5b05",
"createdDate": "2026-11-09T03:37:20.373Z",
"name": "大鱼调色-1.21.7.pkg",
"message": "Successfully received submission info"
"name": "大鱼调色-1.21.8.pkg",
"message": "Successfully received submission info",
"createdDate": "2026-11-09T04:15:55.958Z"
},
"appCompiledSource": "5aae670f56201a17cffe6aff3624d1b8cfad2308",
"appBuild": "125",
"appCompiledSource": "38e9fb25a21d7ba573f09093ea4ca45a79664cf5",
"appBuild": "126",
"packageBuilderRemote": "https://dayu.media/git/dayu/pkg-forge.git",
"residentAppClosing": {
"identifiers": [
@@ -127,6 +127,6 @@
"entries": 192,
"scope": "Read/traverse modes for installer-owned app entries, from the package BOM"
},
"installedAppHostAcceptance": "verification/HostSpiderFluidity1.21.7.json",
"installedAppHostAcceptance": "verification/HostRenderFluidity1.21.8.json",
"installScope": "本轮仅生成并验包,未再次执行系统安装;正式 APP 已有独立宿主验收。"
}
+132
查看文件
@@ -0,0 +1,132 @@
{
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.21.8.pkg",
"sha256": "8df87b7762f8a0d11b32e6947f5e4f3a358dce7e44505b20f8534b3a0e3e14b9",
"bytes": 44529845,
"testUnsigned": false,
"installationExecuted": false,
"checks": [
"PKG Developer ID Installer signature",
"PKG stapled ticket and Gatekeeper install assessment",
"must-close attached to root-authorized payload",
"all four FCP/Motion host identifiers",
"bundle relocation disabled",
"desktop and Bundle ID preinstall guards",
"postinstall contains actual FxPlug verification invocations",
"GUI worker, registration repair and Finder reveal present",
"successful completion and consecutive registration checks",
"exact payload contents: 大鱼调色.app",
"fixed FxPlug outer APP install path",
"outer APP has one real verification action",
"service path/identifier/registration version: com.dayu.color.XPC",
"nonempty FxPlug service manifest",
"payload APP signature, independent ticket and Gatekeeper",
"exact payload contents: 大鱼调色",
"login-user resource destination: ~/Movies/Motion Templates.localized/Effects.localized",
"complete outer APP payload present",
"welcome warns to save work and close hosts",
"conclusion gives manual APP and host restart instructions"
],
"resources": [
{
"source": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"payload": "Library/Plug-Ins/FxPlug/大鱼调色.app",
"bundleID": "com.dayu.color",
"version": "1.21.8",
"build": "126"
},
{
"source": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/pkg-inputs-j75whllm/大鱼调色",
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.352ae960-0a77-47a3-bc73-e2810e707206/102718B0-DDE5-4ED6-A34F-5E457B2C42BC/大鱼调色"
}
],
"signature": "Package \"大鱼调色-1.21.8.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-09 04:15:54 +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.21.8.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": {
"id": "2aa1a8fa-d48f-45a5-8a56-9ac084d8c7b3",
"status": "Accepted",
"name": "大鱼调色-1.21.8.pkg",
"message": "Successfully received submission info",
"createdDate": "2026-11-09T04:15:55.958Z"
},
"appCompiledSource": "38e9fb25a21d7ba573f09093ea4ca45a79664cf5",
"appBuild": "126",
"packageBuilderRemote": "https://dayu.media/git/dayu/pkg-forge.git",
"residentAppClosing": {
"identifiers": [
"com.apple.FinalCut",
"com.apple.FinalCutApp",
"com.apple.motionapp",
"com.apple.motionappApp",
"com.dayu.color"
],
"preinstallGuardCount": 1,
"normalQuit": true
},
"packageEntryAdaptation": {
"upstreamEntrySHA256": "a1a8bc8920cfa2dfe4a7d65c4403eec8a8f3ec81b0736951578a81a80389bfc0",
"adaptedEntrySHA256": "4d9cef08673a690427de0757a5cfe42251d01aa47e40902a5155d46d01c71503",
"requiredApplication": "com.dayu.color"
},
"packageBuilderCommit": "eb53707c0e67d8ddeab8c1270bb079f1050cfafe",
"templateSHA256": {
"大鱼调色/大鱼调色.moef": "48d9ff4883cf189ae0a54b5cf412a898beb97b38d29d6cbc745d6cfa613dce60",
"大鱼调色/large.png": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a",
"大鱼调色/small.png": "41fec3138aee904fc39d6982e6fde809243ffec55298dbfe966f4f48d89caf8a",
"一级调色/一级调色.moef": "e4612f58eee5bf07a0a44cc5f6d65f9ca207b7f6946da938ed05f7d254ca7924",
"一级调色/large.png": "b9b990a46f3fd9b6974a1aba1a3e9bff11a287fd1615d4cd0f9e7393c302631b",
"一级调色/small.png": "77b36c042fb82219651e5bd22c1057b644c06a528a8962d4afecdcb8cab52635",
"蜘蛛盘校色仪/蜘蛛盘校色仪.moef": "68e91d3747a119e684f659093cb520a7fbd495336e8a1552316e52031e975ad5",
"蜘蛛盘校色仪/large.png": "52de21d5fc598fda331cd472b937cf4aaf69a09c80d49e7b168ac7804e9cd040",
"蜘蛛盘校色仪/small.png": "ea9b69d12948c5cd5f6acd9d000822d9fff6df3beec9dd278077a8ab66d455cd",
"基础调整/基础调整.moef": "ca6a584dd168990870fa774df8ba3fcfce5ad2e8de4d28bd656057fdaa1dbdca",
"基础调整/large.png": "a25e2b5ed50628ebe77220719528d14f21c25b5eecf37a5d60f211d2179ece43",
"基础调整/small.png": "3da91ae3461b882f5e1a557b4191d9aedaa6d329da70999eb7f26cbfb63a057f",
"肤色保护/肤色保护.moef": "06fdf5964f487a7cca3d6dce6e68013d3c0ba5b5c73c4bb392c7b58f5d916212",
"肤色保护/large.png": "f124e8f3d93c2be76ba26ba06d8b9c0b42e2c10dcb6300ae6ee7b7d7c7eb3025",
"肤色保护/small.png": "51fe525e67903101920a994d3540f368780d3aa9c0e54ebdb847871c82d81562",
"风格 LUT/风格 LUT.moef": "595f722d3ac99555d4e22611907b6273a3fb36fea59b8949be58eb1f7d319501",
"风格 LUT/large.png": "a9a4b48885752282535ec3ec2ffbe19bcd27af7132337e4a4ad3d104a2082692",
"风格 LUT/small.png": "9ae76ba957b1e94a5a03a600140f59e98861917d13da9124082810c509400e36",
"HSL/HSL.moef": "97bcbf240f86f485299c298d90f9339aa87a2751cef475e3d6a1637144d4ab13",
"HSL/large.png": "eaa2e7b025dc59416fddb8de8b9c56f0a7d34ba70facd7aa45cfb84660f7da78",
"HSL/small.png": "3a54428bc6821e75935aa1be0f149aac6e6ce05fcc059b7f0e90ceef9a41981e",
"曲线/曲线.moef": "3f235de32384a3b268982609583702d28470ed91c756f1b13947454f22bf3fc0",
"曲线/large.png": "273899eb6aa60fc0f7c8d41cc0e1f5a15b4c88a8803c00020a085ea874160870",
"曲线/small.png": "c17a2343b076650344b1c53ce92acf32f7696d66e32bda2d156996d4e3b834f5",
"颜色分级/颜色分级.moef": "c49877ada4fa0ac49fa497b62f3a3e09bfe15f0d73b352bdfbeb0a9a2b7b1aad",
"颜色分级/large.png": "f9afe6c3a76080a2a7c7ea98f24e62a74ab2e6fd8b4ad16ba9eb6065fef5d2ed",
"颜色分级/small.png": "9e9d7759f829d25a01a77422c989949b02ad34de81013f6b91505c4a3d1397e9",
"三原色/三原色.moef": "6015ecc2cc89116b05d601df920ae674bad9ad4c6e7bad1f0eac889e08cda60d",
"三原色/large.png": "bf7bfc893e294fc38c0f97e5594b6ba6e5c7126b9aae643754c89647e8bd5a1f",
"三原色/small.png": "2e28988e6bae0503edadef22cf7793ce51a1b8e5930623b2eff3c01212e57ee8",
"色阶/色阶.moef": "b653b0981e0975605d2857a87bd495885d3370d3e9bcd9dc3a59b0012bf1f79e",
"色阶/large.png": "fcea12f4367039ea1512d2e23d51b9ca5198172dc5b10a1ff94a828fe94f4802",
"色阶/small.png": "41cd1a9c4d3b68972181534abe0e91bdb9e01ef5559b6b1f7ef6bf305f450a76",
"黑白混色/黑白混色.moef": "96f2d1fc2fe5ed2a8eabdf3a3bf5eb7fff145d55a0ce05807dcd834d2b8e9b32",
"黑白混色/large.png": "6df07fb223ab43b2b5b6115bef4a1a97eed5cbeb6afab84e005c3a2bdfe01979",
"黑白混色/small.png": "5382be0d29b4a195b8639b3c325f80e9b8cecaa9c12837ab5cf57b6ea877ecbc",
"色彩平衡/色彩平衡.moef": "be935b1e399e2a47394b54b24fc2e32eb0622ae0cd28f83e1d2d895c3c1133d6",
"色彩平衡/large.png": "fa2ce9071dee52d7ab9dc7cf6020f8679df3af707663c9a57a28fcde73e6801e",
"色彩平衡/small.png": "12a72a9f26e6ee41613b16ed2402f94a04837e55895addc8f5c25137ad7feaa6",
"通道混合器/通道混合器.moef": "7c5889c052534edd0043f439f59fe31a987c9c626d9097ce7f3d7280a888b1e3",
"通道混合器/large.png": "5ae9d2683450a3a515822520911885a774e202aa924465602f7369a1e67c0c4c",
"通道混合器/small.png": "23bfafb79287855e037f98f0ab5cee10914384824b1a65f0247cad2dd239ef1c",
"胶片模拟/胶片模拟.moef": "a559c654976ce711d01ef5b81ccaf01df8d81a9de501780cccc519fb72c4b7f2",
"胶片模拟/large.png": "d36a794f9640874f6ad7f3523b9eac92ba7c6ef8fa7b63c4594fc68e87c2eee7",
"胶片模拟/small.png": "f125deaf0c8d55ecc04e555cfb133c40ff3703f34a663548c6b38b3196780eb1",
"镜头畸变修复/镜头畸变修复.moef": "5ddb7e97d718d1b78cbc162b042aed1debdd0fecd12b8596590d5de5307c19ae",
"镜头畸变修复/large.png": "a00136fb9276c41518ba6096314fb6772ad1dc9be4f4d766409239fa923cfcd1",
"镜头畸变修复/small.png": "1b2480cfa33e1ab54a1ffcd81d9496aac1354b0d2974d6616fe7128965c2ede3",
"CST 色彩空间转换/CST 色彩空间转换.moef": "96d684ec87cbef801316abd83a1c247360d9adf9dca52ae84881c400c898f1da",
"CST 色彩空间转换/large.png": "816db272970491181aca4b872f09ca1900ebf0e7f21fee5bd6e2b4daedea5306",
"CST 色彩空间转换/small.png": "677353684eeaa1986bd21580eb0f2dcf4486f8cfba3985686c2ecb67afed5dbc"
},
"payloadBundleAccess": {
"entries": 192,
"scope": "Read/traverse modes for installer-owned app entries, from the package BOM"
},
"installedAppHostAcceptance": "verification/HostRenderFluidity1.21.8.json",
"installScope": "本轮仅生成并验包,未再次执行系统安装;正式 APP 已有独立宿主验收。"
}
+14
查看文件
@@ -0,0 +1,14 @@
{
"repository": "https://dayu.media/git/dayu/dayu-color.git",
"branch": "main",
"compiledCommit": "5aae670f56201a17cffe6aff3624d1b8cfad2308",
"releaseTag": "v1.21.7-spider-fluidity-20261109",
"releaseCommit": "039e567aaa563a36da5bbef90d0ccd4afd690183",
"compiledTrackedFilesChecked": 859,
"releaseTrackedFilesChecked": 864,
"gitFsckPassed": true,
"releaseAndCompiledBuildInputsIdentical": true,
"gitLFSRequired": false,
"submodulesRequired": false,
"method": "Independent HTTPS clone, detached checkouts, and every tracked file hashed against its Git blob ID."
}
+20 -19
查看文件
@@ -3,28 +3,29 @@
"repository": "dayu/dayu-color",
"repositoryID": 52,
"private": false,
"tag": "v1.21.6-lut-preview-reuse-20261108",
"releaseCommit": "3de998257d9f9e989093d58604c44a4eb1fb3fad",
"releaseID": 420,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.21.6-lut-preview-reuse-20261108",
"tag": "v1.21.7-spider-fluidity-20261109",
"releaseCommit": "039e567aaa563a36da5bbef90d0ccd4afd690183",
"releaseID": 421,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.21.7-spider-fluidity-20261109",
"prerelease": true,
"assetID": 66,
"assetName": "大鱼调色-1.21.6.pkg",
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.21.6-lut-preview-reuse-20261108/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.21.6.pkg",
"bytes": 44527921,
"sha256": "c92082550720225d9ea7a0f8b0f7315f19a438d9c717ab637a476b6c678f0ad6",
"assetID": 67,
"assetName": "大鱼调色-1.21.7.pkg",
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.21.7-spider-fluidity-20261109/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.21.7.pkg",
"bytes": 44528083,
"sha256": "e4d327d4a4fdbcb025e17dd6aa1e0e884c435392b70bcc2e7402d100c07a10ef",
"existingAssetReused": true,
"verification": "草稿经完整下载校验后发布。发布后再次完整下载,核对大小、SHA-256、版本标签及附件记录。",
"verification": "Full draft download checked before publication; published attachment downloaded and checked again; release, tag and asset read-back verified.",
"credentialSource": "macOS Keychain: dayu-git-api",
"draftBrowserDownload": {
"path": "/Volumes/备份/大鱼调色-1.21.6.pkg",
"sha256": "c92082550720225d9ea7a0f8b0f7315f19a438d9c717ab637a476b6c678f0ad6",
"bytes": 44527921,
"sourceURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.21.6-lut-preview-reuse-20261108/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.21.6.pkg",
"releaseID": 420,
"assetID": 66
"path": "/Volumes/备份/大鱼调色-1.21.7.pkg",
"sha256": "e4d327d4a4fdbcb025e17dd6aa1e0e884c435392b70bcc2e7402d100c07a10ef",
"bytes": 44528083,
"sourceURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.21.7-spider-fluidity-20261109/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.21.7.pkg",
"releaseID": 421,
"assetID": 67,
"temporaryCopyRemoved": true
},
"version": "1.21.6",
"build": 124,
"appCompiledSource": "e0bd8342c0b2231028af64abd7b544b2be8f29d7"
"version": "1.21.7",
"build": 125,
"appCompiledSource": "5aae670f56201a17cffe6aff3624d1b8cfad2308"
}
+31
查看文件
@@ -0,0 +1,31 @@
{
"passResult": true,
"repository": "dayu/dayu-color",
"repositoryID": 52,
"private": false,
"tag": "v1.21.7-spider-fluidity-20261109",
"releaseCommit": "039e567aaa563a36da5bbef90d0ccd4afd690183",
"releaseID": 421,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.21.7-spider-fluidity-20261109",
"prerelease": true,
"assetID": 67,
"assetName": "大鱼调色-1.21.7.pkg",
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.21.7-spider-fluidity-20261109/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.21.7.pkg",
"bytes": 44528083,
"sha256": "e4d327d4a4fdbcb025e17dd6aa1e0e884c435392b70bcc2e7402d100c07a10ef",
"existingAssetReused": true,
"verification": "Full draft download checked before publication; published attachment downloaded and checked again; release, tag and asset read-back verified.",
"credentialSource": "macOS Keychain: dayu-git-api",
"draftBrowserDownload": {
"path": "/Volumes/备份/大鱼调色-1.21.7.pkg",
"sha256": "e4d327d4a4fdbcb025e17dd6aa1e0e884c435392b70bcc2e7402d100c07a10ef",
"bytes": 44528083,
"sourceURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.21.7-spider-fluidity-20261109/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.21.7.pkg",
"releaseID": 421,
"assetID": 67,
"temporaryCopyRemoved": true
},
"version": "1.21.7",
"build": 125,
"appCompiledSource": "5aae670f56201a17cffe6aff3624d1b8cfad2308"
}
+599
查看文件
@@ -0,0 +1,599 @@
{
"baselineVersion": "1.21.7 (125)",
"candidateVersion": "1.21.8 (126)",
"baselineCompiledCommit": "5aae670f56201a17cffe6aff3624d1b8cfad2308",
"baselineCheckout": "79f1dd45450b29ba6f94b5fa57a97d3dfa140bd7",
"candidateSource": "38e9fb25a21d7ba573f09093ea4ca45a79664cf5",
"baselineShaderSHA256": "e524e29a189fcf086b8aa7f75c7c0aba08b4a1666a454cbb34de98dd9165a0cb",
"candidateShaderSHA256": "5acc6fc7abda835021b38455dcd4ee582691d31869ed2cf844a1ca0e933dc8cc",
"device": "Apple M4",
"method": "Production renderHostSource, headless, native Release objects and matching shaders. Synthetic RGBA16F input with mixed alpha, negatives, superwhites and flipped origin, changing frame time and parameters. 4 warmups plus 12 timed frames per case. Run order baseline/candidate/candidate/baseline. First eight output frames per configuration hashed outside the timed interval.",
"cases": [
{
"width": 1920,
"height": 1080,
"case": "legacy exposure",
"timedFramesPerRun": 12,
"baselineMedianMs": [
7.55,
4.172
],
"candidateMedianMs": [
6.849,
4.124
],
"baselineP90Ms": [
11.0,
4.22
],
"candidateP90Ms": [
11.095,
6.129
],
"pixelSHA256": [
"3ab0ecd0f7f65147d2ccad27ce03beae138e79c880321e02060788f1831ad60a",
"100fe3d542f6f07dd050f14c8d53f74859b56620d0fdc1cf2d660f9f06981361",
"5286fc1f06318f47b4f26523ee1335ae1b77d41ea5bb7b8d143d0a76f8e472b9",
"011b815eac78d63f387fd87359c2c42bbc62785f5e19760e6abad3f72e0f9b3c",
"e5561407e15a14fb02a603a9bef311280276de84af5569fe919e3061ec08537d",
"5348b48045b81bfe0f0a406483c46ed0a094f310b469f527be94d424ca5905ea",
"411f9a765f0f238276fdc1468b4d3aa5dc90518160571414d3d49a5a08768214",
"6cd2c0b86921b8a696d9407f39aa5edf80adf4064027579f16b95d44050acaed"
]
},
{
"width": 1920,
"height": 1080,
"case": "v3 CST and masked mix / 709",
"timedFramesPerRun": 12,
"baselineMedianMs": [
17.669,
17.254
],
"candidateMedianMs": [
14.074,
13.662
],
"baselineP90Ms": [
19.737,
20.202
],
"candidateP90Ms": [
16.235,
14.682
],
"pixelSHA256": [
"b06df5703d557a56d9616aa9d116ff4d1695e095717fa69f580d81a6504c81b1",
"acbae79039bd1d2bdd1fff6f20357df9e10d0256ec2adb39144674ac46eb6871",
"e7c6ff1fda88d56f27d4899225996d2680f3541ece750b55fd9688c4f5711055",
"274de9ead2f40a5899f11bf0d14ae3d4027411db7f2cd9011e94084d3da7960c",
"4c75b77e66b45905c0a13b1e028bb3147ffa57b60410d4388889eb15675b356a",
"ed6727a5087917191302ed06e95a2e3f24e3d471ffa4f9054e3896b6737738cb",
"19cacbf0b460b70f38875dc5b65ffdba342d07a422b638c95d3473af6429f0ad",
"a8c95d9b19da1f62e143be04b113939f6d0a12d2f1c8032314bda64223adb039"
]
},
{
"width": 1920,
"height": 1080,
"case": "v4 exposure and masked HSL / 709",
"timedFramesPerRun": 12,
"baselineMedianMs": [
29.845,
30.303
],
"candidateMedianMs": [
22.763,
23.168
],
"baselineP90Ms": [
30.871,
35.227
],
"candidateP90Ms": [
24.935,
25.382
],
"pixelSHA256": [
"475eb3508c38de92a4c3ce342a04121b6e37433eee200dd6595984ba9bdc1d35",
"7b0e6bb942294c40241c17b59635ac3840cbc0427a53d01256f4ea5cf8eabd7b",
"52ecc29209e1669b1c8332fe6f4c0188249b58bebb4118c076479729321b65a6",
"3306595bbd04464a44cda3ddb62a3b61ce6117e4fe8db419b33e839db3d2512c",
"556167fbfdc530548fd8bbf71c5fe785ca12fc225e8b11e663a93beff8fc4c8b",
"46b3bc45b80d1fb31cdad89829e38fa7accb0168d7ab70956f269d72e537f998",
"d99a1c25ced571e06d92e0409775d55a42c451c3eef7bfbb3293adcbf3c49b22",
"bd8ae73377cad4676d2fc5056d445d71c928c4126327be1af8a534716ba1a480"
]
},
{
"width": 1920,
"height": 1080,
"case": "v4 CST and mix / P3",
"timedFramesPerRun": 12,
"baselineMedianMs": [
23.925,
22.688
],
"candidateMedianMs": [
18.612,
19.959
],
"baselineP90Ms": [
27.721,
23.97
],
"candidateP90Ms": [
21.002,
22.072
],
"pixelSHA256": [
"e1f3498a1feea62b578bbbc42ee06cccefac1e16dffb3bcd51825da2031c3827",
"62ffad6e3305a23d2b4e9fc359572c4937d7ad0397444d23861a3b80c63c6f4a",
"a4e7d4bc4c5fa33a0fb519dce81f330edd545272db4d23e0e7168be3ab65c120",
"2c71da30611aa180fc8cd90f2b3e9c87644295a9d7939f56b7541db42219d150",
"94c8161b30c697d19573c19f23a60a3a16de2d904eae190983aaadbcf958d98a",
"a2abe98b4c6d345d9d08fc718c3ac2b489c7b812091ec83df828e6d2b50a8996",
"032e967c4e31af39a20900b0930e8c9fbd192cb18a9482ea7da57e0628b47f48",
"436a9e202ce1f27a0ffc98445ff7b14aace15c0ac354efb33e1d6082823c07f3"
]
},
{
"width": 1920,
"height": 1080,
"case": "legacy film grain and halation",
"timedFramesPerRun": 12,
"baselineMedianMs": [
11.882,
12.87
],
"candidateMedianMs": [
12.373,
15.127
],
"baselineP90Ms": [
14.294,
14.09
],
"candidateP90Ms": [
14.572,
17.408
],
"pixelSHA256": [
"2d5f2afb20439a138cefe16dd90f7abc20e7b84789dc22c626e9dd36a9fc96b3",
"9f8b229521e86c8ac6cc9c9cb837b9eaf96503d2b742a3982f91b96c6021ed9b",
"992a1ec1783004f131b65fbbafc3dac34dc173969595fcfab191c3c246901aa1",
"7a9abf6e50a7f3fa0c9f4bb7534728c2cf9813dd0d5c45e317aef25c731b0d5d",
"60a474ea354059b8877e9df11fd7d3249989de701b1e62c5c7448418b6c5b20e",
"a7acc1955b3ae5f2aac55d6c586f4209b80ffc3384667b6f8897a9951cb6959a",
"9f8360689fd9fba2aa605f1cf7a9d0c7fa62c4f5fa022a8cca2db9598bf7fc34",
"fbcc0629cefae2a1be86e3824d7a226328d4ba93b29dd80c6822a33fd0ae3dfd"
]
},
{
"width": 1920,
"height": 1080,
"case": "legacy lens with mask",
"timedFramesPerRun": 12,
"baselineMedianMs": [
9.699,
10.452
],
"candidateMedianMs": [
11.178,
19.6
],
"baselineP90Ms": [
12.036,
11.727
],
"candidateP90Ms": [
12.924,
21.331
],
"pixelSHA256": [
"cfcc3b8623ee4c6c649f7e8b2917b6f588b57da75fcd2c252d05f8f05a0f2284",
"9a61a083f9c394c805fb326cd3930d4ed6c5d040903c58c38ccf33fff544b3a3",
"1430b4e279ca1eec56d1b68d9df6a9b361a7b6681fc77939db35b32e57a1d51f",
"df249554e53efef241d0bd791b6aee2188285a16620e5fb919f04589bcb7b834",
"bf8f12aed8bc4f5094f85f572ab943646b38dc4e78d49993c338e1e28bb6cb11",
"b9402e9b1f62d5cd9badb3e5589d2590ca22406e37276cc7cb292cbabef2c0aa",
"eceb8943d4ec536d97cc36c34b757ea8f77be474e4450ba49282b5727396a709",
"d6524b543bedb6d5ddc52b613008a176fb0518b367493c631322347325d75007"
]
},
{
"width": 1920,
"height": 1080,
"case": "v2 follow host / P3",
"timedFramesPerRun": 12,
"baselineMedianMs": [
23.832,
23.215
],
"candidateMedianMs": [
24.679,
30.855
],
"baselineP90Ms": [
25.312,
24.943
],
"candidateP90Ms": [
27.99,
37.944
],
"pixelSHA256": [
"5540ae091967328675a722c57ad9bbc95b5c02d170f4617a1f7d2f496e9ea116",
"278b7197fe6ef2d57cc728dad29744c13b7574d43dd658ec50796a95e1c23084",
"2015470cd370b9d040ad7506584096c5edfd9784d78cc1b9276c1269ca8133e3",
"e66dbe0421874f06a88e5b91ca20a5bcfb9ffe704ca9516fdd2d216e1a845379",
"35539d1f8dfa6ba8c615ed3b3adf5e30d29867c453ffe2c50123edac94d4364c",
"797cecc0cea0eb2dab56e148392b4a705d865f6bbfeb6804e55d442bb44048e0",
"e50a91a17b42389f8823f614bf52226680472abd946657a6c03d2f97ac89fae2",
"d99c4d43561508ca4446ad1d453b2c57b324bb270bba0b37d99da4f025de52f9"
]
},
{
"width": 1920,
"height": 1080,
"case": "v4 exposure and masked HSL / PQ",
"timedFramesPerRun": 12,
"baselineMedianMs": [
37.45,
59.767
],
"candidateMedianMs": [
29.278,
31.837
],
"baselineP90Ms": [
39.451,
73.171
],
"candidateP90Ms": [
31.222,
32.967
],
"pixelSHA256": [
"2df57fa747ee7c11fb98719ff421bb0932f180c7e43e2cca8e3e084964faa58f",
"9828b24f1ffb5e2088c40221bbd0037e41896eb0a6384a98ed129e1f049d29fe",
"98fe52e8a939c90ecac6cfe227dfc1708ab3a160a588cbcb5d2d9bed51fd2e2f",
"6556c16a4deb1c97a583484e84b297117c2808218d00ad6763180f6894e17c1c",
"26c0fb876d6b9ca3bfc8c63021fcd250bd0f6e3d8cafd3c9f76d7c8ec89afaf7",
"7d59acdf1564c0978814922fa21a380c10d66b243b451a9d01e12351cad80e0b",
"7489c55d120cde042d08835ff9ad87451e70c426bc23407e637c8e184af8a558",
"68a878b4bc5274c3b5b65d52a33903e8f4315e863febd3c01c19145b5fa9b219"
]
},
{
"width": 3840,
"height": 2160,
"case": "legacy exposure",
"timedFramesPerRun": 12,
"baselineMedianMs": [
16.048,
15.395
],
"candidateMedianMs": [
14.785,
16.398
],
"baselineP90Ms": [
17.762,
18.669
],
"candidateP90Ms": [
16.577,
17.861
],
"pixelSHA256": [
"986272a593218962bf9e72409c5268046369d78cf7f5ae41d15758d816395d68",
"6ecffbc3a1a387ce467dd1932db04dabfc792e57a0650aa379f52945a01b0a58",
"5790a9ca7fa7afe08791643884d80c28ae805b5e2324ae92043512dd391d9b65",
"848aee48e65809586f376da612edf3591eaa1f3b24cef27712f22093934a5758",
"e4d9255711ab806ea4cd40eaf0c1a46aa0df500db4f7479363fba9d98b73956a",
"10751e8853b0b37b71eb52fd4fdb2b81f39c605c9b267826f502bd791fcad085",
"3e4b3df75b676e5d1c575639357f78d9503b937b4b0cf519d2f4331f0bc42b17",
"8391af480945101645896561d8716a1fc0bad1b1c632480cf9b72063334bda33"
]
},
{
"width": 3840,
"height": 2160,
"case": "v3 CST and masked mix / 709",
"timedFramesPerRun": 12,
"baselineMedianMs": [
50.152,
48.85
],
"candidateMedianMs": [
42.335,
43.354
],
"baselineP90Ms": [
56.678,
51.672
],
"candidateP90Ms": [
44.312,
44.924
],
"pixelSHA256": [
"67135447c061ad38a5cefc783ce4cd8baaf15ecbe8c4dfa2905d54763567e071",
"f31a3b000faa655bb30cb20e449f3fd9822f5e8f5167b0e5bb99a31d8fc91bcb",
"183e7e550354093d3f1d918be24208505829278b6e749233167a54d0e5d7bb5c",
"452e1e1a84a950954f6a5d98ee8825431f22b95dce0c1afaf6041bf0a62ee8c5",
"c7804cfde7b2665accfefcc587d699edf9f27dc5102cfe81e812ac09f29915b4",
"6fa3d668ba482a1b0e94963da31dd6ace7873f5b61fa9f3c2ba66026823ebaef",
"2737cf8a245235e2e498c3d7a23ff174709386d66e884815388bc6286b3c0cf7",
"23ae74cae8cabe26b9b09f976e2f0d8a5bb1e0de27e54044307daf300cae0929"
]
},
{
"width": 3840,
"height": 2160,
"case": "v4 exposure and masked HSL / 709",
"timedFramesPerRun": 12,
"baselineMedianMs": [
85.974,
89.347
],
"candidateMedianMs": [
75.244,
74.828
],
"baselineP90Ms": [
91.638,
92.821
],
"candidateP90Ms": [
80.047,
78.893
],
"pixelSHA256": [
"1477c02f94662e8474627a7e90445c42fbab5f5c452851d568f0db2dcf266051",
"e420c88d537e538ea79c865d2f8fbef5b52371d89f99b2a2b14fdf034d5c5f4d",
"0cc5caf15945e3835e6506fb6cf941f76928439788496743c0ce74f655e06f25",
"4b06364ca82e42a2b4a0082eebf4dfaabe21e4fc115b7adab8b8907c93dfa9a6",
"55a65d0dcb7974b37359a02023db14f00267c936e74130ae0c40beeba367d713",
"099a162c682e3411ad9e58e1a8a6b7e40e66224828bbcb95541a2525e6a24328",
"21d763810277b6afc18ea3c35643386e7d1bb9ac37e7903f405c84b86a6ec57c",
"c7039ccdc51f187958ab46dd38c93b6a2bcef77f5a7e675be44596ab737fefc5"
]
},
{
"width": 3840,
"height": 2160,
"case": "v4 CST and mix / P3",
"timedFramesPerRun": 12,
"baselineMedianMs": [
74.662,
66.297
],
"candidateMedianMs": [
64.524,
61.439
],
"baselineP90Ms": [
80.375,
68.562
],
"candidateP90Ms": [
67.617,
62.714
],
"pixelSHA256": [
"618ba597b71960e36c7061141394c94bba0a3e626f491ac40e2b30e58a8694da",
"af0abde7aa52507d3b48e35a51f296e093f9780f217742809823707cb7b143a1",
"ed21d5499b761ce9a9a3900e23c43dbfa0a0482048e097f5e1758624e25a78a1",
"f24e4040a718519c79c516b67a25c3cb2180624e69a0ac683a2ffcb3a41500ff",
"5c7b020fc2c5c3a28446ea432c49a273205a34a074531b375d84b4fc40627784",
"b9de83d998a24320c3e71b228e783ee9d76da6cf06126c8c3081d12de9a168dc",
"43ee1f560ae1d2d8b3bef2455e6f6fef165dd577259ee0f8595b6254393eef9d",
"d46e5694a23a186c63831b6e657c7a7eb6be568e8c8117f973f01c88fc53e789"
]
},
{
"width": 3840,
"height": 2160,
"case": "legacy film grain and halation",
"timedFramesPerRun": 12,
"baselineMedianMs": [
46.231,
45.047
],
"candidateMedianMs": [
44.845,
44.722
],
"baselineP90Ms": [
47.611,
47.694
],
"candidateP90Ms": [
47.54,
46.728
],
"pixelSHA256": [
"7646e343b0ab1d6b994d228aad33e6e287aff84c420f0ae98c44492c7439c8b5",
"d2b905ba68460d19cd387b7310c1d8291a9a29b9b30214a9ea5f88168836ac75",
"a3f56f36c64f6bbe6742f90561f9f43641c0f4ac6e47e8323e6fa17e9fee3f16",
"2896872c29f75cd270af490810d0f64bdde4536bf96e321d3c61eb95553c8c6f",
"cb8dbce5455fbc6a45fd37f26dcf683b7be636841255472bcd71111bf2ab7d21",
"1914502e86292a73fa256019aee00e530bdf9c4d0cd832b0e892cab87d8f744a",
"85ee884727e36e9652b993b568752e573ab5d6982a3dd88fc678e71e1efd5d4d",
"a3a4220335305fb0c820837d92144b4673b7f36c9bd9f95ffb6edb360850daf7"
]
},
{
"width": 3840,
"height": 2160,
"case": "legacy lens with mask",
"timedFramesPerRun": 12,
"baselineMedianMs": [
34.649,
34.202
],
"candidateMedianMs": [
34.565,
35.923
],
"baselineP90Ms": [
36.517,
37.221
],
"candidateP90Ms": [
35.573,
37.677
],
"pixelSHA256": [
"98e9b102723dfc1d0b4abdca6824847f8c4bc2afa3f305cf3561fa3f52a7dd4a",
"ab841cb8fede819a0ba6fbd545e13c68b26bdaa8a12ccdd3015ef7ad29d28a1f",
"c273a5f0b1c781c36e62fe15e8787fc866a53a41cecac9629ec161401ad9e707",
"5ab5809a415ed8e95ad93d697e7407dbe276243b6d293389cd744ccd82597540",
"d1347e68286e346be89ae857903498a246e57e98313b21f6aefe9cb3a2ed0a5a",
"58c34bedf428e99d3bb6de1841607588f9bfbdc6c93feab6520cb27c2f8be001",
"695f0bf028b88a6a18ca387418f72b8252cf5994691d4936a943b3b51dcda172",
"03c20e5ad2fc75f07c57e0bfaf6224c29ea71fe794c6dd1d4d9e834331e5f6a0"
]
},
{
"width": 3840,
"height": 2160,
"case": "v2 follow host / P3",
"timedFramesPerRun": 12,
"baselineMedianMs": [
78.333,
71.308
],
"candidateMedianMs": [
69.322,
70.367
],
"baselineP90Ms": [
83.126,
75.829
],
"candidateP90Ms": [
71.681,
72.822
],
"pixelSHA256": [
"a09600674e2be09d40baf512d7753a213303f3cf6d4f0975a0814202db6e8319",
"225c809cd147094fb714aa89557aea869e5a8d4f33d8891c10b67971a350e25c",
"a7985ae26162eeea03409291fde197c4ac3313bb0d054aceae94a5d5e2a1245b",
"7a2579141f250a410c9f0c7c89cabe0e3d5673d7b28eddbbb0ef10aaa267943e",
"33c5ffc542544a2dbe0fceeb8fd5d43dc53e12777ce1d14aee9bfb7108ef0880",
"fd8228236d7d8ac3e302ac1b87a2a613f67c249afadd68f8f6b737cc7f7ef8b0",
"0ea8b3d82db4d7da7deed9507853aa71dd8fa4988885766664cb0b5b91099f8e",
"a6fd8842ebd7a131f5289922337eaabe77d0fbf200b78db20eed807cd45d0939"
]
},
{
"width": 3840,
"height": 2160,
"case": "v4 exposure and masked HSL / PQ",
"timedFramesPerRun": 12,
"baselineMedianMs": [
104.648,
102.213
],
"candidateMedianMs": [
95.613,
95.645
],
"baselineP90Ms": [
112.737,
109.624
],
"candidateP90Ms": [
101.3,
100.756
],
"pixelSHA256": [
"a0f5f6484e58dfbf078191d4623c468cfc94725916283e3abc9b05e10fd53a4d",
"18e8af4bf05ee2c17484d0d15e5d6c2123542adab6d594e0c44874c58e5db0c4",
"4def4e36546de580473d8d12c9ae2614dc3ca4b66da79879087cd4ed9443de69",
"30e8a2fc0f7155b19f02af0dbc7e00836edb09f100b646bb9d7d5df0ce9adab0",
"0cb04cbcb805679af7d0d9a950ea599e12e566706d812232ff557af7bae63bce",
"c474f6e65015abfa01cf8052247c7a72db62b3ab700035adc91c39faa4da00d8",
"a803ecf06d4887d87f8e3b9e848e42d6af3c1bd7bd05bc57396d3ddf62c0977f",
"a88572eb0149dd19ff034fef0e83e77f6899c1016382b734ace7a1954ff8797c"
]
}
],
"distinctFramePairsChecked": 128,
"allFrameHashesMatch": true,
"focusedInterleavedRuns": [
{
"width": 1920,
"height": 1080,
"case": "legacy film grain and halation",
"baselineMedianMs": [
15.473,
12.791,
14.554
],
"candidateMedianMs": [
12.971,
12.113,
13.181
],
"allFrameHashesMatch": true
},
{
"width": 3840,
"height": 2160,
"case": "legacy film grain and halation",
"baselineMedianMs": [
50.271,
49.796,
44.886
],
"candidateMedianMs": [
44.167,
44.112,
45.14
],
"allFrameHashesMatch": true
},
{
"width": 1920,
"height": 1080,
"case": "legacy lens with mask",
"baselineMedianMs": [
10.098,
10.186,
11.793
],
"candidateMedianMs": [
10.591,
9.578,
11.035
],
"allFrameHashesMatch": true
},
{
"width": 3840,
"height": 2160,
"case": "legacy lens with mask",
"baselineMedianMs": [
35.678,
34.683,
39.156
],
"candidateMedianMs": [
35.277,
33.708,
34.641
],
"allFrameHashesMatch": true
}
],
"metalAPIValidation": "Masked lens at both resolutions completed with validation enabled.",
"limits": [
"Times are CPU wall time through GPU completion, without FCP scheduling, decoding or presentation.",
"Film batching trial regressed at 1080p and was discarded. The final render retains the original film scheduling.",
"Small differences in the light exposure, lens and V2 profile cases vary by run; no general FPS or end-to-end host latency claim."
]
}
+2 -2
查看文件
@@ -56,6 +56,6 @@
if(source.imageOrigin==kFxImageOrigin_BOTTOM_LEFT)u.lensCenterY=1-u.lensCenterY;
id<MTLDevice>d=entry[@"device"];id<MTLTexture>before=[source metalTextureForDevice:d],output=[destination metalTextureForDevice:d];
id<MTLComputePipelineState> pipeline=[self computePipeline:@"dyLensRepair" entry:entry error:error];if(!pipeline)return NO;
id<MTLCommandBuffer>cb=[entry[@"queue"]commandBuffer];id<MTLComputeCommandEncoder>ce=[cb computeCommandEncoder];[ce setComputePipelineState:pipeline];[ce setTexture:before atIndex:0];[ce setTexture:output atIndex:1];[ce setBytes:&u length:sizeof(u) atIndex:0];float aspect=before.width*source.pixelAspect/MAX(1.,(double)before.height);[ce setBytes:&aspect length:sizeof(aspect) atIndex:1];[ce dispatchThreads:MTLSizeMake(output.width,output.height,1)threadsPerThreadgroup:MTLSizeMake(16,16,1)];[ce endEncoding];[cb commit];[cb waitUntilCompleted];if(cb.status!=MTLCommandBufferStatusCompleted)return fail(error,cb.error.localizedDescription);
if(!masks.count)return YES;MTLTextureDescriptor *desc=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:output.pixelFormat width:output.width height:output.height mipmapped:NO];desc.storageMode=MTLStorageModePrivate;desc.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite|MTLTextureUsageRenderTarget;id<MTLTexture>blend=[d newTextureWithDescriptor:desc];if(!blend)return fail(error,@"无法分配修复蒙版");DYToolMaskHeader h{};h.section=(int)[DYToolTypes()indexOfObject:@"lens"];id<MTLBuffer>buffer=[self maskBuffer:@{@"lens":masks}tile:source device:d header:&h];cb=[entry[@"queue"]commandBuffer];if(![self encodeBlend:before after:output output:blend masks:buffer header:h entry:entry commands:cb error:error]){[blend release];return NO;}[cb commit];[cb waitUntilCompleted];DYExportTile *tile=[[DYExportTile alloc]initWithTexture:blend registry:d.registryID];[tile setBounds:destination.tilePixelBounds origin:destination.imageOrigin];[tile setPixelAspect:destination.pixelAspect];BOOL ok=cb.status==MTLCommandBufferStatusCompleted&&[self copyTile:tile to:destination entry:entry error:error];[tile release];[blend release];return ok;
id<MTLCommandBuffer>cb=[entry[@"queue"]commandBuffer];id<MTLComputeCommandEncoder>ce=[cb computeCommandEncoder];if(!ce||!before||!output)return fail(error,@"无法创建修复镜头编码器");[ce setComputePipelineState:pipeline];[ce setTexture:before atIndex:0];[ce setTexture:output atIndex:1];[ce setBytes:&u length:sizeof(u) atIndex:0];float aspect=before.width*source.pixelAspect/MAX(1.,(double)before.height);[ce setBytes:&aspect length:sizeof(aspect) atIndex:1];[ce dispatchThreads:MTLSizeMake(output.width,output.height,1)threadsPerThreadgroup:MTLSizeMake(16,16,1)];[ce endEncoding];
if(!masks.count)return [self completeCommands:cb destination:destination texture:output entry:entry]?YES:fail(error,cb.error.localizedDescription);MTLTextureDescriptor *desc=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:output.pixelFormat width:output.width height:output.height mipmapped:NO];desc.storageMode=MTLStorageModePrivate;desc.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite|MTLTextureUsageRenderTarget;id<MTLTexture>blend=[d newTextureWithDescriptor:desc];if(!blend)return fail(error,@"无法分配修复蒙版");DYToolMaskHeader h{};h.section=(int)[DYToolTypes()indexOfObject:@"lens"];id<MTLBuffer>buffer=[self maskBuffer:@{@"lens":masks}tile:source device:d header:&h];if(![self encodeBlend:before after:output output:blend masks:buffer header:h entry:entry commands:cb error:error]){[blend release];return NO;}DYExportTile *tile=[[DYExportTile alloc]initWithTexture:blend registry:d.registryID];[tile setBounds:destination.tilePixelBounds origin:destination.imageOrigin];[tile setPixelAspect:destination.pixelAspect];BOOL ok=[self copyTile:tile to:destination rotation:0 entry:entry commands:cb error:error];[tile release];[blend release];return ok;
}
+35 -7
查看文件
@@ -372,7 +372,13 @@ kernel void dyColorManagement(texture2d<float,access::read> source [[texture(0)]
// Premultiplication is preserved by mixing the two equally-alpha images.
kernel void dyToolBlend(texture2d<float,access::read> before [[texture(0)]],texture2d<float,access::read> after [[texture(1)]],texture2d<half,access::write> output [[texture(2)]],device const DYToolMaskEntry* masks [[buffer(0)]],constant DYToolMaskHeader& h [[buffer(1)]],uint2 pos [[thread_position_in_grid]]){
if(pos.x>=output.get_width()||pos.y>=output.get_height())return;float4 a=before.read(pos),b=after.read(pos);float2 uv=(float2(pos)+.5f)/float2(output.get_width(),output.get_height());float amount=dyToolCoverage(uv,dyToolEncode(a.a>0?(h.premultiplied?a.rgb/a.a:a.rgb):float3(0)),masks,h,h.section);output.write(half4(h.skinPreview?float4(b.rgb*amount,a.a):mix(a,b,amount)),pos);
if(pos.x>=output.get_width()||pos.y>=output.get_height())return;
float4 a=before.read(pos),b=after.read(pos);
float2 uv=(float2(pos)+.5f)/float2(output.get_width(),output.get_height());
float3 keyColor=float3(0);
if(h.keySources&&a.a>0)keyColor=dyToolEncode(h.premultiplied?a.rgb/a.a:a.rgb);
float amount=dyToolCoverage(uv,keyColor,masks,h,h.section);
output.write(half4(h.skinPreview?float4(b.rgb*amount,a.a):mix(a,b,amount)),pos);
}
extern "C" float dy_skinWeight(float3 color,float3 reference,constant DYUniforms& uniforms);
extern "C" float3 dy_skinExtra(float3 color,float3 reference,constant DYUniforms& uniforms);
@@ -495,12 +501,34 @@ kernel void dyUnifiedBridgeOut(texture2d<float,access::read> raw [[texture(0)]],
struct DYUnifiedMix {CSTParams toLinear,fromLinear,originalTo709;float amount;};
kernel void dyUnifiedBlend(texture2d<float,access::read> before [[texture(0)]],texture2d<float,access::read> after [[texture(1)]],texture2d<float,access::write> output [[texture(2)]],texture2d<float,access::read> original [[texture(3)]],device const DYToolMaskEntry* masks [[buffer(0)]],constant DYToolMaskHeader& h [[buffer(1)]],constant DYUnifiedMix& p [[buffer(2)]],uint2 xy [[thread_position_in_grid]]){
if(any(xy>=uint2(output.get_width(),output.get_height())))return;float4 a=before.read(xy),b=after.read(xy),o=original.read(xy);if(!(a.a>0)||!(b.a>0)){output.write(a,xy);return;}
float3 ac=cst_float_air(float4(a.rgb/a.a,1),p.toLinear).rgb,bc=cst_float_air(float4(b.rgb/b.a,1),p.toLinear).rgb;
float3 code=dyToolEncode(cst_float_air(float4(ac,1),dyPrimaryAP1To709).rgb),source=o.a>0?dyToolEncode(cst_float_air(float4(o.rgb/o.a,1),p.originalTo709).rgb):float3(0);
float2 uv=(float2(xy)+.5f)/float2(output.get_width(),output.get_height());float x=h.offsetX+uv.x*h.scaleX,y=h.offsetY+uv.y*h.scaleY;float coverage=1;bool found=false;
for(uint i=0;i<h.count;i++)if(masks[i].section==h.section){float w=dyToolMask(x,y,masks[i].mask.parameters.sourceStage==DYMaskSourceOriginal?source:code,masks[i].mask);if(!found){coverage=masks[i].combine==1?1-w:w;found=true;}else if(masks[i].combine==1)coverage*=1-w;else if(masks[i].combine==2)coverage*=w;else coverage=1-(1-coverage)*(1-w);}
float w=coverage*p.amount;if(w<=0){output.write(a,xy);return;}if(w>=1){output.write(b,xy);return;}output.write(float4(cst_float_air(float4(mix(ac,bc,w),1),p.fromLinear).rgb*a.a,a.a),xy);
if(any(xy>=uint2(output.get_width(),output.get_height())))return;
float4 a=before.read(xy),b=after.read(xy);
if(!(a.a>0)||!(b.a>0)){output.write(a,xy);return;}
float3 ac=0,code=0,source=0;
if(h.keySources&DYToolMaskLayerKey){
ac=cst_float_air(float4(a.rgb/a.a,1),p.toLinear).rgb;
code=dyToolEncode(cst_float_air(float4(ac,1),dyPrimaryAP1To709).rgb);
}
if(h.keySources&DYToolMaskOriginalKey){
float4 o=original.read(xy);
if(o.a>0)source=dyToolEncode(cst_float_air(float4(o.rgb/o.a,1),p.originalTo709).rgb);
}
float2 uv=(float2(xy)+.5f)/float2(output.get_width(),output.get_height());
float x=h.offsetX+uv.x*h.scaleX,y=h.offsetY+uv.y*h.scaleY;
float coverage=1;bool found=false;
for(uint i=0;i<h.count;i++)if(masks[i].section==h.section){
float weight=dyToolMask(x,y,masks[i].mask.parameters.sourceStage==DYMaskSourceOriginal?source:code,masks[i].mask);
if(!found){coverage=masks[i].combine==1?1-weight:weight;found=true;}
else if(masks[i].combine==1)coverage*=1-weight;
else if(masks[i].combine==2)coverage*=weight;
else coverage=1-(1-coverage)*(1-weight);
}
float w=coverage*p.amount;
if(w<=0){output.write(a,xy);return;}
if(w>=1){output.write(b,xy);return;}
if(!(h.keySources&DYToolMaskLayerKey))ac=cst_float_air(float4(a.rgb/a.a,1),p.toLinear).rgb;
float3 bc=cst_float_air(float4(b.rgb/b.a,1),p.toLinear).rgb;
output.write(float4(cst_float_air(float4(mix(ac,bc,w),1),p.fromLinear).rgb*a.a,a.a),xy);
}
kernel void dyUnifiedExposure(texture2d<float,access::read> a [[texture(0)]],texture2d<float,access::write> b [[texture(1)]],constant float& gain [[buffer(0)]],uint2 p [[thread_position_in_grid]]){
if(any(p>=uint2(b.get_width(),b.get_height())))return;float4 c=a.read(p);if(c.a>0)c.rgb*=gain;b.write(c,p);
+93 -18
查看文件
@@ -434,19 +434,28 @@ static NSImage *DYWheelImage(void) {
- (void)sendHue:(double)hue saturation:(double)sat {
[self setHue:hue saturation:sat];[self.delegate writeGraphicValues:@{[NSString stringWithFormat:@"grade%ld_0",(long)_index]:@(hue),[NSString stringWithFormat:@"grade%ld_1",(long)_index]:@(sat)}];
}
- (void)mouseDown:(NSEvent *)event {
- (void)finishGesture {
if(!_dragging)return;
_dragging=NO;
[self.delegate graphicGesture:NO title:nil];
}
- (void)viewWillMoveToWindow:(NSWindow *)window {
if(!window)[self finishGesture];
[super viewWillMoveToWindow:window];
}
- (void)mouseDown:(NSEvent *)event {
[self finishGesture];
NSPoint p=[self convertPoint:event.locationInWindow fromView:nil];NSRect r=[self wheelRect];
if(hypot(p.x-NSMidX(r),p.y-NSMidY(r))>r.size.width*.5)return;
if(event.clickCount==2){[self sendHue:0 saturation:0];return;}
_dragging=YES;[self updateAt:p];
_dragging=YES;[self.delegate graphicGesture:YES title:@"调整颜色分级"];[self updateAt:p];
}
- (void)updateAt:(NSPoint)p {
NSRect r=[self wheelRect];double dx=p.x-NSMidX(r),dy=NSMidY(r)-p.y,h=atan2(dy,dx)*180/M_PI;if(h<0)h+=360;
[self sendHue:h saturation:fmin(100,hypot(dx,dy)/(r.size.width*.5)*100)];
}
- (void)mouseDragged:(NSEvent *)event {if(_dragging)[self updateAt:[self convertPoint:event.locationInWindow fromView:nil]];}
- (void)mouseUp:(NSEvent *)event {if(_dragging)[self updateAt:[self convertPoint:event.locationInWindow fromView:nil]];_dragging=NO;}
- (void)mouseUp:(NSEvent *)event {if(_dragging)[self updateAt:[self convertPoint:event.locationInWindow fromView:nil]];[self finishGesture];}
@end
@interface DYWheelPanel : DYFlippedView {
@@ -495,7 +504,9 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
NSMutableDictionary *_tabs;
NSInteger _visibleLooks;
NSButton *_colorSettings;BOOL _colorSettingsExpanded;
BOOL _refreshing,_graphicUndoOpen,_graphicCancelled;CMTime _graphicTime;NSMutableDictionary *_graphicExpected;
BOOL _refreshing,_graphicUndoOpen,_graphicCancelled,_tearingDown;
CMTime _graphicTime;
NSMutableDictionary *_graphicExpected,*_graphicPending;
BOOL _embedded,_workspaceEditor,_unified,_measuringDefaultHeight;NSArray *_renderOrder;NSMutableDictionary *_stackViews;NSArray *_stackOrder;NSDictionary *_stackRoots;CGFloat _stackHeight,_preferredHeight,_maximumViewportHeight;
DYSpiderPanel *_spiderPanel;
BOOL _spiderEditing,_spiderUndoOpen,_spiderConflict;
@@ -599,15 +610,15 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
DYBetaSpanEnd(beta,nil);return self;
}
- (void)dealloc {
[self graphicGesture:NO title:nil];_spiderPanel.delegate=nil;[self spiderGesture:NO];[_workspace close];[_workspace release];[_workspaceButton release];[_workspaceSelectedNode release];
for(id graphic in _graphics)if([graphic isKindOfClass:DYPrimaryBalanceWheel.class])[(DYPrimaryBalanceWheel*)graphic setDelegate:nil];
_tearingDown=YES;[self graphicGesture:NO title:nil];_spiderPanel.delegate=nil;[self spiderGesture:NO];[_workspace close];[_workspace release];[_workspaceButton release];[_workspaceSelectedNode release];
for(id graphic in _graphics)[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];[NSWorkspace.sharedWorkspace.notificationCenter removeObserver:self];
if(_embedded)[(id)_manager release];[_stackViews release];[_stackOrder release];[_stackRoots release];[_renderOrder release];
[_brand release]; [_subtitle release]; [_websiteLink release]; [_resetAll release]; [_save release]; [_load release]; [_export release];[_colorSettings release];[_addModule release];
[_mosaicButton release];[_managedPanel release];[_scroll release]; [_document release]; [_sections release]; [_cards release]; [_controls release]; [_assetButtons release]; [_graphics release]; [_sampler release];
[_recentBrowser close];[_recentBrowser release];[_recentHost release];
[_browser close];[_browser release];[_renderer release];[_library release];[_themeButtons release];[_tabs release];[_graphicExpected release];
[_browser close];[_browser release];[_renderer release];[_library release];[_themeButtons release];[_tabs release];[_graphicExpected release];[_graphicPending release];
[super dealloc];
}
- (BOOL)isFlipped { return YES; }
@@ -990,7 +1001,7 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
return (roots==1&&[only isEqual:key])||[@[@"primary",@"base",@"spider"]containsObject:key];
}
- (void)refresh {
if(_refreshing||_spiderEditing||!_manager)return;
if(_refreshing||_spiderEditing||_graphicUndoOpen||_tearingDown||!_manager)return;
id<FxCustomParameterActionAPI_v4> action=[self actionAPI]; if(!action)return;
_refreshing=YES;
uint64_t beta=DYBetaSpanBegin(@"inspector_refresh",nil);
@@ -1129,22 +1140,86 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
[self postChanged];
}
- (void)writeGraphicValues:(NSDictionary *)values {
NSMutableDictionary *byKey=[NSMutableDictionary dictionary];for(NSDictionary *d in DYDescriptors())byKey[d[@"key"]]=d;
if(!_graphicUndoOpen){[self commitGraphicValues:values];return;}
if(_graphicCancelled||!values.count)return;
if(!_graphicPending)_graphicPending=[NSMutableDictionary new];
BOOL schedule=_graphicPending.count==0;
[_graphicPending addEntriesFromDictionary:values];
if(schedule)[self performSelector:@selector(flushGraphicValues) withObject:nil afterDelay:1.0/60.0
inModes:@[NSRunLoopCommonModes,NSEventTrackingRunLoopMode]];
}
- (void)flushGraphicValues {
if(!_graphicPending.count)return;
NSDictionary *values=[[_graphicPending copy]autorelease];
[_graphicPending removeAllObjects];
[self commitGraphicValues:values];
}
- (void)commitGraphicValues:(NSDictionary *)values {
static NSDictionary *byKey;
static dispatch_once_t once;
dispatch_once(&once,^{
NSMutableDictionary *map=[NSMutableDictionary dictionary];
for(NSDictionary *descriptor in DYDescriptors())map[descriptor[@"key"]]=descriptor;
byKey=[map copy];
});
id<FxCustomParameterActionAPI_v4> action=[self actionAPI];if(!action)return;
[action startAction:self];
@try {
CMTime t=action.currentTime;id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];
if(_graphicUndoOpen){if(_graphicCancelled||CMTimeCompare(t,_graphicTime)!=0){_graphicCancelled=YES;return;}id<FxParameterRetrievalAPI_v6>get=[_manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];for(NSString*key in values){NSDictionary*d=byKey[key];double actual=NAN;if(d&&_graphicExpected[key]&&(![get getFloatValue:&actual fromParameter:[d[@"pid"]unsignedIntValue]atTime:t]||!std::isfinite(actual)||fabs(actual-[_graphicExpected[key]doubleValue])>1e-6*MAX(1.,fabs(actual)))){_graphicCancelled=YES;return;}}}
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(_graphicUndoOpen)for(NSString*key in values)_graphicExpected[key]=values[key];
if(primaryEdit){[set setFloatValue:1 toParameter:2236 atTime:t];[self clearPrimaryBypasses:set time:t];}
CMTime time=action.currentTime;
id<FxParameterSettingAPI_v6> set=[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];
if(_graphicUndoOpen){
if(_graphicCancelled||CMTimeCompare(time,_graphicTime)!=0){_graphicCancelled=YES;return;}
id<FxParameterRetrievalAPI_v6> get=[_manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
for(NSString *key in values){
NSDictionary *descriptor=byKey[key];double actual=NAN;
NSNumber *expected=_graphicExpected[key];
if(descriptor&&expected&&(![get getFloatValue:&actual fromParameter:[descriptor[@"pid"]unsignedIntValue] atTime:time]||
!std::isfinite(actual)||fabs(actual-expected.doubleValue)>1e-6*MAX(1.,fabs(actual)))){
_graphicCancelled=YES;return;
}
}
}
BOOL primaryEdit=NO;
for(NSString *key in values){
NSDictionary *descriptor=byKey[key];double v=[values[key]doubleValue];
if(!descriptor||!std::isfinite(v))continue;
primaryEdit|=[key hasPrefix:@"cm"];
v=fmax([descriptor[@"min"]doubleValue],fmin([descriptor[@"max"]doubleValue],v));
if(_graphicUndoOpen&&_graphicExpected[key]&&[_graphicExpected[key]doubleValue]==v)continue;
if([set setFloatValue:v toParameter:[descriptor[@"pid"]unsignedIntValue] atTime:time]&&_graphicUndoOpen)
_graphicExpected[key]=@(v);
}
if(primaryEdit){[set setFloatValue:1 toParameter:2236 atTime:time];[self clearPrimaryBypasses:set time:time];}
} @finally {[action endAction:self];}
[self postChanged];
if(!_graphicUndoOpen&&!_tearingDown)[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){_graphicTime=a.currentTime;_graphicCancelled=NO;[_graphicExpected release];_graphicExpected=[NSMutableDictionary new];id<FxParameterRetrievalAPI_v6>get=[_manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];for(NSDictionary*r in _controls.allValues){NSDictionary*d=r[@"descriptor"];double value=NAN;if([get getFloatValue:&value fromParameter:[d[@"pid"]unsignedIntValue]atTime:_graphicTime]&&std::isfinite(value))_graphicExpected[d[@"key"]]=@(value);}_graphicUndoOpen=[undo startUndoGroup:title?:@"调整颜色"];}else{[undo endUndoGroup];_graphicUndoOpen=NO;_graphicCancelled=NO;[_graphicExpected removeAllObjects];}}@finally{[a endAction:self];}
- (void)graphicGesture:(BOOL)begin title:(NSString *)title {
if(begin==_graphicUndoOpen)return;
id<FxCustomParameterActionAPI_v4> action=[self actionAPI];if(!action)return;
if(!begin){
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(flushGraphicValues) object:nil];
[self flushGraphicValues];
}
[action startAction:self];
@try{
id<FxUndoAPI> undo=[_manager apiForProtocol:@protocol(FxUndoAPI)];
if(begin){
_graphicTime=action.currentTime;_graphicCancelled=NO;
[_graphicExpected release];_graphicExpected=[NSMutableDictionary new];
id<FxParameterRetrievalAPI_v6> get=[_manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
for(NSDictionary *record in _controls.allValues){
NSDictionary *descriptor=record[@"descriptor"];double value=NAN;
if([get getFloatValue:&value fromParameter:[descriptor[@"pid"]unsignedIntValue] atTime:_graphicTime]&&std::isfinite(value))
_graphicExpected[descriptor[@"key"]]=@(value);
}
_graphicUndoOpen=[undo startUndoGroup:title?:@"调整颜色"];
}else{
[undo endUndoGroup];_graphicUndoOpen=_graphicCancelled=NO;
[_graphicExpected removeAllObjects];
}
}@finally{[action endAction:self];}
if(!begin&&!_tearingDown)[self postChanged];
}
- (void)spiderGesture:(BOOL)begin {
if(begin==_spiderEditing)return;
+1 -1
查看文件
@@ -13,5 +13,5 @@ FOUNDATION_EXPORT void DYFollowPrimaryWorkingSpace(NSMutableDictionary *document
FOUNDATION_EXPORT void DYPrimaryControlChanged(id<PROAPIAccessing> manager,CMTime time,NSString *key);
FOUNDATION_EXPORT NSArray<NSDictionary*> *DYManagedInputSpaces(void);
FOUNDATION_EXPORT NSArray<NSDictionary*> *DYManagedOutputSpaces(void);
FOUNDATION_EXPORT NSDictionary *DYHostColorContext(FxImageTile *source,FxImageTile *destination,NSInteger primaries);
FOUNDATION_EXPORT NSDictionary *DYHostColorContext(CGColorSpaceRef source,CGColorSpaceRef destination,NSInteger primaries);
FOUNDATION_EXPORT CGColorSpaceRef DYManagedTileSpace(FxImageTile *tile,NSInteger primaries) CF_RETURNS_RETAINED;
+1 -1
查看文件
@@ -43,4 +43,4 @@ static NSString *profileLabel(CGColorSpaceRef space){
return name.length?[name stringByReplacingOccurrencesOfString:@"kCGColorSpace" withString:@""]:@"自定义 RGB 配置";
}
static NSString *profileKey(CGColorSpaceRef space){if(!space)return @"unknown";CFPropertyListRef p=CGColorSpaceCopyPropertyList(space);NSData *d=p?[NSPropertyListSerialization dataWithPropertyList:(id)p format:NSPropertyListBinaryFormat_v1_0 options:0 error:nil]:nil;if(p)CFRelease(p);if(!d)return @"unknown";unsigned char hash[CC_SHA256_DIGEST_LENGTH];CC_SHA256(d.bytes,(CC_LONG)d.length,hash);NSMutableString*s=[NSMutableString string];for(auto c:hash)[s appendFormat:@"%02x",c];return s;}
NSDictionary *DYHostColorContext(FxImageTile *source,FxImageTile *destination,NSInteger primaries){CGColorSpaceRef a=DYManagedTileSpace(source,primaries),b=DYManagedTileSpace(destination,primaries);NSString *an=profileLabel(a),*bn=profileLabel(b);NSDictionary *d=@{@"primaries":@(primaries),@"source":an?:(a?@"自定义 RGB 配置":@"未知空间"),@"destination":bn?:(b?@"自定义 RGB 配置":@"未知空间"),@"sourceKey":profileKey(a),@"destinationKey":profileKey(b),@"processing":@"RGB Linear",@"alpha":@"premultiplied"};if(a)CGColorSpaceRelease(a);if(b)CGColorSpaceRelease(b);return d;}
NSDictionary *DYHostColorContext(CGColorSpaceRef a,CGColorSpaceRef b,NSInteger primaries){NSString *an=profileLabel(a),*bn=profileLabel(b);NSDictionary *d=@{@"primaries":@(primaries),@"source":an?:(a?@"自定义 RGB 配置":@"未知空间"),@"destination":bn?:(b?@"自定义 RGB 配置":@"未知空间"),@"sourceKey":profileKey(a),@"destinationKey":profileKey(b),@"processing":@"RGB Linear",@"alpha":@"premultiplied"};return d;}
+77 -29
查看文件
@@ -1,27 +1,65 @@
- (void)managedPreview:(id<MTLTexture>)texture source:(FxImageTile*)source entry:(NSMutableDictionary*)entry {
- (DYManagedPreviewReadback)encodeManagedPreview:(id<MTLTexture>)texture source:(FxImageTile*)source
entry:(NSMutableDictionary*)entry commands:(id<MTLCommandBuffer>)commands {
if(!commands)return {};
NSSize size=DYLookSampleSize(texture,source.pixelAspect,DYLookPreviewStandardEdge);
@synchronized(_previewLock){if(_exporting||(NSEqualSizes(size,_lastLookPreviewSize)&&CACurrentMediaTime()-_lastPreview<=.5))return;}
id<MTLComputePipelineState>p=[self computePipeline:@"dyManagedPreview" entry:entry error:nil];if(!p)return;
id<MTLBuffer>b=[[entry[@"device"]newBufferWithLength:320*180*16 options:MTLResourceStorageModeShared]autorelease];if(!b)return;
id<MTLCommandBuffer>cb=[entry[@"queue"]commandBuffer];id<MTLComputeCommandEncoder>ce=[cb computeCommandEncoder];[ce setComputePipelineState:p];[ce setTexture:texture atIndex:0];[ce setBuffer:b offset:0 atIndex:0];[ce dispatchThreads:MTLSizeMake(320,180,1) threadsPerThreadgroup:MTLSizeMake(8,8,1)];[ce endEncoding];
@synchronized(_previewLock){if(_exporting||(NSEqualSizes(size,_lastLookPreviewSize)&&CACurrentMediaTime()-_lastPreview<=.5))return {};}
id<MTLComputePipelineState>p=[self computePipeline:@"dyManagedPreview" entry:entry error:nil];if(!p)return {};
id<MTLBuffer>b=[[entry[@"device"]newBufferWithLength:320*180*16 options:MTLResourceStorageModeShared]autorelease];if(!b)return {};
id<MTLComputeCommandEncoder>ce=[commands computeCommandEncoder];if(!ce)return {};
[ce setComputePipelineState:p];[ce setTexture:texture atIndex:0];[ce setBuffer:b offset:0 atIndex:0];[ce dispatchThreads:MTLSizeMake(320,180,1) threadsPerThreadgroup:MTLSizeMake(8,8,1)];[ce endEncoding];
FxImageOrigin origin=source.imageOrigin;
id<MTLBuffer>standard=NSEqualSizes(size,NSMakeSize(320,180))?nil:[self encodeLookPreview:texture inputLUT:nil strength:0 size:size standard:YES origin:origin entry:entry commands:cb];
id<MTLBuffer>standard=NSEqualSizes(size,NSMakeSize(320,180))?nil:[self encodeLookPreview:texture inputLUT:nil strength:0 size:size standard:YES origin:origin entry:entry commands:commands];
NSSize highSize=DYLookSampleSize(texture,source.pixelAspect,DYLookPreviewHighEdge);
id<MTLBuffer>high=[self encodeLookPreview:texture inputLUT:nil strength:0 size:highSize standard:NO origin:origin entry:entry commands:cb];
[cb commit];[cb waitUntilCompleted];
if(cb.status==MTLCommandBufferStatusCompleted)[self publishPreview:b standard:standard size:size high:high highSize:highSize origin:origin];
id<MTLBuffer>high=[self encodeLookPreview:texture inputLUT:nil strength:0 size:highSize standard:NO origin:origin entry:entry commands:commands];
return {b,standard,high,size,highSize,origin};
}
// Included in DYRenderer. V1 callers and their ABI remain on renderSource:...tools:error:.
- (NSDictionary*)colorContext {@synchronized(_previewLock){return [[_colorContext copy]autorelease];}}
- (BOOL)managedDispatch:(NSString*)name textures:(NSArray*)textures data:(const void*)data length:(NSUInteger)length extra:(const void*)extra extraLength:(NSUInteger)extraLength entry:(NSMutableDictionary*)entry error:(NSError**)error {
- (void)publishManagedPreview:(DYManagedPreviewReadback)preview {
if(preview.analysis)[self publishPreview:preview.analysis standard:preview.standard size:preview.size high:preview.high highSize:preview.highSize origin:preview.origin];
}
- (NSDictionary*)colorContext {@synchronized(_previewLock){return [[_colorContext retain]autorelease];}}
static BOOL DYColorSpacesMatch(CGColorSpaceRef a,CGColorSpaceRef b){return a==b||(a&&b&&CFEqual(a,b));}
- (void)updateHostColorContextFrom:(FxImageTile*)source to:(FxImageTile*)destination primaries:(NSInteger)primaries {
CGColorSpaceRef a=DYManagedTileSpace(source,primaries),b=DYManagedTileSpace(destination,primaries);
BOOL sourceChanged=!DYColorSpacesMatch(a,_renderSourceSpace);
BOOL destinationChanged=!DYColorSpacesMatch(b,_renderDestinationSpace);
if(!_colorContext||sourceChanged||destinationChanged||primaries!=[_colorContext[@"primaries"]integerValue]){
NSDictionary *context=DYHostColorContext(a,b,primaries);
@synchronized(_previewLock){[_colorContext release];_colorContext=[context copy];}
}
if(sourceChanged){if(_renderSourceSpace)CGColorSpaceRelease(_renderSourceSpace);_renderSourceSpace=a;a=nil;}
if(destinationChanged){
if(_renderDestinationSpace)CGColorSpaceRelease(_renderDestinationSpace);_renderDestinationSpace=b;b=nil;
[_renderOutputProfile release];_renderOutputProfile=nil;
}
if(a)CGColorSpaceRelease(a);if(b)CGColorSpaceRelease(b);
}
- (DYColorProfile*)managedOutputProfile:(NSError**)error {
if(!_renderDestinationSpace){fail(error,@"宿主未提供明确的目标颜色空间。");return nil;}
if(!_renderOutputProfile){
CGColorSpaceRef linear709=CGColorSpaceCreateWithName(kCGColorSpaceExtendedLinearSRGB);
_renderOutputProfile=[[DYColorProfile alloc]initWithSource:linear709 target:_renderDestinationSpace error:error];
if(linear709)CGColorSpaceRelease(linear709);
}
return _renderOutputProfile;
}
- (BOOL)encodeManagedDispatch:(NSString*)name textures:(NSArray*)textures data:(const void*)data length:(NSUInteger)length
extra:(const void*)extra extraLength:(NSUInteger)extraLength entry:(NSMutableDictionary*)entry
commands:(id<MTLCommandBuffer>)commands error:(NSError**)error {
if(!commands)return NO;
id<MTLComputePipelineState>pipeline=[self computePipeline:name entry:entry error:error];if(!pipeline)return NO;
id<MTLCommandBuffer>cb=[entry[@"queue"]commandBuffer];id<MTLComputeCommandEncoder>ce=[cb computeCommandEncoder];[ce setComputePipelineState:pipeline];for(NSUInteger i=0;i<textures.count;i++)[ce setTexture:textures[i] atIndex:i];if(data)[ce setBytes:data length:length atIndex:0];if(extra)[ce setBytes:extra length:extraLength atIndex:1];id<MTLTexture>t=textures[0];[ce dispatchThreads:MTLSizeMake(t.width,t.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[ce endEncoding];[cb commit];[cb waitUntilCompleted];return cb.status==MTLCommandBufferStatusCompleted?YES:fail(error,cb.error.localizedDescription);
id<MTLComputeCommandEncoder>ce=[commands computeCommandEncoder];if(!ce)return fail(error,@"无法创建调色编码器");
[ce setComputePipelineState:pipeline];
for(NSUInteger i=0;i<textures.count;i++)[ce setTexture:textures[i] atIndex:i];
if(data)[ce setBytes:data length:length atIndex:0];if(extra)[ce setBytes:extra length:extraLength atIndex:1];
id<MTLTexture>t=textures[0];[ce dispatchThreads:MTLSizeMake(t.width,t.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];
[ce endEncoding];return YES;
}
- (BOOL)managedConvert:(dycm::Space)from to:(dycm::Space)to display:(NSInteger)display gamut:(BOOL)gamut input:(id<MTLTexture>)input output:(id<MTLTexture>)output entry:(NSMutableDictionary*)entry error:(NSError**)error {
- (BOOL)managedConvert:(dycm::Space)from to:(dycm::Space)to display:(NSInteger)display gamut:(BOOL)gamut input:(id<MTLTexture>)input output:(id<MTLTexture>)output entry:(NSMutableDictionary*)entry commands:(id<MTLCommandBuffer>)commands error:(NSError**)error {
if(!commands)return NO;
static std::mutex guard;static std::map<std::string,dycm::Transform>plans;
std::string key=std::to_string(unsigned(from))+":"+std::to_string(unsigned(to))+":"+std::to_string(display)+":"+std::to_string(gamut);
dycm::Transform transform=[&]{std::lock_guard<std::mutex>lock(guard);auto i=plans.find(key);if(i!=plans.end())return i->second;auto t=display?dycm::Transform::display(from,dycm::Output(display),gamut):dycm::Transform::convert(from,to);if(plans.size()>=48)plans.clear();plans.emplace(key,t);return t;}();
DYColorManagementGPU*p=[[DYColorManagementGPUCache sharedCache]pipelineWithDevice:entry[@"device"] transform:transform resourceBudget:128*1024*1024 error:error];if(!p)return NO;id<MTLCommandBuffer>cb=[entry[@"queue"]commandBuffer];if(![p encodeInput:input output:output alpha:dycm::Alpha::Premultiplied commandBuffer:cb workspaceBudget:2ull*1024*1024*1024 error:error])return NO;[cb commit];[cb waitUntilCompleted];return cb.status==MTLCommandBufferStatusCompleted?YES:fail(error,cb.error.localizedDescription);
DYColorManagementGPU*p=[[DYColorManagementGPUCache sharedCache]pipelineWithDevice:entry[@"device"] transform:transform resourceBudget:128*1024*1024 error:error];if(!p)return NO;return [p encodeInput:input output:output alpha:dycm::Alpha::Premultiplied commandBuffer:commands workspaceBudget:2ull*1024*1024*1024 error:error];
}
- (BOOL)managedProfile:(DYColorProfile*)profile input:(id<MTLTexture>)input output:(id<MTLTexture>)output entry:(NSMutableDictionary*)entry error:(NSError**)error {
if(!profile)return NO;NSMutableDictionary*cache=entry[@"managedProfiles"];if(!cache){cache=[NSMutableDictionary dictionary];entry[@"managedProfiles"]=cache;}DYColorProfileGPU*p=cache[profile.key];if(!p){p=[[[DYColorProfileGPU alloc]initWithDevice:entry[@"device"] profile:profile error:error]autorelease];if(!p)return NO;if(cache.count>=16)[cache removeAllObjects];cache[profile.key]=p;}return [p renderInput:input output:output alpha:dycm::Alpha::Premultiplied workspaceBudget:2ull*1024*1024*1024 cancelled:nullptr error:error];
@@ -97,7 +135,7 @@
}
- (BOOL)renderColorSource:(FxImageTile*)src destination:(FxImageTile*)dst uniforms:(DYUniforms)u paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools colorManagement:(NSDictionary*)state hostPrimaries:(NSInteger)primaries error:(NSError**)error {@synchronized(self){return DYRenderWithPool(error,[&]()->BOOL{
if(state&&![state isKindOfClass:NSDictionary.class])return fail(error,@"色彩管理状态无效。");
NSDictionary*context=DYHostColorContext(src,dst,primaries);@synchronized(_previewLock){[_colorContext release];_colorContext=[context copy];}
[self updateHostColorContextFrom:src to:dst primaries:primaries];
if([tools[@"mosaic"][@"enabled"]boolValue]){
if(!DYValidToolDocument(tools))return fail(error,@"局部马赛克设置无效。");
FxImageTile *mosaic=[self sourceByApplyingMosaic:tools source:src registry:dst.deviceRegistryID error:error];if(!mosaic)return NO;
@@ -116,22 +154,23 @@
if(DYPrimaryColorState(state))return [self renderPrimarySource:src destination:dst uniforms:u paths:paths spider:spider tools:tools hostPrimaries:primaries error:error];
NSMutableDictionary*entry=[self device:dst.deviceRegistryID error:error];if(!entry)return NO;id<MTLDevice>d=entry[@"device"];id<MTLTexture>source=[src metalTextureForDevice:d];if(!source)return fail(error,@"色彩管理输入纹理不可用。");
uint64_t pixels=uint64_t(source.width)*source.height;if(!pixels||pixels>64ull*1024*1024||pixels*16*8>MAX(768ull*1024*1024,MIN(2ull*1024*1024*1024,d.recommendedMaxWorkingSetSize/2)))return fail(error,@"当前画面超过色彩管理内存预算。");
CGColorSpaceRef srcSpace=DYManagedTileSpace(src,primaries),dstSpace=DYManagedTileSpace(dst,primaries),aces=CGColorSpaceCreateWithName(kCGColorSpaceACESCGLinear),linear709=CGColorSpaceCreateWithName(kCGColorSpaceExtendedLinearSRGB);
DYManagedBatch batch{entry[@"queue"],error};
CGColorSpaceRef srcSpace=_renderSourceSpace,dstSpace=_renderDestinationSpace,aces=CGColorSpaceCreateWithName(kCGColorSpaceACESCGLinear),linear709=CGColorSpaceCreateWithName(kCGColorSpaceExtendedLinearSRGB);
NSMutableArray*pool=[NSMutableArray array];id<MTLTexture>current=nil;
auto next=[&](id<MTLTexture>exclude=nil)->id<MTLTexture>{for(id<MTLTexture>t in pool)if(t!=current&&t!=exclude)return t;MTLTextureDescriptor*td=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA32Float width:source.width height:source.height mipmapped:NO];td.storageMode=MTLStorageModePrivate;td.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite|MTLTextureUsageRenderTarget;id<MTLTexture>t=[d newTextureWithDescriptor:td];if(t){[pool addObject:t];[t release];}return t;};
auto copy=[&](id<MTLTexture>input,id<MTLTexture>output){return input&&output&&[self managedDispatch:@"dyManagedCopy" textures:@[input,output] data:nullptr length:0 extra:nullptr extraLength:0 entry:entry error:error];};
auto convert=[&](dycm::Space a,dycm::Space b,NSInteger display=0,BOOL gamut=NO){id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配色彩管理缓冲区。");BOOL ok=[self managedConvert:a to:b display:display gamut:gamut input:current output:out entry:entry error:error];if(ok)current=out;return ok;};
auto profile=[&](DYColorProfile*p){id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配颜色配置缓冲区。");BOOL ok=[self managedProfile:p input:current output:out entry:entry error:error];if(ok)current=out;return ok;};
auto copy=[&](id<MTLTexture>input,id<MTLTexture>output){return input&&output&&[self encodeManagedDispatch:@"dyManagedCopy" textures:@[input,output] data:nullptr length:0 extra:nullptr extraLength:0 entry:entry commands:batch.commands() error:error];};
auto convert=[&](dycm::Space a,dycm::Space b,NSInteger display=0,BOOL gamut=NO){id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配色彩管理缓冲区。");BOOL ok=[self managedConvert:a to:b display:display gamut:gamut input:current output:out entry:entry commands:batch.commands() error:error];if(ok)current=out;return ok;};
auto profile=[&](DYColorProfile*p){if(!p)return NO;if(p.identity)return YES;if(!batch.finish())return NO;id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配颜色配置缓冲区。");BOOL ok=[self managedProfile:p input:current output:out entry:entry error:error];if(ok)current=out;return ok;};
auto tile=[&](id<MTLTexture>texture){DYExportTile*t=[[[DYExportTile alloc]initWithTexture:texture registry:d.registryID]autorelease];[t setBounds:src.tilePixelBounds origin:src.imageOrigin];[t setPixelAspect:src.pixelAspect];return t;};
auto blend=[&](id<MTLTexture>before,NSArray*masks,NSString*type){if(!masks.count)return YES;id<MTLTexture>out=next(before);if(!out)return fail(error,@"无法分配工作空间蒙版缓冲区。");DYToolMaskHeader h{};id<MTLBuffer>mb=[self maskBuffer:@{type:masks} tile:src device:d header:&h];h.section=(int)[DYToolTypes()indexOfObject:type];id<MTLComputePipelineState>p=[self computePipeline:@"dyManagedBlend" entry:entry error:error];if(!mb||!p)return NO;id<MTLCommandBuffer>cb=[entry[@"queue"]commandBuffer];id<MTLComputeCommandEncoder>ce=[cb computeCommandEncoder];[ce setComputePipelineState:p];[ce setTexture:before atIndex:0];[ce setTexture:current atIndex:1];[ce setTexture:out atIndex:2];[ce setBuffer:mb offset:0 atIndex:0];[ce setBytes:&h length:sizeof(h) atIndex:1];[ce dispatchThreads:MTLSizeMake(source.width,source.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[ce endEncoding];[cb commit];[cb waitUntilCompleted];if(cb.status!=MTLCommandBufferStatusCompleted)return fail(error,cb.error.localizedDescription);current=out;return YES;};
auto basis=[&](DYUniforms values,NSArray*masks){values.cm.inputTransfer=values.cm.workingTransfer=values.cm.outputTransfer=1;values.cm.inputGamut=values.cm.workingGamut=values.cm.outputGamut=2;values.cm.toneMapping=0;values.inputSectionEnabled=values.cm.outputEnabled=0;if(values.primarySectionEnabled<.5||values.cm.basisEnabled<.5||identityCM(values)||values.cm.mix<=0)return YES;id<MTLTexture>before=current,out=next();BasisParams p=DYCMRender(values.cm).basis;float amount=values.cm.mix;if(!out||![self managedDispatch:@"dyManagedBasis" textures:@[current,out] data:&p length:sizeof(p) extra:&amount extraLength:4 entry:entry error:error])return NO;current=out;return blend(before,masks,@"primary");};
auto print=[&](DYUniforms values,NSArray*masks){if(!DYFilmPrintActive(values))return YES;NSArray*names=@[@"",@"kodak_2383",@"kodak_2393",@"kodak_2302_bw",@"fuji_3510",@"fuji_3513",@"fuji_3519",@"fuji_3521",@"agfa_cp30"];NSString*path=[[NSBundle bundleForClass:self.class]pathForResource:names[(int)values.filmPrint.x] ofType:@"dylut" inDirectory:@"PrintLooks"];id<MTLTexture>cube=path?[self lut:path entry:entry error:error]:nil;if(!cube)return fail(error,@"印片资源不可用。");id<MTLTexture>before=current,out=next();float amount=values.filmPrint.y*values.film.mix;if(!out||![self managedDispatch:@"dyManagedPrint" textures:@[current,cube,out] data:&amount length:4 extra:nullptr extraLength:0 entry:entry error:error])return NO;current=out;return blend(before,masks,@"film");};
auto blend=[&](id<MTLTexture>before,NSArray*masks,NSString*type){if(!masks.count)return YES;id<MTLTexture>out=next(before);if(!out)return fail(error,@"无法分配工作空间蒙版缓冲区。");DYToolMaskHeader h{};id<MTLBuffer>mb=[self maskBuffer:@{type:masks} tile:src device:d header:&h];h.section=(int)[DYToolTypes()indexOfObject:type];id<MTLComputePipelineState>p=[self computePipeline:@"dyManagedBlend" entry:entry error:error];if(!mb||!p)return NO;id<MTLComputeCommandEncoder>ce=[batch.commands() computeCommandEncoder];if(!ce)return fail(error,@"无法创建蒙版编码器");[ce setComputePipelineState:p];[ce setTexture:before atIndex:0];[ce setTexture:current atIndex:1];[ce setTexture:out atIndex:2];[ce setBuffer:mb offset:0 atIndex:0];[ce setBytes:&h length:sizeof(h) atIndex:1];[ce dispatchThreads:MTLSizeMake(source.width,source.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[ce endEncoding];current=out;return YES;};
auto basis=[&](DYUniforms values,NSArray*masks){values.cm.inputTransfer=values.cm.workingTransfer=values.cm.outputTransfer=1;values.cm.inputGamut=values.cm.workingGamut=values.cm.outputGamut=2;values.cm.toneMapping=0;values.inputSectionEnabled=values.cm.outputEnabled=0;if(values.primarySectionEnabled<.5||values.cm.basisEnabled<.5||identityCM(values)||values.cm.mix<=0)return YES;id<MTLTexture>before=current,out=next();BasisParams p=DYCMRender(values.cm).basis;float amount=values.cm.mix;if(!out||![self encodeManagedDispatch:@"dyManagedBasis" textures:@[current,out] data:&p length:sizeof(p) extra:&amount extraLength:4 entry:entry commands:batch.commands() error:error])return NO;current=out;return blend(before,masks,@"primary");};
auto print=[&](DYUniforms values,NSArray*masks){if(!DYFilmPrintActive(values))return YES;NSArray*names=@[@"",@"kodak_2383",@"kodak_2393",@"kodak_2302_bw",@"fuji_3510",@"fuji_3513",@"fuji_3519",@"fuji_3521",@"agfa_cp30"];NSString*path=[[NSBundle bundleForClass:self.class]pathForResource:names[(int)values.filmPrint.x] ofType:@"dylut" inDirectory:@"PrintLooks"];id<MTLTexture>cube=path?[self lut:path entry:entry error:error]:nil;if(!cube)return fail(error,@"印片资源不可用。");id<MTLTexture>before=current,out=next();float amount=values.filmPrint.y*values.film.mix;if(!out||![self encodeManagedDispatch:@"dyManagedPrint" textures:@[current,cube,out] data:&amount length:4 extra:nullptr extraLength:0 entry:entry commands:batch.commands() error:error])return NO;current=out;return blend(before,masks,@"film");};
@try{try{
if(!dstSpace||(!srcSpace&&[state[@"mode"]integerValue]==1))return fail(error,@"宿主未提供明确颜色空间,无法使用新版管理。可切回旧版兼容。");
id<MTLTexture>first=next();if(!copy(source,first))return NO;current=first;
NSInteger mode=[state[@"mode"]integerValue],output=[state[@"output"]integerValue];
if(mode==1){DYColorProfile*p=[[[DYColorProfile alloc]initWithSource:srcSpace target:aces error:error]autorelease];if(!profile(p)||!convert(dycm::Space::ACEScg,dycm::Space::ACEScct))return NO;}
else {id<MTLTexture>out=next(),cube=entry[@"identity"];uint32_t useLUT=mode==3;if(useLUT){if(![paths[@"input"]length])return fail(error,@"请选择输入 LUT,并指定 LUT 输出空间。");cube=[self lut:paths[@"input"] entry:entry error:error];if(!cube)return NO;}if(!out||![self managedDispatch:@"dyManagedCarrier" textures:@[current,out,cube] data:&useLUT length:4 extra:nullptr extraLength:0 entry:entry error:error])return NO;current=out;if(!convert(dycm::Space([state[@"input"]unsignedIntValue]),dycm::Space::ACEScct))return NO;}
else {id<MTLTexture>out=next(),cube=entry[@"identity"];uint32_t useLUT=mode==3;if(useLUT){if(![paths[@"input"]length])return fail(error,@"请选择输入 LUT,并指定 LUT 输出空间。");cube=[self lut:paths[@"input"] entry:entry error:error];if(!cube)return NO;}if(!out||![self encodeManagedDispatch:@"dyManagedCarrier" textures:@[current,out,cube] data:&useLUT length:4 extra:nullptr extraLength:0 entry:entry commands:batch.commands() error:error])return NO;current=out;if(!convert(dycm::Space([state[@"input"]unsignedIntValue]),dycm::Space::ACEScct))return NO;}
DYApplyRemovedBaseTools(&u,tools);if(!basis(u,tools[@"baseMasks"][@"primary"]))return NO;
NSMutableDictionary*finishing=DYMutablePlist(tools);NSMutableSet*sceneLayers=[NSMutableSet set];
for(NSString*ID in DYToolDisplayOrder(tools)){NSDictionary*node=DYToolWithID(tools,ID);if([node[@"type"]isEqual:@"primary"]){if(!basis(DYToolUniforms(node),node[@"masks"]))return NO;[sceneLayers addObject:ID];}}
@@ -146,10 +185,19 @@
NSDictionary *finishPaths=DYVisibleBaseToolPaths(paths,finishing);
NSArray *activeFinish=DYManagedActiveFinishing(u,finishPaths,spider,finishing);
if(((mode!=1&&(output==6||output==7))||(mode==1&&primaries==kFxColorPrimaries_Rec2020))&&activeFinish.count)return fail(error,@"HDR 输出或跟随 Rec.2020 宿主时,目前支持一级调色与印片。请关闭 SDR 修饰工具;需要这些工具时,请明确选择 SDR 输出。");
[self managedPreview:current source:src entry:entry];
if(activeFinish.count){id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配显示域修饰缓冲区。");_managedFinishing=YES;BOOL ok=NO;@try{ok=[self renderSource:tile(current) destination:tile(out) uniforms:u paths:finishPaths spider:spider tools:finishing error:error];}@finally{_managedFinishing=NO;}if(!ok)return NO;current=out;}
DYColorProfile*returnProfile=[[[DYColorProfile alloc]initWithSource:linear709 target:dstSpace error:error]autorelease];if(!profile(returnProfile))return NO;
_managedFinishing=YES;@try{return [self copyTile:tile(current) to:dst entry:entry error:error];}@finally{_managedFinishing=NO;}
}catch(const std::exception&e){return fail(error,@(e.what()));}}@finally{if(srcSpace)CGColorSpaceRelease(srcSpace);if(dstSpace)CGColorSpaceRelease(dstSpace);if(aces)CGColorSpaceRelease(aces);if(linear709)CGColorSpaceRelease(linear709);}
auto preview=[self encodeManagedPreview:current source:src entry:entry commands:batch.commands()];
if(activeFinish.count){
if(!batch.finish())return NO;
[self publishManagedPreview:preview];preview={};
id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配显示域修饰缓冲区。");_managedFinishing=YES;BOOL ok=NO;@try{ok=[self renderSource:tile(current) destination:tile(out) uniforms:u paths:finishPaths spider:spider tools:finishing error:error];}@finally{_managedFinishing=NO;}if(!ok)return NO;current=out;
}
if(!profile([self managedOutputProfile:error]))return NO;
_managedFinishing=YES;
@try{
BOOL ok=[self copyTile:tile(current) to:dst rotation:0 entry:entry commands:batch.commands() error:error];
if(ok)[self publishManagedPreview:preview];
return ok;
}@finally{_managedFinishing=NO;}
}catch(const std::exception&e){return fail(error,@(e.what()));}}@finally{if(aces)CGColorSpaceRelease(aces);if(linear709)CGColorSpaceRelease(linear709);}
});}}
- (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)u paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools colorManagement:(NSDictionary*)state error:(NSError**)error {@synchronized(self){if(state&&![state isKindOfClass:NSDictionary.class])return fail(error,@"色彩管理状态无效。");if(state.count&&!DYManagedColorValid(state,error))return NO;if(state.count&&[state[@"mode"]integerValue]!=1&&[@[@6,@7]containsObject:state[@"output"]])return fail(error,@"PQ/HLG 交付需要明确的亮度与范围,请保存完整预设;当前静态 Cube 输出为 sRGB。");if(state.count){auto spatial=[](DYUniforms v){return v.baseSectionEnabled>.5&&((v.textureEnabled>.5&&v.texture!=0)||(v.clarityEnabled>.5&&v.clarity!=0)||(v.dehazeEnabled>.5&&v.dehaze!=0));};BOOL unsupported=spatial(u);for(NSDictionary *node in tools[@"layers"])unsupported|=spatial(DYToolUniforms(node));if(unsupported)return fail(error,@"纹理、清晰度或去朦胧依赖画面内容,不能完整保存到 Cube;请保存完整预设。");}_exportManagedState=state.count?state:nil;@try{return [self exportLUT:url uniforms:u paths:paths spider:spider tools:tools error:error];}@finally{_exportManagedState=nil;}}}
+18 -3
查看文件
@@ -9,9 +9,24 @@ kernel void dyPrimaryGrade(texture2d<float,access::read> a [[texture(0)]],textur
if(any(xy>=uint2(b.get_width(),b.get_height())))return;float4 c=a.read(xy);if(c.a>0){float4 v=float4(c.rgb/c.a,1);if(p.stages&1)v=cst_float_air(v,p.input);if(p.stages&2){if(p.reserved&8)v=cst_float_air(v,p.basisInput);v=basis_float_air(v,p.basis);if(p.reserved&8)v=cst_float_air(v,p.basisOutput);}if(p.stages&4)v=cst_float_air(v,p.output);if(back.inputTransfer!=back.outputTransfer||back.inputGamut!=back.outputGamut||back.toneMapping)v=cst_float_air(v,back);c.rgb=v.rgb*c.a;}b.write(c,xy);
}
kernel void dyPrimaryBlend(texture2d<float,access::read> before [[texture(0)]],texture2d<float,access::read> after [[texture(1)]],texture2d<float,access::write> output [[texture(2)]],device const DYToolMaskEntry* masks [[buffer(0)]],constant DYToolMaskHeader& h [[buffer(1)]],constant DYCSTMixParams& p [[buffer(2)]],uint2 xy [[thread_position_in_grid]]){
if(any(xy>=uint2(output.get_width(),output.get_height())))return;float4 a=before.read(xy),b=after.read(xy);if(!(a.a>0)||!(b.a>0)){output.write(a,xy);return;}float3 ac=cst_float_air(float4(a.rgb/a.a,1),p.toLinear).rgb,bc=cst_float_air(float4(b.rgb/b.a,1),p.toLinear).rgb;
float2 uv=(float2(xy)+.5f)/float2(output.get_width(),output.get_height());float w=p.amount;if(h.count)w*=dyToolCoverage(uv,dyToolEncode(cst_float_air(float4(ac,1),dyPrimaryAP1To709).rgb),masks,h,h.section);
if(w<=0){output.write(a,xy);return;}if(w>=1){output.write(b,xy);return;}output.write(float4(cst_float_air(float4(mix(ac,bc,w),1),p.fromLinear).rgb*a.a,a.a),xy);
if(any(xy>=uint2(output.get_width(),output.get_height())))return;
float4 a=before.read(xy),b=after.read(xy);
if(!(a.a>0)||!(b.a>0)){output.write(a,xy);return;}
float3 ac=0,code=0;
if(h.keySources){
ac=cst_float_air(float4(a.rgb/a.a,1),p.toLinear).rgb;
code=dyToolEncode(cst_float_air(float4(ac,1),dyPrimaryAP1To709).rgb);
}
float w=p.amount;
if(h.count){
float2 uv=(float2(xy)+.5f)/float2(output.get_width(),output.get_height());
w*=dyToolCoverage(uv,code,masks,h,h.section);
}
if(w<=0){output.write(a,xy);return;}
if(w>=1){output.write(b,xy);return;}
if(!h.keySources)ac=cst_float_air(float4(a.rgb/a.a,1),p.toLinear).rgb;
float3 bc=cst_float_air(float4(b.rgb/b.a,1),p.toLinear).rgb;
output.write(float4(cst_float_air(float4(mix(ac,bc,w),1),p.fromLinear).rgb*a.a,a.a),xy);
}
kernel void dyPrimaryCodeOutput(texture2d<float,access::read> a [[texture(0)]],texture2d<float,access::write> b [[texture(1)]],uint2 xy [[thread_position_in_grid]]){
if(any(xy>=uint2(b.get_width(),b.get_height())))return;float4 c=a.read(xy);if(c.a>0)c.rgb=dyDecode(c.rgb/c.a)*c.a;b.write(c,xy);
+43 -9
查看文件
@@ -5,24 +5,25 @@
// their established unmanaged host workflow rather than inheriting a Log tag.
if(u.primarySectionEnabled<.5||DYBaseToolRemoved(tools,@"primary"))return [self renderSource:src destination:dst uniforms:u paths:paths spider:spider tools:tools error:error];
NSMutableDictionary*entry=[self device:dst.deviceRegistryID error:error];if(!entry)return NO;id<MTLDevice>d=entry[@"device"];id<MTLTexture>source=[src metalTextureForDevice:d];if(!source)return fail(error,@"一级 CST 输入纹理不可用。");
DYManagedBatch batch{entry[@"queue"],error};
uint64_t pixels=uint64_t(source.width)*source.height;if(!pixels||pixels>64ull*1024*1024||pixels*16*8>MAX(768ull*1024*1024,MIN(2ull*1024*1024*1024,d.recommendedMaxWorkingSetSize/2)))return fail(error,@"当前画面超过一级 CST 内存预算。");
DYApplyRemovedBaseTools(&u,tools);BOOL root=u.primarySectionEnabled>.5;BOOL transparent=identityCM(u)&&!DYFilmPrintActive(u);int wt=lroundf(u.cm.workingTransfer),wg=lroundf(u.cm.workingGamut);
NSMutableArray*pool=[NSMutableArray array];NSMutableSet*pinned=[NSMutableSet set];id<MTLTexture>current=nil;
auto next=[&]()->id<MTLTexture>{for(id<MTLTexture>t in pool)if(t!=current&&![pinned containsObject:t])return t;MTLTextureDescriptor*td=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA32Float width:source.width height:source.height mipmapped:NO];td.storageMode=MTLStorageModePrivate;td.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite|MTLTextureUsageRenderTarget;id<MTLTexture>t=[d newTextureWithDescriptor:td];if(t){[pool addObject:t];[t release];}return t;};
auto dispatch=[&](NSString*name,const void*params,NSUInteger length,const void*extra=nullptr,NSUInteger extraLength=0){id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配一级 CST 缓冲区。");BOOL ok=[self managedDispatch:name textures:@[current,out] data:params length:length extra:extra extraLength:extraLength entry:entry error:error];if(ok)current=out;return ok;};
auto dispatch=[&](NSString*name,const void*params,NSUInteger length,const void*extra=nullptr,NSUInteger extraLength=0){id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配一级 CST 缓冲区。");BOOL ok=[self encodeManagedDispatch:name textures:@[current,out] data:params length:length extra:extra extraLength:extraLength entry:entry commands:batch.commands() error:error];if(ok)current=out;return ok;};
auto transform=[&](CSTParams p){if(p.inputTransfer==p.outputTransfer&&p.inputGamut==p.outputGamut&&!p.toneMapping)return YES;return dispatch(@"dyPrimaryCST",&p,sizeof(p));};
auto tile=[&](id<MTLTexture>t){DYExportTile*v=[[[DYExportTile alloc]initWithTexture:t registry:d.registryID]autorelease];[v setBounds:src.tilePixelBounds origin:src.imageOrigin];[v setPixelAspect:src.pixelAspect];return v;};
auto blend=[&](id<MTLTexture>before,NSArray*masks,float amount,NSString*type){if(!masks.count&&amount>=1)return YES;id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配一级混合缓冲区。");DYToolMaskHeader h{};id<MTLBuffer>mb=[self maskBuffer:@{type:masks?:@[]} tile:src device:d header:&h];h.section=(int)[DYToolTypes()indexOfObject:type];DYCSTMixParams p={{wg,wt,2,20,0},{2,20,wg,wt,0},amount};id<MTLComputePipelineState>pipeline=[self computePipeline:@"dyPrimaryBlend" entry:entry error:error];if(!pipeline||!mb)return NO;id<MTLCommandBuffer>cb=[entry[@"queue"]commandBuffer];id<MTLComputeCommandEncoder>ce=[cb computeCommandEncoder];[ce setComputePipelineState:pipeline];[ce setTexture:before atIndex:0];[ce setTexture:current atIndex:1];[ce setTexture:out atIndex:2];[ce setBuffer:mb offset:0 atIndex:0];[ce setBytes:&h length:sizeof(h) atIndex:1];[ce setBytes:&p length:sizeof(p) atIndex:2];[ce dispatchThreads:MTLSizeMake(source.width,source.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[ce endEncoding];[cb commit];[cb waitUntilCompleted];if(cb.status!=MTLCommandBufferStatusCompleted)return fail(error,cb.error.localizedDescription);current=out;return YES;};
auto blend=[&](id<MTLTexture>before,NSArray*masks,float amount,NSString*type){if(!masks.count&&amount>=1)return YES;id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配一级混合缓冲区。");DYToolMaskHeader h{};id<MTLBuffer>mb=[self maskBuffer:@{type:masks?:@[]} tile:src device:d header:&h];h.section=(int)[DYToolTypes()indexOfObject:type];DYCSTMixParams p={{wg,wt,2,20,0},{2,20,wg,wt,0},amount};id<MTLComputePipelineState>pipeline=[self computePipeline:@"dyPrimaryBlend" entry:entry error:error];if(!pipeline||!mb)return NO;id<MTLCommandBuffer>commands=batch.commands();if(!commands)return NO;id<MTLComputeCommandEncoder>ce=[commands computeCommandEncoder];if(!ce)return fail(error,@"无法创建一级混合编码器");[ce setComputePipelineState:pipeline];[ce setTexture:before atIndex:0];[ce setTexture:current atIndex:1];[ce setTexture:out atIndex:2];[ce setBuffer:mb offset:0 atIndex:0];[ce setBytes:&h length:sizeof(h) atIndex:1];[ce setBytes:&p length:sizeof(p) atIndex:2];[ce dispatchThreads:MTLSizeMake(source.width,source.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[ce endEncoding];current=out;return YES;};
auto grade=[&](DYUniforms values,NSArray*masks,BOOL local){if(values.primarySectionEnabled<.5||values.cm.mix<=0)return YES;DYUniforms neutral=values;neutral.inputSectionEnabled=neutral.cm.outputEnabled=0;BOOL gradeNeutral=identityCM(neutral);if(!local&&gradeNeutral)return YES;if(local&&identityCM(values))return YES;
DayuRenderParams p=DYCMRender(values.cm);p.input.toneMapping=0;if((int)lroundf(values.cm.workingTransfer)==20){p.reserved|=8;p.basis.colorspace=10;p.basisInput={(int)lroundf(values.cm.workingGamut),20,(int)lroundf(values.cm.workingGamut),10,0};p.basisOutput={(int)lroundf(values.cm.workingGamut),10,(int)lroundf(values.cm.workingGamut),20,0};}CSTParams back={wg,wt,wg,wt,0};
if(local){p.stages=(values.inputSectionEnabled>.5?1:0)|(gradeNeutral?0:2)|(values.cm.outputEnabled>.5?4:0);back={values.cm.outputEnabled>.5?(int)lroundf(values.cm.outputGamut):(int)lroundf(values.cm.workingGamut),values.cm.outputEnabled>.5?(int)lroundf(values.cm.outputTransfer):(int)lroundf(values.cm.workingTransfer),wg,wt,0};}
else{p.stages=2;}
id<MTLTexture>before=current;[pinned addObject:before];BOOL ok=dispatch(@"dyPrimaryGrade",&p,sizeof(p),&back,sizeof(back));if(ok)ok=blend(before,masks,values.cm.mix,@"primary");[pinned removeObject:before];return ok;
};
auto print=[&](DYUniforms values,NSArray*masks){if(!DYFilmPrintActive(values))return YES;NSArray*names=@[@"",@"kodak_2383",@"kodak_2393",@"kodak_2302_bw",@"fuji_3510",@"fuji_3513",@"fuji_3519",@"fuji_3521",@"agfa_cp30"];NSString*path=[[NSBundle bundleForClass:self.class]pathForResource:names[(int)values.filmPrint.x] ofType:@"dylut" inDirectory:@"PrintLooks"];id<MTLTexture>cube=path?[self lut:path entry:entry error:error]:nil;if(!cube)return fail(error,@"印片资源不可用。");id<MTLTexture>before=current;[pinned addObject:before];BOOL ok=transform({wg,wt,2,1,0});float amount=values.filmPrint.y*values.film.mix;if(ok){id<MTLTexture>out=next();ok=out&&[self managedDispatch:@"dyManagedPrint" textures:@[current,cube,out] data:&amount length:4 extra:nullptr extraLength:0 entry:entry error:error];if(ok)current=out;}if(ok)ok=transform({2,1,wg,wt,0});if(ok)ok=blend(before,masks,1,@"film");[pinned removeObject:before];return ok;};
auto print=[&](DYUniforms values,NSArray*masks){if(!DYFilmPrintActive(values))return YES;NSArray*names=@[@"",@"kodak_2383",@"kodak_2393",@"kodak_2302_bw",@"fuji_3510",@"fuji_3513",@"fuji_3519",@"fuji_3521",@"agfa_cp30"];NSString*path=[[NSBundle bundleForClass:self.class]pathForResource:names[(int)values.filmPrint.x] ofType:@"dylut" inDirectory:@"PrintLooks"];id<MTLTexture>cube=path?[self lut:path entry:entry error:error]:nil;if(!cube)return fail(error,@"印片资源不可用。");id<MTLTexture>before=current;[pinned addObject:before];BOOL ok=transform({wg,wt,2,1,0});float amount=values.filmPrint.y*values.film.mix;if(ok){id<MTLTexture>out=next();ok=out&&[self encodeManagedDispatch:@"dyManagedPrint" textures:@[current,cube,out] data:&amount length:4 extra:nullptr extraLength:0 entry:entry commands:batch.commands() error:error];if(ok)current=out;}if(ok)ok=transform({2,1,wg,wt,0});if(ok)ok=blend(before,masks,1,@"film");[pinned removeObject:before];return ok;};
// Recover only the pre-existing explicit code-value carrier. No display
// transform or host-profile-to-709 conversion precedes the declared input.
current=source;id<MTLTexture>carrier=next();uint32_t noLUT=0;if(!carrier||![self managedDispatch:@"dyManagedCarrier" textures:@[current,carrier,entry[@"identity"]] data:&noLUT length:4 extra:nullptr extraLength:0 entry:entry error:error])return NO;current=carrier;
current=source;id<MTLTexture>carrier=next();uint32_t noLUT=0;if(!carrier||![self encodeManagedDispatch:@"dyManagedCarrier" textures:@[current,carrier,entry[@"identity"]] data:&noLUT length:4 extra:nullptr extraLength:0 entry:entry commands:batch.commands() error:error])return NO;current=carrier;
if(root&&u.inputSectionEnabled>.5&&!transform({(int)lroundf(u.cm.inputGamut),(int)lroundf(u.cm.inputTransfer),wg,wt,0}))return NO;
if(!grade(u,tools[@"baseMasks"][@"primary"],NO))return NO;
NSMutableDictionary*finishing=DYMutablePlist(tools);NSMutableSet*scene=[NSMutableSet set];for(NSString*ID in DYToolDisplayOrder(tools)){NSDictionary*node=DYToolWithID(tools,ID);if([node[@"type"]isEqual:@"primary"]){transparent&=identityCM(DYToolUniforms(node));if(!grade(DYToolUniforms(node),node[@"masks"],YES))return NO;[scene addObject:ID];}}
@@ -34,9 +35,42 @@
u.primarySectionEnabled=0;u.cm.configured=-1;u.inputProfile=u.preLUTStrength=0;u.filmPrint.x=0;NSDictionary*finishPaths=DYVisibleBaseToolPaths(paths,finishing);NSArray*activeFinish=DYPrimaryActiveFinishing(u,finishPaths,spider,finishing);
BOOL display=outputEnabled&&ot>=1001&&ot<=1003;
if(!display&&activeFinish.count)return fail(error,@"当前是 Log/线性码值输出。SDR 修饰工具需要显示输出,请选择 Gamma 输出,或关闭这些工具并保存完整预设。");
if(!display&&transparent&&!activeFinish.count){current=source;[self managedPreview:current source:src entry:entry];}else if(display&&_exporting&&!activeFinish.count){if(!dispatch(@"dyPrimaryCodeOutput",nullptr,0))return NO;}else if(display){if(!transform({og,ot,22,20,0}))return NO;[self managedPreview:current source:src entry:entry];
if(activeFinish.count){id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配 SDR 修饰缓冲区。");_managedFinishing=YES;BOOL ok=NO;@try{ok=[self renderSource:tile(current) destination:tile(out) uniforms:u paths:finishPaths spider:spider tools:finishing error:error];}@finally{_managedFinishing=NO;}if(!ok)return NO;current=out;}
if(_exporting){if(!transform({22,20,og,ot,0})||!dispatch(@"dyPrimaryCodeOutput",nullptr,0))return NO;}else{CGColorSpaceRef from=CGColorSpaceCreateWithName(kCGColorSpaceExtendedLinearSRGB),to=DYManagedTileSpace(dst,primaries);DYColorProfile*p=to?[[[DYColorProfile alloc]initWithSource:from target:to error:error]autorelease]:nil;CGColorSpaceRelease(from);if(to)CGColorSpaceRelease(to);if(!p)return fail(error,@"宿主未提供明确的目标颜色空间。");id<MTLTexture>out=next();if(!out||![self managedProfile:p input:current output:out entry:entry error:error])return NO;current=out;}
}else{if(!dispatch(@"dyPrimaryCodeOutput",nullptr,0))return NO;[self managedPreview:current source:src entry:entry];}
_managedFinishing=YES;@try{return [self copyTile:tile(current) to:dst entry:entry error:error];}@finally{_managedFinishing=NO;}
DYManagedPreviewReadback preview{};
if(!display&&transparent&&!activeFinish.count){
current=source;
preview=[self encodeManagedPreview:current source:src entry:entry commands:batch.commands()];
}else if(display&&_exporting&&!activeFinish.count){
if(!dispatch(@"dyPrimaryCodeOutput",nullptr,0))return NO;
}else if(display){
if(!transform({og,ot,22,20,0}))return NO;
preview=[self encodeManagedPreview:current source:src entry:entry commands:batch.commands()];
if(activeFinish.count){
if(!batch.finish())return NO;
[self publishManagedPreview:preview];preview={};
id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配 SDR 修饰缓冲区。");
_managedFinishing=YES;BOOL ok=NO;
@try{ok=[self renderSource:tile(current) destination:tile(out) uniforms:u paths:finishPaths spider:spider tools:finishing error:error];}
@finally{_managedFinishing=NO;}
if(!ok)return NO;current=out;
}
if(_exporting){
if(!transform({22,20,og,ot,0})||!dispatch(@"dyPrimaryCodeOutput",nullptr,0))return NO;
}else{
DYColorProfile *profile=[self managedOutputProfile:error];if(!profile)return NO;
if(!profile.identity){
if(!batch.finish())return NO;
id<MTLTexture>out=next();if(!out||![self managedProfile:profile input:current output:out entry:entry error:error])return NO;
current=out;
}
}
}else{
if(!dispatch(@"dyPrimaryCodeOutput",nullptr,0))return NO;
preview=[self encodeManagedPreview:current source:src entry:entry commands:batch.commands()];
}
_managedFinishing=YES;
@try{
BOOL ok=[self copyTile:tile(current) to:dst rotation:0 entry:entry commands:batch.commands() error:error];
if(ok)[self publishManagedPreview:preview];
return ok;
}@finally{_managedFinishing=NO;}
}
+42 -1
查看文件
@@ -27,6 +27,36 @@
#import "DYScopeSample.h"
#include "DYLevelGeometry.h"
static BOOL fail(NSError**e,NSString*m){if(e)*e=[NSError errorWithDomain:@"com.dayu.color" code:1 userInfo:@{NSLocalizedDescriptionKey:m?:@"Metal 调色失败"}];return NO;}
// Keep a bounded group of ordered GPU passes. A CPU reader or another
// queue finishes the group before accessing its result.
struct DYManagedBatch {
id<MTLCommandQueue> queue;
NSError **error;
id<MTLCommandBuffer> pending=nil;
unsigned passes=0;
BOOL failed=NO;
BOOL finish(){
if(!pending)return !failed;
[pending commit];[pending waitUntilCompleted];
if(pending.status!=MTLCommandBufferStatusCompleted){failed=YES;fail(error,pending.error.localizedDescription);}
pending=nil;passes=0;
return !failed;
}
id<MTLCommandBuffer> commands(){
if(failed||(passes==16&&!finish()))return nil;
if(!pending)pending=[queue commandBuffer];
if(!pending){failed=YES;fail(error,@"无法分配调色命令缓冲区");return nil;}
++passes;
return pending;
}
};
struct DYManagedPreviewReadback {
id<MTLBuffer> analysis,standard,high;
NSSize size,highSize;
FxImageOrigin origin;
};
// MRC NSError out-parameters must outlive every nested render pool. Preserve
// the same pointer across nested closures, then autorelease in the caller pool.
template<class F> static BOOL DYRenderWithPool(NSError **error,F body){
@@ -146,6 +176,8 @@ struct DYScopeReadback {
CFTimeInterval _lastPreview;
BOOL _exporting;
NSDictionary *_toolDocument,*_colorContext,*_exportManagedState;
CGColorSpaceRef _renderSourceSpace,_renderDestinationSpace;
DYColorProfile *_renderOutputProfile;
BOOL _managedFinishing;NSData *_faceEntries,*_faceInput,*_faceCachedEntries;CIContext *_faceContext;NSData *_mosaicRaster,*_mosaicEntries;NSDictionary *_mosaicFaceSnapshot;
dispatch_queue_t _scopeQueue;
BOOL _scopeEnabled,_scopeWorkerRunning,_outputObserved,_outputNotificationPending,_spiderScopeWorkerRunning;
@@ -163,6 +195,15 @@ struct DYScopeReadback {
DYColorProfile *_scopeProfile;
NSObject *_scopeProfileLock;
}
- (BOOL)encodeManagedDispatch:(NSString*)name textures:(NSArray*)textures data:(const void*)data length:(NSUInteger)length
extra:(const void*)extra extraLength:(NSUInteger)extraLength entry:(NSMutableDictionary*)entry
commands:(id<MTLCommandBuffer>)commands error:(NSError**)error;
- (DYManagedPreviewReadback)encodeManagedPreview:(id<MTLTexture>)texture source:(FxImageTile*)source
entry:(NSMutableDictionary*)entry commands:(id<MTLCommandBuffer>)commands;
- (void)publishManagedPreview:(DYManagedPreviewReadback)preview;
- (DYColorProfile*)managedOutputProfile:(NSError**)error;
- (BOOL)copyTile:(FxImageTile*)source to:(FxImageTile*)dest rotation:(double)angle entry:(NSMutableDictionary*)entry
commands:(id<MTLCommandBuffer>)commands error:(NSError**)error;
@end
@implementation DYRenderer
// The caller holds the renderer lock. Unused tools never load a GPU function.
@@ -244,7 +285,7 @@ static NSData *DYLookBufferData(id<MTLBuffer> buffer) {
#include "DYFaceRender.inc.h"
#include "DYToolRender.inc.h"
- (instancetype)init{if((self=[super init])){_previewLock=[NSObject new];_scopeProfileLock=[NSObject new];_scopeQueue=dispatch_queue_create("com.dayu.color.final-output-scopes",DISPATCH_QUEUE_SERIAL);_devices=[NSMutableDictionary new];_luts=[NSMutableDictionary new];_preparedLUTs=[NSMutableDictionary new];_activeLUTPaths=[NSSet new];_lutPreparationQueue=dispatch_queue_create("com.dayu.color.lut-upload",DISPATCH_QUEUE_SERIAL);dispatch_set_target_queue(_lutPreparationQueue,dispatch_get_global_queue(QOS_CLASS_USER_INITIATED,0));_tables=[DYColorTables new];}return self;}
- (void)dealloc{[_mosaicRaster release];[_mosaicEntries release];[_mosaicFaceSnapshot release];[_faceEntries release];[_faceInput release];[_faceCachedEntries release];[_faceContext release];[_scopePending release];[_scopeLatest release];[_spiderScopeRaster release];[_scopePreview release];[_scopeMetadata release];[_scopeProfile release];[_scopeProfileLock release];dispatch_release(_scopeQueue);[_devices release];[_luts release];[_preparedLUTs release];[_activeLUTPaths release];dispatch_release(_lutPreparationQueue);[_tables release];[_preview release];[_lookLUTPreviewFrames release];[_colorContext release];[_previewLock release];[super dealloc];}
- (void)dealloc{[_mosaicRaster release];[_mosaicEntries release];[_mosaicFaceSnapshot release];[_faceEntries release];[_faceInput release];[_faceCachedEntries release];[_faceContext release];[_scopePending release];[_scopeLatest release];[_spiderScopeRaster release];[_scopePreview release];[_scopeMetadata release];[_scopeProfile release];[_scopeProfileLock release];dispatch_release(_scopeQueue);[_devices release];[_luts release];[_preparedLUTs release];[_activeLUTPaths release];dispatch_release(_lutPreparationQueue);[_tables release];[_preview release];[_lookLUTPreviewFrames release];[_renderOutputProfile release];if(_renderSourceSpace)CGColorSpaceRelease(_renderSourceSpace);if(_renderDestinationSpace)CGColorSpaceRelease(_renderDestinationSpace);[_colorContext release];[_previewLock release];[super dealloc];}
- (void)trimPreparedLUTsKeeping:(NSString *)path {
if(_preparedLUTs.count<=12)return;
for(NSString *key in _preparedLUTs.allKeys)if(![_activeLUTPaths containsObject:key]&&![key isEqualToString:path])[_preparedLUTs removeObjectForKey:key];
+2 -1
查看文件
@@ -7,7 +7,8 @@ struct DYToolMaskEntry {
// Local path coordinates for authored Bézier mosaic masks.
float minX,minY,maxX,maxY;
};
struct DYToolMaskHeader {unsigned count;float offsetX,offsetY,scaleX,scaleY;int section,premultiplied,faceOnly,skinPreview;};
enum DYToolMaskKeySource : unsigned { DYToolMaskLayerKey=1, DYToolMaskOriginalKey=2 };
struct DYToolMaskHeader {unsigned count;float offsetX,offsetY,scaleX,scaleY;int section,premultiplied,faceOnly,skinPreview;unsigned keySources;};
struct DYToolStageRange {int first,last,suppressBlackWhite;};
// Destination coverage and the source sampling transform are independent.
+10 -2
查看文件
@@ -13,6 +13,8 @@
if(![m[@"enabled"]boolValue])continue;
DYToolMaskEntry entry{};entry.section=(int)section;entry.combine=[m[@"combine"]intValue];
[m[@"parameters"]getBytes:&entry.mask.parameters length:sizeof(DYMaskParameters)];entry.mask.parameters.imageAspect=w/ht;
if(entry.mask.parameters.kind>=DYMaskHSLKey)
h->keySources|=entry.mask.parameters.sourceStage==DYMaskSourceOriginal?DYToolMaskOriginalKey:DYToolMaskLayerKey;
NSData *nodes=m[@"nodes"];auto &path=entry.mask.path;
path=dyFlattenMask((const DYBezierNode*)nodes.bytes,nodes.length/sizeof(DYBezierNode));
if(mosaic&&entry.mask.parameters.kind==DYMaskBezier&&path.count>=3){
@@ -25,12 +27,18 @@
}
- (BOOL)encodeBlend:(id<MTLTexture>)before after:(id<MTLTexture>)after output:(id<MTLTexture>)output masks:(id<MTLBuffer>)masks header:(DYToolMaskHeader)h entry:(NSMutableDictionary*)entry commands:(id<MTLCommandBuffer>)commands error:(NSError**)error {
id<MTLComputePipelineState> pipeline=[self computePipeline:@"dyToolBlend" entry:entry error:error];if(!pipeline)return NO;
id<MTLComputeCommandEncoder>encoder=[commands computeCommandEncoder];[encoder setComputePipelineState:pipeline];[encoder setTexture:before atIndex:0];[encoder setTexture:after atIndex:1];[encoder setTexture:output atIndex:2];[encoder setBuffer:masks offset:0 atIndex:0];[encoder setBytes:&h length:sizeof(h) atIndex:1];[encoder dispatchThreads:MTLSizeMake(output.width,output.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[encoder endEncoding];return YES;
id<MTLComputeCommandEncoder>encoder=masks?[commands computeCommandEncoder]:nil;if(!encoder)return fail(error,@"无法创建蒙版混合编码器");[encoder setComputePipelineState:pipeline];[encoder setTexture:before atIndex:0];[encoder setTexture:after atIndex:1];[encoder setTexture:output atIndex:2];[encoder setBuffer:masks offset:0 atIndex:0];[encoder setBytes:&h length:sizeof(h) atIndex:1];[encoder dispatchThreads:MTLSizeMake(output.width,output.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[encoder endEncoding];return YES;
}
- (BOOL)copyTile:(FxImageTile*)source to:(FxImageTile*)dest entry:(NSMutableDictionary*)e error:(NSError**)error {
return [self copyTile:source to:dest rotation:0 entry:e error:error];
}
- (BOOL)copyTile:(FxImageTile*)source to:(FxImageTile*)dest rotation:(double)angle entry:(NSMutableDictionary*)e error:(NSError**)error {
id<MTLCommandBuffer>commands=[e[@"queue"] commandBuffer];
if(!commands)return fail(error,@"无法分配图像输出命令");
return [self copyTile:source to:dest rotation:angle entry:e commands:commands error:error];
}
- (BOOL)copyTile:(FxImageTile*)source to:(FxImageTile*)dest rotation:(double)angle entry:(NSMutableDictionary*)e commands:(id<MTLCommandBuffer>)commands error:(NSError**)error {
if(!commands)return NO;
id<MTLDevice>device=e[@"device"];id<MTLTexture>a=[source metalTextureForDevice:device],b=[dest metalTextureForDevice:device];
if(!a||!b)return fail(error,@"宿主图像纹理不可用");
BOOL useFloat=_managedFinishing||angle!=0;
@@ -49,7 +57,7 @@
if(source.imageOrigin==kFxImageOrigin_BOTTOM_LEFT)vertex.textureCoordinate.y=1-vertex.textureCoordinate.y;
if(dest.imageOrigin==kFxImageOrigin_BOTTOM_LEFT)vertex.position.y=-vertex.position.y;
}
vector_uint2 size={(unsigned)b.width,(unsigned)b.height};id<MTLCommandBuffer>cb=[e[@"queue"]commandBuffer];MTLRenderPassDescriptor *pass=[MTLRenderPassDescriptor renderPassDescriptor];pass.colorAttachments[0].texture=b;pass.colorAttachments[0].loadAction=MTLLoadActionDontCare;pass.colorAttachments[0].storeAction=MTLStoreActionStore;id<MTLRenderCommandEncoder>encoder=[cb renderCommandEncoderWithDescriptor:pass];[encoder setRenderPipelineState:pipeline];[encoder setVertexBytes:v length:sizeof(v) atIndex:0];[encoder setVertexBytes:&size length:sizeof(size) atIndex:1];[encoder setFragmentTexture:a atIndex:0];[encoder drawPrimitives:MTLPrimitiveTypeTriangleStrip vertexStart:0 vertexCount:4];[encoder endEncoding];return [self completeCommands:cb destination:dest texture:b entry:e]?YES:fail(error,cb.error.localizedDescription);
vector_uint2 size={(unsigned)b.width,(unsigned)b.height};MTLRenderPassDescriptor *pass=[MTLRenderPassDescriptor renderPassDescriptor];pass.colorAttachments[0].texture=b;pass.colorAttachments[0].loadAction=MTLLoadActionDontCare;pass.colorAttachments[0].storeAction=MTLStoreActionStore;id<MTLRenderCommandEncoder>encoder=[commands renderCommandEncoderWithDescriptor:pass];if(!encoder)return fail(error,@"无法创建图像输出编码器");[encoder setRenderPipelineState:pipeline];[encoder setVertexBytes:v length:sizeof(v) atIndex:0];[encoder setVertexBytes:&size length:sizeof(size) atIndex:1];[encoder setFragmentTexture:a atIndex:0];[encoder drawPrimitives:MTLPrimitiveTypeTriangleStrip vertexStart:0 vertexCount:4];[encoder endEncoding];return [self completeCommands:commands destination:dest texture:b entry:e]?YES:fail(error,commands.error.localizedDescription);
}
// Extra skin keeps the source reference used by the prior release. All other
// extra tools reuse the same isolated native tool path and their own mask group.
@@ -18,6 +18,28 @@
NSMutableDictionary *zero=DYMutablePlist(DYNewMask(DYMaskRectangle));DYMaskParameters p=DYMaskAtTime(zero,kCMTimeZero);p.strength=0;zero[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];doc[@"baseMasks"][@"hsl"]=@[zero];
Pixels masked=frame(changed,doc,@"unified-zero-mask");run.record(@"unified-zero-mask-is-exact-neutral",difference(masked,plain).maximum==0);[doc[@"baseMasks"]removeObjectForKey:@"hsl"];
changed.cm.outputTransfer=1002;changed.cm.toneMapping=1;changed.hslSatA.x=40;Pixels last=frame(changed,doc,@"unified-last-output");doc[@"outputAfter"]=@"base:primary";Pixels middle=frame(changed,doc,@"unified-middle-output");run.record(@"unified-moving-output-changes-actual-domain-order",difference(last,middle).maximum>.001,@{@"difference":@(difference(last,middle).maximum)});
{
Pixels patch(w*h*4);
for(size_t i=0;i<patch.size();i+=4){patch[i]=decode(.08f);patch[i+1]=decode(.045f);patch[i+2]=decode(.022f);patch[i+3]=1;}
[[src metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,w,h)mipmapLevel:0 withBytes:patch.data()bytesPerRow:w*8];
NSMutableDictionary *keyDoc=DYMutablePlist(DYInitialToolDocument(nil));
DYUniforms exposed=u;exposed.exposure=3;
DYUniforms hue=exposed;hue.hslHueA=hue.hslHueB=(DYFloat4){48,48,48,48};
Pixels withoutHSL=frame(exposed,keyDoc,@"unified-luma-key-input-reference");
Pixels unmaskedHSL=frame(hue,keyDoc,@"unified-luma-key-graded-reference");
NSMutableDictionary *key=DYMutablePlist(DYNewMask(DYMaskLumaKey));
DYMaskParameters parameters=DYMaskAtTime(key,kCMTimeZero);parameters.inputBlack=.33f;parameters.inputWhite=.53f;
parameters.sourceStage=DYMaskSourceOriginal;
key[@"parameters"]=[NSData dataWithBytes:&parameters length:sizeof(parameters)];
keyDoc[@"baseMasks"][@"hsl"]=@[key];
Pixels originalKey=frame(hue,keyDoc,@"unified-luma-key-original-render");
parameters.sourceStage=DYMaskSourceLayerInput;
key[@"parameters"]=[NSData dataWithBytes:&parameters length:sizeof(parameters)];
Pixels layerKey=frame(hue,keyDoc,@"unified-luma-key-layer-render");
run.record(@"unified-mask-key-source-selects-original-or-current-color",
difference(withoutHSL,unmaskedHSL).maximum>.001&&
difference(originalKey,withoutHSL).maximum==0&&difference(layerKey,unmaskedHSL).maximum==0);
}
DYDiagnosticManager *host=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(host,nil);DYAssetState *assets=[[[DYAssetState alloc]init]autorelease];assets.colorManagement=v4;DYWriteAssets(host,assets,kCMTimeZero);
DYInspector *view=[[[DYInspector alloc]initWithAPIManager:host]autorelease];[view refresh];[view setFrameSize:NSMakeSize(400,400)];[view layoutSubtreeIfNeeded];NSDictionary *output=nil;for(NSDictionary *card in [view valueForKey:@"cards"])if([card[@"section"][@"key"]isEqual:@"output"])output=card;
run.record(@"unified-inspector-output-visible-at-chain-tail",output&&![output[@"view"]isHidden]&&NSMaxY([output[@"view"]frame])>NSMaxY([[[view valueForKey:@"cards"]firstObject][@"view"]frame]));
+30 -15
查看文件
@@ -2,24 +2,25 @@
- (BOOL)renderUnifiedSource:(FxImageTile*)src destination:(FxImageTile*)dst uniforms:(DYUniforms)u paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools hostPrimaries:(NSInteger)primaries error:(NSError**)error {
if(tools[@"sharedMasks"])tools=DYResolvedToolDocument(tools);
NSMutableDictionary*entry=[self device:dst.deviceRegistryID error:error];if(!entry)return NO;id<MTLDevice>d=entry[@"device"];id<MTLTexture>source=[src metalTextureForDevice:d];if(!source)return fail(error,@"一级 CST 输入纹理不可用。");
DYManagedBatch batch{entry[@"queue"],error};
uint64_t pixels=uint64_t(source.width)*source.height;if(!pixels||pixels>64ull*1024*1024||pixels*16*8>MAX(768ull*1024*1024,MIN(2ull*1024*1024*1024,d.recommendedMaxWorkingSetSize/2)))return fail(error,@"当前画面超过一级 CST 内存预算。");
BOOL inputEnabled=u.inputSectionEnabled>.5;DYCMSettings global=u.cm;DYApplyRemovedBaseTools(&u,tools);u.cm=global;int wt=lroundf(u.cm.workingTransfer),wg=lroundf(u.cm.workingGamut);
NSMutableArray*pool=[NSMutableArray array];NSCountedSet*pinned=[NSCountedSet set];id<MTLTexture>current=nil,originalWorking=nil;int initialGamut=wg,initialTransfer=wt;
auto next=[&]()->id<MTLTexture>{for(id<MTLTexture>t in pool)if(t!=current&&![pinned containsObject:t])return t;MTLTextureDescriptor*td=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA32Float width:source.width height:source.height mipmapped:NO];td.storageMode=MTLStorageModePrivate;td.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite|MTLTextureUsageRenderTarget;id<MTLTexture>t=[d newTextureWithDescriptor:td];if(t){[pool addObject:t];[t release];}return t;};
auto dispatch=[&](NSString*name,const void*params,NSUInteger length,const void*extra=nullptr,NSUInteger extraLength=0){id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配一级 CST 缓冲区。");BOOL ok=[self managedDispatch:name textures:@[current,out] data:params length:length extra:extra extraLength:extraLength entry:entry error:error];if(ok)current=out;return ok;};
auto dispatch=[&](NSString*name,const void*params,NSUInteger length,const void*extra=nullptr,NSUInteger extraLength=0){id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配一级 CST 缓冲区。");BOOL ok=[self encodeManagedDispatch:name textures:@[current,out] data:params length:length extra:extra extraLength:extraLength entry:entry commands:batch.commands() error:error];if(ok)current=out;return ok;};
auto transform=[&](CSTParams p){if(p.inputTransfer==p.outputTransfer&&p.inputGamut==p.outputGamut&&!p.toneMapping)return YES;return dispatch(@"dyPrimaryCST",&p,sizeof(p));};
auto tile=[&](id<MTLTexture>t){DYExportTile*v=[[[DYExportTile alloc]initWithTexture:t registry:d.registryID]autorelease];[v setBounds:src.tilePixelBounds origin:src.imageOrigin];[v setPixelAspect:src.pixelAspect];return v;};
auto blend=[&](id<MTLTexture>before,NSArray*masks,float amount,NSString*type){if(!masks.count&&amount>=1)return YES;id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配一级混合缓冲区。");DYToolMaskHeader h{};id<MTLBuffer>mb=[self maskBuffer:@{type:masks?:@[]} tile:src device:d header:&h];h.section=(int)[DYToolTypes()indexOfObject:type];struct {CSTParams toLinear,fromLinear,originalTo709;float amount;}p={{wg,wt,2,20,0},{2,20,wg,wt,0},{initialGamut,initialTransfer,22,20,0},amount};id<MTLComputePipelineState>pipeline=[self computePipeline:@"dyUnifiedBlend" entry:entry error:error];if(!pipeline||!mb)return NO;id<MTLCommandBuffer>cb=[entry[@"queue"]commandBuffer];id<MTLComputeCommandEncoder>ce=[cb computeCommandEncoder];[ce setComputePipelineState:pipeline];[ce setTexture:before atIndex:0];[ce setTexture:current atIndex:1];[ce setTexture:out atIndex:2];[ce setTexture:originalWorking?:before atIndex:3];[ce setBuffer:mb offset:0 atIndex:0];[ce setBytes:&h length:sizeof(h) atIndex:1];[ce setBytes:&p length:sizeof(p) atIndex:2];[ce dispatchThreads:MTLSizeMake(source.width,source.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[ce endEncoding];[cb commit];[cb waitUntilCompleted];if(cb.status!=MTLCommandBufferStatusCompleted)return fail(error,cb.error.localizedDescription);current=out;return YES;};
auto blend=[&](id<MTLTexture>before,NSArray*masks,float amount,NSString*type){if(!masks.count&&amount>=1)return YES;id<MTLTexture>out=next();if(!out)return fail(error,@"无法分配一级混合缓冲区。");DYToolMaskHeader h{};id<MTLBuffer>mb=[self maskBuffer:@{type:masks?:@[]} tile:src device:d header:&h];h.section=(int)[DYToolTypes()indexOfObject:type];struct {CSTParams toLinear,fromLinear,originalTo709;float amount;}p={{wg,wt,2,20,0},{2,20,wg,wt,0},{initialGamut,initialTransfer,22,20,0},amount};id<MTLComputePipelineState>pipeline=[self computePipeline:@"dyUnifiedBlend" entry:entry error:error];if(!pipeline||!mb)return NO;id<MTLCommandBuffer>commands=batch.commands();if(!commands)return NO;id<MTLComputeCommandEncoder>ce=[commands computeCommandEncoder];if(!ce)return fail(error,@"无法创建一级混合编码器");[ce setComputePipelineState:pipeline];[ce setTexture:before atIndex:0];[ce setTexture:current atIndex:1];[ce setTexture:out atIndex:2];[ce setTexture:originalWorking?:before atIndex:3];[ce setBuffer:mb offset:0 atIndex:0];[ce setBytes:&h length:sizeof(h) atIndex:1];[ce setBytes:&p length:sizeof(p) atIndex:2];[ce dispatchThreads:MTLSizeMake(source.width,source.height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[ce endEncoding];current=out;return YES;};
auto grade=[&](DYUniforms values,NSArray*masks,BOOL local){if(values.primarySectionEnabled<.5||values.cm.mix<=0)return YES;DYUniforms neutral=values;neutral.inputSectionEnabled=neutral.cm.outputEnabled=0;BOOL gradeNeutral=identityCM(neutral);if(!local&&gradeNeutral)return YES;if(local&&identityCM(values))return YES;
DayuRenderParams p=DYCMRender(values.cm);p.input.toneMapping=0;if((int)lroundf(values.cm.workingTransfer)==20){p.reserved|=8;p.basis.colorspace=10;p.basisInput={(int)lroundf(values.cm.workingGamut),20,(int)lroundf(values.cm.workingGamut),10,0};p.basisOutput={(int)lroundf(values.cm.workingGamut),10,(int)lroundf(values.cm.workingGamut),20,0};}CSTParams back={wg,wt,wg,wt,0};
if(local){p.stages=(values.inputSectionEnabled>.5?1:0)|(gradeNeutral?0:2)|(values.cm.outputEnabled>.5?4:0);back={values.cm.outputEnabled>.5?(int)lroundf(values.cm.outputGamut):(int)lroundf(values.cm.workingGamut),values.cm.outputEnabled>.5?(int)lroundf(values.cm.outputTransfer):(int)lroundf(values.cm.workingTransfer),wg,wt,0};}
else{p.stages=2;}
id<MTLTexture>before=current;[pinned addObject:before];BOOL ok=dispatch(@"dyPrimaryGrade",&p,sizeof(p),&back,sizeof(back));if(ok)ok=blend(before,masks,values.cm.mix,@"primary");[pinned removeObject:before];return ok;
};
auto print=[&](DYUniforms values,NSArray*masks){if(!DYFilmPrintActive(values))return YES;NSArray*names=@[@"",@"kodak_2383",@"kodak_2393",@"kodak_2302_bw",@"fuji_3510",@"fuji_3513",@"fuji_3519",@"fuji_3521",@"agfa_cp30"];NSString*path=[[NSBundle bundleForClass:self.class]pathForResource:names[(int)values.filmPrint.x] ofType:@"dylut" inDirectory:@"PrintLooks"];id<MTLTexture>cube=path?[self lut:path entry:entry error:error]:nil;if(!cube)return fail(error,@"印片资源不可用。");id<MTLTexture>before=current;[pinned addObject:before];BOOL ok=transform({wg,wt,2,1,0});float amount=values.filmPrint.y*values.film.mix;if(ok){id<MTLTexture>out=next();ok=out&&[self managedDispatch:@"dyManagedPrint" textures:@[current,cube,out] data:&amount length:4 extra:nullptr extraLength:0 entry:entry error:error];if(ok)current=out;}if(ok)ok=transform({2,1,wg,wt,0});if(ok)ok=blend(before,masks,1,@"film");[pinned removeObject:before];return ok;};
auto print=[&](DYUniforms values,NSArray*masks){if(!DYFilmPrintActive(values))return YES;NSArray*names=@[@"",@"kodak_2383",@"kodak_2393",@"kodak_2302_bw",@"fuji_3510",@"fuji_3513",@"fuji_3519",@"fuji_3521",@"agfa_cp30"];NSString*path=[[NSBundle bundleForClass:self.class]pathForResource:names[(int)values.filmPrint.x] ofType:@"dylut" inDirectory:@"PrintLooks"];id<MTLTexture>cube=path?[self lut:path entry:entry error:error]:nil;if(!cube)return fail(error,@"印片资源不可用。");id<MTLTexture>before=current;[pinned addObject:before];BOOL ok=transform({wg,wt,2,1,0});float amount=values.filmPrint.y*values.film.mix;if(ok){id<MTLTexture>out=next();ok=out&&[self encodeManagedDispatch:@"dyManagedPrint" textures:@[current,cube,out] data:&amount length:4 extra:nullptr extraLength:0 entry:entry commands:batch.commands() error:error];if(ok)current=out;}if(ok)ok=transform({2,1,wg,wt,0});if(ok)ok=blend(before,masks,1,@"film");[pinned removeObject:before];return ok;};
// Recover only the pre-existing explicit code-value carrier. No display
// transform or host-profile-to-709 conversion precedes the declared input.
current=source;id<MTLTexture>carrier=next();uint32_t noLUT=0;if(!carrier||![self managedDispatch:@"dyManagedCarrier" textures:@[current,carrier,entry[@"identity"]] data:&noLUT length:4 extra:nullptr extraLength:0 entry:entry error:error])return NO;current=carrier;
current=source;id<MTLTexture>carrier=next();uint32_t noLUT=0;if(!carrier||![self encodeManagedDispatch:@"dyManagedCarrier" textures:@[current,carrier,entry[@"identity"]] data:&noLUT length:4 extra:nullptr extraLength:0 entry:entry commands:batch.commands() error:error])return NO;current=carrier;
if(inputEnabled&&!transform({(int)lroundf(u.cm.inputGamut),(int)lroundf(u.cm.inputTransfer),wg,wt,0}))return NO;
// Preserve the original working image for source-referenced operations.
originalWorking=current;[pinned addObject:originalWorking];
@@ -33,7 +34,7 @@
if([type isEqual:@"base"]&&values.baseSectionEnabled>.5&&values.exposureEnabled>.5&&values.exposure!=0){float gain=exp2f(values.exposure);ok=transform({wg,wt,wg,20,0})&&dispatch(@"dyUnifiedExposure",&gain,sizeof(gain))&&transform({wg,20,wg,wt,0});node[@"values"][@"exposure"]=@0;}
if(!ok){[pinned removeObject:before];return NO;}
if(DYToolIsNeutral(node)){}
else if([type isEqual:@"lens"]){id<MTLTexture>out=next();ok=out&&[self renderLens:tile(current) destination:tile(out) uniforms:values masks:@[] entry:entry error:error];if(ok)current=out;}
else if([type isEqual:@"lens"]){id<MTLTexture>out=next();ok=out&&batch.finish()&&[self renderLens:tile(current) destination:tile(out) uniforms:values masks:@[] entry:entry error:error];if(ok)current=out;}
else {
// Creative Rec.709 LUT/film and skin models declare a local reference domain.
// All other legacy controls operate on the current working RGB code values.
@@ -46,10 +47,13 @@
// A source-referenced skin node compares to the original image in this same
// domain, never to a previous frame or an unrelated cached display image.
id<MTLTexture>referenceTexture=bounded;
if(ok&&[type isEqual:@"skin"]){if(!_exporting&&(values.skinFaceOnly>.5||values.skinVisualize>.5))[self prepareFaceSupport:tile(bounded)];else{[_faceEntries release];_faceEntries=nil;}current=originalWorking;ok=transform({initialGamut,initialTransfer,domainGamut,domainTransfer,0})&&dispatch(@"dyUnifiedBridgeIn",nullptr,0);referenceTexture=current;[pinned addObject:referenceTexture];current=bounded;}
if(ok){id<MTLTexture>out=next();_managedFinishing=YES;@try{ok=out&&[self renderExtraTool:node source:tile(bounded) original:tile(referenceTexture) destination:tile(out) entry:entry error:error];}@finally{_managedFinishing=NO;}if(ok)current=out;}
if(ok&&[type isEqual:@"skin"]){if(!_exporting&&(values.skinFaceOnly>.5||values.skinVisualize>.5)){
if(!batch.finish())return NO;
[self prepareFaceSupport:tile(bounded)];
}else{[_faceEntries release];_faceEntries=nil;}current=originalWorking;ok=transform({initialGamut,initialTransfer,domainGamut,domainTransfer,0})&&dispatch(@"dyUnifiedBridgeIn",nullptr,0);referenceTexture=current;[pinned addObject:referenceTexture];current=bounded;}
if(ok){id<MTLTexture>out=next();_managedFinishing=YES;@try{ok=out&&batch.finish()&&[self renderExtraTool:node source:tile(bounded) original:tile(referenceTexture) destination:tile(out) entry:entry error:error];}@finally{_managedFinishing=NO;}if(ok)current=out;}
if(referenceTexture!=bounded)[pinned removeObject:referenceTexture];[pinned removeObject:bounded];
if(ok){id<MTLTexture>out=next();ok=out&&[self managedDispatch:@"dyUnifiedBridgeOut" textures:@[raw,current,out] data:nullptr length:0 extra:nullptr extraLength:0 entry:entry error:error];if(ok)current=out;}
if(ok){id<MTLTexture>out=next();ok=out&&[self encodeManagedDispatch:@"dyUnifiedBridgeOut" textures:@[raw,current,out] data:nullptr length:0 extra:nullptr extraLength:0 entry:entry commands:batch.commands() error:error];if(ok)current=out;}
[pinned removeObject:raw];
if(ok&&reference)ok=transform({domainGamut,domainTransfer,wg,wt,0});
}
@@ -72,12 +76,23 @@
[pinned removeObject:originalWorking];
// Final host adaptation is separate from the movable output node. Cube uses
// the exact current code domain after the same ordered operations.
if(_exporting){if(!dispatch(@"dyPrimaryCodeOutput",nullptr,0))return NO;}
else {
if(!transform({wg,wt,22,20,0}))return NO;[self managedPreview:current source:src entry:entry];
CGColorSpaceRef from=CGColorSpaceCreateWithName(kCGColorSpaceExtendedLinearSRGB),to=DYManagedTileSpace(dst,primaries);
DYColorProfile *profile=to?[[[DYColorProfile alloc]initWithSource:from target:to error:error]autorelease]:nil;CGColorSpaceRelease(from);if(to)CGColorSpaceRelease(to);
if(!profile)return fail(error,@"宿主未提供明确的目标颜色空间。");id<MTLTexture>out=next();if(!out||![self managedProfile:profile input:current output:out entry:entry error:error])return NO;current=out;
DYManagedPreviewReadback preview{};
if(_exporting){
if(!dispatch(@"dyPrimaryCodeOutput",nullptr,0))return NO;
}else{
if(!transform({wg,wt,22,20,0}))return NO;
preview=[self encodeManagedPreview:current source:src entry:entry commands:batch.commands()];
DYColorProfile *profile=[self managedOutputProfile:error];if(!profile)return NO;
if(!profile.identity){
if(!batch.finish())return NO;
id<MTLTexture>out=next();if(!out||![self managedProfile:profile input:current output:out entry:entry error:error])return NO;
current=out;
}
}
_managedFinishing=YES;@try{return [self copyTile:tile(current) to:dst entry:entry error:error];}@finally{_managedFinishing=NO;}
_managedFinishing=YES;
@try{
BOOL ok=[self copyTile:tile(current) to:dst rotation:0 entry:entry commands:batch.commands() error:error];
if(ok)[self publishManagedPreview:preview];
return ok;
}@finally{_managedFinishing=NO;}
}
@@ -196,7 +196,13 @@
NSUInteger originalLayers=[DYReadTools(stackHost,kCMTimeZero).document[@"layers"]count];int undo=stackHost->_undoStarts;
[stack addWorkspaceTool:toolbarButton(@"curve")];workspaceDrain();NSString *curveID=[[[stack valueForKey:@"selectedNode"]copy]autorelease];NSDictionary *tools=DYReadTools(stackHost,kCMTimeZero).document;
run.record(@"workspace-toolbar-adds-real-uuid-and-synchronizes-regular-inspector",[tools[@"layers"]count]==originalLayers+1&&[DYToolWithID(tools,curveID)[@"type"]isEqual:@"curve"]&&[[mainInspector valueForKey:@"stackViews"]objectForKey:curveID]&&stackHost->_undoStarts==undo+1&&stackHost->_undoEnds==stackHost->_undoStarts);
DYInspector *curveEditor=[stack valueForKey:@"toolEditor"];undo=stackHost->_undoStarts;[curveEditor graphicGesture:YES title:@"测试曲线手势"];[curveEditor writeGraphicValues:@{@"masterX0":@.3,@"curveY0":@12}];[curveEditor writeGraphicValues:@{@"masterX0":@.35,@"curveY0":@16}];[curveEditor graphicGesture:NO title:nil];
DYInspector *curveEditor=[stack valueForKey:@"toolEditor"];undo=stackHost->_undoStarts;
NSDictionary *beforeCurve=DYReadTools(stackHost,kCMTimeZero).document;
[curveEditor graphicGesture:YES title:@"测试曲线手势"];
[curveEditor writeGraphicValues:@{@"masterX0":@.3,@"curveY0":@12}];
[curveEditor writeGraphicValues:@{@"masterX0":@.35,@"curveY0":@16}];
run.record(@"workspace-curve-coalesces-pending-samples",[beforeCurve isEqual:DYReadTools(stackHost,kCMTimeZero).document]);
[curveEditor graphicGesture:NO title:nil];
run.record(@"workspace-curve-xy-samples-use-one-undo-and-exact-uuid",stackHost->_undoStarts==undo+1&&stackHost->_undoEnds==stackHost->_undoStarts&&fabs([DYToolWithID(DYReadTools(stackHost,kCMTimeZero).document,curveID)[@"values"][@"curveY0"]doubleValue]-16)<1e-6);
[curveEditor graphicGesture:YES title:@"测试播放头变化"];stackHost->_workspaceTime=CMTimeMake(1,25);[curveEditor writeGraphicValues:@{@"curveY0":@33}];[curveEditor graphicGesture:NO title:nil];stackHost->_workspaceTime=kCMTimeZero;
run.record(@"workspace-curve-gesture-rejects-a-changed-playhead",[DYToolWithID(DYReadTools(stackHost,kCMTimeZero).document,curveID)[@"values"][@"curveY0"]doubleValue]==16);
+2 -2
查看文件
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.21.7</string>
<string>1.21.8</string>
<key>CFBundleVersion</key>
<string>125</string>
<string>126</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>PlugInKit</key>
+2 -2
查看文件
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.21.7</string>
<string>1.21.8</string>
<key>CFBundleVersion</key>
<string>125</string>
<string>126</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
+19 -3
查看文件
@@ -1,6 +1,20 @@
# 大鱼调色开发交接
更新于 2026-11-08(Asia/Shanghai)。这是新对话的接手入口。历史设计和实现细节按需查阅专项交接,复现和交付证据以对应版本的报告为准。
更新于 2026-11-09(Asia/Shanghai)。这是新对话的接手入口。历史设计和实现细节按需查阅专项交接,复现和交付证据以对应版本的报告为准。
## 1.21.8(126)多层调色与检查器响应
2026-11-09。减少多层色彩管理的 GPU 提交和等待,预览取样随同当前批次编码,保留跨 CPU/GPU 边界的同步。宿主 ICC 配置未变化时复用解析结果,几何蒙版跳过色键转换,部分覆盖继续按原色彩空间混合。曲线、一级白平衡轮和颜色分级轮按显示节奏合并宿主参数写入,松手提交最后值并结束撤销组。
Apple M4 的 4K 渲染对照中,曝光加 HSL 几何蒙版约 87.7 → 75.0 毫秒,一级 CST 加蒙版约 49.5 → 42.8 毫秒,P3 CST 混合约 70.5 → 63.0 毫秒。1080p 曝光加 HSL 蒙版约 30.1 → 23.0 毫秒。16 组配置的 128 帧 RGBA16F 输出逐字节一致。首轮 1080p 胶片颗粒与晕光出现回退,已撤回该提交方式。数据覆盖插件渲染入口到 GPU 完成的耗时。[性能基准](verification/RenderFluidity1.21.8.json)
正式 **1.21.8(126)** 已从唯一 FxPlug 路径启动,使用独立 HTTPS 检出的编译提交 `38e9fb25a21d7ba573f09093ea4ca45a79664cf5`。APP 公证 `c439ff82-db8e-44a9-83e4-68c62588a2de` Accepted。签名、票据、Gatekeeper、PluginKit 唯一路径、1,028 项正式安装自检及 17 套模板通过。正式 Metal 库与测量版哈希一致。[安装](verification/Delivery1.21.8.json)
FCP 12.4 在独立 1080p/25p 色卡库中通过主控曲线、中间调色轮、一级白平衡轮的拖动和逐项一次撤销。一级白平衡松手读到 302.9°、5.6%,一次撤销后重开恢复 0°、0%。四种示波器各有 57,600 个有效样本,测试片段播放到 00:00:03:24。FCP 播放帧率、导出和 Motion 耗时未量化。[宿主验收](verification/HostRenderFluidity1.21.8.json)
正式 PKG 已签名、公证和粘附票据,公证 `2aa1a8fa-d48f-45a5-8a56-9ac084d8c7b3` Accepted。20 项展开验包和 192 条载荷权限检查通过。包大小 44529845 字节,SHA-256 `8df87b7762f8a0d11b32e6947f5e4f3a358dce7e44505b20f8534b3a0e3e14b9`。[验包](verification/Package1.21.8.json)
公测标签 `v1.21.8-render-fluidity-20261109`。下一步核验草稿和发布后的完整下载,以及远端恢复。站点文章与主 APP 更新通道为 1.21.6(124)。
## 1.21.7(125)蜘蛛盘跟手优化
@@ -10,9 +24,11 @@
M4 隔离检查器注入 120 个连续拖动事件,6×6 和 24×24 的宿主写入均为 120 → 1,最终网格逐字节一致。连续事件测试刻意不让出运行循环,真实拖动期间会按节奏写中间值。FCP 12.4 的 1080p/25p 合成色卡中,实际在工作台拖动主点 22 到 (0.4626, 0.1817),宿主撤销一次后重开读回 (0.4000, 0.3268)。检查器远程视图的坐标拖动未获确认,隔离测试覆盖该控件;没有量化 FCP 的端到端延迟和目标插件的对照帧率。[基准](verification/SpiderFluidity1.21.7.json) · [宿主](verification/HostSpiderFluidity1.21.7.json)
正式 PKG 已签名、公证、粘附票据,公证 `e9cab355-85bf-4a16-922b-a811aacb5b05` Accepted。20 项展开验包和 192 条载荷权限检查通过。包大小 44528083 字节,SHA-256 `e4d327d4a4fdbcb025e17dd6aa1e0e884c435392b70bcc2e7402d100c07a10ef`。远端发行附件待下载核验。[验包](verification/Package1.21.7.json)
正式 PKG 已签名、公证、粘附票据,公证 `e9cab355-85bf-4a16-922b-a811aacb5b05` Accepted。20 项展开验包和 192 条载荷权限检查通过。包大小 44528083 字节,SHA-256 `e4d327d4a4fdbcb025e17dd6aa1e0e884c435392b70bcc2e7402d100c07a10ef`。[验包](verification/Package1.21.7.json)
已清理临时验收库、生成 APP、旧版替换备份、公证 ZIP 和基准执行副本。原工程文件的 Security 引用排序差异留在工作区。站点文章与主 APP 更新通道为 1.21.6(124)。
公测 Release **421** 和附件 **67** 已发布,标签 `v1.21.7-spider-fluidity-20261109` 指向 `039e567aaa563a36da5bbef90d0ccd4afd690183`。草稿和发布后完整下载的字节数与 SHA-256 一致。独立远端恢复核对编译节点 859 个、发行标签 864 个跟踪文件和 Git 完整性。[发行页](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.21.7-spider-fluidity-20261109) · [下载校验](verification/Release1.21.7.json) · [恢复](verification/Recovery1.21.7.json)
已清理临时验收库、生成 APP、旧版替换备份、公证 ZIP、基准执行副本、草稿下载与恢复检出。原工程文件的 Security 引用排序差异留在工作区。站点文章与主 APP 更新通道为 1.21.6(124)。
## 1.21.6(124)LUT 预览复用