[][src]Struct rustdct::algorithm::Type2And3Naive

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]

pub fn new(len: usize) -> Self
[src]

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> DCT3<T> for Type2And3Naive<T>
[src]

impl<T: DCTnum> DST2<T> for Type2And3Naive<T>
[src]

impl<T: DCTnum> DST3<T> for Type2And3Naive<T>
[src]

impl<T: DCTnum> TransformType2And3<T> for Type2And3Naive<T>
[src]

impl<T> Length for Type2And3Naive<T>
[src]

Auto Trait Implementations

impl<T> Send for Type2And3Naive<T> where
    T: Send

impl<T> Sync for Type2And3Naive<T> where
    T: Sync

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.