fix: replay the last presented scope frame at the clip out point
这个提交包含在:
1 父节点
c791ddcb76
当前提交
98d80970e8
10 个文件已更改
+37
-35
没有与搜索条件相匹配的文件
@@ -214,10 +214,13 @@ 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;
|
||||
CMTime displayTime=_toolTime,frameDuration=kCMTimeInvalid;id<FxCustomParameterActionAPI_v4>action=[self actionAPI];if(_visible&&!_renderer.scopeEnabled&&action){[action startAction:self];@try{
|
||||
displayTime=DYHostDisplayedFrameTime([self rootHost],action.currentTime,&frameDuration);
|
||||
CMTime currentTime=_toolTime,frameDuration=kCMTimeInvalid;BOOL exclusiveEnd=NO;
|
||||
id<FxCustomParameterActionAPI_v4>action=[self actionAPI];if(_visible&&!_renderer.scopeEnabled&&action){[action startAction:self];@try{
|
||||
currentTime=action.currentTime;
|
||||
CMTime displayTime=DYHostDisplayedFrameTime([self rootHost],currentTime,&frameDuration);
|
||||
exclusiveEnd=CMTIME_IS_NUMERIC(currentTime)&&CMTimeCompare(displayTime,currentTime)<0;
|
||||
}@finally{[action endAction:self];}}
|
||||
[_renderer setScopeEnabled:_visible atTime:displayTime frameDuration:frameDuration];if(_editorMode==2)[self ensureBrowser];[self scopeChanged:nil];[self layoutWorkspace];
|
||||
[_renderer setScopeEnabled:_visible atTime:currentTime frameDuration:frameDuration exclusiveEnd:exclusiveEnd];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];}}
|
||||
|
||||
@@ -36,12 +36,6 @@
|
||||
- (NSView*)createViewForParameterID:(UInt32)pid {
|
||||
[self scheduleToolCanvasRegistration];
|
||||
if(pid!=DYInspectorParameterID)return [[NSView alloc]initWithFrame:NSZeroRect];
|
||||
id<FxTimingAPI_v4> timing=[_apiManager apiForProtocol:@protocol(FxTimingAPI_v4)];
|
||||
if([timing respondsToSelector:@selector(timelineFpsNumeratorForEffect:)]&&[timing respondsToSelector:@selector(timelineFpsDenominatorForEffect:)]){
|
||||
NSUInteger numerator=[timing timelineFpsNumeratorForEffect:self],denominator=[timing timelineFpsDenominatorForEffect:self];
|
||||
if(numerator>0&&numerator<=INT32_MAX&&denominator>0&&denominator<=INT64_MAX)
|
||||
[_renderer setScopeProjectFrameDuration:CMTimeMake(denominator,(int32_t)numerator)];
|
||||
}
|
||||
return [[DYInspector alloc]initWithAPIManager:_apiManager renderer:_renderer];
|
||||
}
|
||||
- (BOOL)parameterChanged:(UInt32)pid atTime:(CMTime)t error:(NSError**)e{if(pid==DYToolsParameterID)[self adoptToolCanvasDocument:DYReadTools(_apiManager,t).document];if(pid==DYToolsParameterID||pid==2013||pid==2014||(pid>=2236&&pid<2400)||pid==DYAssetsParameterID)[_renderer invalidatePreview];// Many parameter callbacks arrive in one host transaction. Refresh the native
|
||||
|
||||
+1
-2
@@ -31,9 +31,8 @@
|
||||
/// Conversion/statistics run while visible; retain one small final-output
|
||||
/// sample per instance so opening a paused workspace needs no parameter edit.
|
||||
- (BOOL)scopeEnabled;
|
||||
- (void)setScopeProjectFrameDuration:(CMTime)duration;
|
||||
- (void)setScopeEnabled:(BOOL)enabled;
|
||||
- (void)setScopeEnabled:(BOOL)enabled atTime:(CMTime)time frameDuration:(CMTime)frameDuration;
|
||||
- (void)setScopeEnabled:(BOOL)enabled atTime:(CMTime)time frameDuration:(CMTime)frameDuration exclusiveEnd:(BOOL)exclusiveEnd;
|
||||
/// 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.
|
||||
|
||||
@@ -150,7 +150,8 @@ struct DYScopeReadback {
|
||||
uint64_t _spiderScopeSerial;
|
||||
NSUInteger _scopeGeneration;
|
||||
DYScopeSample *_scopePending,*_scopeLatest;
|
||||
uint64_t _scopeCaptureSerial,_scopeLatestSerial;CMTime _scopeRequestedTime,_scopeRequestedFrameDuration,_scopeProjectFrameDuration;
|
||||
uint64_t _scopeCaptureSerial,_scopeLatestSerial;CMTime _scopeRequestedTime,_scopeRequestedFrameDuration;
|
||||
BOOL _scopeRequestedExclusiveEnd;
|
||||
FxImageTile *_scopeDestination; // borrowed for one locked host render
|
||||
CMTime _scopeRenderTime;
|
||||
BOOL _scopeCaptured;
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
// Included in DYRenderer's implementation; final destination sampling is kept
|
||||
// separate from the earlier input-analysis thumbnail used by auto-grade/LUTs.
|
||||
- (void)setScopeProjectFrameDuration:(CMTime)duration{@synchronized(_previewLock){_scopeProjectFrameDuration=duration;}}
|
||||
- (BOOL)scopeEnabled{@synchronized(_previewLock){return _scopeEnabled;}}
|
||||
- (void)setScopeEnabled:(BOOL)enabled{[self setScopeEnabled:enabled atTime:kCMTimeInvalid frameDuration:kCMTimeInvalid];}
|
||||
- (void)setScopeEnabled:(BOOL)enabled atTime:(CMTime)time frameDuration:(CMTime)frameDuration{
|
||||
- (void)setScopeEnabled:(BOOL)enabled{[self setScopeEnabled:enabled atTime:kCMTimeInvalid frameDuration:kCMTimeInvalid exclusiveEnd:NO];}
|
||||
- (void)setScopeEnabled:(BOOL)enabled atTime:(CMTime)time frameDuration:(CMTime)frameDuration exclusiveEnd:(BOOL)exclusiveEnd{
|
||||
BOOL start=NO;@synchronized(_previewLock){if(_scopeEnabled==enabled)return;_scopeEnabled=enabled;_scopeGeneration++;[_scopePending release];_scopePending=nil;
|
||||
if(enabled){
|
||||
// Viewer output advances at project cadence even when the source is 60p.
|
||||
if(CMTIME_IS_NUMERIC(_scopeProjectFrameDuration)&&_scopeProjectFrameDuration.value>0)frameDuration=_scopeProjectFrameDuration;
|
||||
_scopeRequestedTime=time;_scopeRequestedFrameDuration=frameDuration;[_scopePreview release];_scopePreview=nil;[_scopeMetadata release];_scopeMetadata=nil;
|
||||
_scopeRequestedTime=time;_scopeRequestedFrameDuration=frameDuration;_scopeRequestedExclusiveEnd=exclusiveEnd;[_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;
|
||||
BOOL replay=_scopeLatest&&(!CMTIME_IS_NUMERIC(time)||DYScopeFrameContainsTime(cached,time,frameDuration));
|
||||
os_log(OS_LOG_DEFAULT,"dayu_scope_open requested=%{public}.9f cached=%{public}.9f frame=%{public}.9f replay=%{public}d",CMTimeGetSeconds(time),CMTimeGetSeconds(cached),CMTimeGetSeconds(frameDuration),replay);
|
||||
BOOL replay=_scopeLatest&&(!CMTIME_IS_NUMERIC(time)||DYScopeFrameContainsTime(cached,time,frameDuration,exclusiveEnd));
|
||||
os_log(OS_LOG_DEFAULT,"dayu_scope_open requested=%{public}.9f cached=%{public}.9f frame=%{public}.9f out=%{public}d replay=%{public}d",CMTimeGetSeconds(time),CMTimeGetSeconds(cached),CMTimeGetSeconds(frameDuration),exclusiveEnd,replay);
|
||||
// Reuse this instance's final output when the host is still on that frame.
|
||||
if(replay){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;}}
|
||||
}
|
||||
@@ -123,7 +120,7 @@
|
||||
[_scopeLatest release];_scopeLatest=[sample retain];_scopeLatestSerial=readback.serial;
|
||||
if(_outputObserved&&!_outputNotificationPending){_outputNotificationPending=YES;notifyOutput=YES;}
|
||||
}
|
||||
if(_scopeEnabled&&readback.serial==_scopeLatestSerial&&(readback.generation==_scopeGeneration||!CMTIME_IS_NUMERIC(_scopeRequestedTime)||DYScopeFrameContainsTime(time,_scopeRequestedTime,_scopeRequestedFrameDuration))){
|
||||
if(_scopeEnabled&&readback.serial==_scopeLatestSerial&&(readback.generation==_scopeGeneration||!CMTIME_IS_NUMERIC(_scopeRequestedTime)||DYScopeFrameContainsTime(time,_scopeRequestedTime,_scopeRequestedFrameDuration,_scopeRequestedExclusiveEnd))){
|
||||
sample.generation=_scopeGeneration;[_scopePending release];_scopePending=[sample retain];
|
||||
if(!_scopeWorkerRunning){_scopeWorkerRunning=YES;start=YES;}
|
||||
}
|
||||
|
||||
@@ -10,12 +10,18 @@ static inline CMTime DYScopeDisplayTime(CMTime requested,CMTime start,CMTime dur
|
||||
|
||||
// Custom-view time can land between rendered input frames. A cached frame
|
||||
// covers its own interval only; the next frame boundary must get a fresh sample.
|
||||
static inline bool DYScopeFrameContainsTime(CMTime captured,CMTime requested,CMTime frame){
|
||||
static inline bool DYScopeFrameContainsTime(CMTime captured,CMTime requested,CMTime frame,bool exclusiveEnd){
|
||||
if(!CMTIME_IS_NUMERIC(captured)||!CMTIME_IS_NUMERIC(requested)||captured.epoch!=requested.epoch)return false;
|
||||
int comparison=CMTimeCompare(captured,requested);
|
||||
if(comparison==0)return true;
|
||||
return comparison<0&&CMTIME_IS_NUMERIC(frame)&&frame.value>0&&!frame.epoch&&
|
||||
CMTimeCompare(CMTimeSubtract(requested,captured),frame)<0;
|
||||
if(comparison==0)return !exclusiveEnd;
|
||||
if(comparison>0||!CMTIME_IS_NUMERIC(frame)||frame.value<=0||frame.epoch)return false;
|
||||
CMTime delta=CMTimeSubtract(requested,captured);
|
||||
if(exclusiveEnd){
|
||||
// FCP holds its last presented project frame at the exclusive clip end.
|
||||
// Allow a final project frame as slow as 23.976 even for faster source media.
|
||||
return CMTimeCompare(delta,CMTimeMaximum(frame,CMTimeMake(1001,24000)))<=0;
|
||||
}
|
||||
return CMTimeCompare(delta,frame)<0;
|
||||
}
|
||||
|
||||
#import <FxPlug/FxPlugSDK.h>
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
CMTime end=CMTimeMake(4,1),start=kCMTimeZero,duration=CMTimeMake(100,25),frame=CMTimeMake(1,25);
|
||||
run.record(@"scope-exclusive-clip-end-aligns-to-last-visible-frame",CMTimeCompare(DYScopeDisplayTime(end,start,duration,frame),CMTimeMake(99,25))==0);
|
||||
run.record(@"scope-interior-time-is-never-replaced-by-previous-frame",CMTimeCompare(DYScopeDisplayTime(CMTimeMake(50,25),start,duration,frame),CMTimeMake(50,25))==0);
|
||||
run.record(@"scope-exclusive-end-rejects-older-or-beyond-end-output",
|
||||
!DYScopeFrameContainsTime(CMTimeMake(283,25),CMTimeMake(285,25),CMTimeMake(1,60),true)&&
|
||||
!DYScopeFrameContainsTime(CMTimeMake(285,25),CMTimeMake(285,25),CMTimeMake(1,60),true));
|
||||
run.record(@"scope-after-end-is-not-silently-clamped",CMTimeCompare(DYScopeDisplayTime(CMTimeMake(101,25),start,duration,frame),CMTimeMake(101,25))==0);
|
||||
run.record(@"scope-end-alignment-requires-valid-positive-host-frame",CMTimeCompare(DYScopeDisplayTime(end,start,duration,kCMTimeInvalid),end)==0&&CMTimeCompare(DYScopeDisplayTime(end,start,duration,kCMTimeZero),end)==0);
|
||||
run.record(@"scope-trimmed-input-end-preserves-native-time-origin",CMTimeCompare(DYScopeDisplayTime(CMTimeMake(6,1),CMTimeMake(2,1),duration,frame),CMTimeMake(149,25))==0);
|
||||
@@ -111,12 +114,11 @@
|
||||
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();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 setScopeProjectFrameDuration:CMTimeMake(1,25)];
|
||||
[scopeRenderer setScopeEnabled:YES atTime:CMTimeAdd(CMTimeMake(8,24),CMTimeMake(7,300)) frameDuration:CMTimeMake(1,60)];scopeDeadline=NSProcessInfo.processInfo.systemUptime+5;while(!scopeRenderer.scopeMetadata&&NSProcessInfo.processInfo.systemUptime<scopeDeadline)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.005]];
|
||||
run.record(@"workspace-opening-uses-project-frame-interval-for-a-faster-source",[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) frameDuration:CMTimeMake(1,24)];workspaceDrain();run.record(@"workspace-opening-another-time-never-presents-a-stale-frame",!scopeRenderer.scopeMetadata&&!scopeRenderer.scopePreview);
|
||||
[scopeRenderer setScopeEnabled:YES atTime:CMTimeAdd(CMTimeMake(8,24),CMTimeMake(1,25)) frameDuration:CMTimeMake(1,60) exclusiveEnd:YES];scopeDeadline=NSProcessInfo.processInfo.systemUptime+5;while(!scopeRenderer.scopeMetadata&&NSProcessInfo.processInfo.systemUptime<scopeDeadline)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.005]];
|
||||
run.record(@"workspace-opening-at-exclusive-end-replays-last-presented-project-frame",[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) frameDuration:CMTimeMake(1,24) exclusiveEnd:NO];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) frameDuration:CMTimeMake(1,24)];workspaceDrain();run.record(@"workspace-scope-cache-never-crosses-plugin-instances",!otherScope.scopeMetadata&&!otherScope.scopePreview);
|
||||
DYWorkspaceDiagnosticRenderer *otherScope=[[[DYWorkspaceDiagnosticRenderer alloc]init]autorelease];[otherScope setScopeEnabled:YES atTime:CMTimeMake(9,24) frameDuration:CMTimeMake(1,24) exclusiveEnd:NO];workspaceDrain();run.record(@"workspace-scope-cache-never-crosses-plugin-instances",!otherScope.scopeMetadata&&!otherScope.scopePreview);
|
||||
[otherScope setScopeEnabled:NO];[scopeRenderer setScopeEnabled:NO];
|
||||
|
||||
// The spider reuses the same frame, including when the full scopes are closed.
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.21.1</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>116</string>
|
||||
<string>117</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
<key>PlugInKit</key>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.21.1</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>116</string>
|
||||
<string>117</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
更新于 2026-11-08(Asia/Shanghai)。这是新对话的接手入口。历史设计和实现细节按需查阅专项交接,复现和交付证据以对应版本的报告为准。
|
||||
|
||||
## 1.21.1(116)首次示波器与人脸肤色保护
|
||||
## 1.21.1(117)首次示波器与人脸肤色保护
|
||||
|
||||
用户反馈首次打开控制面板没有波形、人脸相关预览卡顿。控制面板从宿主动作读取当前时间,并优先按项目帧长验证本效果实例最后一次最终输出。缓存时间相同或播放头仍在该帧区间时立即送测量队列,下一帧边界等待对应渲染。参数写入与蜘蛛盘仍用原时间规则。
|
||||
用户反馈首次打开控制面板没有波形、人脸相关预览卡顿。控制面板从宿主动作读取当前时间,并按宿主时间验证本效果实例最后一次最终输出。缓存时间相同或播放头仍在该帧区间时立即送测量队列,下一帧边界等待对应渲染。参数写入与蜘蛛盘仍用原时间规则。
|
||||
|
||||
Skin 的 Vision 轮廓、眼眉嘴排除及强度沿用原算法。Metal 先检查实际轮廓外接范围,外部跳过多边形计算,无覆盖时跳过五官权重;按需读取设备端路径。人脸马赛克仍独立检测每个不同画面的矩形。4K 活跃人脸肤色保护旧版中位 1176.07 ms,其中取样及 Vision 平均 10.73 ms,主要耗时在逐像素轮廓。M4 同一公开人像的 12 帧中位数降至 21.78 ms,1080p 从 308.08 降至 10.07 ms;六组末帧 SHA-256 完全一致。以上是渲染器耗时。
|
||||
|
||||
候选 115 已公证并在 FCP 12.4 实测。片尾请求 11.383333333 秒,实际输出 11.360000000 秒。素材 60p 帧长 16.667 ms 导致仍拒绝缓存,因此候选未发布。116 改用 25p 项目帧长并等待同位置复测,再打包和发布。既有项目文件的 Security 引用排序未纳入本轮。
|
||||
候选 115 已公证并在 FCP 12.4 实测。片尾请求 11.383333333 秒,实际输出 11.360000000 秒。素材 60p 帧长 16.667 ms 导致仍拒绝缓存,因此候选未发布。116 在实际自定视图回调仍收到 60p,亦未发布。117 对已确认的排他出点匹配最后一张实际输出,普通位置仍限制在一帧内。等待同位置复测、打包和发布。既有项目文件的 Security 引用排序未纳入本轮。
|
||||
|
||||
## 1.21.0(114)流畅性优化
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户