Modules§
Structs§
- Av2Encoder
- A reusable still-image encoder configured for one quality.
- Av2Frame
- Result of an encode: the AV2 bitstream plus the metadata needed to interpret it.
- Av2Video
Encoder - Stateful low-delay AV2 video encoder with a reusable thread budget and DPB.
- Cicp
- CICP-style color 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 signaling. - Content
Light Level - HDR content light level (CTA-861.3 / ISOBMFF
clli) - DarkAq
- Encode
Config - Encoder configuration shared by all entry points.
- ItutT35
- Raw ITU-T T.35 user metadata — emitted as AV1
ITUT_T35metadata OBU. - Mastering
Display - HDR mastering display color volume (SMPTE ST 2086) — emitted as AV1
HDR_MDCVmetadata OBU. - Metadata
- All optional metadata passed to the encoder, threaded through
crate::EncodeConfig. - Planar
Image - Tuning
- Encoder tuning knobs. Previously set through
AV2_*environment variables; now a plain config value carried byAv2Encoder.Tuning::defaultreproduces the shipping defaults exactly. - Video
Preset Config - Declared policy behind a
VideoPreset.reference_countreports the active implementation limit, not a future target. Partition fields become execution controls as the corresponding to inter block sto earches land.
Enums§
- BitDepth
- Supported coded bit depths. AV1 profile 0/1 cover 8 and 10; 12 needs profile 2. We model all three; only storage type differs (u8 vs u16).
- Chroma
Format - Chroma subsampling format for the AV1 encoder.
- Chroma
Sample Position - Color
Metadata - How the output color space is described in the AVIF container.
- Encode
Error - Matrix
Coefficients - CICP matrix coefficients for RGB→YCbCr (ISO/IEC 23091-2 Table 4).
- Orientation
- Primaries
- CICP color primaries (ISO/IEC 23091-2 Table 2).
- Speed
- Rate-distortion effort for the encoder’s mode search
- Transfer
Function - CICP transfer characteristics (ISO/IEC 23091-2 Table 3).
- TxPart
- Luma transform-partition strategy for a 64x64 superblock (replaces the old
AV2_TXPARTenv).ThreeWayRD-chooses among SPLIT/VERT4/HORZ4;Rd2restricts to {SPLIT,VERT4}; the rest force a single partition (mainly for testing). - Video
Preset - Product-level video speed/quality presets. These are intentionally separate
from the still-image
Speedtiers so video policy can grow without changing still-image behavior or preset compatibility. - Video
Rdoq Effort - Video
Threading Policy - Video
Transform Search
Traits§
Functions§
- av2_
map_ quality - Maps CLI quality 1–100 to AV2
base_q_idx1–254. quality 100 → q≈3 (near-lossless), quality 60 → q≈100, quality 1 → q=254. - encode_
gray8 - Encode an 8-bit grayscale image to AVIF using AV1 monochrome coding.
- encode_
gray10 - Encode a 10-bit grayscale image to AVIF.
- encode_
gray12 - Encode a 12-bit grayscale image to AVIF.
- encode_
gray_ alpha8 - Encode an 8-bit grayscale image plus a separate 8-bit alpha plane to AVIF.
- encode_
gray_ alpha10 - Encode a 10-bit grayscale image plus a separate 10-bit alpha plane to AVIF.
- encode_
gray_ alpha12 - Encode a 12-bit grayscale image plus a separate 12-bit alpha plane to AVIF.
- encode_
ivf - Convenience: encode a whole frame sequence to an in-memory IVF stream.
- encode_
lossless - Encode a lossless 4:4:4 AVIF still with color signaling.
- encode_
lossless_ gray - Encode a lossless grayscale (monochrome) AVIF still.
- encode_
lossless_ gray_ alpha - encode_
lossless_ gray_ obu - encode_
lossless_ obu - Encode a lossless 4:4:4 still with color signaling.
- encode_
lossless_ with_ alpha - Encode a lossless 4:4:4 AVIF still with color signaling.
- encode_
rgb8 - Encode an 8-bit RGB image to AVIF.
- encode_
rgb10 - Encode a 10-bit RGB image to AVIF.
- encode_
rgb12 - Encode a 12-bit RGB image to AVIF.
- encode_
rgba8 - Encode an 8-bit RGBA image to AVIF. The alpha channel is discarded.
- encode_
rgba8_ with_ alpha - Encode an 8-bit RGBA image to AVIF with a separate alpha auxiliary image.
- encode_
rgba10 - Encode a 10-bit RGBA image to AVIF. Alpha is discarded.
- encode_
rgba12 - Encode a 12-bit RGBA image to AVIF. Alpha is discarded.
- encode_
rgba10_ with_ alpha - Encode a 10-bit RGBA image to AVIF with a separate alpha auxiliary image.
- encode_
rgba12_ with_ alpha - Encode a 12-bit RGBA image to AVIF with a separate alpha auxiliary image.
- encode_
yuv8 - Encode a pre-converted 8-bit planar YCbCr image to AVIF.
- encode_
yuv10 - Encode a pre-converted 10-bit planar YCbCr image to AVIF.
- encode_
yuv12 - Encode a pre-converted 12-bit planar YCbCr image to AVIF.
- encode_
yuva8_ with_ alpha - Encode pre-converted 8-bit YCbCr + a separate 8-bit alpha plane to AVIF.
- encode_
yuva10_ with_ alpha - Encode pre-converted 10-bit YCbCr + a separate 10-bit alpha plane to AVIF.
- encode_
yuva12_ with_ alpha - Encode pre-converted 12-bit YCbCr + a separate 12-bit alpha plane to AVIF.