Documentation
¶
Overview ¶
Package hdr reads and writes the metadata HDR10 and HDR10+ video carries beside its pictures: the mastering display colour volume and content light level (static, SMPTE ST 2086 and CTA-861.3), and HDR10+'s dynamic metadata (SMPTE ST 2094-40, as an ITU-T T.35 message). In HEVC they are SEI messages; in AV1, metadata OBUs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AV1StaticOBUs ¶
AV1StaticOBUs are metadata OBUs carrying the static metadata.
func HDR10PlusPeak ¶ added in v0.14.0
HDR10PlusPeak is the brightest a scene's pixels are, in cd/m², as its HDR10+ metadata (a T.35 payload, SMPTE ST 2094-40) gives it: the first window's largest maxscl. ok is false when the payload says nothing.
func HEVCStaticSEI ¶
HEVCStaticSEI is a prefix SEI NAL unit (without start code) carrying the static metadata, or nil when there is none.
func HEVCT35SEI ¶
HEVCT35SEI is a prefix SEI NAL unit carrying a T.35 payload (HDR10+).
func IsHDR10Plus ¶
IsHDR10Plus reports whether a T.35 payload is HDR10+ metadata.
Types ¶
type HEVCMetadata ¶
type HEVCMetadata struct {
Static Static
// HDR10Plus is the T.35 payload of HDR10+ metadata for this picture,
// nil when there is none.
HDR10Plus []byte
}
HEVCMetadata is what an access unit's SEI carries.
func ParseHEVC ¶
func ParseHEVC(au []byte) HEVCMetadata
ParseHEVC reads the HDR metadata from an HEVC access unit's prefix SEI NAL units (Annex B).
type LightLevel ¶
type LightLevel struct {
MaxCLL, MaxFALL uint16
}
LightLevel is the content light level: the brightest pixel (MaxCLL) and the brightest frame average (MaxFALL), in cd/m².
type Mastering ¶
type Mastering struct {
// Primaries are green, blue and red (the SEI's order), each x then y.
Primaries [3][2]uint16
WhitePoint [2]uint16
MaxLuma uint32
MinLuma uint32
}
Mastering is the mastering display's colour volume, in the units the SEI uses: chromaticities in 0.00002, luminance in 0.0001 cd/m².