pub struct Type4Naive<T> { /* private fields */ }Expand description
Naive O(n^2 ) DCT Type 4 and DST Type 4 implementation
// Computes a naive DCT4 of size 23
use rustdct::{Dct4, Dst4};
use rustdct::algorithm::Type4Naive;
let len = 23;
let naive = Type4Naive::new(len);
let mut dct4_buffer: Vec<f32> = vec![0f32; len];
naive.process_dct4(&mut dct4_buffer);
let mut dst4_buffer: Vec<f32> = vec![0f32; len];
naive.process_dst4(&mut dst4_buffer);Implementations§
Trait Implementations§
Source§impl<T: DctNum> Dct4<T> for Type4Naive<T>
impl<T: DctNum> Dct4<T> for Type4Naive<T>
Source§fn process_dct4_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
fn process_dct4_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
Computes the DCT Type 4 on the provided buffer, in-place. Uses the provided
scratch buffer as scratch space. Read moreSource§fn process_dct4(&self, buffer: &mut [T])
fn process_dct4(&self, buffer: &mut [T])
Computes the DCT Type 4 on the provided buffer, in-place. Read more
Source§impl<T: DctNum> Dst4<T> for Type4Naive<T>
impl<T: DctNum> Dst4<T> for Type4Naive<T>
Source§fn process_dst4_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
fn process_dst4_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
Computes the DST Type 4 on the provided buffer, in-place. Uses the provided
scratch buffer as scratch space. Read moreSource§fn process_dst4(&self, buffer: &mut [T])
fn process_dst4(&self, buffer: &mut [T])
Computes the DST Type 4 on the provided buffer, in-place. Read more
Source§impl<T> Length for Type4Naive<T>
impl<T> Length for Type4Naive<T>
Source§impl<T> RequiredScratch for Type4Naive<T>
impl<T> RequiredScratch for Type4Naive<T>
fn get_scratch_len(&self) -> usize
impl<T: DctNum> TransformType4<T> for Type4Naive<T>
Auto Trait Implementations§
impl<T> Freeze for Type4Naive<T>
impl<T> RefUnwindSafe for Type4Naive<T>where
T: RefUnwindSafe,
impl<T> Send for Type4Naive<T>where
T: Send,
impl<T> Sync for Type4Naive<T>where
T: Sync,
impl<T> Unpin for Type4Naive<T>
impl<T> UnsafeUnpin for Type4Naive<T>
impl<T> UnwindSafe for Type4Naive<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