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 InvalidBlockSize if the given w and h do not produce a valid block size.
fn from_width_and_height(w: usize, h: usize) -> BlockSize

Panics

  • If the given w and h do not produce a valid block size.
fn cfl_allowed(self: Self) -> bool
const fn width(self: Self) -> usize
const fn area(self: Self) -> usize

width * height

const fn width_log2(self: Self) -> usize
const fn width_mi_log2(self: Self) -> usize
const fn width_mi(self: Self) -> usize
fn width_imp_b(self: Self) -> usize
const fn height(self: Self) -> usize
const fn height_log2(self: Self) -> usize
const fn height_mi_log2(self: Self) -> usize
const fn height_mi(self: Self) -> usize
fn height_imp_b(self: Self) -> usize
const fn tx_size(self: Self) -> TxSize
const fn subsampled_size(self: Self, xdec: usize, ydec: usize) -> Result<BlockSize, InvalidBlockSize>

Source: Subsampled_Size (AV1 specification section 5.11.38)

Errors

  • Returns InvalidBlockSize if the given block size cannot be subsampled in the requested way.
fn largest_chroma_tx_size(self: Self, xdec: usize, ydec: usize) -> TxSize

Panics

Will panic if the subsampling is not possible

const fn is_sqr(self: Self) -> bool
const fn is_sub8x8(self: Self, xdec: usize, ydec: usize) -> bool
const fn sub8x8_offset(self: Self, xdec: usize, ydec: usize) -> (isize, isize)
const fn subsize(self: Self, partition: PartitionType) -> Result<BlockSize, InvalidBlockSize>

Errors

  • Returns InvalidBlockSize if the block size cannot be split in the requested way.
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) -> T

Returns the argument unchanged.

impl<T> ToOwned for BlockSize

fn to_owned(self: &Self) -> T
fn 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) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses 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>