set cut_paste_input [stack 0]
push $cut_paste_input
Group {
name ZoneSat
label "dev v1"
addUserKnob {20 ZoneGrade_tab l ZoneGrade}
addUserKnob {41 gamut T RGB_to_XYZ.gamut}
addUserKnob {6 pdch l perceptual +STARTLINE}
pdch true
addUserKnob {7 wr}
wr 0.33
addUserKnob {7 wb}
wb 0.33
addUserKnob {26 ""}
addUserKnob {7 sat R 0 2}
sat 1
addUserKnob {7 sal l "sat low" R 0 2}
sal 1.4
addUserKnob {7 sah l "sat high" R 0 2}
sah 0.6
addUserKnob {26 zones_label l " " T "zones
\nzones start / end : stops +/- 0.18"}
addUserKnob {7 z0s R -6 6}
z0s -6
addUserKnob {7 z0e R -6 6}
z0e 3
addUserKnob {7 z1s R -6 6}
z1s -6
addUserKnob {7 z1e R -6 6}
z1e 3
}
Input {
inputs 0
name Input
xpos -40
ypos -220
}
Group {
name RGB_to_XYZ
tile_color 0x429940ff
xpos -40
ypos -178
addUserKnob {20 InputGamut_to_XYZ_tab l InputGamut_to_XYZ}
addUserKnob {4 gamut l "input gamut" M {ACES ACEScg P3D65 Rec.2020 Rec.709 AlexaWideGamut RedWideGamutRGB "Filmlight E-Gamut" "DaVinci Wide Gamut" ""}}
gamut ACEScg
addUserKnob {41 matrix T ColorMatrix.matrix}
addUserKnob {41 invert -STARTLINE T ColorMatrix.invert}
}
Input {
inputs 0
name Input
xpos 290
ypos -610
}
Dot {
name Dot1
xpos 324
ypos -546
}
set N65441d00 [stack 0]
ColorMatrix {
matrix {
{{"SwitchGamut.input\[value SwitchGamut.which].matrix"} {"SwitchGamut.input\[value SwitchGamut.which].matrix"} {"SwitchGamut.input\[value SwitchGamut.which].matrix"}}
{{"SwitchGamut.input\[value SwitchGamut.which].matrix"} {"SwitchGamut.input\[value SwitchGamut.which].matrix"} {"SwitchGamut.input\[value SwitchGamut.which].matrix"}}
{{"SwitchGamut.input\[value SwitchGamut.which].matrix"} {"SwitchGamut.input\[value SwitchGamut.which].matrix"} {"SwitchGamut.input\[value SwitchGamut.which].matrix"}}
}
name ColorMatrix
xpos 290
ypos -369
}
Output {
name Output
xpos 290
ypos -250
}
push $N65441d00
Dot {
name Dot391
label " *RGB to XYZ D65 CAT: XYZ Scaling"
xpos 434
ypos -546
}
set N65440800 [stack 0]
ColorMatrix {
matrix {
{0.7006223202 0.1487748027 0.101058729}
{0.2741184831 0.8736317754 -0.1477504224}
{-0.09896290302 -0.1378953159 1.325916052}
}
name ColorMatrix30
label "DaVinci WG to XYZ D65"
xpos 1280
ypos -465
}
push $N65440800
ColorMatrix {
matrix {
{0.705396831 0.1640413404 0.08101775497}
{0.2801307142 0.8202067018 -0.1003373787}
{-0.1037815139 -0.07290726155 1.265746593}
}
name ColorMatrix29
label "Filmlight E-Gamut to XYZ D65"
xpos 1170
ypos -465
}
push $N65440800
ColorMatrix {
matrix {
{0.735275209 0.06860940903 0.1465712786}
{0.2866940796 0.8429790735 -0.1296732426}
{-0.07968084514 -0.3473432064 1.516081929}
}
name ColorMatrix22
label "REDWideGamutRGB to XYZ D65"
xpos 1060
ypos -465
}
push $N65440800
ColorMatrix {
matrix {
{0.6380076408 0.2147038132 0.09774445742}
{0.2919537723 0.8238408566 -0.1157948226}
{0.002798279049 -0.06703422219 1.153293848}
}
name ColorMatrix21
label "Arri AlexaWideGamut to XYZ D65"
xpos 950
ypos -465
}
push $N65440800
ColorMatrix {
matrix {
{0.4123909175 0.3575843573 0.1804807931}
{0.2126390785 0.7151687145 0.07219231129}
{0.01933082566 0.1191947833 0.9505321383}
}
name ColorMatrix18
label "Rec709 to XYZ D65"
xpos 840
ypos -465
}
push $N65440800
ColorMatrix {
matrix {
{0.6369581223 0.1446169168 0.1688809693}
{0.2627002299 0.6779981256 0.05930171534}
{4.99410725e-17 0.02807269618 1.060985088}
}
name ColorMatrix17
label "Rec2020 to XYZ D65"
xpos 730
ypos -465
}
push $N65440800
ColorMatrix {
matrix {
{0.4865711331 0.2656677067 0.1982173175}
{0.2289746404 0.6917386055 0.07928691804}
{-3.972076965e-17 0.04511338845 1.043944478}
}
name ColorMatrix16
label "P3D65 to XYZ D65"
xpos 620
ypos -465
}
push $N65440800
ColorMatrix {
matrix {
{0.6609312296 0.1336961389 0.1558285803}
{0.2722287476 0.6740817428 0.05368950963}
{-0.006018006243 0.004383686464 1.090692043}
}
name ColorMatrix1
label "ACEScg to XYZ D65"
xpos 510
ypos -465
}
push $N65440800
ColorMatrix {
matrix {
{0.9503623843 0 9.346324805e-05}
{0.3439664543 0.728166163 -0.07213254273}
{0 0 1.089057803}
}
name ColorMatrix2
label "ACES to XYZ D65"
xpos 400
ypos -465
}
Switch {
inputs 9
which {{gamut}}
name SwitchGamut
xpos 400
ypos -370
}
end_group
Dot {
name Dot2
xpos -6
ypos -126
}
set Nb7b8f900 [stack 0]
Dot {
name Dot1
xpos -226
ypos -126
}
ColorMatrix {
matrix {
{1.71665132 -0.3556708097 -0.2533662617}
{-0.6666844487 1.616481304 0.01576855592}
{0.01763986237 -0.04277062416 0.9421030879}
}
name XYZ_to_Rec2020_
xpos -260
ypos 110
}
Group {
name GamutCompress1
selected true
xpos -260
ypos 158
addUserKnob {20 GamutCompress}
addUserKnob {26 label_1 l " " T "simple chromaticity-linear gamut compression"}
addUserKnob {41 th T compress3.th}
addUserKnob {41 x0 T compress3.x0}
}
Input {
inputs 0
name Input
xpos 400
ypos -346
}
Dot {
name Dot10
xpos 434
ypos -294
}
set Nb7b8d600 [stack 0]
Expression {
channel0 rgba
expr0 max(r,g,b)
channel3 none
name mx1
xpos 290
ypos -298
}
set Nb7b8cf00 [stack 0]
Dot {
name Dot11
xpos 324
ypos -150
}
push $Nb7b8cf00
push $Nb7b8d600
MergeExpression {
inputs 2
expr0 Ar==0?0:Br/Ar
expr1 Ag==0?0:Bg/Ag
expr2 Ab==0?0:Bb/Ab
name MergeDivideReverse2
xpos 400
ypos -250
}
set Nb7b8c100 [stack 0]
Expression {
temp_name0 c
temp_expr0 1-min(r,g,b)
channel0 {rgba.red rgba.green rgba.blue none}
expr0 c==0?0:(c