Skip to main content

Module hdr_passthrough

Module hdr_passthrough 

Source
Expand description

HDR metadata passthrough and conversion for the transcode pipeline.

Supports HDR10 (static metadata via SMPTE ST 2086 + CTA-861.3), HLG (Hybrid Log-Gamma, ITU-R BT.2100), and a Dolby Vision profile descriptor. Metadata can be passed through unchanged, converted between compatible transfer-function families, or stripped.

§Transfer function compatibility

  HDR10 (PQ/ST2084) <──> HLG (BT.2100)   ← approximate inverse-OOTF path
  HDR10 ──> SDR (BT.709)                  ← tone-map; PQ → BT.1886
  HLG   ──> SDR (BT.709)                  ← HLG OOTF collapse

Full pixel-level tone-mapping is provided by oximedia-hdr; this module handles the metadata side: mastering-display descriptors, content-light levels, and transfer-function flags embedded in the bitstream.

Structs§

ContentLightLevel
Content light level metadata (CTA-861.3 MaxCLL / MaxFALL).
DolbyVisionMeta
Dolby Vision metadata payload attached to a stream.
DolbyVisionRpu
Dolby Vision RPU (Reference Processing Unit) passthrough handler.
DvRpuPassthrough
Manages a stream of Dolby Vision RPUs for passthrough mode.
Hdr10PlusDynamicMeta
HDR10+ dynamic metadata for a single scene or frame.
HdrMetadata
Unified HDR metadata attached to a video stream.
HdrProcessor
Applies an HdrPassthroughMode to a source HdrMetadata bundle, producing the metadata that should be written to the output stream.
HdrToSdrConfig
Configuration for HDR→SDR tonemapping.
MasteringDisplay
Mastering display colour volume (SMPTE ST 2086).
SdrToHdrConfig
Configuration for SDR→HDR inverse tonemapping.

Enums§

ColourPrimaries
Video colour primaries (H.273 table 2).
DolbyVisionProfile
Dolby Vision profile and level.
HdrError
Errors that can occur during HDR metadata handling.
HdrPassthroughMode
How HDR metadata should be handled when transcoding.
MetadataRepairAction
Metadata repair actions that can be applied automatically.
TonemapCurve
Tonemapping curve type for HDR↔SDR conversion.
TransferFunction
Video transfer function (EOTF / OETF).

Functions§

decode_cll_sei
Decodes a 4-byte CTA-861.3 payload back into ContentLightLevel.
decode_mastering_display_sei
Decodes a 24-byte SMPTE ST 2086 SEI payload back into a MasteringDisplay.
encode_cll_sei
Serialises ContentLightLevel into the 4-byte CTA-861.3 payload (MaxCLL u16 BE, MaxFALL u16 BE).
encode_mastering_display_sei
Serialises a MasteringDisplay into the 24-byte SMPTE ST 2086 SEI payload format used by HEVC and (via the same layout) AV1 metadata OBUs.
repair_hdr_metadata
Attempts to repair common HDR metadata issues in-place.