比较提交

..
共修改 14 个文件,包含 1525 行新增和 51 行删除

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

+6 -2
查看文件
@@ -12,13 +12,15 @@
- [LUT 后台加载的 FCP 验收](verification/HostLUTLoading.json)
- [N12 外部 LUT 导入与应用验收](verification/HostExternalLUT.json)
- [外部 LUT 问题定位及回归](verification/ExternalLUTActivation.json)
- [LUT 编码兼容与回归](verification/LUTEncoding.json)
- [混合编码 LUT 的 FCP 验收](verification/HostLUTEncoding.json)
- [LUT 加载响应压力测试](verification/LUTResponsiveness.json)
- [程序图标与插件缩略图验收](verification/BrandAssets.json)
- [分组展开与启用验收](verification/HostGroupFolding.json)
- [主题与 LUT 库的 FCP 验收](verification/HostThemeLUT.json)
- [早期调色链的 FCP 验收](verification/Host.json)
当前正式版本为 1.1.4(15),交付标签 `v1.1.4-external-lut-20261101`。所有调色分组统一为展开即启用、折叠即停用;新建实例与全部还原只展开基础调节。折叠保留参数和 LUT 路径,重新展开继续使用;打开已保存的调色时按各组实际启用状态展开。基础调节同时控制其光影、白平衡与颜色子组。
当前正式版本为 1.1.5(16),交付标签 `v1.1.5-lut-encoding-20261101`。所有调色分组统一为展开即启用、折叠即停用;新建实例与全部还原只展开基础调节。折叠保留参数和 LUT 路径,重新展开继续使用;打开已保存的调色时按各组实际启用状态展开。基础调节同时控制其光影、白平衡与颜色子组。
程序图标与 FCP 缩略图采用统一的光谱鱼。两张原始生成图及提示词保存在 `design/`;运行 `python3 tools/build_brand_assets.py` 使用 macOS 工具导出 ICNS、640×360 与 240×135 的效果预览。
@@ -40,6 +42,8 @@ LUT 文件夹扫描、逐项校验/复制和选择文件后的解析均在后台
1.1.4 修复外部 Cube 的旧编码标题导致整批导入失败:标题、注释兼容旧编码,尺寸和数值仍严格校验,报错包含文件名。点击缩略图时先在后台解析并准备 GPU 纹理,宿主接受后才确认选择;已选表独立保留,不受缩略图缓存淘汰影响。用户提供的 N12 目录 26 个 LUT 已全部导入、生成缩略图并完成 Metal 渲染,FCP 中两份“青橙色”、64 级 LUT、快速切换和保存重开通过。用户 LUT 不进入源码或安装包。
1.1.5 增加整份 Cube 的 UTF-16/UTF-32 大小端、有无 BOM 识别,在后台转换工作副本,保留导入文件的原始字节。支持常见换行及 Unicode 空白,标题、注释继续兼容 ASCII 指令下的旧编码。16 份 UTF-8/16/32 与 GB18030、Big5、Shift JIS、Windows-1252、MacRoman、ISO-8859-1 样本已在 FCP 中全部导入、预览和逐项应用,无 BOM UTF-32 保存重开通过。损坏的编码、非法数字仍会报错,不使用有损转码猜测颜色值。
正式 PKG 打包使用 PKG 工坊源码中的 `pkg-forge` 技能。运行 `python3 Packaging/build_pkg.py --pkg-forge-repo /实际/PKG工坊源码目录`,默认输出到上级“发行包”目录;先使用 `--prepare-only` 可只检查清单。打包使用已验证的正式 APP,并从相同 APP 资源中核对、整理 FCP 模板与缩略图,不重签或重建调色 APP。生成包将要求正常退出四种 FCP/Motion 宿主并在登录用户会话验证注册;签名公证和真实展开验包由该技能的原打包器与校验器完成。已有同名版本包不会覆盖。
当前正式安装包:[大鱼调色-1.1.4.pkg](../发行包/大鱼调色-1.1.4.pkg),包含1.1.4(15)正式APP及相同版本的FCP模板/预览图;本机Apple Silicon,最低macOS14.6。签名、公证与20项真实展开验包记录见 [Package.json](verification/Package.json)。本轮没有重复执行系统安装;包内APP与已验收的正式安装逐字节一致。
当前正式安装包:[大鱼调色-1.1.5.pkg](../发行包/大鱼调色-1.1.5.pkg),包含1.1.5(16)正式APP及相同版本的FCP模板/预览图;本机Apple Silicon,最低macOS14.6。签名、公证与20项真实展开验包记录见 [Package.json](verification/Package.json)。本轮没有重复执行系统安装;包内APP与已验收的正式安装逐字节一致。
+22 -2
查看文件
@@ -4,7 +4,9 @@
初始化基线:10987dd6bcc6986ea321eff75b37d4e8b48e966d;后续节点见git log。
产品主ID:com.dayu.color,XPC:com.dayu.color.XPC;唯一正式位置:/Library/Plug-Ins/FxPlug/大鱼调色.app。
当前交付标签:v1.1.4-external-lut-20261101。APP 1.1.4(15)编译源码:497eef29fe8eaa5fb7025aa045b6dfa46a9acc14;标签另含最终宿主验收与恢复记录。Apple 公证 ID d9d9b05a-58b5-4a7a-aac2-6433b87d901d,Accepted;正式签名、票据、Gatekeeper 与宿主重开均通过,见 verification/Delivery.json 和 verification/HostExternalLUT.json。
当前交付标签:v1.1.5-lut-encoding-20261101。APP 1.1.5(16)编译源码:59b058a3c8b9e5387381574da6bbc05af437527c;标签另含最终宿主验收与恢复记录。Apple 公证 ID b47b6fe8-b7a9-4112-93b9-de85b03ca598,Accepted;正式签名、票据、Gatekeeper 与宿主重开均通过,见 verification/Delivery.json 和 verification/HostLUTEncoding.json。
外部LUT版本 v1.1.4-external-lut-20261101 保留,编译源码497eef29fe8eaa5fb7025aa045b6dfa46a9acc14,原公证ID d9d9b05a-58b5-4a7a-aac2-6433b87d901d。
后台加载版本 v1.1.3-async-lut-20261101 保留,编译源码6452e793f974234b5ffffdfad5dc3ddeee64d53c,原公证ID d47784c7-7cad-4837-93ab-9bce5d8c19da。
@@ -90,9 +92,27 @@ verification/LUTResponsiveness.json 记录同一组 24 个 65³ 合成 LUT(197
真实目录复测可用tools/verify_external_lut_folder.mm与DYLUTLibrary.mm,链接Foundation、AppKit和zlib构建;调用参数为源目录及报告JSON。该工具只读源文件并使用独立临时库,完成后清理。正式XPC的--self-test可选环境变量DY_DIAGNOSTIC_LUT_FOLDER指向实际LUT目录,逐文件准备和渲染;正常插件运行不读取这个诊断变量。
## Cube 文本编码兼容(2026-11-01)
1.1.5(16)支持 UTF-8 BOM/无BOM、UTF-16 LE/BE 与 UTF-32 LE/BE 的有无BOM文件。无BOM时只根据可识别的Cube起始内容判断字节序,不任意删除NUL字节。宽字符解码在后台进行,每约16KB检查取消;合法字符转换为工作副本,导入仍逐字节复制原文件。中文、日文与非BMP标题已覆盖。ASCII兼容的GB18030、Big5、Shift JIS、Windows-1252、MacRoman和ISO-8859-1标题/注释不要求UTF-8;无需为了显示标题而猜测这些编码。
LF、CRLF、CR、Unicode横向空白和宽字符文本中的Unicode换行已覆盖。截断单元、非法UTF-16代理对、UTF-32越界/代理值、宽字符NUL和非法数值不会通过有损转换绕过校验;维度2–128与单文件256MB限制保持。未增加其他LUT文件格式或承诺所有历史字符集。模型、GPU数学和二进制dylut未变。
独立编码回归报告179项通过,混合编码40文件异步导入含54,925,360字节UTF-32 65³样本,主循环最大空档6.283毫秒;核心库112项、浏览器67项通过。ASCII快速路径保留普通LUT速度:24个65³合成文件导入7.526秒,主循环最大空档6.3毫秒。N12原26个实际LUT导入与缩略图回归通过。正式APP自检92项通过,16份33³编码样本的实际Metal渲染检查141项通过。详见verification/LUTEncoding.json。
FCP12.4通过原生文件夹选择框导入全部16个UTF-8/16/32与旧编码样本,缩略图和逐项应用全部通过;UTF-32 BE无BOM路径保存、正常退出重开仍生效。验收后恢复用户原“复古-大白鲨”、N12目录和空搜索,仅按清单摘要删除16个测试导入副本;原有30个LUT逐字节不变,N12的26项保留。详情见verification/HostLUTEncoding.json。本轮未强制退出宿主或改动第一片段的其他插件。
源码59b058a3c8b9e5387381574da6bbc05af437527c已从远端独立恢复138文件、strict/full fsck,恢复源码重建112项库及179项编码回归通过,见verification/LUTEncodingRecovery.json。tools/create_lut_encoding_fixture.py在固定产品缓存重建16个合成宿主样本,不自动导入用户库;tools/verify_lut_encoding.mm与DYLUTLibrary.mm链接Foundation、AppKit和zlib可重测编码/取消/字节保留。正式XPC的DY_DIAGNOSTIC_LUT_FOLDER诊断方式同前。
## 正式 PKG(2026-11-01)
当前安装包:上级发行包/大鱼调色-1.1.4.pkg,13,750,251字节,SHA256 b078fc5a86763edeab07002eb00dd13355d28a5c61bb4bed487eb93c0a8b316d。Apple公证ID 1b7bbefe-956c-45bd-8a68-cd6720a9c00d,Accepted;Installer团队B3W25FX5H5、可信时间戳、票据、Gatekeeper和20项真实展开验包通过。包内APP与1.1.4(15)正式安装逐字节一致,当前宿主验收为verification/HostExternalLUT.json。源码技能采用191da9dc0abfda83fcc5939f6fc90e4c9019f4d9,发行标签v1.1.4-external-lut-20261101同时包含应用和PKG记录。
当前安装包:上级发行包/大鱼调色-1.1.5.pkg,13,752,153字节,SHA256 bf2a4acc57a3c08176be0f317c90551120bfcfb21a7224a690191884c8a3d071。Apple公证ID 90a38636-93bb-4693-8db2-16b9a815e409,Accepted;Installer团队B3W25FX5H5、可信时间戳、票据、Gatekeeper和20项真实展开验包通过。包内APP与1.1.5(16)正式安装逐字节一致,宿主验收为verification/HostLUTEncoding.json。源码技能采用191da9dc0abfda83fcc5939f6fc90e4c9019f4d9,发行标签v1.1.5-lut-encoding-20261101同时包含应用和PKG记录。
APP编译源码59b058a3c8b9e5387381574da6bbc05af437527c;恢复后先完成APP正式交付,再运行Packaging/build_pkg.py。没有再次执行本PKG的系统安装。当前包不含用户LUT、测试LUT、媒体或偏好;本轮生成的APP、旧版备份、解包/打包暂存和公证ZIP均已核对清理。历史包保留。
### 历史 1.1.4 安装包
安装包:上级发行包/大鱼调色-1.1.4.pkg,13,750,251字节,SHA256 b078fc5a86763edeab07002eb00dd13355d28a5c61bb4bed487eb93c0a8b316d。Apple公证ID 1b7bbefe-956c-45bd-8a68-cd6720a9c00d,Accepted;Installer团队B3W25FX5H5、可信时间戳、票据、Gatekeeper和20项真实展开验包通过。包内APP与1.1.4(15)正式安装逐字节一致,宿主验收为verification/HostExternalLUT.json。源码技能采用191da9dc0abfda83fcc5939f6fc90e4c9019f4d9,发行标签v1.1.4-external-lut-20261101同时包含应用和PKG记录。
APP编译源码497eef29fe8eaa5fb7025aa045b6dfa46a9acc14;恢复后先完成APP正式交付,再运行Packaging/build_pkg.py。没有再次执行本PKG的系统安装,不能将结构验包描述为安装脚本已经实际运行。原1.1.3安装包与历史标签保留;当前包不含N12 LUT、用户媒体或偏好。旧版14备份由管理员所有,已在系统管理员授权后清理;本轮生成的APP、解包/打包暂存和公证ZIP均已核对清理。
+40
查看文件
@@ -0,0 +1,40 @@
#!/usr/bin/env python3
"""Rebuild synthetic encoding fixtures in the fixed product cache, never user LUTs."""
from pathlib import Path
import hashlib
import json
ROOT = Path.home() / "Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/编码兼容验收"
def main():
ROOT.mkdir(parents=True, exist_ok=True)
matrix = [("utf-8", False), ("utf-8", True)]
matrix += [(codec, bom) for codec in ("utf-16-le", "utf-16-be", "utf-32-le", "utf-32-be") for bom in (False, True)]
matrix += [(codec, False) for codec in ("gb18030", "big5", "shift_jis", "cp1252", "mac_roman", "iso8859-1")]
marks = {"utf-8": b"\xef\xbb\xbf", "utf-16-le": b"\xff\xfe", "utf-16-be": b"\xfe\xff",
"utf-32-le": b"\xff\xfe\0\0", "utf-32-be": b"\0\0\xfe\xff"}
previous = ROOT / "fixtures.json"
known = json.loads(previous.read_text())["files"] if previous.exists() else []
known = {item["file"]: item["sha256"] for item in known}
rows = []
for index, (codec, bom) in enumerate(matrix):
title = "Unicode 中文 🎬" if codec.startswith("utf-") else "中文標題" if codec in ("gb18030", "big5") else "日本語" if codec == "shift_jis" else "Café"
newline = ("\n", "\r\n", "\r")[index % 3]
name = codec.upper() + ("-BOM" if bom else "-NoBOM") + ".cube"
text = [f'TITLE "{title}"', '# Encoding compatibility fixture only', 'LUT_3D_SIZE 33', 'DOMAIN_MIN 0 0 0', 'DOMAIN_MAX 1 1 1']
gain = .7 + .04 * index
text.extend(f"{x/32*gain:.7f} {y/32:.7f} {z/32:.7f}" for z in range(33) for y in range(33) for x in range(33))
data = (marks[codec] if bom else b"") + (newline.join(text) + newline).encode(codec)
target = ROOT / name
if target.exists():
assert hashlib.sha256(target.read_bytes()).hexdigest() == known.get(name), f"Existing fixture changed; preserve it: {target}"
target.write_bytes(data)
rows.append(dict(file=name, codec=codec, bom=bom, sha256=hashlib.sha256(data).hexdigest(), bytes=len(data), dimension=33))
report = dict(synthetic=True, sourceFolder=str(ROOT), files=rows, count=len(rows), bytes=sum(x["bytes"] for x in rows))
previous.write_text(json.dumps(report, ensure_ascii=False, indent=2) + "\n")
print(json.dumps({k: v for k, v in report.items() if k != "files"}, ensure_ascii=False))
if __name__ == "__main__":
main()
+56
查看文件
@@ -0,0 +1,56 @@
#import <AppKit/AppKit.h>
#import "../大鱼调色/Plugin/DYLUTLibrary.h"
#include <cmath>
static NSMutableArray *checks;
static void need(BOOL pass,NSString *name){[checks addObject:@{@"name":name,@"pass":@(pass)}];if(!pass){fprintf(stderr,"FAIL %s\n",name.UTF8String);exit(1);}}
static NSString *cube(NSUInteger n){
NSMutableString *s=[NSMutableString stringWithString:@"# 中文 / 日本語 / café / 🎨\nTITLE \"Unicode 🎬\"\nLUT_3D_SIZE "];[s appendFormat:@"%lu\nDOMAIN_MIN 0 0 0\nDOMAIN_MAX 1 1 1\n",(unsigned long)n];
for(NSUInteger z=0;z<n;z++)for(NSUInteger y=0;y<n;y++)for(NSUInteger x=0;x<n;x++)[s appendFormat:@"%.7e %.7e %.7e # value\n",double(x)/(n-1)*.8,double(y)/(n-1),double(z)/(n-1)];return s;
}
static NSData *encoded(NSString *text,NSStringEncoding encoding,BOOL bom){
NSMutableData *d=[NSMutableData data];
if(bom){const uint8_t le16[]={0xff,0xfe},be16[]={0xfe,0xff},le32[]={0xff,0xfe,0,0},be32[]={0,0,0xfe,0xff},utf8[]={0xef,0xbb,0xbf};
if(encoding==NSUTF16LittleEndianStringEncoding)[d appendBytes:le16 length:2];else if(encoding==NSUTF16BigEndianStringEncoding)[d appendBytes:be16 length:2];
else if(encoding==NSUTF32LittleEndianStringEncoding)[d appendBytes:le32 length:4];else if(encoding==NSUTF32BigEndianStringEncoding)[d appendBytes:be32 length:4];else [d appendBytes:utf8 length:3];}
[d appendData:[text dataUsingEncoding:encoding]];return d;
}
static void pump(BOOL (^done)(void)){double end=NSProcessInfo.processInfo.systemUptime+90;while(!done()&&NSProcessInfo.processInfo.systemUptime<end)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.01]];need(done(),@"asynchronous operation completes");}
int main(int argc,const char **argv){@autoreleasepool{
if(argc!=2)return 2;checks=[NSMutableArray new];NSFileManager *fm=NSFileManager.defaultManager;NSError *error=nil;
NSURL *root=[NSURL fileURLWithPath:[NSTemporaryDirectory()stringByAppendingPathComponent:[@"dayu-lut-encoding-" stringByAppendingString:NSUUID.UUID.UUIDString]]];NSURL *valid=[root URLByAppendingPathComponent:@"Valid"];
need([fm createDirectoryAtURL:valid withIntermediateDirectories:YES attributes:nil error:&error],@"create isolated encoding fixtures");
NSString *base=cube(2);float pixel[]={.37,.28,.81,1};NSData *input=[NSData dataWithBytes:pixel length:sizeof(pixel)];
NSURL *baseline=[root URLByAppendingPathComponent:@"Baseline.cube"];need([base writeToURL:baseline atomically:YES encoding:NSUTF8StringEncoding error:&error],@"write independent UTF-8 baseline");NSData *reference=DYLUTTransformRGBA(input,1,1,baseline.path,&error);need(reference!=nil,@"baseline color result");
NSArray *encodings=@[@(NSUTF8StringEncoding),@(NSUTF16LittleEndianStringEncoding),@(NSUTF16BigEndianStringEncoding),@(NSUTF32LittleEndianStringEncoding),@(NSUTF32BigEndianStringEncoding)];
NSUInteger count=0;NSMutableDictionary *originals=[NSMutableDictionary dictionary];
for(NSNumber *e in encodings)for(NSNumber *bom in @[@NO,@YES])for(NSString *newline in @[@"\n",@"\r\n",@"\r"]){@autoreleasepool{
NSString *name=[NSString stringWithFormat:@"Encoding-%02lu.cube",(unsigned long)count++];NSURL *url=[valid URLByAppendingPathComponent:name];NSData *data=encoded([base stringByReplacingOccurrencesOfString:@"\n" withString:newline],e.unsignedIntegerValue,bom.boolValue);
need([data writeToURL:url atomically:YES],name);originals[name]=data;
need([DYLUTTransformRGBA(input,1,1,url.path,&error)isEqual:reference],[name stringByAppendingString:@" exact numeric equivalence"]);
need(DYLUTThumbnail(url.path,nil,0,0,NSMakeSize(32,18),&error)!=nil,[name stringByAppendingString:@" thumbnail"]);
}}
// Unicode horizontal spacing is valid around commands and numeric tokens.
NSString *spaced=[base stringByReplacingOccurrencesOfString:@" " withString:@"\u00a0"];
for(NSNumber *e in encodings){NSString *name=[NSString stringWithFormat:@"Spacing-%lu.cube",(unsigned long)e.unsignedIntegerValue];NSData *data=encoded(spaced,e.unsignedIntegerValue,NO);NSURL *url=[valid URLByAppendingPathComponent:name];need([data writeToURL:url atomically:YES],name);originals[name]=data;need([DYLUTTransformRGBA(input,1,1,url.path,&error)isEqual:reference],[name stringByAppendingString:@" nonbreaking spaces"]);}
for(NSNumber *e in [encodings subarrayWithRange:NSMakeRange(1,4)]){NSString *name=[NSString stringWithFormat:@"UnicodeLines-%lu.cube",(unsigned long)e.unsignedIntegerValue];NSString *text=[base stringByReplacingOccurrencesOfString:@"\n" withString:@"\u2028"];NSData *data=encoded(text,e.unsignedIntegerValue,YES);NSURL *url=[valid URLByAppendingPathComponent:name];need([data writeToURL:url atomically:YES],name);originals[name]=data;need([DYLUTTransformRGBA(input,1,1,url.path,&error)isEqual:reference],[name stringByAppendingString:@" Unicode line separators"]);}
// Explicit bytes keep this independent of the decoder being exercised.
NSArray *bad=@[[NSData dataWithBytes:"\xff\xfe\x54" length:3],[NSData dataWithBytes:"\xfe\xff\x54" length:3],
[NSData dataWithBytes:"\xff\xfe\x00\xd8" length:4],[NSData dataWithBytes:"\xff\xfe\x00\xdc" length:4],
[NSData dataWithBytes:"\xff\xfe\x00\xd8\x41\x00" length:6],
[NSData dataWithBytes:"\x00\x00\xfe\xff\x00\x11\x00\x00" length:8],
[NSData dataWithBytes:"\xff\xfe\x00\x00\x00\xd8\x00\x00" length:8],
[NSData dataWithBytes:"\x00\x00\xfe\xff\x00\x00\x00" length:7],
[NSData dataWithBytes:"\xff\xfe\x00\x00\x00\x00\x00\x00" length:8]];
NSUInteger badIndex=0;for(NSData *data in bad){NSURL *url=[root URLByAppendingPathComponent:[NSString stringWithFormat:@"Malformed-%lu.cube",(unsigned long)badIndex++]];need([data writeToURL:url atomically:YES],@"write malformed Unicode fixture");std::vector<float> v;NSUInteger n=0;need(!DYLUTReadCube(url.path,v,n,&error)&&v.empty()&&n==0&&[error.localizedDescription containsString:@"编码损坏"],@"reject malformed Unicode without a lossy fallback");}
NSURL *invalid=[root URLByAppendingPathComponent:@"BadNumbers.cube"];need([encoded([base stringByAppendingString:@"NaN 0 0\n"],NSUTF32BigEndianStringEncoding,YES)writeToURL:invalid atomically:YES],@"write encoded invalid numbers");std::vector<float> v;NSUInteger n=0;need(!DYLUTReadCube(invalid.path,v,n,&error)&&v.empty()&&n==0,@"Unicode decoding does not weaken numeric validation");
// Cold large UTF-32 file exercises background conversion and cancellation.
NSURL *large=[valid URLByAppendingPathComponent:@"Large-UTF32BE.cube"];NSData *largeBytes=encoded(cube(65),NSUTF32BigEndianStringEncoding,YES);need([largeBytes writeToURL:large atomically:YES],@"write cold 65-cube UTF-32 fixture");originals[large.lastPathComponent]=largeBytes;
DYLUTLibrary *library=[[DYLUTLibrary alloc]initWithRootURL:[root URLByAppendingPathComponent:@"Library"]];__block BOOL done=NO;__block double last=NSProcessInfo.processInfo.systemUptime,gap=0;__block NSUInteger ticks=0,imported=0;
NSTimer *timer=[NSTimer scheduledTimerWithTimeInterval:.005 repeats:YES block:^(NSTimer *t){double now=NSProcessInfo.processInfo.systemUptime;gap=MAX(gap,now-last);last=now;ticks++;(void)library.entries;}];
[library importURLsAsync:@[valid] completion:^(NSArray *items,NSError *failure){need(!failure,@"mixed encoding folder imports asynchronously");imported=items.count;done=YES;}];pump(^{return done;});[timer invalidate];need(imported==originals.count,@"all encoded files imported");need(ticks>0&&gap<.15,@"main loop remains responsive during Unicode conversion");
for(NSDictionary *entry in library.entries)need([[NSData dataWithContentsOfFile:entry[@"path"]]isEqual:originals[[entry[@"path"]lastPathComponent]]],@"import preserves exact encoded bytes");
NSURL *cancelURL=[root URLByAppendingPathComponent:@"Cancel-UTF32BE.cube"];need([largeBytes writeToURL:cancelURL atomically:YES],@"write uncached cancellation fixture");done=NO;NSProgress *task=DYLUTPrepareAsync(cancelURL.path,^(NSError *failure){need(failure.code==NSUserCancelledError,@"cancelled Unicode conversion reports cancellation");done=YES;});NSTimer *cancel=[NSTimer scheduledTimerWithTimeInterval:.001 repeats:NO block:^(NSTimer *t){[task cancel];}];pump(^{return done;});[cancel invalidate];
NSDictionary *report=@{@"pass":@YES,@"checks":@(checks.count),@"results":checks,@"encodedImportFiles":@(imported),@"mainHeartbeatMaxGapMS":@(gap*1000),@"mainHeartbeatTicks":@(ticks),@"largeEncodedBytes":@(largeBytes.length),@"scope":@"Synthetic isolated UTF-8/16/32 LE/BE BOM/no-BOM, line endings, Unicode spacing, exact colors, corruption, async import and cancellation. No user files modified."};
need([[NSJSONSerialization dataWithJSONObject:report options:NSJSONWritingPrettyPrinted error:nil]writeToFile:[NSString stringWithUTF8String:argv[1]] atomically:YES],@"write encoding report");[library release];need([fm removeItemAtURL:root error:nil],@"clean encoding fixtures");printf("PASS %lu checks, main gap %.3f ms\n",(unsigned long)checks.count,gap*1000);return 0;
}}
+16 -17
查看文件
@@ -2,36 +2,35 @@
"status": "verified",
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"bundleID": "com.dayu.color",
"version": "1.1.4",
"build": "15",
"version": "1.1.5",
"build": "16",
"team": "B3W25FX5H5",
"notaryID": "d9d9b05a-58b5-4a7a-aac2-6433b87d901d",
"notaryID": "b47b6fe8-b7a9-4112-93b9-de85b03ca598",
"notaryStatus": "Accepted",
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
"sourceCommit": "497eef29fe8eaa5fb7025aa045b6dfa46a9acc14",
"sourceCommit": "59b058a3c8b9e5387381574da6bbc05af437527c",
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
"templateSHA256": "ebf8b7aa7a6781b9ce611375a838d89997656b0fc01077b2a7e5b1b2a2c373e1",
"shaderSHA256": "9d89ed3197cf987a37ad7320911d23b8510b5461ffca2bd16397c8b963e02132",
"hostVerification": "verification/HostExternalLUT.json",
"sourceRecoveryVerification": "verification/ExternalLUTRecovery.json",
"responsivenessVerification": "verification/ExternalLUTActivation.json",
"removedPreviousInstallBackups": [
"/Library/Plug-Ins/FxPlug/.dayu-color-previous-b6dd5f83255244539374d948f0aeb7ba.app"
],
"cleanupAuthorization": "macOS administrator authorization for root-owned prior package installation",
"registry": "com.dayu.color.XPC(1.1)\t40C8CD23-1141-4103-8AF0-FC8A2B986165\t2026-11-01 07:22:50 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit\n (1 plug-in)",
"hostVerification": "verification/HostLUTEncoding.json",
"sourceRecoveryVerification": "verification/LUTEncodingRecovery.json",
"responsivenessVerification": "verification/LUTEncoding.json",
"registry": "com.dayu.color.XPC(1.1)\t78D73EB2-7FCE-41CD-8E6A-6AABC8ACACDB\t2026-11-01 07:39:57 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit\n (1 plug-in)",
"appInventory": [
{
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"version": "1.1.4",
"build": "15"
"version": "1.1.5",
"build": "16"
}
],
"inventoryScope": [
"project and its build directories",
"fixed product cache",
"project and fixed product cache",
"system FxPlug and Applications",
"user FxPlug, Downloads and Desktop"
],
"packageVerification": "verification/Package.json"
"packageVerification": "verification/Package.json",
"packageStagingCleanup": {
"identifier": "com.dayu.color.installer.c8d19ea6-1117-4621-ae47-48a41ea4ca10",
"remainingMatchedDirectories": []
}
}
+213
查看文件
@@ -0,0 +1,213 @@
{
"date": "2026-11-01T07:46:11.571597+00:00",
"status": "verified",
"version": "1.1.5",
"build": "16",
"compiledSourceCommit": "59b058a3c8b9e5387381574da6bbc05af437527c",
"formalApp": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"host": {
"name": "Final Cut Pro",
"version": "12.4",
"build": "454072"
},
"project": "大鱼调色_分组展开与启用验收",
"playhead": "00:00:02:18",
"fixture": {
"synthetic": true,
"sourceFolder": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/编码兼容验收",
"files": [
{
"file": "UTF-8-NoBOM.cube",
"codec": "utf-8",
"bom": false,
"sha256": "0ccd6767407545c141d38d8233e57a57e0fc40078c8371f55786800de204003f",
"bytes": 1078225,
"dimension": 33
},
{
"file": "UTF-8-BOM.cube",
"codec": "utf-8",
"bom": true,
"sha256": "b98c9e163a0ab33b7c7d3af477a335810846dfc82af0ae6a713bfdade88cb7db",
"bytes": 1114170,
"dimension": 33
},
{
"file": "UTF-16-LE-NoBOM.cube",
"codec": "utf-16-le",
"bom": false,
"sha256": "76deea4650a01fdbe57b9cd4fca06b0fa47c78d544bde9104959b7416bc67ed6",
"bytes": 2156438,
"dimension": 33
},
{
"file": "UTF-16-LE-BOM.cube",
"codec": "utf-16-le",
"bom": true,
"sha256": "c5151d57a58acd6751e014d19c7073ce50a1151f0701943c13497f0c0a21a42d",
"bytes": 2156440,
"dimension": 33
},
{
"file": "UTF-16-BE-NoBOM.cube",
"codec": "utf-16-be",
"bom": false,
"sha256": "59cf2d07c31532a209efc432f2ed139856221cb47704473b9b2ce7344476594f",
"bytes": 2228322,
"dimension": 33
},
{
"file": "UTF-16-BE-BOM.cube",
"codec": "utf-16-be",
"bom": true,
"sha256": "8d58a8e67a2cd1e3a33c354a7751f65c31790f086a249976da0d7783b25e49c7",
"bytes": 2156440,
"dimension": 33
},
{
"file": "UTF-32-LE-NoBOM.cube",
"codec": "utf-32-le",
"bom": false,
"sha256": "5104b4235e0d86c73444b82642904d9bd779ce0cf4a22d4cb9fcab8ecbfed99e",
"bytes": 4312872,
"dimension": 33
},
{
"file": "UTF-32-LE-BOM.cube",
"codec": "utf-32-le",
"bom": true,
"sha256": "0ef0fbdc899575385f4a05b1bdb8a8b17664af6c0ce9c3474b9927831ea94ba1",
"bytes": 4456644,
"dimension": 33
},
{
"file": "UTF-32-BE-NoBOM.cube",
"codec": "utf-32-be",
"bom": false,
"sha256": "8e99c713412b02cef3056427a3e10a4a8979a1ff8387d7f5beef568252825295",
"bytes": 4312872,
"dimension": 33
},
{
"file": "UTF-32-BE-BOM.cube",
"codec": "utf-32-be",
"bom": true,
"sha256": "fc011e3ff28c0b4834a37cf4ee617133db730d37cf07f8bfd9303c4f6dc0df96",
"bytes": 4312876,
"dimension": 33
},
{
"file": "GB18030-NoBOM.cube",
"codec": "gb18030",
"bom": false,
"sha256": "c0dc4012b06798fd4d8ddedeb125edc5512652a5292b70f54e40197e2a028c8d",
"bytes": 1114156,
"dimension": 33
},
{
"file": "BIG5-NoBOM.cube",
"codec": "big5",
"bom": false,
"sha256": "39de3cd6272e852fbc25e309364cc0b0f9cc745e6b2b1e3d412c0dacb7fac53f",
"bytes": 1078214,
"dimension": 33
},
{
"file": "SHIFT_JIS-NoBOM.cube",
"codec": "shift_jis",
"bom": false,
"sha256": "adb4615709ef54a992dfa05a016748ada5642f110a3456f01329b55a55a5241e",
"bytes": 1078212,
"dimension": 33
},
{
"file": "CP1252-NoBOM.cube",
"codec": "cp1252",
"bom": false,
"sha256": "fb37195b5ed916f291e2f32db1f3d69df79afef73f3967cc238e6ae3c2a1167f",
"bytes": 1114152,
"dimension": 33
},
{
"file": "MAC_ROMAN-NoBOM.cube",
"codec": "mac_roman",
"bom": false,
"sha256": "4ebefb24fa47faabbc34c135287b9bd74852b30fe812c85927c697028dd35cf4",
"bytes": 1078210,
"dimension": 33
},
{
"file": "ISO8859-1-NoBOM.cube",
"codec": "iso8859-1",
"bom": false,
"sha256": "ff3bb7cab36c4f4366f098bde199885671a6364b20481e99e81cda8e2c72a5f9",
"bytes": 1078210,
"dimension": 33
}
],
"count": 16,
"bytes": 34826453
},
"observations": [
{
"check": "Native folder selector imports all 16 mixed-encoding LUTs",
"pass": true
},
{
"check": "All sixteen thumbnails generated and individually applied; browser and inspector acknowledge the same path",
"pass": true,
"names": [
"UTF-8-NoBOM",
"UTF-8-BOM",
"UTF-16-LE-NoBOM",
"UTF-16-LE-BOM",
"UTF-16-BE-NoBOM",
"UTF-16-BE-BOM",
"UTF-32-LE-NoBOM",
"UTF-32-LE-BOM",
"UTF-32-BE-NoBOM",
"UTF-32-BE-BOM",
"GB18030-NoBOM",
"BIG5-NoBOM",
"SHIFT_JIS-NoBOM",
"CP1252-NoBOM",
"MAC_ROMAN-NoBOM",
"ISO8859-1-NoBOM"
]
},
{
"check": "UTF-32 BE without BOM retained after normal quit and reopen, group remains enabled",
"pass": true
},
{
"check": "Original user selection restored to 复古-大白鲨, N12 folder, empty search",
"pass": true
}
],
"importedBytes": {
"passResult": true,
"files": 16,
"byteIdentical": 16,
"originalLibraryFiles": 30,
"originalLibraryPreserved": true,
"installedMetalChecks": 141,
"installedMetalPass": true
},
"installedMetal": {
"checks": 141,
"pass": true,
"files": 16
},
"cleanup": {
"removedSyntheticImports": 16,
"originalLibraryFiles": 30,
"originalLibraryHashesUnchanged": true,
"keptN12Imports": 26,
"firstClipOtherEffectsEdited": false,
"forcedQuit": false
},
"limitations": [
"No older macOS, Intel or network-storage benchmark; no full VoiceOver audit.",
"Encoding support covers the documented Cube cases, not every historical charset or unrelated LUT format."
]
}
+5 -5
查看文件
@@ -12,7 +12,7 @@
"error": "未提供错误信息",
"name": "runtime-directory",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/23AC7CD8-DD30-4CD0-9C29-2A8281F20789"
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/6C00009B-0E3E-4F6A-84FB-501C35480F69"
},
{
"descriptors": 196,
@@ -506,7 +506,7 @@
"error": "未提供错误信息",
"name": "renderer-export-33cube",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/23AC7CD8-DD30-4CD0-9C29-2A8281F20789/diagnostic-export.cube"
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/6C00009B-0E3E-4F6A-84FB-501C35480F69/diagnostic-export.cube"
},
{
"bytes": 1186070,
@@ -525,8 +525,8 @@
"pass": true
},
{
"heartbeats": 3,
"maximumGapMS": 5.749749951064587,
"heartbeats": 4,
"maximumGapMS": 5.919541465118527,
"name": "external-activation-main-loop-responsive",
"pass": true
},
@@ -565,6 +565,6 @@
"pass": true
}
],
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/23AC7CD8-DD30-4CD0-9C29-2A8281F20789",
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/6C00009B-0E3E-4F6A-84FB-501C35480F69",
"scope": "Native model and renderer integration with real Metal/IOSurface textures and fake FxPlug host selectors; no GUI or live host document."
}
文件差异过大,未显示。 加载差异
+12
查看文件
@@ -0,0 +1,12 @@
{
"passResult": true,
"sourceCommit": "59b058a3c8b9e5387381574da6bbc05af437527c",
"filesCompared": 138,
"fsck": "strict/full passed",
"restoredChecks": {
"library": 112,
"encoding": 179
},
"lfs": false,
"submodules": false
}
+14 -14
查看文件
@@ -1,7 +1,7 @@
{
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.1.4.pkg",
"sha256": "b078fc5a86763edeab07002eb00dd13355d28a5c61bb4bed487eb93c0a8b316d",
"bytes": 13750251,
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.1.5.pkg",
"sha256": "bf2a4acc57a3c08176be0f317c90551120bfcfb21a7224a690191884c8a3d071",
"bytes": 13752153,
"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.1.4",
"build": "15"
"version": "1.1.5",
"build": "16"
},
{
"source": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/pkg-inputs/大鱼调色",
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.6ceec5b3-1e28-4c39-819e-37f4992d13a3/11EBA03C-C198-4981-9CB3-F352913A2934/大鱼调色"
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.c8d19ea6-1117-4621-ae47-48a41ea4ca10/1F33731D-2B0E-486C-8F6B-88E78433618D/大鱼调色"
}
],
"signature": "Package \"大鱼调色-1.1.4.pkg\":\n Status: signed by a developer certificate issued by Apple for distribution\n Notarization: trusted by the Apple notary service\n Signed with a trusted timestamp on: 2026-11-01 07:26:57 +0000\n Certificate Chain:\n 1. Developer ID Installer: zhong luo (B3W25FX5H5)\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n C0 19 01 3C 67 88 8F 34 65 56 C5 91 3C E5 B6 12 4C 5D A6 DA F9 D8 \n DA 00 37 52 DF F0 F3 E6 00 B4\n ------------------------------------------------------------------------\n 2. Developer ID Certification Authority\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n 7A FC 9D 01 A6 2F 03 A2 DE 96 37 93 6D 4A FE 68 09 0D 2D E1 8D 03 \n F2 9C 88 CF B0 B1 BA 63 58 7F\n ------------------------------------------------------------------------\n 3. Apple Root CA\n Expires: 2035-02-09 21:40:36 +0000\n SHA256 Fingerprint:\n B0 B1 73 0E CB C7 FF 45 05 14 2C 49 F1 29 5E 6E DA 6B CA ED 7E 2C \n 68 C5 BE 91 B5 A1 10 01 F0 24",
"gatekeeper": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.1.4.pkg: accepted\nsource=Notarized Developer ID",
"signature": "Package \"大鱼调色-1.1.5.pkg\":\n Status: signed by a developer certificate issued by Apple for distribution\n Notarization: trusted by the Apple notary service\n Signed with a trusted timestamp on: 2026-11-01 07:46:31 +0000\n Certificate Chain:\n 1. Developer ID Installer: zhong luo (B3W25FX5H5)\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n C0 19 01 3C 67 88 8F 34 65 56 C5 91 3C E5 B6 12 4C 5D A6 DA F9 D8 \n DA 00 37 52 DF F0 F3 E6 00 B4\n ------------------------------------------------------------------------\n 2. Developer ID Certification Authority\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n 7A FC 9D 01 A6 2F 03 A2 DE 96 37 93 6D 4A FE 68 09 0D 2D E1 8D 03 \n F2 9C 88 CF B0 B1 BA 63 58 7F\n ------------------------------------------------------------------------\n 3. Apple Root CA\n Expires: 2035-02-09 21:40:36 +0000\n SHA256 Fingerprint:\n B0 B1 73 0E CB C7 FF 45 05 14 2C 49 F1 29 5E 6E DA 6B CA ED 7E 2C \n 68 C5 BE 91 B5 A1 10 01 F0 24",
"gatekeeper": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.1.5.pkg: accepted\nsource=Notarized Developer ID",
"pass": true,
"scope": "Expanded package structural and payload verification only; no installer scripts executed and no host quit or registration performed.",
"notarization": {
"message": "Successfully received submission info",
"name": "大鱼调色-1.1.5.pkg",
"status": "Accepted",
"createdDate": "2026-11-01T07:26:59.261Z",
"id": "1b7bbefe-956c-45bd-8a68-cd6720a9c00d",
"name": "大鱼调色-1.1.4.pkg"
"createdDate": "2026-11-01T07:46:33.136Z",
"id": "90a38636-93bb-4693-8db2-16b9a815e409"
},
"appCompiledSource": "497eef29fe8eaa5fb7025aa045b6dfa46a9acc14",
"appBuild": "15",
"appCompiledSource": "59b058a3c8b9e5387381574da6bbc05af437527c",
"appBuild": "16",
"packageBuilderRemote": "https://dayu.media/git/dayu/pkg-forge.git",
"packageBuilderCommit": "191da9dc0abfda83fcc5939f6fc90e4c9019f4d9",
"templateSHA256": {
@@ -59,6 +59,6 @@
"large.png": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a",
"small.png": "41fec3138aee904fc39d6982e6fde809243ffec55298dbfe966f4f48d89caf8a"
},
"installedAppHostAcceptance": "verification/HostExternalLUT.json",
"installedAppHostAcceptance": "verification/HostLUTEncoding.json",
"installScope": "本轮仅生成并验包,未再次执行系统安装;正式 APP 已有独立宿主验收。"
}
+1 -1
查看文件
@@ -412,7 +412,7 @@ static NSImage *DYWheelImage(void) {
self.layer.backgroundColor=[DYThemePalette()[@"background"] CGColor];
self.appearance=[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
_brand=[DYLabel(@"◒ 大鱼调色",16) retain]; _brand.font=[NSFont boldSystemFontOfSize:16];_brand.textColor=DYInk();
_subtitle=[DYLabel([[NSBundle bundleForClass:self.class]objectForInfoDictionaryKey:@"CFBundleShortVersionString"]?:@"1.1.4",9) retain]; _subtitle.textColor=DYThemeColor(@"secondary");
_subtitle=[DYLabel([[NSBundle bundleForClass:self.class]objectForInfoDictionaryKey:@"CFBundleShortVersionString"]?:@"1.1.5",9) retain]; _subtitle.textColor=DYThemeColor(@"secondary");
_resetAll=[DYButton(@"↺",self,@selector(resetAll:)) retain];_resetAll.bordered=NO; _resetAll.toolTip=@"恢复全部调色参数与 LUT";_resetAll.accessibilityLabel=@"全部还原";
_save=[DYButton(@"保存预设",self,@selector(savePreset:)) retain];
_load=[DYButton(@"载入预设",self,@selector(loadPreset:)) retain];
+68 -6
查看文件
@@ -81,6 +81,71 @@ static NSError *DYLUTFileError(NSError *error,NSURL *url) {
info[NSFilePathErrorKey]=url.path;if(error)info[NSUnderlyingErrorKey]=error;
return [NSError errorWithDomain:error.domain?:DYLUTLibraryErrorDomain code:error?error.code:1 userInfo:info];
}
static bool DYLUTUnicodeSpace(uint32_t c) {
return c==0x20||(c>=9&&c<=13)||c==0x85||c==0xa0||c==0x1680||
(c>=0x2000&&c<=0x200a)||c==0x2028||c==0x2029||c==0x202f||c==0x205f||c==0x3000;
}
static void DYLUTAppendScalar(std::string& text,uint32_t c) {
if(DYLUTUnicodeSpace(c)) {
text+=char(c==13?'\r':c==10||c==0x85||c==0x2028||c==0x2029?'\n':' ');return;
}
if(c<0x80)text+=char(c);
else if(c<0x800){text+=char(0xc0|(c>>6));text+=char(0x80|(c&63));}
else if(c<0x10000){text+=char(0xe0|(c>>12));text+=char(0x80|((c>>6)&63));text+=char(0x80|(c&63));}
else {text+=char(0xf0|(c>>18));text+=char(0x80|((c>>12)&63));text+=char(0x80|((c>>6)&63));text+=char(0x80|(c&63));}
}
// Normalize only the working copy. Imports retain their original bytes. Narrow
// files remain byte-transparent so legacy TITLE/comment encodings still work.
static BOOL DYLUTText(NSData *bytes,std::string& text,NSProgress *progress,NSError **error) {
const uint8_t *p=(const uint8_t *)bytes.bytes;size_t length=bytes.length,offset=0,width=1;bool little=true;
if(!length)return DYLUTFail(error,@"LUT 文件为空");
auto unit=[&](size_t at,size_t w,bool le){uint32_t c=0;for(size_t k=0;k<w;k++)c|=uint32_t(p[at+k])<<(8*(le?k:w-1-k));return c;};
if(length>=4&&unit(0,4,true)==0x0000feff){width=4;offset=4;}
else if(length>=4&&unit(0,4,false)==0x0000feff){width=4;offset=4;little=false;}
else if(length>=2&&unit(0,2,true)==0xfeff){width=2;offset=2;}
else if(length>=2&&unit(0,2,false)==0xfeff){width=2;offset=2;little=false;}
else if(length>=3&&!memcmp(p,"\xef\xbb\xbf",3))offset=3;
else {
// Without a BOM, infer byte order only from a recognizable Cube prefix.
// Never remove arbitrary NUL bytes or guess an encoding from the title.
auto prefix=[&](size_t w,bool le){bool whitespace=false;
for(size_t at=0;at+w<=length&&at<128;at+=w){uint32_t c=unit(at,w,le);
if(DYLUTUnicodeSpace(c)||c==0xfeff){whitespace=true;continue;}
return c=='#'||(c>='A'&&c<='Z')||(c>='a'&&c<='z')||(c>='0'&&c<='9')||c=='+'||c=='-'||c=='.';
}return whitespace;
};
for(size_t w:{size_t(4),size_t(2)}) {
if(prefix(w,true)){width=w;break;}
if(prefix(w,false)){width=w;little=false;break;}
}
}
if(width==1){text.assign((const char *)p+offset,length-offset);return !DYLUTCancelled(progress,error);}
NSString *encoding=[NSString stringWithFormat:@"UTF-%lu%@",(unsigned long)(width*8),little?@"LE":@"BE"];
auto invalid=[&](NSString *detail){return DYLUTFail(error,[NSString stringWithFormat:@"%@ 编码损坏:%@",encoding,detail]);};
if((length-offset)%width)return invalid(@"文件结尾不完整");
text.clear();text.reserve((length-offset)/width);
size_t nextCancellationCheck=offset;
for(size_t at=offset;at<length;at+=width){
if(at>=nextCancellationCheck){if(DYLUTCancelled(progress,error))return NO;nextCancellationCheck=at+16384;}
uint32_t c=unit(at,width,little);
if(width==2&&c>=0xd800&&c<=0xdbff){
if(at+4>length)return invalid(@"缺少配对字符");uint32_t next=unit(at+2,2,little);
if(next<0xdc00||next>0xdfff)return invalid(@"字符配对无效");c=0x10000+((c-0xd800)<<10)+(next-0xdc00);at+=2;
}else if(c>=0xd800&&c<=0xdfff)return invalid(@"孤立的配对字符");
if(c>0x10ffff||c==0)return invalid(@"含无效字符");
DYLUTAppendScalar(text,c);
}
return !DYLUTCancelled(progress,error);
}
static std::string_view DYLUTTrim(std::string_view v) {
while(!v.empty()) {
unsigned char c=v.front();size_t count=0;
if(c<0x80){if(c==' '||(c>=9&&c<=13))count=1;else break;}
else if(c==0xc2&&v.size()>=2&&v[1]=='\xa0')count=2;
else if((c==0xe1||c==0xe2||c==0xe3)&&v.size()>=3&&(v.substr(0,3)=="\xe1\x9a\x80"||v.substr(0,3)=="\xe2\x80\xaf"||v.substr(0,3)=="\xe2\x81\x9f"||v.substr(0,3)=="\xe3\x80\x80"||(v.substr(0,2)=="\xe2\x80"&&(unsigned char)v[2]>=0x80&&(unsigned char)v[2]<=0x8a)))count=3;
if(!count)break;v.remove_prefix(count);
}return v;
}
static BOOL DYLUTParse(NSString *path,std::vector<float>& data,NSUInteger& size,NSProgress *progress,NSError **error) {
data.clear();size=0;
NSDictionary *attributes=[[NSFileManager defaultManager]attributesOfItemAtPath:path error:error];
@@ -99,20 +164,17 @@ static BOOL DYLUTParse(NSString *path,std::vector<float>& data,NSUInteger& size,
for(float v:data)if(!std::isfinite(v))return DYLUTFail(error,@"输入 LUT 含无效数字");
size=n;return YES;
}
// Cube commands and numbers use ASCII. Descriptive TITLE/comments can
// legitimately use legacy encodings; they never affect the numeric table.
if(!bytes.length)return DYLUTFail(error,@"LUT 文件为空");
std::string storage((const char *)bytes.bytes,bytes.length);
std::string storage;if(!DYLUTText(bytes,storage,progress,error))return NO;
static locale_t numericLocale;static dispatch_once_t localeOnce;dispatch_once(&localeOnce,^{numericLocale=newlocale(LC_NUMERIC_MASK,"C",NULL);});
float domainMin[3]={0,0,0},domainMax[3]={1,1,1};BOOL foundSize=NO;
std::string_view remaining(storage);NSUInteger rows=0;
if(remaining.size()>=3&&remaining.substr(0,3)=="\xef\xbb\xbf")remaining.remove_prefix(3);
auto trim=[](std::string_view v){while(!v.empty()&&(v.front()==' '||v.front()=='\t'||v.front()=='\r'))v.remove_prefix(1);return v;};
auto trim=DYLUTTrim;
auto number=[&](std::string_view& v,float& value){v=trim(v);if(v.empty())return false;char *end=nullptr;value=strtof_l(v.data(),&end,numericLocale);if(end==v.data()||end>v.data()+v.size())return false;v.remove_prefix(end-v.data());return true;};
while(!remaining.empty()) {
if((rows++&1023)==0&&DYLUTCancelled(progress,error))return NO;
size_t end=remaining.find_first_of("\r\n");std::string_view line=remaining.substr(0,end);
if(end==std::string_view::npos)remaining={};else remaining.remove_prefix(end+1);
if(end==std::string_view::npos)remaining={};else {size_t count=end+1;if(remaining[end]=='\r'&&count<remaining.size()&&remaining[count]=='\n')count++;remaining.remove_prefix(count);}
line=line.substr(0,line.find('#'));line=trim(line);if(line.empty())continue;
float r=0,g=0,b=0;
auto starts=[&](std::string_view prefix){return line.substr(0,prefix.size())==prefix;};
+2 -2
查看文件
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.1.4</string>
<string>1.1.5</string>
<key>CFBundleVersion</key>
<string>15</string>
<string>16</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.1.4</string>
<string>1.1.5</string>
<key>CFBundleVersion</key>
<string>15</string>
<string>16</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>