[][src]Struct rustdct::algorithm::Type2And3SplitRadix

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

DCT2, DCT3, DST2, and DST3 implemention that recursively divides the problem in half.

The problem size must be 2^n, n > 1

// Computes a DCT Type 2 of size 1024
use rustdct::algorithm::Type2And3SplitRadix;
use rustdct::DCT2;
use rustdct::DCTplanner;

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

let mut planner = DCTplanner::new();
let quarter_dct = planner.plan_dct2(len / 4);
let half_dct = planner.plan_dct2(len / 2);

let dct = Type2And3SplitRadix::new(half_dct, quarter_dct);
dct.process_dct2(&mut input, &mut output);

Methods

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

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

Creates a new DCT2, DCT3, DST2, and DST3 context that will process signals of length half_dct.len() * 2

Trait Implementations

impl<T: DCTnum> DCT2<T> for Type2And3SplitRadix<T>
[src]

impl<T: DCTnum> DCT3<T> for Type2And3SplitRadix<T>
[src]

impl<T: DCTnum> DST2<T> for Type2And3SplitRadix<T>
[src]

impl<T: DCTnum> DST3<T> for Type2And3SplitRadix<T>
[src]

impl<T: DCTnum> TransformType2And3<T> for Type2And3SplitRadix<T>
[src]

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

Auto Trait Implementations

impl<T> !Send for Type2And3SplitRadix<T>

impl<T> !Sync for Type2And3SplitRadix<T>

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<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, 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]

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