Struct rustdct::algorithm::Type2And3Naive [−][src]
pub struct Type2And3Naive<T> { /* fields omitted */ }
Naive O(n^2 ) DCT Type 2, DST Type 2, DCT Type 3, and DST Type 3 implementation
// Computes a naive DCT2, DST2, DCT3, and DST3 of size 23 use rustdct::{DCT2, DST2, DCT3, DST3}; use rustdct::algorithm::Type2And3Naive; let len = 23; let naive = Type2And3Naive::new(len); let mut dct2_input: Vec<f32> = vec![0f32; len]; let mut dct2_output: Vec<f32> = vec![0f32; len]; naive.process_dct2(&mut dct2_input, &mut dct2_output); let mut dst2_input: Vec<f32> = vec![0f32; len]; let mut dst2_output: Vec<f32> = vec![0f32; len]; naive.process_dst2(&mut dst2_input, &mut dst2_output); let mut dct3_input: Vec<f32> = vec![0f32; len]; let mut dct3_output: Vec<f32> = vec![0f32; len]; naive.process_dct3(&mut dct3_input, &mut dct3_output); let mut dst3_input: Vec<f32> = vec![0f32; len]; let mut dst3_output: Vec<f32> = vec![0f32; len]; naive.process_dst3(&mut dst3_input, &mut dst3_output);
Methods
impl<T: DCTnum> Type2And3Naive<T>
[src]
impl<T: DCTnum> Type2And3Naive<T>
pub fn new(len: usize) -> Self
[src]
pub fn new(len: usize) -> Self
Creates a new DCT2, DCT3, DST2, and DST3 context that will process signals of length len
Trait Implementations
impl<T: DCTnum> DCT2<T> for Type2And3Naive<T>
[src]
impl<T: DCTnum> DCT2<T> for Type2And3Naive<T>
fn process_dct2(&self, input: &mut [T], output: &mut [T])
[src]
fn process_dct2(&self, input: &mut [T], output: &mut [T])
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 Type2And3Naive<T>
[src]
impl<T: DCTnum> DST2<T> for Type2And3Naive<T>
fn process_dst2(&self, input: &mut [T], output: &mut [T])
[src]
fn process_dst2(&self, input: &mut [T], output: &mut [T])
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 Type2And3Naive<T>
[src]
impl<T: DCTnum> DCT3<T> for Type2And3Naive<T>
fn process_dct3(&self, input: &mut [T], output: &mut [T])
[src]
fn process_dct3(&self, input: &mut [T], output: &mut [T])
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 Type2And3Naive<T>
[src]
impl<T: DCTnum> DST3<T> for Type2And3Naive<T>
fn process_dst3(&self, input: &mut [T], output: &mut [T])
[src]
fn process_dst3(&self, input: &mut [T], output: &mut [T])
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 Type2And3Naive<T>
[src]
impl<T: DCTnum> Type2And3<T> for Type2And3Naive<T>
impl<T> Length for Type2And3Naive<T>
[src]
impl<T> Length for Type2And3Naive<T>
Auto Trait Implementations
impl<T> Send for Type2And3Naive<T> where
T: Send,
impl<T> Send for Type2And3Naive<T> where
T: Send,
impl<T> Sync for Type2And3Naive<T> where
T: Sync,
impl<T> Sync for Type2And3Naive<T> where
T: Sync,