Struct SubLayerHrdParameters

Source
pub struct SubLayerHrdParameters {
    pub bit_rate_value_minus1: u32,
    pub cpb_size_value_minus1: u32,
    pub cpb_size_du_value_minus1: Option<u64>,
    pub bit_rate_du_value_minus1: Option<u64>,
    pub cbr_flag: bool,
    /* private fields */
}
Expand description

Sub-layer HRD parameters.

sub_layer_hrd_parameters(subLayerId)

  • ISO/IEC 23008-2 - E.2.3
  • ISO/IEC 23008-2 - E.3.3

Fields§

§bit_rate_value_minus1: u32

Specifies (together with bit_rate_scale) the maximum input bit rate for the i-th CPB when the CPB operates at the access unit level.

For any i > 0, bit_rate_value_minus1[i] is greater than bit_rate_value_minus1[i − 1].

The value is in range [0, 2^32 - 2].

Defines BitRate[i].

§cpb_size_value_minus1: u32

Used together with cpb_size_scale to specify the i-th CPB size when the CPB operates at the access unit level.

For any i > 0, cpb_size_value_minus1[i] is less than or equal to cpb_size_value_minus1[i − 1].

The value is in range [0, 2^32 - 2].

Defines CpbSize[i].

§cpb_size_du_value_minus1: Option<u64>

Used together with cpb_size_du_scale to specify the i-th CPB size when the CPB operates at sub-picture level.

For any i > 0, cpb_size_du_value_minus1[i] is less than or equal to cpb_size_du_value_minus1[i − 1].

The value is in range [0, 2^32 - 2].

Defines CpbSize[i].

§bit_rate_du_value_minus1: Option<u64>

Specifies (together with bit_rate_scale) the maximum input bit rate for the i-th CPB when the CPB operates at the sub-picture level.

For any i > 0, bit_rate_du_value_minus1[i] shall be greater than bit_rate_du_value_minus1[i − 1].

The value is in range [0, 2^32 - 2].

Defines BitRate[i].

§cbr_flag: bool

Equal to false specifies that to decode this CVS by the HRD using the i-th CPB specification, the hypothetical stream scheduler (HSS) operates in an intermittent bit rate mode.

Equal to true specifies that the HSS operates in a constant bit rate (CBR) mode.

Implementations§

Source§

impl SubLayerHrdParameters

Source

pub fn bit_rate( &self, sub_pic_hrd_flag: bool, bit_rate_scale: u8, br_vcl_factor: u64, br_nal_factor: u64, max_br: u64, ) -> u64

When SubPicHrdFlag is equal to false, the bit rate in bits per second is given by: BitRate[i] = (bit_rate_value_minus1[ i ] + 1) * 2^(6 + bit_rate_scale) (E-77)

When SubPicHrdFlag is equal to true, the bit rate in bits per second is given by: BitRate[i] = (bit_rate_du_value_minus1[ i ] + 1) * 2^(6 + bit_rate_scale) (E-80)

When SubPicHrdFlag is equal to true and the bit_rate_du_value_minus1[i] syntax element is not present, the value of BitRate[i] is inferred to be equal to BrVclFactor * MaxBR for VCL HRD parameters and to be equal to BrNalFactor * MaxBR for NAL HRD parameters, where MaxBR, BrVclFactor and BrNalFactor are specified in ISO/IEC 23008-2 - A.4.

Source

pub fn cpb_size( &self, sub_pic_hrd_flag: bool, cpb_size_scale: u8, cpb_vcl_factor: u64, cpb_nal_factor: u64, max_cpb: u64, ) -> u64

When SubPicHrdFlag is equal to false, the CPB size in bits is given by: CpbSize[i] = (cpb_size_value_minus1[ i ] + 1) * 2^(4 + cpb_size_scale) (E-78)

When SubPicHrdFlag is equal to true, the CPB size in bits is given by: CpbSize[i] = (cpb_size_du_value_minus1[ i ] + 1) * 2^(4 + cpb_size_du_scale) (E-79)

When SubPicHrdFlag is equal to true and the cpb_size_du_value_minus1[i] syntax element is not present, the value of CpbSize[i] is inferred to be equal to CpbVclFactor * MaxCPB for VCL HRD parameters and to be equal to CpbNalFactor * MaxCPB for NAL HRD parameters, where MaxCPB, CpbVclFactor and CpbNalFactor are specified in ISO/IEC 23008-2 - A.4.

Trait Implementations§

Source§

impl Clone for SubLayerHrdParameters

Source§

fn clone(&self) -> SubLayerHrdParameters

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 SubLayerHrdParameters

Source§

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

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

impl PartialEq for SubLayerHrdParameters

Source§

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

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.