pub struct GainMapComponent { /* private fields */ }Expand description
Per-channel ISO 21496-1 gain-map parameters in exact rational form.
Implementations§
Source§impl GainMapComponent
impl GainMapComponent
Sourcepub const fn new(
min_gain_stops: SignedFraction,
max_gain_stops: SignedFraction,
gamma: UnsignedFraction,
base_offset: SignedFraction,
alternate_offset: SignedFraction,
) -> Option<GainMapComponent>
pub const fn new( min_gain_stops: SignedFraction, max_gain_stops: SignedFraction, gamma: UnsignedFraction, base_offset: SignedFraction, alternate_offset: SignedFraction, ) -> Option<GainMapComponent>
Construct an exact per-channel record. Rejects zero gamma and inverted gain bounds.
Sourcepub const fn with_gamma(
self,
gamma: UnsignedFraction,
) -> Option<GainMapComponent>
pub const fn with_gamma( self, gamma: UnsignedFraction, ) -> Option<GainMapComponent>
Replace gamma while retaining the exact gain bounds and offsets. Rejects zero gamma.
Sourcepub const fn min_gain_stops(self) -> SignedFraction
pub const fn min_gain_stops(self) -> SignedFraction
Minimum log₂ gain.
Sourcepub const fn max_gain_stops(self) -> SignedFraction
pub const fn max_gain_stops(self) -> SignedFraction
Maximum log₂ gain.
Sourcepub const fn gamma(self) -> UnsignedFraction
pub const fn gamma(self) -> UnsignedFraction
Positive gain-map encoding gamma.
Sourcepub const fn base_offset(self) -> SignedFraction
pub const fn base_offset(self) -> SignedFraction
Linear offset added to the base rendition before gain.
Sourcepub const fn alternate_offset(self) -> SignedFraction
pub const fn alternate_offset(self) -> SignedFraction
Linear offset subtracted from the alternate rendition after gain.
Trait Implementations§
Source§impl Clone for GainMapComponent
impl Clone for GainMapComponent
Source§fn clone(&self) -> GainMapComponent
fn clone(&self) -> GainMapComponent
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 GainMapComponent
Source§impl Debug for GainMapComponent
impl Debug for GainMapComponent
impl Eq for GainMapComponent
Source§impl Hash for GainMapComponent
impl Hash for GainMapComponent
Source§impl PartialEq for GainMapComponent
impl PartialEq for GainMapComponent
impl StructuralPartialEq for GainMapComponent
Auto Trait Implementations§
impl Freeze for GainMapComponent
impl RefUnwindSafe for GainMapComponent
impl Send for GainMapComponent
impl Sync for GainMapComponent
impl Unpin for GainMapComponent
impl UnsafeUnpin for GainMapComponent
impl UnwindSafe for GainMapComponent
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