pub enum Area {
Rect(Rect),
StartingAt {
x: isize,
y: isize,
},
BlockStartingAt {
bo: BlockOffset,
},
}Variants§
Rect(Rect)
A well-defined rectangle
StartingAt
A rectangle starting at offset (x, y) and ending at the bottom-right corner of the parent
BlockStartingAt
a rectangle starting at given block offset until the bottom-right corner of the parent
Fields
§
bo: BlockOffsetImplementations§
Source§impl Area
impl Area
Sourcepub const fn to_rect(
self,
xdec: usize,
ydec: usize,
parent_width: usize,
parent_height: usize,
) -> Rect
pub const fn to_rect( self, xdec: usize, ydec: usize, parent_width: usize, parent_height: usize, ) -> Rect
Convert to a rectangle of pixels.
For a BlockRect and BlockStartingAt, for subsampled chroma planes,
the returned rect will be aligned to a 4x4 chroma block.
This is necessary for compute_distortion and rdo_cfl_alpha as
the subsampled chroma block covers multiple luma blocks.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Area
impl RefUnwindSafe for Area
impl Send for Area
impl Sync for Area
impl Unpin for Area
impl UnsafeUnpin for Area
impl UnwindSafe for Area
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