From 810bbf4dfb0a05bc2fa66da546ca75b9610985a3 Mon Sep 17 00:00:00 2001 From: mac Date: Fri, 6 Nov 2026 00:34:23 +0800 Subject: [PATCH] Replace legacy automatic stamp keys on the same host analysis frame --- verification/Delivery.json | 11 ++- verification/InstalledSelfTest.json | 82 ++++++++++++++++--- .../Plugin/DYCanvasToolsDiagnostics.inc.h | 11 +++ 大鱼调色/Plugin/DYToolHostMethods.inc.h | 4 +- 大鱼调色/Plugin/DYToolState.h | 2 +- 大鱼调色/Plugin/DYToolState.mm | 8 +- 大鱼调色/Plugin/Info.plist | 2 +- 大鱼调色/Wrapper Application/Info.plist | 2 +- 开发交接.md | 2 +- 9 files changed, 101 insertions(+), 23 deletions(-) diff --git a/verification/Delivery.json b/verification/Delivery.json index 99e450d..9047729 100644 --- a/verification/Delivery.json +++ b/verification/Delivery.json @@ -2,15 +2,14 @@ "status": "verified", "path": "/Library/Plug-Ins/FxPlug/大鱼调色.app", "bundleID": "com.dayu.color", - "version": "1.13.4", - "build": "88", + "version": "1.14.0", + "build": "89", "team": "B3W25FX5H5", - "notaryID": "46ac1ab9-7afe-4b26-826a-b5d80f55bade", + "notaryID": "ef133109-a960-4342-b7a8-b584cba67058", "notaryStatus": "Accepted", "gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID", - "sourceCommit": "7bf1f88fe9c2e9ea79a86791fcc0738550512973", + "sourceCommit": "52a7422004b04a056b37449fdccfe1624b272d1c", "templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef", "templateSHA256": "eaf60224f8d970f8841a03fe0325adc4af73d1c017375b020bcc0e256f0cd803", - "shaderSHA256": "70340ce29720745e568ce1152ca4d73974062dfd12434bd4c308c7cf4ae3a694", - "hostVerification": "verification/HostCloneStampSave1.13.4.json" + "shaderSHA256": "dd5593f8d4e5af7d5513ab5fecdb6f412805672bc052f5447890b9c35de16cb5" } diff --git a/verification/InstalledSelfTest.json b/verification/InstalledSelfTest.json index dcb0b24..f389e64 100644 --- a/verification/InstalledSelfTest.json +++ b/verification/InstalledSelfTest.json @@ -1,6 +1,6 @@ { "bundlePath": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit", - "checks": 870, + "checks": 880, "gpu": "Apple M4", "limitations": [ "Finite states and a 64x48 frame; live FCP discovery, inspector interaction, timeline persistence and real host export require separate acceptance.", @@ -12,7 +12,7 @@ "error": "未提供错误信息", "name": "runtime-directory", "pass": true, - "path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/ED54A780-39CC-4085-8D7D-A69721082035" + "path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/0614368C-D75F-4F92-B2E3-7526453E21FB" }, { "descriptors": 285, @@ -898,7 +898,7 @@ "error": "未提供错误信息", "name": "renderer-export-33cube", "pass": true, - "path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/ED54A780-39CC-4085-8D7D-A69721082035/diagnostic-export.cube" + "path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/0614368C-D75F-4F92-B2E3-7526453E21FB/diagnostic-export.cube" }, { "bytes": 1186074, @@ -918,7 +918,7 @@ }, { "heartbeats": 1, - "maximumGapMS": 60.28899998636916, + "maximumGapMS": 74.15033335564658, "name": "external-activation-main-loop-responsive", "pass": true }, @@ -1389,7 +1389,7 @@ "closePixels": 128, "name": "workspace-offscreen-compact-icons-and-close-render-pixels", "pass": true, - "path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/ED54A780-39CC-4085-8D7D-A69721082035/workspace-topbar.png", + "path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/0614368C-D75F-4F92-B2E3-7526453E21FB/workspace-topbar.png", "toolbarPixels": 3557 }, { @@ -1452,7 +1452,7 @@ }, { "name": "workspace-independent-style-fixture-inserted", - "node": "F12CA97C-DEF5-4681-B6F0-AC16546D13BF", + "node": "AAFC1FE0-C1CC-45D8-BAFE-9B6942D25246", "pass": true, "validDocument": true }, @@ -1461,10 +1461,10 @@ "error": "none", "name": "workspace-independent-style1-writes-target-node-inside-undo", "nodePaths": { - "look0": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/ED54A780-39CC-4085-8D7D-A69721082035/node.cube" + "look0": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/0614368C-D75F-4F92-B2E3-7526453E21FB/node.cube" }, "pass": true, - "rootStyle1": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/ED54A780-39CC-4085-8D7D-A69721082035/user-new.cube", + "rootStyle1": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/0614368C-D75F-4F92-B2E3-7526453E21FB/user-new.cube", "undoStartsAfter": 3, "undoStartsBefore": 2, "written": true @@ -2742,6 +2742,38 @@ "name": "shared-mask-inspector-alias-activates-canvas-and-receives-canonical-status", "pass": true }, + { + "error": "未提供错误信息", + "keys": 6, + "name": "host-clone-stamp-follows-two-independent-centers-and-scales", + "pass": true, + "source": [ + 0.2265399992465973, + 0.5261463522911072, + 0.32, + 0.54 + ], + "sourceScale": [ + 0.8747966289520264, + 0.8752831220626831 + ], + "target": [ + 0.7812566161155701, + 0.48039546608924866 + ], + "targetScale": [ + 1.1745620965957642, + 1.1744060516357422 + ] + }, + { + "name": "host-clone-stamp-restarts-from-current-paired-scale", + "pass": true + }, + { + "name": "host-clone-stamp-source-loss-stops-both-tracks-at-last-paired-frame", + "pass": true + }, { "name": "canvas-cold-load-selects-saved-mask-from-immutable-snapshot", "pass": true @@ -4209,7 +4241,7 @@ { "name": "viewer-real-osc-draws-minimal-curve-on-clear-canvas", "pass": true, - "path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/ED54A780-39CC-4085-8D7D-A69721082035/viewer-workspace.png" + "path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/0614368C-D75F-4F92-B2E3-7526453E21FB/viewer-workspace.png" }, { "name": "canvas-hsl-plot-captures-outside-and-commits-one-undo", @@ -4385,6 +4417,36 @@ "name": "clone-stamp-resize-extends-coverage-with-pixel-exact-translation", "pass": true }, + { + "name": "clone-stamp-interpolates-both-centers-and-coverage-scale", + "pass": true + }, + { + "error": "未提供错误信息", + "name": "clone-stamp-paired-scale-production-render", + "pass": true + }, + { + "name": "clone-stamp-relative-scale-remaps-source-and-expands-target-coverage", + "pass": true + }, + { + "name": "clone-stamp-fractional-zoom-interpolates-adjacent-source-pixels", + "pass": true + }, + { + "error": "未提供错误信息", + "name": "clone-stamp-equal-scale-production-render", + "pass": true + }, + { + "name": "clone-stamp-equal-zoom-preserves-pixel-exact-copy", + "pass": true + }, + { + "name": "clone-stamp-retracking-updates-paired-data-without-overwriting-manual-target", + "pass": true + }, { "error": "未提供错误信息", "name": "clone-stamp-disabled-render", @@ -4399,6 +4461,6 @@ "pass": true } ], - "runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/ED54A780-39CC-4085-8D7D-A69721082035", + "runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/0614368C-D75F-4F92-B2E3-7526453E21FB", "scope": "Native model and renderer integration with real Metal/IOSurface textures and fake FxPlug host selectors; no GUI or live host document." } diff --git a/大鱼调色/Plugin/DYCanvasToolsDiagnostics.inc.h b/大鱼调色/Plugin/DYCanvasToolsDiagnostics.inc.h index dd3d569..dd665d8 100644 --- a/大鱼调色/Plugin/DYCanvasToolsDiagnostics.inc.h +++ b/大鱼调色/Plugin/DYCanvasToolsDiagnostics.inc.h @@ -130,6 +130,17 @@ if(faceFixture.length){ DYMergeTracking(stamp,@[DYStampKey(CMTimeMake(2,50),differentTarget,NO,.9,endMotion)])&& [stamp[@"keys"] count]==1&&DYMaskAtTime(stamp,next).centerY==moved.centerY&& DYStampMotionAtTime(stamp,next).sourceScaleX==1.25f); + CMTime frameDuration=CMTimeMake(1,25),nearStart=CMTimeMake(-1,150),nearEnd=CMTimeMake(7,150); + CMTime previous=CMTimeMake(-1,25),following=CMTimeMake(2,25),authored=CMTimeMake(1,150); + stamp[@"keys"]=@[DYMaskKey(previous,p,NO,1),DYMaskKey(nearStart,p,NO,1), + DYMaskKey(authored,p,YES,1),DYMaskKey(nearEnd,p,NO,1),DYMaskKey(following,p,NO,1)]; + NSArray *pairKeys=@[DYStampKey(kCMTimeZero,p,NO,1,startMotion),DYStampKey(next,moved,NO,1,endMotion)]; + BOOL merged=DYMergeTracking(stamp,pairKeys,frameDuration); + NSArray *mergedKeys=stamp[@"keys"]; + run.record(@"clone-stamp-replaces-same-frame-automatic-keys-from-offset-host-clock", + merged&&mergedKeys.count==5&&[mergedKeys[0] isEqual:DYMaskKey(previous,p,NO,1)]&& + [mergedKeys[1] isEqual:pairKeys[0]]&&[mergedKeys[2] isEqual:DYMaskKey(authored,p,YES,1)]&& + [mergedKeys[3] isEqual:pairKeys[1]]&&[mergedKeys[4] isEqual:DYMaskKey(following,p,NO,1)]); stamp[@"enabled"]=@NO;Pixels disabled=frame(next,@"clone-stamp-disabled-render"); run.record(@"clone-stamp-disabled-is-identical",difference(disabled,baseline).maximum==0); stamp[@"enabled"]=@YES;NSError *failure=nil; diff --git a/大鱼调色/Plugin/DYToolHostMethods.inc.h b/大鱼调色/Plugin/DYToolHostMethods.inc.h index 620b3f9..dd130b8 100644 --- a/大鱼调色/Plugin/DYToolHostMethods.inc.h +++ b/大鱼调色/Plugin/DYToolHostMethods.inc.h @@ -62,7 +62,7 @@ if(selection){ [NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:self->_apiManager]; [NSNotificationCenter.defaultCenter postNotificationName:@"DYToolCanvasSelection" object:self->_apiManager userInfo:selection]; - [self postToolCanvasStatus:@"仿制图章已保存 · 可跟踪目标区域"]; + [self postToolCanvasStatus:@"仿制图章已保存 · 可跟踪取样与覆盖区域"]; }else [self postToolCanvasStatus:failure]; completion(failure); }); @@ -191,7 +191,7 @@ }@finally{_trackingInFrame.store(false);} } - (BOOL)cleanupAnalysis:(NSError**)error { - if(!_trackingActive.load()||_trackingFinishing.exchange(true))return YES;BOOL changed=_trackingSamples.count>1;if(changed&&!DYMergeTracking(_trackingCandidate,_trackingSamples)){[_trackingMessage release];_trackingMessage=[@"轨迹合并失败,原蒙版已保留" copy];_trackingDiscard=YES;} + if(!_trackingActive.load()||_trackingFinishing.exchange(true))return YES;BOOL changed=_trackingSamples.count>1;if(changed&&!DYMergeTracking(_trackingCandidate,_trackingSamples,_trackingFrameDuration)){[_trackingMessage release];_trackingMessage=[@"轨迹合并失败,原蒙版已保留" copy];_trackingDiscard=YES;} _toolTracker.stop(); if(_trackingStampMotion.active)_stampSourceTracker.stop(); uint64_t generation=_trackingGeneration;BOOL second=_trackingBoth&&!_trackingBackward&&!_trackingCancelled.load()&&!_trackingDiscard; diff --git a/大鱼调色/Plugin/DYToolState.h b/大鱼调色/Plugin/DYToolState.h index c232838..1d77201 100644 --- a/大鱼调色/Plugin/DYToolState.h +++ b/大鱼调色/Plugin/DYToolState.h @@ -54,7 +54,7 @@ DYStampMotion DYStampMotionAtTime(NSDictionary *stamp,CMTime time); NSArray *DYStampSourceAtTime(NSDictionary *stamp,CMTime time); NSArray *DYStampSamplingScaleAtTime(NSDictionary *stamp,CMTime time); NSDictionary *DYStampKey(CMTime time,DYMaskParameters parameters,BOOL manual,float confidence,DYStampMotion motion); -BOOL DYMergeTracking(NSMutableDictionary *mask,NSArray *samples); +BOOL DYMergeTracking(NSMutableDictionary *mask,NSArray *samples,CMTime frameDuration=kCMTimeInvalid); NSDictionary *DYToolRenderSnapshot(NSDictionary *document,CMTime time); DYUniforms DYToolUniforms(NSDictionary *node); BOOL DYToolIsNeutral(NSDictionary *node); diff --git a/大鱼调色/Plugin/DYToolState.mm b/大鱼调色/Plugin/DYToolState.mm index 84df0b2..c83cc7c 100644 --- a/大鱼调色/Plugin/DYToolState.mm +++ b/大鱼调色/Plugin/DYToolState.mm @@ -251,12 +251,18 @@ NSDictionary *DYStampKey(CMTime time,DYMaskParameters p,BOOL manual,float confid @(motion.sourceScaleY),@(motion.targetScaleX),@(motion.targetScaleY)]; return paired; } -BOOL DYMergeTracking(NSMutableDictionary *m,NSArray *samples){ +BOOL DYMergeTracking(NSMutableDictionary *m,NSArray *samples,CMTime frameDuration){ if(!samples.count)return YES; NSMutableArray *all=[NSMutableArray array]; NSMutableDictionary *manualByTime=[NSMutableDictionary dictionary]; CMTime lo=keyTime(samples.firstObject),hi=keyTime(samples.lastObject); if(CMTimeCompare(lo,hi)>0)std::swap(lo,hi); + if(m[@"stampSource"]&&CMTIME_IS_NUMERIC(frameDuration)&&frameDuration.value>0){ + // FCP can shift analysis timestamps by a fraction of a frame between passes. + // Replace an older automatic key belonging to the first or last new frame. + CMTime half=CMTimeMultiplyByRatio(frameDuration,1,2); + lo=CMTimeSubtract(lo,half);hi=CMTimeAdd(hi,half); + } // Normalize equivalent time fractions when preserving authored keys. auto timeID=[](NSDictionary *key){ CMTime time=keyTime(key); diff --git a/大鱼调色/Plugin/Info.plist b/大鱼调色/Plugin/Info.plist index 7cfad3d..ba5a166 100644 --- a/大鱼调色/Plugin/Info.plist +++ b/大鱼调色/Plugin/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.14.0 CFBundleVersion - 89 + 90 NSHumanReadableCopyright PlugInKit diff --git a/大鱼调色/Wrapper Application/Info.plist b/大鱼调色/Wrapper Application/Info.plist index c83c02c..59e78a0 100644 --- a/大鱼调色/Wrapper Application/Info.plist +++ b/大鱼调色/Wrapper Application/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.14.0 CFBundleVersion - 89 + 90 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NSHumanReadableCopyright diff --git a/开发交接.md b/开发交接.md index 0f0059e..edc81a0 100644 --- a/开发交接.md +++ b/开发交接.md @@ -17,7 +17,7 @@ - 用户在 1.13.4 的实拍工程中确认图章可落位、拖动,随后要求取样点和覆盖目标都参与跟踪并识别缩放。 - 两个区域各自使用同一宿主源帧运行 OpenCV 分析。写入的每个轨迹键同时记录两点的位置与缩放。任一侧跟丢时,提交本次最后一段两侧均可信的连续轨迹。普通蒙版沿用原分析。旧图章单点轨迹仍按位移求值,可重新跟踪以获得双点数据。 - 覆盖圈随覆盖区域缩放。渲染按取样区域和覆盖区域的相对缩放映射当前帧的源像素,两侧缩放相同时保留整数像素平移。调大或调小覆盖范围仍可独立操作。清除轨迹时将当前帧的图章外观保留为静态值。 -- 实现已接入轨迹序列化、画布和 Metal。编译、宿主及安装包核验待完成。 +- 89 版在 FCP 12.4 实拍素材上完成正向和双向跟踪。双向导出得到 257 个连续双点键,并发现片尾一个原有自动键与最后的新键只差 6.33 毫秒。90 版按半帧识别同帧自动键,在分析范围边缘替换旧键,同时保留手工编辑和分析范围之外的轨迹。90 版交付待验。 ## 1.13.1 等像素复制与取样十字拖动