Skip to main content

DctOps

Struct DctOps 

Source
pub struct DctOps<S: SimdOps> { /* private fields */ }
Expand description

DCT operations using SIMD.

Implementations§

Source§

impl<S: SimdOps> DctOps<S>

Source

pub const fn new(simd: S) -> Self

Create a new DCT operations instance.

Source

pub const fn simd(&self) -> &S

Get the underlying SIMD implementation.

Source§

impl<S: SimdOps + SimdOpsExt> DctOps<S>

Source

pub fn forward_dct_4x4(&self, input: &[i16; 16], output: &mut [i16; 16])

Forward 4x4 DCT.

Transforms a 4x4 block of residuals to frequency coefficients.

§Arguments
  • input - 4x4 input block (row-major)
  • output - 4x4 output coefficients (row-major)
Source

pub fn inverse_dct_4x4(&self, input: &[i16; 16], output: &mut [i16; 16])

Inverse 4x4 DCT.

Transforms 4x4 frequency coefficients back to spatial domain.

§Arguments
  • input - 4x4 input coefficients (row-major)
  • output - 4x4 output block (row-major)
Source

pub fn forward_dct_8x8(&self, input: &[i16; 64], output: &mut [i16; 64])

Forward 8x8 DCT.

Source

pub fn inverse_dct_8x8(&self, input: &[i16; 64], output: &mut [i16; 64])

Inverse 8x8 DCT.

Source

pub fn forward_dct_16x16(&self, input: &[i16; 256], output: &mut [i16; 256])

Forward 16x16 DCT using recursive decomposition.

Decomposes into 4 8x8 DCTs for efficiency.

Source

pub fn inverse_dct_16x16(&self, input: &[i16; 256], output: &mut [i16; 256])

Inverse 16x16 DCT.

Source

pub fn forward_dct_32x32(&self, input: &[i16; 1024], output: &mut [i16; 1024])

Forward 32x32 DCT.

Source

pub fn inverse_dct_32x32(&self, input: &[i16; 1024], output: &mut [i16; 1024])

Inverse 32x32 DCT.

Source

pub fn butterfly_add(&self, a: I16x8, b: I16x8) -> I16x8

Butterfly operation for DCT.

Source

pub fn butterfly_sub(&self, a: I16x8, b: I16x8) -> I16x8

Butterfly operation for DCT (subtraction).

Source

pub fn dct_madd(&self, a: I16x8, coeff: I16x8) -> I32x4

Multiply-add for DCT coefficients.

Trait Implementations§

Source§

impl<S: SimdOps + Default> Default for DctOps<S>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<S> Freeze for DctOps<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for DctOps<S>
where S: RefUnwindSafe,

§

impl<S> Send for DctOps<S>

§

impl<S> Sync for DctOps<S>

§

impl<S> Unpin for DctOps<S>
where S: Unpin,

§

impl<S> UnsafeUnpin for DctOps<S>
where S: UnsafeUnpin,

§

impl<S> UnwindSafe for DctOps<S>
where S: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.