#[non_exhaustive]pub struct GainMapApplyConfig {
pub target: GainMapTarget,
pub resample: GainMapResample,
pub orientation: GainMapOrientation,
pub policy: ConvertPolicy,
pub destination_format: Option<PixelFormat>,
}Expand description
Configuration for ISO 21496-1 gain-map reconstruction via GainMapApplier,
apply_gain_map_oriented, or apply_gain_map_with.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.target: GainMapTargetTarget display HDR headroom in log₂ stops or explicit rendition endpoint.
resample: GainMapResampleResampling kernel used when gain-map dimensions differ from base dimensions.
orientation: GainMapOrientationPending EXIF orientation policy (Bake, Passthrough, or RequireIdentity).
policy: ConvertPolicyConversion policy controlling SIMD Accelerators, diffuse_white, and CMS backends.
Defaults to ConvertPolicy::working_linear (accelerators: None, respecting the
process-wide accel::enable* registry or scalar fallback for dead-stripping); override
via with_policy (e.g. Accelerators::ALL.with_gainmap() or
Accelerators::WEB_SDR.with_gainmap()).
destination_format: Option<PixelFormat>Optional target output PixelFormat.
None: outputs relative-linearRGBF32(orRGBAF32when base has alpha) in the resolved gain-map application primaries.Some(spec): fuses conversion directly tospec(e.g.RGBAF16,RGB16PQ,RGB16HLG,RGBA8sRGB,DisplayP3) in O(width) row memory with zero full-frame intermediate buffer.
Implementations§
Source§impl GainMapApplyConfig
impl GainMapApplyConfig
Sourcepub fn from_headroom_stops(display_headroom_stops: f32) -> Self
pub fn from_headroom_stops(display_headroom_stops: f32) -> Self
Create a default configuration for display_headroom_stops (log₂ stops, e.g. 2.0 = 4× display boost).
Sourcepub fn from_display_boost_linear(display_boost: f32) -> Self
pub fn from_display_boost_linear(display_boost: f32) -> Self
Create a configuration from a linear display boost multiplier (e.g. 4.0 → 2.0 stops).
Sourcepub fn alternate_rendition() -> Self
pub fn alternate_rendition() -> Self
Create a configuration targeting exact full alternate reconstruction (|weight| == 1.0).
Sourcepub fn base_rendition() -> Self
pub fn base_rendition() -> Self
Create a configuration targeting exact base rendition bypass (weight == 0.0).
Sourcepub fn with_target(self, target: GainMapTarget) -> Self
pub fn with_target(self, target: GainMapTarget) -> Self
Replace the target headroom / rendition endpoint.
Sourcepub fn with_resample(self, resample: GainMapResample) -> Self
pub fn with_resample(self, resample: GainMapResample) -> Self
Select the gain-map resampling filter (Bilinear, Bicubic, Mitchell, Nearest).
Sourcepub fn with_orientation(self, orientation: GainMapOrientation) -> Self
pub fn with_orientation(self, orientation: GainMapOrientation) -> Self
Select how pending EXIF orientation on DualLayerHdrBuf / DualLayerHdrView is handled.
Sourcepub fn with_policy(self, policy: ConvertPolicy) -> Self
pub fn with_policy(self, policy: ConvertPolicy) -> Self
Set the conversion policy (accelerators, diffuse_white, CMS backend, HLG rendering).
Sourcepub fn with_destination_format(self, destination_format: PixelFormat) -> Self
pub fn with_destination_format(self, destination_format: PixelFormat) -> Self
Fuse row conversion straight into destination_format (e.g. RGBAF16, RGB16 PQ, RGBA8 sRGB).
Trait Implementations§
Source§impl Clone for GainMapApplyConfig
impl Clone for GainMapApplyConfig
Source§fn clone(&self) -> GainMapApplyConfig
fn clone(&self) -> GainMapApplyConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more