Struct rustdct::algorithm::DCT1Naive[][src]

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

Naive O(n^2 ) DCT Type 1 implementation

This implementation is primarily used to test other DCT1 algorithms. For small input sizes, this is actually faster than DCT1ViaFFT because we don't have to pay the cost associated with converting the problem to a FFT.

// Computes a naive DCT1 of size 23
use rustdct::DCT1;
use rustdct::algorithm::DCT1Naive;

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

let dct = DCT1Naive::new(len);
dct.process_dct1(&mut input, &mut output);

Methods

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

Trait Implementations

impl<T: DCTnum> DCT1<T> for DCT1Naive<T>
[src]

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

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

The FFT size that this algorithm can process

Auto Trait Implementations

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

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