Skip to main content

parse_h264_pps

Function parse_h264_pps 

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

Walk an Annex-B sample looking for the first NAL of type 8 (PPS) and decode its syntax elements. Returns None when no PPS is in the sample or the syntax is truncated before redundant_pic_cnt_present_flag (the last required field).

The FMO (Flexible Macroblock Ordering) sub-branches for num_slice_groups_minus1 > 0 / slice_group_map_type=0/2/3..5/6 are skipped correctly but not reported — no consumer today needs the slice-group map (FMO is forbidden in Main and High profiles, and every stream our decoder touches is Main/High).