Struct rustdct::dct2::DCT2ViaFFT [] [src]

pub struct DCT2ViaFFT<T> { /* fields omitted */ }

DCT Type 2 implementation that converts the problem into an O(nlogn) FFT of the same size

// Computes a DCT Type 2 of size 1234
use rustdct::dct2::{DCT2, DCT2ViaFFT};
use rustdct::rustfft::FFTplanner;

let len = 1234;
let mut input:  Vec<f32> = vec![0f32; len];
let mut output: Vec<f32> = vec![0f32; len];

let mut planner = FFTplanner::new(false);
let fft = planner.plan_fft(len);

let dct = DCT2ViaFFT::new(fft);
dct.process(&mut input, &mut output);

Methods

impl<T: DCTnum> DCT2ViaFFT<T>
[src]

[src]

Creates a new DCT2 context that will process signals of length inner_fft.len().

Trait Implementations

impl<T: DCTnum> DCT2<T> for DCT2ViaFFT<T>
[src]

[src]

Computes the DCT Type 2 on the input buffer and places the result in the output buffer. Read more

impl<T> Length for DCT2ViaFFT<T>
[src]

[src]

The FFT size that this algorithm can process

Auto Trait Implementations

impl<T> Send for DCT2ViaFFT<T> where
    T: Send

impl<T> Sync for DCT2ViaFFT<T> where
    T: Sync