Expand description
§rusty_av2f — AV2F, an experimental still-image container for AV2
AV2F packages a single AV2 still picture in an ISOBMFF/HEIF file, in the
same shape AVIF uses for AV1: ftyp + meta + mdat, one image item, with
a codec configuration property.
§Read this before producing files
This is not an AOM standard. AVIF is defined by a published AOM
specification that fixes its brand, item type and configuration record. No
equivalent document exists for AV2 — so AV2F’s four-character codes are
chosen, not specified, and every one of them lives in fourcc so a
real specification can be adopted by editing one file.
Concretely: files written by this crate are readable by this crate and by nothing else. Do not ship them anywhere that expects interoperability. They are useful for pipeline work, for measuring AV2 against AVIF on still images, and for having the container ready the day a specification lands.
§Header forms
Both AV2 still-picture header forms are supported: the full form and the
compact single_picture_header_flag form — the natural choice for an image
format, and what AVIF does for AV1. (Early versions accepted only the full
form because rusty_av2d could not yet decode the compact one bit-exactly;
that landed in rusty_av2d 0.2.5 and the restriction is gone.)
§Example
use rusty_av2f::{encode, decode, Config, Params};
let file = encode(&Params { width: 432, height: 240, config: Config::default() }, &av2_still)?;
let img = decode(&file)?;
assert_eq!((img.width, img.height), (432, 240));Re-exports§
pub use config::Config;pub use config::Subsampling;
Modules§
- boxes
- Minimal ISOBMFF box writing and walking.
- config
- The
av2Cconfiguration record. - fourcc
- The entire experimental surface of this format, in one place.
Structs§
- Image
- A decoded AV2F file: the image description, and the coded AV2 payload.
- Params
- What
encodeneeds beyond the payload itself.
Enums§
- Error
- Everything that can go wrong reading or writing an AV2F file.