Enum TransferFunction
#[non_exhaustive]#[repr(u32)]pub enum TransferFunction {
Show 14 variants
Bt1886 = 1,
Gamma22 = 2,
Gamma28 = 3,
St240 = 4,
ExtLinear = 5,
Log100 = 6,
Log316 = 7,
Xvycc = 8,
Srgb = 9,
ExtSrgb = 10,
St2084Pq = 11,
St428 = 12,
Hlg = 13,
CompoundPower24 = 14,
}wayland and Linux only.Expand description
named transfer functions
Named transfer functions used to represent well-known transfer characteristics of displays.
A value of 0 is invalid and will never be present in the list of enums.
See appendix.md for the formulae.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Bt1886 = 1
BT.1886 display transfer characteristic
Rec. ITU-R BT.1886 is the display transfer characteristic assumed by
- Rec. ITU-R BT.601-7 525 and 625
- Rec. ITU-R BT.709-6
- Rec. ITU-R BT.2020-2
This TF implies these default luminances from Rec. ITU-R BT.2035:
- primary color volume minimum: 0.01 cd/m²
- primary color volume maximum: 100 cd/m²
- reference white: 100 cd/m²
Gamma22 = 2
Assumed display gamma 2.2 transfer function
Transfer characteristics as defined by
- Rec. ITU-R BT.470-6 System M (historical)
- United States National Television System Committee 1953 Recommendation for transmission standards for color television
- United States Federal Communications Commission (2003) Title 47 Code of Federal Regulations 73.682 (a) (20)
- Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM
- IEC 61966-2-1 (reference display)
Gamma28 = 3
Assumed display gamma 2.8 transfer function
Transfer characteristics as defined by
- Rec. ITU-R BT.470-6 System B, G (historical)
St240 = 4
SMPTE ST 240 transfer function
Transfer characteristics as defined by
- SMPTE ST 240 (1999)
ExtLinear = 5
extended linear transfer function
Linear transfer function defined over all real numbers. Normalised electrical values are equal the normalised optical values.
Log100 = 6
logarithmic 100:1 transfer function
Logarithmic transfer characteristic (100:1 range).
Log316 = 7
logarithmic (100*Sqrt(10) : 1) transfer function
Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range).
Xvycc = 8
IEC 61966-2-4 transfer function
Transfer characteristics as defined by
- IEC 61966-2-4
Srgb = 9
Deprecated (ambiguous sRGB transfer function)
Transfer characteristics as defined by
- IEC 61966-2-1 sRGB
As a rule of thumb, use gamma22 for video, motion picture and computer graphics, or compound_power_2_4 for ICC calibrated print workflows.
ExtSrgb = 10
Deprecated (Extended sRGB piece-wise transfer function)
Transfer characteristics as defined by
- IEC 61966-2-1 sYCC
St2084Pq = 11
perceptual quantizer transfer function
Transfer characteristics as defined by
- SMPTE ST 2084 (2014) for 10-, 12-, 14- and 16-bit systems
- Rec. ITU-R BT.2100-2 perceptual quantization (PQ) system
This TF implies these default luminances
- primary color volume minimum: 0.005 cd/m²
- primary color volume maximum: 10000 cd/m²
- reference white: 203 cd/m²
The difference between the primary color volume minimum and maximum must be approximately 10000 cd/m² as that is the swing of the EOTF defined by ST 2084 and BT.2100. The default value for the reference white is a protocol addition: it is suggested by Report ITU-R BT.2408-7 and is not part of ST 2084 or BT.2100.
St428 = 12
SMPTE ST 428 transfer function
Transfer characteristics as defined by
- SMPTE ST 428-1 (2019)
Hlg = 13
hybrid log-gamma transfer function
Transfer characteristics as defined by
- ARIB STD-B67 (2015)
- Rec. ITU-R BT.2100-2 hybrid log-gamma (HLG) system
This TF implies these default luminances
- primary color volume minimum: 0.005 cd/m²
- primary color volume maximum: 1000 cd/m²
- reference white: 203 cd/m²
HLG is a relative display-referred signal with a specified non-linear mapping to the display peak luminance (the HLG OOTF). All absolute luminance values used here for HLG assume a 1000 cd/m² peak display.
The default value for the reference white is a protocol addition: it is suggested by Report ITU-R BT.2408-7 and is not part of ARIB STD-B67 or BT.2100.
CompoundPower24 = 14
IEC 61966-2-1 encoding function
Encoding characteristics as defined by IEC 61966-2-1, for displays that invert the encoding function.
Trait Implementations§
§impl Clone for TransferFunction
impl Clone for TransferFunction
§fn clone(&self) -> TransferFunction
fn clone(&self) -> TransferFunction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for TransferFunction
impl Debug for TransferFunction
§impl Hash for TransferFunction
impl Hash for TransferFunction
§impl Ord for TransferFunction
impl Ord for TransferFunction
§fn cmp(&self, other: &TransferFunction) -> Ordering
fn cmp(&self, other: &TransferFunction) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialEq for TransferFunction
impl PartialEq for TransferFunction
§impl PartialOrd for TransferFunction
impl PartialOrd for TransferFunction
§impl TryFrom<u32> for TransferFunction
impl TryFrom<u32> 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 UnwindSafe for TransferFunction
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
§impl<T> AnyEq for T
impl<T> AnyEq for T
§impl<T, Res> Apply<Res> for Twhere
T: ?Sized,
impl<T, Res> Apply<Res> for Twhere
T: ?Sized,
Source§impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Source§fn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Source§impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Source§fn arrays_into(self) -> C
fn arrays_into(self) -> C
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
Source§impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Source§type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Source§fn components_from(colors: C) -> T
fn components_from(colors: C) -> T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Source§fn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.Source§impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Source§fn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Source§fn into_angle(self) -> U
fn into_angle(self) -> U
T.§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Application.Source§impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Source§type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Source§impl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Source§fn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.Source§impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Source§type Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Source§fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read more