Dct1

Trait Dct1 

Source
pub trait Dct1<T: DctNum>:
    RequiredScratch
    + Length
    + Sync
    + Send {
    // Required method
    fn process_dct1_with_scratch(&self, buffer: &mut [T], scratch: &mut [T]);

    // Provided method
    fn process_dct1(&self, buffer: &mut [T]) { ... }
}
Expand description

A trait for algorithms which compute the Discrete Cosine Transform Type 1 (DCT1)

Required Methods§

Source

fn process_dct1_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])

Computes the DCT Type 1 on the provided buffer, in-place. Uses the provided scratch buffer as scratch space.

Does not normalize outputs.

Provided Methods§

Source

fn process_dct1(&self, buffer: &mut [T])

Computes the DCT Type 1 on the provided buffer, in-place.

This method may allocate a Vec of scratch space as needed. If you’d like to reuse that allocation between multiple computations, consider calling process_dct1_with_scratch instead.

Does not normalize outputs.

Implementors§

Source§

impl<T: DctNum> Dct1<T> for Dct1ConvertToFft<T>

Source§

impl<T: DctNum> Dct1<T> for Dct1Naive<T>