Skip to main content

FilterOps

Struct FilterOps 

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

Filter operations using SIMD.

Implementations§

Source§

impl<S: SimdOps> FilterOps<S>

Source

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

Create a new filter operations instance.

Source

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

Get the underlying SIMD implementation.

Source

pub fn filter_h_2tap(&self, src: &[u8], dst: &mut [u8], width: usize)

Apply a horizontal 2-tap filter (bilinear).

Used for simple 2x scaling or half-pixel interpolation.

Source

pub fn filter_h_4tap( &self, src: &[u8], dst: &mut [u8], coeffs: &[i16; 4], width: usize, )

Apply a horizontal 4-tap filter.

Common filter coefficients for sub-pixel interpolation.

Source

pub fn filter_h_6tap( &self, src: &[u8], dst: &mut [u8], coeffs: &[i16; 6], width: usize, )

Apply a horizontal 6-tap filter.

Source

pub fn filter_h_8tap( &self, src: &[u8], dst: &mut [u8], coeffs: &[i16; 8], width: usize, )

Apply a horizontal 8-tap filter.

Used in AV1 for high-quality scaling.

Source

pub fn filter_v_8tap( &self, rows: &[&[u8]; 8], col: usize, coeffs: &[i16; 8], ) -> u8

Apply a vertical filter to a column of pixels.

Takes pointers to multiple rows and produces one output pixel.

Source

pub fn filter_v_row_8tap( &self, rows: &[&[u8]; 8], dst: &mut [u8], coeffs: &[i16; 8], width: usize, )

Apply vertical filter to a row of pixels.

Source§

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

Source

pub fn filter_h_8tap_simd( &self, src: &[u8], dst: &mut [u8], coeffs: &[i16; 8], width: usize, )

SIMD-accelerated horizontal 8-tap filter.

Trait Implementations§

Source§

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

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

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

§

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

§

impl<S> Send for FilterOps<S>

§

impl<S> Sync for FilterOps<S>

§

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

§

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

§

impl<S> UnwindSafe for FilterOps<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.