Struct SpsRangeExtension

Source
pub struct SpsRangeExtension {
    pub transform_skip_rotation_enabled_flag: bool,
    pub transform_skip_context_enabled_flag: bool,
    pub implicit_rdpcm_enabled_flag: bool,
    pub explicit_rdpcm_enabled_flag: bool,
    pub extended_precision_processing_flag: bool,
    pub intra_smoothing_disabled_flag: bool,
    pub high_precision_offsets_enabled_flag: bool,
    pub persistent_rice_adaptation_enabled_flag: bool,
    pub cabac_bypass_alignment_enabled_flag: bool,
}
Expand description

Sequence parameter set range extension.

sps_range_extension()

  • ISO/IEC 23008-2 - 7.3.2.2.2
  • ISO/IEC 23008-2 - 7.4.3.2.2

Fields§

§transform_skip_rotation_enabled_flag: bool

Equal to true specifies that a rotation is applied to the residual data block for intra 4x4 blocks coded using a transform skip operation.

Equal to false specifies that this rotation is not applied.

§transform_skip_context_enabled_flag: bool

Equal to true specifies that a particular context is used for the parsing of the sig_coeff_flag for transform blocks with a skipped transform.

Equal to false specifies that the presence or absence of transform skipping or a transform bypass for transform blocks is not used in the context selection for this flag.

§implicit_rdpcm_enabled_flag: bool

Equal to true specifies that the residual modification process for blocks using a transform bypass may be used for intra blocks in the CVS.

Equal to false specifies that the residual modification process is not used for intra blocks in the CVS.

§explicit_rdpcm_enabled_flag: bool

Equal to true specifies that the residual modification process for blocks using a transform bypass may be used for inter blocks in the CVS.

Equal to false specifies that the residual modification process is not used for inter blocks in the CVS.

§extended_precision_processing_flag: bool

Equal to true specifies that an extended dynamic range is used for transform coefficients and transform processing.

Equal to false specifies that the extended dynamic range is not used.

Defines CoeffMinY, CoeffMinC, CoeffMaxY, and CoeffMaxC.

§intra_smoothing_disabled_flag: bool

Equal to true specifies that the filtering process of neighbouring samples is unconditionally disabled for intra prediction.

Equal to false specifies that the filtering process of neighbouring samples is not disabled.

§high_precision_offsets_enabled_flag: bool

Equal to true specifies that weighted prediction offset values are signalled using a bit-depth-dependent precision.

Equal to false specifies that weighted prediction offset values are signalled with a precision equivalent to eight bit processing.

Defines WpOffsetBdShiftY, WpOffsetBdShiftC, WpOffsetHalfRangeY, and WpOffsetHalfRangeC.

§persistent_rice_adaptation_enabled_flag: bool

Equal to true specifies that the Rice parameter derivation for the binarization of coeff_abs_level_remaining[] is initialized at the start of each sub-block using mode dependent statistics accumulated from previous sub-blocks.

Equal to false specifies that no previous sub-block state is used in Rice parameter derivation.

§cabac_bypass_alignment_enabled_flag: bool

Equal to true specifies that a CABAC alignment process is used prior to bypass decoding of the syntax elements coeff_sign_flag[] and coeff_abs_level_remaining[].

Equal to false specifies that no CABAC alignment process is used prior to bypass decoding.

Implementations§

Source§

impl SpsRangeExtension

Source

pub fn coeff_min_y(&self, bit_depth_y: u8) -> i64

CoeffMinY = −(1 << (extended_precision_processing_flag ? Max(15, BitDepthY + 6) : 15)) (7-27)

ISO/IEC 23008-2 - 7.4.3.2.2

Source

pub fn coeff_min_c(&self, bit_depth_c: u8) -> i64

CoeffMinC = −(1 << (extended_precision_processing_flag ? Max(15, BitDepthC + 6) : 15)) (7-28)

ISO/IEC 23008-2 - 7.4.3.2.2

Source

pub fn coeff_max_y(&self, bit_depth_y: u8) -> i64

CoeffMaxY = (1 << (extended_precision_processing_flag ? Max(15, BitDepthY + 6) : 15)) - 1 (7-29)

ISO/IEC 23008-2 - 7.4.3.2.2

Source

pub fn coeff_max_c(&self, bit_depth_c: u8) -> i64

CoeffMaxC = (1 << (extended_precision_processing_flag ? Max(15, BitDepthC + 6) : 15)) − 1 (7-30)

ISO/IEC 23008-2 - 7.4.3.2.2

Source

pub fn wp_offset_bd_shift_y(&self, bit_depth_y: u8) -> i8

WpOffsetBdShiftY = high_precision_offsets_enabled_flag ? 0 : (BitDepthY − 8) (7-31)

ISO/IEC 23008-2 - 7.4.3.2.2

Source

pub fn wp_offset_bd_shift_c(&self, bit_depth_c: u8) -> i8

WpOffsetBdShiftC = high_precision_offsets_enabled_flag ? 0 : (BitDepthC − 8) (7-32)

ISO/IEC 23008-2 - 7.4.3.2.2

Source

pub fn wp_offset_half_range_y(&self, bit_depth_y: u8) -> i8

WpOffsetHalfRangeY = 1 << (high_precision_offsets_enabled_flag ? (BitDepthY − 1) : 7) (7-33)

ISO/IEC 23008-2 - 7.4.3.2.2

Source

pub fn wp_offset_half_range_c(&self, bit_depth_c: u8) -> i8

WpOffsetHalfRangeC = 1 << (high_precision_offsets_enabled_flag ? (BitDepthC − 1) : 7) (7-34)

ISO/IEC 23008-2 - 7.4.3.2.2

Trait Implementations§

Source§

impl Clone for SpsRangeExtension

Source§

fn clone(&self) -> SpsRangeExtension

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 SpsRangeExtension

Source§

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

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

impl PartialEq for SpsRangeExtension

Source§

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

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.