Struct Sps

Source
pub struct Sps {
Show 40 fields pub seq_parameter_set_id: u8, pub profile_idc: u8, pub constraint_set0_flag: bool, pub constraint_set1_flag: bool, pub constraint_set2_flag: bool, pub constraint_set3_flag: bool, pub constraint_set4_flag: bool, pub constraint_set5_flag: bool, pub level_idc: Level, pub chroma_format_idc: u8, pub separate_colour_plane_flag: bool, pub bit_depth_luma_minus8: u8, pub bit_depth_chroma_minus8: u8, pub qpprime_y_zero_transform_bypass_flag: bool, pub seq_scaling_matrix_present_flag: bool, pub scaling_lists_4x4: [[u8; 16]; 6], pub scaling_lists_8x8: [[u8; 64]; 6], pub log2_max_frame_num_minus4: u8, pub pic_order_cnt_type: u8, pub log2_max_pic_order_cnt_lsb_minus4: u8, pub delta_pic_order_always_zero_flag: bool, pub offset_for_non_ref_pic: i32, pub offset_for_top_to_bottom_field: i32, pub num_ref_frames_in_pic_order_cnt_cycle: u8, pub offset_for_ref_frame: [i32; 255], pub max_num_ref_frames: u8, pub gaps_in_frame_num_value_allowed_flag: bool, pub pic_width_in_mbs_minus1: u16, pub pic_height_in_map_units_minus1: u16, pub frame_mbs_only_flag: bool, pub mb_adaptive_frame_field_flag: bool, pub direct_8x8_inference_flag: bool, pub frame_cropping_flag: bool, pub frame_crop_left_offset: u32, pub frame_crop_right_offset: u32, pub frame_crop_top_offset: u32, pub frame_crop_bottom_offset: u32, pub expected_delta_per_pic_order_cnt_cycle: i32, pub vui_parameters_present_flag: bool, pub vui_parameters: VuiParams,
}
Expand description

A H264 Sequence Parameter Set. A syntax structure containing syntax elements that apply to zero or more entire coded video sequences as determined by the content of a seq_parameter_set_id syntax element found in the picture parameter set referred to by the pic_parameter_set_id syntax element found in each slice header.

Fields§

§seq_parameter_set_id: u8

Identifies the sequence parameter set that is referred to by the picture parameter set

§profile_idc: u8

Profile to which the coded video sequence conforms

§constraint_set0_flag: bool

Retains the same meaning as in the specification. See 7.4.2.1.1

§constraint_set1_flag: bool

Retains the same meaning as in the specification. See 7.4.2.1.1

§constraint_set2_flag: bool

Retains the same meaning as in the specification. See 7.4.2.1.1

§constraint_set3_flag: bool

Retains the same meaning as in the specification. See 7.4.2.1.1

§constraint_set4_flag: bool

Retains the same meaning as in the specification. See 7.4.2.1.1

§constraint_set5_flag: bool

Retains the same meaning as in the specification. See 7.4.2.1.1

§level_idc: Level

Level to which the coded video sequence conforms

§chroma_format_idc: u8

Specifies the chroma sampling relative to the luma sampling as specified in clause 6.2.

§separate_colour_plane_flag: bool

Specifies whether the three colour components of the 4:4:4 chroma format are coded separately.

§bit_depth_luma_minus8: u8

Specifies the bit depth of the samples of the luma array and the value of the luma quantization parameter range offset QpBdOffsetY. See 7-3 and 7-4.

§bit_depth_chroma_minus8: u8

Specifies the bit depth of the samples of the chroma arrays and the value of the chroma quantization parameter range offset QpBdOffsetC. See 7-5 and 7-6.

§qpprime_y_zero_transform_bypass_flag: bool

qpprime_y_zero_transform_bypass_flag equal to 1 specifies that, when QP′Y is equal to 0, a transform bypass operation for the transform coefficient decoding process and picture construction process prior to deblocking filter process as specified in clause 8.5 shall be applied. qpprime_y_zero_transform_bypass_flag equal to 0 specifies that the transform coefficient decoding process and picture construction process prior to deblocking filter process shall not use the transform bypass operation QP′Y is defined in 7-38 as QP′Y = QPY + QpBdOffsetY

§seq_scaling_matrix_present_flag: bool

Whether seq_scaling_list_present_flag[i] for i = 0..7 or i = 0..11 is present or whether the sequence level scaling list shall be specified by Flat_4x4_16 for i = 0..5 and flat_8x8_16 for i = 6..11

§scaling_lists_4x4: [[u8; 16]; 6]

4x4 Scaling list as read with 7.3.2.1.1.1

§scaling_lists_8x8: [[u8; 64]; 6]

8x8 Scaling list as read with 7.3.2.1.1.1

§log2_max_frame_num_minus4: u8

Specifies the value of the variable MaxFrameNum that is used in frame_num related derivations as follows: MaxFrameNum = 2 ^ (log2_max_frame_num_minus4 + 4 )

