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

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]

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]

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

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

Computes the DST Type 2 on the input buffer and places the result in the output buffer. Read more

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

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

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

Computes the DST Type 3 on the input buffer and places the result in the output buffer. Read more

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

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

The FFT size that this algorithm can process

Auto Trait Implementations

impl<T> !Send for Type2And3SplitRadix<T>

impl<T> !Sync for Type2And3SplitRadix<T>