Struct rustdct::dct4::DCT4ViaDCT3 [] [src]

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

DCT Type 4 implementation that converts the problem into two DCT type 3 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::{DCT4, DCT4ViaDCT3};
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 = DCT4ViaDCT3::new(inner_dct3);
dct.process(&mut input, &mut output);

Methods

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

[src]

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

Trait Implementations

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

[src]

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

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

[src]

The FFT size that this algorithm can process

Auto Trait Implementations

impl<T> !Send for DCT4ViaDCT3<T>

impl<T> !Sync for DCT4ViaDCT3<T>