pub struct GainMapConfig {
pub scale_factor: u8,
pub gamma: f32,
pub multi_channel: bool,
pub min_boost: f32,
pub max_boost: f32,
pub base_offset: f32,
pub alternate_offset: f32,
pub base_hdr_headroom: f32,
pub alternate_hdr_headroom: f32,
}Expand description
Configuration for gain map computation.
Boost values (min_boost, max_boost) are in linear domain for
ergonomics — humans think “4× brighter” not “log2(4)=2”. These are
converted to log2 when producing GainMapMetadata.
Fields§
§scale_factor: u8Scale factor for gain map (1 = same size as image, 4 = 1/4 size).
gamma: f32Gamma to apply to the gain map encoding.
multi_channel: boolUse multi-channel (RGB) gain map instead of single-channel luminance.
min_boost: f32Minimum gain (linear). 1.0 = no darkening, 0.5 = allow 2× darker.
max_boost: f32Maximum gain (linear). HDR peak / SDR peak. e.g. 6.0 = ~2.5 stops.
base_offset: f32Offset for base (SDR) values to avoid division by zero. Linear domain.
alternate_offset: f32Offset for alternate (HDR) values. Linear domain.
base_hdr_headroom: f32Minimum display boost (linear). For metadata headroom.
alternate_hdr_headroom: f32Maximum display boost (linear). For metadata headroom.
Trait Implementations§
Source§impl Clone for GainMapConfig
impl Clone for GainMapConfig
Source§fn clone(&self) -> GainMapConfig
fn clone(&self) -> GainMapConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GainMapConfig
impl Debug for GainMapConfig
Auto Trait Implementations§
impl Freeze for GainMapConfig
impl RefUnwindSafe for GainMapConfig
impl Send for GainMapConfig
impl Sync for GainMapConfig
impl Unpin for GainMapConfig
impl UnsafeUnpin for GainMapConfig
impl UnwindSafe for GainMapConfig
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