fix: replay cached final-output scopes when opening a paused workspace
这个提交包含在:
1 父节点
411900b928
当前提交
b8a003970a
9 个文件已更改
+49
-17
没有与搜索条件相匹配的文件
@@ -11,3 +11,5 @@
|
||||
需要macOS14.6或更高、Apple Silicon Mac、Final Cut Pro或Motion。工作区是宿主托管的可调整远程窗口;公开FxPlug接口未提供原生停靠到FCP检视器。空间蒙版/畸变可用完整预设保存,静态Cube无法保存这些空间处理。
|
||||
|
||||
蜘蛛盘采用左盘面、右参数布局;调整与蒙版参数按窄条高度横向分列。选择风格LUT图层直接显示原有浏览器,点击图层的蒙版符号进入编辑、跟踪与共享关联,取消独立LUT/蒙版标签。修复钢笔闭合写回前露出默认矩形的问题,并合并同一批参数变化触发的检视器刷新。切换片段/重开检视器的现场空白对应宿主PluginNotFound,构建流程避免在用户验收时重新登记临时APP;正式宿主稳定性结论以该候选实际复验记录为准。
|
||||
|
||||
示波器打开时直接使用当前插件实例、同一宿主时刻的最近实际输出采样,避免暂停画面下持续等待;关闭期间只保留320×180轻量副本,不执行颜色转换或统计。蒙版数值支持直接输入,默认窄条完整展示矩形参数与跟踪按钮。
|
||||
@@ -68,3 +68,7 @@ OpenCV4.5.1由官方锁定源码静态构建并随包保留全部许可,宿主
|
||||
75(编译0ef847f、公证6a271e18-727a-45b6-972d-fcf2d2155d36)正式安装813项检查通过。FCP冷启动后主检视器成功加载;实测添加曲线2、方形四通道曲线与直方图、左盘右参数的蜘蛛盘、真实四宫格采样;同一矩形关联曲线2/蜘蛛盘/HSL,主检视器同步显示各自蒙版数量;添加风格LUT2直接显示现有58项库,真实缩略图与tlfs载入成功,四宫格持续显示。
|
||||
|
||||
实窗发现默认蒙版编辑区内跟踪按钮右半部分需要横滚,且蒙版数字框替换cell后未显式启用editable,AX表现为静态文字。76把标量列收窄到184点、缩减模块关联栏、移除多余文档空宽,使默认1440×360下矩形编辑与跟踪全部可见;数字框明确可输入并拒绝非数字。示波器图像增加可访问元素及标题,工作区数字框/滑条使用平面中性色,LUT扫描结束恢复“返回调整”按钮。75保留为可恢复候选,76仍需重新签名公证与正式宿主验收。画布钢笔真实鼠标闭合和重复切换仍未确认,不把尝试点击写成通过。
|
||||
|
||||
### 暂停帧打开时示波器等待
|
||||
|
||||
用户在75冷重开后看到四宫格持续等待。75只有面板开启后的新render才采样,打开面板清空数据,宿主沿用已有画面时不会产生scope输入;本轮实测修改蜘蛛盘混合后可立即获得四图,是同一故障路径的证据。76改为每个实例只保留最近一次成功render的320×180浮点最终输出副本(不足1MiB);关闭时不执行ICC、统计或绘图,打开时仅重放同一实例/精确宿主CMTime的真实样本。隐藏态不读回4K、不伪造输入直方图为最终输出;序号防止并发旧回调覆盖较新样本,开关代次阻止过期发布,异时缓存不展示。需正式宿主验证冷开暂停帧、重新打开、播放更新及切片隔离。
|
||||
@@ -1,22 +1,26 @@
|
||||
{
|
||||
"date": "2026-11-05T01:56:52.024898+00:00",
|
||||
"date": "2026-11-05T02:22:40.436257+00:00",
|
||||
"status": "native-preflight-passed-formal-delivery-pending",
|
||||
"version": "1.12.0",
|
||||
"build": "75",
|
||||
"checks": 812,
|
||||
"build": "76",
|
||||
"checks": 820,
|
||||
"passed": true,
|
||||
"reportSHA256": "bb8b81679e037d86784a459f374c9ba40d25ae8350d1ac6ec345cb06d7b50d98",
|
||||
"reportSHA256": "e968414508f425e26d8addb395ae24bc670fa0b879d77b75204d45d2c3df659d",
|
||||
"scope": [
|
||||
"Offscreen AppKit fixtures, no test window presented.",
|
||||
"Horizontal module and six mask layouts at minimum strip height.",
|
||||
"Permanent four plots and real scope worker rasters.",
|
||||
"Layer-driven LUT/mask navigation, UUID isolation and shared assignments.",
|
||||
"Shared three-node pen path before and after authoritative write.",
|
||||
"Deferred coalesced model refresh and repeated inspector/remote recreation."
|
||||
"Deferred coalesced model refresh and repeated inspector/remote recreation.",
|
||||
"Only one 320x180 real final-output sample retained while hidden; no ICC/statistics processing.",
|
||||
"Paused-frame open replays exact-time cache; mismatched time and another instance rejected.",
|
||||
"Default wide mask strip shows entire tracking area and numeric fields are editable.",
|
||||
"All four scope images expose accessible titles."
|
||||
],
|
||||
"remaining": [
|
||||
"Final signed candidate must repeat preflight after the added background-reply session check.",
|
||||
"Formal FCP switching/reopening and drawing acceptance.",
|
||||
"Signed formal installation and FCP cold-open/reopen/playing output checks.",
|
||||
"Formal canvas closure and repeated clip/inspector switching.",
|
||||
"Original same-video full tracking trajectory comparison."
|
||||
],
|
||||
"buildIsolation": "XPC-only scheme does not execute RegisterWithLaunchServices; PluginKit retains one formal installed path.",
|
||||
|
||||
@@ -181,7 +181,7 @@ static BOOL DYWorkspaceEnabled(DYUniforms u,NSString *type){if([type isEqual:@"b
|
||||
}
|
||||
- (void)pageChanged:(id)sender{
|
||||
if(_editorMode==2)[self bindLUTTarget];_scopePane.hidden=NO;_lutPane.hidden=_editorMode!=2;_lutExplanation.hidden=YES;_toolEditor.hidden=_editorMode!=0;_maskPane.hidden=_editorMode!=1;_selectionTitle.hidden=_editorMode==2;
|
||||
[_renderer setScopeEnabled:_visible];if(_editorMode==2)[self ensureBrowser];[self scopeChanged:nil];[self layoutWorkspace];
|
||||
[_renderer setScopeEnabled:_visible atTime:_toolTime];if(_editorMode==2)[self ensureBrowser];[self scopeChanged:nil];[self layoutWorkspace];
|
||||
}
|
||||
- (void)toggleHostScopes:(id)sender{
|
||||
id<FxCustomParameterActionAPI_v4> action=[self actionAPI];NSError *error=nil;BOOL done=NO;if(action){[action startAction:self];@try{id<FxCommandAPI> commands=[_manager apiForProtocol:@protocol(FxCommandAPI)];done=[commands performCommand:kFxCommand_ToggleWaveforms error:&error];}@finally{[action endAction:self];}}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#import "DYScopeSample.h"
|
||||
#import "DYHistogram.h"
|
||||
#include "DYFilmMath.h"
|
||||
#include "DYFilmTime.h"
|
||||
|
||||
+3
-1
@@ -20,8 +20,10 @@
|
||||
/// Analysis preview retains the host texture's original row order separately.
|
||||
- (NSData*)lookLUTPreview;
|
||||
- (void)invalidatePreview;
|
||||
/// Final-output scopes run only while the auxiliary workspace is visible.
|
||||
/// Conversion/statistics run while visible; retain one small final-output
|
||||
/// sample per instance so opening a paused workspace needs no parameter edit.
|
||||
- (void)setScopeEnabled:(BOOL)enabled;
|
||||
- (void)setScopeEnabled:(BOOL)enabled atTime:(CMTime)time;
|
||||
/// Call after the final destination render succeeds, while the tile is valid.
|
||||
/// Only the small GPU readback waits here; conversion/statistics are coalesced
|
||||
/// on a worker. No main-queue wait or host API is performed by this method.
|
||||
|
||||
@@ -119,7 +119,8 @@ static NSArray *DYPrimaryActiveFinishing(DYUniforms u,NSDictionary *paths,NSData
|
||||
dispatch_queue_t _scopeQueue;
|
||||
BOOL _scopeEnabled,_scopeWorkerRunning;
|
||||
NSUInteger _scopeGeneration;
|
||||
DYScopeSample *_scopePending;
|
||||
DYScopeSample *_scopePending,*_scopeLatest;
|
||||
uint64_t _scopeCaptureSerial,_scopeLatestSerial;CMTime _scopeRequestedTime;
|
||||
NSData *_scopePreview;
|
||||
NSDictionary *_scopeMetadata;
|
||||
DYColorProfile *_scopeProfile;
|
||||
@@ -133,7 +134,7 @@ static NSArray *DYPrimaryActiveFinishing(DYUniforms u,NSDictionary *paths,NSData
|
||||
#include "DYFaceRender.inc.h"
|
||||
#include "DYToolRender.inc.h"
|
||||
- (instancetype)init{if((self=[super init])){_previewLock=[NSObject new];_scopeQueue=dispatch_queue_create("com.dayu.color.final-output-scopes",DISPATCH_QUEUE_SERIAL);_devices=[NSMutableDictionary new];_luts=[NSMutableDictionary new];_preparedLUTs=[NSMutableDictionary new];_activeLUTPaths=[NSSet new];_lutPreparationQueue=dispatch_queue_create("com.dayu.color.lut-upload",DISPATCH_QUEUE_SERIAL);dispatch_set_target_queue(_lutPreparationQueue,dispatch_get_global_queue(QOS_CLASS_USER_INITIATED,0));_tables=[DYColorTables new];}return self;}
|
||||
- (void)dealloc{[_faceEntries release];[_faceInput release];[_faceCachedEntries release];[_faceContext release];[_scopePending release];[_scopePreview release];[_scopeMetadata release];[_scopeProfile release];dispatch_release(_scopeQueue);[_devices release];[_luts release];[_preparedLUTs release];[_activeLUTPaths release];dispatch_release(_lutPreparationQueue);[_tables release];[_preview release];[_lookLUTPreview release];[_histogram release];[_colorContext release];[_previewLock release];[super dealloc];}
|
||||
- (void)dealloc{[_faceEntries release];[_faceInput release];[_faceCachedEntries release];[_faceContext release];[_scopePending release];[_scopeLatest release];[_scopePreview release];[_scopeMetadata release];[_scopeProfile release];dispatch_release(_scopeQueue);[_devices release];[_luts release];[_preparedLUTs release];[_activeLUTPaths release];dispatch_release(_lutPreparationQueue);[_tables release];[_preview release];[_lookLUTPreview release];[_histogram release];[_colorContext release];[_previewLock release];[super dealloc];}
|
||||
- (void)trimPreparedLUTsKeeping:(NSString *)path {
|
||||
if(_preparedLUTs.count<=12)return;
|
||||
for(NSString *key in _preparedLUTs.allKeys)if(![_activeLUTPaths containsObject:key]&&![key isEqualToString:path])[_preparedLUTs removeObjectForKey:key];
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
// Included in DYRenderer's implementation; final destination sampling is kept
|
||||
// separate from the earlier input-analysis thumbnail used by auto-grade/LUTs.
|
||||
- (void)setScopeEnabled:(BOOL)enabled{
|
||||
@synchronized(_previewLock){if(_scopeEnabled==enabled)return;_scopeEnabled=enabled;_scopeGeneration++;[_scopePending release];_scopePending=nil;if(enabled){[_scopePreview release];_scopePreview=nil;[_scopeMetadata release];_scopeMetadata=nil;}}
|
||||
- (void)setScopeEnabled:(BOOL)enabled{[self setScopeEnabled:enabled atTime:kCMTimeInvalid];}
|
||||
- (void)setScopeEnabled:(BOOL)enabled atTime:(CMTime)time{
|
||||
BOOL start=NO;@synchronized(_previewLock){if(_scopeEnabled==enabled)return;_scopeEnabled=enabled;_scopeGeneration++;[_scopePending release];_scopePending=nil;
|
||||
if(enabled){_scopeRequestedTime=time;[_scopePreview release];_scopePreview=nil;[_scopeMetadata release];_scopeMetadata=nil;
|
||||
CMTime cached=_scopeLatest?CMTimeMakeWithEpoch([_scopeLatest.metadata[@"timeValue"]longLongValue],[_scopeLatest.metadata[@"timeScale"]intValue],[_scopeLatest.metadata[@"timeEpoch"]longLongValue]):kCMTimeInvalid;
|
||||
// Replay only this instance's actual final output at the requested host time.
|
||||
// A panel opening must not require a parameter mutation or a fresh render.
|
||||
if(_scopeLatest&&(!CMTIME_IS_NUMERIC(time)||(CMTIME_IS_NUMERIC(cached)&&CMTimeCompare(cached,time)==0))){DYScopeSample *sample=[DYScopeSample new];sample.pixels=_scopeLatest.pixels;sample.space=_scopeLatest.space;sample.metadata=_scopeLatest.metadata;sample.generation=_scopeGeneration;_scopePending=sample;if(!_scopeWorkerRunning){_scopeWorkerRunning=YES;start=YES;}}
|
||||
}
|
||||
}
|
||||
if(start)dispatch_async(_scopeQueue,^{[self processPendingScopeSamples];});
|
||||
}
|
||||
- (NSData *)scopePreview{@synchronized(_previewLock){return [[_scopePreview retain]autorelease];}}
|
||||
- (NSDictionary *)scopeMetadata{@synchronized(_previewLock){return [[_scopeMetadata retain]autorelease];}}
|
||||
- (void)captureScopeTile:(FxImageTile *)tile atTime:(CMTime)time{
|
||||
NSUInteger generation;@synchronized(_previewLock){if(!_scopeEnabled||_exporting||!tile)return;generation=_scopeGeneration;}
|
||||
NSUInteger generation;uint64_t serial;@synchronized(_previewLock){if(_exporting||!tile)return;generation=_scopeGeneration;serial=++_scopeCaptureSerial;}
|
||||
@autoreleasepool{@try{
|
||||
NSDictionary *entry=nil,*context=nil;@synchronized(self){entry=[[self device:tile.deviceRegistryID error:nil]retain];context=[_colorContext copy];}
|
||||
id<MTLDevice>device=entry[@"device"];id<MTLTexture>texture=[tile metalTextureForDevice:device];
|
||||
@@ -24,15 +33,16 @@
|
||||
DYScopeSample *sample=[DYScopeSample new];sample.pixels=[NSData dataWithBytes:buffer.contents length:buffer.length];sample.generation=generation;
|
||||
CGColorSpaceRef sourceSpace=DYManagedTileSpace(tile,[context[@"primaries"]integerValue]);sample.space=sourceSpace;if(sourceSpace)CGColorSpaceRelease(sourceSpace);
|
||||
FxRect bounds=tile.tilePixelBounds,image=tile.imagePixelBounds;BOOL whole=bounds.left==image.left&&bounds.right==image.right&&bounds.top==image.top&&bounds.bottom==image.bottom;
|
||||
sample.metadata=@{@"time":@(CMTimeGetSeconds(time)),@"timeValue":@(time.value),@"timeScale":@(time.timescale),@"source":context[@"destination"]?:@"宿主 RGB",@"wholeImage":@(whole),@"region":whole?@"整帧取样":@"仅当前宿主输出分块",@"width":@(dyscope::Width),@"height":@(dyscope::Height)};
|
||||
sample.metadata=@{@"time":@(CMTimeGetSeconds(time)),@"timeValue":@(time.value),@"timeScale":@(time.timescale),@"timeEpoch":@(time.epoch),@"source":context[@"destination"]?:@"宿主 RGB",@"wholeImage":@(whole),@"region":whole?@"整帧取样":@"仅当前宿主输出分块",@"width":@(dyscope::Width),@"height":@(dyscope::Height)};
|
||||
[buffer release];[entry release];[context release];
|
||||
BOOL start=NO;@synchronized(_previewLock){if(_scopeEnabled&&generation==_scopeGeneration){[_scopePending release];_scopePending=[sample retain];if(!_scopeWorkerRunning){_scopeWorkerRunning=YES;start=YES;}}}[sample release];
|
||||
BOOL start=NO;@synchronized(_previewLock){if(serial>=_scopeLatestSerial){[_scopeLatest release];_scopeLatest=[sample retain];_scopeLatestSerial=serial;}if(_scopeEnabled&&serial==_scopeLatestSerial&&(generation==_scopeGeneration||!CMTIME_IS_NUMERIC(_scopeRequestedTime)||CMTimeCompare(time,_scopeRequestedTime)==0)){sample.generation=_scopeGeneration;[_scopePending release];_scopePending=[sample retain];if(!_scopeWorkerRunning){_scopeWorkerRunning=YES;start=YES;}}}[sample release];
|
||||
if(start)dispatch_async(_scopeQueue,^{[self processPendingScopeSamples];});
|
||||
}@catch(NSException *exception){/* Scope diagnostics must never fail rendering. */}}
|
||||
}
|
||||
- (void)processPendingScopeSamples{
|
||||
for(;;){@autoreleasepool{
|
||||
DYScopeSample *sample=nil;@synchronized(_previewLock){sample=_scopePending;_scopePending=nil;if(!sample){_scopeWorkerRunning=NO;return;}}
|
||||
@synchronized(_previewLock){if(!_scopeEnabled||sample.generation!=_scopeGeneration){[sample release];continue;}}
|
||||
const auto *raw=(const dyscope::RGBA*)sample.pixels.bytes;size_t count=sample.pixels.length/sizeof(dyscope::RGBA);std::vector<DYCompositeRGBA> pixels(count);uint64_t invalid=0;
|
||||
for(size_t i=0;i<count;i++){
|
||||
const auto&p=raw[i];BOOL finite=std::isfinite(p.r)&&std::isfinite(p.g)&&std::isfinite(p.b)&&std::isfinite(p.a);
|
||||
|
||||
@@ -62,7 +62,15 @@
|
||||
NSDictionary *scopeData=scopeRenderer.scopeMetadata;NSData *finalPreview=scopeRenderer.scopePreview;const float *finalSample=(const float*)finalPreview.bytes;
|
||||
run.record(@"workspace-final-output-sample-unpremultiplies-and-converts-real-icc",[scopeData[@"converted"]boolValue]&&[scopeData[@"valid"]unsignedIntegerValue]==320*180&&finalPreview.length==320*180*16&&fabs(finalSample[0]-.537099)<.003&&fabs(finalSample[1]-.735357)<.003&&fabs(finalSample[2]-.880825)<.003&&finalSample[3]==.5f);
|
||||
run.record(@"workspace-final-output-worker-publishes-real-scope-rasters",[scopeData[@"waveform"]length]==320*256*4&&[scopeData[@"parade"]length]==3*320*256*4&&[scopeData[@"histogram"]length]==4*256*4&&[scopeData[@"vectorscope"]length]==256*256*4&&[scopeData[@"wholeImage"]boolValue]);
|
||||
[scopeRenderer setScopeEnabled:NO];[scopeRenderer captureScopeTile:finalTile atTime:CMTimeMake(8,24)];workspaceDrain();run.record(@"workspace-hidden-scope-capture-does-no-work",[scopeRenderer.scopeMetadata isEqual:scopeData]);
|
||||
[scopeRenderer setScopeEnabled:NO];[scopeRenderer captureScopeTile:finalTile atTime:CMTimeMake(8,24)];workspaceDrain();DYScopeSample *hiddenSample=[scopeRenderer valueForKey:@"scopeLatest"];
|
||||
run.record(@"workspace-hidden-scope-retains-only-one-small-final-sample-without-processing",[scopeRenderer.scopeMetadata isEqual:scopeData]&&hiddenSample.pixels.length==320*180*16&&[hiddenSample.metadata[@"timeValue"]longLongValue]==8&&![scopeRenderer valueForKey:@"scopePending"]);
|
||||
[scopeRenderer setScopeEnabled:YES atTime:CMTimeMake(8,24)];scopeDeadline=NSProcessInfo.processInfo.systemUptime+5;while(!scopeRenderer.scopeMetadata&&NSProcessInfo.processInfo.systemUptime<scopeDeadline)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.005]];
|
||||
run.record(@"workspace-opening-paused-frame-replays-cached-final-output-without-render-or-parameter-edit",[scopeRenderer.scopeMetadata[@"timeValue"]longLongValue]==8&&scopeRenderer.scopePreview.length==320*180*16&&[scopeRenderer.scopeMetadata[@"vectorscope"]length]==256*256*4);
|
||||
[scopeRenderer setScopeEnabled:NO];[scopeRenderer setScopeEnabled:YES atTime:CMTimeMake(9,24)];workspaceDrain();run.record(@"workspace-opening-another-time-never-presents-a-stale-frame",!scopeRenderer.scopeMetadata&&!scopeRenderer.scopePreview);
|
||||
[scopeRenderer captureScopeTile:finalTile atTime:CMTimeMake(9,24)];scopeDeadline=NSProcessInfo.processInfo.systemUptime+5;while(!scopeRenderer.scopeMetadata&&NSProcessInfo.processInfo.systemUptime<scopeDeadline)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.005]];run.record(@"workspace-new-live-frame-replaces-rejected-cache",[scopeRenderer.scopeMetadata[@"timeValue"]longLongValue]==9);
|
||||
DYWorkspaceDiagnosticRenderer *otherScope=[[[DYWorkspaceDiagnosticRenderer alloc]init]autorelease];[otherScope setScopeEnabled:YES atTime:CMTimeMake(9,24)];workspaceDrain();run.record(@"workspace-scope-cache-never-crosses-plugin-instances",!otherScope.scopeMetadata&&!otherScope.scopePreview);
|
||||
[otherScope setScopeEnabled:NO];[scopeRenderer setScopeEnabled:NO];
|
||||
|
||||
}
|
||||
// Exercise the new stack workspace against the same authoritative host document
|
||||
// as the regular inspector. Every view stays in an unpresented native fixture.
|
||||
|
||||
在新工单中引用
屏蔽一个用户