#[non_exhaustive]#[repr(u8)]pub enum TransferFunction {
Linear = 0,
Srgb = 1,
Bt709 = 2,
Pq = 3,
Hlg = 4,
Unknown = 255,
}Expand description
Electro-optical transfer function.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Linear = 0
Linear light (gamma 1.0).
Srgb = 1
sRGB transfer curve (IEC 61966-2-1).
Bt709 = 2
BT.709 transfer curve.
Pq = 3
Perceptual Quantizer (SMPTE ST 2084, HDR10).
Hlg = 4
Hybrid Log-Gamma (ARIB STD-B67, HLG).
Unknown = 255
Transfer function is not known.
Implementations§
Source§impl TransferFunction
impl TransferFunction
Sourcepub const fn from_cicp(tc: u8) -> Option<TransferFunction>
pub const fn from_cicp(tc: u8) -> Option<TransferFunction>
Map CICP transfer_characteristics code to a TransferFunction.
Sourcepub fn reference_white_nits(&self) -> f32
pub fn reference_white_nits(&self) -> f32
Reference white luminance in nits.
- SDR (sRGB, BT.709, Linear, Unknown):
1.0(relative/scene-referred) - PQ:
203.0(ITU-R BT.2408 reference white) - HLG:
1.0(scene-referred)
Trait Implementations§
Source§impl Clone for TransferFunction
impl Clone for TransferFunction
Source§fn clone(&self) -> TransferFunction
fn clone(&self) -> TransferFunction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransferFunction
impl Debug for TransferFunction
Source§impl Display for TransferFunction
impl Display for TransferFunction
Source§impl Hash for TransferFunction
impl Hash for TransferFunction
Source§impl PartialEq for TransferFunction
impl PartialEq for TransferFunction
impl Copy for TransferFunction
impl Eq for TransferFunction
impl StructuralPartialEq for TransferFunction
Auto Trait Implementations§
impl Freeze for TransferFunction
impl RefUnwindSafe for TransferFunction
impl Send for TransferFunction
impl Sync for TransferFunction
impl Unpin for TransferFunction
impl UnsafeUnpin for TransferFunction
impl UnwindSafe for TransferFunction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more