1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
use rustfft::Length;

use common;

mod dct1_naive;
mod dct1_via_fft;

/// An umbrella trait for algorithms which compute the Discrete Cosine Transform Type 1 (DCT1)
pub trait DCT1<T: common::DCTnum>: Length {
    /// Computes the DCT Type 1 on the `input` buffer and places the result in the `output` buffer.
    ///
    /// This method uses the `input` buffer as scratch space, so the contents of `input` should be considered garbage
    /// after calling
    fn process(&self, input: &mut [T], output: &mut [T]);
}

pub use self::dct1_naive::DCT1Naive;
pub use self::dct1_via_fft::DCT1ViaFFT;