比较提交

...
作者 SHA1 备注 提交日期
mac b5d842835c Verify production beta update download and complete package validation; prepare 1.7.0 release notes 2026-11-02 17:42:00 +08:00
mac c95559936a Package signed notarized 1.7.0 beta and record startup, server deployment and artifact integrity 2026-11-02 17:40:19 +08:00
mac e37330a4b5 Verify notarized 1.7.0 build45 in FCP and actual cloud render telemetry; distinguish event and receive time 2026-11-02 17:38:49 +08:00
mac a0f37578f7 Document beta update, diagnostics privacy, production routes and recovery workflow 2026-11-02 17:35:00 +08:00
mac 30c8904003 Validate signed FxPlug package layout and deploy isolated beta endpoints with live ACK checks 2026-11-02 17:34:14 +08:00
mac 55acdaa4b1 Test beta endpoint contracts, privacy filtering, malformed manifests and delivery validation 2026-11-02 17:30:51 +08:00
mac 15d644c7e7 WIP: integrate isolated beta update and diagnostic client; Release build passes, end-to-end validation pending 2026-11-02 17:28:52 +08:00
mac f453508be6 Establish scoped public beta backend workspace and production mapping 2026-11-02 17:12:37 +08:00
mac 29bb7cdae4 Record user-confirmed normal FCP operation for 1.6.1 build44 2026-11-02 16:33:18 +08:00
mac c587163354 Publish verified 1.6.1 release and complete recovery and generated-copy cleanup records 2026-11-02 16:29:36 +08:00
mac 5d9a4ad707 Prepare notarized 1.6.1 build44 installer and scoped UI delivery records 2026-11-02 16:25:03 +08:00
mac 7113e49fbb Verify main app registration, visible three-second exit and document final UI scope 2026-11-02 16:21:01 +08:00
mac 90d6022520 Show a visible three-second exit countdown inside the registration card 2026-11-02 16:16:52 +08:00
mac c664991aa1 Disable wrapper sandbox and add explicit user confirmation after FCP checks 2026-11-02 16:10:20 +08:00
mac 0743c75a45 Separate successful PluginKit registration from sandbox discovery restrictions 2026-11-02 16:08:06 +08:00
mac 7bb14ea8da Fix sandboxed PluginKit discovery and move publication link to the top 2026-11-02 16:04:06 +08:00
mac 4e77cebd5e Redesign main app introduction and automatically register embedded FxPlug on launch 2026-11-02 15:59:13 +08:00
mac fd25de68fe Document main app handoff for account authentication and automatic updates 2026-11-02 15:50:23 +08:00
mac 46fb091479 Publish verified 1.6.0 installer and finish release recovery and cleanup records 2026-11-02 15:34:59 +08:00
mac 0cc51149a6 Prepare signed notarized 1.6.0 build 39 installer and release notes 2026-11-02 15:30:01 +08:00
mac d635e09ff3 Accept final print, default mapping and clickable header behavior in formal FCP 2026-11-02 15:28:58 +08:00
mac e5affd3f09 Verify stored automatic mapping defaults and explicit on/off round trip 2026-11-02 15:19:19 +08:00
mac 96fa0a49a5 Preserve FCP omitted legacy values while seeding automatic mapping in new templates 2026-11-02 15:19:04 +08:00
mac 378cd2b6ec Render automatic mapping in new primary layers and preserve old layer defaults 2026-11-02 15:14:41 +08:00
mac 378956e130 Keep identity pixel fixtures explicit after automatic mapping default change 2026-11-02 15:13:20 +08:00
mac 1e7b7682c1 Enable primary automatic mapping by default and add header website link 2026-11-02 15:12:04 +08:00
mac 1a33ab335b Verify print looks formal build 36 before requested header and default updates 2026-11-02 15:10:44 +08:00
mac f97320bbee Retain accepted artifact while waiting for normal host shutdown 2026-11-02 14:51:12 +08:00
mac b243751f86 Remove template author rows and adopt native 5.11 format for build36 2026-11-02 14:50:17 +08:00
mac 2b2d657de7 Verify eight print colors against reference and remote recovery; prepare 1.6.0 2026-11-02 14:37:34 +08:00
mac ab7cb759e5 WIP integrate eight print looks; pass 393 native checks, reference comparison pending 2026-11-02 14:33:33 +08:00
mac 7d895750cf WIP verify eight print-look resources and append compatible controls 2026-11-02 14:28:00 +08:00
mac e7fa8e6cf5 Publish 1.5.0 release and verify full download, remote recovery and cleanup 2026-11-02 14:18:41 +08:00
共修改 99 个文件,包含 36604 行新增和 309 行删除

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

+37
查看文件
@@ -0,0 +1,37 @@
# 大鱼调色公测后端
LOCAL_PROJECT=/Users/mac/Downloads/dayumedia/dayu-color-beta
NAS_ROOT=/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media
SOURCE_BACKUP=大鱼调色仓库 Backend/
映射:`wp-content/mu-plugins/dayu-color-beta.php` 和 `wp-content/uploads/dayu-color-beta/updates/beta.json` 均保持同相对路径。PKG 不进 Git,由产品 Release 与生产公测下载空间保存。专项工作副本只包含本产品文件,源码及脱敏记录保存到产品仓库。参考 `fcpx-qwen3-asr` 提交 `113069c74aff935db2082b5bcd8e1aa47fe1fbf2` 的更新校验、批次诊断和崩溃脱敏流程;共享会员鉴权代码未修改。
2026-11-02 初始盘点:目标 MU 插件不存在,本地专项工程新建。实际共享已确认来自 192.168.31.21、dayumedia (存储空间1)、smbfs 且可读写。单独建仓因令牌缺少 write:user 返回403,未扩大权限;改用现有产品仓库保存。
## 路由与查看
- 更新:`GET https://dayu.media/wp-json/dayu-color/v1/update?bundle_id=com.dayu.color&channel=beta&current_build=45`。仅提供更高构建号的完整 PKG 更新,无强制安装。
- 诊断:`POST https://dayu.media/wp-json/dayu-color/v1/diagnostics`,公测阶段不依赖账号。严格限定产品、字段、事件、UUID、批次大小及频率;匿名输入只作为排查证据,不作为授权凭据。
- 日志后台:`https://dayu.media/wp-admin/tools.php?page=dayu-color-beta`,需要管理员。可按构建号、事件、完整报告标识筛选并翻页。GET 诊断接口同样要求 manage_options。
- 数据保留30天,由 WordPress 每日计划清理;依赖站点 WP-Cron 正常运行。IP 仅用于短期频控哈希,不存入诊断表。
## 客户端
主 APP 检查更新与插件注册并行,检查结束且注册成功后显示3秒退出倒计时。发现更新则保留窗口;下载可取消,校验 SHA-256、字节数、Installer/App签名团队、Gatekeeper、包内 Bundle ID、版本、安装位置及模板。保存并退出 FCP/Motion 后打开系统安装器,不强杀宿主。下一次启动可记录已完成升级。
主 APP 与 XPC 共享随机安装标识及诊断开关。诊断默认开启,界面明确说明并可关闭;不上传素材、LUT、预设、用户路径、账号、硬件 UUID 或原始崩溃文件。后台私有队列最多256条/384KB,批次16条,网络超时并延迟重试,服务端按事件 UUID 去重。关闭后清除待发摘要并停止新请求;已经送达的数据按保留期清理。
采集进程启动、初始化、检查器创建/慢刷新、Metal 管线准备、首次渲染、渲染错误、超过6秒的疑似阻塞,以及本插件近7天系统崩溃报告的脱敏摘要。疑似阻塞不等于根因;整个进程被停止、网络不可用、主机强制断电时无法保证即时送达。不会拦截崩溃信号,也不采集整个 FCP 的报告。本轮保留调色与宿主回调逻辑,尚未修复偶发卡死。
## 验证与发布
```sh
php Backend/tests/contract.php
python3 Backend/verify_live.py
python3 Backend/deploy.py --backend
python3 Backend/deploy.py --package '/Volumes/备份/大鱼调色/发行包/大鱼调色-1.7.0.pkg'
```
先从仓库审查、提交并推送,再由部署脚本同步到专项工程;脚本验证实际 SMB 挂载及基线。覆盖原文件前同目录旁路备份并核对字节,新增文件无需不存在的备份。只写明确列出的路径,不加载或输出生产配置。更新包签名、公证、票据与正式 APP 验收通过后才发布;同名包不同字节立即停止。发布后完整下载核对大小与 SHA-256,并核验较低/相同构建号的更新结果。
回滚:先备份当前文件,再恢复部署记录中对应旁路备份;禁止降低已有清单构建号来自动降级。撤下更新时备份并移走 beta.json,更新路由回到没有更新;历史安装包和诊断表保留。源代码可从产品远程仓库恢复,签名私钥及服务端数据库不属于 Git 备份。
+87
查看文件
@@ -0,0 +1,87 @@
#!/usr/bin/env python3
# coding: utf-8
"""Deploy only the Dayu Color beta namespace from the scoped local workspace."""
from pathlib import Path
import argparse,datetime,hashlib,json,os,re,shutil,subprocess,uuid
ROOT=Path(__file__).resolve().parent.parent
LOCAL=Path('/Users/mac/Downloads/dayumedia/dayu-color-beta')
MOUNT=Path('/Volumes/dayumedia (存储空间1)')
NAS=MOUNT/'wwwroot/dayu_media'
REL=Path('wp-content/mu-plugins/dayu-color-beta.php')
UPLOAD=Path('wp-content/uploads/dayu-color-beta/updates')
STAMP=datetime.datetime.now().strftime('%Y%m%d%H%M')
def sha(path):
h=hashlib.sha256()
with path.open('rb') as f:
for part in iter(lambda:f.read(1024*1024),b''):h.update(part)
return h.hexdigest()
def write_json(path,data):
path.parent.mkdir(parents=True,exist_ok=True);path.write_text(json.dumps(data,ensure_ascii=False,indent=2)+'\n')
def check_mount():
lines=subprocess.check_output(['/sbin/mount'],text=True).splitlines()
match=[s for s in lines if f' on {MOUNT} (smbfs,' in s]
assert len(match)==1 and '@192.168.31.21/dayumedia%' in match[0], '目标不是已确认的 NAS SMB 共享'
assert NAS.is_dir() and os.access(NAS/'wp-content/mu-plugins',os.W_OK), '目标共享不可写'
return match[0]
def backup(path):
target=path.with_name(f'{path.stem}-{STAMP}.{path.suffix[1:]}bak' if path.suffix else f'{path.name}-{STAMP}.bak')
assert not target.exists(), '旁路备份重名,请换时间戳'
shutil.copyfile(path,target);assert sha(target)==sha(path)
return str(target)
def deploy_file(source,target,allow_new=False,expected=None):
target.parent.mkdir(parents=True,exist_ok=True);old=None
if target.exists():
if sha(target)==sha(source):return dict(path=str(target),sha256=sha(target),reused=True)
assert expected and sha(target)==expected,'生产基线已变化,停止覆盖'
old=backup(target)
else:assert allow_new,'预期生产基线不存在'
temp=target.with_name('.dayu-color-stage-'+uuid.uuid4().hex)
try:
shutil.copyfile(source,temp);temp.chmod(0o644);assert sha(temp)==sha(source);os.replace(temp,target)
finally:
if temp.exists():temp.unlink()
assert sha(source)==sha(target) and os.access(target,os.R_OK)
return dict(path=str(target),sha256=sha(target),backup=old,size=target.stat().st_size)
def main():
p=argparse.ArgumentParser(description=__doc__);p.add_argument('--backend',action='store_true');p.add_argument('--package',type=Path);args=p.parse_args()
assert args.backend or args.package
mount=check_mount();LOCAL.mkdir(parents=True,exist_ok=True)
lock=LOCAL/'.deployment.lock';lock.mkdir();write_json(lock/'owner.json',dict(PID=os.getpid(),cwd=str(ROOT),started=STAMP))
try:
if args.backend:
subprocess.run(['php','-l',str(ROOT/'Backend'/REL)],check=True)
local=LOCAL/REL;local.parent.mkdir(parents=True,exist_ok=True)
record=ROOT/'verification/BetaBackendDeployment.json'
previous=json.loads(record.read_text()) if record.exists() else {}
if local.exists() and sha(local)!=sha(ROOT/'Backend'/REL):
assert previous.get('sha256')==sha(local),'本地专项工程有未部署改动,停止覆盖'
shutil.copyfile(ROOT/'Backend'/REL,local)
result=deploy_file(local,NAS/REL,allow_new=not previous,expected=previous.get('sha256'))
result.update(timestamp=STAMP,mount=mount,localProject=str(LOCAL),sourceCommit=subprocess.check_output(['git','rev-parse','HEAD'],cwd=ROOT,text=True).strip())
write_json(record,result);print(json.dumps(result,ensure_ascii=False))
if args.package:
package=args.package.resolve();report=json.loads((ROOT/'verification/Package.json').read_text());delivery=json.loads((ROOT/'verification/Delivery.json').read_text())
assert report['notarization']['status']=='Accepted' and delivery['status']=='verified'
# Independent final-container checks before uploading any bytes.
subprocess.run(['pkgutil','--check-signature',str(package)],check=True,stdout=subprocess.DEVNULL)
subprocess.run(['xcrun','stapler','validate',str(package)],check=True,stdout=subprocess.DEVNULL)
subprocess.run(['spctl','--assess','--type','install',str(package)],check=True)
version=delivery['version'];build=int(delivery['build']);digest=sha(package)
assert report["sha256"]==digest, "发行包与验包记录不一致"
filename=f'dayu-color-{version.replace(".","-")}-{build}.pkg';relative=UPLOAD/filename
local=LOCAL/relative;local.parent.mkdir(parents=True,exist_ok=True)
if not local.exists():shutil.copyfile(package,local)
assert sha(local)==digest
result=deploy_file(local,NAS/relative,allow_new=True)
manifest=dict(bundle_id='com.dayu.color',channel='beta',version=version,build=build,package_type='pkg',install_mode='pkg_installer',
size=package.stat().st_size,sha256=digest,download_url='https://dayu.media/'+str(relative),minimum_system_version='14.6',
notes='公测版:接入自动更新与可关闭的云端诊断,记录插件加载耗时及错误摘要。请保存并退出 FCP / Motion 后安装。')
dest=NAS/UPLOAD/'beta.json';old=json.loads(dest.read_text()) if dest.exists() else None
if old:assert int(old['build'])<=build, '禁止更新通道倒退'
localManifest=LOCAL/UPLOAD/'beta.json';write_json(localManifest,manifest)
published=deploy_file(localManifest,dest,allow_new=True,expected=sha(dest) if old else None)
result.update(manifest=published,version=version,build=build,downloadURL=manifest['download_url'],timestamp=STAMP)
write_json(ROOT/'verification/BetaPublication.json',result);print(json.dumps(result,ensure_ascii=False))
finally:
(lock/'owner.json').unlink();lock.rmdir()
if __name__=='__main__':main()
+53
查看文件
@@ -0,0 +1,53 @@
<?php
// Product endpoint contracts; WordPress and DB are stubbed, never load production settings.
error_reporting(E_ALL);
set_error_handler(function($severity,$message,$file,$line){ throw new ErrorException($message,0,$severity,$file,$line); });
define('ABSPATH',__DIR__.'/');define('MINUTE_IN_SECONDS',60);define('DAY_IN_SECONDS',86400);define('ARRAY_A','ARRAY_A');
$testRoot=sys_get_temp_dir().'/dayu-color-contract-'.bin2hex(random_bytes(6));mkdir($testRoot,0700,true);
function add_action(...$args){}
function get_option($key){return '1';}
function register_rest_route($namespace,$route,$args){$GLOBALS['routes'][$route]=$args;}
function current_user_can($permission){return false;}
function wp_upload_dir(...$args){return array('basedir'=>$GLOBALS['testRoot']);}
function sanitize_textarea_field($value){return strip_tags($value);}
function sanitize_text_field($value){return strip_tags($value);}
function wp_salt($scheme){return 'test-only-not-production';}
function get_transient($key){return 0;}
function set_transient(...$args){}
function wp_json_encode($value,$options=0){return json_encode($value,$options);}
class WP_Error {public $code,$data;function __construct($code,$message,$data){$this->code=$code;$this->data=$data;}}
class WP_REST_Response {public $data,$status;function __construct($data,$status,$headers){$this->data=$data;$this->status=$status;}}
class WP_REST_Request {public $params,$body;function __construct($params=array(),$body=null){$this->params=$params;$this->body=$body;}function get_param($name){return $this->params[$name]??null;}function get_body(){return json_encode($this->body);}function get_json_params(){return $this->body;}}
class FakeDB {public $prefix='wp_',$rows=array();function prepare($sql,...$args){return $args[0]??$sql;}function get_var($sql){return isset($this->rows[$sql])?$sql:null;}function insert($table,$row){$this->rows[$row['event_id']]=$row;return 1;}}
$wpdb=new FakeDB;
require dirname(__DIR__).'/wp-content/mu-plugins/dayu-color-beta.php';
$checks=0;
function check($value,$label){global $checks;if(!$value)throw new RuntimeException($label);$checks++;}
function request($body){return new WP_REST_Request(array(),$body);}
try {
Dayu_Color_Beta::routes();
check(($routes['/diagnostics'][1]['permission_callback'])()===false,'anonymous log reads denied');
check(Dayu_Color_Beta::update(new WP_REST_Request(array('bundle_id'=>'other')))->data['status']===400,'product separation');
$response=Dayu_Color_Beta::update(new WP_REST_Request(array('bundle_id'=>'com.dayu.color','current_build'=>44)));
check($response->status===200 && !$response->data['update_available'],'empty feed is usable');
$fields=Dayu_Color_Beta::clean_fields(array('frames'=>'/Users/test/secret.mov','error_domain'=>'token=not-a-token','arbitrary'=>'private','duration_ms'=>INF,'gpu'=>'M4'));
check($fields['frames']==='[REDACTED]' && $fields['error_domain']==='[REDACTED]' && !isset($fields['arbitrary']) && !isset($fields['duration_ms']) && $fields['gpu']==='M4','allowlist and redaction');
$id='12345678-1234-4234-8234-123456789012';
$event=array('event_id'=>$id,'session_id'=>$id,'source'=>'plugin','version'=>'1.7.0','build'=>45,'event'=>'first_render','occurred_at'=>time(),'fields'=>array('duration_ms'=>1200));
$body=array('bundle_id'=>'com.dayu.color','installation_id'=>$id,'events'=>array($event));
$reply=Dayu_Color_Beta::ingest(request($body));
check($reply->status===200 && $reply->data['accepted'] && count($wpdb->rows)===1,'valid event accepted');
Dayu_Color_Beta::ingest(request($body));check(count($wpdb->rows)===1,'retry idempotency');
foreach(array('version'=>array(),'build'=>array(),'event'=>'material_path','session_id'=>'bad','occurred_at'=>null) as $key=>$bad){$b=$body;$b['events'][0][$key]=$bad;check(Dayu_Color_Beta::ingest(request($b))->data['status']===400,'malformed '.$key);}
$b=$body;$b['events']=array_fill(0,33,$event);check(Dayu_Color_Beta::ingest(request($b))->data['status']===400,'batch limit');
$b=$body;$b['padding']=str_repeat('a',100000);check(Dayu_Color_Beta::ingest(request($b))->data['status']===413,'byte limit');
$manifest=array('bundle_id'=>'com.dayu.color','channel'=>'beta','version'=>'1.7.0','build'=>45,'package_type'=>'pkg','install_mode'=>'pkg_installer','size'=>123,'sha256'=>str_repeat('a',64),'download_url'=>'https://dayu.media/wp-content/uploads/dayu-color-beta/updates/dayu-color-1-7-0-45.pkg');
mkdir(dirname(Dayu_Color_Beta::manifest_path()),0700,true);file_put_contents(Dayu_Color_Beta::manifest_path(),json_encode($manifest));
check(Dayu_Color_Beta::update(new WP_REST_Request(array('bundle_id'=>'com.dayu.color','current_build'=>44)))->data['update_available']===true,'older build sees update');
check(Dayu_Color_Beta::update(new WP_REST_Request(array('bundle_id'=>'com.dayu.color','current_build'=>45)))->data['update_available']===false,'current build no downgrade');
foreach(array('download_url'=>'https://other.example/evil.pkg','sha256'=>'bad','build'=>array(),'size'=>1073741825,'install_mode'=>'zip_replace') as $key=>$bad){$m=$manifest;$m[$key]=$bad;file_put_contents(Dayu_Color_Beta::manifest_path(),json_encode($m));check(Dayu_Color_Beta::manifest()===array(),'bad manifest '.$key);}
echo json_encode(array('passed'=>true,'checks'=>$checks),JSON_PRETTY_PRINT)."\n";
} finally {
if(is_file(Dayu_Color_Beta::manifest_path()))unlink(Dayu_Color_Beta::manifest_path());
@rmdir($testRoot.'/dayu-color-beta/updates');@rmdir($testRoot.'/dayu-color-beta');@rmdir($testRoot);
}
+24
查看文件
@@ -0,0 +1,24 @@
#!/usr/bin/env python3
"""Anonymous public-beta endpoint smoke test; no credentials or production settings."""
import datetime,json,time,urllib.request,urllib.error,uuid
from pathlib import Path
ROOT=Path(__file__).resolve().parent.parent
BASE='https://dayu.media/wp-json/dayu-color/v1/'
def call(route,body=None):
request=urllib.request.Request(BASE+route,data=json.dumps(body).encode() if body else None,headers={'Content-Type':'application/json'})
try:
with urllib.request.urlopen(request,timeout=15) as r:return r.status,json.load(r)
except urllib.error.HTTPError as e:return e.code,json.load(e)
def main():
status,feed=call('update?bundle_id=com.dayu.color&channel=beta&current_build=44');assert status==200 and feed['bundle_id']=='com.dayu.color'
assert call('update?bundle_id=other&channel=beta')[0]==400
assert call('diagnostics')[0] in (401,403)
event_id=str(uuid.uuid4());installation=str(uuid.uuid4());session=str(uuid.uuid4())
event=dict(event_id=event_id,session_id=session,source='app',version='1.7.0',build=45,event='diagnostic_summary',occurred_at=time.time(),fields={'status':'deployment_smoke_test','count':1})
payload=dict(bundle_id='com.dayu.color',installation_id=installation,events=[event])
for attempt in range(2):
status,reply=call('diagnostics',payload);assert status==200 and reply['accepted'] and reply['event_ids']==[event_id],(status,reply)
bad=dict(payload,bundle_id='other');assert call('diagnostics',bad)[0]==400
record=dict(passed=True,checked_at=datetime.datetime.now(datetime.timezone.utc).isoformat(),checks=['update GET','product isolation','admin read denied anonymously','diagnostic stored ACK','retry same UUID ACK','foreign upload denied'],test_event_id=event_id,test_installation_id=installation,update=feed)
(ROOT/'verification/BetaBackendLive.json').write_text(json.dumps(record,ensure_ascii=False,indent=2)+'\n');print(json.dumps(record,ensure_ascii=False))
if __name__=='__main__':main()
@@ -0,0 +1,179 @@
<?php
/** Plugin Name: 大鱼调色公测更新与诊断
* Product-scoped beta endpoints. No changes to shared account/authentication code.
*/
defined('ABSPATH') || exit;
final class Dayu_Color_Beta {
const SCHEMA = '1';
const BUNDLE = 'com.dayu.color';
const MAX_BODY = 98304;
const MAX_BATCH = 32;
const EVENTS = array('process_start','process_exit','plugin_init','inspector_create','inspector_refresh',
'device_prepare','gpu_pipeline','first_render','render_error','main_thread_stall',
'operation_stall','previous_session_pending','crash_summary','registration','host_confirmed',
'update_check','update_download','update_validation','update_installer','diagnostic_summary');
const FIELDS = array('phase','stage','pipeline','duration_ms','status','error_domain','error_code',
'exception','signal','frames','report_time','count','pending','model','os_version','fcp_version',
'cpu_cores','memory_gb','gpu','main_delay_ms','active_stages','source_version');
public static function boot() {
add_action('rest_api_init', array(__CLASS__, 'routes'));
add_action('admin_menu', function () {
add_management_page('大鱼调色公测', '大鱼调色公测', 'manage_options', 'dayu-color-beta', array(__CLASS__, 'admin'));
});
add_action('dayu_color_beta_cleanup', array(__CLASS__, 'cleanup'));
}
private static function table() { global $wpdb; return $wpdb->prefix . 'dayu_color_beta_events'; }
public static function ensure_schema() {
if (get_option('dayu_color_beta_schema') === self::SCHEMA) return;
global $wpdb;
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
$table = self::table(); $collation = $wpdb->get_charset_collate();
dbDelta("CREATE TABLE {$table} (
event_id varchar(36) NOT NULL,
installation_id varchar(36) NOT NULL,
session_id varchar(36) NOT NULL,
client_version varchar(32) NOT NULL,
client_build bigint unsigned NOT NULL,
source varchar(12) NOT NULL,
event varchar(64) NOT NULL,
fields_json text NOT NULL,
occurred_at datetime NOT NULL,
received_at datetime NOT NULL,
PRIMARY KEY (event_id),
KEY received_at (received_at),
KEY client_event (client_build,event),
KEY installation (installation_id)
) {$collation};");
if ($wpdb->get_var($wpdb->prepare('SHOW TABLES LIKE %s', $table)) === $table) {
update_option('dayu_color_beta_schema', self::SCHEMA, false);
if (!wp_next_scheduled('dayu_color_beta_cleanup')) wp_schedule_event(time()+3600, 'daily', 'dayu_color_beta_cleanup');
}
}
public static function routes() {
self::ensure_schema();
register_rest_route('dayu-color/v1', '/update', array('methods'=>'GET', 'permission_callback'=>'__return_true', 'callback'=>array(__CLASS__,'update')));
register_rest_route('dayu-color/v1', '/diagnostics', array(
array('methods'=>'POST', 'permission_callback'=>'__return_true', 'callback'=>array(__CLASS__,'ingest')),
array('methods'=>'GET', 'permission_callback'=>function(){ return current_user_can('manage_options'); }, 'callback'=>array(__CLASS__,'events'))
));
}
public static function manifest_path() {
$upload = wp_upload_dir(null, false);
return rtrim($upload['basedir'], '/\\') . '/dayu-color-beta/updates/beta.json';
}
public static function manifest() {
$path = self::manifest_path();
if (!is_file($path) || filesize($path)>32768) return array();
$value = json_decode((string)file_get_contents($path), true);
if (!is_array($value) || ($value['bundle_id']??'')!==self::BUNDLE || ($value['channel']??'')!=='beta') return array();
if (!is_string($value['download_url']??null) || !is_string($value['sha256']??null) || !is_string($value['version']??null) || !is_int($value['build']??null) || !is_int($value['size']??null) || ($value['package_type']??'')!=='pkg' || ($value['install_mode']??'')!=='pkg_installer') return array();
$url = $value['download_url'];
if (!preg_match('~^https://dayu\.media/wp-content/uploads/dayu-color-beta/updates/[A-Za-z0-9_-]+\.pkg$~D', $url)) return array();
if (!preg_match('/^[a-f0-9]{64}$/D', (string)($value['sha256']??'')) || intval($value['size']??0)<=0 || intval($value['build']??0)<=0 || intval($value['size'])>1073741824) return array();
return $value;
}
public static function update($request) {
if (($request->get_param('bundle_id')??'')!==self::BUNDLE || ($request->get_param('channel')??'beta')!=='beta') {
return new WP_Error('product_mismatch','此通道仅用于大鱼调色公测。',array('status'=>400));
}
$manifest = self::manifest();
if (!$manifest) return new WP_REST_Response(array('bundle_id'=>self::BUNDLE,'channel'=>'beta','update_available'=>false,'message'=>'当前没有公测更新。'),200,array('Cache-Control'=>'no-store'));
$current = max(0, intval($request->get_param('current_build')));
$manifest['update_available'] = intval($manifest['build']) > $current;
$manifest['checked_at'] = gmdate('c');
return new WP_REST_Response($manifest,200,array('Cache-Control'=>'no-store'));
}
public static function clean_fields($input) {
if (!is_array($input)) return array();
$out = array();
foreach (self::FIELDS as $key) {
if (!array_key_exists($key,$input) || !is_scalar($input[$key])) continue;
if (in_array($key,array('duration_ms','main_delay_ms','memory_gb','cpu_cores','count','pending','error_code'),true)) {
if (is_numeric($input[$key]) && is_finite((float)$input[$key])) $out[$key]=max(-1000000,min(86400000,(float)$input[$key]));
continue;
}
$value = sanitize_textarea_field((string)$input[$key]);
$value = preg_replace('~(?:https?://\S+|(?:/Users/|/Volumes/|/private/|/var/)[^\r\n]*)~i','[REDACTED]',$value);
$value = preg_replace('/(?:bearer\s+\S+|(?:token|api[_-]?key|secret|password)\s*[=:]\s*\S+)/i','[REDACTED]',$value);
$limit = $key==='frames' ? 6000 : ($key==='active_stages' ? 1000 : 200);
$out[$key] = function_exists('mb_substr') ? mb_substr($value,0,$limit,'UTF-8') : substr($value,0,$limit);
}
return $out;
}
private static function uuid($value) { return is_string($value) && preg_match('/^[a-f0-9]{8}-(?:[a-f0-9]{4}-){3}[a-f0-9]{12}$/iD',$value); }
public static function ingest($request) {
if (strlen($request->get_body())>self::MAX_BODY) return new WP_Error('body_too_large','诊断批次过大。',array('status'=>413));
$body = $request->get_json_params();
if (!is_array($body) || ($body['bundle_id']??'')!==self::BUNDLE || !self::uuid($body['installation_id']??null)
|| !isset($body['events']) || !is_array($body['events']) || count($body['events'])<1 || count($body['events'])>self::MAX_BATCH) {
return new WP_Error('invalid_batch','诊断批次无效。',array('status'=>400));
}
// Anonymous beta diagnostics are untrusted input, never an authorization proof.
$ip = (string)($_SERVER['REMOTE_ADDR']??'unknown');
$bucket = 'dayu_color_rate_' . substr(hash_hmac('sha256',$ip,wp_salt('nonce')),0,32);
$count = intval(get_transient($bucket));
if ($count>=300) return new WP_Error('rate_limit','请稍后重试。',array('status'=>429));
set_transient($bucket,$count+1,10*MINUTE_IN_SECONDS);
$normalized = array();
foreach ($body['events'] as $event) {
if (!is_array($event) || !self::uuid($event['event_id']??null) || !self::uuid($event['session_id']??null)
|| !in_array($event['event']??'',self::EVENTS,true) || !in_array($event['source']??'',array('app','plugin'),true)
|| !is_string($event['version']??null) || strlen($event['version'])>32 || !preg_match('/^[0-9]+(?:\.[0-9A-Za-z_-]+){1,3}$/D',$event['version'])
|| !is_int($event['build']??null) || $event['build']<1 || $event['build']>999999999
|| !is_numeric($event['occurred_at']??null) || !is_finite((float)$event['occurred_at']) || abs((float)$event['occurred_at']-time())>366*DAY_IN_SECONDS) return new WP_Error('invalid_event','诊断事件无效。',array('status'=>400));
$normalized[] = array('event_id'=>strtolower($event['event_id']),'installation_id'=>strtolower($body['installation_id']),
'session_id'=>strtolower($event['session_id']),'client_version'=>substr($event['version'],0,32),
'client_build'=>intval($event['build']),'source'=>$event['source'],'event'=>$event['event'],
'fields_json'=>wp_json_encode(self::clean_fields($event['fields']??array()),JSON_UNESCAPED_UNICODE),
'occurred_at'=>gmdate('Y-m-d H:i:s',(int)$event['occurred_at']), 'received_at'=>gmdate('Y-m-d H:i:s'));
}
global $wpdb; $table=self::table(); $accepted=array();
foreach ($normalized as $row) {
// Idempotent event IDs permit bounded retry after an ambiguous connection loss.
if ($wpdb->get_var($wpdb->prepare("SELECT event_id FROM {$table} WHERE event_id=%s",$row['event_id']))) { $accepted[]=$row['event_id']; continue; }
if ($wpdb->insert($table,$row)===false && !$wpdb->get_var($wpdb->prepare("SELECT event_id FROM {$table} WHERE event_id=%s",$row['event_id']))) return new WP_Error('storage_failed','诊断存储失败,请稍后重试。',array('status'=>503));
$accepted[]=$row['event_id'];
}
return new WP_REST_Response(array('accepted'=>true,'event_ids'=>$accepted,'received_at'=>gmdate('c')),200,array('Cache-Control'=>'no-store'));
}
public static function cleanup() {
global $wpdb; $table=self::table();
$wpdb->query($wpdb->prepare("DELETE FROM {$table} WHERE received_at < %s",gmdate('Y-m-d H:i:s',time()-30*DAY_IN_SECONDS)));
}
public static function events($request) {
global $wpdb; $table=self::table(); $where='1=1'; $values=array();
foreach (array('build'=>'client_build','event'=>'event','installation'=>'installation_id') as $param=>$column) {
$raw=$request->get_param($param);$value = is_scalar($raw)?sanitize_text_field((string)$raw):'';
if ($value!=='') { $where.=" AND {$column}=%s"; $values[]=$value; }
}
$page=max(1,min(1000,intval($request->get_param('page'))));
$sql="SELECT event_id,installation_id,session_id,client_version,client_build,source,event,fields_json,occurred_at,received_at FROM {$table} WHERE {$where} ORDER BY received_at DESC LIMIT 50 OFFSET " . (($page-1)*50);
$rows=$wpdb->get_results($values?$wpdb->prepare($sql,$values):$sql,ARRAY_A);
return array('events'=>$rows?:array(),'page'=>$page,'retention_days'=>30);
}
public static function admin() {
if (!current_user_can('manage_options')) return;
self::ensure_schema(); global $wpdb; $table=self::table();
$request = new WP_REST_Request('GET');
foreach (array('build','event','installation') as $key) $request->set_param($key,is_string($_GET[$key]??null)?sanitize_text_field(wp_unslash($_GET[$key])):'');
$request->set_param('page',max(1,intval($_GET['paged']??1)));
$result=self::events($request);$manifest=self::manifest();
$devices=intval($wpdb->get_var($wpdb->prepare("SELECT COUNT(DISTINCT installation_id) FROM {$table} WHERE received_at >= %s",gmdate('Y-m-d H:i:s',time()-7*DAY_IN_SECONDS))));
echo '<div class="wrap"><h1>大鱼调色公测</h1><p>近7天报告设备:<strong>'.esc_html($devices).'</strong> · 诊断保留30天。匿名公测标识用于关联问题,不代表账号或设备授权。</p>';
echo '<h2>公测更新</h2><p>'.($manifest?'当前版本:'.esc_html($manifest['version']).'('.esc_html($manifest['build']).')':'尚未发布更新包').'</p>';
echo '<h2>诊断事件</h2><form method="get"><input type="hidden" name="page" value="dayu-color-beta">';
foreach (array('build'=>'构建号','event'=>'事件','installation'=>'完整报告标识') as $key=>$label) echo '<label>'.esc_html($label).' <input name="'.esc_attr($key).'" value="'.esc_attr($request->get_param($key)).'"></label> ';
echo '<button class="button">筛选</button></form><table class="widefat striped"><thead><tr><th>时间(UTC)</th><th>版本</th><th>报告标识</th><th>来源/事件</th><th>内容</th></tr></thead><tbody>';
foreach ($result['events'] as $row) {
echo '<tr><td>'.esc_html($row['occurred_at']).'<br>送达 '.esc_html($row['received_at']).'</td><td>'.esc_html($row['client_version'].' ('.$row['client_build'].')').'</td><td><code>'.esc_html($row['installation_id']).'</code><br>会话 '.esc_html(substr($row['session_id'],0,8)).'</td><td>'.esc_html($row['source'].' / '.$row['event']).'</td><td><pre style="white-space:pre-wrap;max-width:760px">'.esc_html(wp_json_encode(json_decode($row['fields_json'],true),JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE)).'</pre></td></tr>';
}
echo '</tbody></table><p>';
$base=array('page'=>'dayu-color-beta','build'=>$request->get_param('build'),'event'=>$request->get_param('event'),'installation'=>$request->get_param('installation'));
if ($result['page']>1) echo '<a class="button" href="'.esc_url(add_query_arg(array_merge($base,array('paged'=>$result['page']-1)),admin_url('tools.php'))).'">上一页</a> ';
if (count($result['events'])===50) echo '<a class="button" href="'.esc_url(add_query_arg(array_merge($base,array('paged'=>$result['page']+1)),admin_url('tools.php'))).'">下一页</a>';
echo '</p><p>仅包含产品版本、环境、阶段耗时、错误代码及本插件崩溃摘要,不接收素材、预设、硬件UUID或账户凭据。</p></div>';
}
}
Dayu_Color_Beta::boot();
+13
查看文件
@@ -0,0 +1,13 @@
# 大鱼调色 1.6.0(39)
胶片模拟新增“印片”页,包含Kodak2383、Kodak2393、Kodak2302 BW、Fuji3510、Fuji3513、Fuji3519、Fuji3521、AgfaCP30八种外观与独立强度,默认无。保留现有减色、晕光、辉光、暗角、颗粒、通道混合器、调色、蒙版、跟踪和相邻独立层。完整预设v6兼容v1–v5。
按用户要求删除MOEF作者/网站两行;输出ozml5.11 / Motion5.4.5格式。FCP新效果、全部还原和新加一级层的自动映射默认开启,主标题新增可点击的“更多插件访问 https://dayu.media”。FCP沿用模板默认的旧主效果也会跟随开启,手动关闭可保存并冷重开保持。
Apple Silicon,macOS14.6或更新。FCP12.4已验证;旧版FCP尚未实机覆盖,降低模板格式不等于保证所有旧版宿主兼容。
395项正式原生检查及独立恢复构建通过;四尺寸136项原版印片颜色函数对照通过,最大线性RGB绝对差0.000004828。完成八外观、独立印片层、100键蒙版跟踪、折叠/撤销重做、四段共400帧ProRes导出及冷重开检查。39版三组旧印片预设仅自动映射0→1,其余277值及完整自定义载荷保持;手动关闭/独立层开启的8668字节预设冷重开逐字节一致。
正式位置 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,团队B3W25FX5H5。APP实际编译源码 `e5affd3f097fc96f87f41be8e1a3f131ed01daeb`;APP公证 `5d74c04c-8a30-47e9-822d-4f616dfdee56` Accepted。当前包含正式APP及模板,不含用户媒体、LUT库或预设。安装包20项展开验包通过,本轮未再次运行系统安装器,APP已有独立正式安装及宿主验收。
安装包 `大鱼调色-1.6.0.pkg`,40,833,847字节;SHA-256 `13821631b5d54f1b9c1934c513a9cc7e92641208e20219839a63e23865f21cca`。PKG由Developer ID Installer签名、公证 `4716e3c7-8199-4dc1-940c-2376dd647e9b` Accepted,票据和Gatekeeper通过。
+15
查看文件
@@ -0,0 +1,15 @@
# 大鱼调色 1.6.1(44)
主 APP 改为深色产品介绍界面,发布地址 https://dayu.media 位于顶部。展示完整调色、LUT、胶片和局部蒙版/叠层特色。
启动自动检查并提交 PluginKit 注册,核对实际内嵌组件路径。成功后在状态卡显示清晰的3→2→1秒倒计时再退出;查看功能介绍可保留窗口。打开 FCP 检查会保留窗口,由用户确认画面和调节后点击“已确认正常,退出”。注册状态与宿主功能确认分开。
按用户要求关闭外层 APP 沙盒。保留 Developer ID、Hardened Runtime、可信时间戳、公证及票据。本轮未加入登录、授权、加密、自动更新或后端模块,调色/渲染/Metal/模板未改。
Apple Silicon,macOS14.6或更新。正式安装位置 /Library/Plug-Ins/FxPlug/大鱼调色.app,主/服务ID为com.dayu.color、com.dayu.color.XPC,团队B3W25FX5H5。实际编译源码90d6022520c59ea34f42b511daee85ac2936cfd9。
正式路径395项原生检查通过;已有登记、缺失登记重建、精确唯一路径回读、3秒退出、保留介绍和重复检查通过。FCP实际使用按主APP指引由用户确认,本说明不将登记成功等同渲染验收。安装包已展开核验,本轮未再次运行系统安装器。
APP公证23d7b69c-5585-435d-ad07-faee061e0ccb Accepted;PKG公证7315225d-a350-4c65-9e87-5784035ea018 Accepted。最终PKG由Developer ID Installer签署,签名、票据及Gatekeeper通过。
安装包 大鱼调色-1.6.1.pkg,40,854,422字节;SHA-256 `d075373d672b8f0146b98f3151c9f74cd6b97e8a1081e0d0796f53af7f291da0`。包含正式APP和既有FCP模板,不含用户媒体、LUT库或预设。
+19
查看文件
@@ -0,0 +1,19 @@
# 大鱼调色 1.7.0(45)公测
加入主 APP 自动更新检查与云端公测诊断。启动时并行检查插件注册和新版本;注册成功且检查结束后显示3秒退出倒计时,发现更新则保留窗口。完整 PKG 更新由用户确认下载,验证 SHA-256、大小、签名团队、公证评估、产品/版本/安装位置及 FCP 模板;保存并退出 FCP/Motion 后打开系统安装器。
公测诊断默认开启,可在主 APP 随时关闭。主 APP 与插件共用随机报告标识,后台限量排队、离线重试、事件去重。采集版本和系统环境、插件/检查器/Metal 管线/首次渲染耗时、错误代码、疑似阻塞及本插件崩溃摘要;不上传素材、LUT、预设、账号、硬件 UUID、用户路径或原始崩溃文件。云端保留30天,管理页面需管理员登录。
本轮用于收集偶发 FCP 加载卡死证据,保留既有调色及宿主回调逻辑,未宣称修复卡死。暂未加入登录、授权或业务加密模块。共享会员后台不变,公测使用独立产品路由与日志表。主 APP 启动时检查更新,插件使用期间不会自动替换正在运行的组件。
要求 Apple Silicon、macOS 14.6 或更新。固定安装位置 `/Library/Plug-Ins/FxPlug/大鱼调色.app`;主/插件 ID 为 `com.dayu.color`、`com.dayu.color.XPC`。APP 实际编译源码 `a0f37578f73d7f8faa872d9a81009e2d6586a858`。Metal 与模板 SHA 与1.6.1一致。
395项原生检查通过;正式路径 UI、诊断关闭/恢复/手动发送、3秒退出、FCP 12.4 界面与曝光调整/还原通过,云端已实际收到插件首次渲染记录。另有66项更新/隐私/完整签名安装包检查、20项后端契约检查,以及线上接收与去重验证。单次本机加载正常不能证明偶发卡死已经解决。
APP 公证 `777a5c05-4936-4b14-b8e8-0c789c1df05c` Accepted;PKG 公证 `04082e26-663d-4408-85da-63736d079aa2` Accepted;签名、票据、Gatekeeper 和展开验包通过。本轮正式 APP 已直接安装及宿主验收,PKG 已验包,未重复执行系统安装脚本。
发行包 `大鱼调色-1.7.0.pkg`,40,898,751字节;SHA-256 `a3578ee95aa7333e64d556061173fb73a42be0e45442ae844c94147b421d34bb`。
公测下载:https://dayu.media/wp-content/uploads/dayu-color-beta/updates/dayu-color-1-7-0-45.pkg
日志后台:https://dayu.media/wp-admin/tools.php?page=dayu-color-beta (管理员)。反馈用户可附主 APP 显示的报告标识和发生时间,便于关联同一次加载过程。
+2 -2
查看文件
@@ -76,8 +76,8 @@ def main():
appearance=dict(title="大鱼调色", subtitle="适用于 Final Cut Pro 与 Motion 的原生调色效果",
badgeImage=str(ROOT / "design/dayu-color-app-icon-v1.png"), authorContact="https://dayu.media"),
pages=dict(welcome="安装大鱼调色 " + version + ",包含原生 FxPlug 调色插件和 Final Cut Pro 效果入口。",
readme="系统要求:macOS 14.6 或更高版本。本发行构建适用于 Apple Silicon Mac。\n\n安装内容:\n/Library/Plug-Ins/FxPlug/大鱼调色.app\n登录用户“影片/Motion Templates/Effects/大鱼调色”中的效果模板与预览图。\n\n重新打开 Final Cut Pro 后,在“效果 → 大鱼调色”中应用;Motion 中可选择原生滤镜。\n本安装包不包含用户自选 LUT、预设或媒体文件。",
license="", conclusion="大鱼调色已安装。请完成插件 APP 的系统提示,随后退出并重新打开 Final Cut Pro / Motion。\n如果效果未出现,可在访达打开 /Library/Plug-Ins/FxPlug/大鱼调色.app 后再次启动宿主。"))
readme="系统要求:macOS 14.6 或更高版本。本发行构建适用于 Apple Silicon Mac。\n\n安装内容:\n/Library/Plug-Ins/FxPlug/大鱼调色.app\n登录用户“影片/Motion Templates/Effects/大鱼调色”中的效果模板与预览图。\n\n重新打开 Final Cut Pro 后,在“效果 → 大鱼调色”中应用;Motion 中可选择原生滤镜。\n本安装包不包含用户自选 LUT、预设或媒体文件。\n\n公测诊断默认开启,可在主 APP 关闭。仅发送版本、系统环境、加载耗时与本插件错误摘要到 dayu.media;不发送素材、预设或账号,保留30天。主 APP 启动时检查更新,新版由用户确认安装。",
license="", conclusion="大鱼调色已安装。主 APP 自动注册插件,成功后显示3秒倒计时退出。可点击“打开 FCP 检查”保留窗口,并在宿主中实际检查效果。"))
manifest_path = CACHE / "dayu-color-package-manifest.json"
manifest_path.write_text(json.dumps(manifest, ensure_ascii=False, indent=2) + "\n")
command = ["/usr/bin/python3", str(skill / "package_fxplug.py"), "--repo", str(forge), "--manifest", str(manifest_path)]
+18 -6
查看文件
@@ -1,21 +1,33 @@
# 大鱼调色
原生 FxPlug 4 调色器,当前正式安装版本 **1.5.0(34)**。唯一安装位置为 `/Library/Plug-Ins/FxPlug/大鱼调色.app`;Final Cut Pro 中从“效果 → 大鱼调色”添加。
原生 FxPlug 4 调色器,当前正式安装版本 **1.6.1(44)**。唯一安装位置为 `/Library/Plug-Ins/FxPlug/大鱼调色.app`;Final Cut Pro 中从“效果 → 大鱼调色”添加。
交接与恢复入口:[大鱼调色FxPlug4交接.md](大鱼调色FxPlug4交接.md)。
主 APP 已改为深色产品介绍界面,发布地址置顶;启动自动注册并回读系统登记,成功后在状态卡显示3秒倒计时退出。查看介绍或打开FCP检查可保留窗口;FCP中的实际效果由用户确认。外层沙盒按用户要求关闭,登录、授权、加密、自动更新及后端暂未接入。见[本轮说明](research/MainApp1.6.1.md)与[主APP验证](verification/MainApp1.6.1.json);后续账号工作仍参考[原交接](大鱼调色主APP开发交接.md)。
## 胶片模拟与通道混合器
新增可重复的胶片模拟和通道混合器,现有调色、蒙版、区域跟踪和相邻叠层保留。每个新工具都有独立眼睛、折叠、复位、蒙版、数量标记和“再加一层”;新增层从默认值开始。
通道混合器按红、绿、蓝输出分组,每个输出有三个输入系数,并提供保持亮度、保持饱和度和混合强度。胶片包含减色、晕光、辉光、颗粒、暗角五组,各自启停;颗粒支持精确帧时间、1–5帧保持和固定种子。默认保持中性,旧工程缺省不改变画面。
本机Color Finale 2.16.2的相关数学已单独取证并对照,产品独立构建,不加载原版APP或原版二进制。新阶段位于既有显示域链之后;减色/颗粒沿用本工程sRGB边界,其余在线性域。活跃减色沿用原核的0–1限幅;不宣称与原版全部ACES管理路径完全等价。原版ACES输出中的八种印片外观未纳入本版五组处理。
本机Color Finale 2.16.2的相关数学已单独取证并对照,产品独立构建,不加载原版APP或原版二进制。新阶段位于既有显示域链之后;减色/颗粒沿用本工程sRGB边界,其余在线性域。活跃减色沿用原核的0–1限幅;不宣称与原版全部ACES管理路径完全等价。1.6.0追加第六页“印片”:Kodak2383、Kodak2393、Kodak2302 BW、Fuji3510、Fuji3513、Fuji3519、Fuji3521、AgfaCP30,支持独立强度,默认“无”。以明确的Rec.709线性↔AP1/ACEScct边界接入原版LMT颜色函数;不代表原版完整CMS/ODT链。
完整预设升级为v5,兼容旧版。纯通道矩阵和减色可导出Cube;活跃晕光、辉光、颗粒、暗角和蒙版不能保存为静态Cube,导出时说明原因。
完整预设升级为v6,兼容v1–v5。纯通道矩阵、减色和印片可导出Cube;活跃晕光、辉光、颗粒、暗角和蒙版不能保存为静态Cube,导出时说明原因。
349项原生检查、四种尺寸184项原版组件对照通过。FCP12.4验证旧234参数、LUT路径、蜘蛛盘和全部287键蒙版载荷不变;新增层默认值、蒙版数量、折叠、删除撤销/重做、冷重开通过。1920×1080正式导出验证“两帧保持”,组合预设8987字节及颗粒预设8420字节重开前后逐字节一致。见[研究与边界](research/ColorFinaleFilmMixer.md)、[组件对照](verification/FilmMixerReference.json)、[宿主验收](verification/HostFilmMixer1.5.0.json)。
FCP新实例、全部还原及新加一级层的自动色调映射默认开启;旧独立一级层的缺省关闭保持;FCP沿用模板默认值的旧主效果会跟随为开启,新版中手动关闭后可独立保存并在冷重开后保留。在主标题区增加可点击的“更多插件访问 https://dayu.media”。
## 1.6.0 八种印片与简洁模板
正式安装395项原生检查和四尺寸136项原版印片颜色函数对照通过,最大线性RGB绝对差0.000004828。FCP12.4逐个选择八种外观、独立印片层、100帧椭圆蒙版跟踪、折叠计数、删除/撤销/重做通过;彩色、黑白、蒙版叠层三段ProRes共300帧完整解码,黑白RGB通道完全一致。八外观候选36冷重开后8474、8456、32554字节三份预设分别逐字节一致;八外观候选36升级时276个用户参数及既有路径/蜘蛛盘/蒙版载荷保持;最终39版三组预设仅自动映射默认0→1,其余277项值及全部载荷保持。
按用户要求移除MOEF作者和网站两行,已有实例与新实例均已确认。模板采用真实原生样本支持的ozml5.11 / Motion5.4.5格式,保留自定义检查器和混合。FCP12.4加载和渲染通过;低版本FCP未实机测试,程序仍要求Apple Silicon / macOS14.6或更新。全局技能检查器不支持5.11,原始guard报告保留;项目原生字段验证与宿主验收分别记录。
见[印片来源与适配](research/PrintLooks1.6.0.md)、[原版对照](verification/PrintLooksReference.json)、[正式宿主验收](verification/HostPrintLooks1.6.0.json)、[模板兼容验证](template/verification/Compatibility.json)。
## 蒙版折叠与标题标记
蒙版面板随所属模块一起折叠,展开后恢复已有控件。标题栏蒙版按钮旁显示已添加的蒙版数量,无蒙版时隐藏标记;原模块与独立叠层分别计数,已停用的蒙版也计入数量。标记在折叠后仍可见,不改变蒙版和轨迹。
@@ -32,7 +44,7 @@
前段已改为 **输入转换 → 工作空间一级调色 → 输出转换**,复用大鱼 CST 仓库的固定源码与原生 GPU 数学。曲线和色域独立选择,工作空间统一供一级调色及输出使用,不经相机还原 LUT 近似。
新实例输入为 Sony S-Log3 / S-Gamut3.Cine,输出为 Gamma 2.4 / Rec.709,工作空间为 DaVinci Intermediate / DaVinci Wide Gamut,自动色调映射关闭。请按素材实际编码选择相机输入;不会根据片段或曲线名称猜测、覆盖手选色域。一级调色包含曝光、色彩平衡、饱和度、对比度与轴心、分区影调、黑白点、趾部/肩部压缩。输入、工作空间和输出已合并到一级调色卡片,四个旁路选项移除,由一级眼睛统一启停。一级白平衡改用原 CST 色轮,支持精细拖动、方向键微调、双击复位,以及可见的“复位”按钮;按钮只重置一级白平衡。
新实例输入为 Sony S-Log3 / S-Gamut3.Cine,输出为 Gamma 2.4 / Rec.709,工作空间为 DaVinci Intermediate / DaVinci Wide Gamut,自动色调映射默认开启。请按素材实际编码选择相机输入;不会根据片段或曲线名称猜测、覆盖手选色域。一级调色包含曝光、色彩平衡、饱和度、对比度与轴心、分区影调、黑白点、趾部/肩部压缩。输入、工作空间和输出已合并到一级调色卡片,四个旁路选项移除,由一级眼睛统一启停。一级白平衡改用原 CST 色轮,支持精细拖动、方向键微调、双击复位,以及可见的“复位”按钮;按钮只重置一级白平衡。
CST 后的基础调整、HSL、曲线、色轮、五层风格 LUT 等仍属于既有显示域调色链。保留肤色保护、三原色、色阶、黑白、自动调色、吸管、预设和 Cube 导出。Cube 导出包含 CST、一级调色(含白平衡色轮)、蜘蛛盘及其它已启用的逐像素颜色操作。折叠不影响导出,眼睛关闭的模块不计入;纹理、清晰度、去朦胧和逐画面统计不写入 LUT。导出为 33³ Cube,应应用于与导出时相同编码的输入,避免重复叠加 CST/一级处理。
@@ -52,7 +64,7 @@ LUT 缩略图浏览器使用宿主的独立可调整窗口:拖动标题栏移
十四个模块标题均有“添加蒙版”和“再加一层”。新增工具紧接点击的原工具或新增工具插入,从本工具的初始化参数开始,拥有独立启停、折叠、复位、删除、LUT 和蒙版;不会复制原层当前设置。新增一级采用 Rec.709/Gamma 2.4 同域输入输出,新增肤色保护强度为零。
蒙版包括椭圆、矩形、钢笔、线性渐变、HSL 和亮度选区,支持相加、减去、相交、反转、羽化和强度。矩形、椭圆和闭合钢笔区域可正向、反向、双向或单帧跟踪。算法从“大鱼调色盘”固定源码适配,随本产品独立构建;不依赖安装父插件。完整预设 v5 保存新增工具、蒙版和逐帧轨迹,兼容旧预设。空间蒙版不能导出到 Cube,导出时会提示。
蒙版包括椭圆、矩形、钢笔、线性渐变、HSL 和亮度选区,支持相加、减去、相交、反转、羽化和强度。矩形、椭圆和闭合钢笔区域可正向、反向、双向或单帧跟踪。算法从“大鱼调色盘”固定源码适配,随本产品独立构建;不依赖安装父插件。完整预设 v6 保存新增工具、蒙版和逐帧轨迹,兼容旧预设。空间蒙版不能导出到 Cube,导出时会提示。
蒙版检视器采用13pt参数文字和数值、32–36pt按钮、独立整行滑杆及两列跟踪操作。钢笔菜单直接进入绘制态,可点击放点、拖出曲柄、点首节点/Return/“完成绘制”闭合,Esc/取消保留原路径;支持重画、Delete回退和即时预览。跟踪改进实际路径搜索边界、300点特征、亚像素精炼和21×21光流,运动分析按显示比例限制到1280×720,4K细纹先低通再缩小,调色渲染和输出分辨率保持原设置。
@@ -91,6 +103,6 @@ LUT 缩略图浏览器使用宿主的独立可调整窗口:拖动标题栏移
正式发行包由 PKG 工坊技能生成,包含 APP 与 FCP 模板,不含用户 LUT、预设或媒体。安装与发布证据分别保存在 [Package.json](verification/Package.json) 和 [Release.json](verification/Release.json);以其中记录的版本和成功状态为准。
正式发行包:[大鱼调色-1.5.0.pkg](../发行包/大鱼调色-1.5.0.pkg);APP与PKG均已签名、公证、粘附票据并通过Gatekeeper,20项展开验包通过。发行标签 `v1.5.0-film-mixer-20261102`,上传与下载核验结果以 [Release.json](verification/Release.json) 中匹配本版的记录为准。历史[1.4.3 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.4.3-mask-fold-20261102)及更早发行包、标签和验收记录保留。
当前发行包:[大鱼调色-1.6.1.pkg](../发行包/大鱼调色-1.6.1.pkg),主APP与注册验证见[1.6.1记录](verification/MainApp1.6.1.json)。 [1.6.1 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.6.1-main-app-20261102)已发布(Release374 / 附件19),草稿和正式链接完整下载均核对40,854,422字节和SHA-256一致;发行标签304文件逐字节独立恢复、102个APP/工程文件与实际编译节点一致,已清理本轮生成副本。FCP实际使用已由用户于2026-11-02明确确认正常,见[用户验收记录](verification/HostUserConfirmation1.6.1.json)。历史发行包:[大鱼调色-1.6.0.pkg](../发行包/大鱼调色-1.6.0.pkg)。当前安装、公证、验包与Release下载结果分别以[Delivery](verification/Delivery.json)、[Package](verification/Package.json)、[Release](verification/Release.json)为准。[1.6.0 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.6.0-print-looks-20261102)已发布(Release373 / 附件18),草稿正常浏览器下载和发布后完整下载均校验40,833,847字节及SHA-256一致。标签296个文件远端逐字节恢复核验通过,本轮恢复/下载及生成APP副本已清理,见[标签恢复](verification/PrintLooksReleaseRecovery.json)与[清理记录](verification/PrintLooksCleanup.json)。历史[1.5.0 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.5.0-film-mixer-20261102)及更早标签和发行包保留。
1.3.1 的历史验收包含 Sony 默认、可见复位、浮动浏览器、系统窗口缩放、两种布局、最近排序与关闭重开。原生检查单独覆盖几何/布局持久化和鼠标事件;当时自动化没有独立确认自由标题栏/边缘拖动。1.4.0 另在独立合成工程中完成上文的宿主检查,用户确认中心拖动后保留其试调状态。
+28 -2
查看文件
@@ -2,7 +2,29 @@
当前交接:[大鱼调色FxPlug4交接.md](大鱼调色FxPlug4交接.md)。
## 当前1.5.0(34):胶片与通道混合器
## 当前1.6.1(44):主 APP 界面与自动注册
远程 https://dayu.media/git/dayu/dayu-color.git ,main。实际编译源码 `90d6022520c59ea34f42b511daee85ac2936cfd9`,签名团队B3W25FX5H5,唯一正式位置 `/Library/Plug-Ins/FxPlug/大鱼调色.app`。主/服务Bundle ID维持com.dayu.color、com.dayu.color.XPC,Apple Silicon / macOS14.6或更新。Xcode27.1、FxPlugSDK4.3.5;无LFS或子模块。
主界面、显式注册、精确路径回读和3秒倒计时通过;独立用户FCP确认单独记录,不把登记当作渲染验收。调色/Metal/模板未改,395项正式原生检查通过。证书、私钥和公证凭据需独立恢复,不在Git中;准备本机签名身份与profile后用tools/deliver.py进行Release构建和正式交付。
通过克隆仓库并 `git switch --detach 90d6022520c59ea34f42b511daee85ac2936cfd9` 可恢复实际编译节点;`verification/Delivery.json`、MainApp1.6.1.json、MainAppRecovery1.6.1.json分别记录安装、UI/登记及远端恢复。正式PKG `大鱼调色-1.6.1.pkg`,40,854,422字节,SHA-256 `d075373d672b8f0146b98f3151c9f74cd6b97e8a1081e0d0796f53af7f291da0`;PKG公证7315225d-a350-4c65-9e87-5784035ea018 Accepted,20项展开检查通过。未再次执行系统安装器。发行标签 `v1.6.1-main-app-20261102` 对应完整提交 `5d9a4ad7072c1d30f9f8d589719939e2efbcd53c`,[Release374](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.6.1-main-app-20261102) / 附件19已发布;正常浏览器草稿下载及发布后的完整下载均核对大小、SHA-256一致,附件URL见verification/Release.json。独立恢复304文件逐字节核对、full/strict fsck通过,102个APP/工程文件与实际编译节点90d6022520c59ea34f42b511daee85ac2936cfd9一致。临时回滚APP、下载和恢复副本已清理,历史发行包及用户QA资料保留,见MainAppCleanup1.6.1.json;FCP实际使用已由用户于2026-11-02明确回复“已确认正常”,详见verification/HostUserConfirmation1.6.1.json;APP、安装包及发行标签未改变。
## 历史1.6.0(39):八种印片、低版本模板与默认映射
远程 `https://dayu.media/git/dayu/dayu-color.git`,main;发行标签 `v1.6.0-print-looks-20261102`。APP实际编译源码 `e5affd3f097fc96f87f41be8e1a3f131ed01daeb`,公证 `5d74c04c-8a30-47e9-822d-4f616dfdee56` Accepted。APP和内部XPC固定ID、唯一正式路径与签名团队不变。正式395项自检、独立原版136项印片对照、FCP12.4八外观/叠层/蒙版100键跟踪/三个完整导出与冷重开通过,见 `verification/HostPrintLooks1.6.0.json`。
完整八份65³印片数据、独立导入器、原生Metal/CPU采样和矩阵均在Git,无LFS/子模块;恢复不依赖ColorFinale安装或REA缓存。完整旧1296字节GPU前缀保留,预设v6读取v1–v5,新参数缺省中性。原版CI半透明链与产品预乘合同的适配边界保存在 `research/PrintLooks1.6.0.md` 和完整对照报告中。
FCP新效果、全部还原和新加一级层自动映射默认开启。宿主参数保留历史注册默认0,新MOEF显式value1/default0,保持原生参数存储合同;新一级层显式保存1,旧独立层缺省0。FCP沿用模板默认的旧主效果实测也采用开启,三份旧预设仅此默认0→1,其余277值及所有自定义载荷保持;不宣称模板默认改变后旧主效果完全逐字节不变。手动关闭后冷重开保持。主标题可点击“更多插件访问 https://dayu.media”。
MOEF去掉作者/网站Rig,输出5.11 / Motion5.4.5,有真实本机模板字段证据。全局技能检查器仅因不识别5.11停止,未伪造通过;项目级验证及当前FCP12.4加载/渲染通过。旧FCP未实机验证,APP最低Apple Silicon/macOS14.6。恢复执行 `python3 tools/build_template.py --overwrite` 和 `python3 tools/verify_template.py`;固定发布模板与正式安装资源逐字节一致。
远端编译节点已独立恢复294文件、全字节比较、full/strict fsck、Release构建和393检查;低版本模板重建摘要完全一致,见 `verification/PrintLooksRecovery.json`。最终标签恢复与安装包Release下载见 `verification/PrintLooksReleaseRecovery.json` / `Release.json`。用户完整预设、FCP资源库和导出仅在本机fcp-qa缓存,不在Git或PKG。PKG仅生成并展开验包,未再次执行系统安装器;正式APP已有独立安装和宿主验收。
恢复新机器时正常登录大鱼站取得相同权限凭据,克隆后 `git switch --detach <所需完整提交SHA>`,按Xcode/FxPlug SDK构建。签名证书和私钥须独立恢复,Git不能替代;当前证据以发布记录的标签SHA和编译SHA为准。
## 历史1.5.0(34):胶片与通道混合器
正式路径 `/Library/Plug-Ins/FxPlug/大鱼调色.app`;Bundle ID `com.dayu.color` / `com.dayu.color.XPC`。实际编译源码 `06d531c443b0bb2f179022a4e64148394f5d0690`;APP公证 `164abf2b-4e67-4504-b72a-04122da9e381` Accepted,签名、票据和Gatekeeper通过。安装与启动从唯一正式位置执行,FCP12.4已验收,记录见 `verification/Delivery.json` 与 `verification/HostFilmMixer1.5.0.json`。
@@ -10,7 +32,7 @@
远端独立clone已完成Release构建及349项检查,四种尺寸原版组件对照184项通过。组件证据、域/顺序及限制见 `research/ColorFinaleFilmMixer.md`。当前用户媒体、完整预设、FCP资源库和验收导出只在本机,不进入仓库或安装包。安装包与Release元数据见本轮Package/Release记录。
正式PKG `../发行包/大鱼调色-1.5.0.pkg`,14,380,104字节,SHA-256 `3ecabc7a8bfd675b228a5f00016aa17a35b65b544055e57793ec3bff3d7e0294`;PKG公证 `05f849da-5567-4351-9556-742d17b95723` Accepted,签名、票据、Gatekeeper与20项展开验包通过。本轮未再次运行系统安装器,正式APP已有独立安装和宿主验收。发行标签 `v1.5.0-film-mixer-20261102`;发布与全量下载结果见匹配本版的 `verification/Release.json`。
正式PKG `../发行包/大鱼调色-1.5.0.pkg`,14,380,104字节,SHA-256 `3ecabc7a8bfd675b228a5f00016aa17a35b65b544055e57793ec3bff3d7e0294`;PKG公证 `05f849da-5567-4351-9556-742d17b95723` Accepted,签名、票据、Gatekeeper与20项展开验包通过。本轮未再次运行系统安装器,正式APP已有独立安装和宿主验收。发行标签 `v1.5.0-film-mixer-20261102` 对应 `85b6590944c4fb64825cf45f61c5280d4ffaa824`;[Release372](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.5.0-film-mixer-20261102) / 附件17已经草稿正常网页下载及发布后完整下载,大小与SHA-256一致,仓库可见性不变。远端发行标签264文件逐字节核对及full/strict fsck通过,见 `verification/FilmMixerReleaseRecovery.json`;该标签与完成Release构建及349项检查的恢复节点之间,程序源码未改变,仅交付脚本的失败诊断记录改进及文档/验证记录更新。恢复clone、独立构建目录和下载副本已清理,唯一正式APP及历史安装包保留,见 `verification/FilmMixerCleanup.json`。
## 历史 1.4.3(33):蒙版折叠与数量标记
@@ -272,3 +294,7 @@ python3 Packaging/build_pkg.py --pkg-forge-repo /实际/PKG工坊源码目录 --
## 蒙版、跟踪与可重复工具的文档交接(2026-11-01)
文档整理前 main 为 `bbdd47d1d74e241f1f144bb2c245204e86973b3f`。交接标签 `handoff-mask-tracking-tools-20261101` 保存最新 `大鱼调色FxPlug4交接.md` 及 `research/MaskTrackingAndToolStack.md`,区分正式 1.3.1(19)与尚未实现的多个独立 HSL、每实例蒙版和跟踪。本文档提交未重新构建、安装或发布 APP/PKG,不移动原发行标签;父级“大鱼调色盘”只读参考。接续时保护用户当前窗口、布局、LUT 选择和工程。
正式PKG `大鱼调色-1.6.0.pkg`,40833847字节,SHA-256 `13821631b5d54f1b9c1934c513a9cc7e92641208e20219839a63e23865f21cca`;PKG公证 `4716e3c7-8199-4dc1-940c-2376dd647e9b` Accepted,签名、票据、Gatekeeper和20项展开验包通过。发行包未再次运行系统安装器。
最终[Release373](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.6.0-print-looks-20261102) / 附件18已发布并回读确认。标签 `v1.6.0-print-looks-20261102` 对应完整SHA `0cc51149a6f21ebe09465b4fd7130451bedd57bb`;草稿正常浏览器下载与发布后完整下载均校验40,833,847字节及SHA-256一致。发行标签296文件逐字节恢复和full/strict fsck通过,与实际编译SHA的程序源码完全一致。恢复clone、独立构建和下载副本清理完成;已知相关位置仅正式39版APP,历史发行包和私人验收数据保留。记录见 `verification/Release.json`、`ReleaseDraftDownload1.6.0.json`、`PrintLooksReleaseRecovery.json`、`PrintLooksCleanup.json`。
+33
查看文件
@@ -0,0 +1,33 @@
# 主 APP 1.6.1(44)
本轮只改现有主 APP 的产品介绍、系统插件注册及退出体验。按用户最新说明,发布地址位于最顶部,关闭外层 APP 沙盒;登录、授权、加密、自动更新及后端均未接入。调色、渲染、参数、Uniform、预设、Metal 和 FCP 模板保持原样。
## 最终界面与交互
沿用 Objective-C/AppKit、Nib 连线和手动内存管理。采用 standard 档原生交互,深色静态渐变、圆角彩色卡片和胶囊按钮呼应参考图。比较单列介绍、左右双栏、状态+使用指引+双列特色三种结构后,选择第三种:顶部可点击的发布地址 https://dayu.media,随后产品名称/版本、插件注册与宿主检查,最后四张完整调色、LUT、胶片、蒙版叠层特色卡。默认920×850,最小760×620,纵向滚动。
每次启动:检查内嵌组件 → 提交注册 → 系统回读确认。成功后在注册卡片内清晰显示3→2→1秒倒计时并退出,取消了旧版底部难以看到的提示。查看介绍/⌘I取消本次自动退出;⌘R可重新检查,工作期间防止重复提交;⌘W关闭窗口、⌘Q退出。失败时保留窗口和重试入口。
“打开FCP检查”会保留本窗口,并按Bundle ID打开Final Cut Pro。用户在FCP内将大鱼调色应用到片段,确认画面与调节正常后,可点击“已确认正常,退出”。系统注册成功与宿主功能确认分开记录;自动化不代替用户点击确认。Motion也有明确入口,覆盖正式及历史两种宿主Bundle ID。
## 系统登记与权限
外层AppDelegate拥有唯一注册状态:checking → registering → ready/failed。PluginKit操作在后台队列,UI在主线程。先验证精确内嵌组件的Bundle ID、当前构建号、FxPlug协议及登记版本1.1,再向/usr/bin/pluginkit提交独立路径参数;查询返回的标识/协议/完整路径必须匹配。1.1是登记协议版本,不是APP版本。不使用shell字符串、不需管理员提权、不改变其他插件的用户选择。
40/41候选发现沙盒允许注册却拒绝CLI的PKDiscoverAll查询,即使不带-A也会失败,不能把它解释为“插件未注册”。用户随后明确允许关闭沙盒。最终移除主APP的app-sandbox entitlement,查询可直接回读;不采用42候选的应答降级。内嵌服务原本未启用该沙盒,Developer ID、Hardened Runtime、可信时间戳、公证、票据及Gatekeeper要求保持。
本机诊断写入 ~/Library/Application Support/com.dayu.color/Registration.json,记录登记应答、实际路径、版本、进程、退出原因及用户确认,不联网、不含凭据。--show-introduction可保留介绍,仍执行真实注册流程。
## 视觉与无障碍
使用原生按钮、可访问文本、键盘快捷键、焦点环和状态播报。不使用透明采样、模糊、着色器或装饰性动画;增强对比度加粗边界,进度采用系统控件。实际测试、未覆盖的VoiceOver/系统显示选项及暂定评分以verification/MainApp1.6.1.json为准,不仅凭截图宣称90分质量。
## 来源、身份与交付
只读参考用户指定的 https://dayu.media/git/dayu/fcpx-qwen3-asr.git ,提交113069c74aff935db2082b5bcd8e1aa47fe1fbf2中的ContentView.swift、LicenseViewModel.swift;借鉴配色和层级,没有引入其会员、计费或识别业务代码。
唯一正式路径 /Library/Plug-Ins/FxPlug/大鱼调色.app;主/服务Bundle ID为com.dayu.color、com.dayu.color.XPC,版本同步1.6.1(44)。实际编译源码90d6022520c59ea34f42b511daee85ac2936cfd9。40/41/43是本轮定位或界面候选,42未安装,均不发布安装包;历史已发布版本及用户验收媒体/预设保留。
APP签名、公证、票据、正式安装、自检见verification/Delivery.json和InstalledSelfTest.json;主界面/注册验证见MainApp1.6.1.json;安装包、Release及独立恢复见Package.json、Release.json和MainAppRecovery1.6.1.json。以各记录的实际状态为准,不将系统登记等同于用户已确认宿主功能。
2026-11-02:用户针对正式1.6.1(44)在FCP中应用插件、检查画面和调节的验收问题明确回复“已确认正常”。本轮宿主用户验收已完成,证据见verification/HostUserConfirmation1.6.1.json。此后仅补录验收文档,不重编译、增加构建号或重发安装包。
+61
查看文件
@@ -0,0 +1,61 @@
# 八种印片外观:1.6.0接续
2026-11-02。用户补充明确纳入八种印片外观,接续已交付1.5.0(34);基线main `e7fa8e6cf5690395272cbb76d7698dba77883b01`,正式版在开发期间保留。
## 参考取证
本机Color Finale 2.16.2(625),RenderingEngine SHA `32dca93459347e5ad363cb145d0ccf84b933b2045eee2c9535676a01744b84e3`,GradeKit SHA `e868a8c6df64bf03b7c24af5657c5ac7a2259a1943dfe06e01dbb7881df018a3`。REA/Ghidra12.1.4只读分析,两个会话均已关闭。快照在本机ColorResearch的 `dayu-print-rendering-snapshot-20261102.json` / `dayu-print-gradekit-snapshot-20261102.json`,原版运行探针和导出留在同目录的 `dayu-film-mixer-20261102/print-reference`。
- 资源装载与binary16转RGBA32:`ev_2963c6285fc85f3255d57d56657e98c3a81446bd0d0cafa5046d6298b84af7cb`;65³红轴最快。独立解码后八份RGBA32全部与原版 `cubeData` 逐字节一致,摘要见 `PrintLooksResources.json`。移入产品的只有重新封装的数值数据,没有原版可执行文件、framework或shader。
- 原版LMT processor:`ev_64067f2914fc23f8e1e2a47a9a272076b4c7842907dfde08a6308de87d46904e`;Metal AIR `FTAcesLMT` 用0–1限幅、六分支四面体插值,保留预乘alpha。
- 顺序:`ev_b38658366c168d4336e0998f030a8024b73f79119b764eff1df82fc822118462`,stack转换→LMT→ODT;stack曲线合同 `ev_9993ec73114bb2de791e5ddb43bc422ad4666b34e40dd0d2d9e2326ddb8ba27e`。
- 默认工作空间明确为ACEScct:`ev_7f30f36b78c55e71b807e378fd6b53e6d0f75db2123160d35800b6b60dcf788b`。ACEScc仅是未指定时的旧回退,不替代当前默认。
- `inspect_colorfinale_print --matrix` 通过原版FTColorSpaceFilter核对Rec.709线性↔ACEScg(AP1/D60)矩阵,白点往返为1;Core Image上下方向另由输出对照控制。
## 接入合同
在胶片五处理之后、全胶片mix和蒙版之前追加印片点阶段。沿用本工程显示链宿主线性Rec.709边界,转换AP1/D60→ACEScct→原LMT四面体采样→ACEScct解码→线性Rec.709;按印片强度混合,再沿用总强度与原蒙版。这是独立模块接入,不将原版任意ACES ODT或完整CMS偷偷移入旧链。
新增第六页“印片”,默认无,八项Kodak2383/2393/2302 BW、Fuji3510/3513/3519/3521、AgfaCP30;旧参数、1.5.0的1296字节前缀及颗粒时间位置保留。预设v6继续读旧版本,新参数缺省中性,独立层默认无。印片是逐像素变换,可写入静态Cube;空间、时间和蒙版限制继续保留。
1.6.0候选阶段渲染和模板已经编译。393项原生检查全部通过,含既有349项及八种印片资源/输出、强度/眼睛/总混合精确旁路、独立两层归档、蒙版和Cube格点对照。四尺寸64×48、63×47、1×17、17×1共136项原版颜色函数对照通过,固定容差0.0001,最大线性RGB绝对差0.000004827976;记录 `verification/PrintLooksNative.json`、`PrintLooksReference.json`。远端节点 `ab7cb759e57cc9c2a4725426bced67af55155654` 已独立恢复280文件、全字节比较/full-strict fsck、Release构建及393检查通过,见 `PrintLooksRecovery.json`。
透明度边界已单独取证:原版FTColorSpaceFilter将RGB当直色值转换,LMT processor则按预乘alpha读取。直接用fractional-alpha把两者串联不等于颜色函数,最大偏差3.975311214;八外观alpha=1颜色对照全部通过。32个保活转换filter身份互异,排除共享可变单例。对照工具完整保留原始链、每alpha分组及各中间图样本的诊断,不调整容差掩盖差异。正式算法采用原版alpha=1颜色函数并保持本产品的输入/输出预乘合同,透明像素保留、非透明像素显式解预乘/再预乘;这是有记录的适配,不声称原版Core Image直串在半透明时逐像素等效。
上述为开发检查点;最终正式交付与宿主结果见下节。
## 用户补充:去除模板版权与较低版本格式
用户截图要求去掉MOEF顶部作者和网站两行,并尽量兼容旧FCP。生成器已移除完整Rig、两个展示菜单、相关factory与发布项,仅保留自定义检查器和混合两个发布入口。按真实本机ColorFinale/Pro同结构模板,输出采用ozml5.11 / Motion5.4.5;移除本壳未使用的Object3DEnvironments、DRTSupport、onHDRDisplay和missingDynamicRangeType提示,内部factory/scenenode版本及色彩域不改。来源与schema边界见 `template/sources/Provenance.json`、`template/verification/Compatibility.json`。
全局技能检查器的5.11版本guard未知如实保留;项目级验证有真实5.11相同选择字段证据。只降低格式门槛,不据此承诺旧FCP实机通过,程序的Apple Silicon/macOS14.6依赖保持。
35候选已公证Accepted `3819fbc3-6b7d-4b89-b09a-3e5d9c0f0851` 并粘附,但宿主在替换前重开,交付安全门保留正式1.5.0未替换。用户截图显示1.6.0,随后发现PluginKit同时登记正式1.5和构建目录候选,说明宿主可能发现了构建副本;未将此计为正式验收。之后用户新增模板要求,候选35及提交ZIP已清理,不重新提交同一包。最终版本递增为1.6.0(36),包含新的模板和签名。`tools/deliver.py`现在会在Xcode构建后立刻移除构建副本的PluginKit登记,避免公证等待期间被宿主发现。该阶段的状态见 `verification/PrintLooksBuild35Superseded.json`。
## 八外观候选36的正式安装与FCP验收
八外观候选1.6.0(36)实际编译源码 `f97320bbee6d469596f2db72a48436b73a41b324`;APP公证 `91224ae2-68d3-4776-a9b7-2fdf8ffaea4f` Accepted。正式路径签名、票据、Gatekeeper通过;PluginKit仅正式路径,FCP12.4实际XPC也来自该路径。393项正式自检通过,八外观独立对照仍为136项,容差未放宽。
升级前用户v5完整预设276个旧值、LUT路径、蜘蛛盘和工具载荷保持;新v6增加look0/strength1两个中性参数。已存在效果和新效果均无作者/网站两行。正式FCP逐一选择八种印片;新增独立层从“无”初始化。组合项目base Kodak2383强度1、独立Fuji3513强度0.4、base椭圆蒙版100个跟踪键通过,折叠标记、删除/撤销/重做保留。
Agfa、Kodak黑白、叠层蒙版三个4秒/25p ProRes共300帧完整解码;黑白16位RGB通道最大差0。正常退出宿主并冷启动后,三份完整预设8474、8456、32554字节分别与重开前逐字节一致。完整私人文件不上传,仅记录摘要和数量于 `verification/HostPrintLooks1.6.0.json`。
APP模板ozml5.11 / Motion5.4.5的当前FCP12.4加载、渲染及清洁界面通过;旧FCP未实机测试。恢复节点已更新为最终编译SHA,287文件逐字节比较、Release构建、393项检查、低版本模板字节重建通过。PKG与Release最终证据见Package/Release记录。
## 默认映射与标题链接接续
用户随后要求一级自动映射默认开启,并在主标题放置可点击的“更多插件访问 https://dayu.media”。39版保留Native参数的历史存储默认0,以新MOEF的value1/default0明确初始化新FCP效果,模型还原默认1;新独立一级层显式保存1,旧层省略值保持0。新层自动映射开启时不能被中性层优化跳过。标题链接为原生可访问Link控件,有指针/下划线/主题色,位于主标题区;不恢复MOEF的作者/网站Rig。
候选37预检394项通过,但最终检查发现独立一级层的中性判断需更新,公证等待被中断并保留原submission ID查询,未重复上传该产物。38版已公证并正式安装验证,发现FCP会省略旧零默认,直接改注册默认会把旧项目改成开启,因此未验收发布;据此采用稳定注册默认与显式模板初值分离。候选36的已验PKG在用户新增需求后移除,未上传Release;历史说明及摘要保留在Build36/37/38记录中。
最终1.6.0(39)编译源码 `e5affd3f097fc96f87f41be8e1a3f131ed01daeb`。395项检查覆盖原有渲染、八印片及旧省略值/显式开关、新层处理等;原版136项印片对照及Metal摘要未改变。独立远端恢复294文件、全字节比较、Release构建、395检查及低版本模板字节重建通过。最终FCP默认与链接验收见 `verification/HostPrimaryDefaults1.6.0.json`,八外观完整历史验收见 `HostPrintLooksBuild36.json`;最终版保留验证见 `HostPrintLooks1.6.0.json`。
### 最终宿主边界与结果
39版APP公证 `5d74c04c-8a30-47e9-822d-4f616dfdee56` Accepted,唯一正式位置FCP12.4验收完成。新FCP效果自动映射1,新独立一级层1,全部还原1;实际点击标题Link后Edge打开 `https://dayu.media`。8668字节“主效果手动关闭/独立一级层开启”完整预设在冷重开前后逐字节一致。正式39版1080p25/4秒ProRes100帧完整解码通过。
稳定原生注册默认0保持原API合同,但实机证明它不能冻结FCP关联模板的旧默认:三组已保存印片主效果也从0跟随新模板到1。对比仅此用户要求的默认变化,其余277项值及paths/spider/tools完整载荷不变,主效果eye在这些印片夹具中原本关闭,印片渲染链不受该开关变化影响。不得把原生模拟宿主的旧默认0检查等同于旧FCP主效果逐字节不变。实际新手动关闭能保存,冷重开结果已证实。旧独立一级层省略值保留0的兼容逻辑仍有效。
最终Metal SHA `6ec98b85aeb841f9988a4b66e3e5fba9e34d5ab3d7542c9205b0480c77f9ac6d` 与候选36及独立136项原版印片对照完全相同;最后两次补充只修改参数默认和原生界面/叠层跳过逻辑,没有修改八种印片数学。最终交付结合Build36完整八外观/100键跟踪/导出证据及Build39完整载荷对比、默认/链接/保存/当前导出证据,不将旧构建的界面操作冒充最终构建重复执行。
最终1.6.0(39)PKG公证 `4716e3c7-8199-4dc1-940c-2376dd647e9b` Accepted,20项展开验包通过。Release373/附件18发布,草稿与正式完整下载40,833,847字节和SHA `13821631b5d54f1b9c1934c513a9cc7e92641208e20219839a63e23865f21cca` 一致;标签0cc51149a6f21ebe09465b4fd7130451bedd57bb已独立恢复296文件,程序源码与编译节点e5affd3一致。当前APP和资源在固定位置;恢复构建、下载及生成APP副本已清理。
+97
查看文件
@@ -0,0 +1,97 @@
{
"referenceVersion": "2.16.2 (625)",
"referenceSHA256": "32dca93459347e5ad363cb145d0ccf84b933b2045eee2c9535676a01744b84e3",
"tables": [
{
"index": 1,
"name": "kodak_2383",
"side": 65,
"sourceSHA256": "9224997a8996a1c4d44ad489d66b3886e8137924f019e7001b3491b22020c269",
"rgba32SHA256": "462407f0105a9588d78306f136dc1aacabadb8ac51771c540c9be2d7a85da06f",
"bytes": 1256178,
"sha256": "466a88c64ce7c96255acb081b5ff68bb02ba53cbfa54561fece5ef09397df666",
"resource": "\u5927\u9c7c\u8c03\u8272/Plugin/Resources/PrintLooks/kodak_2383.dylut",
"nativeCubeDataByteIdentical": true
},
{
"index": 2,
"name": "kodak_2393",
"side": 65,
"sourceSHA256": "6bf05ba88600cf4597b8969e030179db2baef08b638ca05654df3c2472df06dd",
"rgba32SHA256": "024e046ac2d4fad2493b1ba17de6b9269ea2ce2924ad0801700a57651fa2ff5b",
"bytes": 1239890,
"sha256": "fc49e73830eb12763cab29329de8485ba85476ec5823ce967e2d0d5e089984cc",
"resource": "\u5927\u9c7c\u8c03\u8272/Plugin/Resources/PrintLooks/kodak_2393.dylut",
"nativeCubeDataByteIdentical": true
},
{
"index": 3,
"name": "kodak_2302_bw",
"side": 65,
"sourceSHA256": "00c4841c2f7fb1e40fe6452935b7c133a628fc8b41990aedfdc457907eeb1472",
"rgba32SHA256": "6ef56e8e0ea4c16c1c333471db1ad3898335f2b336b7f1a76c8da4f7ac759ab0",
"bytes": 466705,
"sha256": "69e995a585b8386426b11f1839d817866194ceca34caab9dda4bf691b233ef33",
"resource": "\u5927\u9c7c\u8c03\u8272/Plugin/Resources/PrintLooks/kodak_2302_bw.dylut",
"nativeCubeDataByteIdentical": true
},
{
"index": 4,
"name": "fuji_3510",
"side": 65,
"sourceSHA256": "bd39cdd4e719a6fafdc7097e15d81ddb58a388f4a1c28bf147ce9a1cb7ecb28b",
"rgba32SHA256": "b8658f5a0659f3a72bb98a3d171b90d20fe960a27d5220177ec8639fdd6b279e",
"bytes": 1256103,
"sha256": "2383db3a8e4c523af09d952709b3638459c9bef710080f787756d1c8cba26daf",
"resource": "\u5927\u9c7c\u8c03\u8272/Plugin/Resources/PrintLooks/fuji_3510.dylut",
"nativeCubeDataByteIdentical": true
},
{
"index": 5,
"name": "fuji_3513",
"side": 65,
"sourceSHA256": "58eb01a447c21f4670765e435cdb7fddf3b3b4e042a76b30b91a906413723d6b",
"rgba32SHA256": "946a1fbbbd9ddcbb98f9a3227e42d9e31cb15191051047134c7a69adc5c069d6",
"bytes": 1233606,
"sha256": "56c281c30f21c3344d21195ba16a5d8b850f5493cf487f4511929d036f6abdcf",
"resource": "\u5927\u9c7c\u8c03\u8272/Plugin/Resources/PrintLooks/fuji_3513.dylut",
"nativeCubeDataByteIdentical": true
},
{
"index": 6,
"name": "fuji_3519",
"side": 65,
"sourceSHA256": "84ace607eefdac45c7f6b9c6ffe50271d70f7bbe56223dc47de19900ae9401c6",
"rgba32SHA256": "01ea1984dc24998735ab42034f8d7bd19ef9f4c001f748e39a91c8923f1d6b1f",
"bytes": 1231622,
"sha256": "8c4891cc331634a36dbf40ead21c78f4a1dbd5283d29f351a43aadd6615040ee",
"resource": "\u5927\u9c7c\u8c03\u8272/Plugin/Resources/PrintLooks/fuji_3519.dylut",
"nativeCubeDataByteIdentical": true
},
{
"index": 7,
"name": "fuji_3521",
"side": 65,
"sourceSHA256": "ac13b327ea6a2d5752b201f3cf0ecea1df375341935b6a3aa3c9494c0b6b866b",
"rgba32SHA256": "592dd37648e2568e3747714bc87590126dac052e4b06f839d09590c462e86c00",
"bytes": 1267728,
"sha256": "8b508f5e2168657814f533c281d234a374299503f8abed5da769ac9989438e4e",
"resource": "\u5927\u9c7c\u8c03\u8272/Plugin/Resources/PrintLooks/fuji_3521.dylut",
"nativeCubeDataByteIdentical": true
},
{
"index": 8,
"name": "agfa_cp30",
"side": 65,
"sourceSHA256": "62b71c675e89ce161e4ad5cc37ffa28d882b1b724de4bb15a30da70fb3daa0d9",
"rgba32SHA256": "744b01a229f4132aa5a95c468aad7d25d8d9407ddc28771d0398369bdcdba6e5",
"bytes": 1276279,
"sha256": "55f6c58df7959bbc2cf9c2d2893d6971674f13a257dbd4c2d2a285136279cd56",
"resource": "\u5927\u9c7c\u8c03\u8272/Plugin/Resources/PrintLooks/agfa_cp30.dylut",
"nativeCubeDataByteIdentical": true
}
],
"cubeOrder": "red fastest; green; blue",
"interpolation": "tetrahedral (six cases)",
"sourceRole": "data only; no reference executable or shader shipped"
}
@@ -0,0 +1,50 @@
# 大鱼调色FxPlug4交接:1.5.0胶片与通道混合器
2026-11-02(Asia/Shanghai)。当前正式1.5.0(34),APP已经签名、公证、粘附并安装,FCP12.4宿主验收完成。安装包/Release最终结果读取 `verification/Package.json`、`verification/Release.json`,与APP编译节点分别记录。
## 身份与恢复
- 源码:`/Volumes/备份/大鱼调色/大鱼调色`;远程 `https://dayu.media/git/dayu/dayu-color.git`,main。
- 正式:`/Library/Plug-Ins/FxPlug/大鱼调色.app`,主ID `com.dayu.color`、XPC `com.dayu.color.XPC`。
- APP实际编译源码:`06d531c443b0bb2f179022a4e64148394f5d0690`。
- APP公证:`164abf2b-4e67-4504-b72a-04122da9e381` Accepted;团队B3W25FX5H5。
- 固定构建缓存:`/Users/mac/Library/Caches/CodexBuilds/com.dayu.color`。
- 模板唯一位置:`/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef`。
- 无LFS/子模块;程序不依赖Color Finale安装、REA缓存或父“大鱼调色盘”。
正式PKG `../发行包/大鱼调色-1.5.0.pkg`,14,380,104字节,SHA-256 `3ecabc7a8bfd675b228a5f00016aa17a35b65b544055e57793ec3bff3d7e0294`。PKG公证 `05f849da-5567-4351-9556-742d17b95723` Accepted,20项展开验包通过;本轮未再次运行系统安装器。[Release372](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.5.0-film-mixer-20261102) / 附件17已发布,草稿和正式链接均完整下载校验一致。发行标签 `v1.5.0-film-mixer-20261102` 对应 `85b6590944c4fb64825cf45f61c5280d4ffaa824`,远端独立恢复264文件、逐字节核对和full/strict fsck通过。详见 `verification/Release.json`、`FilmMixerReleaseRecovery.json`、`ReleaseDraftDownload1.5.0.json`。核验用下载副本、恢复clone及独立构建目录已清理;已知本产品根目录仅保留唯一正式APP,详见 `verification/FilmMixerCleanup.json`,不宣称全盘唯一。
## 本轮实现
通道混合器采用RGB三输出×三输入矩阵,含保持亮度、保持饱和度与混合。胶片含减色、晕光、辉光、颗粒、暗角,五页参数各自启停。两类工具沿用原启停、折叠、蒙版、数量标记、区域跟踪和相邻初始化层;工具类型由12追加到14,原索引不移动。
42个宿主参数只追加,旧参数ID、944字节GPU前缀及1104字节完整旧Uniform前缀保留。完整预设v5兼容v1–v4;读旧预设时新参数恢复中性。schema1尾层、schema2锚点、已有9000–9003载荷保留。新工具置于既有显示域/蜘蛛盘之后、历史尾层之前,不能因此推断UI中全部旧工具都按视觉顺序渲染。
减色与颗粒用既有sRGB编码边界,晕光/辉光/暗角在线性纹理上。减色是原SubSat归一化幂函数,活跃时限幅0–1。晕光为高斯散射后R/G通道加权归一化;辉光为稀疏预滤→向量Sobel→扩散→相加。颗粒使用PCG/Box-Muller、MPS扩散、精确有理帧和规范化全帧坐标;与原版CI内部切块的空间噪声排列不做全局逐像素等效承诺。暗角复用相同系统CIVignetteEffect。纯矩阵和减色支持Cube,活跃空间/时间效果及蒙版明确拒绝Cube。
原厂八种印片外观属于另外的ACES输出资源,本版五组处理未纳入这些外观。不能把F-Log输入菜单当作胶片外观,也不能将本工程接入域声称为原版任意ACES链等效。来源、证据ID与边界见[研究记录](research/ColorFinaleFilmMixer.md)。
## 验收与用户资料
- 349项原生检查;四种尺寸64×48、63×47、1×17、17×1共184项原版组件对照通过。
- FCP12.4正式版加载;用户234个既有参数、资产路径、蜘蛛盘和蒙版载荷逐项/逐字节保持。界面显示286个可信跟踪键,载荷共287键(含作者键)。
- 新模块、五页胶片控制、独立混合器初始化、胶片椭圆蒙版、折叠数量1、删除/撤销/重做通过。
- 1080p/25fps/4秒ProRes正式导出验证grainHold2:0/1、2/3、4/5帧分别相同,组间不同。
- 960×540/25fps/4秒组合导出全部帧解码通过;三个项目FCPXML1.14原生回导严格校验与比较通过。
- 正常退出冷重开,组合预设8987字节、颗粒预设8420字节前后均逐字节相同。
记录:`verification/HostFilmMixer1.5.0.json`、`FilmMixerNative.json`、`FilmMixerReference.json`、`FilmMixerRecovery.json`。私有完整预设与FCPXML只在本机 `.../com.dayu.color/fcp-qa/`,文件名前缀 `film-mixer-`。不写入Git、PKG或覆盖用户原素材。
## 源码入口
- `DYFilmTypes.h`、`DYFilmMath.h`:状态/中性判断与共享数学。
- `DYFilmKernels.inc.h`:原生Metal点处理、PCG、辉光预滤与Sobel;由DYGrade.metal包含,经tools/build_kernels.py构建。
- `DYFilmRender.inc.h`:惰性缓冲、CI/MPS空间阶段、内存预算、混合及现有蒙版。
- `DYFilmTime.h`、DYPlugIn.mm:冻结宿主帧长/起点,精确签名帧索引和1–5帧保持。
- DYModel.mm / DYUniforms.h:只追加描述符、Uniform;DYInspector.mm五页分组和RGB三输出分组。
- DYToolState.mm / DYToolRender.inc.h:新类型、独立初始化、相邻锚点、尾层和Cube限制。
- tools/verify_film_reference.mm:本机原版只读CI/Metal对照,不参与产品运行。
按本机全局规则继续交付。`tools/deliver.py`持有产品锁,正式宿主完成后才输入complete;其自检输出现在会先保存诊断再判定,避免失败时丢失输出。首次预检曾在与恢复自检并行时退出1,旧工具未保留当次JSON;未替换旧版。随后串行349项、正式安装349项和独立恢复349项全部通过,不把未知原因写成已证实的程序缺陷。
上一阶段详细基线保留于[1.4.3胶片接续原文](research/handoffs/DayuColorFilmStart1.4.3-20261102.md),更早历史见[历史交接](research/handoffs/DayuColorThrough1.4.3-20261102.md)。
+5 -3
查看文件
@@ -4,9 +4,9 @@
正式安装目标:`~/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef`。插件依赖唯一正式位置 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,主 Bundle ID `com.dayu.color`,滤镜 UUID `1C17B73B-F229-4C09-A434-EAF6DFF5F22A`。
四个发布入口依次是用户技能要求的两个空绑定版权菜单、大鱼调色自定义检查器 `./9000`、宿主混合 `./10001`。检查器与 LUT 文件状态分别保存为 `DYInspectorToken`、`DYAssetState`;两个双重 NSKeyedArchive 由本工程的实际类和 Foundation 生成并回读验证。全部 196 个已注册原生浮点参数都在同一 filter 中保存,供自定义面板与宿主持久化访问。
两个发布入口为大鱼调色自定义检查器 `./9000`、宿主混合 `./10001`。检查器、LUT 文件与工具蒙版状态分别保存为 `DYInspectorToken`、`DYAssetState`、`DYToolDocument`;原生 NSKeyedArchive 由本工程的实际类和 Foundation 生成并回读验证。全部278个已注册原生浮点参数都在同一 filter 中保存,供自定义面板与宿主持久化访问。
版权结构保留完整原生 Rig 与两菜单:作者 ID `10081`、网站 ID `10082`,共同位于 Rig `10080`。菜单精确显示 `大鱼先森Media` 与 `dayu.media`,没有绑定任何画面通道。结构核验逐字段反向重编号对照原始 Rig。版本沿用技能原生效果器母版的 `5.13 / 5.6.7`,没有从较高版本参考传播顶层版本。
按2026-11-02用户明确要求,删除作者和网址的两个展示菜单、Rig节点与相应发布项;生成器也停止添加这些内容,历史参考 `CopyrightRig.xml` 不再参与生成。模板顶层降为 `5.11 / 5.4.5`,有本机Color Finale同类EffectSource/FxPlug/custom参数真实样本作结构依据;移除较新且本壳未使用的3D/HDR编辑提示,保留原factory和场景节点内部版本、效果源及色彩设置。来源摘要见 `sources/Provenance.json`。这降低模板格式门槛,旧FCP仍受本程序Apple Silicon、macOS14.6及FxPlug/宿主API要求约束;未实机覆盖的版本不宣称兼容。
生成入口:
@@ -16,6 +16,8 @@ python3 tools/build_template.py --output /绝对路径/大鱼调色.moef
工程模型有变更时,先审查变更,再加 `--refresh-model` 重新导出实际注册表与自有归档。它只编译并执行短时命令行元数据工具,仅用于本工程的参数元数据导出。既有输出必须明确加 `--overwrite`;普通重建直接复用版本化原始归档并核对模型源码哈希,以保持模板字节稳定。
`verification/StaticContract.json`、`SavedSelection.json`、`SkillAudit.json` 记录当前落盘文件的静态检查:唯一滤镜、参数覆盖、四项发布、真实空绑定、无内容图层选中、源引用及无动画。实际 FCP 验收和导出记录见工程根目录 `verification/Host.json` 与 `HostThemeLUT.json`。
`verification/StaticContract.json`、`SavedSelection.json`、`SkillAudit.json` 记录当前落盘文件的静态检查:唯一滤镜、参数覆盖、两项发布、无版权展示、无内容图层选中、源引用及无动画。实际 FCP 验收以工程根目录对应版本的宿主记录为准。
全局技能的选择状态检查器目前只接纳较新模板,对5.11返回版本guard未知;该原始结果保留在 `SkillAudit.json`,没有改写成技能工具通过。本项目以真实ColorFinalePro 5.11样本的相同字段和选择位建立 `tools/verify_template.py`,独立结果为 `verification/Compatibility.json`、`SavedSelection.json`;除版本guard外无其他结构错误。
`large.png`(640×360)与 `small.png`(240×135)使用本产品的光谱鱼和“大鱼调色”品牌图。原图和生成提示词在 `design/`,运行 `python3 tools/build_brand_assets.py` 可重建。`verification/Preview.json` 记录来源与导出哈希;正式安装时设置预览文件锁,防止宿主自动覆盖。
+19 -5
查看文件
@@ -17,13 +17,22 @@
"feature": "two unbound copyright popup widgets",
"path": "/Users/mac/.codex/skills/ae-to-motion/assets/publication/copyright-info/版权信息.moti",
"sha256": "fd0e0414e957dbe1b5837250a38a4799defceedc0e09f7a6c7b9e1baf8b5e4c0",
"retained": "CopyrightRig.xml"
"retained": "CopyrightRig.xml (historical source only; no longer generated or shipped in the template)"
}
],
"versionPolicy": {
"ozml": "5.13",
"displayversion": "5.6.7",
"basis": "skill native effect source; no version value inferred from vendor or CST source"
"ozml": "5.11",
"displayversion": "5.4.5",
"basis": "Identity-verified local Color Finale EffectSource/FxPlug/custom-archive template; no vendor preset/archive copied",
"referenceTemplate": "~/Movies/Motion Templates.localized/Effects.localized/Color Finale/ColorFinale/ColorFinale.moef",
"referenceSHA256": "61b07cab981566dd4fd80f08fdcb9be9f26f3f0389062420dafc3331aaa95749",
"removedLaterOptionalHints": [
"Object3DEnvironments",
"DRTSupport",
"onHDRDisplay",
"missingDynamicRangeType"
],
"oldFCPActuallyTested": false
},
"runtimeDependency": {
"app": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
@@ -31,5 +40,10 @@
"pluginUUID": "1C17B73B-F229-4C09-A434-EAF6DFF5F22A",
"noVendorRuntimeDependency": true
},
"scope": "Build sources and static evidence only; host UI/render/save-reopen validation remains separate"
"scope": "Build sources and static evidence only; host UI/render/save-reopen validation remains separate",
"copyrightPolicy": {
"userRequestedRemoval": true,
"publishedDisplayRows": 0,
"rigGenerated": false
}
}
+53 -5
查看文件
@@ -852,7 +852,8 @@
},
{
"cmTab": 2,
"default": 0,
"default": 1,
"hostDefault": 0,
"key": "cmtoneMapping",
"kind": "popup",
"max": 1,
@@ -3572,6 +3573,53 @@
"step": 0.01,
"title": "暗角过渡"
},
{
"default": 0,
"filmTab": 5,
"key": "filmPrintLook",
"kind": "popup",
"max": 8,
"min": 0,
"notAnimatable": true,
"offset": 1296,
"options": [
"无",
"Kodak 2383",
"Kodak 2393",
"Kodak 2302 BW",
"Fuji 3510",
"Fuji 3513",
"Fuji 3519",
"Fuji 3521",
"Agfa CP30"
],
"pid": 2324,
"step": 0.01,
"title": "印片外观",
"values": [
0,
1,
2,
3,
4,
5,
6,
7,
8
]
},
{
"default": 1,
"filmTab": 5,
"key": "filmPrintStrength",
"kind": "float",
"max": 1,
"min": 0,
"offset": 1300,
"pid": 2325,
"step": 0.01,
"title": "印片强度"
},
{
"default": 1,
"key": "filmEnabled",
@@ -3588,14 +3636,14 @@
"template/tools/dump_model.mm": "04e04446aa351d774913bc25b06512fefe7969bdf4c6e471a91f1e9d6c4fc3b5",
"大鱼调色/Plugin/DYCSTTypes.h": "3372e3cd77248eeb374e54675d2902befceea8e00a2afc4f9543116ef3027696",
"大鱼调色/Plugin/DYColorManagement.h": "b0a4cd1b8c45dbce90a7b4f30f72ebf95ecd382895e74e3bfeda0f7cdb185157",
"大鱼调色/Plugin/DYFilmMath.h": "e41d44790c6bb42db7c68520d442b39c381b4db4056d40a44426e21f62e9bf6b",
"大鱼调色/Plugin/DYFilmMath.h": "945b7036c6aa6d27941a3bf96c4d70dec65a14b1747fba618e650738fa7108f0",
"大鱼调色/Plugin/DYFilmTypes.h": "c35a43b5b93988e8517e5db8f281da0dfd1e02f5b0e7bfb62e7345cec444a36d",
"大鱼调色/Plugin/DYModel.h": "80e88add97deeac7a9dc47d12f68b0245905786297de2e6553b3da15c729da6e",
"大鱼调色/Plugin/DYModel.mm": "48d0e8a36f41001c63e0f95faa99f8dd910b0227d7b93ff2a90006673c3e3c36",
"大鱼调色/Plugin/DYModel.mm": "bde987e48f79e5cf8e2e6bccc49cac27d420979d27e0e6859a27e98d0bd7bad7",
"大鱼调色/Plugin/DYSpiderState.h": "0c80747e41e8fc97762e301b011bd08c18865a825eaafde086ed79ace37b22f9",
"大鱼调色/Plugin/DYToolState.h": "28088ec819307a60f2e52334fd807a514c3ff8a550bc0efbe7069b68a6242320",
"大鱼调色/Plugin/DYToolState.mm": "6502e412532f2be2589188c1b99579ae59ab279d814805e38b0c8042e921a5bd",
"大鱼调色/Plugin/DYUniforms.h": "8c494532d534b65622039605073b554bafd92ec0efe1e0d207d822b59862a1cb",
"大鱼调色/Plugin/DYToolState.mm": "7b113450ae43e0e5d478d8f0e4212b7d25e47d3cc8bc0d4d868ab58c98d3c56c",
"大鱼调色/Plugin/DYUniforms.h": "207d36b5b53ab084fa8eb3813ccbbeb5193178e3468a37e9dc692ab196ffbb6a",
"大鱼调色/Plugin/MaskCore/DYMask.h": "5b9aa44390d4a1fca1baf5e34cb9eefc8483c939a65cc2a0412b7b41fc85bc16",
"大鱼调色/Plugin/MaskCore/DYMaskOperator.h": "43fa701ad574f38ce0ab4f4d3900bb034edaaa1adc09821d2f4443ee2b687ba2",
"大鱼调色/Plugin/SpiderCore/DYColorMath.h": "bdd6278e17ff4208ad94a8b0e834c817c0a3475f205dd79898e8fd88e84a19c9",
+76
查看文件
@@ -0,0 +1,76 @@
{
"passed": true,
"sha256": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250",
"version": "5.11",
"displayversion": "5.4.5",
"nativeReference": {
"path": "~/Movies/Motion Templates.localized/Effects.localized/Color Finale/ColorFinalePro/ColorFinalePro.moef",
"sha256": "bfab9157b988acaf5c078a0837085843f2021e93a2e411eec9d94120f11ddd69",
"version": "5.11",
"displayversion": "5.4.5",
"projectBaseFlags": 268435473,
"currentObject": "10000",
"scenenodeVersion": "5",
"widgetBaseFlags": 16,
"layerAndSourceBaseFlags": 524304,
"fxPlugBaseFlags": 8589934608,
"allContentSelectionBits": 0
},
"staticContract": {
"passed": true,
"sha256": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250",
"version": "5.11",
"displayversion": "5.4.5",
"filterCount": 1,
"nativeFloatParameters": 278,
"customParameters": 3,
"publications": [
{
"object": "10060",
"channel": "./9000",
"name": "大鱼调色"
},
{
"object": "10060",
"channel": "./10001",
"name": "混合"
}
],
"effectSourceType": 3,
"externalMediaRequired": false,
"placeholder": "native Drop Zone.tiff",
"animationObjects": 0,
"copyright": {
"removedAtUserRequest": true,
"publishedDisplayRows": 0,
"displayRigAbsent": true
},
"savedSelection": {
"passed": true,
"selectedContentCount": 0,
"currentObjectIsProject": true
},
"hostUIVerified": false,
"hostRenderVerified": false
},
"savedSelection": {
"passed": true,
"sha256": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250",
"version": "5.11",
"selectionMask": "0x10000001",
"projectID": "10000",
"contentObjectsChecked": 4,
"selectedContent": [],
"selectedContentCount": 0,
"currentObject": "10000",
"currentObjectIsProject": true,
"nativeUIVerified": false,
"validator": "project-scoped native-5.11 field comparison",
"scope": "Saved fields only; no rendering or old-FCP execution"
},
"skillCheckerStatus": "unsupported-version-guard; original SkillAudit.json retained unchanged",
"otherSkillStructuralErrors": [],
"copyrightDisplayRows": 0,
"oldFCPActuallyTested": false,
"scope": "Native-template structure and saved-state comparison only; FCP host acceptance is separate"
}
+9 -8
查看文件
@@ -1,14 +1,15 @@
{
"README.md": "db063c6b56acf80eec8c17613539ce99202c9771d108f392c13cf90ed962a038",
"README.md": "6be40447052793855fba6f1a6756625d86da0363827ebb53e55c2980506ec987",
"sources/CopyrightRig.xml": "842afc58ecda0fc8c22675a0191f53dccb9ea6aaba10acd0a272cecee9b72067",
"sources/NativeEffectSource.moef": "4424b5ee3b5dc137bc8e8baa9091b24c2431adf32a3d79b2662cff079c35031c",
"sources/NativeFactories.xml": "5db79ab22e948ca2bdf9162beb60d8380a95ceff6c74e86ff095804ae1d832b6",
"sources/NativeFxPlugShell.xml": "5d2a1e807fb7148e5a682c83ba30d7022c8680d2ca8309c502d30f4b12efad64",
"sources/Provenance.json": "32063c48ef02a47e42555537421bfc95f767e96fc88d3478e9116c85a0205baf",
"sources/RegisteredParameters.json": "1d8c9c1a58c289d855e1f57add064dd4d96342961df6c2796f705a90b287e38c",
"tools/dump_model.mm": "2ef22e010e0cae15b73107d39fb2c125f6049b1e5405e88078f936cf29e79350",
"verification/SavedSelection.json": "ef90b0afa1df26f2a5d299f86f675422c8b433e3f833ff1a9a61bb1228e6c9ca",
"verification/SkillAudit.json": "d6931eb103fb1fe3e30a331b47ff957ef9d69cf409276d13a3f1bb423df5ad80",
"verification/StaticContract.json": "a03aa582320dff857f860a90c120b829604a8a3f2aa1997a5131b825b4fdbf1b",
"大鱼调色.moef": "bb03fae187e45358180258bb6a43fdde397b317dbf191bba5de72f2ce5d83b2b"
"sources/Provenance.json": "9cfa41fd1f02b35b99cad56a4a048bafa1c627da181006f5b9186a104664f421",
"sources/RegisteredParameters.json": "9937a076df8b1f8dba7aea8701810bf84f9819337bbfe87ddcecb36d6f279289",
"tools/dump_model.mm": "04e04446aa351d774913bc25b06512fefe7969bdf4c6e471a91f1e9d6c4fc3b5",
"verification/SavedSelection.json": "7408fb149fcb88db9335af7076d6e7afb07c3074a19e9935343b4d8c5c76bec5",
"verification/SkillAudit.json": "eda67532a7ab8abaf24d8eff890235d2dd13bf4c70472684fcfbbd9b2b21e08b",
"verification/StaticContract.json": "afc6ed629d21b6f535b767f180891566bc6700ea9a7d85e1e364a435efe2d063",
"大鱼调色.moef": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250",
"verification/Compatibility.json": "517cff6f5cb7229fdf725adf687e6039e91b20359c412e4bdbd71e4fcb1bed88"
}
+6 -6
查看文件
@@ -1,15 +1,15 @@
{
"passed": true,
"sha256": "bb03fae187e45358180258bb6a43fdde397b317dbf191bba5de72f2ce5d83b2b",
"sha256": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250",
"version": "5.11",
"selectionMask": "0x10000001",
"nativeUIVerified": false,
"scope": "Saved selection fields for observed schema; no rendering or GUI operation",
"version": "5.13",
"projectID": "10000",
"contentObjectsChecked": 7,
"contentObjectsChecked": 4,
"selectedContent": [],
"selectedContentCount": 0,
"currentObject": "10000",
"currentObjectIsProject": true,
"errors": []
"nativeUIVerified": false,
"validator": "project-scoped native-5.11 field comparison",
"scope": "Saved fields only; no rendering or old-FCP execution"
}
+11 -14
查看文件
@@ -1,6 +1,8 @@
{
"checksPassed": true,
"errors": [],
"checksPassed": false,
"errors": [
"Saved selection: Unverified Motion XML version/schema; obtain native evidence first"
],
"warnings": [
"Parent time conversion is supplied explicitly in contracts; not inferred for arbitrary nesting.",
"No native rendering, font/glyph availability, full dynamic/private reference graph, or visual validation performed."
@@ -13,19 +15,14 @@
"NTSC": "1"
},
"savedSelection": {
"passed": true,
"sha256": "bb03fae187e45358180258bb6a43fdde397b317dbf191bba5de72f2ce5d83b2b",
"passed": false,
"sha256": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250",
"selectionMask": "0x10000001",
"nativeUIVerified": false,
"scope": "Saved selection fields for observed schema; no rendering or GUI operation",
"version": "5.13",
"projectID": "10000",
"contentObjectsChecked": 7,
"selectedContent": [],
"selectedContentCount": 0,
"currentObject": "10000",
"currentObjectIsProject": true,
"errors": []
"errors": [
"Unverified Motion XML version/schema; obtain native evidence first"
]
},
"savedSelectionRequired": true,
"buildMarkers": false,
@@ -48,10 +45,10 @@
"nativeVisualValidation": false
},
"basic": {
"entity_count": 10,
"entity_count": 7,
"entity_ids_unique": true,
"duplicate_entities": {},
"published_count": 4,
"published_count": 2,
"unresolved_media": []
}
}
+7 -19
查看文件
@@ -1,22 +1,12 @@
{
"passed": true,
"sha256": "7476fb5a3cfad5f4dafb7a887dcc787b9cbcba6ad64df3b4939b336444cf8bfc",
"version": "5.13",
"displayversion": "5.6.7",
"sha256": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250",
"version": "5.11",
"displayversion": "5.4.5",
"filterCount": 1,
"nativeFloatParameters": 276,
"nativeFloatParameters": 278,
"customParameters": 3,
"publications": [
{
"object": "10081",
"channel": "./2/100",
"name": "FCP 版本作者→"
},
{
"object": "10082",
"channel": "./2/100",
"name": "更多模板浏览器访问→"
},
{
"object": "10060",
"channel": "./9000",
@@ -33,11 +23,9 @@
"placeholder": "native Drop Zone.tiff",
"animationObjects": 0,
"copyright": {
"passed": true,
"rig": "10080",
"author": "10081",
"site": "10082",
"unbound": true
"removedAtUserRequest": true,
"publishedDisplayRows": 0,
"displayRigAbsent": true
},
"savedSelection": {
"passed": true,
+5 -75
查看文件
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ozxmlscene>
<ozml version="5.13">
<displayversion>5.6.7</displayversion>
<ozml version="5.11">
<displayversion>5.4.5</displayversion>
<factory id="1" uuid="46c844a813d311d8a438000a95af9f7e">
<description>Channel</description>
<manufacturer>Apple</manufacturer>
@@ -27,16 +27,6 @@
<manufacturer>Apple</manufacturer>
<version>1</version>
</factory>
<factory id="6" uuid="402246385249454b90e08b2ee1b6bf06">
<description>绑定</description>
<manufacturer>Apple</manufacturer>
<version>1</version>
</factory>
<factory id="7" uuid="e35c74f01d5042f6b468eb530169bfb7">
<description>小组件</description>
<manufacturer>Apple</manufacturer>
<version>1</version>
</factory>
<build />
<description />
<canvas>
@@ -145,14 +135,9 @@
<animateFlag>0</animateFlag>
<parameterColorSpaceID>3</parameterColorSpaceID>
<savePreviewMovie>0</savePreviewMovie>
<Object3DEnvironments>100</Object3DEnvironments>
<DRTSupport>0</DRTSupport>
<onHDRDisplay>0</onHDRDisplay>
</sceneSettings>
<publishSettings>
<version>2</version>
<target object="10081" channel="./2/100" name="FCP 版本作者→" />
<target object="10082" channel="./2/100" name="更多模板浏览器访问→" />
<target object="10060" channel="./9000" name="大鱼调色" />
<target object="10060" channel="./10001" name="混合" />
</publishSettings>
@@ -186,62 +171,6 @@
<parameter name="属性" id="1" flags="8589938704" />
<parameter name="对象" id="2" flags="8589938704" />
</scenenode>
<scenenode name="绑定" id="10080" factoryID="6" version="5">
<scenenode name="弹出式菜单 1" id="10082" factoryID="7" version="5">
<affecting>2</affecting>
<snapshot>3</snapshot>
<flags>0</flags>
<timing in="0 1 1 0" out="-2560 153600 1 0" offset="0 1 1 0" />
<foldFlags>0</foldFlags>
<baseFlags>16</baseFlags>
<parameter name="属性" id="1" flags="8589938704" />
<parameter name="对象" id="2" flags="8589938704">
<parameter name="选项" id="103" flags="8589938688">
<parameter name="初始值" id="106" flags="68736319504" default="0" value="0" />
</parameter>
<parameter name="Hidden" id="102" flags="8606711824" default="0" value="3" />
<parameter name="快照" id="101" flags="8589938706">
<parameter name="快照" id="3" flags="4112">
<parameter name="值" id="1" flags="16" default="0" value="2" />
<parameter name="插值" id="2" flags="65552" default="1" value="1" />
</parameter>
</parameter>
<parameter name="弹出式菜单" id="100" flags="16842769" default="2" value="2">
<entry name="dayu.media" tag="2" />
</parameter>
</parameter>
</scenenode>
<scenenode name="弹出式菜单" id="10081" factoryID="7" version="5">
<affecting>2</affecting>
<snapshot>3</snapshot>
<flags>0</flags>
<timing in="0 1 1 0" out="-2560 153600 1 0" offset="0 1 1 0" />
<foldFlags>0</foldFlags>
<baseFlags>16</baseFlags>
<parameter name="属性" id="1" flags="8589938704" />
<parameter name="对象" id="2" flags="8589938704">
<parameter name="选项" id="103" flags="8589938688">
<parameter name="初始值" id="106" flags="68736319504" default="0" value="0" />
</parameter>
<parameter name="Hidden" id="102" flags="8606711824" default="0" value="3" />
<parameter name="快照" id="101" flags="8589938706">
<parameter name="快照" id="3" flags="4112">
<parameter name="值" id="1" flags="16" default="0" value="2" />
<parameter name="插值" id="2" flags="65552" default="1" value="1" />
</parameter>
</parameter>
<parameter name="弹出式菜单" id="100" flags="16842768" default="2" value="2">
<entry name="大鱼先森Media" tag="2" />
</parameter>
</parameter>
</scenenode>
<flags>0</flags>
<timing in="0 1 1 0" out="-2560 153600 1 0" offset="0 1 1 0" />
<foldFlags>0</foldFlags>
<baseFlags>16</baseFlags>
<parameter name="属性" id="1" flags="8589938704" />
<parameter name="对象" id="2" flags="8589938704" />
</scenenode>
<layer name="群组 1" id="10047">
<scenenode name="效果源" id="10050" factoryID="3" version="5">
<validTracks>1</validTracks>
@@ -341,7 +270,7 @@
<parameter name="输出转换启用" id="2243" flags="12889161760" default="1" value="1" />
<parameter name="输出曲线" id="2244" flags="12889161776" default="1002" value="1002" />
<parameter name="输出色域" id="2245" flags="12889161776" default="22" value="22" />
<parameter name="自动色调映射" id="2246" flags="12889161776" default="0" value="0" />
<parameter name="自动色调映射" id="2246" flags="12889161776" default="0" value="1" />
<parameter name="输入转换 / CST" id="2033" flags="12889161760" default="1" value="1" />
<parameter name="曝光" id="2000" flags="12889161760" default="0" value="0" />
<parameter name="曝光 启用" id="2020" flags="12889161760" default="1" value="1" />
@@ -581,6 +510,8 @@
<parameter name="暗角强度" id="2318" flags="12889161760" default="1" value="1" />
<parameter name="暗角半径" id="2319" flags="12889161760" default="50" value="50" />
<parameter name="暗角过渡" id="2320" flags="12889161760" default="0.5" value="0.5" />
<parameter name="印片外观" id="2324" flags="12889161776" default="0" value="0" />
<parameter name="印片强度" id="2325" flags="12889161760" default="1" value="1" />
<parameter name="胶片模拟" id="2292" flags="12889161760" default="1" value="1" />
<parameter name="混合" id="10001" flags="12884901888" default="1" value="1" />
<parameter name="翻转" id="10002" flags="12889161760" default="0" value="0" />
@@ -627,7 +558,6 @@
<missingWidth>1200</missingWidth>
<missingHeight>1200</missingHeight>
<missingDuration>0.033333333333333333</missingDuration>
<missingDynamicRangeType>0</missingDynamicRangeType>
<creationDuration>1</creationDuration>
<mediaID />
<flags>0</flags>
+21 -27
查看文件
@@ -12,6 +12,8 @@ TEMPLATE=ROOT/'template'
SOURCES=TEMPLATE/'sources'
PROJECT_UUID='7d468273c013498e9806a0d7bc32fddf'
PLUGIN_UUID='1C17B73B-F229-4C09-A434-EAF6DFF5F22A'
OUTPUT_VERSION='5.11'
OUTPUT_DISPLAY_VERSION='5.4.5'
NATIVE_ALPHABET='*-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
STANDARD_ALPHABET='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
CONTENT_TAGS={'scenenode','layer','group','filter','behavior','mask'}
@@ -60,10 +62,17 @@ def build(model):
scene=root.find('scene');project=scene.find('scenenode[@factoryID="4"]')
source=scene.find('.//scenenode[@name="效果源"]')
if source is None or root.get('version')!='5.13' or root.findtext('displayversion')!='5.6.7':raise ValueError('Unexpected native EffectSource source')
# Same EffectSource/FxPlug/custom-archive shape exists in the identity-
# recorded native 5.11 / Motion 5.4.5 reference. Drop only later optional
# 3D/HDR editor hints; keep factory/node versions and color settings intact.
root.set('version',OUTPUT_VERSION);root.find('displayversion').text=OUTPUT_DISPLAY_VERSION
for parent in root.iter():
for child in list(parent):
if child.tag in {'Object3DEnvironments','DRTSupport','onHDRDisplay','missingDynamicRangeType'}:parent.remove(child)
if source.find('parameter[@id="2"]/parameter[@id="321"]').get('value')!='3':raise ValueError('Expected native EffectSource type 3')
native_factories=E.parse(SOURCES/'NativeFactories.xml').getroot()
lookup={f.get('uuid'):f for f in native_factories}
factory_ids={'deca4859b16011d7a12d0003936f6f92':'5','402246385249454b90e08b2ee1b6bf06':'6','e35c74f01d5042f6b468eb530169bfb7':'7'}
factory_ids={'deca4859b16011d7a12d0003936f6f92':'5'}
insert_at=list(root).index(root.findall('factory')[-1])+1
for uuid,fid in factory_ids.items():
factory=copy.deepcopy(lookup[uuid]);factory.set('id',fid);root.insert(insert_at,factory);insert_at+=1
@@ -82,22 +91,17 @@ def build(model):
E.SubElement(param,'defaultVal').text=text;E.SubElement(param,'dataValue').text=text
for row in model['parameters']:
value=format(float(row['default']),'.17g')
E.SubElement(filt,'parameter',name=row['title'],id=str(row['pid']),flags='12889161776' if row.get('notAnimatable') else '12889161760',default=value,value=value)
host_default=format(float(row.get('hostDefault',row['default'])),'.17g')
E.SubElement(filt,'parameter',name=row['title'],id=str(row['pid']),flags='12889161776' if row.get('notAnimatable') else '12889161760',default=host_default,value=value)
for node in host:
if node.get("id")=="10005":node.set("value","1");node.set("default","0");node.set("flags","8589934592")
filt.append(node)
source.append(filt)
copyright=E.parse(SOURCES/'CopyrightRig.xml').getroot()
entity_map={'3356608241':'10080','3356608243':'10081','3356608245':'10082'}
for node in copyright.iter('scenenode'):
node.set('id',entity_map[node.get('id')]);node.set('factoryID','6' if node.get('factoryID')=='1' else '7')
# Native Rig stays directly below scene, after its native project.
scene.insert(list(scene).index(project)+1,copyright)
# User requested removal of the author's two display-only Rig widgets.
# Do not regenerate their nodes, factories or published parameter rows.
pub=scene.find('publishSettings')
for node in list(pub):
if node.tag!='version':pub.remove(node)
for object_id,name in [('10081','FCP 版本作者→'),('10082','更多模板浏览器访问→')]:
E.SubElement(pub,'target',object=object_id,channel='./2/100',name=name)
E.SubElement(pub,'target',object='10060',channel='./9000',name='大鱼调色')
E.SubElement(pub,'target',object='10060',channel='./10001',name='混合')
current=scene.find('currentObject')
@@ -116,13 +120,15 @@ def build(model):
def verify(data,model):
root=E.fromstring(data);scene=root.find('scene');factories={f.get('id'):f.get('uuid') for f in root.findall('factory')}
assert root.get('version')==OUTPUT_VERSION and root.findtext('displayversion')==OUTPUT_DISPLAY_VERSION
assert all(not list(root.iter(tag)) for tag in ['Object3DEnvironments','DRTSupport','onHDRDisplay','missingDynamicRangeType'])
filters=root.findall('.//filter')
assert len(filters)==1 and filters[0].get('pluginUUID')==PLUGIN_UUID
f=filters[0];params={p.get('id'):p for p in f.findall('parameter')}
assert len(params)==len(list(f.findall('parameter')))
assert params["10005"].get("value")=="1" and params["10005"].get("flags")=="8589934592" and f.get("pluginVersion")=="0"
for row in model['parameters']:
p=params[str(row['pid'])];assert float(p.get('default'))==float(row['default'])==float(p.get('value'))
p=params[str(row['pid'])];assert float(p.get('default'))==float(row.get('hostDefault',row['default'])) and float(p.get('value'))==float(row['default'])
assert all(not v in data for v in (b'CameraRawTables',b'1.png',b'relativeURL'))
assert len(root.findall('.//behavior'))==0 and len(root.findall('.//keypoint'))==0
assert scene.find('.//scenenode[@name="效果源"]/parameter[@id="2"]/parameter[@id="321"]').get('value')=='3'
@@ -134,24 +140,12 @@ def verify(data,model):
if node.tag in CONTENT_TAGS and node is not project and node.find('baseFlags') is not None and int(node.findtext('baseFlags'))&0x10000001:selected.append(node.get('id'))
assert not selected and scene.findtext('currentObject')==project.get('id')
pub=scene.find('publishSettings').findall('target')
assert [(t.get('object'),t.get('channel'),t.get('name')) for t in pub]==[('10081','./2/100','FCP 版本作者→'),('10082','./2/100','更多模板浏览器访问→'),('10060','./9000','大鱼调色'),('10060','./10001','混合')]
# Compare every native Rig/widget field after reversing entity/factory IDs.
rig=scene.find('scenenode[@id="10080"]');assert factories[rig.get('factoryID')]=='402246385249454b90e08b2ee1b6bf06'
reverse=copy.deepcopy(rig)
entity_map={'10080':'3356608241','10081':'3356608243','10082':'3356608245'}
for node in reverse.iter('scenenode'):
node.set('id',entity_map[node.get('id')]);node.set('factoryID','1' if node.get('factoryID')=='6' else '6')
def structure(node):return (node.tag,dict(node.attrib),(node.text or '').strip(),[structure(child) for child in node])
assert structure(reverse)==structure(E.parse(SOURCES/'CopyrightRig.xml').getroot())
assert [(t.get('object'),t.get('channel'),t.get('name')) for t in pub]==[('10060','./9000','大鱼调色'),('10060','./10001','混合')]
assert all(scene.find('.//scenenode[@id="'+identity+'"]') is None for identity in ['10080','10081','10082'])
assert all(text.encode() not in data for text in ['FCP 版本作者','更多模板浏览器访问','大鱼先森Media','dayu.media'])
assert not any(f.get('uuid')=='dd0036f96c9e4bfdadb82f71fbf5c9d8' for f in root.findall('factory'))
for widget_id,title,flags in [('10081','大鱼先森Media','16842768'),('10082','dayu.media','16842769')]:
widget=rig.find('scenenode[@id="'+widget_id+'"]');assert factories[widget.get('factoryID')]=='e35c74f01d5042f6b468eb530169bfb7'
menu=widget.find('parameter[@id="2"]/parameter[@id="100"]')
assert menu.attrib=={'name':'弹出式菜单','id':'100','flags':flags,'default':'2','value':'2'}
assert [entry.attrib for entry in menu.findall('entry')]==[{'name':title,'tag':'2'}]
assert widget.findtext('affecting')=='2' and widget.findtext('snapshot')=='3'
assert len({n.get('id') for n in scene.iter() if n.tag in CONTENT_TAGS})==len([n for n in scene.iter() if n.tag in CONTENT_TAGS])
return {'passed':True,'sha256':sha(data),'version':root.get('version'),'displayversion':root.findtext('displayversion'),'filterCount':1,'nativeFloatParameters':len(model['parameters']),'customParameters':3,'publications':[dict(t.attrib) for t in pub],'effectSourceType':3,'externalMediaRequired':False,'placeholder':'native Drop Zone.tiff','animationObjects':0,'copyright':{'passed':True,'rig':'10080','author':'10081','site':'10082','unbound':True},'savedSelection':{'passed':True,'selectedContentCount':0,'currentObjectIsProject':True},'hostUIVerified':False,'hostRenderVerified':False}
return {'passed':True,'sha256':sha(data),'version':root.get('version'),'displayversion':root.findtext('displayversion'),'filterCount':1,'nativeFloatParameters':len(model['parameters']),'customParameters':3,'publications':[dict(t.attrib) for t in pub],'effectSourceType':3,'externalMediaRequired':False,'placeholder':'native Drop Zone.tiff','animationObjects':0,'copyright':{'removedAtUserRequest':True,'publishedDisplayRows':0,'displayRigAbsent':True},'savedSelection':{'passed':True,'selectedContentCount':0,'currentObjectIsProject':True},'hostUIVerified':False,'hostRenderVerified':False}
def main():
+23
查看文件
@@ -0,0 +1,23 @@
#!/usr/bin/env python3
"""Create isolated print-look host projects using existing synthetic QA media."""
from pathlib import Path
import uuid
import xml.etree.ElementTree as E
QA=Path('/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa')
CHART=QA/'\u5927\u9c7c\u8c03\u8272\u9a8c\u6536\u56fe.png'
MOVIE=QA/'\u5927\u9c7c\u8c03\u8272_\u8499\u7248\u5408\u6210\u8fd0\u52a8.mov'
assert CHART.is_file() and MOVIE.is_file()
xml=E.Element('fcpxml',version='1.12');r=E.SubElement(xml,'resources')
E.SubElement(r,'format',id='f1',width='1920',height='1080',frameDuration='1/25s',colorSpace='1-1-1 (Rec. 709)')
E.SubElement(r,'format',id='f2',width='960',height='540',frameDuration='1/25s',colorSpace='1-1-1 (Rec. 709)')
E.SubElement(r,'format',id='still',width='1920',height='1080',name='FFVideoFormatRateUndefined')
for ident,path,fmt,duration in [('chart',CHART,'still','0s'),('movie',MOVIE,'f2','4s')]:
a=E.SubElement(r,'asset',id=ident,name=path.stem,start='0s',duration=duration,format=fmt,hasVideo='1',videoSources='1');E.SubElement(a,'media-rep',kind='original-media',src=path.as_uri())
E.SubElement(r,'effect',id='fx',name='大鱼调色',uid='~/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef')
event=E.SubElement(E.SubElement(xml,'library'),'event',name='大鱼调色_1.6_八种印片验收',uid=str(uuid.uuid4()).upper())
for name,asset,fmt in [('大鱼调色_1.6_八种印片','chart','f1'),('大鱼调色_1.6_黑白印片','chart','f1'),('大鱼调色_1.6_印片叠层与蒙版','movie','f2')]:
project=E.SubElement(event,'project',name=name,uid=str(uuid.uuid4()).upper());seq=E.SubElement(project,'sequence',format=fmt,duration='4s',tcStart='0s',tcFormat='NDF',audioLayout='stereo',audioRate='48k');spine=E.SubElement(seq,'spine')
clip=E.SubElement(spine,'video' if asset=='chart' else 'asset-clip',ref=asset,name=name,offset='0s',start='0s',duration='4s');E.SubElement(clip,'filter-video',ref='fx',name='大鱼调色',enabled='1')
# Apply settings through the installed native inspector, never hidden XML IDs.
E.indent(xml);destination=QA/'print-looks-1.6.fcpxml';destination.write_text('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE fcpxml>\n'+E.tostring(xml,encoding='unicode')+'\n');print(destination)
+13 -5
查看文件
@@ -19,10 +19,15 @@ def run(*args,log=None):
with Path(log).open('w') as f:subprocess.run(args,cwd=ROOT,stdout=f,stderr=subprocess.STDOUT,check=True)
return ''
return subprocess.check_output(args,cwd=ROOT,text=True,stderr=subprocess.STDOUT).strip()
def hosts_closed():
lines=run('ps','-axo','pid=,comm=').splitlines()
live=[l for l in lines if l.endswith(('/Contents/MacOS/Final Cut Pro','/Contents/MacOS/Motion'))]
if live:raise RuntimeError('请先正常退出宿主,再继续交付:'+str(live))
def hosts_closed(wait=False):
announced=False
while True:
lines=run('ps','-axo','pid=,comm=').splitlines()
live=[l for l in lines if l.endswith(('/Contents/MacOS/Final Cut Pro','/Contents/MacOS/Motion'))]
if not live:return
if not wait:raise RuntimeError('请先正常退出宿主,再继续交付:'+str(live))
if not announced:print('Notarized APP retained; waiting for the host to save and quit normally before replacement.',flush=True);announced=True
time.sleep(1)
def identity(path,expected):
p=plistlib.loads((path/'Contents/Info.plist').read_bytes())
if p['CFBundleIdentifier']!=expected:raise RuntimeError('产品身份不匹配: '+str(path))
@@ -53,6 +58,9 @@ def main():
for name in ['large.png','small.png']:
if (ROOT/'template'/name).exists():shutil.copy2(ROOT/'template'/name,b.parent/name)
identity(APP,'com.dayu.color');plugin=APP/PLUGIN;identity(plugin,'com.dayu.color.XPC')
# Xcode registers its build product with Launch Services. Keep the host from
# discovering this generated copy while signing/notarization are pending.
unregister(plugin);unregister(LOOSE)
for name in ['FxPlug','PluginManager']:run('codesign','--force','--timestamp','--options','runtime','--sign',IDENTITY,str(plugin/'Contents/Frameworks'/(name+'.framework')))
run('codesign','--force','--timestamp','--options','runtime','--sign',IDENTITY,str(plugin))
run('codesign','--force','--timestamp','--options','runtime','--entitlements',str(ROOT/'大鱼调色/Wrapper Application/SandboxEntitlements.entitlements'),'--sign',IDENTITY,str(APP))
@@ -69,7 +77,7 @@ def main():
if result.get('status')!='Accepted':
if result.get('id'):run('xcrun','notarytool','log',result['id'],'--keychain-profile',PROFILE,'--keychain',KEYCHAIN,str(CACHE/'notary-rejection.json'))
raise RuntimeError('Apple未Accepted,正式旧版未替换')
run('xcrun','stapler','staple',str(APP));run('xcrun','stapler','validate',str(APP));hosts_closed()
run('xcrun','stapler','staple',str(APP));run('xcrun','stapler','validate',str(APP));hosts_closed(wait=True)
stage=DEST.parent/('.dayu-color-staging-'+uuid.uuid4().hex+'.app');run('ditto',str(APP),str(stage))
if DEST.exists():
identity(DEST,'com.dayu.color');old=DEST.parent/('.dayu-color-previous-'+uuid.uuid4().hex+'.app');os.replace(DEST,old)
+64
查看文件
@@ -0,0 +1,64 @@
#!/usr/bin/env python3
"""Import the eight identity-verified local LMT tables into standalone Dayu data.
Run inspect_colorfinale_print --export first. Independent half decoding must
match every float returned by the installed reference's own cubeData property.
No vendor executable or shader is copied into the product.
"""
from pathlib import Path
import argparse
import array
import hashlib
import json
import math
import struct
import zlib
ROOT = Path(__file__).resolve().parent.parent
REFERENCE = Path('/Applications/ColorFinale.app/Contents/PlugIns/ColorFinale.pluginkit/Contents/Frameworks/RenderingEngine.framework/Versions/A')
IDENTITY = '32dca93459347e5ad363cb145d0ccf84b933b2045eee2c9535676a01744b84e3'
NAMES = ['kodak_2383', 'kodak_2393', 'kodak_2302_bw', 'fuji_3510', 'fuji_3513', 'fuji_3519', 'fuji_3521', 'agfa_cp30']
def digest(data):
return hashlib.sha256(data).hexdigest()
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--reference-export', required=True, type=Path)
args = parser.parse_args()
assert digest((REFERENCE / 'RenderingEngine').read_bytes()) == IDENTITY, 'Reference identity changed'
output = ROOT / '\u5927\u9c7c\u8c03\u8272/Plugin/Resources/PrintLooks'
output.mkdir(parents=True, exist_ok=True)
records = []
for number, name in enumerate(NAMES, 1):
source = (REFERENCE / 'Resources' / (name + '.lmt')).read_bytes()
# Observed local resource format: repeated SHA256 mask, RGB binary16,
# 65 cubed, red axis fastest. The literal prefix is exactly 23 bytes.
mask = hashlib.sha256(b'FT.ColorFinale.LMT.2026' + name.encode()).digest()
half = bytes(value ^ mask[index % 32] for index, value in enumerate(source))
assert len(half) == 65**3 * 6
floats = array.array('f')
for pixel in struct.iter_unpack('<eee', half):
assert all(math.isfinite(value) for value in pixel)
floats.extend((*pixel, 1.0))
if struct.pack('=I', 1) != struct.pack('<I', 1):
floats.byteswap()
raw = floats.tobytes()
assert raw == (args.reference_export / (name + '.rgba32f')).read_bytes(), name + ': native cubeData mismatch'
blob = struct.pack('<4sII6f', b'DYLT', 65, len(raw), 0, 0, 0, 1, 1, 1) + zlib.compress(raw, 9)
destination = output / (name + '.dylut')
destination.write_bytes(blob)
records.append(dict(index=number, name=name, side=65, sourceSHA256=digest(source), rgba32SHA256=digest(raw),
bytes=len(blob), sha256=digest(blob), resource=str(destination.relative_to(ROOT)),
nativeCubeDataByteIdentical=True))
manifest = dict(referenceVersion='2.16.2 (625)', referenceSHA256=IDENTITY, tables=records,
cubeOrder='red fastest; green; blue', interpolation='tetrahedral (six cases)',
sourceRole='data only; no reference executable or shader shipped')
(ROOT / 'research/PrintLooksResources.json').write_text(json.dumps(manifest, indent=2) + '\n')
print(json.dumps(dict(tables=len(records), bytes=sum(item['bytes'] for item in records), nativeCubeDataByteIdentical=True)))
if __name__ == '__main__':
main()
+48
查看文件
@@ -0,0 +1,48 @@
// Read-only reference metadata probe; never linked into the product.
#import <Foundation/Foundation.h>
#import <CoreImage/CoreImage.h>
#import <objc/runtime.h>
#import <objc/message.h>
#include <dlfcn.h>
int main(int argc,const char **argv){@autoreleasepool{
NSString *path=@"/Applications/ColorFinale.app/Contents/PlugIns/ColorFinale.pluginkit/Contents/Frameworks/RenderingEngine.framework/Versions/A/RenderingEngine";
if(!dlopen(path.fileSystemRepresentation,RTLD_NOW|RTLD_LOCAL)){fprintf(stderr,"%s\n",dlerror());return 1;}
NSMutableDictionary *out=[NSMutableDictionary dictionary];
if(argc==2&&strcmp(argv[1],"--matrix")==0){
Class space=NSClassFromString(@"FTColorSpace");id from=((id(*)(id,SEL))objc_msgSend)((id)space,sel_registerName("Rec709Linear"));id to=((id(*)(id,SEL))objc_msgSend)((id)space,sel_registerName("ACEScg"));
CIContext *context=[CIContext contextWithOptions:@{kCIContextWorkingColorSpace:NSNull.null,kCIContextOutputColorSpace:NSNull.null}];
float input[16]={1,0,0,1,0,1,0,1,0,0,1,1,1,1,1,1};
for(int direction=0;direction<2;direction++){
CIFilter *f=((id(*)(id,SEL,id,id))objc_msgSend)((id)NSClassFromString(@"FTColorSpaceFilter"),sel_registerName("filterFromColorSpace:toColorSpace:"),direction?to:from,direction?from:to);
if(!f)return 5;[f setValue:[CIImage imageWithBitmapData:[NSData dataWithBytes:input length:sizeof(input)] bytesPerRow:sizeof(input) size:CGSizeMake(4,1) format:kCIFormatRGBAf colorSpace:nil]forKey:kCIInputImageKey];float result[16]={};[context render:f.outputImage toBitmap:result rowBytes:sizeof(result) bounds:CGRectMake(0,0,4,1) format:kCIFormatRGBAf colorSpace:nil];
NSMutableArray *values=[NSMutableArray array];for(int i=0;i<16;i++)[values addObject:@(result[i])];out[direction?@"AP1-to-709":@"709-to-AP1"]=values;
}
NSData *json=[NSJSONSerialization dataWithJSONObject:out options:NSJSONWritingPrettyPrinted error:nil];fwrite(json.bytes,1,json.length,stdout);return 0;
}
if(argc==3&&strcmp(argv[1],"--export")==0){
NSString *directory=@(argv[2]);[[NSFileManager defaultManager]createDirectoryAtPath:directory withIntermediateDirectories:YES attributes:nil error:nil];
NSMutableArray *exports=[NSMutableArray array];
for(NSString *name in @[@"kodak_2383",@"kodak_2393",@"kodak_2302_bw",@"fuji_3510",@"fuji_3513",@"fuji_3519",@"fuji_3521",@"agfa_cp30"]){
id filter=((id(*)(id,SEL,id))objc_msgSend)((id)NSClassFromString(@"FTAcesLMTFilter"),sel_registerName("filterWithLMT:"),name);
NSData *data=[filter valueForKey:@"cubeData"];if(data.length!=65*65*65*16)return 3;
NSString *destination=[directory stringByAppendingPathComponent:[name stringByAppendingString:@".rgba32f"]];
if(![data writeToFile:destination atomically:YES])return 4;
[exports addObject:@{@"name":name,@"bytes":@(data.length),@"path":destination}];
}
NSData *json=[NSJSONSerialization dataWithJSONObject:exports options:NSJSONWritingPrettyPrinted error:nil];fwrite(json.bytes,1,json.length,stdout);return 0;
}
for(NSString *name in @[@"FTAcesLMTFilter",@"FTLMTCIImageProcessor",@"FTCubeProcessor",@"FTCubeCIImageProcessor",@"FTColorCubeFilter",@"FTAcesTypes",@"FTColorSpace"]){
Class cls=NSClassFromString(name);if(!cls)continue;
NSMutableDictionary *entry=[NSMutableDictionary dictionary];
for(int meta=0;meta<2;meta++){
unsigned count=0;Method *methods=class_copyMethodList(meta?object_getClass(cls):cls,&count);NSMutableArray *list=[NSMutableArray array];
for(unsigned i=0;i<count;i++)[list addObject:@{@"selector":NSStringFromSelector(method_getName(methods[i])),@"encoding":@(method_getTypeEncoding(methods[i]))}];free(methods);entry[meta?@"class":@"instance"]=list;
}
unsigned n=0;Ivar *ivars=class_copyIvarList(cls,&n);NSMutableArray *ivs=[NSMutableArray array];
for(unsigned i=0;i<n;i++)[ivs addObject:@{@"name":@(ivar_getName(ivars[i])),@"type":@(ivar_getTypeEncoding(ivars[i])),@"offset":@(ivar_getOffset(ivars[i]))}];free(ivars);entry[@"ivars"]=ivs;
out[name]=entry;
}
NSData *json=[NSJSONSerialization dataWithJSONObject:out options:NSJSONWritingPrettyPrinted|NSJSONWritingSortedKeys error:nil];
if(!json)return 2;fwrite(json.bytes,1,json.length,stdout);fputc('\n',stdout);return 0;
}}
+39
查看文件
@@ -0,0 +1,39 @@
#import <AppKit/AppKit.h>
#import "../大鱼调色/Shared/DYBetaDiagnostics.h"
#import "../大鱼调色/Wrapper Application/DYBetaUpdater.h"
static NSUInteger checks;
static void check(BOOL pass,NSString *name){if(!pass){fprintf(stderr,"FAIL %s\n",name.UTF8String);exit(1);}checks++;}
int main(int argc,char **argv){@autoreleasepool{
if(argc==2&&!strcmp(argv[1],"--live-update")){
DYBetaUpdater *updater=[DYBetaUpdater new];NSMutableArray *phases=[NSMutableArray array];__block BOOL done=NO,passed=NO,started=NO;
updater.changed=^(NSDictionary *state){NSString *phase=state[@"phase"];[phases addObject:phase];
if([phase isEqual:@"available"]){if(started){done=YES;fprintf(stderr,"%s\n",[state description].UTF8String);}else{started=YES;dispatch_async(dispatch_get_main_queue(),^{[updater download];});}}
if([phase isEqual:@"ready"]){done=YES;passed=YES;}
if([phase isEqual:@"failed"]||[phase isEqual:@"latest"]){done=YES;fprintf(stderr,"%s\n",[state description].UTF8String);}
};
[updater check];NSDate *deadline=[NSDate dateWithTimeIntervalSinceNow:360];
while(!done&&deadline.timeIntervalSinceNow>0)[NSRunLoop.currentRunLoop runUntilDate:[NSDate dateWithTimeIntervalSinceNow:.1]];
NSDictionary *result=@{@"passed":@(passed),@"phases":phases,@"source":@"production HTTPS beta endpoint and download",@"installation_performed":@NO};
printf("%s\n",[[[NSString alloc]initWithData:[NSJSONSerialization dataWithJSONObject:result options:0 error:nil] encoding:NSUTF8StringEncoding]autorelease].UTF8String);
updater.changed=nil;[updater cancel];return passed?0:1;
}
NSString *base=@"https://dayu.media/wp-content/uploads/dayu-color-beta/updates/";
NSMutableDictionary *manifest=[@{@"bundle_id":@"com.dayu.color",@"channel":@"beta",@"version":@"1.7.0",@"build":@45,@"size":@123,
@"sha256":[@"a" stringByPaddingToLength:64 withString:@"a" startingAtIndex:0],@"package_type":@"pkg",@"install_mode":@"pkg_installer",@"download_url":[base stringByAppendingString:@"dayu-color-1-7-0-45.pkg"]}mutableCopy];
check([DYBetaUpdater validateManifest:manifest error:nil],@"valid manifest");
for(NSString *key in manifest.allKeys){for(id bad in @[[NSNull null],@[],@{},@YES,@"",@(-1)]){NSMutableDictionary *changed=[[manifest mutableCopy]autorelease];changed[key]=bad;
check(![DYBetaUpdater validateManifest:changed error:nil],[NSString stringWithFormat:@"reject %@ %@",key,bad]);}}
check(![DYBetaUpdater validateManifest:(id)@[] error:nil],@"non dictionary manifest");
for(NSString *bad in @[@"http://dayu.media/wp-json/dayu-color/v1/update",@"https://dayu.media.evil.test/wp-json/dayu-color/v1/update",@"https://dayu.media:444/wp-json/dayu-color/v1/update",@"https://user@dayu.media/wp-json/dayu-color/v1/update",@"https://dayu.media/wp-json/other/v1/update",@"https://dayu.media/wp-json/dayu-color/v1/../other"])
check(!DYBetaAllowedURL([NSURL URLWithString:bad],NO),@"reject foreign URL");
NSDictionary *safe=DYBetaSafeFields(@{@"phase":@"end",@"frames":@"/Users/test/secret.mov",@"error_domain":@"token=secret",@"email":@"private@example.invalid",@"duration_ms":@(NAN)});
check([safe[@"frames"]isEqual:@"[REDACTED]"]&&[safe[@"error_domain"]isEqual:@"[REDACTED]"]&&!safe[@"email"]&&!safe[@"duration_ms"],@"privacy allowlist and redaction");
check(DYBetaSafeFields((id)@[]).count==0,@"bad fields do not crash");
if(argc==3){NSData *data=[NSData dataWithContentsOfFile:[NSString stringWithUTF8String:argv[2]]];NSDictionary *real=[NSJSONSerialization JSONObjectWithData:data options:0 error:nil];NSError *error=nil;
BOOL verified=[DYBetaUpdater validatePackage:[NSURL fileURLWithPath:[NSString stringWithUTF8String:argv[1]]] manifest:real error:&error];
if(!verified)fprintf(stderr,"%s\n",error.localizedDescription.UTF8String);check(verified,@"signed notarized full product package");
NSMutableDictionary *wrong=[[real mutableCopy]autorelease];wrong[@"sha256"]=[@"0" stringByPaddingToLength:64 withString:@"0" startingAtIndex:0];
check(![DYBetaUpdater validatePackage:[NSURL fileURLWithPath:[NSString stringWithUTF8String:argv[1]]] manifest:wrong error:nil],@"corrupt checksum refused before install");
}
printf("{\"passed\":true,\"checks\":%lu}\n",(unsigned long)checks);[manifest release];
}return 0;}
+127
查看文件
@@ -0,0 +1,127 @@
// Read-only oracle tool. Neither product builds nor product rendering load
// the installed Color Finale framework used here.
// Build with clang++ -std=c++17 -fno-objc-arc, Foundation/CoreImage/Metal.
#import <Foundation/Foundation.h>
#import <CoreImage/CoreImage.h>
#import <Metal/Metal.h>
#import <objc/message.h>
#import <CommonCrypto/CommonDigest.h>
#include <dlfcn.h>
#include <vector>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include "../大鱼调色/Plugin/DYUniforms.h"
using Floats=std::vector<float>;
static unsigned W=64,H=48;
static id<MTLDevice> gpu;
static id<MTLCommandQueue> queue;
static CIContext *context;
static BOOL bitmapNeedsVerticalFlip=NO;
static NSMutableArray *rows;
static NSMutableArray *conversionFilters,*conversionCalls;
static bool passed=true;
static constexpr double tolerance=1e-4;
static void require(bool condition,NSString *message){
if(!condition)@throw [NSException exceptionWithName:@"PrintReference" reason:message?:@"reference requirement failed" userInfo:nil];
}
static NSString *sha256(NSData *data){
require(data!=nil,@"identity file could not be read for SHA-256");
unsigned char digest[CC_SHA256_DIGEST_LENGTH];CC_SHA256(data.bytes,(CC_LONG)data.length,digest);
NSMutableString *text=[NSMutableString stringWithCapacity:64];for(unsigned char byte:digest)[text appendFormat:@"%02x",byte];return text;
}
static id finiteValue(float value){return std::isfinite(value)?(id)@(value):(id)@"nonfinite";}
static Floats flipped(const Floats& input){
Floats output(input.size());for(unsigned y=0;y<H;y++)memcpy(output.data()+y*W*4,input.data()+(H-1-y)*W*4,W*16);return output;
}
static NSDictionary *difference(const Floats& expected,const Floats& actual,const Floats *alphaSource=nullptr,float selectedAlpha=-1){
require(expected.size()==actual.size(),@"comparison dimensions differ");
double maximum=0,rgbMaximum=0,alphaMaximum=0,sum=0,straightMaximum=0;size_t count=0,nonfinite=0,worst=0,different=0;
for(size_t i=0;i<expected.size();i++){
if(alphaSource&&(*alphaSource)[(i/4)*4+3]!=selectedAlpha)continue;
double delta=fabs(double(expected[i])-actual[i]);
if(!std::isfinite(delta)){nonfinite++;continue;}
if(delta>maximum){maximum=delta;worst=i;}
if(i%4==3)alphaMaximum=fmax(alphaMaximum,delta);
else{rgbMaximum=fmax(rgbMaximum,delta);sum+=delta*delta;count++;if(delta>tolerance)different++;}
}
for(size_t i=0;i<expected.size()/4;i++){
if(alphaSource&&(*alphaSource)[i*4+3]!=selectedAlpha)continue;
float ea=expected[i*4+3],aa=actual[i*4+3];if(!(ea>0&&aa>0))continue;
for(int c=0;c<3;c++){double delta=fabs(double(expected[i*4+c])/ea-double(actual[i*4+c])/aa);if(std::isfinite(delta))straightMaximum=fmax(straightMaximum,delta);}
}
return @{@"maximum":@(maximum),@"rgbMaximum":@(rgbMaximum),@"alphaMaximum":@(alphaMaximum),@"rmsRGB":@(sqrt(sum/fmax(1,count))),@"straightRGBMaximum":@(straightMaximum),@"nonfinite":@(nonfinite),@"pixels":@(count/3),@"rgbComponentsOverTolerance":@(different),@"worstPixel":@{@"x":@((worst/4)%W),@"y":@((worst/4)/W),@"channel":@(worst%4),@"expected":finiteValue(expected[worst]),@"actual":finiteValue(actual[worst])}};
}
static NSArray *differencesByAlpha(const Floats& expected,const Floats& actual,const Floats& source){NSMutableArray *groups=[NSMutableArray array];for(float alpha:{0.f,1.f/65536,1e-4f,.03125f,.25f,1.f}){NSMutableDictionary *group=[NSMutableDictionary dictionaryWithDictionary:difference(expected,actual,&source,alpha)];group[@"sourceAlpha"]=@(alpha);[groups addObject:group];}return groups;}
static NSArray *samples(const Floats& source,const Floats& converted,const Floats& lmt,const Floats& decoded,const Floats& actual){NSMutableArray *result=[NSMutableArray array];for(NSUInteger index:{NSUInteger(0),NSUInteger(1),NSUInteger(6),NSUInteger(30),NSUInteger(54),NSUInteger(78),NSUInteger(102),NSUInteger(126)}){if(index>=size_t(W)*H)continue;auto pixel=[&](const Floats& values){NSMutableArray *array=[NSMutableArray array];for(int c=0;c<4;c++)[array addObject:finiteValue(values[index*4+c])];return array;};[result addObject:@{@"x":@(index%W),@"y":@(index/W),@"source":pixel(source),@"convertedToCCT":pixel(converted),@"lmt":pixel(lmt),@"decodedTo709":pixel(decoded),@"production":pixel(actual)}];}return result;}
static void record(NSString *name,NSDictionary *metrics,double limit,NSDictionary *extra=nil){
BOOL ok=[metrics[@"nonfinite"]unsignedLongLongValue]==0&&[metrics[@"maximum"]doubleValue]<=limit;
NSMutableDictionary *row=[NSMutableDictionary dictionaryWithDictionary:metrics];row[@"name"]=name;row[@"pass"]=@(ok);row[@"tolerance"]=@(limit);if(extra)[row addEntriesFromDictionary:extra];[rows addObject:row];passed&=ok;
}
static id<MTLTexture> texture(const Floats& values={}){
MTLTextureDescriptor *desc=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA32Float width:W height:H mipmapped:NO];desc.storageMode=MTLStorageModeShared;desc.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite|MTLTextureUsageRenderTarget;
id<MTLTexture> result=[gpu newTextureWithDescriptor:desc];require(result!=nil,@"RGBA32Float texture allocation failed");if(!values.empty()){require(values.size()==size_t(W)*H*4,@"source texture byte count");[result replaceRegion:MTLRegionMake2D(0,0,W,H) mipmapLevel:0 withBytes:values.data() bytesPerRow:W*16];}return [result autorelease];
}
static id<MTLTexture> cubeTexture(NSData *data){
const NSUInteger n=65;require(data.length==n*n*n*16,@"reference cubeData is not 65-cubed RGBA32Float");const float *values=(const float*)data.bytes;for(NSUInteger i=0;i<data.length/4;i++)require(std::isfinite(values[i]),@"reference cubeData contains nonfinite values");
MTLTextureDescriptor *desc=[MTLTextureDescriptor new];desc.textureType=MTLTextureType3D;desc.pixelFormat=MTLPixelFormatRGBA32Float;desc.width=desc.height=desc.depth=n;desc.storageMode=MTLStorageModeShared;desc.usage=MTLTextureUsageShaderRead;
id<MTLTexture> result=[gpu newTextureWithDescriptor:desc];[desc release];require(result!=nil,@"print cube texture allocation failed");[result replaceRegion:MTLRegionMake3D(0,0,0,n,n,n) mipmapLevel:0 slice:0 withBytes:data.bytes bytesPerRow:n*16 bytesPerImage:n*n*16];return [result autorelease];
}
static Floats read(id<MTLTexture> value){Floats result(size_t(W)*H*4);[value getBytes:result.data() bytesPerRow:W*16 fromRegion:MTLRegionMake2D(0,0,W,H) mipmapLevel:0];return result;}
static void finish(id<MTLCommandBuffer> commands){[commands commit];[commands waitUntilCompleted];require(commands.status==MTLCommandBufferStatusCompleted,commands.error.description?:@"Metal command failed");}
static CIImage *image(id<MTLTexture> value){CIImage *result=[CIImage imageWithMTLTexture:value options:@{kCIImageColorSpace:NSNull.null}];require(result!=nil,@"CIImage from Metal texture failed");return result;}
static Floats bitmapRaw(CIImage *value){require(value!=nil,@"reference output image missing");Floats result(size_t(W)*H*4);[context render:value toBitmap:result.data() rowBytes:W*16 bounds:CGRectMake(0,0,W,H) format:kCIFormatRGBAf colorSpace:nil];return result;}
static Floats bitmap(CIImage *value){Floats result=bitmapRaw(value);return bitmapNeedsVerticalFlip?flipped(result):result;}
static id colorSpace(NSString *name){
Class cls=NSClassFromString(@"FTColorSpace");SEL selector=NSSelectorFromString(name);require(cls&&[(id)cls respondsToSelector:selector],[@"reference color space missing: " stringByAppendingString:name]);id value=((id(*)(id,SEL))objc_msgSend)((id)cls,selector);require(value!=nil,@"reference color space factory failed");return value;
}
static CIImage *converted(CIImage *input,id from,id to){
Class cls=NSClassFromString(@"FTColorSpaceFilter");SEL selector=sel_registerName("filterFromColorSpace:toColorSpace:");require(cls&&[(id)cls respondsToSelector:selector],@"reference color conversion factory missing");CIFilter *filter=((id(*)(id,SEL,id,id))objc_msgSend)((id)cls,selector,from,to);require(filter!=nil,@"reference color conversion factory failed");[conversionFilters addObject:filter];[filter setValue:input forKey:kCIInputImageKey];CIImage *output=filter.outputImage;require(output!=nil,@"reference color conversion returned no image");[conversionCalls addObject:@{@"filter": [NSString stringWithFormat:@"%p",(void*)filter],@"outputImage":[NSString stringWithFormat:@"%p",(void*)output],@"fromSpace":[NSString stringWithFormat:@"%p",(void*)from],@"toSpace":[NSString stringWithFormat:@"%p",(void*)to]}];return output;
}
static Floats production(id<MTLComputePipelineState> pipeline,id<MTLTexture> source,id<MTLTexture> cube,DYUniforms uniforms){
id<MTLTexture> output=texture();id<MTLCommandBuffer> commands=[queue commandBuffer];id<MTLComputeCommandEncoder> encoder=[commands computeCommandEncoder];[encoder setComputePipelineState:pipeline];[encoder setTexture:source atIndex:0];[encoder setTexture:cube atIndex:1];[encoder setTexture:output atIndex:2];[encoder setBytes:&uniforms length:sizeof(uniforms) atIndex:0];[encoder dispatchThreads:MTLSizeMake(W,H,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)];[encoder endEncoding];finish(commands);return read(output);
}
static void orientationControls(){
Floats probe(size_t(W)*H*4);for(unsigned y=0;y<H;y++)for(unsigned x=0;x<W;x++){size_t i=(size_t(y)*W+x)*4;probe[i]=float(x+1)/(W+1)*.6f;probe[i+1]=float(y+1)/(H+1)*.7f;probe[i+2]=float((x+y*3)%17+1)/19;probe[i+3]=1;}
id<MTLTexture> source=texture(probe);CIImage *ci=image(source);Floats raw=bitmapRaw(ci);NSDictionary *direct=difference(probe,raw),*vertical=difference(probe,flipped(raw));double directMaximum=[direct[@"maximum"]doubleValue],verticalMaximum=[vertical[@"maximum"]doubleValue];bitmapNeedsVerticalFlip=verticalMaximum<directMaximum;
NSDictionary *selected=bitmapNeedsVerticalFlip?vertical:direct;record(@"ci-bitmap-orientation-control",selected,1e-7,@{@"rawMaximum":@(directMaximum),@"flippedMaximum":@(verticalMaximum),@"bitmapToMetalMemory":bitmapNeedsVerticalFlip?@"vertical-flip":@"identity"});require([selected[@"nonfinite"]unsignedLongLongValue]==0&&[selected[@"maximum"]doubleValue]<=1e-7,@"CI bitmap orientation control failed; comparisons not run");
id<MTLTexture> output=texture();id<MTLCommandBuffer> commands=[queue commandBuffer];[context render:ci toMTLTexture:output commandBuffer:commands bounds:CGRectMake(0,0,W,H) colorSpace:nil];finish(commands);NSDictionary *metrics=difference(probe,read(output));record(@"ci-texture-orientation-control",metrics,1e-7);require([metrics[@"nonfinite"]unsignedLongLongValue]==0&&[metrics[@"maximum"]doubleValue]<=1e-7,@"CI texture orientation control failed; comparisons not run");
}
static Floats sourcePixels(){
static const float patches[][3]={{0,0,0},{.001f,.001f,.001f},{.0078125f,.0078125f,.0078125f},{.18f,.18f,.18f},{1,1,1},{4,4,4},{16,16,16},{-.02f,-.02f,-.02f},{1,0,0},{0,1,0},{0,0,1},{1,1,0},{0,1,1},{1,0,1},{4,.1f,.01f},{.01f,.2f,8},{-.05f,.18f,.8f},{.25f,-.125f,.04f},{.01f,4,.5f},{.7f,.3f,.1f},{.035f,.07f,.14f},{2,.6f,-.02f},{-.1f,.04f,1.2f},{.5f,.5f,.5f}};
static const float alpha[]={0,1.f/65536,1e-4f,.03125f,.25f,1};Floats result(size_t(W)*H*4);for(size_t i=0;i<size_t(W)*H;i++){size_t patch=i%24;float a=alpha[(i+i/24)%6];for(int c=0;c<3;c++)result[i*4+c]=patches[patch][c]*a;result[i*4+3]=a;}return result;
}
static void writeJSON(NSDictionary *value){NSError *error=nil;NSData *data=[NSJSONSerialization dataWithJSONObject:value options:NSJSONWritingPrettyPrinted|NSJSONWritingSortedKeys error:&error];require(data!=nil,error.description?:@"JSON encoding failed");fwrite(data.bytes,1,data.length,stdout);fputc('\n',stdout);}
int main(int argc,const char **argv){@autoreleasepool{
rows=[NSMutableArray array];conversionFilters=[NSMutableArray array];conversionCalls=[NSMutableArray array];NSMutableDictionary *identity=[NSMutableDictionary dictionary];
@try{
require(argc==2||argc==4,@"Usage: verify_print_reference /absolute/path/default.metallib [width height]");if(argc==4){char *endW=nullptr,*endH=nullptr;long width=strtol(argv[2],&endW,10),height=strtol(argv[3],&endH,10);require(endW&&!*endW&&endH&&!*endH&&width>0&&height>0&&width<=4096&&height<=4096,@"reference dimensions must be integers from 1 through 4096");W=(unsigned)width;H=(unsigned)height;}
gpu=MTLCreateSystemDefaultDevice();require(gpu!=nil,@"Metal device unavailable");queue=[gpu newCommandQueue];require(queue!=nil,@"Metal command queue unavailable");context=[CIContext contextWithMTLDevice:gpu options:@{kCIContextWorkingColorSpace:NSNull.null,kCIContextOutputColorSpace:NSNull.null,kCIContextWorkingFormat:@(kCIFormatRGBAf),kCIContextCacheIntermediates:@NO}];require(context!=nil,@"RGBAf CIContext unavailable");
NSError *error=nil;NSString *libraryPath=@(argv[1]);id<MTLLibrary> dayu=[gpu newLibraryWithURL:[NSURL fileURLWithPath:libraryPath] error:&error];require(dayu!=nil,error.description?:@"product Metal library unavailable");id<MTLFunction> function=[dayu newFunctionWithName:@"dyFilmPrint"];require(function!=nil,@"product dyFilmPrint function missing");id<MTLComputePipelineState> pipeline=[gpu newComputePipelineStateWithFunction:function error:&error];[function release];require(pipeline!=nil,error.description?:@"dyFilmPrint pipeline creation failed");identity[@"productMetallib"]=libraryPath;identity[@"productMetallibSHA256"]=sha256([NSData dataWithContentsOfFile:libraryPath]);
NSString *framework=@"/Applications/ColorFinale.app/Contents/PlugIns/ColorFinale.pluginkit/Contents/Frameworks/RenderingEngine.framework/Versions/A/RenderingEngine";require(dlopen(framework.fileSystemRepresentation,RTLD_NOW|RTLD_LOCAL)!=nullptr,@"cannot load installed reference RenderingEngine");NSBundle *reference=[NSBundle bundleWithPath:@"/Applications/ColorFinale.app"];identity[@"referenceVersion"]=[reference objectForInfoDictionaryKey:@"CFBundleShortVersionString"]?:@"unknown";identity[@"referenceBuild"]=[reference objectForInfoDictionaryKey:@"CFBundleVersion"]?:@"unknown";identity[@"referenceFrameworkSHA256"]=sha256([NSData dataWithContentsOfFile:framework]);
orientationControls();Floats source=sourcePixels(),opaqueSource=source;for(size_t i=0;i<source.size()/4;i++){float a=source[i*4+3];for(int c=0;c<3;c++)opaqueSource[i*4+c]=a>0?source[i*4+c]/a:0;opaqueSource[i*4+3]=1;}id<MTLTexture> input=texture(source),opaqueInput=texture(opaqueSource);id from=colorSpace(@"Rec709Linear"),to=colorSpace(@"ACEScct");NSArray *names=@[@"kodak_2383",@"kodak_2393",@"kodak_2302_bw",@"fuji_3510",@"fuji_3513",@"fuji_3519",@"fuji_3521",@"agfa_cp30"];NSMutableArray *cubes=[NSMutableArray array],*diagnostics=[NSMutableArray array];double rawChainDiscrepancyMaximum=0;
for(NSUInteger look=0;look<names.count;look++){@autoreleasepool{
NSString *name=names[look];Class cls=NSClassFromString(@"FTAcesLMTFilter");SEL selector=sel_registerName("filterWithLMT:");require(cls&&[(id)cls respondsToSelector:selector],@"reference LMT factory missing");CIFilter *filter=((id(*)(id,SEL,id))objc_msgSend)((id)cls,selector,name);require(filter!=nil,[@"reference LMT factory failed: " stringByAppendingString:name]);NSData *data=[filter valueForKey:@"cubeData"];require([data isKindOfClass:NSData.class],@"reference LMT cubeData unavailable");id<MTLTexture> cube=cubeTexture(data);[cubes addObject:@{@"name":name,@"bytes":@(data.length),@"sha256":sha256(data)}];
CIImage *rawConverted=converted(image(input),from,to);[filter setValue:rawConverted forKey:kCIInputImageKey];CIImage *rawLMT=filter.outputImage,*output=converted(rawLMT,to,from);Floats referenceOutput=bitmap(output),convertedValues=bitmap(rawConverted),lmtValues=bitmap(rawLMT);double nativeAlphaMaximum=0;for(size_t i=0;i<source.size()/4;i++)nativeAlphaMaximum=fmax(nativeAlphaMaximum,fabs(double(referenceOutput[i*4+3])-source[i*4+3]));
CIFilter *opaqueFilter=((id(*)(id,SEL,id))objc_msgSend)((id)cls,selector,name);CIImage *opaqueConverted=converted(image(opaqueInput),from,to);[opaqueFilter setValue:opaqueConverted forKey:kCIInputImageKey];CIImage *opaqueLMT=opaqueFilter.outputImage;Floats opaqueReference=bitmap(converted(opaqueLMT,to,from)),opaqueConvertedValues=bitmap(opaqueConverted),opaqueLMTValues=bitmap(opaqueLMT);DYUniforms opaqueUniforms={};opaqueUniforms.film.enabled=opaqueUniforms.film.mix=1;opaqueUniforms.filmPrint=(DYFloat4){float(look+1),1,0,0};Floats opaqueActual=production(pipeline,opaqueInput,cube,opaqueUniforms);record([@"opaque-colour-control-" stringByAppendingString:name],difference(opaqueReference,opaqueActual),tolerance);
DYUniforms rawUniforms=opaqueUniforms;Floats rawActual=production(pipeline,input,cube,rawUniforms);NSDictionary *rawMetrics=difference(referenceOutput,rawActual);rawChainDiscrepancyMaximum=fmax(rawChainDiscrepancyMaximum,[rawMetrics[@"maximum"]doubleValue]);[diagnostics addObject:@{@"name":name,@"rawPremultipliedChainComparison":rawMetrics,@"rawChainBySourceAlpha":differencesByAlpha(referenceOutput,rawActual,source),@"rawChainSamples":samples(source,convertedValues,lmtValues,referenceOutput,rawActual),@"opaqueChainSamples":samples(opaqueSource,opaqueConvertedValues,opaqueLMTValues,opaqueReference,opaqueActual)}];
for(float strength:{1.f,.35f,0.f}){
// FTColorSpaceFilter is a straight-colour function, while the original
// LMT image processor unpremultiplies its input and premultiplies output.
// A raw fractional-alpha concatenation therefore does not implement a
// consistent image contract. Keep its measured discrepancy above. The
// independent colour oracle uses the original chain at alpha one, then
// explicitly restores the host's premultiplied-alpha contract here.
DYUniforms uniforms={};uniforms.film.enabled=1;uniforms.film.mix=1;uniforms.filmPrint=(DYFloat4){float(look+1),strength,0,0};Floats expected=source;if(strength>0)for(size_t i=0;i<expected.size()/4;i++){float a=source[i*4+3];if(a>0)for(int c=0;c<3;c++)expected[i*4+c]=source[i*4+c]*(1-strength)+opaqueReference[i*4+c]*a*strength;}
Floats actual=production(pipeline,input,cube,uniforms);NSDictionary *metrics=difference(expected,actual);record([NSString stringWithFormat:@"original-print-%@-strength-%.2f",name,strength],metrics,tolerance,@{@"lookID":@(look+1),@"strength":@(strength),@"nativeReferenceAlphaMaximum":@(nativeAlphaMaximum),@"bySourceAlpha":differencesByAlpha(expected,actual,source)});
}
}}
NSMutableSet *factoryPointers=[NSMutableSet set];for(NSDictionary *call in conversionCalls)[factoryPointers addObject:call[@"filter"]];identity[@"conversionFactoryCallCount"]=@(conversionCalls.count);identity[@"distinctLiveConversionFilters"]=@(factoryPointers.count);identity[@"conversionFactorySingletonObserved"]=@(factoryPointers.count!=conversionCalls.count);
NSDictionary *result=@{@"pass":@(passed),@"checks":@(rows.count),@"width":@(W),@"height":@(H),@"gpu":gpu.name,@"tolerance":@(tolerance),@"textureFormat":@"RGBA32Float",@"ciWorkingFormat":@"RGBAf",@"referenceChain":@"Original FTColorSpaceFilter Rec709Linear -> ACEScct; FTAcesLMTFilter filterWithLMT: (native defaults); FTColorSpaceFilter ACEScct -> Rec709Linear, evaluated at alpha one, then explicitly premultiplied with the source alpha",@"rawPremultipliedChainEquivalent":@(rawChainDiscrepancyMaximum<=tolerance),@"rawPremultipliedChainDiscrepancyMaximum":@(rawChainDiscrepancyMaximum),@"scope":@"All eight original print tables, strengths 1/0.35/0, premultiplied linear Rec.709 grayscale/color/negative/HDR vectors, alpha {0,1/65536,0.0001,0.03125,0.25,1}. Bitmap orientation is measured against an asymmetric identity control before comparing; texture roundtrip must be identity. The original colour chain is independently checked at alpha one. Its raw fractional-alpha chain is retained as a non-gating diagnostic because FTColorSpaceFilter treats RGB as straight while the LMT processor unpremultiplies/premultiplies. Host alpha restoration is explicit, not claimed as full reference CMS equivalence. All pixels, including alpha zero, are compared. Straight RGB maximum is diagnostic; pass uses absolute premultiplied RGBA error. No half-float quantization or relaxed tolerance is applied.",@"identity":identity,@"referenceCubes":cubes,@"diagnostics":diagnostics,@"conversionFactories":conversionCalls,@"results":rows};writeJSON(result);[pipeline release];[dayu release];return passed?0:1;
}@catch(NSException *exception){
writeJSON(@{@"pass":@NO,@"checks":@(rows.count),@"width":@(W),@"height":@(H),@"tolerance":@(tolerance),@"identity":identity,@"error":exception.reason?:@"unknown reference failure",@"results":rows});return 2;
}
}}
+36
查看文件
@@ -0,0 +1,36 @@
#!/usr/bin/env python3
"""Project-scoped 5.11 validation against recorded native FxPlug structure.
The global skill checker currently admits 5.13+, so its original 5.11 guard
result is retained separately; this does not relabel that checker as passed.
"""
from pathlib import Path
import hashlib
import json
import runpy
import xml.etree.ElementTree as E
ROOT=Path(__file__).resolve().parent.parent
module=runpy.run_path(str(ROOT/'tools/build_template.py'),run_name='template_contract')
file=ROOT/'template'/'\u5927\u9c7c\u8c03\u8272.moef'
data=file.read_bytes();contract=module['verify'](data,module['metadata']())
root=E.fromstring(data);scene=root.find('scene');factories={f.get('id'):f.get('uuid') for f in root.findall('factory')}
project=[node for node in scene.findall('scenenode') if factories.get(node.get('factoryID'))==module['PROJECT_UUID']][0]
assert root.get('version')=='5.11' and root.findtext('displayversion')=='5.4.5'
mask=0x10000001;selected=[];checked=0
for node in scene.iter():
if node.tag in module['CONTENT_TAGS'] and node is not project:
if node.find('baseFlags') is not None:
checked+=1
if int(node.findtext('baseFlags'))&mask:selected.append(node.get('id'))
assert not selected and scene.findtext('currentObject')==project.get('id')
assert int(project.findtext('baseFlags'))==268435473
selection=dict(passed=True,sha256=hashlib.sha256(data).hexdigest(),version='5.11',selectionMask=hex(mask),projectID=project.get('id'),contentObjectsChecked=checked,selectedContent=[],selectedContentCount=0,currentObject=scene.findtext('currentObject'),currentObjectIsProject=True,nativeUIVerified=False,validator='project-scoped native-5.11 field comparison',scope='Saved fields only; no rendering or old-FCP execution')
qa=ROOT/'template/verification';(qa/'SavedSelection.json').write_text(json.dumps(selection,indent=2)+'\n')
skill=json.loads((qa/'SkillAudit.json').read_text())
assert skill['errors']==['Saved selection: Unverified Motion XML version/schema; obtain native evidence first']
assert skill['basic']['entity_ids_unique'] and skill['basic']['published_count']==2 and not skill['basic']['unresolved_media']
evidence=dict(path='~/Movies/Motion Templates.localized/Effects.localized/Color Finale/ColorFinalePro/ColorFinalePro.moef',sha256='bfab9157b988acaf5c078a0837085843f2021e93a2e411eec9d94120f11ddd69',version='5.11',displayversion='5.4.5',projectBaseFlags=268435473,currentObject='10000',scenenodeVersion='5',widgetBaseFlags=16,layerAndSourceBaseFlags=524304,fxPlugBaseFlags=8589934608,allContentSelectionBits=0)
report=dict(passed=True,sha256=selection['sha256'],version='5.11',displayversion='5.4.5',nativeReference=evidence,staticContract=contract,savedSelection=selection,skillCheckerStatus='unsupported-version-guard; original SkillAudit.json retained unchanged',otherSkillStructuralErrors=[],copyrightDisplayRows=0,oldFCPActuallyTested=False,scope='Native-template structure and saved-state comparison only; FCP host acceptance is separate')
(qa/'Compatibility.json').write_text(json.dumps(report,ensure_ascii=False,indent=2)+'\n')
print(json.dumps(dict(passed=True,version=report['version'],displayversion=report['displayversion'],copyrightDisplayRows=0,contentSelected=0,oldFCPActuallyTested=False)))
+10
查看文件
@@ -0,0 +1,10 @@
{
"path": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/mu-plugins/dayu-color-beta.php",
"sha256": "d2b73816e871765bc2f7d1604a1beda98b99e2d9ac4f62039de7bf3a81107593",
"backup": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/mu-plugins/dayu-color-beta-202611021738.phpbak",
"size": 14220,
"timestamp": "202611021738",
"mount": "//dayu@192.168.31.21/dayumedia%20%28%E5%AD%98%E5%82%A8%E7%A9%BA%E9%97%B41%29 on /Volumes/dayumedia (存储空间1) (smbfs, nodev, nosuid, mounted by mac)",
"localProject": "/Users/mac/Downloads/dayumedia/dayu-color-beta",
"sourceCommit": "e37330a4b5a1ad8c10a05fbc6cd3c37be87dc530"
}
+29
查看文件
@@ -0,0 +1,29 @@
{
"passed": true,
"checked_at": "2026-11-02T09:40:25.115993+00:00",
"checks": [
"update GET",
"product isolation",
"admin read denied anonymously",
"diagnostic stored ACK",
"retry same UUID ACK",
"foreign upload denied"
],
"test_event_id": "fe84a41b-84a4-41f8-ba22-afd62655506e",
"test_installation_id": "c1f91498-dda9-4219-bb86-decaba573e18",
"update": {
"bundle_id": "com.dayu.color",
"channel": "beta",
"version": "1.7.0",
"build": 45,
"package_type": "pkg",
"install_mode": "pkg_installer",
"size": 40898751,
"sha256": "a3578ee95aa7333e64d556061173fb73a42be0e45442ae844c94147b421d34bb",
"download_url": "https://dayu.media/wp-content/uploads/dayu-color-beta/updates/dayu-color-1-7-0-45.pkg",
"minimum_system_version": "14.6",
"notes": "公测版:接入自动更新与可关闭的云端诊断,记录插件加载耗时及错误摘要。请保存并退出 FCP / Motion 后安装。",
"update_available": true,
"checked_at": "2026-11-02T09:40:23+00:00"
}
}
+4
查看文件
@@ -0,0 +1,4 @@
{
"passed": true,
"checks": 20
}
+22
查看文件
@@ -0,0 +1,22 @@
{
"version": "1.7.0",
"build": 45,
"checkedAt": "2026-11-02T09:38:49.424288+00:00",
"formalApp": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"nativeChecks": 395,
"inspector": "FCP 12.4 UI shows 1.7.0; exposure changed 0.00 -> 0.35 and restored 0.00; image responds",
"diagnosticsToggle": "off disables upload/manual button; on restores; manual summary acknowledged",
"cloudEvidence": {
"installationID": "113ffef4-5e7e-482b-a451-abd2dc6af83a",
"pluginSessionPrefix": "ec3d4c05",
"event": "first_render",
"durationMS": 111.8215833330396,
"status": "passed",
"observedInAdmin": true
},
"limitations": [
"Single local FCP run does not establish intermittent hang root cause",
"Previous explicit user confirmation applied to build44; build45 host check performed by agent"
],
"startupCountdown": "AX observed 3-second countdown in build45; process subsequently exited normally with registration-succeeded; plugin XPC remained running in FCP"
}
+1
查看文件
@@ -0,0 +1 @@
{"passed":true,"checks":66}
+16
查看文件
@@ -0,0 +1,16 @@
{
"path": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/uploads/dayu-color-beta/updates/dayu-color-1-7-0-45.pkg",
"sha256": "a3578ee95aa7333e64d556061173fb73a42be0e45442ae844c94147b421d34bb",
"backup": null,
"size": 40898751,
"manifest": {
"path": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/uploads/dayu-color-beta/updates/beta.json",
"sha256": "30c92debf91de7ab8215b35dc64a4ddb764e53450c327ae53fb41a4c2f7a26c0",
"backup": null,
"size": 558
},
"version": "1.7.0",
"build": 45,
"downloadURL": "https://dayu.media/wp-content/uploads/dayu-color-beta/updates/dayu-color-1-7-0-45.pkg",
"timestamp": "202611021740"
}
+17
查看文件
@@ -0,0 +1,17 @@
{
"passed": true,
"source": "production HTTPS beta endpoint and download",
"phases": [
"checking",
"available",
"downloading",
"validating",
"ready"
],
"installation_performed": false,
"bytes": 40898751,
"sha256": "a3578ee95aa7333e64d556061173fb73a42be0e45442ae844c94147b421d34bb",
"downloadURL": "https://dayu.media/wp-content/uploads/dayu-color-beta/updates/dayu-color-1-7-0-45.pkg",
"sameBuildHasNoUpdate": true,
"lowerBuildHasUpdate": true
}
+7 -9
查看文件
@@ -2,17 +2,15 @@
"status": "verified",
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"bundleID": "com.dayu.color",
"version": "1.5.0",
"build": "34",
"version": "1.7.0",
"build": "45",
"team": "B3W25FX5H5",
"notaryID": "164abf2b-4e67-4504-b72a-04122da9e381",
"notaryID": "777a5c05-4936-4b14-b8e8-0c789c1df05c",
"notaryStatus": "Accepted",
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
"sourceCommit": "06d531c443b0bb2f179022a4e64148394f5d0690",
"sourceCommit": "a0f37578f73d7f8faa872d9a81009e2d6586a858",
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
"templateSHA256": "7476fb5a3cfad5f4dafb7a887dcc787b9cbcba6ad64df3b4939b336444cf8bfc",
"shaderSHA256": "b05051fa34cf68bfb7fd3cc77f277620c7e744f927c35dd956e144ed1f748679",
"hostVerification": "verification/HostFilmMixer1.5.0.json",
"nativeChecks": 349,
"referenceChecks": 184
"templateSHA256": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250",
"shaderSHA256": "6ec98b85aeb841f9988a4b66e3e5fba9e34d5ab3d7542c9205b0480c77f9ac6d",
"hostVerification": "verification/BetaClientQA.json"
}
+22
查看文件
@@ -0,0 +1,22 @@
{
"status": "verified",
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"bundleID": "com.dayu.color",
"version": "1.6.0",
"build": "36",
"team": "B3W25FX5H5",
"notaryID": "91224ae2-68d3-4776-a9b7-2fdf8ffaea4f",
"notaryStatus": "Accepted",
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
"sourceCommit": "f97320bbee6d469596f2db72a48436b73a41b324",
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
"templateSHA256": "a7e671bab3a55ba413395d91d710c7b5893cd24e1cd63c84d8c7572d4e527152",
"shaderSHA256": "6ec98b85aeb841f9988a4b66e3e5fba9e34d5ab3d7542c9205b0480c77f9ac6d",
"hostVerification": "verification/HostPrintLooks1.6.0.json",
"nativeChecks": 393,
"printReferenceChecks": 136,
"hostAcceptanceCompleted": "2026-11-02T07:09:11.437885+00:00",
"completionNote": "Delivery worker stdin ended after formal installation; finalization resumed under the product lock after cold-reopen host acceptance.",
"historicalBuild": true,
"supersededByBuild": "38"
}
+32
查看文件
@@ -0,0 +1,32 @@
{
"status": "verified",
"formalApp": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"version": "1.5.0",
"build": "34",
"bundleID": "com.dayu.color",
"scannedRoots": [
"/Volumes/备份/大鱼调色",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color",
"/Applications",
"/Users/mac/Library/Plug-Ins/FxPlug",
"/Library/Plug-Ins/FxPlug"
],
"remainingOuterApps": [
"/Library/Plug-Ins/FxPlug/大鱼调色.app"
],
"pluginKit": "com.dayu.color.XPC(1.1)\tB407E365-8C67-47E2-9BAD-2A72A2E551AC\t2026-11-02 05:58:09 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit\n (1 plug-in)",
"removedNow": [
"/Users/mac/Library/Caches/CodexRecovery/dayu-color-film-1.5.0",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/RecoveryDerivedData",
"/Volumes/备份/大鱼调色-1.5.0.pkg"
],
"generatedAppCopiesAlreadyRemoved": [
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/RecoveryDerivedData/Build/Products/Release/大鱼调色.app",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/RecoveryDerivedData/Build/Products/Release/大鱼调色 XPC Service.pluginkit"
],
"formalDeliveryCopiesRemovedBy": "tools/deliver.py complete",
"historicalInstallersPreserved": true,
"userMediaAndPresetsPreserved": true,
"finalPackage": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.5.0.pkg",
"wholeDiskUniquenessClaimed": false
}
@@ -0,0 +1,21 @@
{
"status": "verified",
"remote": "https://dayu.media/git/dayu/dayu-color.git",
"tag": "v1.5.0-film-mixer-20261102",
"commit": "85b6590944c4fb64825cf45f61c5280d4ffaa824",
"filesByteCompared": 264,
"fsck": "full/strict passed",
"lfs": false,
"submodules": false,
"independentReleaseBuildAnd349Checks": "verification/FilmMixerRecovery.json",
"recoveryBuildCommit": "eeeee102cd78b8f99be743be634739286fed8a76",
"compiledAppCommit": "06d531c443b0bb2f179022a4e64148394f5d0690",
"sourceDifference": [
"tools/deliver.py"
],
"appSourceUnchanged": true,
"clone": "/Users/mac/Library/Caches/CodexRecovery/dayu-color-film-1.5.0",
"cloneRemoved": true,
"recoveryDerivedDataRemoved": true,
"releaseTagAppSourceMatchesCompiledCommit": true
}
@@ -0,0 +1,95 @@
{
"status": "passed",
"version": "1.6.0",
"build": "39",
"compiledSource": "e5affd3f097fc96f87f41be8e1a3f131ed01daeb",
"previousPrintHostVerification": "verification/HostPrintLooksBuild36.json",
"nativeChecks": 395,
"printReferenceChecks": 136,
"existingPresetBaselines": {
"agfa": {
"bytes": 8474,
"sha256": "3e21a09a4710709a75b09320928522864fa9facfcdf0cb3910588f7de64294b0"
},
"bw": {
"bytes": 8456,
"sha256": "c0fb7408b15231c96a7af0e6baab17ec433e90afdf3478476701063e40246be0"
},
"layer-mask": {
"bytes": 32554,
"sha256": "3713101dee2937c4a0730bca9dd1a667d2aa43c16f3c1114af5924ea706ea6ff"
}
},
"requestedWebsite": "https://dayu.media",
"requestedLinkText": "更多插件访问 https://dayu.media",
"privacy": "User presets, media and FCP libraries remain local.",
"oldPrintPresetComparison": {
"bw": {
"bytes": 8456,
"sha256": "969b37b5eae60207a9f905693a345017163584b1dce342c91fac744784d594de",
"unchangedOtherValues": 277,
"changedDefault": {
"cmtoneMapping": [
0,
1
]
},
"pathsSpiderToolsUnchanged": true
},
"agfa": {
"bytes": 8474,
"sha256": "8030589872ce70180615c4ee7ae70db47232403a2142d127b85a6777cc8c4fde",
"unchangedOtherValues": 277,
"changedDefault": {
"cmtoneMapping": [
0,
1
]
},
"pathsSpiderToolsUnchanged": true
},
"layer-mask": {
"bytes": 32554,
"sha256": "3b8ba9285599f48def26b5f87c3c83a270dd01b7fac26f434ca96df3dfda1597",
"unchangedOtherValues": 277,
"changedDefault": {
"cmtoneMapping": [
0,
1
]
},
"pathsSpiderToolsUnchanged": true
}
},
"newFCPInstanceMapping": 1,
"newIndependentPrimaryMapping": 1,
"explicitManualBaseMapping": 0,
"headerLinkObservedAs": "NSAccessibilityLinkRole",
"clickedBrowser": "Microsoft Edge",
"clickedURL": "https://dayu.media",
"copyrightRowsAbsent": true,
"defaultMigrationBoundary": "FCP instances using omitted/default values adopted the new template enabled value. Other saved values and custom payloads were unchanged. The legacy host registration default remains zero; this alone does not freeze old FCP template defaults.",
"passResult": true,
"completed": "2026-11-02T07:27:53.369385+00:00",
"manualOffIndependentOnColdReopen": {
"byteIdentical": true,
"bytes": 8668,
"sha256": "303137a11458c65cafee331478c270670a6fbb1a39c59bdd6a1c0ec65ee9080a"
},
"resetAllMapping": 1,
"headerVisualLayoutVerified": true,
"export": {
"name": "print-default-header-1.6.mov",
"bytes": 16053180,
"codec_name": "prores",
"width": 1920,
"height": 1080,
"r_frame_rate": "25/1",
"duration": "4.000000",
"nb_frames": "100",
"allFramesDecoded": true
},
"formalRuntime": [
"30802 /Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit/Contents/MacOS/大鱼调色 XPC Service"
]
}
+62
查看文件
@@ -0,0 +1,62 @@
{
"status": "passed",
"passResult": true,
"version": "1.6.0",
"build": "39",
"compiledSource": "e5affd3f097fc96f87f41be8e1a3f131ed01daeb",
"host": "Final Cut Pro 12.4",
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"nativeChecks": 395,
"referenceChecks": 136,
"kernelSHA256": "6ec98b85aeb841f9988a4b66e3e5fba9e34d5ab3d7542c9205b0480c77f9ac6d",
"kernelIdenticalToBuild36": true,
"detailedEightLookHostAcceptance": "verification/HostPrintLooksBuild36.json",
"finalDefaultLinkAndRetentionAcceptance": "verification/HostPrimaryDefaults1.6.0.json",
"retention": {
"bw": {
"bytes": 8456,
"sha256": "969b37b5eae60207a9f905693a345017163584b1dce342c91fac744784d594de",
"unchangedOtherValues": 277,
"changedDefault": {
"cmtoneMapping": [
0,
1
]
},
"pathsSpiderToolsUnchanged": true
},
"agfa": {
"bytes": 8474,
"sha256": "8030589872ce70180615c4ee7ae70db47232403a2142d127b85a6777cc8c4fde",
"unchangedOtherValues": 277,
"changedDefault": {
"cmtoneMapping": [
0,
1
]
},
"pathsSpiderToolsUnchanged": true
},
"layer-mask": {
"bytes": 32554,
"sha256": "3b8ba9285599f48def26b5f87c3c83a270dd01b7fac26f434ca96df3dfda1597",
"unchangedOtherValues": 277,
"changedDefault": {
"cmtoneMapping": [
0,
1
]
},
"pathsSpiderToolsUnchanged": true
}
},
"template": {
"version": "5.11",
"displayversion": "5.4.5",
"sha256": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250",
"copyrightRowsAbsent": true,
"headerLinkClickedURL": "https://dayu.media",
"oldFCPActuallyTested": false
},
"privacy": "Full user presets/media/FCP library remain local."
}
+102
查看文件
@@ -0,0 +1,102 @@
{
"status": "passed",
"version": "1.6.0",
"build": "36",
"compiledSource": "f97320bbee6d469596f2db72a48436b73a41b324",
"host": "Final Cut Pro 12.4",
"userCompatibility": {
"beforePresetVersion": 5,
"afterPresetVersion": 6,
"oldValues": 276,
"newValues": 278,
"allExistingValuesUnchanged": true,
"pathsSpiderAndToolsUnchanged": true,
"printDefaultNone": true,
"beforeBytes": 8669,
"afterBytes": 8723,
"beforeSHA256": "b7c2f31e763b641b86eea4a4a94100e9aa953fd0c56741b97f26c428370f6351",
"afterSHA256": "96e886f2fe5b3b79630d5ec9d392ef2075f4dd44f6f109757e8634fef2e795f9"
},
"template": {
"version": "5.11",
"displayversion": "5.4.5",
"authorAndWebsiteRowsAbsentInExistingInstance": true,
"authorAndWebsiteRowsAbsentInFreshInstance": true,
"currentFCPHostVerified": true,
"olderFCPActuallyTested": false
},
"nativeChecks": 393,
"referenceChecks": 136,
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"privacy": "Full presets and media remain local; aggregate counts and hashes only",
"exports": [
{
"name": "print-agfa-1.6.mov",
"bytes": 14402174,
"codec": "prores",
"width": 1920,
"height": 1080,
"fps": "25/1",
"frames": 100,
"allFramesDecoded": true
},
{
"name": "print-bw-1.6.mov",
"bytes": 9634782,
"codec": "prores",
"width": 1920,
"height": 1080,
"fps": "25/1",
"frames": 100,
"allFramesDecoded": true
},
{
"name": "print-layer-mask-1.6.mov",
"bytes": 24182892,
"codec": "prores",
"width": 960,
"height": 540,
"fps": "25/1",
"frames": 100,
"allFramesDecoded": true
}
],
"bwExportChannelMaxDifference16bit": 0,
"hostChecks": {
"allEightMenuSelections": true,
"newLayerDefaultNone": true,
"baseLook": 1,
"repeatLook": 5,
"repeatStrength": 0.4,
"filmMaskCount": 1,
"trackKeyCount": 100,
"foldHidesMaskKeepsBadge": true,
"layerDeleteUndoRedoRestored": true
},
"preReopenLayerPreset": {
"bytes": 32554,
"sha256": "3713101dee2937c4a0730bca9dd1a667d2aa43c16f3c1114af5924ea706ea6ff"
},
"passResult": true,
"coldReopen": {
"agfa": {
"byteIdentical": true,
"bytes": 8474,
"sha256": "3e21a09a4710709a75b09320928522864fa9facfcdf0cb3910588f7de64294b0"
},
"bw": {
"byteIdentical": true,
"bytes": 8456,
"sha256": "c0fb7408b15231c96a7af0e6baab17ec433e90afdf3478476701063e40246be0"
},
"layer-mask": {
"byteIdentical": true,
"bytes": 32554,
"sha256": "3713101dee2937c4a0730bca9dd1a667d2aa43c16f3c1114af5924ea706ea6ff"
}
},
"completed": "2026-11-02T07:08:36.959977+00:00",
"formalRuntime": [
"27940 /Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit/Contents/MacOS/大鱼调色 XPC Service"
]
}
@@ -0,0 +1,14 @@
{
"passResult": true,
"status": "user-confirmed",
"version": "1.6.1",
"build": "44",
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"host": "Final Cut Pro",
"confirmedOn": "2026-11-02",
"timezone": "Asia/Shanghai",
"source": "Explicit user reply in this Codex chat",
"question": "1.6.1(44)已安装,3 秒倒计时已验证,也已打开 Final Cut Pro。请在 FCP 中应用“大鱼调色”检查画面和调节;检查结果如何?",
"answer": "已确认正常",
"scope": "User confirmation of actual FCP use. This record adds acceptance evidence without changing the APP, package, release tag or previous test snapshots."
}
+262 -11
查看文件
@@ -1,6 +1,6 @@
{
"bundlePath": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit",
"checks": 349,
"checks": 395,
"gpu": "Apple M4",
"limitations": [
"Finite states and a 64x48 frame; live FCP discovery, inspector interaction, timeline persistence and real host export require separate acceptance.",
@@ -12,14 +12,14 @@
"error": "未提供错误信息",
"name": "runtime-directory",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/395FA613-8C28-4323-B4F3-6447EE317F60"
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/61A2F5D2-1190-46A7-8858-E5E4C3DD406F"
},
{
"descriptors": 276,
"descriptors": 278,
"name": "descriptor-unique-id-offset-key",
"pass": true,
"sections": 17,
"uniformBytes": 1296
"uniformBytes": 1312
},
{
"name": "finite-real-model-defaults",
@@ -38,6 +38,10 @@
"name": "native-parameter-creation",
"pass": true
},
{
"name": "historical-host-mapping-default-and-explicit-on-off-preserved",
"pass": true
},
{
"name": "native-get-set-model-roundtrip",
"pass": true
@@ -154,7 +158,7 @@
"pass": true
},
{
"name": "complete-version-five-preset-includes-mesh",
"name": "complete-version-six-preset-includes-mesh",
"pass": true
},
{
@@ -816,7 +820,7 @@
"error": "未提供错误信息",
"name": "renderer-export-33cube",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/395FA613-8C28-4323-B4F3-6447EE317F60/diagnostic-export.cube"
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/61A2F5D2-1190-46A7-8858-E5E4C3DD406F/diagnostic-export.cube"
},
{
"bytes": 1186074,
@@ -836,7 +840,7 @@
},
{
"heartbeats": 0,
"maximumGapMS": 110.79099983908236,
"maximumGapMS": 106.65116666677932,
"name": "external-activation-main-loop-responsive",
"pass": true
},
@@ -920,12 +924,16 @@
"pass": true
},
{
"error": "未提供错误信息",
"name": "all-twelve-initialized-tool-types-render",
"name": "new-primary-layer-auto-mapping-on-old-omitted-default-stays-off",
"pass": true
},
{
"name": "initialized-repeated-tools-are-exactly-neutral",
"error": "未提供错误信息",
"name": "all-initialized-tool-types-with-legacy-primary-mapping-render",
"pass": true
},
{
"name": "legacy-neutral-repeated-tools-preserve-pixels",
"pass": true
},
{
@@ -1618,6 +1626,249 @@
"name": "channel-mixer-cube-supported",
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-1-shipped-65cube",
"pass": true,
"side": 65
},
{
"error": "未提供错误信息",
"name": "print-1-production-render",
"pass": true
},
{
"changedComponents": 7373,
"maxAbsoluteError": 0.337890625,
"name": "print-1-active-finite-preserves-alpha",
"nonfiniteComponents": 0,
"nonzeroComponents": 9832,
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-2-shipped-65cube",
"pass": true,
"side": 65
},
{
"error": "未提供错误信息",
"name": "print-2-production-render",
"pass": true
},
{
"changedComponents": 7372,
"maxAbsoluteError": 0.340576171875,
"name": "print-2-active-finite-preserves-alpha",
"nonfiniteComponents": 0,
"nonzeroComponents": 9832,
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-3-shipped-65cube",
"pass": true,
"side": 65
},
{
"error": "未提供错误信息",
"name": "print-3-production-render",
"pass": true
},
{
"changedComponents": 7370,
"maxAbsoluteError": 0.6531982421875,
"name": "print-3-active-finite-preserves-alpha",
"nonfiniteComponents": 0,
"nonzeroComponents": 9832,
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-4-shipped-65cube",
"pass": true,
"side": 65
},
{
"error": "未提供错误信息",
"name": "print-4-production-render",
"pass": true
},
{
"changedComponents": 7373,
"maxAbsoluteError": 0.3828125,
"name": "print-4-active-finite-preserves-alpha",
"nonfiniteComponents": 0,
"nonzeroComponents": 9832,
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-5-shipped-65cube",
"pass": true,
"side": 65
},
{
"error": "未提供错误信息",
"name": "print-5-production-render",
"pass": true
},
{
"changedComponents": 7366,
"maxAbsoluteError": 0.361328125,
"name": "print-5-active-finite-preserves-alpha",
"nonfiniteComponents": 0,
"nonzeroComponents": 9832,
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-6-shipped-65cube",
"pass": true,
"side": 65
},
{
"error": "未提供错误信息",
"name": "print-6-production-render",
"pass": true
},
{
"changedComponents": 7373,
"maxAbsoluteError": 0.372314453125,
"name": "print-6-active-finite-preserves-alpha",
"nonfiniteComponents": 0,
"nonzeroComponents": 9832,
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-7-shipped-65cube",
"pass": true,
"side": 65
},
{
"error": "未提供错误信息",
"name": "print-7-production-render",
"pass": true
},
{
"changedComponents": 7368,
"maxAbsoluteError": 0.403076171875,
"name": "print-7-active-finite-preserves-alpha",
"nonfiniteComponents": 0,
"nonzeroComponents": 9832,
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-8-shipped-65cube",
"pass": true,
"side": 65
},
{
"error": "未提供错误信息",
"name": "print-8-production-render",
"pass": true
},
{
"changedComponents": 7372,
"maxAbsoluteError": 0.36572265625,
"name": "print-8-active-finite-preserves-alpha",
"nonfiniteComponents": 0,
"nonzeroComponents": 9832,
"pass": true
},
{
"name": "all-eight-print-looks-have-distinct-production-output",
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-zero-strength-render",
"pass": true
},
{
"name": "print-zero-strength-exact-old-frame",
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-zero-film-mix-render",
"pass": true
},
{
"name": "print-zero-film-mix-exact-old-frame",
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-eye-off-render",
"pass": true
},
{
"name": "print-eye-off-exact-old-frame",
"pass": true
},
{
"name": "new-film-layer-print-default-is-none",
"pass": true
},
{
"name": "print-only-independent-layer-is-active",
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-only-independent-layer-render",
"pass": true
},
{
"name": "print-only-independent-layer-affects-frame",
"pass": true
},
{
"error": "未提供错误信息",
"name": "two-print-layers-archive-independent-choices-and-strength",
"pass": true
},
{
"error": "未提供错误信息",
"name": "two-print-layers-production-render",
"pass": true
},
{
"name": "second-print-layer-is-rendered-independently",
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-zero-mask-render",
"pass": true
},
{
"name": "print-zero-mask-exact-source",
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-only-static-cube-supported",
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-cube-production-lattice-point",
"pass": true
},
{
"error": "未提供错误信息",
"name": "print-static-cube-matches-production-lattice-point",
"pass": true,
"side": 33
},
{
"name": "print-with-grain-still-rejected-by-static-cube",
"pass": true
},
{
"name": "tracking-captures-real-full-input-texture",
"pass": true
@@ -1816,6 +2067,6 @@
"pass": true
}
],
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/395FA613-8C28-4323-B4F3-6447EE317F60",
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/61A2F5D2-1190-46A7-8858-E5E4C3DD406F",
"scope": "Native model and renderer integration with real Metal/IOSurface textures and fake FxPlug host selectors; no GUI or live host document."
}
+112
查看文件
@@ -0,0 +1,112 @@
{
"passResult": true,
"version": "1.6.1",
"build": "44",
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"compiledSource": "90d6022520c59ea34f42b511daee85ac2936cfd9",
"existingRegistrationStartup": {
"before": {
"output": " com.dayu.color.XPC(1.1)\tB4382CC6-0A29-4014-95DF-17FF12BD426A\t2026-11-02 08:19:21 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit\n (1 plug-in)\n",
"code": 0
},
"submissionAccepted": true,
"submission": {
"output": "",
"code": 0
},
"plugin": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit",
"version": "1.6.1",
"terminationReason": "registration-succeeded",
"executable": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/MacOS/大鱼调色",
"registered": true,
"hostVerification": "awaiting-user-confirmation",
"bundleID": "com.dayu.color",
"confirmationMethod": "exact-path-discovery",
"after": {
"output": " com.dayu.color.XPC(1.1)\t46C65B43-DF7C-4DEF-A159-4C46E0C6F2E3\t2026-11-02 08:19:22 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit\n (1 plug-in)\n",
"code": 0
},
"pid": 1957,
"discoveryVerified": true,
"status": "registered",
"build": "44"
},
"sandboxDisabled": true,
"nativeChecks": 395,
"hostVerification": "verification/HostUserConfirmation1.6.1.json",
"registryAfterRemoval": " (no matches)\n",
"externalRegistryAfterRepair": " com.dayu.color.XPC(1.1)\t7594B515-4788-4BD2-8F31-DA38C23CFF88\t2026-11-02 08:20:00 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit\n (1 plug-in)\n",
"keyboardShortcuts": [
"Command-I preserved introduction",
"Command-R repeated three times without re-entry failure"
],
"visualReview": [
"top publication link is clickable",
"successful registration state matches registry",
"four feature cards and FCP confirmation controls visible"
],
"uiProfile": "standard",
"swiftUIAudit": "not applicable: Objective-C/AppKit; audit reports no Swift files",
"unverified": [
"VoiceOver spoken reading and system accessibility display settings",
"Full runtime resize matrix"
],
"appleFidelityProvisional": {
"total": 84,
"platform": 14,
"layout": 13,
"semantics": 13,
"interaction": 18,
"motion": 13,
"accessibility": 5,
"implementation": 8,
"evidenceCap": "Assistive technology and reduced-effects settings not fully exercised; no 90-point quality claim."
},
"countdownSeconds": 3,
"countdownVisibleInRegistrationCard": true,
"automaticExitVerified": true,
"automaticExitProcessAbsent": true,
"registrationRepairPreviousBuild": "43: same registration implementation; only countdown/UI placement changed in44",
"priorBuild43MissingRegistrationEvidence": "Missing registration was repaired and externally verified on43 before countdown-only change.",
"missingRegistrationRepaired": {
"before": {
"output": " (no matches)\n",
"code": 0
},
"submissionAccepted": true,
"submission": {
"output": "",
"code": 0
},
"plugin": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit",
"version": "1.6.1",
"executable": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/MacOS/大鱼调色",
"registered": true,
"hostVerification": "awaiting-user-confirmation",
"bundleID": "com.dayu.color",
"confirmationMethod": "exact-path-discovery",
"after": {
"output": " com.dayu.color.XPC(1.1)\t7594B515-4788-4BD2-8F31-DA38C23CFF88\t2026-11-02 08:20:00 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit\n (1 plug-in)\n",
"code": 0
},
"pid": 2000,
"discoveryVerified": true,
"status": "registered",
"build": "44"
},
"finalEntitlements": {},
"actualProcessPaths": [
"2000 /Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/MacOS/大鱼调色",
"2040 /Applications/Final Cut Pro.app/Contents/MacOS/Final Cut Pro",
"2048 /Library/Plug-Ins/FxPlug/大鱼调色盘.app/Contents/PlugIns/DayuColorService.pluginkit/Contents/MacOS/DayuColorService",
"2050 /Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit/Contents/MacOS/大鱼调色 XPC Service"
],
"shaderSHA256": "6ec98b85aeb841f9988a4b66e3e5fba9e34d5ab3d7542c9205b0480c77f9ac6d",
"renderingSourceUnchanged": true,
"finalRelease": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.6.1-main-app-20261102",
"cleanupRecord": "verification/MainAppCleanup1.6.1.json",
"releaseRecoveryRecord": "verification/MainAppRecovery1.6.1.json",
"finalPackageSHA256": "d075373d672b8f0146b98f3151c9f74cd6b97e8a1081e0d0796f53af7f291da0",
"kernelIdenticalToPreviousFormalBuild": true,
"hostVerificationStatus": "user-confirmed"
}
+22
查看文件
@@ -0,0 +1,22 @@
{
"passResult": true,
"version": "1.6.1",
"build": "44",
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"removed": [
"/Library/Plug-Ins/FxPlug/.dayu-color-previous-b287e77bfb9f4efea6d46f3443137d3e.app",
"/Library/Plug-Ins/FxPlug/.dayu-color-previous-69e5f09f71bd4afcbd3a8b0420c1e8b7.app",
"/Library/Plug-Ins/FxPlug/.dayu-color-previous-67588f17dd924918bbb4f44feb8585d4.app",
"/Volumes/备份/大鱼调色-1.6.1.pkg",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/recovery-main-app-1.6.1"
],
"productRegistry": [
"com.dayu.color.XPC(1.1)\t7594B515-4788-4BD2-8F31-DA38C23CFF88\t2026-11-02 08:20:00 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit"
],
"generatedBuildAppAndLoosePluginAbsent": true,
"submissionZIPAbsent": true,
"retainedCurrentPackage": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.6.1.pkg",
"retainedHistoricalPackages": true,
"privateQAMediaAndPresetsRetained": true,
"scope": "Task build cache, task rollback candidates, task recovery clone, verified browser download and known install locations; no whole-disk uniqueness claim."
}
+17
查看文件
@@ -0,0 +1,17 @@
{
"passResult": true,
"remote": "https://dayu.media/git/dayu/dayu-color.git",
"compiledSource": "90d6022520c59ea34f42b511daee85ac2936cfd9",
"recoveredFiles": 301,
"contentByteComparison": true,
"gitFsck": "full strict passed",
"LFS": false,
"submodules": false,
"scope": "Compiled source and final release tag independently recovered from the remote; every file byte-compared and full/strict fsck passed.",
"releaseTag": "v1.6.1-main-app-20261102",
"releaseTagCommit": "5d9a4ad7072c1d30f9f8d589719939e2efbcd53c",
"releaseRecoveredFiles": 304,
"releaseEveryFileByteCompared": true,
"appSourceMatchesCompiledNode": true,
"appSourceFilesCompared": 102
}
+16 -16
查看文件
@@ -1,7 +1,7 @@
{
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.5.0.pkg",
"sha256": "3ecabc7a8bfd675b228a5f00016aa17a35b65b544055e57793ec3bff3d7e0294",
"bytes": 14380104,
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.7.0.pkg",
"sha256": "a3578ee95aa7333e64d556061173fb73a42be0e45442ae844c94147b421d34bb",
"bytes": 40898751,
"testUnsigned": false,
"installationExecuted": false,
"checks": [
@@ -31,34 +31,34 @@
"source": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"payload": "Library/Plug-Ins/FxPlug/大鱼调色.app",
"bundleID": "com.dayu.color",
"version": "1.5.0",
"build": "34"
"version": "1.7.0",
"build": "45"
},
{
"source": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/pkg-inputs/大鱼调色",
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.210510f9-2b2c-4b85-8a6d-055789dd7acf/8FC61176-5CC6-435D-BD1C-99D0AF0117E6/大鱼调色"
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.a7af5728-7c8e-4c75-8287-7dea3951d96e/8E2A2143-25CD-4AE6-97CF-C14DB05D6847/大鱼调色"
}
],
"signature": "Package \"大鱼调色-1.5.0.pkg\":\n Status: signed by a developer certificate issued by Apple for distribution\n Notarization: trusted by the Apple notary service\n Signed with a trusted timestamp on: 2026-11-02 06:12:29 +0000\n Certificate Chain:\n 1. Developer ID Installer: zhong luo (B3W25FX5H5)\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n C0 19 01 3C 67 88 8F 34 65 56 C5 91 3C E5 B6 12 4C 5D A6 DA F9 D8 \n DA 00 37 52 DF F0 F3 E6 00 B4\n ------------------------------------------------------------------------\n 2. Developer ID Certification Authority\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n 7A FC 9D 01 A6 2F 03 A2 DE 96 37 93 6D 4A FE 68 09 0D 2D E1 8D 03 \n F2 9C 88 CF B0 B1 BA 63 58 7F\n ------------------------------------------------------------------------\n 3. Apple Root CA\n Expires: 2035-02-09 21:40:36 +0000\n SHA256 Fingerprint:\n B0 B1 73 0E CB C7 FF 45 05 14 2C 49 F1 29 5E 6E DA 6B CA ED 7E 2C \n 68 C5 BE 91 B5 A1 10 01 F0 24",
"gatekeeper": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.5.0.pkg: accepted\nsource=Notarized Developer ID",
"signature": "Package \"大鱼调色-1.7.0.pkg\":\n Status: signed by a developer certificate issued by Apple for distribution\n Notarization: trusted by the Apple notary service\n Signed with a trusted timestamp on: 2026-11-02 09:39:06 +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.7.0.pkg: accepted\nsource=Notarized Developer ID",
"pass": true,
"scope": "Expanded package structural and payload verification only; no installer scripts executed and no host quit or registration performed.",
"notarization": {
"id": "05f849da-5567-4351-9556-742d17b95723",
"message": "Successfully received submission info",
"name": "大鱼调色-1.5.0.pkg",
"createdDate": "2026-11-02T09:39:07.500Z",
"id": "04082e26-663d-4408-85da-63736d079aa2",
"status": "Accepted",
"createdDate": "2026-11-02T06:12:31.089Z"
"name": "大鱼调色-1.7.0.pkg",
"message": "Successfully received submission info"
},
"appCompiledSource": "06d531c443b0bb2f179022a4e64148394f5d0690",
"appBuild": "34",
"appCompiledSource": "a0f37578f73d7f8faa872d9a81009e2d6586a858",
"appBuild": "45",
"packageBuilderRemote": "https://dayu.media/git/dayu/pkg-forge.git",
"packageBuilderCommit": "eb53707c0e67d8ddeab8c1270bb079f1050cfafe",
"templateSHA256": {
"大鱼调色.moef": "7476fb5a3cfad5f4dafb7a887dcc787b9cbcba6ad64df3b4939b336444cf8bfc",
"大鱼调色.moef": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250",
"large.png": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a",
"small.png": "41fec3138aee904fc39d6982e6fde809243ffec55298dbfe966f4f48d89caf8a"
},
"installedAppHostAcceptance": "verification/HostFilmMixer1.5.0.json",
"installedAppHostAcceptance": "verification/BetaClientQA.json",
"installScope": "本轮仅生成并验包,未再次执行系统安装;正式 APP 已有独立宿主验收。"
}
+68
查看文件
@@ -0,0 +1,68 @@
{
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.6.0.pkg",
"sha256": "4ede128d78c2438aaeaf3e22926dfc5fcd584035e9574bea4110c2b5d01c7c2a",
"bytes": 40832822,
"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.6.0",
"build": "36"
},
{
"source": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/pkg-inputs/大鱼调色",
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.4c82157b-b550-46a2-b491-bb86c9e054ed/CD46DBA3-A872-4706-BDAC-4250D66E83D1/大鱼调色"
}
],
"signature": "Package \"大鱼调色-1.6.0.pkg\":\n Status: signed by a developer certificate issued by Apple for distribution\n Notarization: trusted by the Apple notary service\n Signed with a trusted timestamp on: 2026-11-02 07:09: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.6.0.pkg: accepted\nsource=Notarized Developer ID",
"pass": true,
"scope": "Expanded package structural and payload verification only; no installer scripts executed and no host quit or registration performed.",
"notarization": {
"id": "90d7ba03-2fac-4bd0-ae4a-32780ae7ae75",
"name": "大鱼调色-1.6.0.pkg",
"createdDate": "2026-11-02T07:09:19.757Z",
"message": "Successfully received submission info",
"status": "Accepted"
},
"appCompiledSource": "f97320bbee6d469596f2db72a48436b73a41b324",
"appBuild": "36",
"packageBuilderRemote": "https://dayu.media/git/dayu/pkg-forge.git",
"packageBuilderCommit": "eb53707c0e67d8ddeab8c1270bb079f1050cfafe",
"templateSHA256": {
"大鱼调色.moef": "a7e671bab3a55ba413395d91d710c7b5893cd24e1cd63c84d8c7572d4e527152",
"large.png": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a",
"small.png": "41fec3138aee904fc39d6982e6fde809243ffec55298dbfe966f4f48d89caf8a"
},
"installedAppHostAcceptance": "verification/HostPrintLooks1.6.0.json",
"installScope": "本轮仅生成并验包,未再次执行系统安装;正式 APP 已有独立宿主验收。",
"status": "superseded-before-publication",
"packageRemoved": true,
"published": false,
"supersededReason": "User added automatic-mapping default and clickable title website link before the final 1.6.0 publication."
}
@@ -0,0 +1,16 @@
{
"version": "1.6.0",
"build": "37",
"status": "superseded-before-install",
"compiledSource": "378956e130d36d9cf83f8331e72aae60ce54af4a",
"notaryID": "6783e9cd-b84e-4849-9312-6a4ac91959a7",
"notaryStatusAtInterruption": "In Progress",
"submissionSHA256": "7ff9e5b3f0a26152071eb36c0235ed80b0e928e127fb35892b14171a4a1aa382",
"submissionBytes": 40152455,
"nativeChecks": 394,
"nativePassed": true,
"reason": "Final inspection found new primary automatic-mapping layer would be skipped by neutral detection; corrected before host installation. Submission is not reused or resubmitted.",
"formalInstallRemainedBuild": "36",
"published": false,
"notaryFinalStatus": "In Progress"
}
@@ -0,0 +1,18 @@
{
"status": "superseded-during-host-acceptance",
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"bundleID": "com.dayu.color",
"version": "1.6.0",
"build": "38",
"team": "B3W25FX5H5",
"notaryID": "9dc58db0-4d1d-4019-9735-c163198ad772",
"notaryStatus": "Accepted",
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
"sourceCommit": "378cd2b6ec6ed9654bf9a33c807779d0c2636728",
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
"templateSHA256": "6368e0026bb0270f507e7595852fba3c39a25743ccfe56a7f8f47cfd0872fed2",
"shaderSHA256": "6ec98b85aeb841f9988a4b66e3e5fba9e34d5ab3d7542c9205b0480c77f9ac6d",
"previousInstallBackup": "/Library/Plug-Ins/FxPlug/.dayu-color-previous-684c5c21673647e88760e9a82acc0564.app",
"reason": "FCP omits historical default-zero values; host acceptance detected old instance mapping changed. Preserve the registered zero default and explicitly seed enabled in new MOEF.",
"published": false
}
@@ -0,0 +1,20 @@
{
"version": "1.6.0",
"build": "35",
"compiledSource": "2b2d657de754dd5b362cc0be07cb10d5e671a745",
"notarization": {
"id": "3819fbc3-6b7d-4b89-b09a-3e5d9c0f0851",
"status": "Accepted",
"message": "Processing complete"
},
"stapled": true,
"installed": false,
"reason": "Host reopened before replacement. Delivery safety gate retained installed 1.5.0. User then requested template copyright removal and lower version, superseding this candidate.",
"supersededByBuild": "36",
"submittedZipSHA256": "ba3ee8a2a0e5dfbaabaeabaed0aa9ebc3bd4eccd854a6c6b62c38ac762afc44e",
"generatedCopiesRemoved": [
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/DerivedData/Build/Products/Release/大鱼调色.app",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/DerivedData/Build/Products/Release/大鱼调色 XPC Service.pluginkit",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/notarization-submission.zip"
]
}
+28
查看文件
@@ -0,0 +1,28 @@
{
"passResult": true,
"version": "1.6.0",
"build": "39",
"formalPath": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"onlyMatchingInstalledAppInCheckedLocations": [
"/Library/Plug-Ins/FxPlug/大鱼调色.app"
],
"productRegistry": [
"com.dayu.color.XPC(1.1)\t0FFF5BF4-DF9D-4769-B3E0-CEF0B697EA9D\t2026-11-02 07:21:24 +0000\t/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit"
],
"removed": [
"/Users/mac/Library/Caches/CodexRecovery/dayu-color-print-1.6.0",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/RecoveryDerivedData",
"/Volumes/备份/大鱼调色-1.6.0.pkg",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/print-recovered-template.moef",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/print-recovered-template38.moef",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/print-recovered-template39.moef"
],
"generatedBuildAppAndLoosePluginAbsent": true,
"submissionZIPAbsent": true,
"previousCandidatesRemoved": true,
"retainedCurrentPackage": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.6.0.pkg",
"retainedHistoricalPackages": true,
"privateQAMediaAndPresetsRetained": true,
"scope": "Task cache, task recovery clone, project generated roots and known installation/Desktop/Downloads locations; no whole-disk uniqueness claim.",
"completed": "2026-11-02T07:34:06.072844+00:00"
}
文件差异过大,未显示。 加载差异
+22
查看文件
@@ -0,0 +1,22 @@
{
"status": "verified",
"version": "1.6.0",
"build": "39",
"commit": "e5affd3f097fc96f87f41be8e1a3f131ed01daeb",
"remote": "https://dayu.media/git/dayu/dayu-color.git",
"clone": "/Users/mac/Library/Caches/CodexRecovery/dayu-color-print-1.6.0",
"filesByteCompared": 294,
"fsck": "full/strict passed",
"releaseBuild": true,
"nativeChecks": 395,
"nativePass": true,
"lfs": false,
"submodules": false,
"recoveredTemplateByteIdentical": true,
"templateSHA256": "fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250",
"generatedAppsRemoved": [
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/RecoveryDerivedData/Build/Products/Release/大鱼调色.app",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/RecoveryDerivedData/Build/Products/Release/大鱼调色 XPC Service.pluginkit"
],
"recoveryCloneRemovedAfterVerification": true
}
文件差异过大,未显示。 加载差异
@@ -0,0 +1,16 @@
{
"passResult": true,
"tag": "v1.6.0-print-looks-20261102",
"tagCommit": "0cc51149a6f21ebe09465b4fd7130451bedd57bb",
"compiledSource": "e5affd3f097fc96f87f41be8e1a3f131ed01daeb",
"sourceCodeIdenticalBetweenCompileAndTag": true,
"remote": "https://dayu.media/git/dayu/dayu-color.git",
"clone": "/Users/mac/Library/Caches/CodexRecovery/dayu-color-print-1.6.0",
"filesByteCompared": 296,
"fsck": "full/strict passed",
"compiledSourceRecovery": "verification/PrintLooksRecovery.json",
"releaseBuildNativeChecks": 395,
"lfs": false,
"submodules": false,
"recoveryCloneRemovedAfterVerification": true
}
+10 -18
查看文件
@@ -3,24 +3,16 @@
"repository": "dayu/dayu-color",
"repositoryID": 52,
"private": false,
"tag": "v1.4.3-mask-fold-20261102",
"releaseCommit": "301b31438e8da95dc4e6e1c09498ad814a0ebcfc",
"releaseID": 371,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.4.3-mask-fold-20261102",
"assetID": 16,
"assetName": "大鱼调色-1.4.3.pkg",
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.4.3-mask-fold-20261102/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.4.3.pkg",
"bytes": 14340650,
"sha256": "41bba698a70a7629438688a4be74947f424f3af04190090c44f248827b4c3bb2",
"tag": "v1.6.1-main-app-20261102",
"releaseCommit": "5d9a4ad7072c1d30f9f8d589719939e2efbcd53c",
"releaseID": 374,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.6.1-main-app-20261102",
"assetID": 19,
"assetName": "大鱼调色-1.6.1.pkg",
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.6.1-main-app-20261102/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.6.1.pkg",
"bytes": 40854422,
"sha256": "d075373d672b8f0146b98f3151c9f74cd6b97e8a1081e0d0796f53af7f291da0",
"existingAssetReused": true,
"verification": "Authenticated full download SHA-256 and byte count, then release/asset read-back.",
"credentialSource": "macOS Keychain: dayu-git-api",
"status": "published-and-fully-verified",
"version": "1.4.3",
"build": "33",
"appCompiledSource": "26a888f4534792481c6a9933091cb0b23307cd24",
"draftDownloadVerification": "verification/ReleaseDraftDownload1.4.3.json",
"repositoryVisibilityUnchanged": true,
"hostVerification": "verification/HostMaskFolding1.4.3.json",
"temporaryDownloadCleaned": true
"credentialSource": "macOS Keychain: dayu-git-api"
}
+15
查看文件
@@ -0,0 +1,15 @@
{
"id": 374,
"tag_name": "v1.6.1-main-app-20261102",
"draft": true,
"html_url": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.6.1-main-app-20261102",
"target_commitish": "5d9a4ad7072c1d30f9f8d589719939e2efbcd53c",
"assets": [
{
"id": 19,
"name": "大鱼调色-1.6.1.pkg",
"size": 40854422,
"browser_download_url": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.6.1-main-app-20261102/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.6.1.pkg"
}
]
}
@@ -0,0 +1,12 @@
{
"status": "verified",
"releaseID": 372,
"assetID": 17,
"tag": "v1.5.0-film-mixer-20261102",
"method": "Authenticated normal Edge browser download; actual downloaded copy hashed before publication",
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.5.0-film-mixer-20261102/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.5.0.pkg",
"downloadedFile": "/Volumes/备份/大鱼调色-1.5.0.pkg",
"bytes": 14380104,
"sha256": "3ecabc7a8bfd675b228a5f00016aa17a35b65b544055e57793ec3bff3d7e0294",
"temporaryDownloadCleaned": true
}
@@ -0,0 +1,18 @@
{
"status": "verified",
"releaseID": 373,
"assetID": 18,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.6.0-print-looks-20261102",
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.6.0-print-looks-20261102/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.6.0.pkg",
"expectedBytes": 40833847,
"expectedSHA256": "13821631b5d54f1b9c1934c513a9cc7e92641208e20219839a63e23865f21cca",
"localPackage": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.6.0.pkg",
"tag": "v1.6.0-print-looks-20261102",
"tagCommit": "0cc51149a6f21ebe09465b4fd7130451bedd57bb",
"passResult": true,
"actualDownloadedPath": "/Volumes/备份/大鱼调色-1.6.0.pkg",
"actualBytes": 40833847,
"actualSHA256": "13821631b5d54f1b9c1934c513a9cc7e92641208e20219839a63e23865f21cca",
"verifiedAt": "2026-11-02T07:32:32.753960+00:00",
"verification": "Actual authenticated Edge download completed; independent downloaded file byte count and SHA-256 matched before publishing."
}
@@ -0,0 +1,13 @@
{
"passResult": true,
"releaseID": 374,
"assetID": 19,
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.6.1-main-app-20261102/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.6.1.pkg",
"downloadedFile": "/Volumes/备份/大鱼调色-1.6.1.pkg",
"bytes": 40854422,
"sha256": "d075373d672b8f0146b98f3151c9f74cd6b97e8a1081e0d0796f53af7f291da0",
"download": "Normal authenticated Microsoft Edge session; completed UI download independently hashed",
"browserSourceMetadata": [
"https://dayu.media/git/dayu/dayu-color/releases/download/v1.6.1-main-app-20261102/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.6.1.pkg"
]
}
+1
查看文件
@@ -123,6 +123,7 @@
Plugin/Resources/InputLUTs/sony_slog3_sgamut3cine_to_rec709.dylut,
"Plugin/Resources/THIRD-PARTY-NOTICES.txt",
"Wrapper Application/AppDelegate.m",
"Wrapper Application/DYBetaUpdater.mm",
"Wrapper Application/Info.plist",
"Wrapper Application/main.m",
"Wrapper Application/Resources/DayuColor.icns",
+10 -3
查看文件
@@ -175,13 +175,18 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
for(NSDictionary *row in descriptors)if([row[@"offset"]integerValue]>=0){float value=*field(&defaults,row);finite&=std::isfinite(value);matches&=value==[row[@"default"]floatValue];}
for(int c=0;c<3;c++)finite&=std::isfinite(defaults.primariesM0[c])&&std::isfinite(defaults.primariesM1[c])&&std::isfinite(defaults.primariesM2[c]);
run.need(@"finite-real-model-defaults",finite&&matches);
run.record(@"new-input-default-sony-slog3-sgamut3-cine",defaults.cm.inputTransfer==28&&defaults.cm.inputGamut==27&&defaults.cm.outputTransfer==1002&&defaults.cm.outputGamut==22);
run.record(@"new-input-default-sony-slog3-sgamut3-cine",defaults.cm.inputTransfer==28&&defaults.cm.inputGamut==27&&defaults.cm.outputTransfer==1002&&defaults.cm.outputGamut==22&&defaults.cm.toneMapping==1);
bool initialGroups=true;
for(NSDictionary *section in sections){BOOL base=YES;for(NSDictionary *row in descriptors)if([row[@"pid"]isEqual:section[@"enabled"]])initialGroups&=([row[@"default"]doubleValue]>=.5)==base;}
run.record(@"all-module-eyes-enabled-by-default",initialGroups);
DYDiagnosticManager *manager=[[[DYDiagnosticManager alloc]init]autorelease];error=nil;
run.need(@"native-parameter-creation",DYCreateParameters(manager,&error)&&!manager->_duplicate&&manager->_values.count==descriptors.count&&manager->_custom.count==4,@{@"error":reason(error)});
id<FxParameterSettingAPI_v6> setter=[manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];id<FxParameterRetrievalAPI_v6> getter=[manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
UInt32 mappingPID=0;for(NSDictionary *d in descriptors)if([d[@"key"]isEqual:@"cmtoneMapping"])mappingPID=[d[@"pid"]unsignedIntValue];
DYUniforms mappingRead;DYReadUniforms(manager,kCMTimeZero,&mappingRead);BOOL storedMapping=mappingRead.cm.toneMapping==0;
[setter setFloatValue:1 toParameter:mappingPID atTime:kCMTimeZero];DYReadUniforms(manager,kCMTimeZero,&mappingRead);storedMapping&=mappingRead.cm.toneMapping==1;
[setter setFloatValue:0 toParameter:mappingPID atTime:kCMTimeZero];DYReadUniforms(manager,kCMTimeZero,&mappingRead);storedMapping&=mappingRead.cm.toneMapping==0;
run.record(@"historical-host-mapping-default-and-explicit-on-off-preserved",mappingPID&&storedMapping);
[setter setFloatValue:.75 toParameter:2000 atTime:kCMTimeZero];double value=0;[getter getFloatValue:&value fromParameter:2000 atTime:kCMTimeZero];DYUniforms restored;DYReadUniforms(manager,kCMTimeZero,&restored);
run.record(@"native-get-set-model-roundtrip",value==.75&&restored.exposure==.75f);
[setter setFloatValue:999 toParameter:2000 atTime:kCMTimeZero];DYReadUniforms(manager,kCMTimeZero,&restored);run.record(@"model-clamps-host-out-of-range",restored.exposure==5);
@@ -241,7 +246,7 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
run.record(@"spider-single-drag-spoke-following-and-pin",dragged.x[0]>initialMesh.x[0]&&dragged.x[1]>initialMesh.x[1]&&dragged.x[3]>initialMesh.x[3]&&dragged.x[4]==initialMesh.x[4]&&dragged.x[5]==initialMesh.x[5]&&dragged.pins[2]);
run.record(@"spider-drag-one-host-undo-group",uiHost->_undoStarts==starts+1&&uiHost->_undoEnds==ends+1&&!uiHost->_undoActive);
error=nil;NSData *spiderArchive=[NSKeyedArchiver archivedDataWithRootObject:spiderSaved requiringSecureCoding:YES error:&error];DYAssetState *decodedSpider=[NSKeyedUnarchiver unarchivedObjectOfClass:DYAssetState.class fromData:spiderArchive error:&error];run.record(@"spider-archive-retains-mesh-pins-and-lut-paths",decodedSpider&&[decodedSpider isEqual:spiderSaved],@{@"error":reason(error)});
NSDictionary *snapshot=[inspector performSelector:@selector(presetSnapshot)];NSData *presetJSON=[NSJSONSerialization dataWithJSONObject:snapshot options:0 error:&error];NSDictionary *decodedPreset=[NSJSONSerialization JSONObjectWithData:presetJSON options:0 error:&error];run.record(@"complete-version-five-preset-includes-mesh",[decodedPreset[@"version"]isEqual:@5]&&[DYSpiderFromJSON(decodedPreset[@"spider"])isEqual:spiderSaved.spiderMesh]);
NSDictionary *snapshot=[inspector performSelector:@selector(presetSnapshot)];NSData *presetJSON=[NSJSONSerialization dataWithJSONObject:snapshot options:0 error:&error];NSDictionary *decodedPreset=[NSJSONSerialization JSONObjectWithData:presetJSON options:0 error:&error];run.record(@"complete-version-six-preset-includes-mesh",[decodedPreset[@"version"]isEqual:@6]&&[DYSpiderFromJSON(decodedPreset[@"spider"])isEqual:spiderSaved.spiderMesh]);
NSDictionary *portable=DYSpiderJSON(spiderSaved.spiderMesh,spiderSaved.spiderLinked);NSData *decodedPortable=DYSpiderFromJSON(portable);run.record(@"spider-json-preset-exact-roundtrip",[decodedPortable isEqual:spiderSaved.spiderMesh]);
NSMutableDictionary *badJSON=[[portable mutableCopy]autorelease];badJSON[@"hues"]=@7;run.record(@"spider-json-rejects-unsupported-topology",!DYSpiderFromJSON(badJSON));auto corrupt=dragged;corrupt.x[0]=NAN;run.record(@"spider-archive-rejects-nonfinite-coordinates",!DYSpiderMeshIsValid([NSData dataWithBytes:&corrupt length:sizeof(corrupt)]));
[disc changeHueCount:12 saturationCount:8];spiderSaved=DYReadAssets(uiHost,kCMTimeZero);auto dense=DYSpiderMesh(spiderSaved.spiderMesh);run.record(@"spider-independent-resolution-and-resample",dense.hues==12&&dense.rings==7&&fabs(dy::meshDelta(dense,0,.6).x)>0);
@@ -258,7 +263,9 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
[[source metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,width,height) mipmapLevel:0 withBytes:input.data() bytesPerRow:width*8];
// Color-tool parity fixtures deliberately use a display-space identity
// input; the user's new Sony camera default is checked independently above.
defaults.cm.inputTransfer=1002;defaults.cm.inputGamut=22;
// Pixel-isolation fixtures use an identity CST. The real new-instance
// default was verified above; mapped CST cases below enable it explicitly.
defaults.cm.inputTransfer=1002;defaults.cm.inputGamut=22;defaults.cm.toneMapping=0;
DYRenderer *renderer=[[[DYRenderer alloc]init]autorelease];Pixels neutral=render(run,renderer,source,destination,gpu,defaults,@{},@"renderer-default-pass");Difference neutralDifference=difference(input,neutral);
run.record(@"transparent-premultiplied-neutral",neutralDifference.nonfinite==0&&neutralDifference.maximum<=.001,measure(neutralDifference));
NSString *cstReference=NSProcessInfo.processInfo.environment[@"DY_DIAGNOSTIC_CST_REFERENCE"];
@@ -39,5 +39,40 @@
BOOL rejected=![renderer exportLUT:cube uniforms:masked paths:@{} spider:nil tools:empty.document error:&error];run.record(@"grain-rejected-by-static-cube",rejected&&error!=nil);
masked.film.grainEnabled=0;masked.film.subtractiveEnabled=1;masked.film.gammaAll=1.1;error=nil;run.record(@"pure-subtractive-cube-supported",[renderer exportLUT:cube uniforms:masked paths:@{} spider:nil tools:empty.document error:&error],@{@"error":reason(error)});
masked=matrix;masked.mixerMix=1;error=nil;run.record(@"channel-mixer-cube-supported",[renderer exportLUT:cube uniforms:masked paths:@{} spider:nil tools:empty.document error:&error],@{@"error":reason(error)});
// Exercise the shipped print resources through the complete production path.
// The separate installed-reference oracle checks interpolation and color math.
NSArray *printNames=@[@"kodak_2383",@"kodak_2393",@"kodak_2302_bw",@"fuji_3510",@"fuji_3513",@"fuji_3519",@"fuji_3521",@"agfa_cp30"];
std::vector<Pixels> printFrames;BOOL printFramesDistinct=YES;
DYUniforms printValue=neutral;printValue.film.enabled=1;printValue.filmPrint.y=1;
for(NSUInteger index=0;index<printNames.count;index++){
NSString *resource=[[NSBundle bundleForClass:renderer.class]pathForResource:printNames[index] ofType:@"dylut" inDirectory:@"PrintLooks"];std::vector<float> table;NSUInteger side=0;error=nil;
BOOL resourceOK=resource&&DYLUTReadCube(resource,table,side,&error)&&side==65&&table.size()==65*65*65*4;
run.record([NSString stringWithFormat:@"print-%lu-shipped-65cube",(unsigned long)index+1],resourceOK,@{@"error":reason(error),@"side":@(side)});
printValue.filmPrint.x=index+1;Pixels printed=filmRender(printValue,nil,[NSString stringWithFormat:@"print-%lu-production-render",(unsigned long)index+1]);Difference change=difference(before,printed);BOOL sameAlpha=YES;
for(size_t pixel=0;pixel<printed.size()/4;pixel++)sameAlpha&=printed[pixel*4+3]==before[pixel*4+3];
run.record([NSString stringWithFormat:@"print-%lu-active-finite-preserves-alpha",(unsigned long)index+1],change.different>20&&change.nonfinite==0&&sameAlpha,measure(change));
for(const Pixels& previous:printFrames)printFramesDistinct&=difference(previous,printed).different>20;printFrames.push_back(printed);
}
run.record(@"all-eight-print-looks-have-distinct-production-output",printFramesDistinct);
printValue.filmPrint.y=0;bypass=filmRender(printValue,nil,@"print-zero-strength-render");run.record(@"print-zero-strength-exact-old-frame",difference(before,bypass).maximum==0);
printValue.filmPrint.y=1;printValue.film.mix=0;bypass=filmRender(printValue,nil,@"print-zero-film-mix-render");run.record(@"print-zero-film-mix-exact-old-frame",difference(before,bypass).maximum==0);
printValue.film.mix=1;printValue.film.enabled=0;bypass=filmRender(printValue,nil,@"print-eye-off-render");run.record(@"print-eye-off-exact-old-frame",difference(before,bypass).maximum==0);printValue.film.enabled=1;
DYUniforms freshPrint=DYToolUniforms(DYNewTool(@"film"));run.record(@"new-film-layer-print-default-is-none",freshPrint.filmPrint.x==0&&freshPrint.filmPrint.y==1&&DYToolIsNeutral(DYNewTool(@"film")));
NSMutableDictionary *printDoc=DYMutablePlist(empty.document),*printLayer=(id)DYInsertTool(printDoc,@"film",@"base:film");printLayer[@"values"][@"filmPrintLook"]=@2;
run.record(@"print-only-independent-layer-is-active",DYValidToolDocument(printDoc)&&!DYToolIsNeutral(printLayer)&&DYFilmPrintActive(DYToolUniforms(printLayer)));
Pixels printLayerFrame=filmRender(neutral,printDoc,@"print-only-independent-layer-render");run.record(@"print-only-independent-layer-affects-frame",difference(before,printLayerFrame).different>20);
NSMutableDictionary *secondPrintLayer=(id)DYInsertTool(printDoc,@"film",printLayer[@"id"]);secondPrintLayer[@"values"][@"filmPrintLook"]=@8;secondPrintLayer[@"values"][@"filmPrintStrength"]=@.4;
DYToolDocument *printSaved=[[[DYToolDocument alloc]init]autorelease];printSaved.document=printDoc;error=nil;NSData *printArchive=[NSKeyedArchiver archivedDataWithRootObject:printSaved requiringSecureCoding:YES error:&error];DYToolDocument *printRestored=[NSKeyedUnarchiver unarchivedObjectOfClass:DYToolDocument.class fromData:printArchive error:&error];
DYUniforms firstRestored=DYToolUniforms(DYToolWithID(printRestored.document,printLayer[@"id"])),secondRestored=DYToolUniforms(DYToolWithID(printRestored.document,secondPrintLayer[@"id"]));
run.record(@"two-print-layers-archive-independent-choices-and-strength",[printSaved isEqual:printRestored]&&firstRestored.filmPrint.x==2&&firstRestored.filmPrint.y==1&&secondRestored.filmPrint.x==8&&secondRestored.filmPrint.y==.4f,@{@"error":reason(error)});
Pixels twoPrintLayers=filmRender(neutral,printRestored.document,@"two-print-layers-production-render");run.record(@"second-print-layer-is-rendered-independently",difference(printLayerFrame,twoPrintLayers).different>20);
Pixels printZeroMask=filmRender(printValue,baseMask,@"print-zero-mask-render");run.record(@"print-zero-mask-exact-source",difference(before,printZeroMask).maximum==0);
printValue.filmPrint.x=1;error=nil;BOOL printExported=[renderer exportLUT:cube uniforms:printValue paths:@{} spider:nil tools:empty.document error:&error];run.record(@"print-only-static-cube-supported",printExported,@{@"error":reason(error)});
std::vector<float> printCubeValues;NSUInteger printCubeSide=0;error=nil;BOOL printCubeParsed=printExported&&DYLUTReadCube(cube.path,printCubeValues,printCubeSide,&error)&&printCubeSide==33;
Pixels printCubeInput(input.size());float printCodes[3]={.5f,.25f,.75f};for(size_t pixel=0;pixel<printCubeInput.size()/4;pixel++){for(int channel=0;channel<3;channel++){float code=printCodes[channel];printCubeInput[pixel*4+channel]=code<=.04045f?code/12.92f:powf((code+.055f)/1.055f,2.4f);}printCubeInput[pixel*4+3]=1;}
uploadFilm(printCubeInput);Pixels printCubeRendered=filmRender(printValue,nil,@"print-cube-production-lattice-point");BOOL printCubeMatches=printCubeParsed&&printCubeValues.size()==33*33*33*4;
for(int channel=0;channel<3&&printCubeMatches;channel++){float code=printCubeValues[((24*33+8)*33+16)*4+channel],linear=code<=.04045f?code/12.92f:powf((code+.055f)/1.055f,2.4f);printCubeMatches&=fabs(linear-(float)printCubeRendered[channel])<.0005;}
run.record(@"print-static-cube-matches-production-lattice-point",printCubeMatches,@{@"side":@(printCubeSide),@"error":reason(error)});
printValue.film.grainEnabled=1;printValue.film.grainAmount=.5;error=nil;run.record(@"print-with-grain-still-rejected-by-static-cube",![renderer exportLUT:cube uniforms:printValue paths:@{} spider:nil tools:empty.document error:&error]&&error!=nil);
uploadFilm(input);
}
+19
查看文件
@@ -41,3 +41,22 @@ kernel void dyFilmBloomEdges(texture2d<float,access::sample> blurred [[texture(0
kernel void dyFilmMix(texture2d<float,access::read> before [[texture(0)]],texture2d<float,access::read> after [[texture(1)]],texture2d<float,access::write> output [[texture(2)]],constant float& amount [[buffer(0)]],uint2 pos [[thread_position_in_grid]]){
if(pos.x>=output.get_width()||pos.y>=output.get_height())return;float4 a=before.read(pos),b=after.read(pos);output.write(float4(dyLimit(mix(a.rgb,b.rgb,amount)),a.a),pos);
}
// Six tetrahedra, matching the reference LMT's integer texel fetches.
inline float3 dyPrintTetra(texture3d<float,access::read> cube,float3 c){
float n=float(cube.get_width()-1);float3 scaled=clamp(c,0.f,1.f)*n;uint3 p=uint3(clamp(floor(scaled),0.f,n-1));float3 f=scaled-float3(p);
float3 a=cube.read(p).rgb,h=cube.read(p+uint3(1)).rgb;
float3 r=cube.read(p+uint3(1,0,0)).rgb,g=cube.read(p+uint3(0,1,0)).rgb,b=cube.read(p+uint3(0,0,1)).rgb;
float3 rg=cube.read(p+uint3(1,1,0)).rgb,rb=cube.read(p+uint3(1,0,1)).rgb,gb=cube.read(p+uint3(0,1,1)).rgb;
if(f.x>f.y){if(f.y>f.z)return a*(1-f.x)+r*(f.x-f.y)+rg*(f.y-f.z)+h*f.z;
if(f.x>f.z)return a*(1-f.x)+r*(f.x-f.z)+rb*(f.z-f.y)+h*f.y;
return a*(1-f.z)+b*(f.z-f.x)+rb*(f.x-f.y)+h*f.y;
}
if(f.z>f.y)return a*(1-f.z)+b*(f.z-f.y)+gb*(f.y-f.x)+h*f.x;
if(f.z>f.x)return a*(1-f.y)+g*(f.y-f.z)+gb*(f.z-f.x)+h*f.x;
return a*(1-f.y)+g*(f.y-f.x)+rg*(f.x-f.z)+h*f.z;
}
kernel void dyFilmPrint(texture2d<float,access::read> source [[texture(0)]],texture3d<float,access::read> cube [[texture(1)]],texture2d<float,access::write> output [[texture(2)]],constant DYUniforms& u [[buffer(0)]],uint2 p [[thread_position_in_grid]]){
if(p.x>=output.get_width()||p.y>=output.get_height())return;float4 value=source.read(p);
if(value.a>0&&u.filmPrint.y>0){float3 c=value.rgb/value.a;float3 printed=dyPrintDecode(dyPrintTetra(cube,dyPrintEncode(c)));value.rgb=mix(c,printed,u.filmPrint.y)*value.a;}
output.write(value,p);
}
+10
查看文件
@@ -9,6 +9,16 @@ inline float dyFilmLuma(float3 c){return c.x*.2126f+c.y*.7152f+c.z*.0722f;}
inline float dyFilmSat(float3 c){float m=dyFilmMax(c);return m!=0?(m-dyFilmMin(c))/m:0;}
inline float3 dyFilmPositive(float3 c){for(int i=0;i<3;i++)if(c[i]<0)c[i]=0;return c;}
inline bool DYChannelMixerActive(DYUniforms u){return u.mixerSectionEnabled>.5f&&u.mixerMix>0&&(u.mixerRed.x!=1||u.mixerRed.y!=0||u.mixerRed.z!=0||u.mixerGreen.x!=0||u.mixerGreen.y!=1||u.mixerGreen.z!=0||u.mixerBlue.x!=0||u.mixerBlue.y!=0||u.mixerBlue.z!=1);}
inline bool DYFilmPrintActive(DYUniforms u){return u.film.enabled>.5f&&u.film.mix>0&&u.filmPrint.x>=1&&u.filmPrint.x<=8&&u.filmPrint.y>0;}
inline bool DYFilmToolActive(DYUniforms u){return DYFilmActive(u.film)||DYFilmPrintActive(u);}
// AP1/D60 conversion verified against the local reference's color-space filter.
// The print tables operate on ACEScct code values, not display RGB.
inline float3 dyPrintToAP1(float3 c){return {c.x*.6130974293f+c.y*.3395231366f+c.z*.0473794527f,c.x*.0701937228f+c.y*.9163538814f+c.z*.0134523986f,c.x*.0206155926f+c.y*.1095697731f+c.z*.8698146343f};}
inline float3 dyPrintFromAP1(float3 c){return {c.x*1.7050509453f-c.y*.6217921376f-c.z*.0832588747f,-c.x*.1302564144f+c.y*1.1408047676f-c.z*.0105483187f,-c.x*.0240033567f-c.y*.1289689690f+c.z*1.1529723406f};}
inline float dyPrintCCTEncode(float c){return c<=.0078125f?10.5402377416545f*c+.0729055341958355f:(log2(c)+9.72f)/17.52f;}
inline float dyPrintCCTDecode(float c){return c<=.155251141552511f?(c-.0729055341958355f)/10.5402377416545f:exp2(c*17.52f-9.72f);}
inline float3 dyPrintEncode(float3 c){c=dyPrintToAP1(c);return {dyPrintCCTEncode(c.x),dyPrintCCTEncode(c.y),dyPrintCCTEncode(c.z)};}
inline float3 dyPrintDecode(float3 c){return dyPrintFromAP1(float3{dyPrintCCTDecode(c.x),dyPrintCCTDecode(c.y),dyPrintCCTDecode(c.z)});}
inline float3 dyFilmMixer(float3 c,DYUniforms u){
float3 r={c.x*u.mixerRed.x+c.y*u.mixerRed.y+c.z*u.mixerRed.z,c.x*u.mixerGreen.x+c.y*u.mixerGreen.y+c.z*u.mixerGreen.z,c.x*u.mixerBlue.x+c.y*u.mixerBlue.y+c.z*u.mixerBlue.z};
if(u.mixerPreserveLuma>.5f){r=dyFilmPositive(r);float ratio=dyFilmLuma(c)/dyFilmLuma(r);if(!isfinite(ratio))ratio=1;r*=ratio;}
+9 -1
查看文件
@@ -1,7 +1,7 @@
// All work uses the renderer instance's lock and frozen state. No vendor code
// or vendor runtime is loaded by the product.
- (BOOL)renderFilmTool:(NSString*)type source:(FxImageTile*)source destination:(FxImageTile*)destination uniforms:(DYUniforms)u masks:(NSArray*)masks entry:(NSMutableDictionary*)entry error:(NSError**)error {
BOOL mixer=[type isEqual:@"mixer"],active=mixer?DYChannelMixerActive(u):DYFilmActive(u.film);
BOOL mixer=[type isEqual:@"mixer"],active=mixer?DYChannelMixerActive(u):DYFilmToolActive(u);
if(!active)return [self copyTile:source to:destination entry:entry error:error];
id<MTLDevice>d=entry[@"device"];id<MTLTexture>before=[source metalTextureForDevice:d];
if(!before)return fail(error,@"胶片输入纹理不可用");
@@ -49,6 +49,14 @@
id<MTLTexture>aux=texture(2);if(!aux)return fail(error,@"无法分配暗角缓冲区");CIImage *ci=image(current);if(!ci)return fail(error,@"暗角输入不可用");
ci=[ci imageByApplyingFilter:@"CIVignetteEffect" withInputParameters:@{kCIInputCenterKey:[CIVector vectorWithX:before.width*.5 Y:before.height*.5],kCIInputIntensityKey:@(u.film.vignetteIntensity),kCIInputRadiusKey:@(u.film.vignetteRadius/100.f*MAX(before.width,before.height)),@"inputFalloff":@(u.film.vignetteFalloff)}];[context render:ci toMTLTexture:aux commandBuffer:commands bounds:bounds colorSpace:nil];if(!point(5,aux))return fail(error,@"暗角处理失败");
}
if(DYFilmPrintActive(u)){
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)u.filmPrint.x] ofType:@"dylut" inDirectory:@"PrintLooks"];
if(!path)return fail(error,@"印片外观资源缺失,请重新安装正式版。");id<MTLTexture>cube=[self lut:path entry:entry error:error];if(!cube)return NO;
if(cube.width!=65||cube.height!=65||cube.depth!=65)return fail(error,@"印片外观尺寸不正确,请重新安装正式版。");
id<MTLTexture>out=texture(current==slots[0]?1:0);if(!out)return fail(error,@"无法分配印片缓冲区");
encode(@"dyFilmPrint",current,cube,out,&u,sizeof(u));current=out;
}
if(u.film.mix<1){id<MTLTexture>out=texture(current==slots[0]?1:0);if(!out)return fail(error,@"无法分配胶片混合缓冲区");encode(@"dyFilmMix",before,current,out,&u.film.mix,4);current=out;}
}
// Finish the effect before the module's existing mask blend. Source and
+24 -9
查看文件
@@ -1,4 +1,5 @@
#import "DYInspector.h"
#import "../Shared/DYBetaDiagnostics.h"
#import "DYModel.h"
#import "DYToolState.h"
#import "DYAutoGrade.h"
@@ -26,6 +27,11 @@ static NSButton *DYButton(NSString *title,id target,SEL action) {
b.bezelStyle=NSBezelStyleRounded; b.font=[NSFont systemFontOfSize:11];
b.contentTintColor=DYAccent(); return b;
}
@interface DYWebsiteLink : NSButton @end
@implementation DYWebsiteLink
- (NSAccessibilityRole)accessibilityRole {return NSAccessibilityLinkRole;}
- (void)resetCursorRects {[self addCursorRect:self.bounds cursor:NSCursor.pointingHandCursor];}
@end
// Header status stays visible while the body is folded and never intercepts clicks.
@interface DYMaskCountBadge : NSView
@property(nonatomic) NSUInteger count;
@@ -411,7 +417,7 @@ static NSImage *DYWheelImage(void) {
DYFlippedView *_document;
NSTextField *_brand;
NSTextField *_subtitle;
NSButton *_resetAll, *_save, *_load, *_export;
NSButton *_resetAll, *_save, *_load, *_export, *_websiteLink;
NSArray *_sections;
NSMutableArray *_cards;
NSMutableDictionary *_controls;
@@ -442,6 +448,7 @@ static NSImage *DYWheelImage(void) {
return [self initWithAPIManager:manager renderer:nil];
}
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager renderer:(DYRenderer *)renderer {
uint64_t beta=DYBetaSpanBegin(@"inspector_create",nil);
if((self=[super initWithFrame:NSMakeRect(0,0,360,780)])) {
_assetLoads=[NSMutableDictionary new];_assetLoadIDs=[NSMutableDictionary new];_manager=manager; _renderer=[renderer retain];_library=[DYLUTLibrary new];_tabs=[NSMutableDictionary new];_visibleLooks=1;
_embedded=[manager isKindOfClass:DYToolManager.class];if(_embedded)[(id)_manager retain];
@@ -456,11 +463,14 @@ static NSImage *DYWheelImage(void) {
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.5",9) retain]; _subtitle.textColor=DYThemeColor(@"secondary");
_websiteLink=[[DYWebsiteLink alloc]initWithFrame:NSZeroRect];_websiteLink.title=@"更多插件访问 https://dayu.media";
_websiteLink.font=[NSFont systemFontOfSize:11];_websiteLink.bordered=NO;_websiteLink.alignment=NSTextAlignmentLeft;
_websiteLink.target=self;_websiteLink.action=@selector(openWebsite:);_websiteLink.toolTip=@"https://dayu.media";_websiteLink.accessibilityLabel=_websiteLink.title;
_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];
_export=[DYButton(@"导出 LUT",self,@selector(exportLUT:)) retain];
for(NSView *v in @[_brand,_subtitle,_resetAll,_save,_load,_export]){[self addSubview:v];v.hidden=_embedded;}
for(NSView *v in @[_brand,_subtitle,_websiteLink,_resetAll,_save,_load,_export]){[self addSubview:v];v.hidden=_embedded;}
NSMutableArray *themes=[NSMutableArray array];for(NSInteger i=0;i<5;i++){
DYSwatchButton *b=[[[DYSwatchButton alloc]initWithFrame:NSZeroRect]autorelease];[b setButtonType:NSButtonTypePushOnPushOff];b.swatch=DYThemeSwatch(i);b.tag=i;b.target=self;b.action=@selector(selectTheme:);b.title=@"";b.bordered=NO;
b.toolTip=[DYThemeNames()[i] stringByAppendingString:@"主题"];b.accessibilityLabel=b.toolTip;[self addSubview:b];b.hidden=_embedded;[themes addObject:b];
@@ -483,7 +493,7 @@ static NSImage *DYWheelImage(void) {
[self setAccessibilityLabel:@"大鱼调色检查器"];
[self setNeedsLayout:YES];
}
return self;
DYBetaSpanEnd(beta,nil);return self;
}
- (void)dealloc {
[self graphicGesture:NO title:nil];_spiderPanel.delegate=nil;
@@ -491,7 +501,7 @@ static NSImage *DYWheelImage(void) {
for(NSProgress *p in _assetLoads.allValues)[p cancel];[_assetLoads release];[_assetLoadIDs release];[_menuScan cancel];[_menuScan release];[_pendingAssetMenuCommand release];
[[NSNotificationCenter defaultCenter] removeObserver:self];
if(_embedded)[(id)_manager release];[_stackViews release];[_stackOrder release];[_stackRoots release];
[_brand release]; [_subtitle release]; [_resetAll release]; [_save release]; [_load release]; [_export release];
[_brand release]; [_subtitle release]; [_websiteLink release]; [_resetAll release]; [_save release]; [_load release]; [_export release];
[_scroll release]; [_document release]; [_sections release]; [_cards release]; [_controls release]; [_assetButtons release]; [_graphics release]; [_sampler release];
[_browser close];[_browser release];[_renderer release];[_library release];[_themeButtons release];[_tabs release];
[super dealloc];
@@ -516,10 +526,12 @@ static NSImage *DYWheelImage(void) {
else dispatch_async(dispatch_get_main_queue(),^{ [self refresh]; });
}
- (void)selectTheme:(NSButton *)button {DYSetThemeIndex(button.tag);}
- (void)openWebsite:(id)sender {[[NSWorkspace sharedWorkspace]openURL:[NSURL URLWithString:@"https://dayu.media"]];}
- (void)redrawTree:(NSView *)view { [view setNeedsDisplay:YES];for(NSView *child in view.subviews)[self redrawTree:child]; }
- (void)themeChanged:(NSNotification *)notification {
self.layer.backgroundColor=[DYThemePalette()[@"background"] CGColor];
for(NSButton *b in _themeButtons)b.state=b.tag==DYThemeIndex()?NSControlStateValueOn:NSControlStateValueOff;
_websiteLink.attributedTitle=[[[NSAttributedString alloc]initWithString:_websiteLink.title attributes:@{NSFontAttributeName:_websiteLink.font,NSForegroundColorAttributeName:DYAccent(),NSUnderlineStyleAttributeName:@(NSUnderlineStyleSingle)}]autorelease];
for(NSDictionary *r in _controls.allValues)[r[@"field"] setBackgroundColor:DYThemeColor(@"field")];
[_browser updatePalette:DYThemePalette()];[self redrawTree:self];
}
@@ -580,7 +592,7 @@ static NSImage *DYWheelImage(void) {
NSSegmentedControl *tabs=[NSSegmentedControl segmentedControlWithLabels:[key isEqual:@"levels"]?@[@"RGB",@"红",@"绿",@"蓝"]:@[@"阴影",@"中间调",@"高光"] trackingMode:NSSegmentSwitchTrackingSelectOne target:self action:@selector(tabChanged:)];tabs.identifier=key;tabs.selectedSegment=0;tabs.controlSize=NSControlSizeSmall;tabs.accessibilityLabel=[section[@"title"] stringByAppendingString:@"通道"];[card addSubview:tabs];[body addObject:tabs];
}
if([key isEqual:@"mixer"]||[key isEqual:@"film"]){
NSSegmentedControl *tabs=[NSSegmentedControl segmentedControlWithLabels:[key isEqual:@"mixer"]?@[@"红输出",@"绿输出",@"蓝输出"]:@[@"减色",@"晕光",@"辉光",@"颗粒",@"暗角"] trackingMode:NSSegmentSwitchTrackingSelectOne target:self action:@selector(tabChanged:)];tabs.identifier=key;tabs.selectedSegment=0;tabs.controlSize=NSControlSizeSmall;tabs.accessibilityLabel=[section[@"title"]stringByAppendingString:@"分组"];[card addSubview:tabs];[body addObject:tabs];
NSSegmentedControl *tabs=[NSSegmentedControl segmentedControlWithLabels:[key isEqual:@"mixer"]?@[@"红输出",@"绿输出",@"蓝输出"]:@[@"减色",@"晕光",@"辉光",@"颗粒",@"暗角",@"印片"] trackingMode:NSSegmentSwitchTrackingSelectOne target:self action:@selector(tabChanged:)];tabs.identifier=key;tabs.selectedSegment=0;tabs.controlSize=NSControlSizeSmall;tabs.accessibilityLabel=[section[@"title"]stringByAppendingString:@"分组"];[card addSubview:tabs];[body addObject:tabs];
}
if([key isEqual:@"curve"]) {
DYCurvePanel *graph=[[[DYCurvePanel alloc]initWithFrame:NSZeroRect]autorelease];graph.delegate=self;graph.identifier=@"curveGraph";[card addSubview:graph];[body addObject:graph];[_graphics addObject:graph];
@@ -691,9 +703,10 @@ static NSImage *DYWheelImage(void) {
_brand.frame=NSMakeRect(16,14,112,26);_subtitle.frame=NSMakeRect(130,21,40,13);
for(NSInteger i=0;i<5;i++)[_themeButtons[i]setFrame:NSMakeRect(w-146+i*22,17,21,22)];
_resetAll.frame=NSMakeRect(w-33,16,23,24);
_websiteLink.frame=NSMakeRect(16,41,w-32,20);
CGFloat gap=7,bw=(w-32-gap*2)/3;
_save.frame=NSMakeRect(16,50,bw,27); _load.frame=NSMakeRect(16+bw+gap,50,bw,27); _export.frame=NSMakeRect(16+(bw+gap)*2,50,bw,27);
_scroll.frame=_embedded?NSMakeRect(0,0,w,h):NSMakeRect(0,88,w,MAX(80,h-88));
_save.frame=NSMakeRect(16,74,bw,27); _load.frame=NSMakeRect(16+bw+gap,74,bw,27); _export.frame=NSMakeRect(16+(bw+gap)*2,74,bw,27);
_scroll.frame=_embedded?NSMakeRect(0,0,w,h):NSMakeRect(0,112,w,MAX(80,h-112));
CGFloat cw=MAX(244,_scroll.contentSize.width-32),y=8;
for(NSMutableDictionary *c in _cards) {
DYCard *card=c[@"view"];BOOL collapsed=[c[@"collapsed"]boolValue];NSString *key=c[@"section"][@"key"];
@@ -743,6 +756,7 @@ static NSImage *DYWheelImage(void) {
if(_refreshing||!_manager)return;
id<FxCustomParameterActionAPI_v4> action=[self actionAPI]; if(!action)return;
_refreshing=YES;
uint64_t beta=DYBetaSpanBegin(@"inspector_refresh",nil);
BOOL groupingChanged=NO;
[action startAction:self];
@try {
@@ -802,6 +816,7 @@ static NSImage *DYWheelImage(void) {
// Remote layout/accessibility can re-enter the host. Let the parameter
// action and current callback unwind before notifying the remote view.
if(!_embedded)[self synchronizeTools];
DYBetaSpanEnd(beta,nil);
if(groupingChanged)dispatch_async(dispatch_get_main_queue(),^{NSAccessibilityPostNotification(self,NSAccessibilityLayoutChangedNotification);});
}
- (void)postChanged { [[NSNotificationCenter defaultCenter] postNotificationName:@"DYModelChanged" object:_embedded?[(DYToolManager*)_manager host]:_manager]; }
@@ -1069,7 +1084,7 @@ static NSImage *DYWheelImage(void) {
DYUniforms effective;DYReadUniforms(_manager,t,&effective);values[@"cmConfigured"]=@(effective.cm.configured);values[@"blackWhiteMix"]=@(effective.cm.blackWhiteMix);
DYAssetState *state=DYReadAssets(_manager,t);paths=[[state.paths copy]autorelease]?:@{};spider=DYSpiderJSON(state.spiderMesh,state.spiderLinked);NSData *toolData=[NSPropertyListSerialization dataWithPropertyList:DYReadTools(_manager,t).document format:NSPropertyListBinaryFormat_v1_0 options:0 error:nil];tools=[toolData base64EncodedStringWithOptions:0];
} @finally {[action endAction:self];}
return @{@"format":@"com.dayu.color.preset",@"version":@5,@"values":values,@"paths":paths,@"spider":spider,@"tools":tools?:@""};
return @{@"format":@"com.dayu.color.preset",@"version":@6,@"values":values,@"paths":paths,@"spider":spider,@"tools":tools?:@""};
}
- (void)savePreset:(id)sender {
NSDictionary *snapshot=[self presetSnapshot];if(!snapshot)return;
@@ -1084,7 +1099,7 @@ static NSImage *DYWheelImage(void) {
NSError *error=nil;NSData *data=[NSData dataWithContentsOfURL:panel.URL options:0 error:&error];
if(!data||data.length>32*1024*1024){[self showError:error.localizedDescription?:@"预设文件过大"];return;}
id json=[NSJSONSerialization JSONObjectWithData:data options:0 error:&error];
if(![json isKindOfClass:NSDictionary.class]||![json[@"format"] isEqual:@"com.dayu.color.preset"]||![@[@1,@2,@3,@4,@5]containsObject:json[@"version"]]||![json[@"values"] isKindOfClass:NSDictionary.class]||![json[@"paths"] isKindOfClass:NSDictionary.class]){[self showError:@"这不是有效的大鱼调色预设。"];return;}
if(![json isKindOfClass:NSDictionary.class]||![json[@"format"] isEqual:@"com.dayu.color.preset"]||![@[@1,@2,@3,@4,@5,@6]containsObject:json[@"version"]]||![json[@"values"] isKindOfClass:NSDictionary.class]||![json[@"paths"] isKindOfClass:NSDictionary.class]){[self showError:@"这不是有效的大鱼调色预设。"];return;}
NSDictionary *values=json[@"values"],*paths=json[@"paths"];NSData *mesh=[json[@"version"]integerValue]>=3?DYSpiderFromJSON(json[@"spider"]):nil;if([json[@"version"]integerValue]>=3&&!mesh){[self showError:@"预设包含无效蜘蛛盘,当前调色未修改。"];return;}
NSDictionary *tools=[[[DYToolDocument alloc]init]autorelease].document;if([json[@"version"]integerValue]>=4){id encoded=json[@"tools"];NSData *binary=[encoded isKindOfClass:NSString.class]?[[[NSData alloc]initWithBase64EncodedString:encoded options:0]autorelease]:nil;tools=binary?[NSPropertyListSerialization propertyListWithData:binary options:NSPropertyListImmutable format:NULL error:nil]:nil;if(!DYValidToolDocument(tools)){[self showError:@"预设包含无效工具或蒙版,当前调色未修改。"];return;}}
for(NSDictionary *d in DYDescriptors()) {
+9 -2
查看文件
@@ -110,7 +110,10 @@ static void initialize(){static dispatch_once_t once;dispatch_once(&once,^{
CM(white,@"白点",.5,1.5,1,1);CM(shoulder,@"肩部压缩",0,1,.5,1);CM(highlights,@"一级高光",-1,1,0,1);CM(midtones,@"一级中间调",-1,1,0,1);CM(shadows,@"一级阴影",-1,1,0,1);CM(black,@"黑点",-1,1,0,1);CM(toe,@"趾部压缩",0,1,.5,1);CM(chromaMix,@"色度混合",0,1,.5,1);
CM(bypassExposure,@"旁路一级曝光",0,1,0,1);CM(bypassBalance,@"旁路一级色彩",0,1,0,1);CM(bypassContrast,@"旁路一级对比",0,1,0,1);CM(bypassTone,@"旁路一级影调",0,1,0,1);
CM(outputEnabled,@"输出转换启用",0,1,1,2);CH(outputTransfer,@"输出曲线",1002,2,transfers);CH(outputGamut,@"输出色域",22,2,DYCMGamuts());
[cm addObject:cmRow(@"cmtoneMapping",@"自动色调映射",offsetof(DYCMSettings,toneMapping),0,1,0,2,@[@{@"id":@0,@"name":@"关闭"},@{@"id":@1,@"name":@"开启"}])];
NSMutableDictionary *mapping=[[cmRow(@"cmtoneMapping",@"自动色调映射",offsetof(DYCMSettings,toneMapping),0,1,1,2,@[@{@"id":@0,@"name":@"关闭"},@{@"id":@1,@"name":@"开启"}]) mutableCopy]autorelease];
// Keep the host's historical stored default. FCP omits unchanged values in
// old projects; the current template explicitly seeds the new enabled value.
mapping[@"hostDefault"]=@0;[descriptors replaceObjectAtIndex:descriptors.count-1 withObject:mapping];[cm addObject:mapping];
#undef CM
#undef CH
NSMutableArray *input=[NSMutableArray array],*primary=[NSMutableArray array],*output=[NSMutableArray array];
@@ -180,6 +183,10 @@ static void initialize(){static dispatch_once_t once;dispatch_once(&once,^{
FE(grainEnabled,@"filmGrain",@"启用颗粒",3);FR(grainAmount,@"filmGrainAmount",@"颗粒数量",0,1,0,3);FR(grainSize,@"filmGrainSize",@"颗粒大小",1,20,1,3);FR(grainResponse,@"filmGrainResponse",@"胶片响应",-1,1,0,3);FR(grainColor,@"filmGrainColor",@"颜色变化",0,1,0,3);
NSMutableDictionary *hold=FR(grainHold,@"filmGrainHold",@"颗粒帧保持",1,5,1,3);hold[@"kind"]=@"popup";hold[@"options"]=@[@"每帧更新",@"保持 2 帧",@"保持 3 帧",@"保持 4 帧",@"保持 5 帧"];hold[@"values"]=@[@1,@2,@3,@4,@5];FR(grainSeed,@"filmGrainSeed",@"颗粒种子",0,65535,0,3);
FE(vignetteEnabled,@"filmVignette",@"启用暗角",4);FR(vignetteIntensity,@"filmVignetteIntensity",@"暗角强度",-2,2,1,4);FR(vignetteRadius,@"filmVignetteRadius",@"暗角半径",0,100,50,4);FR(vignetteFalloff,@"filmVignetteFalloff",@"暗角过渡",0,1,.5,4);
NSMutableDictionary *printLook=[[row(@"filmPrintLook",@"印片外观",offsetof(DYUniforms,filmPrint),0,8,0,@"popup")mutableCopy]autorelease];
printLook[@"filmTab"]=@5;printLook[@"notAnimatable"]=@YES;printLook[@"values"]=@[@0,@1,@2,@3,@4,@5,@6,@7,@8];printLook[@"options"]=@[@"无",@"Kodak 2383",@"Kodak 2393",@"Kodak 2302 BW",@"Fuji 3510",@"Fuji 3513",@"Fuji 3519",@"Fuji 3521",@"Agfa CP30"];
[descriptors replaceObjectAtIndex:descriptors.count-1 withObject:printLook];[film addObject:printLook];
NSMutableDictionary *printStrength=[[row(@"filmPrintStrength",@"印片强度",offsetof(DYUniforms,filmPrint)+sizeof(float),0,1,1,@"float")mutableCopy]autorelease];printStrength[@"filmTab"]=@5;[descriptors replaceObjectAtIndex:descriptors.count-1 withObject:printStrength];[film addObject:printStrength];
section(@"film",@"胶片模拟",offsetof(DYUniforms,film)+offsetof(DYFilmSettings,enabled),film);
#undef FR
#undef FE
@@ -191,7 +198,7 @@ void DYReadUniforms(id<PROAPIAccessing>m,CMTime t,DYUniforms*u){DYDefaultUniform
}
BOOL DYCreateParameters(id<PROAPIAccessing>m,NSError**error){id<FxParameterCreationAPI_v5>a=[m apiForProtocol:@protocol(FxParameterCreationAPI_v5)];BOOL ok=a!=nil;
ok=[a addCustomParameterWithName:@"大鱼调色" parameterID:DYInspectorParameterID defaultValue:[[[DYInspectorToken alloc]init]autorelease] parameterFlags:kFxParameterFlag_CUSTOM_UI|kFxParameterFlag_USE_FULL_VIEW_WIDTH|kFxParameterFlag_DONT_DISPLAY_IN_DASHBOARD|kFxParameterFlag_NOT_ANIMATABLE]&&ok;
for(NSDictionary*r in DYDescriptors())ok=[a addFloatSliderWithName:r[@"title"] parameterID:[r[@"pid"]unsignedIntValue] defaultValue:[r[@"default"]doubleValue] parameterMin:[r[@"min"]doubleValue] parameterMax:[r[@"max"]doubleValue] sliderMin:[r[@"min"]doubleValue] sliderMax:[r[@"max"]doubleValue] delta:[r[@"step"]doubleValue] parameterFlags:kFxParameterFlag_HIDDEN|([r[@"notAnimatable"]boolValue]?kFxParameterFlag_NOT_ANIMATABLE:0)]&&ok;
for(NSDictionary*r in DYDescriptors())ok=[a addFloatSliderWithName:r[@"title"] parameterID:[r[@"pid"]unsignedIntValue] defaultValue:[r[@"hostDefault"]?:r[@"default"] doubleValue] parameterMin:[r[@"min"]doubleValue] parameterMax:[r[@"max"]doubleValue] sliderMin:[r[@"min"]doubleValue] sliderMax:[r[@"max"]doubleValue] delta:[r[@"step"]doubleValue] parameterFlags:kFxParameterFlag_HIDDEN|([r[@"notAnimatable"]boolValue]?kFxParameterFlag_NOT_ANIMATABLE:0)]&&ok;
ok=[a addCustomParameterWithName:@"LUT 文件" parameterID:DYAssetsParameterID defaultValue:[[[DYAssetState alloc]init]autorelease] parameterFlags:kFxParameterFlag_HIDDEN|kFxParameterFlag_NOT_ANIMATABLE]&&ok;
ok=[a addCustomParameterWithName:@"工具与蒙版" parameterID:DYToolsParameterID defaultValue:[[[DYToolDocument alloc]init]autorelease] parameterFlags:kFxParameterFlag_HIDDEN|kFxParameterFlag_NOT_ANIMATABLE]&&ok;
ok=[a addStringParameterWithName:@"蒙版画布会话" parameterID:DYCanvasSessionParameterID defaultValue:@"" parameterFlags:kFxParameterFlag_HIDDEN|kFxParameterFlag_NOT_ANIMATABLE|kFxParameterFlag_DONT_SAVE]&&ok;
+4 -2
查看文件
@@ -1,4 +1,5 @@
#import "DYPlugIn.h"
#import "../Shared/DYBetaDiagnostics.h"
#import "DYModel.h"
#import "DYRenderer.h"
#import "DYInspector.h"
@@ -15,10 +16,11 @@
@implementation DYPlugIn {
DYRenderer *_renderer;
BOOL _copyAnalyzed;
std::atomic_bool _betaFirstRenderStarted;
#include "DYToolHostIvars.inc.h"
}
#include "DYToolHostMethods.inc.h"
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager{if((self=[super init])){_apiManager=manager;_renderer=[DYRenderer new];[self initializeToolHost];NSNotificationCenter*n=NSNotificationCenter.defaultCenter;[n addObserver:self selector:@selector(exportRequested:) name:@"DYExportLUT" object:manager];[n addObserver:self selector:@selector(autoRequested:) name:@"DYAutoGrade" object:manager];[n addObserver:self selector:@selector(autoRequested:) name:@"DYAutoWhiteBalance" object:manager];[n addObserver:self selector:@selector(whiteBalanceRequested:) name:@"DYWhiteBalanceColor" object:manager];}return self;}
- (instancetype)initWithAPIManager:(id<PROAPIAccessing>)manager{uint64_t beta=DYBetaSpanBegin(@"plugin_init",nil);if((self=[super init])){_betaFirstRenderStarted.store(false);_apiManager=manager;_renderer=[DYRenderer new];[self initializeToolHost];NSNotificationCenter*n=NSNotificationCenter.defaultCenter;[n addObserver:self selector:@selector(exportRequested:) name:@"DYExportLUT" object:manager];[n addObserver:self selector:@selector(autoRequested:) name:@"DYAutoGrade" object:manager];[n addObserver:self selector:@selector(autoRequested:) name:@"DYAutoWhiteBalance" object:manager];[n addObserver:self selector:@selector(whiteBalanceRequested:) name:@"DYWhiteBalanceColor" object:manager];}DYBetaSpanEnd(beta,nil);return self;}
- (void)dealloc{[self tearDownToolHost];[NSNotificationCenter.defaultCenter removeObserver:self];[_renderer release];[super dealloc];}
- (BOOL)properties:(NSDictionary**)p error:(NSError**)e{*p=@{kFxPropertyKey_MayRemapTime:@NO,kFxPropertyKey_PixelTransformSupport:@(kFxPixelTransform_ScaleTranslate),kFxPropertyKey_VariesWhenParamsAreStatic:@YES,kFxPropertyKey_DesiredProcessingColorInfo:@(kFxImageColorInfo_RGB_LINEAR),kFxPropertyKey_NeedsFullBuffer:@YES};return YES;}
- (BOOL)addParametersWithError:(NSError**)e{return DYCreateParameters(_apiManager,e);}
@@ -31,7 +33,7 @@
- (BOOL)destinationImageRect:(FxRect*)rect sourceImages:(NSArray<FxImageTile*>*)src destinationImage:(FxImageTile*)dst pluginState:(NSData*)s atTime:(CMTime)t error:(NSError**)e{if(!src.count)return NO;*rect=src[0].imagePixelBounds;return YES;}
- (BOOL)sourceTileRect:(FxRect*)rect sourceImageIndex:(NSUInteger)i sourceImages:(NSArray<FxImageTile*>*)src destinationTileRect:(FxRect)dstRect destinationImage:(FxImageTile*)dst pluginState:(NSData*)s atTime:(CMTime)t error:(NSError**)e{if(i>=src.count)return NO;*rect=src[i].imagePixelBounds;return YES;}
- (BOOL)renderDestinationImage:(FxImageTile*)dst sourceImages:(NSArray<FxImageTile*>*)src pluginState:(NSData*)s atTime:(CMTime)t error:(NSError**)e{
if(!src.count||!src[0].ioSurface||!dst.ioSurface||!s.length)return NO;NSDictionary*p=[NSPropertyListSerialization propertyListWithData:s options:NSPropertyListImmutable format:NULL error:e];if(![p isKindOfClass:NSDictionary.class])return NO;NSData*b=p[@"uniforms"];if(![@[@1,@2]containsObject:p[@"schema"]]||![b isKindOfClass:NSData.class]||b.length!=sizeof(DYUniforms)||![p[@"paths"]isKindOfClass:NSDictionary.class])return NO;DYUniforms u;[b getBytes:&u length:sizeof(u)];BOOL ok=[_renderer renderSource:src[0] destination:dst uniforms:u paths:p[@"paths"] spider:p[@"spider"] tools:p[@"tools"] error:e];if(ok){if(_toolCaptureEnabled&&!_trackingActive.load()){dy::GrayFrame frame=[self toolGrayFrame:src[0] error:nil];if(frame.valid()){@synchronized(self){_toolSourceFrame=std::move(frame);_toolSourceTime=t;}}}BOOL analyze=NO;@synchronized(self){if(![p[@"copyAuto"]boolValue])_copyAnalyzed=NO;else if(!_copyAnalyzed){_copyAnalyzed=YES;analyze=YES;}}if(analyze){NSDictionary*values=DYAutoGrade([_renderer preview]);if(values)dispatch_async(dispatch_get_main_queue(),^{[self applyValues:values];});}}return ok;
if(!src.count||!src[0].ioSurface||!dst.ioSurface||!s.length)return NO;NSDictionary*p=[NSPropertyListSerialization propertyListWithData:s options:NSPropertyListImmutable format:NULL error:e];if(![p isKindOfClass:NSDictionary.class])return NO;NSData*b=p[@"uniforms"];if(![@[@1,@2]containsObject:p[@"schema"]]||![b isKindOfClass:NSData.class]||b.length!=sizeof(DYUniforms)||![p[@"paths"]isKindOfClass:NSDictionary.class])return NO;DYUniforms u;[b getBytes:&u length:sizeof(u)];uint64_t beta=!_betaFirstRenderStarted.exchange(true)?DYBetaSpanBegin(@"first_render",nil):0;BOOL ok=[_renderer renderSource:src[0] destination:dst uniforms:u paths:p[@"paths"] spider:p[@"spider"] tools:p[@"tools"] error:e];DYBetaSpanEnd(beta,@{@"status":ok?@"passed":@"failed"});if(!ok)DYBetaEvent(@"render_error",@{@"error_domain":(e&&*e)?(*e).domain:@"unknown",@"error_code":@((e&&*e)?(*e).code:0)});if(ok){if(_toolCaptureEnabled&&!_trackingActive.load()){dy::GrayFrame frame=[self toolGrayFrame:src[0] error:nil];if(frame.valid()){@synchronized(self){_toolSourceFrame=std::move(frame);_toolSourceTime=t;}}}BOOL analyze=NO;@synchronized(self){if(![p[@"copyAuto"]boolValue])_copyAnalyzed=NO;else if(!_copyAnalyzed){_copyAnalyzed=YES;analyze=YES;}}if(analyze){NSDictionary*values=DYAutoGrade([_renderer preview]);if(values)dispatch_async(dispatch_get_main_queue(),^{[self applyValues:values];});}}return ok;
}
- (void)alert:(NSString*)message{dispatch_async(dispatch_get_main_queue(),^{NSAlert*a=[NSAlert new];a.messageText=@"大鱼调色";a.informativeText=message?:@"操作未完成";[a runModal];[a release];});}
- (void)exportRequested:(NSNotification*)n{
+5 -2
查看文件
@@ -1,4 +1,5 @@
#import "DYRenderer.h"
#import "../Shared/DYBetaDiagnostics.h"
#import "DYModel.h"
#include "DYSpiderState.h"
#include "DYToolGPU.h"
@@ -99,15 +100,17 @@ static void bypassIdleSkin(DYUniforms *u){
- (NSData*)lookLUTPreview{@synchronized(_previewLock){return [[_lookLUTPreview retain]autorelease];}}
- (NSMutableDictionary*)device:(uint64_t)registry error:(NSError**)err{
NSNumber*k=@(registry);NSMutableDictionary*entry=_devices[k];if(entry)return entry;
uint64_t beta=DYBetaSpanBegin(@"device_prepare",nil);@try{
id<MTLDevice>d=nil;NSArray*all=MTLCopyAllDevices();for(id<MTLDevice>candidate in all)if(candidate.registryID==registry||!registry){d=[candidate retain];break;}[all release];if(!d){fail(err,@"宿主的 Metal 设备不可用");return nil;}
NSURL*url=[[NSBundle bundleForClass:self.class]URLForResource:@"default" withExtension:@"metallib"];
id<MTLLibrary>lib=[d newLibraryWithURL:url error:err];if(!lib){[d release];return nil;}
id<MTLCommandQueue>q=[d newCommandQueue];entry=[NSMutableDictionary dictionaryWithDictionary:@{@"device":d,@"library":lib,@"queue":q,@"pipelines":[NSMutableDictionary dictionary]}];
for(NSString*fn in @[@"dyUnpremultiply",@"dyWhitesSceneStatistics",@"dyLUTExportKernel",@"dyInputAnalysis",@"dyColorManagement",@"dyToolBlend",@"dyToolSkin",@"dyFilmPoint",@"dyFilmNoise",@"dyFilmSparseBlur",@"dyFilmBloomEdges",@"dyFilmMix"]){id<MTLFunction>f=[lib newFunctionWithName:fn];if(!f){fail(err,[fn stringByAppendingString:@" 缺失"]);[lib release];[q release];[d release];return nil;}id<MTLComputePipelineState>p=[d newComputePipelineStateWithFunction:f error:err];[f release];if(!p){[lib release];[q release];[d release];return nil;}entry[fn]=p;[p release];}
for(NSString*fn in @[@"dyUnpremultiply",@"dyWhitesSceneStatistics",@"dyLUTExportKernel",@"dyInputAnalysis",@"dyColorManagement",@"dyToolBlend",@"dyToolSkin",@"dyFilmPoint",@"dyFilmNoise",@"dyFilmSparseBlur",@"dyFilmBloomEdges",@"dyFilmMix",@"dyFilmPrint"]){id<MTLFunction>f=[lib newFunctionWithName:fn];if(!f){fail(err,[fn stringByAppendingString:@" 缺失"]);[lib release];[q release];[d release];return nil;}uint64_t pipelineSpan=DYBetaSpanBegin(@"gpu_pipeline",@{@"pipeline":fn,@"gpu":d.name?:@"unknown"});id<MTLComputePipelineState>p=[d newComputePipelineStateWithFunction:f error:err];DYBetaSpanEnd(pipelineSpan,@{@"status":p?@"passed":@"failed"});[f release];if(!p){[lib release];[q release];[d release];return nil;}entry[fn]=p;[p release];}
float identity[32];for(int z=0;z<2;z++)for(int y=0;y<2;y++)for(int x=0;x<2;x++){int i=((z*2+y)*2+x)*4;identity[i]=x;identity[i+1]=y;identity[i+2]=z;identity[i+3]=1;}id<MTLTexture>neutral=texture3D(d,identity,2);if(!neutral){fail(err,@"无法分配中性 LUT");return nil;}entry[@"identity"]=neutral;
// Preparing before the first frame may use registry 0. Reuse those pipelines
// when the host subsequently supplies that device's actual registry ID.
_devices[k]=entry;_devices[@(d.registryID)]=entry;[d release];[lib release];[q release];return entry;
}@finally{DYBetaSpanEnd(beta,nil);}
}
- (id<MTLTexture>)lut:(NSString*)path entry:(NSDictionary*)e error:(NSError**)err{
if(!path.length)return e[@"identity"];
@@ -194,7 +197,7 @@ static void bypassIdleSkin(DYUniforms *u){
}}}
- (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)u paths:(NSDictionary*)paths error:(NSError**)err{return [self exportLUT:url uniforms:u paths:paths spider:nil error:err];}
- (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)u paths:(NSDictionary*)paths spider:(NSData*)spider error:(NSError**)err{@synchronized(self){
if(DYFilmActive(u.film)&&DYFilmSpatialActive(u.film))return fail(err,@"胶片空间和颗粒处理不能保存到静态 Cube,请保存完整预设。");
if(DYFilmToolActive(u)&&DYFilmSpatialActive(u.film))return fail(err,@"胶片空间和颗粒处理不能保存到静态 Cube,请保存完整预设。");
NSMutableDictionary *e=[self device:0 error:err];if(!e)return NO;id<MTLDevice>d=e[@"device"];const NSUInteger n=33,count=n*n*n,width=n*n,height=n;
MTLTextureDescriptor *desc=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA16Float width:width height:height mipmapped:NO];desc.storageMode=MTLStorageModeShared;desc.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite|MTLTextureUsageRenderTarget;
id<MTLTexture>input=[d newTextureWithDescriptor:desc],output=[d newTextureWithDescriptor:desc];if(!input||!output){[input release];[output release];return fail(err,@"无法分配 LUT 色格");}
+3 -1
查看文件
@@ -18,7 +18,9 @@
auto renderTools=[&](NSDictionary *tools,DYUniforms u,NSData *mesh,NSString *name){NSError *failure=nil;BOOL ok=[renderer renderSource:source destination:destination uniforms:u paths:@{} spider:mesh tools:tools error:&failure];run.need(name,ok,@{@"error":reason(failure)});return read(destination,gpu);};
[[source metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,width,height) mipmapLevel:0 withBytes:input.data() bytesPerRow:width*8];
Pixels baseline=renderTools(empty.document,defaults,nil,@"empty-tool-document-render");run.record(@"empty-tool-document-preserves-legacy-pixels-exactly",difference(baseline,neutral).maximum==0);
doc=DYMutablePlist(empty.document);for(NSString *type in DYToolTypes())[doc[@"layers"]addObject:DYNewTool(type)];Pixels initialized=renderTools(doc,defaults,nil,@"all-twelve-initialized-tool-types-render");run.record(@"initialized-repeated-tools-are-exactly-neutral",difference(initialized,neutral).maximum==0);
DYUniforms newPrimary=DYToolUniforms(DYNewTool(@"primary")),oldPrimary=DYToolUniforms(@{@"type":@"primary",@"values":@{}});
run.record(@"new-primary-layer-auto-mapping-on-old-omitted-default-stays-off",newPrimary.cm.toneMapping==1&&oldPrimary.cm.toneMapping==0&&!DYToolIsNeutral(DYNewTool(@"primary"))&&DYToolIsNeutral(@{@"type":@"primary",@"values":@{}}));
doc=DYMutablePlist(empty.document);for(NSString *type in DYToolTypes()){NSMutableDictionary *n=DYMutablePlist(DYNewTool(type));if([type isEqual:@"primary"])n[@"values"][@"cmtoneMapping"]=@0;[doc[@"layers"]addObject:n];}Pixels initialized=renderTools(doc,defaults,nil,@"all-initialized-tool-types-with-legacy-primary-mapping-render");run.record(@"legacy-neutral-repeated-tools-preserve-pixels",difference(initialized,neutral).maximum==0);
// Reference is two explicit isolated native operations, which catches shared
// uniform or lookup caches, ordering, repeated CST and accidental base replay.
DYUniforms layerOne=DYToolUniforms(first),layerTwo=DYToolUniforms(second);render(run,renderer,source,destination,gpu,layerOne,@{},@"hsl-stack-first-reference");DYDiagnosticTile *intermediate=[[[DYDiagnosticTile alloc]initWithDevice:gpu width:width height:height]autorelease];Pixels single=read(destination,gpu);[[intermediate metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,width,height) mipmapLevel:0 withBytes:single.data() bytesPerRow:width*8];Pixels expected=render(run,renderer,intermediate,destination,gpu,layerTwo,@{},@"hsl-stack-second-reference");
+3 -3
查看文件
@@ -44,7 +44,7 @@
if(!tools)tools=@{@"schema":@1,@"layers":@[],@"baseMasks":@{}};if(!DYValidToolDocument(tools))return fail(error,@"工具或蒙版数据损坏,未更改原工程");
NSArray *layers=tools[@"layers"];BOOL active=NO,anchored=NO;for(NSDictionary *node in layers)if(!DYToolIsNeutral(node)){active=YES;anchored|=![DYToolRootAnchor(tools,node[@"id"])isEqual:@"tail"];}
// No active extra tool keeps the exact historical fused path, including HDR.
if(!active&&!DYChannelMixerActive(u)&&!DYFilmActive(u.film))return [self renderLegacy:src destination:dst uniforms:u paths:paths spider:spider masks:tools[@"baseMasks"] error:error];
if(!active&&!DYChannelMixerActive(u)&&!DYFilmToolActive(u))return [self renderLegacy:src destination:dst uniforms:u paths:paths spider:spider masks:tools[@"baseMasks"] error:error];
NSMutableDictionary *entry=[self device:dst.deviceRegistryID error:error];if(!entry)return NO;id<MTLDevice>d=entry[@"device"];id<MTLTexture>input=[src metalTextureForDevice:d];if(!input)return fail(error,@"宿主图像纹理不可用");
MTLTextureDescriptor *desc=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA16Float width:input.width height:input.height mipmapped:NO];desc.storageMode=MTLStorageModePrivate;desc.usage=MTLTextureUsageRenderTarget|MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite;
DYExportTile *tile=nil,*skinReference=nil,*originalReference=nil;NSArray *order=DYToolDisplayOrder(tools);NSMutableDictionary *groups=[NSMutableDictionary dictionary];for(NSString *ID in order){NSDictionary *node=DYToolWithID(tools,ID);if(!node||DYToolIsNeutral(node))continue;NSString *root=DYToolRootAnchor(tools,ID);if(!groups[root])groups[root]=[NSMutableArray array];[groups[root]addObject:node];}
@@ -90,14 +90,14 @@
if(!apply(@"base:spider"))return NO;
}
// New end-of-chain base tools do not move any historical color stages.
for(NSString *type in @[@"mixer",@"film"]){BOOL enabled=[type isEqual:@"mixer"]?DYChannelMixerActive(u):DYFilmActive(u.film);if(enabled){DYExportTile *next=makeTile();if(!next)return fail(error,@"无法分配胶片工具缓冲区");BOOL ok=[self renderFilmTool:type source:tile destination:next uniforms:u masks:tools[@"baseMasks"][type]?:@[] entry:entry error:error];if(!ok){[next release];return NO;}replace(next);}if(!apply([@"base:" stringByAppendingString:type]))return NO;}
for(NSString *type in @[@"mixer",@"film"]){BOOL enabled=[type isEqual:@"mixer"]?DYChannelMixerActive(u):DYFilmToolActive(u);if(enabled){DYExportTile *next=makeTile();if(!next)return fail(error,@"无法分配胶片工具缓冲区");BOOL ok=[self renderFilmTool:type source:tile destination:next uniforms:u masks:tools[@"baseMasks"][type]?:@[] entry:entry error:error];if(!ok){[next release];return NO;}replace(next);}if(!apply([@"base:" stringByAppendingString:type]))return NO;}
// Schema 1 extra layers (and children inserted after those layers) retain
// their old end-of-chain order. Saving does not silently migrate old looks.
if(!apply(@"tail"))return NO;return [self copyTile:tile to:dst entry:entry error:error];
}@finally{[originalReference release];[skinReference release];[tile release];}
}}}
- (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)u paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools error:(NSError**)error {@synchronized(self){
if(DYFilmActive(u.film)&&DYFilmSpatialActive(u.film))return fail(error,@"当前胶片含晕光、辉光、颗粒或暗角,无法完整保存到静态 Cube。请保存完整预设,或关闭这些处理后再导出。");for(NSDictionary *node in tools[@"layers"]){DYUniforms layer=DYToolUniforms(node);if([node[@"type"]isEqual:@"film"]&&DYFilmActive(layer.film)&&DYFilmSpatialActive(layer.film))return fail(error,@"新增胶片层含空间或时间处理,无法完整保存到静态 Cube。请保存完整预设。");}
if(DYFilmToolActive(u)&&DYFilmSpatialActive(u.film))return fail(error,@"当前胶片含晕光、辉光、颗粒或暗角,无法完整保存到静态 Cube。请保存完整预设,或关闭这些处理后再导出。");for(NSDictionary *node in tools[@"layers"]){DYUniforms layer=DYToolUniforms(node);if([node[@"type"]isEqual:@"film"]&&DYFilmToolActive(layer)&&DYFilmSpatialActive(layer.film))return fail(error,@"新增胶片层含空间或时间处理,无法完整保存到静态 Cube。请保存完整预设。");}
for(NSArray *masks in [tools[@"baseMasks"]allValues])if(masks.count)return fail(error,@"当前调色含空间蒙版或跟踪,Cube 无法保存这些信息。请先保存完整预设,或移除蒙版后导出。");for(NSDictionary *node in tools[@"layers"])if([node[@"masks"]count])return fail(error,@"新增工具含蒙版,无法完整导出为 Cube。请保存完整预设。");
_toolDocument=tools;BOOL ok=NO;@try{ok=[self exportLUT:url uniforms:u paths:paths spider:spider error:error];}@finally{_toolDocument=nil;}return ok;
}}
+5 -3
查看文件
@@ -14,7 +14,7 @@ static NSData *parameterData(DYMaskParameters p){return [NSData dataWithBytes:&p
static BOOL readParameters(id data,DYMaskParameters *p){if(![data isKindOfClass:NSData.class]||[data length]!=sizeof(*p))return NO;[data getBytes:p length:sizeof(*p)];return dyValidMaskParameters(*p);}
static CMTime keyTime(NSDictionary *key){return CMTimeMakeWithEpoch([key[@"value"]longLongValue],[key[@"scale"]intValue],[key[@"epoch"]longLongValue]);}
NSDictionary *DYNewMask(NSInteger kind){if(kind<0||kind>5)return nil;DYMaskParameters p=dyDefaultMaskParameters();p.kind=(DYMaskKind)kind;p.width=.5;p.height=.5;p.sourceStage=DYMaskSourceOriginal;if(kind==DYMaskHSLKey)p.flags=DYMaskHueEnabled;NSData *nodes=[NSData data];if(kind==DYMaskBezier){DYBezierNode n[4]={};float x[4]={-.5,.5,.5,-.5},y[4]={-.5,-.5,.5,.5};for(int i=0;i<4;i++)n[i]={x[i],y[i],x[i],y[i],x[i],y[i]};nodes=[NSData dataWithBytes:n length:sizeof(n)];}return @{@"id":NSUUID.UUID.UUIDString,@"enabled":@YES,@"combine":@0,@"parameters":parameterData(p),@"nodes":nodes,@"keys":@[]};}
NSDictionary *DYNewTool(NSString *type){if(![DYToolTypes()containsObject:type])return nil;return @{@"id":NSUUID.UUID.UUIDString,@"type":type,@"values":[type isEqual:@"skin"]?@{@"skinStrength":@0}:@{},@"paths":@{},@"spiderLinked":@YES,@"masks":@[]};}
NSDictionary *DYNewTool(NSString *type){if(![DYToolTypes()containsObject:type])return nil;return @{@"id":NSUUID.UUID.UUIDString,@"type":type,@"values":[type isEqual:@"skin"]?@{@"skinStrength":@0}:[type isEqual:@"primary"]?@{@"cmtoneMapping":@1}:@{},@"paths":@{},@"spiderLinked":@YES,@"masks":@[]};}
BOOL DYValidToolMask(NSDictionary *mask){
if(![mask isKindOfClass:NSDictionary.class]||!validID(mask[@"id"])||!finiteNumber(mask[@"enabled"])||!finiteNumber(mask[@"combine"])||[mask[@"combine"]integerValue]<0||[mask[@"combine"]integerValue]>2)return NO;
DYMaskParameters p;if(!readParameters(mask[@"parameters"],&p))return NO;NSData *nodes=mask[@"nodes"];if(![nodes isKindOfClass:NSData.class]||nodes.length%sizeof(DYBezierNode)||nodes.length>32*sizeof(DYBezierNode))return NO;
@@ -70,9 +70,11 @@ NSDictionary *DYToolRenderSnapshot(NSDictionary *doc,CMTime t){
}
DYUniforms DYToolUniforms(NSDictionary *node){DYUniforms u;DYDefaultUniforms(&u);NSString *type=node[@"type"];for(NSDictionary *s in DYSections())for(NSDictionary *d in DYDescriptors())if([d[@"pid"]isEqual:s[@"enabled"]])*(float*)((uint8_t*)&u+[d[@"offset"]unsignedIntegerValue])=0;u.primarySectionEnabled=0;u.cm.configured=-1;u.inputProfile=u.preLUTStrength=0;u.skinProtection.x=0;
NSArray *parts=[type isEqual:@"primary"]?@[@"input",@"primary",@"output"]:[type isEqual:@"base"]?@[@"base",@"color"]:@[type];for(NSString *part in parts){NSDictionary *s=DYToolSection(part);for(NSDictionary *d in DYDescriptors())if([d[@"pid"]isEqual:s[@"enabled"]])*(float*)((uint8_t*)&u+[d[@"offset"]unsignedIntegerValue])=1;}
if([type isEqual:@"primary"]){u.primarySectionEnabled=1;u.cm.configured=1;u.cm.inputTransfer=u.cm.outputTransfer;u.cm.inputGamut=u.cm.outputGamut;}
// Old independent layers omitted the former zero default. Keep their image;
// new layers explicitly store the user's new automatic-mapping default.
if([type isEqual:@"primary"]){u.primarySectionEnabled=1;u.cm.configured=1;u.cm.inputTransfer=u.cm.outputTransfer;u.cm.inputGamut=u.cm.outputGamut;u.cm.toneMapping=0;}
for(NSDictionary *d in DYDescriptors()){NSNumber *v=node[@"values"][d[@"key"]];if(v&&[d[@"offset"]integerValue]>=0)*(float*)((uint8_t*)&u+[d[@"offset"]unsignedIntegerValue])=v.floatValue;}return u;}
BOOL DYToolIsNeutral(NSDictionary *node){NSString *type=node[@"type"];DYUniforms u=DYToolUniforms(node);NSDictionary *section=DYToolSection(type);BOOL enabled=YES;if([type isEqual:@"primary"])enabled=u.primarySectionEnabled>.5;else if([type isEqual:@"base"])enabled=u.baseSectionEnabled>.5||u.colorSectionEnabled>.5;else for(NSDictionary *d in DYDescriptors())if([d[@"pid"]isEqual:section[@"enabled"]])enabled=*(float*)((uint8_t*)&u+[d[@"offset"]unsignedIntegerValue])>.5;if(!enabled)return YES;if([type isEqual:@"mixer"])return !DYChannelMixerActive(u);if([type isEqual:@"film"])return !DYFilmActive(u.film);if([type isEqual:@"skin"])return u.skinProtection.y==0;if([node[@"type"]isEqual:@"spider"]&&[node[@"spider"]length]){auto mesh=DYSpiderMesh(node[@"spider"]);for(float v:dy::meshSamples(mesh))if(v!=0)return NO;}if([node[@"paths"]count])return NO;for(NSDictionary *d in DYDescriptors()){NSNumber *v=node[@"values"][d[@"key"]];if(v&&v.floatValue!=[d[@"default"]floatValue])return NO;}return YES;}
BOOL DYToolIsNeutral(NSDictionary *node){NSString *type=node[@"type"];DYUniforms u=DYToolUniforms(node);NSDictionary *section=DYToolSection(type);BOOL enabled=YES;if([type isEqual:@"primary"])enabled=u.primarySectionEnabled>.5;else if([type isEqual:@"base"])enabled=u.baseSectionEnabled>.5||u.colorSectionEnabled>.5;else for(NSDictionary *d in DYDescriptors())if([d[@"pid"]isEqual:section[@"enabled"]])enabled=*(float*)((uint8_t*)&u+[d[@"offset"]unsignedIntegerValue])>.5;if(!enabled)return YES;if([type isEqual:@"primary"]&&u.cm.toneMapping>.5)return NO;if([type isEqual:@"mixer"])return !DYChannelMixerActive(u);if([type isEqual:@"film"])return !DYFilmToolActive(u);if([type isEqual:@"skin"])return u.skinProtection.y==0;if([node[@"type"]isEqual:@"spider"]&&[node[@"spider"]length]){auto mesh=DYSpiderMesh(node[@"spider"]);for(float v:dy::meshSamples(mesh))if(v!=0)return NO;}if([node[@"paths"]count])return NO;for(NSDictionary *d in DYDescriptors()){NSNumber *v=node[@"values"][d[@"key"]];if(v&&v.floatValue!=[d[@"default"]floatValue])return NO;}return YES;}
@implementation DYToolManager {
id<PROAPIAccessing> _host;NSString *_nodeID,*_type;NSInteger _depth;CMTime _time;NSMutableDictionary *_pending;DYInspectorToken *_token;
+5
查看文件
@@ -131,6 +131,7 @@ typedef struct DYUniforms {
float mixerSectionEnabled,mixerPreserveLuma,mixerPreserveSaturation,mixerMix;
DYFilmSettings film;
DYUInt filmFrameKey; // frozen render time, never an author parameter
DYFloat4 filmPrint; // appended after the complete 1.5.0 prefix: look, strength, reserved, reserved
} DYUniforms;
typedef struct DYVertex2D { DYFloat2 position; DYFloat2 textureCoordinate; } DYVertex2D;
@@ -148,6 +149,10 @@ typedef struct DYRenderOptions {
#endif
DY_ABI_ASSERT(offsetof(DYUniforms, cm) == 944, "DYUniforms must match recovered GPU ABI");
DY_ABI_ASSERT(offsetof(DYUniforms, mixerRed) == 1104, "complete 1.4.3 prefix stays fixed");
DY_ABI_ASSERT(offsetof(DYUniforms, film) == 1168, "1.5.0 film settings stay fixed");
DY_ABI_ASSERT(offsetof(DYUniforms, filmFrameKey) == 1284, "1.5.0 frozen frame key stays fixed");
DY_ABI_ASSERT(offsetof(DYUniforms, filmPrint) == 1296, "complete 1.5.0 prefix stays fixed");
DY_ABI_ASSERT(sizeof(DYUniforms) == 1312, "1.6.0 uniform size");
DY_ABI_ASSERT(offsetof(DYUniforms, exposure) == 0, "exposure offset");
DY_ABI_ASSERT(offsetof(DYUniforms, contrast) == 4, "contrast offset");
DY_ABI_ASSERT(offsetof(DYUniforms, highlights) == 8, "highlights offset");
+3 -3
查看文件
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.5.0</string>
<string>1.7.0</string>
<key>CFBundleVersion</key>
<string>34</string>
<string>45</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>PlugInKit</key>
@@ -71,7 +71,7 @@
<key>uuid</key>
<string>1C17B73B-F229-4C09-A434-EAF6DFF5F22A</string>
<key>version</key>
<string>1.5.0</string>
<string>1.7.0</string>
</dict>
<dict>
<key>className</key>
二进制文件未显示。
二进制文件未显示。
二进制文件未显示。
二进制文件未显示。
二进制文件未显示。
二进制文件未显示。
二进制文件未显示。
二进制文件未显示。
+2 -1
查看文件
@@ -1,4 +1,5 @@
#import <FxPlug/FxPlugSDK.h>
#import "DYDiagnostics.h"
#import "../Shared/DYBetaDiagnostics.h"
#include <string.h>
int main(int argc,const char*argv[]){@autoreleasepool{if(argc==2&&strcmp(argv[1],"--self-test")==0)return DYRunDiagnostics();[FxPrincipal startServicePrincipal];return 0;}}
int main(int argc,const char*argv[]){@autoreleasepool{if(argc==2&&strcmp(argv[1],"--self-test")==0)return DYRunDiagnostics();DYBetaStart();[FxPrincipal startServicePrincipal];DYBetaStop();return 0;}}
+15
查看文件
@@ -0,0 +1,15 @@
#import <Foundation/Foundation.h>
#include <stdint.h>
FOUNDATION_EXPORT NSString *const DYBetaDiagnosticsChanged;
FOUNDATION_EXPORT void DYBetaStart(void);
FOUNDATION_EXPORT void DYBetaStop(void);
FOUNDATION_EXPORT void DYBetaEvent(NSString *event, NSDictionary *fields);
FOUNDATION_EXPORT uint64_t DYBetaSpanBegin(NSString *stage, NSDictionary *fields);
FOUNDATION_EXPORT void DYBetaSpanEnd(uint64_t token, NSDictionary *fields);
FOUNDATION_EXPORT NSDictionary *DYBetaSafeFields(NSDictionary *fields);
FOUNDATION_EXPORT BOOL DYBetaEnabled(void);
FOUNDATION_EXPORT void DYBetaSetEnabled(BOOL enabled);
FOUNDATION_EXPORT NSDictionary *DYBetaStatus(void);
FOUNDATION_EXPORT void DYBetaSendSummary(void);
FOUNDATION_EXPORT BOOL DYBetaAllowedURL(NSURL *url, BOOL download);
+233
查看文件
@@ -0,0 +1,233 @@
#import "DYBetaDiagnostics.h"
#import <AppKit/AppKit.h>
#include <atomic>
#include <cmath>
#include <sys/sysctl.h>
#include <sys/stat.h>
#include <signal.h>
#include <fcntl.h>
#include <unistd.h>
NSString *const DYBetaDiagnosticsChanged = @"DYBetaDiagnosticsChanged";
static NSString *const DYBetaPreferenceDomain = @"com.dayu.color.preferences";
static std::atomic_bool gEnabled(true);
static std::atomic_uint_fast64_t gSpan(0);
static std::atomic<double> gMainReply(0);
static NSObject *gSpanLock, *gStatusLock;
static NSMutableDictionary *gActive;
static NSDictionary *gStatus;
static BOOL gProduct;
BOOL DYBetaAllowedURL(NSURL *url, BOOL download) {
if (![url.scheme.lowercaseString isEqual:@"https"] || ![url.host.lowercaseString isEqual:@"dayu.media"] ||
url.user.length || url.password.length || (url.port && url.port.integerValue!=443)) return NO;
NSString *prefix=download?@"/wp-content/uploads/dayu-color-beta/updates/":@"/wp-json/dayu-color/v1/";
return [url.path hasPrefix:prefix] && ![url.path.pathComponents containsObject:@".."];
}
NSDictionary *DYBetaSafeFields(NSDictionary *fields) {
static NSSet *allowed; static dispatch_once_t once;
dispatch_once(&once,^{allowed=[[NSSet alloc]initWithArray:@[@"phase",@"stage",@"pipeline",@"duration_ms",@"status",@"error_domain",@"error_code",@"exception",@"signal",@"frames",@"report_time",@"count",@"pending",@"model",@"os_version",@"fcp_version",@"cpu_cores",@"memory_gb",@"gpu",@"main_delay_ms",@"active_stages",@"source_version"]];});
NSMutableDictionary *out=[NSMutableDictionary dictionary];
if(![fields isKindOfClass:NSDictionary.class])return @{};
for (NSString *key in fields) {
if (![allowed containsObject:key]) continue;
id value=fields[key];
if ([value isKindOfClass:NSNumber.class]) { if (std::isfinite([value doubleValue])) out[key]=value; continue; }
if (![value isKindOfClass:NSString.class]) continue;
NSString *text=value;
for (NSString *pattern in @[@"(?:https?://\\S+|(?:/Users/|/Volumes/|/private/|/var/)[^\\r\\n]*)",@"(?i)(?:bearer\\s+\\S+|(?:token|api[_-]?key|secret|password)\\s*[=:]\\s*\\S+)"])
text=[text stringByReplacingOccurrencesOfString:pattern withString:@"[REDACTED]" options:NSRegularExpressionSearch range:NSMakeRange(0,text.length)];
NSUInteger limit=[key isEqual:@"frames"]?6000:[key isEqual:@"active_stages"]?1000:200;
out[key]=text.length>limit?[text substringToIndex:limit]:text;
}
return out;
}
@interface DYBetaTransport : NSObject <NSURLSessionTaskDelegate> {
@public
dispatch_queue_t queue;
dispatch_source_t timer;
NSMutableArray *pending;
NSMutableSet *seenCrashes;
NSMutableDictionary *lastEvents;
NSURLSession *session;
NSURLSessionDataTask *sending;
NSString *sessionID, *installationID, *source, *version;
NSNumber *build;
NSURL *folder, *journal;
NSDictionary *environment;
NSTimeInterval nextAttempt, lastTick, lastStall;
BOOL ready;
}
- (void)enqueue:(NSString *)event fields:(NSDictionary *)fields;
- (void)drain;
- (void)persist;
- (void)scanCrashSummaries;
@end
static DYBetaTransport *transport;
static void publishStatus(NSDictionary *values) {
@synchronized(gStatusLock) { [gStatus release]; gStatus=[values copy]; }
dispatch_async(dispatch_get_main_queue(),^{[NSNotificationCenter.defaultCenter postNotificationName:DYBetaDiagnosticsChanged object:nil];});
}
static NSDictionary *statusSnapshot(void) { @synchronized(gStatusLock) { return [[gStatus copy]autorelease]?:@{}; } }
static NSUserDefaults *preferences(void) { return [[[NSUserDefaults alloc]initWithSuiteName:DYBetaPreferenceDomain]autorelease]; }
static NSString *sysctlString(const char *key) {
char buffer[256]={};size_t size=sizeof(buffer);if(sysctlbyname(key,buffer,&size,NULL,0))return @"unknown";
return [NSString stringWithUTF8String:buffer]?:@"unknown";
}
@implementation DYBetaTransport
- (instancetype)init {
if((self=[super init])) {
queue=dispatch_queue_create("com.dayu.color.beta-diagnostics",DISPATCH_QUEUE_SERIAL);
pending=[NSMutableArray new];seenCrashes=[NSMutableSet new];lastEvents=[NSMutableDictionary new];sessionID=[NSUUID.UUID.UUIDString.lowercaseString copy];
source=[([NSBundle.mainBundle.bundleIdentifier isEqual:@"com.dayu.color.XPC"]?@"plugin":@"app")copy];
version=[[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]copy];build=@([[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]integerValue]);[build retain];
dispatch_async(queue,^{@autoreleasepool{[self prepare];}});
}return self;
}
- (void)prepare {
NSUserDefaults *prefs=preferences();[prefs registerDefaults:@{@"betaDiagnosticsEnabled":@YES}];gEnabled.store([prefs boolForKey:@"betaDiagnosticsEnabled"]);
folder=[[[NSFileManager.defaultManager URLsForDirectory:NSApplicationSupportDirectory inDomains:NSUserDomainMask].firstObject URLByAppendingPathComponent:@"com.dayu.color/Beta" isDirectory:YES]retain];
[NSFileManager.defaultManager createDirectoryAtURL:folder withIntermediateDirectories:YES attributes:@{NSFilePosixPermissions:@0700} error:nil];
// O_EXCL gives the APP and XPC one random installation ID without hardware UUIDs.
NSURL *identity=[folder URLByAppendingPathComponent:@"installation.txt"];
NSString *newID=NSUUID.UUID.UUIDString.lowercaseString;
int fd=open(identity.fileSystemRepresentation,O_WRONLY|O_CREAT|O_EXCL,0600);
if(fd>=0){NSData *data=[newID dataUsingEncoding:NSUTF8StringEncoding];write(fd,data.bytes,data.length);close(fd);}
for(int attempt=0;attempt<20;attempt++) {
[installationID release];installationID=[[[NSString stringWithContentsOfURL:identity encoding:NSUTF8StringEncoding error:nil]stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet]copy];
if([[[NSUUID alloc]initWithUUIDString:installationID]autorelease])break;
[NSThread sleepForTimeInterval:.01];
}
if(![[[NSUUID alloc]initWithUUIDString:installationID]autorelease]){gEnabled.store(false);return;}
NSURLSessionConfiguration *config=NSURLSessionConfiguration.ephemeralSessionConfiguration;
config.timeoutIntervalForRequest=8;config.timeoutIntervalForResource=12;config.HTTPShouldSetCookies=NO;config.URLCache=nil;
session=[[NSURLSession sessionWithConfiguration:config delegate:self delegateQueue:nil]retain];
uint64_t memory=0;size_t length=sizeof(memory);sysctlbyname("hw.memsize",&memory,&length,NULL,0);
NSString *fcp=@"not-installed";
for(NSString *ID in @[@"com.apple.FinalCut",@"com.apple.FinalCutApp"]){NSURL *url=[NSWorkspace.sharedWorkspace URLForApplicationWithBundleIdentifier:ID];if(url){fcp=[[NSBundle bundleWithURL:url]objectForInfoDictionaryKey:@"CFBundleShortVersionString"]?:@"unknown";break;}}
environment=[@{@"model":sysctlString("hw.model"),@"os_version":NSProcessInfo.processInfo.operatingSystemVersionString,@"fcp_version":fcp,@"cpu_cores":@(NSProcessInfo.processInfo.processorCount),@"memory_gb":@(double(memory)/(1024*1024*1024))}copy];
journal=[[folder URLByAppendingPathComponent:[NSString stringWithFormat:@"pending-%d-%@.json",getpid(),sessionID]]retain];
NSArray *files=[NSFileManager.defaultManager contentsOfDirectoryAtURL:folder includingPropertiesForKeys:@[NSURLContentModificationDateKey] options:NSDirectoryEnumerationSkipsHiddenFiles error:nil];
NSUInteger recovered=0;
for(NSURL *url in files){if(![url.lastPathComponent hasPrefix:@"pending-"]||![url.pathExtension isEqual:@"json"])continue;
NSNumber *bytes=nil;[url getResourceValue:&bytes forKey:NSURLFileSizeKey error:nil];if(bytes.unsignedLongLongValue>384*1024)continue;
NSDictionary *old=[NSJSONSerialization JSONObjectWithData:[NSData dataWithContentsOfURL:url]?:[NSData data] options:0 error:nil];if(![old isKindOfClass:NSDictionary.class])continue;
if(![old[@"pid"]isKindOfClass:NSNumber.class])continue;int pid=[old[@"pid"]intValue];if(pid>0&&kill(pid,0)==0)continue;
NSDate *date=nil;[url getResourceValue:&date forKey:NSURLContentModificationDateKey error:nil];
if(gEnabled.load()&&date.timeIntervalSinceNow> -7*86400&&[old[@"events"]isKindOfClass:NSArray.class])for(NSDictionary *event in old[@"events"]){if(pending.count>=256)break;
if(![event isKindOfClass:NSDictionary.class]||![event[@"event_id"]isKindOfClass:NSString.class]||![event[@"session_id"]isKindOfClass:NSString.class]||
![[[NSUUID alloc]initWithUUIDString:event[@"event_id"]]autorelease]||![[[NSUUID alloc]initWithUUIDString:event[@"session_id"]]autorelease]||
![event[@"version"]isKindOfClass:NSString.class]||![event[@"build"]isKindOfClass:NSNumber.class]||![event[@"event"]isKindOfClass:NSString.class]||
![@[@"app",@"plugin"]containsObject:event[@"source"]]||![event[@"fields"]isKindOfClass:NSDictionary.class]||![event[@"occurred_at"]isKindOfClass:NSNumber.class])continue;
NSMutableDictionary *safe=[[event mutableCopy]autorelease];safe[@"fields"]=DYBetaSafeFields(event[@"fields"]);[pending addObject:safe];recovered++;}
[NSFileManager.defaultManager removeItemAtURL:url error:nil];
}
ready=YES;gMainReply.store(NSProcessInfo.processInfo.systemUptime);lastTick=gMainReply.load();
[self enqueue:@"process_start" fields:environment];if(recovered)[self enqueue:@"previous_session_pending" fields:@{@"count":@(recovered)}];
publishStatus(@{@"installation_id":installationID,@"enabled":@(gEnabled.load()),@"pending":@(pending.count)});
timer=dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER,0,0,queue);
dispatch_source_set_timer(timer,dispatch_time(DISPATCH_TIME_NOW,2*NSEC_PER_SEC),3*NSEC_PER_SEC,NSEC_PER_SEC/4);
dispatch_source_set_event_handler(timer,^{@autoreleasepool{[self tick];}});dispatch_resume(timer);
[NSDistributedNotificationCenter.defaultCenter addObserver:self selector:@selector(settingsChanged:) name:@"com.dayu.color.beta.preferences" object:nil];
if([source isEqual:@"app"])[self scanCrashSummaries];
}
- (void)enqueue:(NSString *)event fields:(NSDictionary *)fields {
if(!ready||!gEnabled.load())return;
// A bad render must not turn diagnostics into per-frame disk writes.
if([@[@"render_error",@"inspector_refresh"]containsObject:event]){
double now=NSProcessInfo.processInfo.systemUptime;if(now-[lastEvents[event]doubleValue]<5)return;lastEvents[event]=@(now);
}
if(pending.count>=256)[pending removeObjectsInRange:NSMakeRange(0,32)];
[pending addObject:@{@"event_id":NSUUID.UUID.UUIDString.lowercaseString,@"session_id":sessionID,@"source":source,@"version":version?:@"0.0",@"build":build?:@1,@"event":event,@"occurred_at":@(NSDate.date.timeIntervalSince1970),@"fields":DYBetaSafeFields(fields?:@{})}];
[self persist];
}
- (void)persist {
if(!journal)return;
NSData *data=[NSJSONSerialization dataWithJSONObject:@{@"pid":@(getpid()),@"events":pending} options:0 error:nil];
if(data.length>384*1024){while(pending.count>64)[pending removeObjectAtIndex:0];data=[NSJSONSerialization dataWithJSONObject:@{@"pid":@(getpid()),@"events":pending} options:0 error:nil];}
[data writeToURL:journal options:NSDataWritingAtomic error:nil];chmod(journal.fileSystemRepresentation,0600);
}
- (void)drain {
if(!ready||!gEnabled.load()||sending||!pending.count||NSDate.date.timeIntervalSince1970<nextAttempt)return;
NSArray *batch=[[pending subarrayWithRange:NSMakeRange(0,MIN((NSUInteger)16,pending.count))]copy];
NSData *data=[NSJSONSerialization dataWithJSONObject:@{@"bundle_id":@"com.dayu.color",@"installation_id":installationID,@"events":batch} options:0 error:nil];
if(data.length>98304){[pending removeObjectAtIndex:0];[batch release];[self persist];return;}
NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://dayu.media/wp-json/dayu-color/v1/diagnostics"]];request.HTTPMethod=@"POST";request.HTTPBody=data;[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
sending=[[session dataTaskWithRequest:request completionHandler:^(NSData *body,NSURLResponse *response,NSError *error){
dispatch_async(self->queue,^{@autoreleasepool{
NSDictionary *reply=body?[NSJSONSerialization JSONObjectWithData:body options:0 error:nil]:nil;if(![reply isKindOfClass:NSDictionary.class])reply=nil;
NSSet *accepted=[reply[@"event_ids"]isKindOfClass:NSArray.class]?[NSSet setWithArray:reply[@"event_ids"]]:[NSSet set];
NSSet *expected=[NSSet setWithArray:[batch valueForKey:@"event_id"]];
BOOL ok=!error&&[(NSHTTPURLResponse*)response statusCode]==200&&[reply[@"accepted"]isKindOfClass:NSNumber.class]&&[reply[@"accepted"]boolValue]&&[accepted isEqualToSet:expected];
if(ok){NSIndexSet *remove=[self->pending indexesOfObjectsPassingTest:^BOOL(NSDictionary *event,NSUInteger i,BOOL *stop){return [accepted containsObject:event[@"event_id"]];}];[self->pending removeObjectsAtIndexes:remove];self->nextAttempt=0;
publishStatus(@{@"installation_id":self->installationID,@"enabled":@(gEnabled.load()),@"pending":@(self->pending.count),@"last_upload":@([NSDate.date timeIntervalSince1970])});
}else self->nextAttempt=NSDate.date.timeIntervalSince1970+30;
[self->sending release];self->sending=nil;[batch release];[self persist];
}});
}]retain];[sending resume];
}
- (void)tick {
double now=NSProcessInfo.processInfo.systemUptime;
if(now-lastTick>15)gMainReply.store(now); // Sleep/wake and timer coalescing are not proof of a hang.
lastTick=now;
if(gEnabled.load()&&now-gMainReply.load()>6&&now-lastStall>30){lastStall=now;[self enqueue:@"main_thread_stall" fields:@{@"status":@"suspected",@"main_delay_ms":@((now-gMainReply.load())*1000),@"active_stages":[self activeStages:now]}];}
else if(gEnabled.load()&&now-lastStall>30){NSString *stages=[self activeStages:now];if(stages.length){lastStall=now;[self enqueue:@"operation_stall" fields:@{@"status":@"suspected",@"active_stages":stages}];}}
dispatch_async(dispatch_get_main_queue(),^{gMainReply.store(NSProcessInfo.processInfo.systemUptime);});
[self drain];
}
- (NSString *)activeStages:(double)now {
NSArray *values;@synchronized(gSpanLock){values=[[gActive.allValues copy]autorelease];}
NSMutableArray *slow=[NSMutableArray array];for(NSDictionary *span in values)if(now-[span[@"start"]doubleValue]>6)[slow addObject:[NSString stringWithFormat:@"%@: %.0fms",span[@"stage"],(now-[span[@"start"]doubleValue])*1000]];
return [slow componentsJoinedByString:@"; "];
}
- (void)settingsChanged:(NSNotification *)note {
dispatch_async(queue,^{@autoreleasepool{NSUserDefaults *prefs=preferences();[prefs synchronize];gEnabled.store([prefs objectForKey:@"betaDiagnosticsEnabled"]?[prefs boolForKey:@"betaDiagnosticsEnabled"]:YES);
if(!gEnabled.load()){[self->sending cancel];[self->pending removeAllObjects];[self persist];}
publishStatus(@{@"installation_id":self->installationID?:@"",@"enabled":@(gEnabled.load()),@"pending":@(self->pending.count)});
}});
}
- (void)URLSession:(NSURLSession *)s task:(NSURLSessionTask *)task willPerformHTTPRedirection:(NSHTTPURLResponse *)response newRequest:(NSURLRequest *)request completionHandler:(void (^)(NSURLRequest *))completionHandler {
completionHandler(DYBetaAllowedURL(request.URL,NO)?request:nil);
}
- (void)scanCrashSummaries {
if(!gEnabled.load())return;
NSURL *reports=[NSFileManager.defaultManager.homeDirectoryForCurrentUser URLByAppendingPathComponent:@"Library/Logs/DiagnosticReports"];
NSArray *files=[NSFileManager.defaultManager contentsOfDirectoryAtURL:reports includingPropertiesForKeys:@[NSURLContentModificationDateKey,NSURLFileSizeKey] options:NSDirectoryEnumerationSkipsHiddenFiles error:nil];
NSUInteger count=0;
for(NSURL *url in files){if(count>=12)break;if(![url.pathExtension isEqual:@"ips"])continue;
NSNumber *size=nil;[url getResourceValue:&size forKey:NSURLFileSizeKey error:nil];if(size.unsignedLongLongValue>8*1024*1024)continue;
NSDate *date=nil;[url getResourceValue:&date forKey:NSURLContentModificationDateKey error:nil];if(date.timeIntervalSinceNow< -7*86400)continue;
NSFileHandle *handle=[NSFileHandle fileHandleForReadingFromURL:url error:nil];NSData *head=[handle readDataUpToLength:8192 error:nil];[handle closeFile];
if(!head.length)continue;NSString *prefix=[[[NSString alloc]initWithData:head encoding:NSUTF8StringEncoding]autorelease];NSRange first=[prefix rangeOfString:@"\n"];if(!prefix||first.location==NSNotFound)continue;
NSDictionary *header=[NSJSONSerialization JSONObjectWithData:[[prefix substringToIndex:first.location]dataUsingEncoding:NSUTF8StringEncoding] options:0 error:nil];if(![header isKindOfClass:NSDictionary.class]||![header[@"bundleID"]isEqual:@"com.dayu.color.XPC"])continue;
NSData *data=[NSData dataWithContentsOfURL:url options:NSDataReadingMappedIfSafe error:nil];if(!data.length)continue;NSString *text=[[[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding]autorelease];NSRange newline=[text rangeOfString:@"\n"];if(!text||newline.location==NSNotFound)continue;
NSString *key=header[@"incident_id"];if(![key isKindOfClass:NSString.class]||![[[NSUUID alloc]initWithUUIDString:key]autorelease])continue;if([seenCrashes containsObject:key])continue;[seenCrashes addObject:key];
NSDictionary *body=[NSJSONSerialization JSONObjectWithData:[[text substringFromIndex:newline.location+1]dataUsingEncoding:NSUTF8StringEncoding] options:0 error:nil];
if(![body isKindOfClass:NSDictionary.class])continue;NSDictionary *exception=[body[@"exception"]isKindOfClass:NSDictionary.class]?body[@"exception"]:@{};
NSInteger fault=[body[@"faultingThread"]isKindOfClass:NSNumber.class]?[body[@"faultingThread"]integerValue]:-1;NSArray *threads=body[@"threads"];NSMutableArray *frames=[NSMutableArray array];
if([threads isKindOfClass:NSArray.class]&&fault>=0&&fault<threads.count&&[threads[fault]isKindOfClass:NSDictionary.class]&&[threads[fault][@"frames"]isKindOfClass:NSArray.class])for(NSDictionary *frame in threads[fault][@"frames"]){if(frames.count>=30)break;if(![frame isKindOfClass:NSDictionary.class])continue;NSString *symbol=frame[@"symbol"];if([symbol isKindOfClass:NSString.class]&&![symbol containsString:@"/"])[frames addObject:symbol];}
[self enqueue:@"crash_summary" fields:@{@"source_version":header[@"app_version"]?:@"unknown",@"report_time":header[@"timestamp"]?:@"unknown",@"exception":exception[@"type"]?:@"unknown",@"signal":exception[@"signal"]?:@"unknown",@"frames":[frames componentsJoinedByString:@"\n"]}];
if(pending.count){NSMutableDictionary *event=[[pending.lastObject mutableCopy]autorelease];event[@"event_id"]=key.lowercaseString;[pending replaceObjectAtIndex:pending.count-1 withObject:event];[self persist];}count++;
}
}
@end
void DYBetaStart(void) {
static dispatch_once_t once;dispatch_once(&once,^{
NSString *ID=NSBundle.mainBundle.bundleIdentifier;
gProduct=([ID isEqual:@"com.dayu.color"]||[ID isEqual:@"com.dayu.color.XPC"])&&![NSProcessInfo.processInfo.arguments containsObject:@"--self-test"];
gSpanLock=[NSObject new];gStatusLock=[NSObject new];gActive=[NSMutableDictionary new];
if(gProduct)transport=[DYBetaTransport new];
});
}
BOOL DYBetaEnabled(void){DYBetaStart();return gEnabled.load();}
void DYBetaSetEnabled(BOOL enabled){DYBetaStart();gEnabled.store(enabled);NSUserDefaults *prefs=preferences();[prefs setBool:enabled forKey:@"betaDiagnosticsEnabled"];[prefs synchronize];[NSDistributedNotificationCenter.defaultCenter postNotificationName:@"com.dayu.color.beta.preferences" object:nil userInfo:nil deliverImmediately:YES];}
NSDictionary *DYBetaStatus(void){DYBetaStart();return statusSnapshot();}
void DYBetaEvent(NSString *event,NSDictionary *fields){DYBetaStart();if(!gProduct||!gEnabled.load())return;NSDictionary *safe=DYBetaSafeFields(fields?:@{});dispatch_async(transport->queue,^{@autoreleasepool{[transport enqueue:event fields:safe];}});}
uint64_t DYBetaSpanBegin(NSString *stage,NSDictionary *fields){DYBetaStart();if(!gProduct||!gEnabled.load())return 0;uint64_t token=++gSpan;NSDictionary *value=@{@"stage":stage,@"start":@(NSProcessInfo.processInfo.systemUptime),@"fields":DYBetaSafeFields(fields?:@{})};@synchronized(gSpanLock){if(gActive.count>=128)return 0;gActive[@(token)]=value;}
if(![stage isEqual:@"inspector_refresh"]){NSMutableDictionary *begin=[[value[@"fields"]mutableCopy]autorelease];begin[@"phase"]=@"begin";DYBetaEvent(stage,begin);}return token;
}
void DYBetaSpanEnd(uint64_t token,NSDictionary *fields){if(!token)return;NSDictionary *span;@synchronized(gSpanLock){span=[[gActive[@(token)]retain]autorelease];[gActive removeObjectForKey:@(token)];}if(!span)return;double elapsed=(NSProcessInfo.processInfo.systemUptime-[span[@"start"]doubleValue])*1000;if([span[@"stage"]isEqual:@"inspector_refresh"]&&elapsed<100)return;NSMutableDictionary *result=[[span[@"fields"]mutableCopy]autorelease];[result addEntriesFromDictionary:fields?:@{}];result[@"duration_ms"]=@(elapsed);result[@"phase"]=@"end";DYBetaEvent(span[@"stage"],result);}
void DYBetaStop(void){DYBetaEvent(@"process_exit",@{@"status":@"normal"});}
void DYBetaSendSummary(void){DYBetaStart();if(!gProduct)return;dispatch_async(transport->queue,^{@autoreleasepool{[transport enqueue:@"diagnostic_summary" fields:transport->environment];[transport scanCrashSummaries];[transport drain];}});}
+434 -8
查看文件
@@ -1,15 +1,441 @@
#import "AppDelegate.h"
#import "DYBetaUpdater.h"
#import "../Shared/DYBetaDiagnostics.h"
static NSString *const DYPluginID = @"com.dayu.color.XPC";
static NSString *const DYReleaseAddress = @"https://dayu.media";
static NSColor *DYColor(CGFloat r, CGFloat g, CGFloat b) { return [NSColor colorWithSRGBRed:r green:g blue:b alpha:1]; }
static NSColor *DYBlue(void) { return DYColor(.36,.65,1); }
static NSColor *DYGreen(void) { return DYColor(.26,.86,.53); }
static NSColor *DYSecondary(void) { return DYColor(.70,.74,.81); }
// Static opaque surfaces preserve the reference palette without expensive blur or motion.
@interface DYSurface : NSView
@property(retain) NSColor *tint;
@property BOOL backdrop;
@end
@implementation DYSurface
- (BOOL)isFlipped { return YES; }
- (void)drawRect:(NSRect)dirty {
BOOL contrast = NSWorkspace.sharedWorkspace.accessibilityDisplayShouldIncreaseContrast;
NSBezierPath *shape = [NSBezierPath bezierPathWithRoundedRect:NSInsetRect(self.bounds,1,1) xRadius:self.backdrop ? 0 : 22 yRadius:self.backdrop ? 0 : 22];
NSColor *base = DYColor(.105,.115,.14);
NSColor *start = self.backdrop ? DYColor(.105,.14,.20) : [base blendedColorWithFraction:.17 ofColor:self.tint];
NSColor *end = self.backdrop ? DYColor(.105,.115,.115) : base;
NSGradient *gradient = [[[NSGradient alloc] initWithStartingColor:start endingColor:end] autorelease];
[gradient drawInBezierPath:shape angle:35];
if (!self.backdrop) {
[[self.tint blendedColorWithFraction:contrast ? .15 : .62 ofColor:base] setStroke];
shape.lineWidth = contrast ? 2 : 1; [shape stroke];
}
}
- (void)dealloc { [_tint release]; [super dealloc]; }
@end
@interface DYActionButton : NSButton
@property(retain) NSColor *tint;
@property BOOL prominent;
@end
@implementation DYActionButton
- (void)drawRect:(NSRect)dirty {
NSRect rect = NSInsetRect(self.bounds,2,2);
NSBezierPath *shape = [NSBezierPath bezierPathWithRoundedRect:rect xRadius:rect.size.height/2 yRadius:rect.size.height/2];
NSColor *base = self.prominent ? self.tint : [DYColor(.10,.12,.16) blendedColorWithFraction:.18 ofColor:self.tint];
if (self.highlighted) base = [base blendedColorWithFraction:.2 ofColor:NSColor.blackColor];
[base setFill]; [shape fill];
[[self.tint blendedColorWithFraction:.35 ofColor:NSColor.whiteColor] setStroke];
shape.lineWidth = NSWorkspace.sharedWorkspace.accessibilityDisplayShouldIncreaseContrast ? 2 : 1; [shape stroke];
NSColor *text = self.enabled ? (self.prominent ? NSColor.whiteColor : self.tint) : DYSecondary();
NSDictionary *attrs = @{NSFontAttributeName:[NSFont systemFontOfSize:13 weight:NSFontWeightSemibold],NSForegroundColorAttributeName:text};
NSSize size = [self.title sizeWithAttributes:attrs];
[self.title drawAtPoint:NSMakePoint((NSWidth(self.bounds)-size.width)/2,(NSHeight(self.bounds)-size.height)/2) withAttributes:attrs];
}
- (void)drawFocusRingMask { [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(self.bounds,2,2) xRadius:20 yRadius:20] fill]; }
- (NSRect)focusRingMaskBounds { return self.bounds; }
- (void)dealloc { [_tint release]; [super dealloc]; }
@end
static NSTextField *DYLabel(NSString *text, CGFloat size, NSFontWeight weight, NSColor *color) {
NSTextField *label = [NSTextField wrappingLabelWithString:text];
label.font = [NSFont systemFontOfSize:size weight:weight]; label.textColor = color;
label.translatesAutoresizingMaskIntoConstraints = NO;
[label setContentCompressionResistancePriority:NSLayoutPriorityRequired forOrientation:NSLayoutConstraintOrientationVertical];
return label;
}
static NSStackView *DYStack(NSArray *views, NSUserInterfaceLayoutOrientation orientation, CGFloat spacing) {
NSStackView *stack = [NSStackView stackViewWithViews:views];
stack.orientation = orientation; stack.spacing = spacing;
stack.alignment = orientation == NSUserInterfaceLayoutOrientationVertical ? NSLayoutAttributeLeading : NSLayoutAttributeTop;
stack.translatesAutoresizingMaskIntoConstraints = NO;
if (orientation == NSUserInterfaceLayoutOrientationHorizontal) stack.distribution = NSStackViewDistributionFillEqually;
return stack;
}
static void DYPin(NSView *child, NSView *parent, CGFloat inset) {
child.translatesAutoresizingMaskIntoConstraints = NO; [parent addSubview:child];
[NSLayoutConstraint activateConstraints:@[
[child.leadingAnchor constraintEqualToAnchor:parent.leadingAnchor constant:inset],
[child.trailingAnchor constraintEqualToAnchor:parent.trailingAnchor constant:-inset],
[child.topAnchor constraintEqualToAnchor:parent.topAnchor constant:inset],
[child.bottomAnchor constraintEqualToAnchor:parent.bottomAnchor constant:-inset]]];
}
static DYActionButton *DYButton(NSString *title, NSColor *tint, BOOL prominent, id target, SEL action) {
DYActionButton *button = [DYActionButton buttonWithTitle:title target:target action:action];
button.tint = tint; button.prominent = prominent; button.bordered = NO;
button.translatesAutoresizingMaskIntoConstraints = NO;
[button.heightAnchor constraintEqualToConstant:42].active = YES;
[button.widthAnchor constraintGreaterThanOrEqualToConstant:124].active = YES;
return button;
}
static DYSurface *DYCard(NSColor *tint, NSStackView *content) {
DYSurface *card = [[[DYSurface alloc] initWithFrame:NSZeroRect] autorelease];
card.tint = tint; card.translatesAutoresizingMaskIntoConstraints = NO; DYPin(content,card,22);
for (NSView *view in content.arrangedSubviews) [view.widthAnchor constraintEqualToAnchor:content.widthAnchor].active = YES;
return card;
}
static NSTextField *DYHeading(NSString *symbol, NSString *text, NSColor *color) {
NSTextField *label = DYLabel(text,15,NSFontWeightSemibold,color);
NSImage *image = [NSImage imageWithSystemSymbolName:symbol accessibilityDescription:nil];
if (image) {
NSTextAttachment *attachment = [[[NSTextAttachment alloc] init] autorelease];
attachment.image = image; attachment.bounds = NSMakeRect(0,-3,18,18);
NSMutableAttributedString *value = [[[NSMutableAttributedString alloc] initWithAttributedString:[NSAttributedString attributedStringWithAttachment:attachment]] autorelease];
[value appendAttributedString:[[[NSAttributedString alloc] initWithString:[@" " stringByAppendingString:text]
attributes:@{NSFontAttributeName:label.font,NSForegroundColorAttributeName:color}] autorelease]];
label.attributedStringValue = value; label.accessibilityLabel = text;
}
return label;
}
typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYReady, DYFailed };
@interface AppDelegate ()
@property(weak) IBOutlet NSWindow *window;
@property(assign) NSTextField *statusTitle, *statusDetail, *exitDetail;
@property(assign) DYActionButton *retryButton, *keepButton, *confirmationButton;
@property(assign) NSProgressIndicator *progress;
@property(assign) DYSurface *registrationCard;
@property DYRegistrationState registrationState;
@property BOOL keepOpen, terminating;
@property NSInteger secondsRemaining;
@property(retain) NSTimer *exitTimer;
@property(retain) NSMutableDictionary *diagnostics;
@property(retain) DYBetaUpdater *updater;
@property(assign) NSTextField *updateTitle, *updateDetail, *diagnosticDetail, *reportID;
@property(assign) DYActionButton *updateCheckButton, *updateInstallButton, *updateCancelButton, *sendSummaryButton;
@property(assign) NSButton *diagnosticToggle;
@property(assign) NSProgressIndicator *updateProgress;
@property(retain) NSTimer *updateProgressTimer;
@property BOOL updateCheckDone;
@end
@implementation AppDelegate
- (void)applicationDidFinishLaunching:(NSNotification*)n{
self.window.title=@"大鱼调色";[self.window setContentSize:NSMakeSize(540,280)];[self.window center];
NSView*v=[[[NSView alloc]initWithFrame:NSMakeRect(0,0,540,280)]autorelease];v.wantsLayer=YES;v.layer.backgroundColor=[NSColor colorWithSRGBRed:.025 green:.08 blue:.13 alpha:1].CGColor;self.window.contentView=v;
NSTextField*title=[NSTextField labelWithString:@"大鱼调色"];title.font=[NSFont boldSystemFontOfSize:28];title.textColor=[NSColor colorWithSRGBRed:.3 green:.75 blue:1 alpha:1];title.frame=NSMakeRect(32,212,460,42);[v addSubview:title];
NSTextField*body=[NSTextField wrappingLabelWithString:@"已安装原生 FxPlug 调色效果。\n\n在 Final Cut Pro 的「效果 → 大鱼调色」中应用,或在 Motion 的滤镜中选择「大鱼调色」。\n\n输入转换、光影、曲线、HSL、色轮与 LUT 均在宿主检查器中编辑。"];body.font=[NSFont systemFontOfSize:14];body.textColor=[NSColor colorWithWhite:.86 alpha:1];body.frame=NSMakeRect(34,65,470,140);[v addSubview:body];
NSButton*b=[NSButton buttonWithTitle:@"打开 Final Cut Pro" target:self action:@selector(openHost:)];b.frame=NSMakeRect(30,20,170,32);[v addSubview:b];[self.window makeKeyAndOrderFront:nil];
- (void)applicationDidFinishLaunching:(NSNotification *)notification {
self.keepOpen = [NSProcessInfo.processInfo.arguments containsObject:@"--show-introduction"];
self.window.title = @"大鱼调色";
self.window.appearance = [NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
self.window.titlebarAppearsTransparent = YES; self.window.backgroundColor = DYColor(.105,.14,.20);
self.window.contentMinSize = NSMakeSize(760,620); [self.window setContentSize:NSMakeSize(920,850)]; [self.window center];
DYBetaStart();
[self buildInterface]; [self buildMenu];
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(refreshDiagnostics:) name:DYBetaDiagnosticsChanged object:nil];
self.updater = [[[DYBetaUpdater alloc] init] autorelease];
__block AppDelegate *owner = self;
self.updater.changed = ^(NSDictionary *state) { [owner updateChanged:state]; };
self.updateProgressTimer = [NSTimer scheduledTimerWithTimeInterval:.2 target:self selector:@selector(refreshUpdateProgress:) userInfo:nil repeats:YES];
NSInteger expected=[NSUserDefaults.standardUserDefaults integerForKey:@"betaPendingUpdateBuild"];
if(expected>0 && [NSBundle.mainBundle.infoDictionary[@"CFBundleVersion"]integerValue]>=expected){
DYBetaEvent(@"update_installer",@{@"status":@"completed",@"count":@(expected)});
[NSUserDefaults.standardUserDefaults removeObjectForKey:@"betaPendingUpdateBuild"];
}
[NSWorkspace.sharedWorkspace.notificationCenter addObserver:self selector:@selector(accessibilityChanged:)
name:NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification object:nil];
[self.window makeKeyAndOrderFront:nil]; [self refreshDiagnostics:nil]; [self checkRegistration:nil]; [self.updater check];
}
- (void)openHost:(id)sender{NSURL*u=[NSWorkspace.sharedWorkspace URLForApplicationWithBundleIdentifier:@"com.apple.FinalCut"];if(u)[NSWorkspace.sharedWorkspace openApplicationAtURL:u configuration:NSWorkspaceOpenConfiguration.configuration completionHandler:nil];}
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)app{return YES;}
- (void)buildMenu {
NSMenu *menu = [[[NSMenu alloc] initWithTitle:@"大鱼调色"] autorelease];
NSMenuItem *root = [[[NSMenuItem alloc] initWithTitle:@"大鱼调色" action:NULL keyEquivalent:@""] autorelease]; [menu addItem:root];
NSMenu *app = [[[NSMenu alloc] initWithTitle:@"大鱼调色"] autorelease]; root.submenu = app;
for (NSArray *entry in @[@[@"关于大鱼调色",NSStringFromSelector(@selector(orderFrontStandardAboutPanel:)),@""],
@[@"查看功能介绍",NSStringFromSelector(@selector(keepIntroduction:)),@"i"],
@[@"重新检查插件",NSStringFromSelector(@selector(checkRegistration:)),@"r"],
@[@"检查公测更新",NSStringFromSelector(@selector(checkUpdate:)),@"u"],
@[@"访问发布地址",NSStringFromSelector(@selector(openWebsite:)),@""],
@[@"关闭窗口",NSStringFromSelector(@selector(closeWindow:)),@"w"],
@[@"退出大鱼调色",NSStringFromSelector(@selector(terminate:)),@"q"]]) {
NSMenuItem *item = [[[NSMenuItem alloc] initWithTitle:entry[0] action:NSSelectorFromString(entry[1]) keyEquivalent:entry[2]] autorelease];
item.target = [entry[0] isEqualToString:@"退出大鱼调色"] || [entry[0] isEqualToString:@"关于大鱼调色"] ? NSApp : self; [app addItem:item];
}
NSApp.mainMenu = menu;
}
- (void)buildInterface {
DYSurface *backdrop = [[[DYSurface alloc] initWithFrame:NSZeroRect] autorelease]; backdrop.backdrop = YES; self.window.contentView = backdrop;
NSScrollView *scroll = [[[NSScrollView alloc] initWithFrame:NSZeroRect] autorelease];
scroll.drawsBackground = NO; scroll.hasVerticalScroller = YES; scroll.autohidesScrollers = YES; DYPin(scroll,backdrop,0);
DYSurface *document = [[[DYSurface alloc] initWithFrame:NSZeroRect] autorelease];
document.backdrop = YES; document.translatesAutoresizingMaskIntoConstraints = NO; scroll.documentView = document;
[NSLayoutConstraint activateConstraints:@[
[document.leadingAnchor constraintEqualToAnchor:scroll.contentView.leadingAnchor],
[document.topAnchor constraintEqualToAnchor:scroll.contentView.topAnchor],
[document.widthAnchor constraintEqualToAnchor:scroll.contentView.widthAnchor]]];
NSButton *website = [NSButton buttonWithTitle:@"发布地址 https://dayu.media ↗" target:self action:@selector(openWebsite:)];
website.bordered = NO; website.translatesAutoresizingMaskIntoConstraints = NO;
website.attributedTitle = [[[NSAttributedString alloc] initWithString:website.title attributes:@{
NSFontAttributeName:[NSFont systemFontOfSize:13 weight:NSFontWeightMedium],NSForegroundColorAttributeName:DYBlue()}] autorelease];
[website.heightAnchor constraintEqualToConstant:28].active = YES;
NSDictionary *info = NSBundle.mainBundle.infoDictionary;
NSArray *heroLabels = @[DYLabel(@"FINAL CUT PRO / MOTION",11,NSFontWeightSemibold,DYBlue()),
DYLabel(@"大鱼调色",42,NSFontWeightBold,NSColor.whiteColor),
DYLabel(@"从色彩还原到胶片质感,让每一次调色更从容。",15,NSFontWeightRegular,DYSecondary()),
DYLabel([NSString stringWithFormat:@"v%@ · 构建 %@ / 原生 FxPlug 4 · Apple Silicon",info[@"CFBundleShortVersionString"],info[@"CFBundleVersion"]],11,NSFontWeightMedium,DYSecondary())];
NSStackView *hero = DYStack(heroLabels,NSUserInterfaceLayoutOrientationVertical,8);
for (NSTextField *label in heroLabels) { label.alignment = NSTextAlignmentCenter; [label.widthAnchor constraintEqualToAnchor:hero.widthAnchor].active = YES; }
self.statusTitle = DYLabel(@"正在检查插件…",22,NSFontWeightSemibold,NSColor.whiteColor);
self.statusDetail = DYLabel(@"正在检查本机插件登记,随后自动提交注册。",13,NSFontWeightRegular,DYSecondary());
[self.statusDetail.heightAnchor constraintGreaterThanOrEqualToConstant:42].active = YES;
self.progress = [[[NSProgressIndicator alloc] initWithFrame:NSZeroRect] autorelease];
self.progress.style = NSProgressIndicatorStyleBar; self.progress.indeterminate = YES; self.progress.translatesAutoresizingMaskIntoConstraints = NO;
self.retryButton = DYButton(@"检查中…",DYBlue(),NO,self,@selector(checkRegistration:));
self.keepButton = DYButton(@"查看功能介绍",DYColor(.20,.46,.94),YES,self,@selector(keepIntroduction:));
self.exitDetail = DYLabel(@"注册成功后,将显示 3 秒退出倒计时。",15,NSFontWeightSemibold,DYGreen());
[self.exitDetail.heightAnchor constraintGreaterThanOrEqualToConstant:38].active = YES;
NSStackView *registration = DYStack(@[DYHeading(@"puzzlepiece.extension",@"插件连接",DYBlue()),self.statusTitle,self.statusDetail,self.progress,
self.exitDetail,DYStack(@[self.retryButton,self.keepButton],NSUserInterfaceLayoutOrientationHorizontal,8)],NSUserInterfaceLayoutOrientationVertical,13);
self.registrationCard = DYCard(DYBlue(),registration);
self.confirmationButton = DYButton(@"已确认正常,退出",DYGreen(),NO,self,@selector(confirmHost:));
self.confirmationButton.enabled = NO;
self.confirmationButton.toolTip = @"请先在 Final Cut Pro 中应用大鱼调色并确认效果正常,再点击此按钮。";
NSStackView *host = DYStack(@[DYHeading(@"play.rectangle",@"在 Final Cut Pro 中检查",DYGreen()),
DYLabel(@"调色,留在时间线里。",22,NSFontWeightSemibold,NSColor.whiteColor),
DYLabel(@"Final Cut Pro:效果 → 大鱼调色\n将效果应用到片段,确认画面与调节正常。\n打开宿主检查会保留本窗口,等待你确认。",13,NSFontWeightRegular,DYSecondary()),
DYStack(@[DYButton(@"打开 FCP 检查",DYColor(.20,.46,.94),YES,self,@selector(openFinalCut:)),DYButton(@"打开 Motion",DYGreen(),NO,self,@selector(openMotion:))],NSUserInterfaceLayoutOrientationHorizontal,8),
self.confirmationButton],NSUserInterfaceLayoutOrientationVertical,13);
DYSurface *hostCard = DYCard(DYGreen(),host);
NSStackView *top = DYStack(@[self.registrationCard,hostCard],NSUserInterfaceLayoutOrientationHorizontal,14);
[self.registrationCard.heightAnchor constraintEqualToAnchor:hostCard.heightAnchor].active = YES;
self.updateTitle = DYLabel(@"公测更新",20,NSFontWeightSemibold,NSColor.whiteColor);
self.updateDetail = DYLabel(@"启动时自动检查,新版本由你确认安装。",13,NSFontWeightRegular,DYSecondary());
[self.updateDetail.heightAnchor constraintGreaterThanOrEqualToConstant:42].active = YES;
self.updateProgress = [[[NSProgressIndicator alloc] initWithFrame:NSZeroRect] autorelease];
self.updateProgress.style=NSProgressIndicatorStyleBar; self.updateProgress.indeterminate=NO;
self.updateProgress.minValue=0; self.updateProgress.maxValue=1; self.updateProgress.translatesAutoresizingMaskIntoConstraints=NO;
self.updateCheckButton=DYButton(@"检查更新",DYBlue(),NO,self,@selector(checkUpdate:));
self.updateInstallButton=DYButton(@"下载更新",DYColor(.20,.46,.94),YES,self,@selector(installUpdate:));
self.updateInstallButton.enabled=NO;
self.updateCancelButton=DYButton(@"取消下载",DYBlue(),NO,self,@selector(cancelUpdate:)); self.updateCancelButton.hidden=YES;
DYSurface *updateCard=DYCard(DYBlue(),DYStack(@[DYHeading(@"arrow.triangle.2.circlepath",@"持续改进,及时更新",DYBlue()),self.updateTitle,self.updateDetail,self.updateProgress,
DYStack(@[self.updateCheckButton,self.updateInstallButton],NSUserInterfaceLayoutOrientationHorizontal,8),self.updateCancelButton],NSUserInterfaceLayoutOrientationVertical,10));
self.diagnosticToggle=[NSButton checkboxWithTitle:@"参与公测诊断" target:self action:@selector(toggleDiagnostics:)];
self.diagnosticToggle.font=[NSFont systemFontOfSize:16 weight:NSFontWeightSemibold]; self.diagnosticToggle.state=DYBetaEnabled()?NSControlStateValueOn:NSControlStateValueOff;
self.diagnosticDetail=DYLabel(@"诊断准备中…",12,NSFontWeightRegular,DYSecondary());
self.reportID=DYLabel(@"报告标识准备中…",10,NSFontWeightRegular,DYSecondary());self.reportID.selectable=YES;
self.sendSummaryButton=DYButton(@"发送诊断摘要",DYColor(.67,.59,1),NO,self,@selector(sendSummary:));
DYSurface *diagnosticCard=DYCard(DYColor(.67,.59,1),DYStack(@[DYHeading(@"waveform.path.ecg",@"一起完善大鱼调色",DYColor(.67,.59,1)),self.diagnosticToggle,
DYLabel(@"仅发送版本、系统环境、加载耗时和本插件错误摘要;不发送素材、预设或账号。可随时关闭,诊断保留 30 天。",12,NSFontWeightRegular,DYSecondary()),
self.reportID,self.diagnosticDetail,self.sendSummaryButton],NSUserInterfaceLayoutOrientationVertical,10));
NSStackView *beta=DYStack(@[updateCard,diagnosticCard],NSUserInterfaceLayoutOrientationHorizontal,14);
[updateCard.heightAnchor constraintEqualToAnchor:diagnosticCard.heightAnchor].active=YES;
NSArray *features = @[
@[@"slider.horizontal.3",@"完整调色",@"精准还原,自由塑造",@"CST 色彩管理、光影与曲线\nHSL、色轮、蜘蛛盘与白平衡",DYBlue()],
@[@"square.grid.2x2",@"LUT 与风格",@"灵感,所见即所得",@"LUT 缩略图浏览与实时预览\n快速收藏,管理常用风格",DYColor(.67,.59,1)],
@[@"film",@"胶片质感",@"让画面更有温度",@"八种印片外观、颗粒与晕光\n辉光、暗角及通道混合器",DYColor(1,.67,.30)],
@[@"square.on.circle",@"局部与叠层",@"每个细节,都有层次",@"独立工具层、逐层蒙版\n画面控件与关键帧跟踪",DYGreen()]];
NSMutableArray *cards = [NSMutableArray array];
for (NSArray *feature in features) [cards addObject:DYCard(feature[4],DYStack(@[DYHeading(feature[0],feature[1],feature[4]),
DYLabel(feature[2],17,NSFontWeightSemibold,NSColor.whiteColor),DYLabel(feature[3],13,NSFontWeightRegular,DYSecondary())],NSUserInterfaceLayoutOrientationVertical,12))];
NSStackView *row1 = DYStack(@[cards[0],cards[1]],NSUserInterfaceLayoutOrientationHorizontal,14);
NSStackView *row2 = DYStack(@[cards[2],cards[3]],NSUserInterfaceLayoutOrientationHorizontal,14);
[((NSView *)cards[0]).heightAnchor constraintEqualToAnchor:((NSView *)cards[1]).heightAnchor].active = YES;
[((NSView *)cards[2]).heightAnchor constraintEqualToAnchor:((NSView *)cards[3]).heightAnchor].active = YES;
NSStackView *content = DYStack(@[website,hero,top,beta,DYHeading(@"sparkles",@"一套工具,完成你的色彩表达",NSColor.whiteColor),row1,row2],NSUserInterfaceLayoutOrientationVertical,18);
DYPin(content,document,30);
for (NSView *view in content.arrangedSubviews) [view.widthAnchor constraintEqualToAnchor:content.widthAnchor].active = YES;
[document.heightAnchor constraintGreaterThanOrEqualToAnchor:scroll.contentView.heightAnchor].active = YES;
}
// PluginKit runs on a worker queue. Arguments are never interpreted as shell commands.
- (NSDictionary *)runPluginKit:(NSArray *)arguments {
NSTask *task = [[[NSTask alloc] init] autorelease]; task.executableURL = [NSURL fileURLWithPath:@"/usr/bin/pluginkit"]; task.arguments = arguments;
NSPipe *pipe = [NSPipe pipe]; task.standardOutput = pipe; task.standardError = pipe;
NSError *error = nil;
if (![task launchAndReturnError:&error]) return @{@"code":@(-1),@"output":error.localizedDescription ?: @"无法启动插件登记服务"};
NSDate *deadline = [NSDate dateWithTimeIntervalSinceNow:8];
while (task.running && deadline.timeIntervalSinceNow > 0) [NSThread sleepForTimeInterval:.05];
if (task.running) { [task terminate]; return @{@"code":@(-2),@"output":@"插件登记服务响应超时"}; }
NSData *data = [pipe.fileHandleForReading readDataToEndOfFile];
NSString *output = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease] ?: @"";
return @{@"code":@(task.terminationStatus),@"output":output};
}
- (BOOL)registry:(NSDictionary *)query containsPlugin:(NSString *)path {
if ([query[@"code"] intValue] != 0) return NO;
for (NSString *line in [query[@"output"] componentsSeparatedByCharactersInSet:NSCharacterSet.newlineCharacterSet]) {
NSArray *fields = [line componentsSeparatedByString:@"\t"]; if (fields.count < 4) continue;
NSString *identity = [fields[0] stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceCharacterSet];
if ([identity hasPrefix:@"+"]) identity = [[identity substringFromIndex:1] stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceCharacterSet];
NSString *registered = [[fields lastObject] stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceCharacterSet];
// 1.1 is the registration protocol, not the APP version.
NSString *expected = [DYPluginID stringByAppendingString:@"(1.1)"];
if ([identity isEqualToString:expected] &&
[registered.stringByResolvingSymlinksInPath isEqualToString:path.stringByResolvingSymlinksInPath]) return YES;
}
return NO;
}
- (void)checkRegistration:(id)sender {
if (self.diagnostics && (self.registrationState == DYChecking || self.registrationState == DYRegistering)) return;
[self.exitTimer invalidate]; self.exitTimer = nil; self.registrationState = DYChecking;
self.retryButton.enabled = NO; self.retryButton.title = @"检查中…";
self.statusTitle.stringValue = @"正在检查插件…"; self.statusTitle.textColor = NSColor.whiteColor;
self.statusDetail.stringValue = @"正在检查本机插件登记,随后自动提交注册。";
self.progress.indeterminate = YES; [self.progress startAnimation:nil];
NSString *path = [NSBundle.mainBundle.bundlePath stringByAppendingPathComponent:@"Contents/PlugIns/大鱼调色 XPC Service.pluginkit"];
self.diagnostics = [NSMutableDictionary dictionaryWithDictionary:@{
@"bundleID":NSBundle.mainBundle.bundleIdentifier,@"version":[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"],
@"build":[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"],@"executable":NSBundle.mainBundle.executablePath,
@"pid":@(NSProcessInfo.processInfo.processIdentifier),@"plugin":path,@"status":@"checking"}];
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED,0), ^{
@autoreleasepool {
NSBundle *plugin = [NSBundle bundleWithPath:path];
NSDictionary *attributes = [plugin objectForInfoDictionaryKey:@"PlugInKit"][@"Attributes"];
BOOL validComponent = [plugin.bundleIdentifier isEqualToString:DYPluginID] &&
[[plugin objectForInfoDictionaryKey:@"CFBundleVersion"] isEqual:[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]] &&
[attributes[@"com.apple.protocol"] isEqual:@"FxPlug"] && [attributes[@"com.apple.version"] isEqual:@"1.1"];
if (!validComponent) {
dispatch_async(dispatch_get_main_queue(), ^{ [self finishRegistration:NO details:@"未找到完整的插件组件。请从发布地址重新安装大鱼调色。" results:@{}]; }); return;
}
// The stand-alone wrapper can inspect the registry directly. Registration
// and actual host rendering remain separate states; the user confirms FCP.
NSDictionary *before = [self runPluginKit:@[@"-m",@"-v",@"-i",DYPluginID]];
dispatch_async(dispatch_get_main_queue(), ^{
self.registrationState = DYRegistering; self.statusTitle.stringValue = @"正在注册插件…";
self.statusDetail.stringValue = @"正在向系统提交插件注册,并核对当前安装位置。";
});
NSDictionary *add = [self runPluginKit:@[@"-a",path]];
NSDictionary *after = nil; BOOL registered = NO;
for (NSInteger attempt=0; attempt<4; attempt++) {
if (attempt) [NSThread sleepForTimeInterval:.35];
after = [self runPluginKit:@[@"-m",@"-v",@"-i",DYPluginID]];
registered = [self registry:after containsPlugin:path]; if (registered) break;
}
BOOL submissionAccepted = [add[@"code"] intValue] == 0;
NSString *message = registered ?
@"已确认当前插件登记。请在 Final Cut Pro 中实际应用并确认效果正常;若宿主已打开,请保存后重新打开。" :
@"插件注册尚未完成。请点击“重新检查”,或重新安装后再试。窗口将保持打开。";
NSDictionary *results = @{@"before":before,@"submission":add,@"after":after ?: @{},@"registered":@(registered),
@"discoveryVerified":@(registered),@"submissionAccepted":@(submissionAccepted),@"hostVerification":@"awaiting-user-confirmation",
@"confirmationMethod":registered ? @"exact-path-discovery" : @"unconfirmed"};
dispatch_async(dispatch_get_main_queue(), ^{ [self finishRegistration:registered details:message results:results]; });
}
});
}
- (void)finishRegistration:(BOOL)success details:(NSString *)details results:(NSDictionary *)results {
if (self.terminating) return;
self.registrationState = success ? DYReady : DYFailed;
[self.progress stopAnimation:nil]; self.progress.indeterminate = NO; self.progress.doubleValue = success ? 100 : 0;
self.registrationCard.tint = success ? DYGreen() : DYColor(1,.67,.30); [self.registrationCard setNeedsDisplay:YES];
self.statusTitle.stringValue = success ? @"✓ 插件注册成功" : @"需要重新检查";
self.statusTitle.textColor = success ? DYGreen() : DYColor(1,.75,.4); self.statusDetail.stringValue = details;
self.retryButton.title = @"重新检查"; self.retryButton.enabled = YES;
self.confirmationButton.enabled = success;
[self.diagnostics addEntriesFromDictionary:results]; self.diagnostics[@"status"] = success ? @"registered" : @"failed"; [self writeDiagnostics];
NSAccessibilityPostNotificationWithUserInfo(self.window,NSAccessibilityAnnouncementRequestedNotification,
@{NSAccessibilityAnnouncementKey:self.statusTitle.stringValue,NSAccessibilityPriorityKey:@(NSAccessibilityPriorityHigh)});
DYBetaEvent(@"registration",@{@"status":success?@"registered":@"failed"});
if(success)[self maybeStartCountdown];
else self.exitDetail.stringValue=@"注册尚未完成,应用会保留此窗口以便重试。";
}
- (void)maybeStartCountdown {
if(self.terminating || self.registrationState!=DYReady)return;
if(self.keepOpen){self.exitDetail.stringValue=@"插件已就绪。关闭此窗口后,可继续在宿主中使用。";return;}
if(!self.updateCheckDone){self.exitDetail.stringValue=@"注册成功,正在检查公测更新…";return;}
if(self.exitTimer)return;
self.secondsRemaining=3;[self updateCountdown];
self.exitTimer=[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(exitTick:) userInfo:nil repeats:YES];
}
- (void)updateChanged:(NSDictionary *)state {
if(self.terminating)return;
NSString *phase=state[@"phase"];
BOOL busy=[@[@"checking",@"downloading",@"validating"]containsObject:phase];
BOOL available=[@[@"available",@"ready",@"host_wait",@"installer"]containsObject:phase];
if(![phase isEqual:@"checking"]){self.updateCheckDone=YES;if(available)[self keepIntroduction:nil];}
self.updateTitle.stringValue=[phase isEqual:@"available"]?state[@"message"]:@"公测更新";
self.updateDetail.stringValue=state[@"message"]?:@"";
self.updateCheckButton.enabled=!busy;
self.updateInstallButton.enabled=[@[@"available",@"ready",@"host_wait",@"installer"]containsObject:phase];
self.updateInstallButton.title=[phase isEqual:@"available"]?@"下载更新":@"安装更新";
self.updateCancelButton.hidden=![phase isEqual:@"downloading"];
self.updateProgress.indeterminate=[@[@"checking",@"validating"]containsObject:phase];
if(self.updateProgress.indeterminate)[self.updateProgress startAnimation:nil];else [self.updateProgress stopAnimation:nil];
self.updateProgress.doubleValue=[@[@"ready",@"host_wait",@"installer"]containsObject:phase]?1:0;
[self maybeStartCountdown];
}
- (void)refreshUpdateProgress:(NSTimer *)timer {
if([self.updater.state[@"phase"]isEqual:@"downloading"])self.updateProgress.doubleValue=self.updater.downloadFraction;
}
- (void)checkUpdate:(id)sender { [self keepIntroduction:nil]; [self.updater check]; }
- (void)installUpdate:(id)sender {
[self keepIntroduction:nil];NSString *phase=self.updater.state[@"phase"];
if([phase isEqual:@"available"])[self.updater download];else [self.updater install];
}
- (void)cancelUpdate:(id)sender { [self keepIntroduction:nil];[self.updater cancel]; }
- (void)refreshDiagnostics:(NSNotification *)note {
NSDictionary *state=DYBetaStatus();BOOL enabled=DYBetaEnabled();self.diagnosticToggle.state=enabled?NSControlStateValueOn:NSControlStateValueOff;
self.sendSummaryButton.enabled=enabled;
self.reportID.stringValue=[NSString stringWithFormat:@"报告标识:%@",state[@"installation_id"]?:@"准备中…"];
NSNumber *uploaded=state[@"last_upload"];
if(!enabled)self.diagnosticDetail.stringValue=@"诊断已关闭。不会继续上传,待发送摘要已清除。";
else if(uploaded){NSDateFormatter *format=[[[NSDateFormatter alloc]init]autorelease];format.dateFormat=@"HH:mm:ss";
self.diagnosticDetail.stringValue=[NSString stringWithFormat:@"最近送达 %@ · 待发送 %@ 条",[format stringFromDate:[NSDate dateWithTimeIntervalSince1970:uploaded.doubleValue]],state[@"pending"]?:@0];}
else self.diagnosticDetail.stringValue=@"诊断将在后台发送,离线时暂存并稍后重试。";
}
- (void)toggleDiagnostics:(id)sender { [self keepIntroduction:nil];DYBetaSetEnabled(self.diagnosticToggle.state==NSControlStateValueOn);[self refreshDiagnostics:nil]; }
- (void)sendSummary:(id)sender { [self keepIntroduction:nil];DYBetaSendSummary();self.diagnosticDetail.stringValue=@"已加入后台发送队列,送达后会显示时间。"; }
- (void)updateCountdown { self.exitDetail.stringValue = [NSString stringWithFormat:@"%ld 秒后自动退出\n点击“查看功能介绍”可保留窗口",(long)self.secondsRemaining]; }
- (void)exitTick:(NSTimer *)timer {
if (--self.secondsRemaining <= 0) {
[timer invalidate]; self.exitTimer = nil; self.diagnostics[@"terminationReason"] = @"registration-succeeded"; [self writeDiagnostics]; [NSApp terminate:nil];
} else [self updateCountdown];
}
- (void)keepIntroduction:(id)sender {
self.keepOpen = YES; [self.exitTimer invalidate]; self.exitTimer = nil;
self.keepButton.title = @"正在浏览介绍"; self.keepButton.enabled = NO;
self.exitDetail.stringValue = @"已保留功能介绍窗口。插件可独立在宿主中使用。";
}
- (void)confirmHost:(id)sender {
if (self.registrationState != DYReady) return;
DYBetaEvent(@"host_confirmed",@{@"status":@"user_confirmed"});
self.diagnostics[@"hostVerification"] = @"user-confirmed";
self.diagnostics[@"terminationReason"] = @"user-confirmed-host";
[self writeDiagnostics]; [NSApp terminate:nil];
}
- (void)writeDiagnostics {
NSURL *base = [NSFileManager.defaultManager URLsForDirectory:NSApplicationSupportDirectory inDomains:NSUserDomainMask].firstObject;
NSURL *folder = [base URLByAppendingPathComponent:@"com.dayu.color" isDirectory:YES];
[NSFileManager.defaultManager createDirectoryAtURL:folder withIntermediateDirectories:YES attributes:nil error:nil];
NSData *data = [NSJSONSerialization dataWithJSONObject:self.diagnostics options:NSJSONWritingPrettyPrinted error:nil];
[data writeToURL:[folder URLByAppendingPathComponent:@"Registration.json"] options:NSDataWritingAtomic error:nil];
}
- (void)openHostWithIdentifiers:(NSArray *)identifiers name:(NSString *)name {
[self keepIntroduction:nil]; NSURL *url = nil;
for (NSString *identifier in identifiers) { url = [NSWorkspace.sharedWorkspace URLForApplicationWithBundleIdentifier:identifier]; if (url) break; }
if (!url) { [self showMessage:[@"未找到 " stringByAppendingString:name] detail:@"请先安装宿主应用,再从效果或滤镜中使用大鱼调色。"]; return; }
[NSWorkspace.sharedWorkspace openApplicationAtURL:url configuration:NSWorkspaceOpenConfiguration.configuration completionHandler:^(NSRunningApplication *app,NSError *error) {
if (error) dispatch_async(dispatch_get_main_queue(), ^{ [self showMessage:@"无法打开宿主" detail:error.localizedDescription]; });
}];
}
- (void)openFinalCut:(id)sender { [self openHostWithIdentifiers:@[@"com.apple.FinalCut",@"com.apple.FinalCutApp"] name:@"Final Cut Pro"]; }
- (void)openMotion:(id)sender { [self openHostWithIdentifiers:@[@"com.apple.motionapp",@"com.apple.motionappApp"] name:@"Motion"]; }
- (void)openWebsite:(id)sender { [self keepIntroduction:nil]; if (![NSWorkspace.sharedWorkspace openURL:[NSURL URLWithString:DYReleaseAddress]]) [self showMessage:@"无法打开发布地址" detail:DYReleaseAddress]; }
- (void)showMessage:(NSString *)title detail:(NSString *)detail {
NSAlert *alert = [[[NSAlert alloc] init] autorelease]; alert.messageText = title; alert.informativeText = detail;
[alert addButtonWithTitle:@"好"]; [alert beginSheetModalForWindow:self.window completionHandler:nil];
}
- (void)closeWindow:(id)sender { [self.window performClose:sender]; }
- (void)accessibilityChanged:(NSNotification *)note { [self.window.contentView setNeedsDisplay:YES]; }
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)app { return YES; }
- (void)applicationWillTerminate:(NSNotification *)note {
self.terminating = YES; [self.exitTimer invalidate]; self.exitTimer = nil;
self.updater.changed=nil; [self.updater cancel];DYBetaStop();
[self.updateProgressTimer invalidate];self.updateProgressTimer=nil;
[NSNotificationCenter.defaultCenter removeObserver:self];
[NSWorkspace.sharedWorkspace.notificationCenter removeObserver:self];
}
- (void)dealloc { [_exitTimer invalidate]; [_exitTimer release]; [_diagnostics release]; [_updater release]; [_updateProgressTimer invalidate]; [_updateProgressTimer release]; [super dealloc]; }
@end
@@ -0,0 +1,12 @@
#import <Foundation/Foundation.h>
@interface DYBetaUpdater : NSObject <NSURLSessionTaskDelegate>
@property(copy) void (^changed)(NSDictionary *state);
@property(readonly,copy) NSDictionary *state;
@property(readonly) double downloadFraction;
- (void)check;
- (void)download;
- (void)install;
- (void)cancel;
+ (BOOL)validateManifest:(NSDictionary *)manifest error:(NSError **)error;
+ (BOOL)validatePackage:(NSURL *)package manifest:(NSDictionary *)manifest error:(NSError **)error;
@end
@@ -0,0 +1,178 @@
#import "DYBetaUpdater.h"
#import "../Shared/DYBetaDiagnostics.h"
#import <AppKit/AppKit.h>
#import <CommonCrypto/CommonDigest.h>
#include <atomic>
#include <signal.h>
#include <errno.h>
static NSError *DYUpdateError(NSString *message) { return [NSError errorWithDomain:@"com.dayu.color.update" code:1 userInfo:@{NSLocalizedDescriptionKey:message}]; }
static NSURL *updateFolder(void) {
NSURL *folder=[[NSFileManager.defaultManager URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask].firstObject URLByAppendingPathComponent:@"com.dayu.color/Updates" isDirectory:YES];
[NSFileManager.defaultManager createDirectoryAtURL:folder withIntermediateDirectories:YES attributes:@{NSFilePosixPermissions:@0700} error:nil];return folder;
}
static NSString *digest(NSURL *url) {
NSFileHandle *file=[NSFileHandle fileHandleForReadingFromURL:url error:nil];if(!file)return nil;
CC_SHA256_CTX context;CC_SHA256_Init(&context);for(;;){NSData *data=[file readDataUpToLength:1024*1024 error:nil];if(!data.length)break;CC_SHA256_Update(&context,data.bytes,(CC_LONG)data.length);}[file closeFile];
unsigned char bytes[CC_SHA256_DIGEST_LENGTH];CC_SHA256_Final(bytes,&context);NSMutableString *text=[NSMutableString string];for(int i=0;i<CC_SHA256_DIGEST_LENGTH;i++)[text appendFormat:@"%02x",bytes[i]];return text;
}
static NSString *command(NSString *path,NSArray *arguments,NSError **error) {
NSTask *task=[[[NSTask alloc]init]autorelease];task.executableURL=[NSURL fileURLWithPath:path];task.arguments=arguments;
NSPipe *output=[NSPipe pipe];task.standardOutput=output;task.standardError=output;
if(![task launchAndReturnError:error])return nil;NSDate *deadline=[NSDate dateWithTimeIntervalSinceNow:40];
while(task.running&&deadline.timeIntervalSinceNow>0)[NSThread sleepForTimeInterval:.05];
if(task.running){[task terminate];if(error)*error=DYUpdateError(@"更新包验证超时,请稍后重试。");return nil;}
NSData *data=[output.fileHandleForReading readDataToEndOfFile];NSString *value=[[[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding]autorelease]?:@"";
if(task.terminationStatus!=0){if(error)*error=DYUpdateError(@"更新包未通过系统签名或完整性验证。");return nil;}return value;
}
@interface DYBetaUpdater () {
NSURLSession *_session;
NSURLSessionTask *_task;
NSURL *_package;
NSDictionary *_state,*_manifest;
std::atomic_uint _generation;
}
- (void)emit:(NSString *)phase message:(NSString *)message;
@end
@implementation DYBetaUpdater
- (instancetype)init {
if((self=[super init])){_generation.store(0);NSURLSessionConfiguration *config=NSURLSessionConfiguration.ephemeralSessionConfiguration;
config.timeoutIntervalForRequest=6;config.timeoutIntervalForResource=300;config.HTTPShouldSetCookies=NO;config.URLCache=nil;
_session=[[NSURLSession sessionWithConfiguration:config delegate:self delegateQueue:nil]retain];_state=[@{@"phase":@"idle",@"message":@"启动时自动检查公测更新。"}copy];
// Reclaim only abandoned validation folders, never another running updater's work.
dispatch_async(dispatch_get_global_queue(QOS_CLASS_UTILITY,0),^{
for(NSURL *url in [NSFileManager.defaultManager contentsOfDirectoryAtURL:updateFolder() includingPropertiesForKeys:@[NSURLContentModificationDateKey] options:0 error:nil]){
NSArray *parts=[url.lastPathComponent componentsSeparatedByString:@"-"];
if(parts.count<3||![parts[0]isEqual:@"inspection"]||[parts[1]rangeOfString:@"^[0-9]+$" options:NSRegularExpressionSearch].location==NSNotFound)continue;
int pid=[parts[1]intValue];NSDate *date=nil;[url getResourceValue:&date forKey:NSURLContentModificationDateKey error:nil];
if(pid>0&&kill(pid,0)!=0&&errno==ESRCH&&date&&date.timeIntervalSinceNow< -600)[NSFileManager.defaultManager removeItemAtURL:url error:nil];
}
});
}return self;
}
- (void)dealloc {[_session invalidateAndCancel];[_session release];[_task release];[_package release];[_state release];[_manifest release];[_changed release];[super dealloc];}
- (NSDictionary *)state { return [[_state copy]autorelease]; }
- (double)downloadFraction {int64_t expected=[_manifest[@"size"]longLongValue];return expected>0?MIN(1.,double(_task.countOfBytesReceived)/expected):0;}
- (void)emit:(NSString *)phase message:(NSString *)message {
if(!NSThread.isMainThread){dispatch_async(dispatch_get_main_queue(),^{[self emit:phase message:message];});return;}
[_state release];_state=[@{@"phase":phase,@"message":message?:@"",@"version":_manifest[@"version"]?:@""}copy];if(self.changed)self.changed(_state);
}
+ (BOOL)validateManifest:(NSDictionary *)manifest error:(NSError **)error {
if(![manifest isKindOfClass:NSDictionary.class]){if(error)*error=DYUpdateError(@"公测更新清单格式错误。");return NO;}
id build=manifest[@"build"],size=manifest[@"size"];
BOOL numbers=[build isKindOfClass:NSNumber.class]&&[size isKindOfClass:NSNumber.class]&&
CFGetTypeID((CFTypeRef)build)!=CFBooleanGetTypeID()&&CFGetTypeID((CFTypeRef)size)!=CFBooleanGetTypeID();
BOOL valid=numbers&&[manifest[@"bundle_id"]isEqual:@"com.dayu.color"]&&[manifest[@"channel"]isEqual:@"beta"]&&
[manifest[@"version"]isKindOfClass:NSString.class]&&[manifest[@"version"]length]>0&&[manifest[@"version"]length]<33&&
[build doubleValue]==[build longLongValue]&&[build longLongValue]>0&&[build longLongValue]<1000000000&&
[manifest[@"package_type"]isEqual:@"pkg"]&&[manifest[@"install_mode"]isEqual:@"pkg_installer"]&&
[size doubleValue]==[size longLongValue]&&[size longLongValue]>0&&[size longLongValue]<=1024LL*1024*1024;
NSString *hash=[manifest[@"sha256"]isKindOfClass:NSString.class]?manifest[@"sha256"]:@"";
valid=valid&&hash.length==64&&[hash rangeOfString:@"^[a-f0-9]{64}$" options:NSRegularExpressionSearch].location!=NSNotFound;
NSURL *url=[manifest[@"download_url"]isKindOfClass:NSString.class]?[NSURL URLWithString:manifest[@"download_url"]]:nil;
valid=valid&&DYBetaAllowedURL(url,YES)&&[url.pathExtension.lowercaseString isEqual:@"pkg"];
if(!valid&&error)*error=DYUpdateError(@"公测更新清单不完整或不属于大鱼调色。");return valid;
}
+ (BOOL)validatePackage:(NSURL *)package manifest:(NSDictionary *)manifest error:(NSError **)error {
if(![self validateManifest:manifest error:error])return NO;
NSDictionary *attributes=[NSFileManager.defaultManager attributesOfItemAtPath:package.path error:error];
if(!attributes||[attributes[NSFileSize]longLongValue]!=[manifest[@"size"]longLongValue]||![[digest(package)lowercaseString]isEqual:manifest[@"sha256"]]){if(error)*error=DYUpdateError(@"更新包大小或 SHA-256 不匹配,未打开安装程序。");return NO;}
NSString *signature=command(@"/usr/sbin/pkgutil",@[@"--check-signature",package.path],error);
if(!signature||![signature containsString:@"Developer ID Installer:"]||![signature containsString:@"(B3W25FX5H5)"]){if(error)*error=DYUpdateError(@"更新包签名团队不匹配。");return NO;}
if(!command(@"/usr/sbin/spctl",@[@"--assess",@"--type",@"install",@"--verbose=2",package.path],error))return NO;
NSURL *inspection=[updateFolder() URLByAppendingPathComponent:[NSString stringWithFormat:@"inspection-%d-%@",getpid(),NSUUID.UUID.UUIDString]];
@try {
if(!command(@"/usr/sbin/pkgutil",@[@"--expand-full",package.path,inspection.path],error))return NO;
NSMutableArray *apps=[NSMutableArray array];NSUInteger entries=0;
NSDirectoryEnumerator *iterator=[NSFileManager.defaultManager enumeratorAtURL:inspection includingPropertiesForKeys:@[NSURLIsSymbolicLinkKey] options:0 errorHandler:nil];
for(NSURL *url in iterator){if(++entries>50000){if(error)*error=DYUpdateError(@"更新包文件数量异常。");return NO;}
if([url.pathExtension isEqual:@"app"]){[apps addObject:url];[iterator skipDescendants];}
}
if(apps.count!=1){if(error)*error=DYUpdateError(@"更新包必须包含一个完整的大鱼调色 APP。");return NO;}
NSURL *app=apps.firstObject;NSDictionary *info=[NSDictionary dictionaryWithContentsOfURL:[app URLByAppendingPathComponent:@"Contents/Info.plist"]];
NSDictionary *plugin=[NSDictionary dictionaryWithContentsOfURL:[app URLByAppendingPathComponent:@"Contents/PlugIns/大鱼调色 XPC Service.pluginkit/Contents/Info.plist"]];
if(![info[@"CFBundleIdentifier"]isEqual:@"com.dayu.color"]||![plugin[@"CFBundleIdentifier"]isEqual:@"com.dayu.color.XPC"]||
[info[@"CFBundleVersion"]integerValue]!=[manifest[@"build"]integerValue]||[plugin[@"CFBundleVersion"]integerValue]!=[manifest[@"build"]integerValue]||
![info[@"CFBundleShortVersionString"]isEqual:manifest[@"version"]]){if(error)*error=DYUpdateError(@"更新包产品或版本与清单不一致。");return NO;}
if(!command(@"/usr/bin/codesign",@[@"--verify",@"--deep",@"--strict",app.path],error))return NO;
NSString *identity=command(@"/usr/bin/codesign",@[@"-dvvv",app.path],error);
if(![identity containsString:@"TeamIdentifier=B3W25FX5H5"]){if(error)*error=DYUpdateError(@"包内 APP 签名团队不匹配。");return NO;}
// Product PKGs install the wrapper at its fixed FxPlug location and carry templates.
BOOL appTarget=NO,templates=NO;
for(NSURL *url in [NSFileManager.defaultManager enumeratorAtURL:inspection includingPropertiesForKeys:nil options:0 errorHandler:nil]){
if([url.lastPathComponent isEqual:@"PackageInfo"]){NSString *xml=[NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:nil];
NSXMLDocument *document=[[[NSXMLDocument alloc]initWithXMLString:xml options:0 error:nil]autorelease];
NSXMLElement *root=document.rootElement;NSString *identifier=[[root attributeForName:@"identifier"]stringValue];
NSString *location=[[root attributeForName:@"install-location"]stringValue]?:@"/";
NSString *relative=[location isEqual:@"/"]?@"Payload/Library/Plug-Ins/FxPlug/大鱼调色.app":([location isEqual:@"/Library/Plug-Ins/FxPlug"]?@"Payload/大鱼调色.app":nil);
if(relative&&[[[[url.URLByDeletingLastPathComponent URLByAppendingPathComponent:relative]path]stringByStandardizingPath]isEqual:app.path.stringByStandardizingPath])appTarget=YES;
if(![identifier hasPrefix:@"com.dayu.color.installer."]){if(error)*error=DYUpdateError(@"更新包含不属于本产品的安装组件。");return NO;}
}
if([url.lastPathComponent isEqual:@"大鱼调色.moef"])templates=YES;
}
if(!appTarget||!templates){if(error)*error=DYUpdateError(@"更新包缺少正确的插件安装位置或 FCP 模板。");return NO;}
return YES;
} @finally {[NSFileManager.defaultManager removeItemAtURL:inspection error:nil];}
}
- (void)check {
NSString *phase=_state[@"phase"];if([@[@"checking",@"downloading",@"validating"]containsObject:phase])return;
unsigned generation=++_generation;[self emit:@"checking" message:@"正在检查公测更新…"];
NSString *url=[NSString stringWithFormat:@"https://dayu.media/wp-json/dayu-color/v1/update?bundle_id=com.dayu.color&channel=beta&current_build=%@",([NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]?:@"0")];
NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:6];
[_task release];_task=[[_session dataTaskWithRequest:request completionHandler:^(NSData *data,NSURLResponse *response,NSError *error){@autoreleasepool{
NSDictionary *value=data.length<=32768?[NSJSONSerialization JSONObjectWithData:data?:[NSData data] options:0 error:nil]:nil;
if(![value isKindOfClass:NSDictionary.class])value=nil;
BOOL ok=!error&&[(NSHTTPURLResponse*)response statusCode]==200&&[value[@"bundle_id"]isEqual:@"com.dayu.color"]&&[value[@"channel"]isEqual:@"beta"]&&[value[@"update_available"]isKindOfClass:NSNumber.class]&&CFGetTypeID((CFTypeRef)value[@"update_available"])==CFBooleanGetTypeID();
if(ok&&[value[@"update_available"]boolValue])ok=[DYBetaUpdater validateManifest:value error:&error];
NSDictionary *result=[[value copy]autorelease];
dispatch_async(dispatch_get_main_queue(),^{if(generation!=self->_generation.load())return;
if(!ok){[self emit:@"failed" message:@"暂时无法检查更新,不影响插件使用。"];
DYBetaEvent(@"update_check",@{@"status":@"failed",@"error_code":@(error.code)});return;}
[self->_manifest release];self->_manifest=[result copy];
BOOL newer=[result[@"update_available"]boolValue]&&[result[@"build"]integerValue]>[[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]integerValue];
[self emit:newer?@"available":@"latest" message:newer?[NSString stringWithFormat:@"发现公测版 %@(%@)",result[@"version"],result[@"build"]]:@"当前已是最新公测版。"];
DYBetaEvent(@"update_check",@{@"status":newer?@"available":@"latest"});
});
}}]retain];[_task resume];
}
- (void)download {
if(![_state[@"phase"]isEqual:@"available"])return;NSError *error=nil;
if(![DYBetaUpdater validateManifest:_manifest error:&error]){[self emit:@"failed" message:error.localizedDescription];return;}
if([_manifest[@"build"]integerValue]<=[[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]integerValue])return;
unsigned generation=++_generation;NSDictionary *manifest=[[_manifest copy]autorelease];[self emit:@"downloading" message:@"正在下载公测更新,可随时取消。"];
NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:manifest[@"download_url"]]];request.timeoutInterval=30;
[_task release];_task=[[_session downloadTaskWithRequest:request completionHandler:^(NSURL *temporary,NSURLResponse *response,NSError *failure){@autoreleasepool{
if(generation!=self->_generation.load())return;
NSError *error=failure;NSURL *destination=[updateFolder() URLByAppendingPathComponent:[NSString stringWithFormat:@"dayu-color-update-%@.pkg",manifest[@"build"]]];
if(!error&&[(NSHTTPURLResponse*)response statusCode]==200&&DYBetaAllowedURL(response.URL,YES)){
[NSFileManager.defaultManager removeItemAtURL:destination error:nil];
if([NSFileManager.defaultManager moveItemAtURL:temporary toURL:destination error:&error]){
[self emit:@"validating" message:@"正在验证完整性、签名、公证和插件版本…"];
BOOL valid=[DYBetaUpdater validatePackage:destination manifest:manifest error:&error];
if(!valid&&!error)error=DYUpdateError(@"更新包未通过验证。");
}
}else if(!error)error=DYUpdateError(@"更新包下载失败。");
if(generation!=self->_generation.load()){[NSFileManager.defaultManager removeItemAtURL:destination error:nil];return;}
if(error)[NSFileManager.defaultManager removeItemAtURL:destination error:nil];
dispatch_async(dispatch_get_main_queue(),^{if(generation!=self->_generation.load())return;
if(error){[self emit:@"available" message:error.localizedDescription];DYBetaEvent(@"update_download",@{@"status":@"failed",@"error_code":@(error.code)});}
else{[self->_package release];self->_package=[destination retain];[self emit:@"ready" message:@"更新包已通过校验。保存并退出 FCP / Motion 后可安装。"];
DYBetaEvent(@"update_validation",@{@"status":@"passed"});}
});
}}]retain];[_task resume];
}
- (void)install {
if(![@[@"ready",@"host_wait",@"installer"]containsObject:_state[@"phase"]])return;
for(NSString *ID in @[@"com.apple.FinalCut",@"com.apple.FinalCutApp",@"com.apple.motionapp",@"com.apple.motionappApp"])
if([NSRunningApplication runningApplicationsWithBundleIdentifier:ID].count){[self emit:@"host_wait" message:@"请先保存并正常退出 FCP / Motion,再点击安装更新。不会强制退出宿主。"];
DYBetaEvent(@"update_installer",@{@"status":@"waiting_for_host"});return;}
if(_package&&[NSWorkspace.sharedWorkspace openURL:_package]){
[NSUserDefaults.standardUserDefaults setObject:_manifest[@"build"] forKey:@"betaPendingUpdateBuild"];[self emit:@"installer" message:@"已打开系统安装程序,请按提示授权并完成安装。"];
DYBetaEvent(@"update_installer",@{@"status":@"system_installer_opened"});}
else [self emit:@"failed" message:@"无法打开系统安装程序,请重试。"];
}
- (void)cancel {++_generation;[_task cancel];BOOL newer=[_manifest[@"build"]integerValue]>[[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]integerValue];[self emit:newer?@"available":@"idle" message:@"已取消,不影响当前插件。"];}
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task willPerformHTTPRedirection:(NSHTTPURLResponse *)response newRequest:(NSURLRequest *)request completionHandler:(void (^)(NSURLRequest *))completion {
BOOL download=[task isKindOfClass:NSURLSessionDownloadTask.class];completion(DYBetaAllowedURL(request.URL,download)?request:nil);
}
@end
+2 -2
查看文件
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.5.0</string>
<string>1.7.0</string>
<key>CFBundleVersion</key>
<string>34</string>
<string>45</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
</dict>
<dict/>
</plist>
+31 -34
查看文件
@@ -1,50 +1,47 @@
# 大鱼调色FxPlug4交接:1.5.0胶片与通道混合器
# 大鱼调色 FxPlug4 交接
2026-11-02(Asia/Shanghai)。当前正式1.5.0(34),APP已经签名、公证、粘附并安装,FCP12.4宿主验收完成。安装包/Release最终结果读取 `verification/Package.json`、`verification/Release.json`,与APP编译节点分别记录。
后续主 APP 优化入口:[大鱼调色主APP开发交接.md](/Volumes/备份/大鱼调色/大鱼调色/大鱼调色主APP开发交接.md),包含自动更新、登录验证、生产接口只读盘点与待定产品规则;这些新功能尚未实施。
## 身份与恢复
2026-11-02,最终正式版 **1.6.0(39)**。本次完成Color Finale本机胶片五组、通道混合器及用户补充的全部八种印片;去掉MOEF作者/网站两行、降低模板格式,并追加一级自动映射默认开启和主标题链接。
- 源码:`/Volumes/备份/大鱼调色/大鱼调色`;远程 `https://dayu.media/git/dayu/dayu-color.git`,main。
- 正式:`/Library/Plug-Ins/FxPlug/大鱼调色.app`,主ID `com.dayu.color`、XPC `com.dayu.color.XPC`。
- APP实际编译源码:`06d531c443b0bb2f179022a4e64148394f5d0690`。
- APP公证:`164abf2b-4e67-4504-b72a-04122da9e381` Accepted;团队B3W25FX5H5。
- 固定构建缓存:`/Users/mac/Library/Caches/CodexBuilds/com.dayu.color`。
- 模板唯一位置:`/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef`。
- 无LFS/子模块;程序不依赖Color Finale安装、REA缓存或父“大鱼调色盘”。
## 正式身份与恢复
正式PKG `../发行包/大鱼调色-1.5.0.pkg`,14,380,104字节,SHA-256 `3ecabc7a8bfd675b228a5f00016aa17a35b65b544055e57793ec3bff3d7e0294`。PKG公证 `05f849da-5567-4351-9556-742d17b95723` Accepted,20项展开验包通过;本轮未再次运行系统安装器。发行标签 `v1.5.0-film-mixer-20261102`,最终发布及远端恢复结果见本版记录。
- 唯一APP:`/Library/Plug-Ins/FxPlug/大鱼调色.app`;ID `com.dayu.color` / `com.dayu.color.XPC`,团队B3W25FX5H5。
- 实际编译源码:`e5affd3f097fc96f87f41be8e1a3f131ed01daeb`,APP公证 `5d74c04c-8a30-47e9-822d-4f616dfdee56` Accepted;签名、票据、Gatekeeper及正式进程路径通过。
- 远程:`https://dayu.media/git/dayu/dayu-color.git`,main,最终标签 `v1.6.0-print-looks-20261102`。完整标签SHA及PKG/Release元数据以 `verification/Release.json` 为准;实际编译SHA与文档交付SHA分别记录。
- 模板:`~/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef`,ozml5.11 / Motion5.4.5,SHA `fe6b9ed9a59e1e00de7bcad4526bc98fa2d5fde5cab490fd65ec999835ab2250`。
- Apple Silicon/macOS14.6或更新;FCP12.4已验收,旧FCP未实机覆盖。不依赖ColorFinale安装、REA缓存或父插件;无LFS/子模块。
## 本轮实现
## 行为与参数
通道混合器采用RGB三输出×三输入矩阵,含保持亮度、保持饱和度与混合。胶片含减色、晕光、辉光、颗粒、暗角,五页参数各自启停。两类工具沿用原启停、折叠、蒙版、数量标记、区域跟踪和相邻初始化层;工具类型由12追加到14,原索引不移动。
胶片为减色、晕光、辉光、颗粒、暗角、印片六页。印片默认无:Kodak2383、Kodak2393、Kodak2302 BW、Fuji3510、Fuji3513、Fuji3519、Fuji3521、AgfaCP30,独立强度。通道混合器为RGB三输出×三输入,保持亮度/饱和度和混合强度。两工具沿用启停、折叠、复位、蒙版、数量标记、区域跟踪、相邻独立层;旧索引、Uniform前缀、LUT、蜘蛛盘和轨迹保留。
42个宿主参数只追加,旧参数ID、944字节GPU前缀及1104字节完整旧Uniform前缀保留。完整预设v5兼容v1–v4;读旧预设时新参数恢复中性。schema1尾层、schema2锚点、已有9000–9003载荷保留。新工具置于既有显示域/蜘蛛盘之后、历史尾层之前,不能因此推断UI中全部旧工具都按视觉顺序渲染。
印片追加在五处理后、全胶片混合/原蒙版前;Rec.709线性→AP1/D60→ACEScct→65³原LMT四面体→线性Rec.709。不包含原版任意完整CMS/ODT迁移。旧1296字节前缀保留,追加filmPrint共1312字节;预设v6读v1–v5。纯印片、矩阵和减色可导出Cube;空间/时间效果和蒙版限制保留。原版CI半透明链与产品预乘合同的已测差异详见研究和完整对照报告。
减色与颗粒用既有sRGB编码边界,晕光/辉光/暗角在线性纹理上。减色是原SubSat归一化幂函数,活跃时限幅0–1。晕光为高斯散射后R/G通道加权归一化;辉光为稀疏预滤→向量Sobel→扩散→相加。颗粒使用PCG/Box-Muller、MPS扩散、精确有理帧和规范化全帧坐标;与原版CI内部切块的空间噪声排列不做全局逐像素等效承诺。暗角复用相同系统CIVignetteEffect。纯矩阵和减色支持Cube,活跃空间/时间效果及蒙版明确拒绝Cube。
MOEF仅发布自定义检查器与混合,无作者/网站Rig。全局技能检查器对5.11返回未知版本guard,如实保存;项目级真实原生样本字段验证与当前FCP加载/渲染分别通过。
原厂八种印片外观属于另外的ACES输出资源,本版五组处理未纳入这些外观。不能把F-Log输入菜单当作胶片外观,也不能将本工程接入域声称为原版任意ACES链等效。来源、证据ID与边界见[研究记录](research/ColorFinaleFilmMixer.md)。
FCP新效果、新加一级层及全部还原的自动映射为开启;主标题链接为“更多插件访问 https://dayu.media”,点击已实际打开网站。原生注册默认维持历史0,新MOEF显式value1/default0;旧独立一级层省略值保持0。FCP沿用模板默认的旧主效果实测会变为开启,三组旧预设仅此0→1,其余277项及全部paths/spider/tools载荷保持。不能宣称更改模板默认后旧主效果完全逐字节不变;新手动关闭后已验证冷重开保持。
## 验收与用户资料
## 验收证据
- 349项原生检查;四种尺寸64×48、63×47、1×17、17×1共184项原版组件对照通过。
- FCP12.4正式版加载;用户234个既有参数、资产路径、蜘蛛盘和蒙版载荷逐项/逐字节保持。界面显示286个可信跟踪键,载荷共287键(含作者键)。
- 新模块、五页胶片控制、独立混合器初始化、胶片椭圆蒙版、折叠数量1、删除/撤销/重做通过。
- 1080p/25fps/4秒ProRes正式导出验证grainHold2:0/1、2/3、4/5帧分别相同,组间不同。
- 960×540/25fps/4秒组合导出全部帧解码通过;三个项目FCPXML1.14原生回导严格校验与比较通过。
- 正常退出冷重开,组合预设8987字节、颗粒预设8420字节前后均逐字节相同。
正式395项原生检查、四尺寸136项原版印片对照通过,固定容差0.0001,最大线性RGB绝对差0.000004828。最终Metal与完整八外观验收的36候选相同。36候选逐个选择八种印片、两层不同印片/强度、椭圆蒙版100键跟踪、折叠标记、删除撤销重做及三段300帧ProRes通过;最终39保留全部自定义载荷,并完成新默认、实际链接、手动开关冷重开8668字节一致及新增1080p100帧正式导出。完整用户文件只在本机fcp-qa缓存,不进Git或PKG。
记录:`verification/HostFilmMixer1.5.0.json`、`FilmMixerNative.json`、`FilmMixerReference.json`、`FilmMixerRecovery.json`。私有完整预设与FCPXML只在本机 `.../com.dayu.color/fcp-qa/`,文件名前缀 `film-mixer-`。不写入Git、PKG或覆盖用户原素材。
- 最终安装:`verification/Delivery.json` / `InstalledSelfTest.json`。
- 最终汇总:`verification/HostPrintLooks1.6.0.json`。
- 默认/链接/保存:`verification/HostPrimaryDefaults1.6.0.json`。
- 八外观完整宿主操作:`verification/HostPrintLooksBuild36.json`。
- 算法/原版边界:`research/PrintLooks1.6.0.md` / `verification/PrintLooksReference.json`。
- 独立恢复:`verification/PrintLooksRecovery.json`,最终编译节点294文件全字节、full/strict fsck、Release构建395项和模板重建通过。
- 最终安装包/上传/标签恢复/清理:`verification/Package.json`、`Release.json`、`PrintLooksReleaseRecovery.json`、`PrintLooksCleanup.json`。
## 源码入口
最终PKG由PKG工坊签名、公证、票据与20项展开验包;不再运行系统安装器,APP已有独立正式安装和宿主验收。包与Release下载校验值以Package/Release报告为准。
- `DYFilmTypes.h`、`DYFilmMath.h`:状态/中性判断与共享数学。
- `DYFilmKernels.inc.h`:原生Metal点处理、PCG、辉光预滤与Sobel;由DYGrade.metal包含,经tools/build_kernels.py构建。
- `DYFilmRender.inc.h`:惰性缓冲、CI/MPS空间阶段、内存预算、混合及现有蒙版。
- `DYFilmTime.h`、DYPlugIn.mm:冻结宿主帧长/起点,精确签名帧索引和1–5帧保持。
- DYModel.mm / DYUniforms.h:只追加描述符、Uniform;DYInspector.mm五页分组和RGB三输出分组。
- DYToolState.mm / DYToolRender.inc.h:新类型、独立初始化、相邻锚点、尾层和Cube限制。
- tools/verify_film_reference.mm:本机原版只读CI/Metal对照,不参与产品运行。
## 接续方法
按本机全局规则继续交付。`tools/deliver.py`持有产品锁,正式宿主完成后才输入complete;其自检输出现在会先保存诊断再判定,避免失败时丢失输出。首次预检曾在与恢复自检并行时退出1,旧工具未保留当次JSON;未替换旧版。随后串行349项、正式安装349项和独立恢复349项全部通过,不把未知原因写成已证实的程序缺陷。
固定缓存 `/Users/mac/Library/Caches/CodexBuilds/com.dayu.color`。更改模型后运行 `python3 tools/build_template.py --refresh-model --overwrite`,再 `python3 tools/verify_template.py`;更新SkillAudit及摘要。Release用Wrapper Application方案,按全局产品锁/仓库锁约定交付;仅正式已公证位置做用户可见测试。证书/私钥需独立恢复。
上一阶段详细基线保留于[1.4.3胶片接续原文](research/handoffs/DayuColorFilmStart1.4.3-20261102.md),更早历史见[历史交接](research/handoffs/DayuColorThrough1.4.3-20261102.md)。
历史35/37/38候选未发布;36的已验PKG在新需求到达后移除,未上传。37公证等待中停止了本地等待,保留ID查询,未重新上传相同产物。38正式验收发现FCP默认行为,39已记录实际边界。既有历史发行包与标签保留。1.5完整交接归档见 `research/handoffs/DayuColorThrough1.5.0-20261102.md`。
正式PKG `大鱼调色-1.6.0.pkg`,40833847字节,SHA-256 `13821631b5d54f1b9c1934c513a9cc7e92641208e20219839a63e23865f21cca`;PKG公证 `4716e3c7-8199-4dc1-940c-2376dd647e9b` Accepted,签名、票据、Gatekeeper和20项展开验包通过。发行包未再次运行系统安装器。
最终[Release373](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.6.0-print-looks-20261102) / 附件18已发布并回读确认。标签 `v1.6.0-print-looks-20261102` 对应完整SHA `0cc51149a6f21ebe09465b4fd7130451bedd57bb`;草稿正常浏览器下载与发布后完整下载均校验40,833,847字节及SHA-256一致。发行标签296文件逐字节恢复和full/strict fsck通过,与实际编译SHA的程序源码完全一致。恢复clone、独立构建和下载副本清理完成;已知相关位置仅正式39版APP,历史发行包和私人验收数据保留。记录见 `verification/Release.json`、`ReleaseDraftDownload1.6.0.json`、`PrintLooksReleaseRecovery.json`、`PrintLooksCleanup.json`。
+172
查看文件
@@ -0,0 +1,172 @@
# 大鱼调色主 APP 开发交接
> 2026-11-02接续:主APP UI与自动注册已在1.6.1(44)实现,发布地址置顶、注册成功3秒倒计时、FCP由用户确认,外层沙盒按用户明确要求关闭。登录/授权/加密/更新及后端未实现;本文原接口盘点仍作为后续参考。最新行为见[本轮说明](research/MainApp1.6.1.md),交付状态见verification/Delivery.json与MainApp1.6.1.json。
交接日期:2026-11-02(Asia/Shanghai)。下一阶段目标:优化现有主 APP,加入自动更新、登录验证及相应的账号与版本管理界面。本次只整理交接和只读盘点,尚未实现这些功能,未修改正式 APP、后台源码、账号绑定或线上更新清单。
## 1. 接手位置与可恢复基线
| 项目 | 已核实内容 |
| --- | --- |
| 项目根目录 | `/Volumes/备份/大鱼调色/大鱼调色` |
| 工程与方案 | `大鱼调色.xcodeproj`;`Wrapper Application`,Release |
| 源码远程 | `https://dayu.media/git/dayu/dayu-color.git`,`main`;保持现有可见性 |
| 本次盘点前的已推送节点 | `46fb091479ef24c86c3706bdf36ca97e2597edd9`,已回读远程确认 |
| 正式版本 | **1.6.0(39)**,实际编译源码 `e5affd3f097fc96f87f41be8e1a3f131ed01daeb` |
| 发行标签 | `v1.6.0-print-looks-20261102`,提交 `0cc51149a6f21ebe09465b4fd7130451bedd57bb` |
| 唯一正式安装 | `/Library/Plug-Ins/FxPlug/大鱼调色.app` |
| 外层 APP / 内部服务 ID | `com.dayu.color` / `com.dayu.color.XPC` |
| 环境 | Apple Silicon,macOS 14.6 或更新;上一轮 FCP 12.4 实测通过 |
| 固定构建缓存 | `/Users/mac/Library/Caches/CodexBuilds/com.dayu.color` |
“主 APP”指现有 FxPlug 外层包装 APP。它与嵌套的插件一起交付,后续将这个现有窗口扩展成产品入口。继续保持产品名称、Bundle ID 和正式安装位置,避免另建一个 `/Applications/大鱼调色.app` 与插件包装 APP 并存。
程序源码、标签、安装包与交付记录是不同节点。文档后续提交不会改变上述实际编译 SHA,也不需要仅为本次交接重编译、增加构建号或重新发布安装包。
## 2. 主 APP 当前实际实现
外层是 Objective-C / AppKit,手动内存管理;`main.m` 调用 `NSApplicationMain`,`MainMenu.xib` 创建窗口和代理。窗口内容在 `AppDelegate.m` 中以代码构建,目前为 540×280:产品名、安装说明和“打开 Final Cut Pro”按钮。最后一个窗口关闭后退出 APP。
| 文件入口 | 用途与接手注意点 |
| --- | --- |
| [AppDelegate.m](</Volumes/备份/大鱼调色/大鱼调色/大鱼调色/Wrapper Application/AppDelegate.m>) | 当前完整主窗口;扩展账号、版本、更新和插件状态的直接入口 |
| [main.m](</Volumes/备份/大鱼调色/大鱼调色/大鱼调色/Wrapper Application/main.m>) | APP 启动入口 |
| [MainMenu.xib](</Volumes/备份/大鱼调色/大鱼调色/大鱼调色/Wrapper Application/Base.lproj/MainMenu.xib>) | 主菜单、窗口及 AppDelegate 连线 |
| [APP Info.plist](</Volumes/备份/大鱼调色/大鱼调色/大鱼调色/Wrapper Application/Info.plist>) | 版本 1.6.0 / 39,主 Nib 与身份 |
| [APP entitlements](</Volumes/备份/大鱼调色/大鱼调色/大鱼调色/Wrapper Application/SandboxEntitlements.entitlements>) | 当前仅有 `com.apple.security.app-sandbox = true`;正式安装 APP 实际签名也核对为此配置 |
| [Xcode 工程](/Volumes/备份/大鱼调色/大鱼调色/大鱼调色.xcodeproj/project.pbxproj) | 外层 APP 和 `XPC Service` 两个目标;同时更新它们的身份与版本约定 |
| [插件入口](/Volumes/备份/大鱼调色/大鱼调色/大鱼调色/Plugin/DYPlugIn.mm) | 宿主状态冻结与渲染;当前没有接入账号授权 |
| [插件检查器](/Volumes/备份/大鱼调色/大鱼调色/大鱼调色/Plugin/DYInspector.mm) | 现有调色面板和网站链接;主 APP 的控制中心不应搬走这些调色控件 |
当前未发现产品已有的网络账号服务、Keychain 会话管理、主 APP / XPC 共享授权收据、更新客户端、Sparkle/appcast 配置或自有安装更新助手。不能把已有“更多插件访问 https://dayu.media”链接当作登录接入。
`openHost:` 当前只查找 `com.apple.FinalCut`。后续优化启动与宿主状态识别时,应覆盖打包指南中的四个 FCP/Motion 标识,并处理未安装、运行中和打开失败;不要用模糊应用名启动不明副本。
## 3. 后端现状:已只读查看生产源
2026-11-02 已核对目标共享由 `smbfs` 挂载,生产目录可读:
```text
NAS_SERVER = 192.168.31.21
SMB_SHARE = dayumedia (存储空间1)
NAS_ROOT = /Volumes/dayumedia (存储空间1)/wwwroot/dayu_media
LOCAL_CONTEXT = /Users/mac/Downloads/dayumedia
```
`LOCAL_CONTEXT` 是有范围的专项工作资料,不是完整生产镜像。NAS 的 `AGENTS.md` 保留旧电脑 `/Users/dayu` 路径,执行时按本机全局规则适配,不能照搬旧路径。
本轮只读源码与公开接口形状,没有调用登录/授权接口、创建会话、读取数据库、签名私钥、设备记录或客户凭据。下面是生产源码盘点,**不等同于“大鱼调色”已完成接口联调或已配置专属产品**。
### 通用登录、权限与更新
主要生产文件:
[macos-app-auth.php](</Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/plugins/macos-app-auth/macos-app-auth.php>)
本轮源码 SHA-256:`8a4cb46bf33a88501da5cf48fa4059244dcffb5cfac55c7ecdf66152204cf493`。约 12,518 行;下一次接手重新读取最新生产源,行号只作定位。
| 现有入口 | 本轮源码确认的行为 |
| --- | --- |
| `POST https://dayu.media/wp-json/dayu-app/v1/login/session` | `app_create_login_session`,约 6458 行;接收 `device_uuid`、`app_name`、`client_version`、`client_build`、`client_bundle` 等,返回临时会话、登录 URL、二维码和到期时间;使用现有微信登录 |
| `GET https://dayu.media/wp-json/dayu-app/v1/login/session/{session_key}` | `app_get_login_session`,约 6546 行;通用接口返回状态、说明和到期时间,不能假定这里直接返回访问令牌 |
| `https://dayu.media/wp-admin/admin-ajax.php`,`action=app_device_login` | `app_device_login`,约 510 行;按已绑定的标准 Mac 硬件 UUID 登录,返回账号、token、refresh_token 等;会记录登录及绑定状态,不是无副作用探针 |
| 同一 AJAX 入口,`action=app_refresh_token` | 刷新令牌,约 1490 行;具体请求与失败码接手时重新核对 |
| `POST https://dayu.media/wp-json/dayu-app/v1/access` | `rest_check_access`,约 1440 行;验证 token,结合文章购买/会员查询权限,满足条件可附带签名设备授权 |
| 同一 AJAX 入口,`action=app_check_update` | 约 1181 行;校验登录 token,按应用和 stable 等通道读取更新清单;接受当前版本/构建号,返回是否更新、目标版本/构建、包类型、安装方式、大小和 SHA-256 等 |
| 同一 AJAX 入口,`action=app_download_update` | 约 1272 行;下载对应应用云空间的更新包;认证、重定向及请求参数仍需在下一阶段逐项联调 |
源码中已有 RS256 的 `DAYU-OFFLINE-DEVICE` 凭证:登录得到的 `scope=device_binding` 只表示设备身份;资源授权查询可生成 `scope=app_access`,并包含文章、权限原因、是否永久及到期信息。方法入口约 2200、2379、2413 行。**不能用“已登录”“设备已绑定”或响应中自带的公钥,直接证明拥有本产品使用权。**
通用源码中未发现 `com.dayu.color` / `DayuColor` / `dayu-color` 的字面定义;本轮没有检查数据库中的产品配置或创建专属更新空间,因此不能断言线上已有或没有相应配置。接续时核实稳定的产品标识、文章 ID、授权策略与更新通道,不使用缺省 `default-app`。
### 可参考但不能当作本产品接口的部分
- [dayu-downloader-auth.php](</Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/mu-plugins/dayu-downloader-auth.php>):身份、试用和 `/dayu-downloader/v1/update`。当前硬绑定 `DayuDownie`、`DayuDownie.DayuDownie`、文章 14922 及其更新目录,不能给大鱼调色直接调用。
- [dayu-downloader-licenses.php](</Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/mu-plugins/dayu-downloader-licenses.php>):另一产品的注册码与授权桥接,不继承其试用期、设备限制和商业规则。
- [dayu-template-app-session.php](</Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/mu-plugins/dayu-template-app-session.php>):模板工作区已有 APP 身份换取网站会话的独立实现;不是本产品已完成登录的证据。
- 本机 `/Users/mac/Downloads/dayumedia/permission-fix` 有购买授权修复记录与测试,可参考历史陷阱;使用前先与生产源比较。大鱼 Git 的登录令牌只用于代码仓库,不能打包成普通产品用户的账号凭据。
## 4. 下一阶段的实现拆分
### 主 APP 界面
在现有外层 APP 内组织产品信息、账号状态、更新状态、打开宿主、网站/帮助入口。账号区区分未登录、登录中、已登录但未授权、已授权、到期和离线;更新区区分检查、下载、校验、等待宿主退出、安装及失败。窗口保持可调整、中文信息清楚,技术日志放在单独诊断入口。
可以沿用 AppKit 或评估逐步引入 SwiftUI;本轮未选定 UI 框架、第三方更新库或新最低系统版本。重构时保留 Nib 启动与既有 Objective-C 生命周期,避免只替换窗口而漏掉应用代理或目标成员关系。
### 登录、授权与插件进程
1. 先核实网站产品策略:固定产品名/slug、文章 ID、会员或单独购买条件;由可信配置约束产品与权限对应关系,不接受任意客户端文章 ID 就当作“大鱼调色授权”。
2. 对照现有通用流程实现会话创建、默认浏览器/二维码登录、状态轮询、设备登录、token 刷新和退出。支持过期、取消、网络失败及重复点击;日志不记录临时会话 URL、令牌、完整设备 UUID。
3. 在线 token / refresh token 使用 Keychain。当前 APP 仅有沙盒权限,需按实际联网、Keychain 与跨进程方案配置权限;不要假定现有签名已开放网络访问。
4. APP 和插件是不同进程,外层关闭后 FCP 仍可启动服务。若用户要限制插件使用,需要设计 XPC 也能验证的产品授权收据与状态更新机制;只在主 APP 上挡一个登录页面不足以限制插件。
5. 核实服务器签名凭证的产品、scope、设备、文章、期限和可信公钥合同。客户端只携带验证公钥,私钥留在服务器。响应随附的任意公钥不能自行成为信任根;轮换须有明确的可信路径。
6. 凭据共享方式尚未决定。当前没有 App Group / Keychain Access Group 配置,需要核对外层、服务的实际权限与部署要求,再选共享位置;禁止把长期令牌塞进 MOEF、用户预设或时间线载荷。
7. 网络检查和账号刷新放在渲染之外。帧渲染/跟踪任务只读取已经验证的状态快照,不逐帧联网或等待主 APP 窗口。
### 自动更新
本产品外层 APP 在 `/Library/Plug-Ins/FxPlug`,PKG 还安装用户模板与预览图。先复用完整的正式 PKG 路径设计更新流程,不能只下载 APP 替换而漏掉模板、内部服务登记或旧进程。
实现顺序:检查专属通道 → 比较版本与构建 → 后台下载 → 校验大小/SHA-256 → 核验包签名、团队和预期产品 → 等待宿主与用户任务安全退出 → 通过系统授权安装 → 核对固定路径、版本与 PluginKit → 正常重开并报告结果。客户端自己退出后谁负责完成安装、接收取消/失败结果及重新启动,也需要明确实现。
更新过程中不能强杀 FCP/Motion;沙盒 APP 不应尝试直接静默覆盖 `/Library`。系统安装授权、用户取消、宿主未保存、磁盘不足、断线续传、损坏包、安装失败和重启恢复应有明确状态。先核实当前 macOS 与安装机制的官方文档再实现特权/辅助进程,不因要“自动更新”而取消签名、公证或系统授权。
现有 [Release373](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.6.0-print-looks-20261102) 是发行包归档,不是已接入的 APP 更新源。后台专属更新清单尚未部署。新增 feed 时保持 APP、模板、最终 PKG、网站更新清单与 Git Release 关联同一发布记录;更新清单不能指向另一候选构建。
## 5. 尚待确定的产品规则
这些是后续实际开发前需要确定的业务条件,本交接不替用户决定,也不因此阻止当前文档交付:
- 登录只服务账号与更新,还是也决定插件可否渲染;未登录、到期后新实例和已保存工程分别如何表现。
- 大鱼调色对应的商品文章 ID、产品 slug、会员/单购关系;是否提供试用、试用期限及设备数。
- 离线使用期限、联网复核周期、会员到期、设备解绑、退出账号的生效方式;不得照搬其它产品的永久/24 小时试用策略。
- 自动更新的检查/下载默认设置、稳定或测试通道、是否允许降级;维护主 APP 与插件完整包的一致性。
“到期后把老工程变黑/加水印”或“永远离线放行”都不是用户已经确认的要求,不应在实现时自行加入。
## 6. 必须保留的现有产品行为
完整调色、CST、蜘蛛盘、LUT 浏览、胶片六页(含八种印片)、通道混合器、独立叠层、蒙版与轨迹都继续使用当前实现。不得为账号/更新 UI 重排旧参数 ID、改变 Uniform 布局或清空用户设置。
当前完整 Uniform 为 1312 字节;八印片追加前 1296 字节前缀保留。完整预设 v6 读取 v1–v5,工具状态、LUT 路径、蜘蛛盘与蒙版轨迹另有归档合同。
MOEF 目前为 5.11 / Motion 5.4.5,作者和网站两行已移除,主标题内保留用户要求的可点击网站链接。不要恢复旧版权 Rig。全局技能检查器对 5.11 的版本 guard 不支持,项目级原生样本检查及当前宿主通过;不能把 guard 结果伪造成技能检查通过,也不能为此随意升高模板版本。
自动映射的新 FCP 效果、全部还原及新独立一级层默认开启。FCP 沿用模板默认的旧主效果也会跟随开启;手动关闭可保存并冷重开保持。后续不得再把“修改默认值”当作一定不会改变旧工程的无风险操作。详情见现有 [FxPlug 交接](/Volumes/备份/大鱼调色/大鱼调色/大鱼调色FxPlug4交接.md)。
## 7. 构建、发布与验收入口
| 入口 | 当前作用 |
| --- | --- |
| [tools/deliver.py](/Volumes/备份/大鱼调色/大鱼调色/tools/deliver.py) | Release 构建、逐层签名、公证、票据、唯一安装、正式路径自检和等待宿主验收;验收成功后输入 `complete` |
| [Packaging/build_pkg.py](/Volumes/备份/大鱼调色/大鱼调色/Packaging/build_pkg.py) | 从已验证正式安装生成完整 FxPlug PKG,调用 PKG 工坊签名/公证及展开验包 |
| [Packaging/publish_release.py](/Volumes/备份/大鱼调色/大鱼调色/Packaging/publish_release.py) | 对已推送标签上传最终包,草稿及正式完整下载校验 |
| [tools/build_template.py](/Volumes/备份/大鱼调色/大鱼调色/tools/build_template.py) | 仅在模型确有变更时重新导出参数/模板;变更后同步静态检查和摘要 |
| [tools/checkpoint.py](/Volumes/备份/大鱼调色/大鱼调色/tools/checkpoint.py) | 对已审查的明确文件提交、推送和回读 SHA,使用仓库锁 |
正式身份:`Developer ID Application: zhong luo (B3W25FX5H5)` 与对应 Installer 身份,公证 profile `codex-dayu-notary-B3W25FX5H5`。每次发布重新验证有效性,不复制私钥/账户专用密码。正式 APP 公证 ID `5d74c04c-8a30-47e9-822d-4f616dfdee56`;PKG 公证 ID `4716e3c7-8199-4dc1-940c-2376dd647e9b`,均 Accepted。
当前正式 PKG:`/Volumes/备份/大鱼调色/发行包/大鱼调色-1.6.0.pkg`,40,833,847 字节,SHA-256 `13821631b5d54f1b9c1934c513a9cc7e92641208e20219839a63e23865f21cca`。Release373 / 附件18已完成真实完整下载核对,标签296文件独立恢复通过。当前无 LFS/子模块。
产品交付锁 `/Users/mac/.codex/app-delivery-locks/com.dayu.color.lock` 覆盖最终构建到清理。仓库锁按全局规范使用远程 URL 的 SHA-256。不要在已持有同一把锁时嵌套调用会自行取锁的工具。
后续验收至少覆盖:
- 主 APP:未安装/运行中的宿主、账号所有状态、二维码到期取消、重开恢复、退出与设备解绑,以及窗口缩放与基础无障碍操作。
- 授权:登录但未购买、会员到期、单购、离线与伪造/错产品/错设备凭证;APP 关闭后从 FCP 直接启动插件仍得到正确结果。
- 更新:同版本不同构建、无更新、损坏或错误团队/产品包、下载中断、用户取消安装、宿主未保存、安装失败及完成后正常重开;唯一正式 APP 和模板版本一致。
- 调色回归:既有395项原生检查按变更运行、关键旧预设与轨迹保存、FCP 实际加载和导出;复用136项印片对照结果的前提是相关数学/Metal确实未改变。
- 交付:正式路径的已签名、公证、粘附版本;PKG 验包、Release完整下载;按本轮范围清理生成 APP,保留媒体、用户 LUT/预设和历史发行包。
原有验收证据集中在 [verification](/Volumes/备份/大鱼调色/大鱼调色/verification):`Delivery.json`、`InstalledSelfTest.json`、`HostPrintLooks1.6.0.json`、`HostPrimaryDefaults1.6.0.json`、`Package.json`、`Release.json`、`PrintLooksReleaseRecovery.json`。
## 8. 若需修改线上接口
下一阶段若确有后端改动,先在 `/Users/mac/Downloads/dayumedia` 下确定本专项的最小本地工程,记录 `LOCAL_PROJECT`、`NAS_ROOT` 和文件相对路径映射;比较并保护本地未部署改动,再从生产同步目标文件、保存基线、本地修改和测试。部署前在原文件同目录创建分钟时间戳旁路备份、逐字节核对后才覆盖,最后核对生产文件及实际接口。
本轮没有创建这个后端专项工作副本,没有部署文件,也没有把 NAS 源码或密钥复制进大鱼调色仓库。不要在 SMB 上直接改源码、跑依赖或构建,不上传整份 dayumedia 目录;不要把产品 Git Release 上传误认为网站更新源已经发布。
## 9. 可直接用于下一段聊天的接续说明
> 阅读 `/Volumes/备份/大鱼调色/大鱼调色/大鱼调色主APP开发交接.md` 和现有 FxPlug 交接,从当前正式 1.6.0(39)接续优化现有主 APP,加入自动更新、登录验证和账号/版本界面。先核实生产通用接口与本产品的文章、产品标识、授权范围及离线策略,再实现;保留已有调色、蒙版、跟踪、叠层和低版本 MOEF。保持唯一安装位置和 Bundle ID,按本机规则完成正式交付、宿主验收、PKG Release 与远程备份。主 APP 窗口与插件授权是不同层面,不把登录成功等同于产品使用权,不在渲染回调联网。