pub struct Type4ConvertToFFTOdd<T> { /* fields omitted */ }
DCT Type 4 and DST Type 4 implementation that converts the problem into a FFT of the same size.
This algorithm can only be used if the problem size is odd.
use rustdct::{DCT4, DST4};
use rustdct::algorithm::Type4ConvertToFFTOdd;
use rustdct::rustfft::FFTplanner;
let len = 1233;
let mut planner = FFTplanner::new(false);
let fft = planner.plan_fft(len);
let dct = Type4ConvertToFFTOdd::new(fft);
let mut dct4_input: Vec<f32> = vec![0f32; len];
let mut dct4_output: Vec<f32> = vec![0f32; len];
dct.process_dct4(&mut dct4_input, &mut dct4_output);
let mut dst4_input: Vec<f32> = vec![0f32; len];
let mut dst4_output: Vec<f32> = vec![0f32; len];
dct.process_dst4(&mut dst4_input, &mut dst4_output);
Creates a new DCT4 context that will process signals of length inner_fft.len()
. inner_fft.len()
must be odd.
Computes the DCT Type 4 on the input
buffer and places the result in the output
buffer. Read more
Computes the DST Type 4 on the input
buffer and places the result in the output
buffer. Read more
The FFT size that this algorithm can process
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)