#[non_exhaustive]pub struct AV1Metadata {
pub still_picture: bool,
pub max_frame_width: NonZeroU32,
pub max_frame_height: NonZeroU32,
pub bit_depth: u8,
pub seq_profile: u8,
pub chroma_subsampling: ChromaSubsampling,
pub monochrome: bool,
pub base_q_idx: Option<u8>,
pub lossless: Option<bool>,
}Expand description
AV1 sequence header metadata parsed from an OBU bitstream.
See AvifParser::primary_metadata() and AV1Metadata::parse_av1_bitstream().
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.still_picture: boolShould be true for non-animated AVIF
max_frame_width: NonZeroU32§max_frame_height: NonZeroU32§bit_depth: u88, 10, or 12
seq_profile: u80, 1 or 2 for the level of complexity
chroma_subsampling: ChromaSubsamplingChroma subsampling. Use named fields (horizontal, vertical) or
constants like ChromaSubsampling::YUV420.
monochrome: bool§base_q_idx: Option<u8>AV1 base quantizer index (0-255) from the first frame header.
None if the frame header could not be parsed.
0 = lossless candidate, 255 = worst quality.
lossless: Option<bool>Whether the encoding is lossless (all quantization parameters are zero
and chroma is not subsampled).
None if the frame header could not be parsed.
Implementations§
Source§impl AV1Metadata
impl AV1Metadata
Sourcepub fn parse_av1_bitstream(obu_bitstream: &[u8]) -> Result<Self>
pub fn parse_av1_bitstream(obu_bitstream: &[u8]) -> Result<Self>
Parses raw AV1 bitstream (sequence header + optional frame header).
Extracts sequence-level metadata and attempts to parse the first frame header for quantization/lossless detection.
This is for the bare image payload from an encoder, not an AVIF/HEIF file.
To parse AVIF files, see AvifParser::from_reader().
Trait Implementations§
Source§impl Clone for AV1Metadata
impl Clone for AV1Metadata
Source§fn clone(&self) -> AV1Metadata
fn clone(&self) -> AV1Metadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more