pub struct MvCache { /* private fields */ }Expand description
Motion vector cache for a frame.
Stores motion vectors in a grid aligned to 4x4 blocks (MI units).
Implementations§
Source§impl MvCache
impl MvCache
Sourcepub fn allocate(&mut self, width: usize, height: usize, num_refs: usize)
pub fn allocate(&mut self, width: usize, height: usize, num_refs: usize)
Allocates cache for a frame.
Sourcepub fn get(
&self,
mi_row: usize,
mi_col: usize,
ref_idx: usize,
) -> Option<&MvCacheEntry>
pub fn get( &self, mi_row: usize, mi_col: usize, ref_idx: usize, ) -> Option<&MvCacheEntry>
Gets an entry.
Sourcepub fn get_mut(
&mut self,
mi_row: usize,
mi_col: usize,
ref_idx: usize,
) -> Option<&mut MvCacheEntry>
pub fn get_mut( &mut self, mi_row: usize, mi_col: usize, ref_idx: usize, ) -> Option<&mut MvCacheEntry>
Gets a mutable entry.
Sourcepub fn set(
&mut self,
mi_row: usize,
mi_col: usize,
ref_idx: usize,
entry: MvCacheEntry,
)
pub fn set( &mut self, mi_row: usize, mi_col: usize, ref_idx: usize, entry: MvCacheEntry, )
Sets an entry.
Sourcepub fn fill_block(
&mut self,
mi_row: usize,
mi_col: usize,
block_size: BlockSize,
ref_idx: usize,
entry: MvCacheEntry,
)
pub fn fill_block( &mut self, mi_row: usize, mi_col: usize, block_size: BlockSize, ref_idx: usize, entry: MvCacheEntry, )
Fills a block region with an entry.
Sourcepub fn get_left(
&self,
mi_row: usize,
mi_col: usize,
ref_idx: usize,
) -> Option<&MvCacheEntry>
pub fn get_left( &self, mi_row: usize, mi_col: usize, ref_idx: usize, ) -> Option<&MvCacheEntry>
Gets the left neighbor entry.
Sourcepub fn get_top(
&self,
mi_row: usize,
mi_col: usize,
ref_idx: usize,
) -> Option<&MvCacheEntry>
pub fn get_top( &self, mi_row: usize, mi_col: usize, ref_idx: usize, ) -> Option<&MvCacheEntry>
Gets the top neighbor entry.
Sourcepub fn get_top_right(
&self,
mi_row: usize,
mi_col: usize,
block_size: BlockSize,
ref_idx: usize,
) -> Option<&MvCacheEntry>
pub fn get_top_right( &self, mi_row: usize, mi_col: usize, block_size: BlockSize, ref_idx: usize, ) -> Option<&MvCacheEntry>
Gets the top-right neighbor entry.
Sourcepub fn get_top_left(
&self,
mi_row: usize,
mi_col: usize,
ref_idx: usize,
) -> Option<&MvCacheEntry>
pub fn get_top_left( &self, mi_row: usize, mi_col: usize, ref_idx: usize, ) -> Option<&MvCacheEntry>
Gets the top-left neighbor entry.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MvCache
impl RefUnwindSafe for MvCache
impl Send for MvCache
impl Sync for MvCache
impl Unpin for MvCache
impl UnsafeUnpin for MvCache
impl UnwindSafe for MvCache
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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