pub struct HdrMetadata {
pub transfer: TransferFunction,
pub content_light_level: Option<ContentLightLevel>,
pub mastering_display: Option<MasteringDisplay>,
}redundant with zencodec::Metadata and frozen-shaped; carry ContentLightLevel / MasteringDisplay directly. Removal queued for 0.3.0.
Expand description
Describes the HDR characteristics of pixel data.
Bundles transfer function, content light level, and mastering display metadata to provide everything needed for HDR processing.
ยงDeprecated
This bundle is a redundant, weaker duplicate of the codec-layer carrier
zencodec::Metadata (which the codecs actually populate, and which also
carries CICP, ICC, EXIF/XMP, and orientation). It bundles transfer with
CLL/mastering, which the prior art uniformly keeps separate (transfer
belongs on the PixelDescriptor; CLL and
mastering are independent optional metadata). It has frozen public fields
(not #[non_exhaustive]), so the absolute-luminance anchor and gain-map
fields HDR needs cannot be added without a break. Scheduled for removal in
0.3.0 โ see CHANGELOG.md โQUEUED BREAKING CHANGESโ. Carry CLL and
mastering as the standalone ContentLightLevel / MasteringDisplay
types, or use zencodec::Metadata.
Fieldsยง
ยงtransfer: TransferFunctionredundant with zencodec::Metadata and frozen-shaped; carry ContentLightLevel / MasteringDisplay directly. Removal queued for 0.3.0.
Transfer function (PQ, HLG, sRGB, Linear, etc.).
content_light_level: Option<ContentLightLevel>redundant with zencodec::Metadata and frozen-shaped; carry ContentLightLevel / MasteringDisplay directly. Removal queued for 0.3.0.
Content light level (MaxCLL/MaxFALL). Optional.
mastering_display: Option<MasteringDisplay>redundant with zencodec::Metadata and frozen-shaped; carry ContentLightLevel / MasteringDisplay directly. Removal queued for 0.3.0.
Mastering display color volume. Optional.
Implementationsยง
Sourceยงimpl HdrMetadata
impl HdrMetadata
Sourcepub fn hdr10(cll: ContentLightLevel) -> Self
pub fn hdr10(cll: ContentLightLevel) -> Self
Create HDR10 metadata with PQ transfer.
The mastering display is MasteringDisplay::HDR10_REFERENCE โ the
generic 1000-nit reference mastering volume, not measured
metadata from any real mastering session. Replace it when the
source carries an actual SMPTE ST 2086 record.
Trait Implementationsยง
Sourceยงimpl Clone for HdrMetadata
impl Clone for HdrMetadata
Sourceยงfn clone(&self) -> HdrMetadata
fn clone(&self) -> HdrMetadata
1.0.0 (const: unstable) ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for HdrMetadata
Sourceยงimpl Debug for HdrMetadata
impl Debug for HdrMetadata
Sourceยงimpl PartialEq for HdrMetadata
impl PartialEq for HdrMetadata
Sourceยงfn eq(&self, other: &HdrMetadata) -> bool
fn eq(&self, other: &HdrMetadata) -> bool
self and other values to be equal, and is used by ==.