Closed palemieux closed 11 months ago
Per 2023-09-06 meeting: add support for enumerated values of the color volume,
From Lars:
Typos?
CURRENT:
function simpleTransform(value, systemGamma) {
if (value < 1.0) {
return -1.0 * Math.pow(-1.0 * value, systemGamma);
} else {
return Math.pow(value, systemGamma);
}
}
function simpleInverseTransform(value, systemGamma) {
if (value < 1.0) {
return -1.0 * Math.pow(-1.0 * value, 1.0 / systemGamma);
} else {
return Math.pow(value, 1.0 / systemGamma);
}
}
I believe the if statements should be if (value < 0.0)
From Lars:
I belive pq to srgb needs a similar code snippet to map to sRGB gamut:
const r3 = simpleInverseTransform(r2, systemGamma);
const g3 = simpleInverseTransform(g2, systemGamma);
const b3 = simpleInverseTransform(b2, systemGamma);
const [r4, g4, b4] = limitTosRGBGamut(r3, g3, b3);
From Lars:
Why is PQ to srgb using gamma 2.4 while HLG uses 2.2? 2.2 is usually the better fit for sRGB. But maybe you want 709 brightness levels?
Closes #110 Closes #109 Closes #103 Closes #102 Closes #100 Closes #99 Closes #92 Closes #50 Closes #42 Closes #39 Closes #36