修复 Rec.709 曲线直方图的线性电平偏移
这个提交包含在:
1 父节点
d91f1b176b
当前提交
7f2917393c
8 个文件已更改
+46
-13
没有与搜索条件相匹配的文件
@@ -70,6 +70,11 @@
|
||||
BOOL totals=YES;for(int c=0;c<4;c++){uint32_t total=0;for(int b=0;b<256;b++)total+=h->bins[c][b];totals&=total==6;}
|
||||
run.record(@"histogram-each-channel-conserves-valid-samples",totals);
|
||||
run.record(@"histogram-malformed-and-empty-safe",!DYHistogramFromRGBA([NSData dataWithBytes:pixels length:3])&&((const DYHistogram*)DYHistogramFromRGBA([NSData data]).bytes)->samples==0);
|
||||
const float premultipliedGrey[]={.09f,.09f,.09f,.5f};
|
||||
NSData *grey=[NSData dataWithBytes:premultipliedGrey length:sizeof(premultipliedGrey)];
|
||||
NSData *greyLevels=DYHistogramFromRGBA(grey,true,true);
|
||||
const auto *video=(const DYHistogram*)greyLevels.bytes;
|
||||
run.record(@"histogram-encodes-straight-linear-grey-as-rec709-signal",video->rec709VideoLevels&&video->samples==1&&video->bins[0][104]==1&&video->bins[1][104]==1);
|
||||
DYDiagnosticManager *host=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(host,nil);DYRenderer *renderer=[[[DYRenderer alloc]init]autorelease];
|
||||
DYScopeSample *sample=[[[DYScopeSample alloc]init]autorelease];sample.pixels=input;[renderer setValue:sample forKey:@"scopeLatest"];
|
||||
DYInspector *view=[[[DYInspector alloc]initWithAPIManager:host renderer:renderer]autorelease];[view refresh];NSDictionary *before=[view presetSnapshot];
|
||||
@@ -90,6 +95,9 @@
|
||||
[renderer invalidatePreview];
|
||||
run.record(@"histogram-keeps-final-output-while-a-new-render-is-pending",[[graph valueForKey:@"histogram"]isEqual:data]);
|
||||
DYDiagnosticTile *updated=[[[DYDiagnosticTile alloc]initWithDevice:gpu width:2 height:2]autorelease];
|
||||
CGColorSpaceRef linear709=CGColorSpaceCreateWithName(kCGColorSpaceExtendedLinearSRGB);
|
||||
[updated setDiagnosticColorSpace:linear709];
|
||||
CGColorSpaceRelease(linear709);
|
||||
const __fp16 colors[16]={.25f,.4f,.6f,1,.25f,.4f,.6f,1,.25f,.4f,.6f,1,.25f,.4f,.6f,1};
|
||||
[[updated metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,2,2)mipmapLevel:0 withBytes:colors bytesPerRow:16];
|
||||
[renderer captureScopeTile:updated atTime:kCMTimeZero];
|
||||
@@ -97,6 +105,8 @@
|
||||
while([[graph valueForKey:@"histogram"]isEqual:data]&&NSProcessInfo.processInfo.systemUptime<until)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.005]];
|
||||
NSData *latest=[graph valueForKey:@"histogram"];
|
||||
run.record(@"histogram-open-inspector-refreshes-after-a-new-output-at-the-same-time",latest.length==sizeof(DYHistogram)&&![latest isEqual:data]&&[latest isEqual:[renderer canvasHistogramAtTime:kCMTimeZero]]);
|
||||
const auto *latestBins=latest.length==sizeof(DYHistogram)?(const DYHistogram*)latest.bytes:nullptr;
|
||||
run.record(@"histogram-inspector-and-canvas-use-rec709-video-bins-for-linear-output",latestBins&&latestBins->rec709VideoLevels&&latestBins->samples==57600&&latestBins->bins[1][125]==57600&&latestBins->bins[2][160]==57600&&latestBins->bins[3][197]==57600);
|
||||
NSInteger previous=DYThemeIndex();DYSetThemeIndex(8);
|
||||
run.record(@"relief-only-two-choices-and-no-text-glow",DYThemeNames().count==2&&DYThemeTextShadow()==nil&&![DYThemePalette()[@"background"]isEqual:DYThemePalette()[@"backgroundEnd"]]);
|
||||
DYSetThemeIndex(previous);
|
||||
|
||||
在新工单中引用
屏蔽一个用户