Fix primary CST working domains and delayed output; 581 checks pass; seed new effects explicitly
这个提交包含在:
1 父节点
d5aba63b4e
当前提交
072bf881b9
16 个文件已更改
+452
-22
没有与搜索条件相匹配的文件
@@ -22,6 +22,7 @@
|
||||
// must be the same as correcting the root before its one final display map.
|
||||
NSMutableDictionary *one=DYMutablePlist(empty.document),*node=(id)DYInsertTool(one,@"primary",@"base:primary");DYSeedPrimaryWorkingSpace(node,10,16);node[@"values"][@"cmexposure"]=@(-4);DYUniforms reduced=u;reduced.cm.exposure=-4;Pixels beforeOutput=renderPrimary(reduced,empty.document,@"primary-four-stop-root-before-output"),extra=renderPrimary(u,one,@"primary-four-stop-extra-before-output");Difference order=difference(beforeOutput,extra);run.record(@"primary-independent-grade-before-main-output",order.maximum<.002&&order.nonfinite==0,measure(order));
|
||||
auto reducedScene=scene;for(auto &p:reducedScene){p.r/=16;p.g/=16;p.b/=16;}Pixels reducedInput=sceneInput(reducedScene);upload(reducedInput);Pixels knownReduced=renderPrimary(u,empty.document,@"primary-independent-OCIO-reduced-scene-input");Difference high=difference(beforeOutput,knownReduced);run.record(@"primary-highlights-recovered-before-mapping-reference",high.maximum<.008&&high.nonfinite==0,@{@"maxDifference":@(high.maximum),@"scene64afterMinus4":@((float)beforeOutput[7*4]),@"independentReference":@((float)knownReduced[7*4])});upload(logInput);
|
||||
NSMutableArray *patches=[NSMutableArray array];for(int k=0;k<8;k++){size_t i=k*5;float a=logInput[i*4+3];[patches addObject:@{@"index":@(i),@"code":@[@(encodeCarrier((float)logInput[i*4]/a)),@(encodeCarrier((float)logInput[i*4+1]/a)),@(encodeCarrier((float)logInput[i*4+2]/a))],@"expectedMinus4Linear709":@[@((float)beforeOutput[i*4]/a),@((float)beforeOutput[i*4+1]/a),@((float)beforeOutput[i*4+2]/a)]}];}NSData *fixture=[NSJSONSerialization dataWithJSONObject:@{@"patches":patches,@"input":@"Sony S-Log3 / S-Gamut3.Cine code carrier",@"exposure":@(-4)} options:NSJSONWritingPrettyPrinted error:nil];[fixture writeToFile:[runtime stringByAppendingPathComponent:@"primary-host-chart.json"] atomically:YES];
|
||||
// Local working curves are read from the node, including BASIS adapters.
|
||||
node[@"values"][@"cmexposure"]=@0;node[@"values"][@"cmcontrast"]=@.3;Pixels localDI=renderPrimary(u,one,@"primary-local-DI-contrast");node[@"values"][@"cmworkingTransfer"]=@1;node[@"values"][@"cmworkingGamut"]=@2;Pixels localACES=renderPrimary(u,one,@"primary-local-ACES-contrast");run.record(@"primary-local-working-selection-is-effective",difference(localDI,localACES).maximum>.001);
|
||||
node[@"values"][@"cminputTransfer"]=@1;node[@"values"][@"cminputGamut"]=@2;Pixels reinterpret=renderPrimary(u,one,@"primary-local-input-CST-selection");run.record(@"primary-local-input-CST-is-not-overridden",difference(reinterpret,localACES).maximum>.01);
|
||||
@@ -38,7 +39,8 @@
|
||||
DYUniforms invalid=data;invalid.hslHueA.x=20;NSError *e=nil;BOOL bounded=[primaryRenderer renderSource:source destination:destination uniforms:invalid paths:@{} spider:nil tools:empty.document colorManagement:v3 hostPrimaries:kFxColorPrimaries_Rec709 error:&e];run.record(@"primary-Log-data-output-rejects-SDR-finishing",!bounded&&e.localizedDescription.length>0);
|
||||
DYUniforms bypass=u;bypass.primarySectionEnabled=0;bypass.hslHueA.x=20;Pixels bypassFrame=renderPrimary(bypass,empty.document,@"primary-main-eye-keeps-other-tools");Pixels oldBypass=render(run,primaryRenderer,source,destination,gpu,bypass,@{},@"primary-eye-unmanaged-reference");run.record(@"primary-main-eye-bypasses-whole-CST-retains-tools",difference(bypassFrame,oldBypass).maximum==0);
|
||||
// Float domain crossings retain negative values, overrange and hidden RGB.
|
||||
DYUniforms linear=u;linear.cm.inputTransfer=linear.cm.workingTransfer=linear.cm.outputTransfer=20;linear.cm.inputGamut=linear.cm.workingGamut=linear.cm.outputGamut=2;linear.cm.toneMapping=0;Pixels extended(width*height*4);for(size_t i=0;i<width*height;i++){float a=i%4?.25f:0;extended[i*4]=a?decodeCarrier(-.03f)*a:.07f;extended[i*4+1]=a?decodeCarrier(.18f)*a:-.02f;extended[i*4+2]=a?decodeCarrier(4.f)*a:.5f;extended[i*4+3]=a;}upload(extended);Pixels exact=renderPrimary(linear,empty.document,@"primary-negative-superwhite-hidden-RGB");run.record(@"primary-float-domain-identity-retains-extended-values",difference(extended,exact).maximum<.002&&difference(extended,exact).nonfinite==0,measure(difference(extended,exact)));linear.cm.exposure=1;Pixels doubled=renderPrimary(linear,empty.document,@"primary-linear-exposure-extended-values");BOOL photometric=YES;for(size_t i=1;i<width*height;i++)if(extended[i*4+3]>0){float a=extended[i*4+3];photometric&=fabs(encodeCarrier((float)doubled[i*4+1]/a)-.36f)<.002&&fabs(encodeCarrier((float)doubled[i*4]/a)+.06f)<.002;}run.record(@"primary-one-stop-exposure-is-linear-light-with-negative-values",photometric);upload(logInput);
|
||||
DYUniforms linear=u;linear.cm.inputTransfer=linear.cm.workingTransfer=linear.cm.outputTransfer=20;linear.cm.inputGamut=linear.cm.workingGamut=linear.cm.outputGamut=2;linear.cm.toneMapping=0;Pixels extended(width*height*4);for(size_t i=0;i<width*height;i++){float a=i%4?.25f:0;extended[i*4]=a?decodeCarrier(-.03f)*a:.07f;extended[i*4+1]=a?decodeCarrier(.18f)*a:-.02f;extended[i*4+2]=a?decodeCarrier(4.f)*a:.5f;extended[i*4+3]=a;}upload(extended);Pixels exact=renderPrimary(linear,empty.document,@"primary-negative-superwhite-hidden-RGB");run.record(@"primary-float-domain-identity-retains-extended-values",difference(extended,exact).maximum<.002&&difference(extended,exact).nonfinite==0,measure(difference(extended,exact)));linear.cm.exposure=1;Pixels doubled=renderPrimary(linear,empty.document,@"primary-linear-exposure-extended-values");BOOL photometric=YES;for(size_t i=1;i<width*height;i++)if(extended[i*4+3]>0){float a=extended[i*4+3];photometric&=fabs(encodeCarrier((float)doubled[i*4+1]/a)-.36f)<.002&&fabs(encodeCarrier((float)doubled[i*4]/a)+.06f)<.002;}run.record(@"primary-one-stop-exposure-is-linear-light-with-negative-values",photometric,@{@"negative":@(encodeCarrier((float)doubled[4]/.25f)),@"grey":@(encodeCarrier((float)doubled[5]/.25f))});upload(logInput);
|
||||
DYUniforms idle=logOut;idle.texture=25;idle.textureEnabled=0;idle.postLUTStrength=0;idle.extraPostLUTStrengths[0]=.8;idle.extraLookSectionEnableds[0]=0;e=nil;BOOL idleOK=[primaryRenderer renderSource:source destination:destination uniforms:idle paths:@{@"look0":@"/nonexistent/disabled.cube",@"look1":@"/nonexistent/disabled2.cube"} spider:nil tools:empty.document colorManagement:v3 hostPrimaries:kFxColorPrimaries_Rec709 error:&e];run.record(@"primary-data-output-ignores-disabled-SDR-and-LUT-controls",idleOK&&difference(read(destination,gpu),selectedOutput).maximum==0,@{@"error":reason(e)});
|
||||
// Actual inspector must expose all three sets of selectors in V3.
|
||||
DYDiagnosticManager *host=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(host,nil);DYAssetState *assets=[[[DYAssetState alloc]init]autorelease];assets.colorManagement=v3;DYWriteAssets(host,assets,kCMTimeZero);DYInspector *view=[[[DYInspector alloc]initWithAPIManager:host renderer:primaryRenderer]autorelease];[view refresh];[view setFrame:NSMakeRect(0,0,400,780)];[view layoutSubtreeIfNeeded];NSDictionary *tabs=[view valueForKey:@"tabs"];run.record(@"primary-inspector-no-v2-selector-override",![tabs[@"managedColor"]boolValue]&&[tabs[@"primaryCMS"]boolValue]);NSMenuItem *add=[[[NSMenuItem alloc]init]autorelease];add.representedObject=@"primary";[view addModule:add];NSDictionary *added=[DYReadTools(host,kCMTimeZero).document[@"layers"]lastObject];run.record(@"primary-inspector-add-layer-inherits-workspace",[added[@"values"][@"cminputTransfer"]isEqual:@10]&&[added[@"values"][@"cmoutputGamut"]isEqual:@16]&&[added[@"values"][@"cmtoneMapping"]isEqual:@0]);NSMutableDictionary *followed=DYMutablePlist(DYReadTools(host,kCMTimeZero).document);DYFollowPrimaryWorkingSpace(followed,1,2);NSDictionary *following=[followed[@"layers"]lastObject];run.record(@"primary-workspace-change-updates-inherited-domains",[following[@"values"][@"cminputTransfer"]isEqual:@1]&&[following[@"values"][@"cmworkingGamut"]isEqual:@2]&&[following[@"values"][@"cmoutputTransfer"]isEqual:@1]);DYWriteTools(host,followed,kCMTimeZero);DYToolManager *local=[[[DYToolManager alloc]initWithHost:host node:following]autorelease];UInt32 workingID=0;for(NSDictionary*d in DYDescriptors())if([d[@"key"]isEqual:@"cmworkingTransfer"])workingID=[d[@"pid"]unsignedIntValue];id<FxCustomParameterActionAPI_v4>action=[local apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];[action startAction:nil];[(id<FxParameterSettingAPI_v6>)local setFloatValue:10 toParameter:workingID atTime:kCMTimeZero];[action endAction:nil];followed=DYMutablePlist(DYReadTools(host,kCMTimeZero).document);DYFollowPrimaryWorkingSpace(followed,4,4);following=[followed[@"layers"]lastObject];run.record(@"primary-manual-local-space-retains-choice-and-follows-boundaries",[following[@"values"][@"cmworkingTransfer"]isEqual:@10]&&[following[@"values"][@"cminputTransfer"]isEqual:@4]&&[following[@"values"][@"cmoutputGamut"]isEqual:@4]&&[following[@"primaryFollow"]isEqual:@5]);NSDictionary *preset=[view presetSnapshot];run.record(@"primary-complete-preset-stores-v3-state",[preset[@"colorManagement"]isEqual:v3]&&[preset[@"version"]isEqual:@7]);
|
||||
NSURL *cube=[NSURL fileURLWithPath:[runtime stringByAppendingPathComponent:@"primary-v3.cube"]];e=nil;BOOL exported=[primaryRenderer exportLUT:cube uniforms:logOut paths:@{} spider:nil tools:empty.document colorManagement:v3 error:&e];std::vector<float>table;NSUInteger side=0;BOOL parsed=exported&&DYLUTReadCube(cube.path,table,side,&e);run.record(@"primary-v3-Cube65-declared-encoding",parsed&&side==65&&[[NSString stringWithContentsOfURL:cube encoding:NSUTF8StringEncoding error:nil]containsString:@"V3 input"],@{@"error":reason(e)});
|
||||
|
||||
在新工单中引用
屏蔽一个用户