pub struct H264SpsInfo {Show 29 fields
pub profile_idc: u8,
pub constraint_set_flags: u8,
pub level_idc: u8,
pub chroma_format_idc: u8,
pub separate_colour_plane_flag: bool,
pub bit_depth_luma: u8,
pub bit_depth_chroma: u8,
pub frame_mbs_only: bool,
pub width: Option<u32>,
pub height: Option<u32>,
pub log2_max_frame_num_minus4: Option<u8>,
pub pic_order_cnt_type: Option<u8>,
pub log2_max_pic_order_cnt_lsb_minus4: Option<u8>,
pub delta_pic_order_always_zero_flag: Option<bool>,
pub qpprime_y_zero_transform_bypass_flag: Option<bool>,
pub seq_scaling_matrix_present_flag: Option<bool>,
pub max_num_ref_frames: Option<u8>,
pub gaps_in_frame_num_value_allowed_flag: Option<bool>,
pub mb_adaptive_frame_field_flag: Option<bool>,
pub direct_8x8_inference_flag: Option<bool>,
pub frame_cropping_flag: Option<bool>,
pub frame_crop_left_offset: Option<u32>,
pub frame_crop_right_offset: Option<u32>,
pub frame_crop_top_offset: Option<u32>,
pub frame_crop_bottom_offset: Option<u32>,
pub offset_for_non_ref_pic: Option<i32>,
pub offset_for_top_to_bottom_field: Option<i32>,
pub num_ref_frames_in_pic_order_cnt_cycle: Option<u8>,
pub offset_for_ref_frame: Vec<i32>,
}Expand description
Parsed H.264 SPS fields relevant to the pipeline.
Populated by parse_h264_sps which walks the SPS through the frame
cropping offsets per ITU-T H.264 §7.3.2.1.1 and applies the display
rectangle derivation of §7.4.2.1.1 + Table 6-1 (SubWidthC /
SubHeightC) to produce the post-crop displayable width/height.
Width/height are Option<u32> because the full SPS walk can bail on
a malformed scaling list or an exotic pic_order_cnt_type branch;
profile_idc / chroma_format_idc are always populated on a
successful Some(_) return since they live in the SPS prefix before
any of the variable-length sections.
Fields§
§profile_idc: u8§constraint_set_flags: u8Packed 8-bit constraint_set_flags (Ch) — constraint_set0..5_flag in the high 6 bits, 2 reserved_zero bits. Preserved verbatim for Std struct output.
level_idc: u8§chroma_format_idc: u8§separate_colour_plane_flag: bool§bit_depth_luma: u8§bit_depth_chroma: u8§frame_mbs_only: bool§width: Option<u32>Post-crop width in luma samples, or None if the parse stopped before reaching the cropping fields.
height: Option<u32>§log2_max_frame_num_minus4: Option<u8>log2_max_frame_num_minus4 — slice headers carry
frame_num as u(log2_max_frame_num_minus4 + 4) bits.
None if the dims parse bailed before reaching this field.
pic_order_cnt_type: Option<u8>0 / 1 / 2 per §7.4.2.1. Controls which POC fields the slice header carries.
log2_max_pic_order_cnt_lsb_minus4: Option<u8>Valid when pic_order_cnt_type == 0. Bit width of
pic_order_cnt_lsb in the slice header: log2_max_pic_order_cnt_lsb_minus4 + 4.
delta_pic_order_always_zero_flag: Option<bool>Valid when pic_order_cnt_type == 1. Gates the slice header’s
delta_pic_order_cnt[0..1] branch.
qpprime_y_zero_transform_bypass_flag: Option<bool>§seq_scaling_matrix_present_flag: Option<bool>§max_num_ref_frames: Option<u8>§gaps_in_frame_num_value_allowed_flag: Option<bool>§mb_adaptive_frame_field_flag: Option<bool>Only meaningful when !frame_mbs_only.
direct_8x8_inference_flag: Option<bool>§frame_cropping_flag: Option<bool>§frame_crop_left_offset: Option<u32>§frame_crop_right_offset: Option<u32>§frame_crop_top_offset: Option<u32>§frame_crop_bottom_offset: Option<u32>§offset_for_non_ref_pic: Option<i32>Valid when pic_order_cnt_type == 1.
offset_for_top_to_bottom_field: Option<i32>§num_ref_frames_in_pic_order_cnt_cycle: Option<u8>§offset_for_ref_frame: Vec<i32>Populated only when pic_order_cnt_type == 1. Length equals
num_ref_frames_in_pic_order_cnt_cycle (0..=255). Spec allows
up to 256 entries but no real-world stream exercises the full
range.
Trait Implementations§
Source§impl Clone for H264SpsInfo
impl Clone for H264SpsInfo
Source§fn clone(&self) -> H264SpsInfo
fn clone(&self) -> H264SpsInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for H264SpsInfo
impl Debug for H264SpsInfo
impl Eq for H264SpsInfo
Source§impl PartialEq for H264SpsInfo
impl PartialEq for H264SpsInfo
Source§fn eq(&self, other: &H264SpsInfo) -> bool
fn eq(&self, other: &H264SpsInfo) -> bool
self and other values to be equal, and is used by ==.