Struct rustdct::dct2::DCT2Naive [] [src]

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

Naive O(n^2 ) DCT Type 2 implementation

This implementation is primarily used to test other DCT2 algorithms. In rare cases, this algorithm may be faster than DCT2ViaFFT.

// Computes a naive DCT2 of size 123
use rustdct::dct2::{DCT2, DCT2Naive};

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

let dct = DCT2Naive::new(len);
dct.process(&mut input, &mut output);

Methods

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

[src]

Creates a new DCT2 context that will process signals of length len

Trait Implementations

impl<T: DCTnum> DCT2<T> for DCT2Naive<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 DCT2Naive<T>
[src]

[src]

The FFT size that this algorithm can process

Auto Trait Implementations

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

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