pub struct GainMap {
pub width: u32,
pub height: u32,
pub chroma_width: u32,
pub chroma_height: u32,
pub y: SampleBuf,
pub cb: Option<SampleBuf>,
pub cr: Option<SampleBuf>,
pub chroma: ChromaFormat,
pub bit_depth: BitDepth,
pub color: ColorMetadata,
pub orientation: Orientation,
pub metadata: Option<Vec<u8>>,
}Expand description
Decoded HDR gain map carried as a HEIF auxiliary image.
Fields§
§width: u32Luma-plane dimensions.
height: u32§chroma_width: u32Dimensions of each chroma plane. Both are zero for monochrome maps.
chroma_height: u32§y: SampleBufGain-map luma samples.
cb: Option<SampleBuf>Gain-map blue-difference chroma samples. None for monochrome maps.
cr: Option<SampleBuf>Gain-map red-difference chroma samples. None for monochrome maps.
chroma: ChromaFormatChroma subsampling signaled by the gain-map HEVC SPS. The explicit chroma dimensions remain authoritative after display orientation; this matters for a 90°/270° rotation of a coded 4:2:2 map.
bit_depth: BitDepth§color: ColorMetadataColor signalling attached to the gain-map item. This matters for converting a three-channel gain map from YCbCr to RGB gains.
orientation: OrientationSource orientation from the gain-map item. Display-ready decode applies it to all present gain-map planes; raw-YUV decode leaves the samples in coded orientation, matching the parent image planes.
metadata: Option<Vec<u8>>Opaque metadata item directly associated with the gain-map auxiliary
image. Apple files normally store an XMP packet containing fields such
as HDRGainMapVersion and HDRGainMapHeadroom.