pub struct Type2And3Naive<T> { /* private fields */ }Expand description
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_buffer = vec![0f32; len];
naive.process_dct2(&mut dct2_buffer);
let mut dst2_buffer = vec![0f32; len];
naive.process_dst2(&mut dst2_buffer);
let mut dct3_buffer = vec![0f32; len];
naive.process_dct3(&mut dct3_buffer);
let mut dst3_buffer = vec![0f32; len];
naive.process_dst3(&mut dst3_buffer);Implementations§
Trait Implementations§
Source§impl<T: DctNum> Dct2<T> for Type2And3Naive<T>
impl<T: DctNum> Dct2<T> for Type2And3Naive<T>
Source§fn process_dct2_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
fn process_dct2_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
Computes the DCT Type 2 on the provided buffer, in-place. Uses the provided
scratch buffer as scratch space. Read moreSource§fn process_dct2(&self, buffer: &mut [T])
fn process_dct2(&self, buffer: &mut [T])
Computes the DCT Type 2 on the provided buffer, in-place. Read more
Source§impl<T: DctNum> Dct3<T> for Type2And3Naive<T>
impl<T: DctNum> Dct3<T> for Type2And3Naive<T>
Source§fn process_dct3_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
fn process_dct3_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
Computes the DCT Type 3 on the provided buffer, in-place. Uses the provided
scratch buffer as scratch space. Read moreSource§fn process_dct3(&self, buffer: &mut [T])
fn process_dct3(&self, buffer: &mut [T])
Computes the DCT Type 3 on the provided buffer, in-place. Read more
Source§impl<T: DctNum> Dst2<T> for Type2And3Naive<T>
impl<T: DctNum> Dst2<T> for Type2And3Naive<T>
Source§fn process_dst2_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
fn process_dst2_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
Computes the DST Type 2 on the provided buffer, in-place. Uses the provided
scratch buffer as scratch space. Read moreSource§fn process_dst2(&self, buffer: &mut [T])
fn process_dst2(&self, buffer: &mut [T])
Computes the DST Type 2 on the provided buffer, in-place. Read more
Source§impl<T: DctNum> Dst3<T> for Type2And3Naive<T>
impl<T: DctNum> Dst3<T> for Type2And3Naive<T>
Source§fn process_dst3_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
fn process_dst3_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
Computes the DST Type 3 on the provided buffer, in-place. Uses the provided
scratch buffer as scratch space. Read moreSource§fn process_dst3(&self, buffer: &mut [T])
fn process_dst3(&self, buffer: &mut [T])
Computes the DST Type 3 on the provided buffer, in-place. Read more
Source§impl<T> Length for Type2And3Naive<T>
impl<T> Length for Type2And3Naive<T>
Source§impl<T> RequiredScratch for Type2And3Naive<T>
impl<T> RequiredScratch for Type2And3Naive<T>
fn get_scratch_len(&self) -> usize
impl<T: DctNum> TransformType2And3<T> for Type2And3Naive<T>
Auto Trait Implementations§
impl<T> Freeze for Type2And3Naive<T>
impl<T> RefUnwindSafe for Type2And3Naive<T>where
T: RefUnwindSafe,
impl<T> Send for Type2And3Naive<T>where
T: Send,
impl<T> Sync for Type2And3Naive<T>where
T: Sync,
impl<T> Unpin for Type2And3Naive<T>
impl<T> UnsafeUnpin for Type2And3Naive<T>
impl<T> UnwindSafe for Type2And3Naive<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more