pub enum TransferFunction {
SRgb,
SegmentedGamma {
gamma: f64,
offset: f64,
linear_part: bool,
},
Gamma(f64),
Linear,
Pq,
Hlg {
peak_luminance: f64,
},
}Expand description
Electro-optical transfer function describing how an encoded RGB signal maps
to linear light. Each variant defines an eotf (encoded -> linear) and its
analytic inverse oetf (linear -> encoded); the pair is exact so that
rgb_to_xyz / xyz_to_rgb round-trip.
Variants§
SRgb
sRGB / Display P3 piecewise transfer function (IEC 61966-2-1).
SegmentedGamma
Parameterized sRGB-family piecewise transfer function used by the legacy
srgb_to_xyz / xyz_to_srgb: value = ((E - offset) / (1 - offset)) ^ gamma, with a linear toe E / 12.92 when linear_part is set.
Gamma(f64)
Pure power law linear = encoded ^ gamma (e.g. Adobe RGB gamma 2.2).
Linear
Identity transfer (values are already linear).
Pq
SMPTE ST 2084 (PQ) perceptual quantizer. Linear 1.0 is the 10000 cd/m² peak.
Hlg
ARIB STD-B67 / Rec.2100 HLG. peak_luminance (cd/m²) sets the display
system gamma; linear 1.0 is the peak white.
Implementations§
Trait Implementations§
Source§impl Clone for TransferFunction
impl Clone for TransferFunction
Source§fn clone(&self) -> TransferFunction
fn clone(&self) -> TransferFunction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more