pub struct GainMapMetadata {
pub is_multichannel: bool,
pub use_base_colour_space: bool,
pub base_hdr_headroom_n: u32,
pub base_hdr_headroom_d: u32,
pub alternate_hdr_headroom_n: u32,
pub alternate_hdr_headroom_d: u32,
pub channels: [GainMapChannel; 3],
}Expand description
Gain map metadata from a ToneMapImage (tmap) derived image item.
Describes how to apply a gain map to convert between SDR and HDR renditions. The gain map is a separate AV1-encoded image that, combined with this metadata, allows reconstructing an HDR image from the SDR base.
See ISO 21496-1:2025 for the full specification.
Fields§
§is_multichannel: boolIf true, each RGB channel has independent gain map parameters.
If false, channels[0] applies to all three channels.
use_base_colour_space: boolIf true, the gain map is encoded in the base image’s colour space. If false, it’s in the alternate image’s colour space.
base_hdr_headroom_n: u32Base HDR headroom (numerator).
base_hdr_headroom_d: u32Base HDR headroom (denominator).
alternate_hdr_headroom_n: u32Alternate HDR headroom (numerator).
alternate_hdr_headroom_d: u32Alternate HDR headroom (denominator).
channels: [GainMapChannel; 3]Per-channel parameters. For single-channel mode, only index 0 is meaningful (indices 1 and 2 are copies of index 0).
Trait Implementations§
Source§impl Clone for GainMapMetadata
impl Clone for GainMapMetadata
Source§fn clone(&self) -> GainMapMetadata
fn clone(&self) -> GainMapMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more