[][src]Struct rustdct::algorithm::Type4ConvertToType3Even

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

DCT4 and DST4 implementation that converts the problem into two DCT3 of half size.

If the inner DCT3 is O(nlogn), then so is this. This algorithm can only be used if the problem size is even.

// Computes a DCT Type 4 of size 1234
use std::sync::Arc;
use rustdct::DCT4;
use rustdct::algorithm::Type4ConvertToType3Even;
use rustdct::DCTplanner;

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

let mut planner = DCTplanner::new();
let inner_dct3 = planner.plan_dct3(len / 2);
 
let dct = Type4ConvertToType3Even::new(inner_dct3);
dct.process_dct4(&mut input, &mut output);

Methods

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

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

Creates a new DCT4 context that will process signals of length inner_dct.len() * 2.

Trait Implementations

impl<T: DCTnum> DCT4<T> for Type4ConvertToType3Even<T>
[src]

impl<T: DCTnum> DST4<T> for Type4ConvertToType3Even<T>
[src]

impl<T: DCTnum> TransformType4<T> for Type4ConvertToType3Even<T>
[src]

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

Auto Trait Implementations

Blanket Implementations

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

impl<T> From for T
[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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