A read-only view of one plane of a DecodedImage: a tightly packed,
row-major slice of the DecodedImage::planes buffer plus its geometry.
Samples are one byte each at 8-bit and little-endian u16 pairs at 10/12-bit
(bytes_per_sample says which); rows are contiguous, so the sample stride
equals width. Use this instead of recomputing plane offsets/strides by
hand — see DecodedImage::luma_plane, chroma_planes
and alpha_plane.
Display orientation, using the eight EXIF orientation values. HEIF expresses
orientation with a rotation property (irot, anticlockwise multiples of 90°)
and a mirror property (imir); the diagonal EXIF values map to a mirror
followed by a rotation.
Decode a HEIF file produced by garnetash’s *_to_heif entry points. The
embedded VVC stream is decoded to YCbCr, and the container is mined for side
data: display orientation (irot/imir) and color metadata (CICP nclx
and/or an embedded ICC profile) populate the returned image, and if the file
carries an alpha auxiliary image it is decoded and attached as
DecodedImage::alpha automatically. Hardened for untrusted input like
decode_266.
Decode a HEIF file, returning the color image and, separately, any alpha
auxiliary image. Retained for explicitness; decode now also attaches
the alpha to DecodedImage::alpha, so let img = decode(b)?; followed
by img.alpha is the simpler path.
Decode a raw Annex-B VVC intra still stream into reconstructed YCbCr samples.
This is the canonical YCbCr decode entry; decode_yuv_266 is a named alias for
it, mirroring encode_yuv_266 on the encode side.
Encode an 8-bit interleaved grayscale+alpha image (Y, A bytes) to a HEIF
file, preserving alpha as a monochrome auxiliary image. ya must hold
exactly width * height * 2 bytes.
Encode RGB and wrap the result in a HEIF container (ISO/IEC 23008-12), the
file form image viewers recognise. The primary item is a single VVC still
image (vvc1 / vvcC); see encode_rgb_266 for the encoding parameters.