§pic_order_cnt_type: u8

Specifies the method to decode picture order count (as specified in clause 8.2.1)

§log2_max_pic_order_cnt_lsb_minus4: u8

Specifies the value of the variable MaxPicOrderCntLsb that is used in the decoding process for picture order count as specified in clause 8.2.1 as follows: MaxPicOrderCntLsb = 2 ^ ( log2_max_pic_order_cnt_lsb_minus4 + 4 ).

§delta_pic_order_always_zero_flag: bool

If true, specifies that delta_pic_order_cnt[0] and delta_pic_order_cnt[1] are not present in the slice headers of the sequence and shall be inferred to be equal to 0. If false, specifies that delta_pic_order_cnt[0] is present in the slice headers of the sequence and delta_pic_order_cnt[1] may be present in the slice headers of the sequence.

§offset_for_non_ref_pic: i32

Used to calculate the picture order count of a non-reference picture as specified in clause 8.2.1.

§offset_for_top_to_bottom_field: i32

Used to calculate the picture order count of a bottom field as specified in clause 8.2.1.

§num_ref_frames_in_pic_order_cnt_cycle: u8

Used in the decoding process for picture order count as specified in clause 8.2.1

§offset_for_ref_frame: [i32; 255]

An element of a list of num_ref_frames_in_pic_order_cnt_cycle values used in the decoding process for picture order count as specified in clause 8.2.

§max_num_ref_frames: u8

Specifies the maximum number of short-term and long-term reference frames, complementary reference field pairs, and non-paired reference fields that may be used by the decoding process for inter prediction of any picture in the coded video sequence. Also determines the size of the sliding window operation as specified in clause 8.2.5.3.

§gaps_in_frame_num_value_allowed_flag: bool

Specifies the allowed values of frame_num as specified in clause 7.4.3 and the decoding process in case of an inferred gap between values of frame_num as specified in clause 8.2.5.2

§pic_width_in_mbs_minus1: u16

Plus 1 specifies the width of each decoded picture in units of macroblocks.

§pic_height_in_map_units_minus1: u16

Plus 1 specifies the height in slice group map units of a decoded frame or field.

§frame_mbs_only_flag: bool

If true, specifies that every coded picture of the coded video sequence is a coded frame containing only frame macroblocks, else specifies that coded pictures of the coded video sequence may either be coded fields or coded frames.

§mb_adaptive_frame_field_flag: bool

If true, specifies the possible use of switching between frame and field macroblocks within frames, else, specifies no switching between frame and field macroblocks within a picture.

§direct_8x8_inference_flag: bool

Specifies the method used in the derivation process for luma motion vectors for B_Skip, B_Direct_16x16 and B_Direct_8x8 as specified in clause 8.4.1.2.

§frame_cropping_flag: bool

If true, specifies that the frame cropping offset parameters follow next in the sequence parameter, else specifies that the frame cropping offset parameters are not present

§frame_crop_left_offset: u32

Specify the samples of the pictures in the coded video sequence that are output from the decoding process, in terms of a rectangular region specified in frame coordinates for output.

§frame_crop_right_offset: u32

Specify the samples of the pictures in the coded video sequence that are output from the decoding process, in terms of a rectangular region specified in frame coordinates for output.

§frame_crop_top_offset: u32

Specify the samples of the pictures in the coded video sequence that are output from the decoding process, in terms of a rectangular region specified in frame coordinates for output.

§frame_crop_bottom_offset: u32

Specify the samples of the pictures in the coded video sequence that are output from the decoding process, in terms of a rectangular region specified in frame coordinates for output.

§expected_delta_per_pic_order_cnt_cycle: i32

Same as ExpectedDeltaPerPicOrderCntCycle, see 7-12 in the specification.

§vui_parameters_present_flag: bool§vui_parameters: VuiParams

Implementations§

Source§

impl Sps

Source

pub const fn width(&self) -> u32

Returns the coded width of the stream.

See 7-13 through 7-17 in the specification.

Source

pub const fn height(&self) -> u32

Returns the coded height of the stream.

See 7-13 through 7-17 in the specification.

Source

pub const fn chroma_array_type(&self) -> u8

Returns ChromaArrayType, as computed in the specification.

Source

pub fn max_frame_num(&self) -> u32

Same as MaxFrameNum. See 7-10 in the specification.

Source

pub fn visible_rectangle(&self) -> Rect<u32>

Source

pub fn max_dpb_frames(&self) -> usize

Source

pub fn max_num_order_frames(&self) -> u32

Trait Implementations§

Source§

impl Debug for Sps

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Sps

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Sps

Source§

fn eq(&self, other: &Sps) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Sps

Source§

impl StructuralPartialEq for Sps

Auto Trait Implementations§

§

impl Freeze for Sps

§

impl RefUnwindSafe for Sps

§

impl Send for Sps

§

impl Sync for Sps

§

impl Unpin for Sps

§

impl UnwindSafe for Sps

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.