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
impl TransferFunction
pub fn name(&self) -> &'static str
Sourcepub fn process(&self, pixels: &mut [f32])
pub fn process(&self, pixels: &mut [f32])
Apply the OETF (linear → log) for the selected transfer function.
Source-of-truth references for each branch:
| Variant | Spec / document |
|---|---|
Rec709 | ITU-R BT.709-6 OETF |
SLog3 | Sony “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 |
VLog | Panasonic “V-Log/V-Gamut Reference Manual” (2014) — 5.6x+0.125 / 0.241514*log10(x+0.00873)+0.598206, knee at 0.01 |
ARRIlog3 | ARRI “LogC-3 Logarithmic Color Space” spec (2020), EI 800 variant |
ARRIlog4 | ARRI “LogC4 Encoding Function” (Cooper & Brendel, 2022; ALEV4 / Alexa 35), EI-independent |
CLog3 | Canon Cinema EOS C-Log3 characteristics (2016) — three-segment with negative-side graft |
FLog2 | Fujifilm “F-Log2 Data Sheet” (2021) — Fujifilm-internal anchor at 0.000889 |
AppleLog/AppleLog2 | Apple “Apple Log Profile White Paper” (Sept 2023) — R0=-0.05641088, C=47.28711236 |
ACESCCT | AMPAS ACEScc specification (TB-2022-002), knee at 2^-7 = 0.0078125, log slope 17.52 |
PQ | ITU-R BT.2100-2 ST.2084 PQ (2022) — m1=0.1593017578125, m2=78.84375, c1=0.8359375, c2=18.8515625, c3=18.6875 |
HLG | ITU-R BT.2100-2 HLG OETF (2022) — knee at 1/12, a=0.17883277, b=0.28466892, c=0.55991073 |
DaVinciIntermediate | Blackmagic “DaVinci YRGB Intermediate” — knee at 0.00262409, log slope 0.07329248 |
Gamma24 | Display gamma 1/2.4 (Rec.1886 EOTF approximation) |
Linear | identity |
pub fn all() -> &'static [TransferFunction]
pub fn next(self) -> Self
pub fn prev(self) -> Self
pub fn is_log_bypass(&self) -> bool
pub fn requires_10bit(&self) -> bool
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TransferFunction
Source§impl Debug for TransferFunction
impl Debug for TransferFunction
impl Eq for TransferFunction
Source§impl From<TransferFunction> for Transfer
impl From<TransferFunction> for Transfer
Source§fn from(tf: TransferFunction) -> Self
fn from(tf: TransferFunction) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TransferFunction
impl PartialEq for TransferFunction
Source§fn eq(&self, other: &TransferFunction) -> bool
fn eq(&self, other: &TransferFunction) -> bool
Tests for
self and other values to be equal, and is used by ==.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
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
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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