Skip to main content

Crate hpvca

Crate hpvca 

Source

Structs§

ColorEncoding
CICP-style colour encoding: the primaries + transfer + matrix the image is authored in, plus the sample range. Drives both the HEIF colr (nclx) box and the HEVC VUI signalling.
ContentLightLevel
HDR content light level (CTA-861.3 / ISOBMFF clli): the maximum content light level (MaxCLL) and maximum frame-average light level (MaxFALL), both in cd/m² (nits). Written as the ContentLightLevelBox.
EncodeConfig
Encoder configuration. Build with EncodeConfig::new and the with_* methods, then pass to encode / encode_with_alpha / encode_yuv.
Metadata
All optional metadata passed to the encoder, threaded through crate::EncodeConfig.
Yuv
Planar YCbCr image

Enums§

BitDepth
ChromaFormat
Chroma subsampling mode.
ColorMetadata
How the output colour space is described in the file. Either an enumerated CICP encoding (compact nclx) or an embedded ICC profile (prof).
EncodeError
MatrixCoefficients
CICP matrix coefficients for RGB→YCbCr (ISO/IEC 23091-2 Table 4).
Orientation
PixelLayout
Primaries
CICP colour primaries (ISO/IEC 23091-2 Table 2).
TransferFunction
CICP transfer characteristics (ISO/IEC 23091-2 Table 3).

Functions§

encode
Encode a native-depth planar pixel buffer to HEIC using cfg.
encode_heic
Encode a packed 8-bit RGB image to HEIC (4:2:0, 8-bit, sRGB ICC).
encode_heic_fmt
Encode a packed 8-bit RGB image to HEIC with an explicit chroma format.
encode_heic_fmt_bd
Encode a native-depth u16 RGB image to HEIC with explicit chroma and bit depth.
encode_heic_gray_alpha
Encode a packed 8-bit grayscale + alpha image to HEIC with a separate alpha auxiliary image. ya must hold exactly width * height * 2 bytes in Y, A order.
encode_heic_gray_alpha_bd
Encode a native-depth u16 grayscale + alpha image to HEIC at an explicit bit depth. ya must hold exactly width * height * 2 samples in Y, A order at bit_depth’s native range.
encode_heic_with_alpha
Encode a packed 8-bit RGBA image to HEIC with a separate alpha auxiliary image (4:2:0, 8-bit).
encode_heic_with_alpha_bd
Encode a native-depth u16 RGBA image to HEIC with a separate alpha auxiliary image at an explicit bit depth.
encode_with_alpha
Encode a native-depth RGBA pixel buffer to HEIC, preserving the alpha channel as a separate monochrome auxiliary image per ISO/IEC 23008-12.
encode_yuv
Encode pre-converted planar YCbCr directly, skipping the RGB→YCbCr step.