Skip to main content

av1_frame_header_offset

Function av1_frame_header_offset 

Source
pub fn av1_frame_header_offset(sample: &[u8]) -> Option<u32>
Expand description

Locate the byte offset, within sample, of the uncompressed_header payload of the first Frame OBU (obu_type 3 or 6). Returns None if no such OBU is found.

AV1 OBU layout: 1-byte header + optional 1-byte extension + LEB128 size + payload. For a Frame OBU (type 6), the payload begins with uncompressed_header_obu() — so the byte offset we return is the first byte of uncompressed_header() in the original sample buffer. Vulkan VkVideoDecodeAV1PictureInfoKHR::frameHeaderOffset wants exactly this value.