pub struct BlockMatch {
pub mv: MotionVector,
pub sad: u32,
pub cost: u32,
}Expand description
Result of a block matching operation.
Fields§
§mv: MotionVectorMotion vector.
sad: u32Sum of Absolute Differences (distortion).
cost: u32Rate-distortion cost (if computed).
Implementations§
Source§impl BlockMatch
impl BlockMatch
Sourcepub const fn new(mv: MotionVector, sad: u32, cost: u32) -> Self
pub const fn new(mv: MotionVector, sad: u32, cost: u32) -> Self
Creates a new block match result.
Sourcepub const fn is_better_than(&self, other: &Self) -> bool
pub const fn is_better_than(&self, other: &Self) -> bool
Returns true if this match is better than another.
Sourcepub fn update_if_better(&mut self, other: &Self)
pub fn update_if_better(&mut self, other: &Self)
Updates with a better match if found.
Trait Implementations§
Source§impl Clone for BlockMatch
impl Clone for BlockMatch
Source§fn clone(&self) -> BlockMatch
fn clone(&self) -> BlockMatch
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 BlockMatch
impl Debug for BlockMatch
Source§impl Default for BlockMatch
impl Default for BlockMatch
Source§impl PartialEq for BlockMatch
impl PartialEq for BlockMatch
impl Copy for BlockMatch
impl Eq for BlockMatch
impl StructuralPartialEq for BlockMatch
Auto Trait Implementations§
impl Freeze for BlockMatch
impl RefUnwindSafe for BlockMatch
impl Send for BlockMatch
impl Sync for BlockMatch
impl Unpin for BlockMatch
impl UnsafeUnpin for BlockMatch
impl UnwindSafe for BlockMatch
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