[][src]Struct rustdct::algorithm::DCT1ConvertToFFT

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

DCT Type 1 implementation that converts the problem into a FFT of size 2 * (n - 1)

// Computes a DCT Type 1 of size 1234
use rustdct::DCT1;
use rustdct::algorithm::DCT1ConvertToFFT;
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(2 * (len - 1));

let dct = DCT1ConvertToFFT::new(fft);
dct.process_dct1(&mut input, &mut output);

Implementations

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

pub fn new(inner_fft: Arc<dyn FFT<T>>) -> Self[src]

Creates a new DCT1 context that will process signals of length inner_fft.len() / 2 + 1.

Trait Implementations

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

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

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.