#[non_exhaustive]pub enum GainMapTarget {
HeadroomStops(f32),
AlternateRendition,
BaseRendition,
}Expand description
Target display headroom or explicit rendition endpoint for ISO 21496-1 reconstruction.
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.
HeadroomStops(f32)
Target display HDR headroom in log₂ stops (0.0 = SDR, 2.0 = 4× HDR, 2.32 ≈ 5×).
AlternateRendition
Exact full alternate rendition (signed_weight = +1.0 for Forward, -1.0 for Reverse),
immune to floating-point rounding of metadata.alternate_hdr_headroom().
BaseRendition
Exact base rendition (signed_weight = 0.0 identity bypass, skipping gain-map sampling
and additive offsets completely).
Implementations§
Source§impl GainMapTarget
impl GainMapTarget
Sourcepub fn signed_weight(self, metadata: &GainMapMetadata) -> Option<f32>
pub fn signed_weight(self, metadata: &GainMapMetadata) -> Option<f32>
Compute the signed application weight for this target.
Exact rendition endpoints retain weights of zero (base) and ±1 (alternate).
Returns None when the metadata does not establish a gain-map direction
or the requested headroom is non-finite.
Trait Implementations§
Source§impl Clone for GainMapTarget
impl Clone for GainMapTarget
Source§fn clone(&self) -> GainMapTarget
fn clone(&self) -> GainMapTarget
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 GainMapTarget
Source§impl Debug for GainMapTarget
impl Debug for GainMapTarget
Source§impl PartialEq for GainMapTarget
impl PartialEq for GainMapTarget
impl StructuralPartialEq for GainMapTarget
Auto Trait Implementations§
impl Freeze for GainMapTarget
impl RefUnwindSafe for GainMapTarget
impl Send for GainMapTarget
impl Sync for GainMapTarget
impl Unpin for GainMapTarget
impl UnsafeUnpin for GainMapTarget
impl UnwindSafe for GainMapTarget
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