pub enum BlockSize {
Show 22 variants
Block4x4 = 0,
Block4x8 = 1,
Block8x4 = 2,
Block8x8 = 3,
Block8x16 = 4,
Block16x8 = 5,
Block16x16 = 6,
Block16x32 = 7,
Block32x16 = 8,
Block32x32 = 9,
Block32x64 = 10,
Block64x32 = 11,
Block64x64 = 12,
Block64x128 = 13,
Block128x64 = 14,
Block128x128 = 15,
Block4x16 = 16,
Block16x4 = 17,
Block8x32 = 18,
Block32x8 = 19,
Block16x64 = 20,
Block64x16 = 21,
}Expand description
Block size enumeration.
Variants§
Block4x4 = 0
4x4 block.
Block4x8 = 1
4x8 block.
Block8x4 = 2
8x4 block.
Block8x8 = 3
8x8 block.
Block8x16 = 4
8x16 block.
Block16x8 = 5
16x8 block.
Block16x16 = 6
16x16 block.
Block16x32 = 7
16x32 block.
Block32x16 = 8
32x16 block.
Block32x32 = 9
32x32 block.
Block32x64 = 10
32x64 block.
Block64x32 = 11
64x32 block.
Block64x64 = 12
64x64 block.
Block64x128 = 13
64x128 block.
Block128x64 = 14
128x64 block.
Block128x128 = 15
128x128 block.
Block4x16 = 16
4x16 block.
Block16x4 = 17
16x4 block.
Block8x32 = 18
8x32 block.
Block32x8 = 19
32x8 block.
Block16x64 = 20
16x64 block.
Block64x16 = 21
64x16 block.
Implementations§
Source§impl BlockSize
impl BlockSize
Sourcepub const fn width_log2(self) -> u8
pub const fn width_log2(self) -> u8
Get width log2.
Sourcepub const fn height_log2(self) -> u8
pub const fn height_log2(self) -> u8
Get height log2.
Sourcepub const fn is_superblock(self) -> bool
pub const fn is_superblock(self) -> bool
Check if this block size is valid for a superblock.
Sourcepub const fn from_dimensions(width: u32, height: u32) -> Option<Self>
pub const fn from_dimensions(width: u32, height: u32) -> Option<Self>
Get block size from dimensions.
Sourcepub const fn max_tx_size(self) -> TxSize
pub const fn max_tx_size(self) -> TxSize
Get maximum transform size for this block.
Sourcepub const fn subsampled(self, subx: bool, suby: bool) -> Option<Self>
pub const fn subsampled(self, subx: bool, suby: bool) -> Option<Self>
Get subsampled block size for chroma planes.
Trait Implementations§
impl Copy for BlockSize
impl Eq for BlockSize
impl StructuralPartialEq for BlockSize
Auto Trait Implementations§
impl Freeze for BlockSize
impl RefUnwindSafe for BlockSize
impl Send for BlockSize
impl Sync for BlockSize
impl Unpin for BlockSize
impl UnsafeUnpin for BlockSize
impl UnwindSafe for BlockSize
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