Struct SliceHeader

Source
pub struct SliceHeader {
Show 32 fields pub first_mb_in_slice: u32, pub slice_type: SliceType, pub pic_parameter_set_id: u8, pub colour_plane_id: u8, pub frame_num: u16, pub field_pic_flag: bool, pub bottom_field_flag: bool, pub idr_pic_id: u16, pub pic_order_cnt_lsb: u16, pub delta_pic_order_cnt_bottom: i32, pub delta_pic_order_cnt: [i32; 2], pub redundant_pic_cnt: u8, pub direct_spatial_mv_pred_flag: bool, pub num_ref_idx_active_override_flag: bool, pub num_ref_idx_l0_active_minus1: u8, pub num_ref_idx_l1_active_minus1: u8, pub ref_pic_list_modification_flag_l0: bool, pub ref_pic_list_modification_l0: Vec<RefPicListModification>, pub ref_pic_list_modification_flag_l1: bool, pub ref_pic_list_modification_l1: Vec<RefPicListModification>, pub pred_weight_table: PredWeightTable, pub dec_ref_pic_marking: RefPicMarking, pub cabac_init_idc: u8, pub slice_qp_delta: i8, pub sp_for_switch_flag: bool, pub slice_qs_delta: i8, pub disable_deblocking_filter_idc: u8, pub slice_alpha_c0_offset_div2: i8, pub slice_beta_offset_div2: i8, pub max_pic_num: u32, pub header_bit_size: usize, pub n_emulation_prevention_bytes: usize,
}

Fields§

§first_mb_in_slice: u32

Specifies the address of the first macroblock in the slice.

§slice_type: SliceType

Specifies the coding type of the slice according to Table 7-6.

§pic_parameter_set_id: u8§colour_plane_id: u8

Specifies the colour plane associated with the current slice RBSP when separate_colour_plane_flag is set.

§frame_num: u16

Used as an identifier for pictures and shall be represented by log2_max_frame_num_minus4 + 4 bits in the bitstream.

§field_pic_flag: bool

If set, specifies that the slice is a slice of a coded field. If not set, specifies that the slice is a slice of a coded frame.

§bottom_field_flag: bool

If set, specifies that the slice is part of a coded bottom field. If not set, specifies that the picture is a coded top field.

§idr_pic_id: u16

Identifies an IDR picture. The values of idr_pic_id in all the slices of an IDR picture shall remain unchanged. When two consecutive access units in decoding order are both IDR access units, the value of idr_pic_id in the slices of the first such IDR access unit shall differ from the idr_pic_id in the second such IDR access unit

§pic_order_cnt_lsb: u16

Specifies the picture order count modulo MaxPicOrderCntLsb for the top field of a coded frame or for a coded field. The length of the pic_order_cnt_lsb syntax element is log2_max_pic_order_cnt_lsb_minus4 + 4 bits.

§delta_pic_order_cnt_bottom: i32

Specifies the picture order count difference between the bottom field and the top field of a coded frame as follows

§delta_pic_order_cnt: [i32; 2]

The first entry specifies the picture order count difference from the expected picture order count for the top field of a coded frame or for a coded field as specified in clause 8.2.1 The second entry specifies the picture order count difference from the expected picture order count for the bottom field of a coded frame specified in clause 8.2.1.

§redundant_pic_cnt: u8

Shall be equal to 0 for slices and slice data partitions belonging to the primary coded picture. The value of redundant_pic_cnt shall be greater than 0 for coded slices or coded slice data partitions of a redundant coded picture

§direct_spatial_mv_pred_flag: bool

Specifies the method used in the decoding process to derive motion vectors and reference indices for inter prediction >

§num_ref_idx_active_override_flag: bool

If set, specifies that the syntax element num_ref_idx_l0_active_minus1 is present for P, SP, and B slices and that the syntax element num_ref_idx_l1_active_minus1 is present for B slices. If not set, specifies that the syntax elements num_ref_idx_l0_active_minus1 and num_ref_idx_l1_active_minus1 are not present.

§num_ref_idx_l0_active_minus1: u8

Specifies the maximum reference index for reference picture list 0 that shall be used to decode the slice.

§num_ref_idx_l1_active_minus1: u8

Specifies the maximum reference index for reference picture list 1 that shall be used to decode the slice.

§ref_pic_list_modification_flag_l0: bool

If set, specifies that the syntax element modification_of_pic_nums_idc is present for specifying reference picture list 0. If not set, specifies that this syntax element is not present.

§ref_pic_list_modification_l0: Vec<RefPicListModification>

Reference picture list 0 modification as parsed with the ref_pic_list_modification() process.

§ref_pic_list_modification_flag_l1: bool

If set, specifies that the syntax element modification_of_pic_nums_idc is present for specifying reference picture list 1. If not set, specifies that this syntax element is not present.

§ref_pic_list_modification_l1: Vec<RefPicListModification>

Reference picture list 1 modification as parsed with the ref_pic_list_modification() process.

§pred_weight_table: PredWeightTable

Prediction weight table as parsed using 7.3.3.2

§dec_ref_pic_marking: RefPicMarking

Decoded reference picture marking parsed using 7.3.3.3

§cabac_init_idc: u8

Specifies the index for determining the initialization table used in the initialization process for context variables.

§slice_qp_delta: i8

Specifies the initial value of QP Y to be used for all the macroblocks in the slice until modified by the value of mb_qp_delta in the macroblock layer. The initial QPY quantization parameter for the slice is computed using 7-30.

§sp_for_switch_flag: bool

Specifies the decoding process to be used to decode P macroblocks in an SP slice.

§slice_qs_delta: i8

Specifies the value of QSY for all the macroblocks in SP and SI slices. The QSY quantization parameter for the slice is computed using 7-31.

§disable_deblocking_filter_idc: u8

Specifies whether the operation of the deblocking filter shall be disabled across some block edges of the slice and specifies for which edges the filtering is disabled.

§slice_alpha_c0_offset_div2: i8

Specifies the offset used in accessing the α and tC0 deblocking filter tables for filtering operations controlled by the macroblocks within the slice. From this value, the offset that shall be applied when addressing these tables shall be computed using 7-32.

§slice_beta_offset_div2: i8

Specifies the offset used in accessing the β deblocking filter table for filtering operations controlled by the macroblocks within the slice. From this value, the offset that is applied when addressing the β table of the deblocking filter shall be computed using 7-33.

§max_pic_num: u32

Same as MaxPicNum in the specification.

§header_bit_size: usize

Size of the slice_header() in bits

§n_emulation_prevention_bytes: usize

Number of emulation prevention bytes (EPB) in this slice_header()

Implementations§

Source§

impl SliceHeader

Source

pub fn field(&self) -> Field

Returns the field that is coded by this header.

Trait Implementations§

Source§

impl Clone for SliceHeader

Source§

fn clone(&self) -> SliceHeader

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SliceHeader

Source§

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

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

impl Default for SliceHeader

Source§

fn default() -> SliceHeader

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

impl PartialEq for SliceHeader

Source§

fn eq(&self, other: &SliceHeader) -> 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 SliceHeader

Source§

impl StructuralPartialEq for SliceHeader

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.