Skip to main content

parse_av1_frame_header

Function parse_av1_frame_header 

Source
pub fn parse_av1_frame_header(
    sample: &[u8],
    seq: &Av1SequenceHeader,
) -> Option<Av1FrameHeader>
Expand description

Parse an AV1 frame_header_obu (or the frame_header part of a frame_obu) from the given sample. Requires the sequence header for branch predicates (order_hint_bits, enable flags).

Returns an Av1FrameHeader with just enough fields populated for Vulkan Video decode to build StdVideoDecodeAV1PictureInfo + sub-structs. Does NOT fully parse the bitstream (skips large parts of the uncompressed_header โ€” tile_info, segmentation, global motion, etc. โ€” that can be defaulted for key frames).

Per AV1 spec ยง5.9.1 โ€” complex, branching parse. Only handles single-tile key frames at first; inter frames need more work on ref_frame_idx + delta_frame_id resolution.