pub fn from_apple_headroom(info: &AppleHdrInfo) -> Option<GainMapParams>Expand description
Map recovered Apple headroom to the canonical GainMapMetadata
(= zencodec::GainMapParams).
The base image is SDR (base_hdr_headroom = 0); the alternate (HDR)
headroom is the computed stops value (already log2-domain, matching
GainMapParams). Per-channel gain spans [0, stops] in log2 with unit
gamma — the Apple convention where the [0,1] gain-map image scales
luminance from SDR up to the headroom. Returns None when no 0x21
headroom tag is present.
Note: the per-channel curve is the documented Apple convention; the gain-map round-trip test is the authority on fidelity.