Skip to main content

SilkFrameDecoded

Struct SilkFrameDecoded 

Source
pub struct SilkFrameDecoded {
Show 14 fields pub signal_type: SignalType, pub qoff_type: QuantizationOffsetType, pub gains: SubframeGains, pub lsf_stage1: u8, pub nlsf_q15: [i16; 16], pub d_lpc: usize, pub lsf_interp_q2: Option<u8>, pub lpc_second_half: LpcQ12, pub lpc_first_half: Option<LpcQ12>, pub ltp: LtpParameters, pub lcg_seed: u8, pub excitation: Excitation, pub stereo_pred: Option<StereoPredictionWeights>, pub mid_only_flag: Option<bool>,
}
Expand description

One fully decoded regular SILK frame: every Table-5 bitstream symbol consumed and the §4.2.7.5 LSF → LPC chain run.

Fields§

§signal_type: SignalType

§4.2.7.3 signal type.

§qoff_type: QuantizationOffsetType

§4.2.7.3 quantization-offset type.

§gains: SubframeGains

§4.2.7.4 per-subframe quantization gains (log_gain ∈ 0..=63).

§lsf_stage1: u8

§4.2.7.5.1 normalized LSF stage-1 index I1 ∈ 0..32.

§nlsf_q15: [i16; 16]

The §4.2.7.5.4 stabilized normalized-LSF vector for the current frame (n2_Q15[]), carried forward as the next frame’s §4.2.7.5.5 interpolation base. Only 0..d_lpc entries are valid.

§d_lpc: usize

d_LPC (length of Self::nlsf_q15): 10 for NB/MB, 16 for WB.

§lsf_interp_q2: Option<u8>

§4.2.7.5.5 interpolation factor w_Q2 ∈ 0..=4 for a 20 ms frame; None for a 10 ms frame (no first-half split).

§lpc_second_half: LpcQ12

The final stable §4.2.7.5.8 Q12 LPC filter for the second half of the frame (derived from the stabilized current-frame NLSF).

§lpc_first_half: Option<LpcQ12>

The final stable §4.2.7.5.8 Q12 LPC filter for the first half of a 20 ms frame (derived from the interpolated n1_Q15[]); None for a 10 ms frame, which uses Self::lpc_second_half throughout.

§ltp: LtpParameters

§4.2.7.6 LTP parameters (voiced frames only; empty otherwise).

§lcg_seed: u8

§4.2.7.7 LCG seed 0..=3.

§excitation: Excitation

§4.2.7.8 quantized excitation e_Q23[].

§stereo_pred: Option<StereoPredictionWeights>

§4.2.7.1 decoded stereo prediction weights (Q13), present only on the mid channel of a stereo Opus frame (when SilkFrameConfig::stereo is Some); None for a mono frame.

§mid_only_flag: Option<bool>

§4.2.7.2 decoded mid-only flag, present only when the stereo context had StereoHeaderContext::has_mid_only_flag set; Some(true) means the side channel of this interval is skipped.

Trait Implementations§

Source§

impl Clone for SilkFrameDecoded

Source§

fn clone(&self) -> SilkFrameDecoded

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SilkFrameDecoded

Source§

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

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

impl PartialEq for SilkFrameDecoded

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 SilkFrameDecoded

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.