pub struct SadOps<S: SimdOps> { /* private fields */ }Expand description
SAD operations using SIMD.
Implementations§
Source§impl<S: SimdOps> SadOps<S>
impl<S: SimdOps> SadOps<S>
Sourcepub fn sad_4x4(
&self,
src: &[u8],
src_stride: usize,
ref_block: &[u8],
ref_stride: usize,
) -> u32
pub fn sad_4x4( &self, src: &[u8], src_stride: usize, ref_block: &[u8], ref_stride: usize, ) -> u32
Calculate SAD for a 4x4 block.
§Arguments
src- Source block data (row-major, stride =src_stride)src_stride- Stride between source rowsref_block- Reference block data (row-major, stride =ref_stride)ref_stride- Stride between reference rows
§Returns
Sum of absolute differences for all 16 pixels.
Sourcepub fn sad_8x8(
&self,
src: &[u8],
src_stride: usize,
ref_block: &[u8],
ref_stride: usize,
) -> u32
pub fn sad_8x8( &self, src: &[u8], src_stride: usize, ref_block: &[u8], ref_stride: usize, ) -> u32
Calculate SAD for an 8x8 block.
Sourcepub fn sad_16x16(
&self,
src: &[u8],
src_stride: usize,
ref_block: &[u8],
ref_stride: usize,
) -> u32
pub fn sad_16x16( &self, src: &[u8], src_stride: usize, ref_block: &[u8], ref_stride: usize, ) -> u32
Calculate SAD for a 16x16 block.
Sourcepub fn sad_32x32(
&self,
src: &[u8],
src_stride: usize,
ref_block: &[u8],
ref_stride: usize,
) -> u32
pub fn sad_32x32( &self, src: &[u8], src_stride: usize, ref_block: &[u8], ref_stride: usize, ) -> u32
Calculate SAD for a 32x32 block.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for SadOps<S>where
S: Freeze,
impl<S> RefUnwindSafe for SadOps<S>where
S: RefUnwindSafe,
impl<S> Send for SadOps<S>
impl<S> Sync for SadOps<S>
impl<S> Unpin for SadOps<S>where
S: Unpin,
impl<S> UnsafeUnpin for SadOps<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for SadOps<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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