Skip to main content

Imdct

Struct Imdct 

Source
struct Imdct {
    m: usize,
    pre: Vec<(f32, f32)>,
    post: Vec<(f32, f32)>,
    tw: Vec<(f32, f32)>,
}
Expand description

逆 MDCT(M 係数 → 2M サンプル、x[n] = 2/N Σ X[k] cos(2π/N (n + n0)(k + 1/2))、N = 2M)。 DCT-IV を M/2 点の複素 FFT で計算し、2M サンプルへ展開する。

Fields§

§m: usize§pre: Vec<(f32, f32)>

前処理の回転 exp(-iπ(k + 1/4)/M)

§post: Vec<(f32, f32)>

後処理の回転 exp(-iπk/M)

§tw: Vec<(f32, f32)>

FFT の回転 exp(-2πi k / (M/2))

Implementations§

Source§

impl Imdct

Source

fn new(m: usize) -> Self

Source

fn fft(&self, re: &mut [f32], im: &mut [f32])

Source

fn run(&self, x: &[f32], out: &mut [f32])

x(M 係数)→ out(2M サンプル)。

Auto Trait Implementations§

§

impl Freeze for Imdct

§

impl RefUnwindSafe for Imdct

§

impl Send for Imdct

§

impl Sync for Imdct

§

impl Unpin for Imdct

§

impl UnsafeUnpin for Imdct

§

impl UnwindSafe for Imdct

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> 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> Same for T

Source§

type Output = T

Should always be Self
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.