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
impl SubLayerHrdParameters
Sourcepub 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
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.
Sourcepub 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
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
impl Clone for SubLayerHrdParameters
Source§fn clone(&self) -> SubLayerHrdParameters
fn clone(&self) -> SubLayerHrdParameters
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more