[−][src]Struct rustdct::algorithm::Type2And3ConvertToFft
DCT2, DST2, DCT3, and DST3 implementation that converts the problem into a FFT of the same size
// Computes a O(NlogN) DCT2, DST2, DCT3, and DST3 of size 1234 by converting them to FFTs use rustdct::{Dct2, Dst2, Dct3, Dst3}; use rustdct::algorithm::Type2And3ConvertToFft; use rustdct::rustfft::FftPlanner; let len = 1234; let mut planner = FftPlanner::new(); let fft = planner.plan_fft_forward(len); let dct = Type2And3ConvertToFft::new(fft); let mut dct2_buffer = vec![0f32; len]; dct.process_dct2(&mut dct2_buffer); let mut dst2_buffer = vec![0f32; len]; dct.process_dst2(&mut dst2_buffer); let mut dct3_buffer = vec![0f32; len]; dct.process_dct3(&mut dct3_buffer); let mut dst3_buffer = vec![0f32; len]; dct.process_dst3(&mut dst3_buffer);
Implementations
impl<T: DctNum> Type2And3ConvertToFft<T>
[src]
pub fn new(inner_fft: Arc<dyn Fft<T>>) -> Self
[src]
Creates a new DCT2, DST2, DCT3, and DST3 context that will process signals of length inner_fft.len()
.
Trait Implementations
impl<T: DctNum> Dct2<T> for Type2And3ConvertToFft<T>
[src]
pub fn process_dct2_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
[src]
pub fn process_dct2(&self, buffer: &mut [T])
[src]
impl<T: DctNum> Dct3<T> for Type2And3ConvertToFft<T>
[src]
pub fn process_dct3_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
[src]
pub fn process_dct3(&self, buffer: &mut [T])
[src]
impl<T: DctNum> Dst2<T> for Type2And3ConvertToFft<T>
[src]
pub fn process_dst2_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
[src]
pub fn process_dst2(&self, buffer: &mut [T])
[src]
impl<T: DctNum> Dst3<T> for Type2And3ConvertToFft<T>
[src]
pub fn process_dst3_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])
[src]
pub fn process_dst3(&self, buffer: &mut [T])
[src]
impl<T> Length for Type2And3ConvertToFft<T>
[src]
impl<T: DctNum> RequiredScratch for Type2And3ConvertToFft<T>
[src]
pub fn get_scratch_len(&self) -> usize
[src]
impl<T: DctNum> TransformType2And3<T> for Type2And3ConvertToFft<T>
[src]
Auto Trait Implementations
impl<T> !RefUnwindSafe for Type2And3ConvertToFft<T>
[src]
impl<T> Send for Type2And3ConvertToFft<T> where
T: Send,
[src]
T: Send,
impl<T> Sync for Type2And3ConvertToFft<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for Type2And3ConvertToFft<T>
[src]
impl<T> !UnwindSafe for Type2And3ConvertToFft<T>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,