Skip to main content

TransferFunction

Enum TransferFunction 

Source
pub enum TransferFunction {
Show 15 variants ACESCCT, ARRIlog3, ARRIlog4, AppleLog, AppleLog2, CLog3, DaVinciIntermediate, FLog2, Gamma24, HLG, Linear, PQ, Rec709, SLog3, VLog,
}

Variants§

§

ACESCCT

§

ARRIlog3

§

ARRIlog4

§

AppleLog

§

AppleLog2

§

CLog3

§

DaVinciIntermediate

§

FLog2

§

Gamma24

§

HLG

§

Linear

§

PQ

§

Rec709

§

SLog3

§

VLog

Implementations§

Source§

impl TransferFunction

Source

pub fn name(&self) -> &'static str

Source

pub fn process(&self, pixels: &mut [f32])

Apply the OETF (linear → log) for the selected transfer function.

Source-of-truth references for each branch:

VariantSpec / document
Rec709ITU-R BT.709-6 OETF
SLog3Sony “S-Log3 Technical Specification” (Sept 2014) — canonical form: code = (420 + 261.5×log₁₀((x+0.01)/0.19)) / 1023, knee at 0.01125, black code 95, 18% grey code 420
VLogPanasonic “V-Log/V-Gamut Reference Manual” (2014) — 5.6x+0.125 / 0.241514*log10(x+0.00873)+0.598206, knee at 0.01
ARRIlog3ARRI “LogC-3 Logarithmic Color Space” spec (2020), EI 800 variant
ARRIlog4ARRI “LogC4 Encoding Function” (Cooper & Brendel, 2022; ALEV4 / Alexa 35), EI-independent
CLog3Canon Cinema EOS C-Log3 characteristics (2016) — three-segment with negative-side graft
FLog2Fujifilm “F-Log2 Data Sheet” (2021) — Fujifilm-internal anchor at 0.000889
AppleLog/AppleLog2Apple “Apple Log Profile White Paper” (Sept 2023) — R0=-0.05641088, C=47.28711236
ACESCCTAMPAS ACEScc specification (TB-2022-002), knee at 2^-7 = 0.0078125, log slope 17.52
PQITU-R BT.2100-2 ST.2084 PQ (2022) — m1=0.1593017578125, m2=78.84375, c1=0.8359375, c2=18.8515625, c3=18.6875
HLGITU-R BT.2100-2 HLG OETF (2022) — knee at 1/12, a=0.17883277, b=0.28466892, c=0.55991073
DaVinciIntermediateBlackmagic “DaVinci YRGB Intermediate” — knee at 0.00262409, log slope 0.07329248
Gamma24Display gamma 1/2.4 (Rec.1886 EOTF approximation)
Linearidentity
Source

pub fn all() -> &'static [TransferFunction]

Source

pub fn next(self) -> Self

Source

pub fn prev(self) -> Self

Source

pub fn is_log_bypass(&self) -> bool

Source

pub fn requires_10bit(&self) -> bool

Trait Implementations§

Source§

impl Clone for TransferFunction

Source§

fn clone(&self) -> TransferFunction

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for TransferFunction

Source§

impl Debug for TransferFunction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for TransferFunction

Source§

impl From<TransferFunction> for Transfer

Source§

fn from(tf: TransferFunction) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for TransferFunction

Source§

fn eq(&self, other: &TransferFunction) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for TransferFunction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more