pub struct PartitionDecision {
pub block_size: BlockSize,
pub partition_type: PartitionType,
pub mode: InterMode,
pub mv: MotionVector,
pub ref_idx: i8,
pub cost: u32,
pub distortion: u32,
pub bits: u32,
pub is_skip: bool,
pub merge_idx: u8,
}Expand description
Decision for a single partition.
Fields§
§block_size: BlockSizeBlock size for this partition.
partition_type: PartitionTypePartition type.
mode: InterModeInter prediction mode.
mv: MotionVectorMotion vector.
ref_idx: i8Reference frame index.
cost: u32Rate-distortion cost.
distortion: u32Distortion (SAD/SATD).
bits: u32Estimated bits for this partition.
is_skip: boolIs this a skip block?
merge_idx: u8Merge candidate index (if merge mode).
Implementations§
Source§impl PartitionDecision
impl PartitionDecision
Sourcepub const fn skip(
block_size: BlockSize,
mv: MotionVector,
distortion: u32,
) -> Self
pub const fn skip( block_size: BlockSize, mv: MotionVector, distortion: u32, ) -> Self
Creates a skip decision.
Sourcepub const fn from_match(block_size: BlockSize, block_match: &BlockMatch) -> Self
pub const fn from_match(block_size: BlockSize, block_match: &BlockMatch) -> Self
Creates a decision from block match result.
Sourcepub const fn is_better_than(&self, other: &Self) -> bool
pub const fn is_better_than(&self, other: &Self) -> bool
Checks if this decision 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 decision.
Trait Implementations§
Source§impl Clone for PartitionDecision
impl Clone for PartitionDecision
Source§fn clone(&self) -> PartitionDecision
fn clone(&self) -> PartitionDecision
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 PartitionDecision
impl Debug for PartitionDecision
Auto Trait Implementations§
impl Freeze for PartitionDecision
impl RefUnwindSafe for PartitionDecision
impl Send for PartitionDecision
impl Sync for PartitionDecision
impl Unpin for PartitionDecision
impl UnsafeUnpin for PartitionDecision
impl UnwindSafe for PartitionDecision
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