pub struct MvPredContext {
pub left: NeighborInfo,
pub top: NeighborInfo,
pub top_right: NeighborInfo,
pub top_left: NeighborInfo,
pub co_located: NeighborInfo,
pub ref_idx: i8,
pub mi_col: usize,
pub mi_row: usize,
pub block_size: BlockSize,
}Expand description
Context for motion vector prediction.
Fields§
§left: NeighborInfoLeft neighbor.
top: NeighborInfoTop neighbor.
top_right: NeighborInfoTop-right neighbor.
top_left: NeighborInfoTop-left neighbor.
co_located: NeighborInfoCo-located block in reference.
ref_idx: i8Current reference frame index.
mi_col: usizeBlock position (x in 4x4 units).
mi_row: usizeBlock position (y in 4x4 units).
block_size: BlockSizeBlock size.
Implementations§
Source§impl MvPredContext
impl MvPredContext
Sourcepub const fn at_position(self, mi_row: usize, mi_col: usize) -> Self
pub const fn at_position(self, mi_row: usize, mi_col: usize) -> Self
Sets the block position.
Sourcepub const fn with_left(self, info: NeighborInfo) -> Self
pub const fn with_left(self, info: NeighborInfo) -> Self
Sets the left neighbor.
Sourcepub const fn with_top(self, info: NeighborInfo) -> Self
pub const fn with_top(self, info: NeighborInfo) -> Self
Sets the top neighbor.
Sourcepub const fn with_top_right(self, info: NeighborInfo) -> Self
pub const fn with_top_right(self, info: NeighborInfo) -> Self
Sets the top-right neighbor.
Sourcepub const fn with_top_left(self, info: NeighborInfo) -> Self
pub const fn with_top_left(self, info: NeighborInfo) -> Self
Sets the top-left neighbor.
Sourcepub const fn with_co_located(self, info: NeighborInfo) -> Self
pub const fn with_co_located(self, info: NeighborInfo) -> Self
Sets the co-located block.
Trait Implementations§
Source§impl Clone for MvPredContext
impl Clone for MvPredContext
Source§fn clone(&self) -> MvPredContext
fn clone(&self) -> MvPredContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MvPredContext
impl Debug for MvPredContext
Source§impl Default for MvPredContext
impl Default for MvPredContext
Source§fn default() -> MvPredContext
fn default() -> MvPredContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MvPredContext
impl RefUnwindSafe for MvPredContext
impl Send for MvPredContext
impl Sync for MvPredContext
impl Unpin for MvPredContext
impl UnsafeUnpin for MvPredContext
impl UnwindSafe for MvPredContext
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