Enum BlockSize
enum BlockSize
Variants
-
BLOCK_4X4 -
BLOCK_4X8 -
BLOCK_8X4 -
BLOCK_8X8 -
BLOCK_8X16 -
BLOCK_16X8 -
BLOCK_16X16 -
BLOCK_16X32 -
BLOCK_32X16 -
BLOCK_32X32 -
BLOCK_32X64 -
BLOCK_64X32 -
BLOCK_64X64 -
BLOCK_64X128 -
BLOCK_128X64 -
BLOCK_128X128 -
BLOCK_4X16 -
BLOCK_16X4 -
BLOCK_8X32 -
BLOCK_32X8 -
BLOCK_16X64 -
BLOCK_64X16
Implementations
impl BlockSize
fn from_width_and_height_opt(w: usize, h: usize) -> Result<BlockSize, InvalidBlockSize>Errors
- Returns
InvalidBlockSizeif the givenwandhdo not produce a valid block size.
- Returns
fn from_width_and_height(w: usize, h: usize) -> BlockSizePanics
- If the given
wandhdo not produce a valid block size.
- If the given
fn cfl_allowed(self: Self) -> boolconst fn width(self: Self) -> usizeconst fn area(self: Self) -> usizewidth * height
const fn width_log2(self: Self) -> usizeconst fn width_mi_log2(self: Self) -> usizeconst fn width_mi(self: Self) -> usizefn width_imp_b(self: Self) -> usizeconst fn height(self: Self) -> usizeconst fn height_log2(self: Self) -> usizeconst fn height_mi_log2(self: Self) -> usizeconst fn height_mi(self: Self) -> usizefn height_imp_b(self: Self) -> usizeconst fn tx_size(self: Self) -> TxSizeconst fn subsampled_size(self: Self, xdec: usize, ydec: usize) -> Result<BlockSize, InvalidBlockSize>Source:
Subsampled_Size(AV1 specification section 5.11.38)Errors
- Returns
InvalidBlockSizeif the given block size cannot be subsampled in the requested way.
- Returns
fn largest_chroma_tx_size(self: Self, xdec: usize, ydec: usize) -> TxSizePanics
Will panic if the subsampling is not possible
const fn is_sqr(self: Self) -> boolconst fn is_sub8x8(self: Self, xdec: usize, ydec: usize) -> boolconst fn sub8x8_offset(self: Self, xdec: usize, ydec: usize) -> (isize, isize)const fn subsize(self: Self, partition: PartitionType) -> Result<BlockSize, InvalidBlockSize>Errors
- Returns
InvalidBlockSizeif the block size cannot be split in the requested way.
- Returns
const fn is_rect_tx_allowed(self: Self) -> bool
impl Clone for BlockSize
fn clone(self: &Self) -> BlockSize
impl Copy for BlockSize
impl Debug for BlockSize
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Display for BlockSize
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result<(), Error>
impl Eq for BlockSize
impl Freeze for BlockSize
impl PartialEq for BlockSize
fn eq(self: &Self, other: &BlockSize) -> bool
impl PartialOrd for BlockSize
fn partial_cmp(self: &Self, other: &Self) -> Option<Ordering>
impl RefUnwindSafe for BlockSize
impl Send for BlockSize
impl StructuralPartialEq for BlockSize
impl Sync for BlockSize
impl Unpin for BlockSize
impl UnsafeUnpin for BlockSize
impl UnwindSafe for BlockSize
impl<T> Any for BlockSize
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for BlockSize
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for BlockSize
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for BlockSize
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for BlockSize
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for BlockSize
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> ToString for BlockSize
fn to_string(self: &Self) -> String
impl<T, U> Into for BlockSize
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for BlockSize
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for BlockSize
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>