pub struct BlockContextManager {
pub planes: [PlaneBlockContext; 3],
pub mode_info: BlockModeInfo,
pub mi_row: u32,
pub mi_col: u32,
pub above_ctx: Vec<u8>,
pub left_ctx: Vec<u8>,
}Expand description
Manager for block-level context.
Fields§
§planes: [PlaneBlockContext; 3]Plane contexts.
mode_info: BlockModeInfoCurrent mode info.
mi_row: u32Row in 4x4 units.
mi_col: u32Column in 4x4 units.
above_ctx: Vec<u8>Above mode info references.
left_ctx: Vec<u8>Left mode info references.
Implementations§
Source§impl BlockContextManager
impl BlockContextManager
Sourcepub fn set_position(&mut self, mi_row: u32, mi_col: u32, bsize: BlockSize)
pub fn set_position(&mut self, mi_row: u32, mi_col: u32, bsize: BlockSize)
Set current block position.
Sourcepub fn get_partition_context(&self, bsize: BlockSize) -> u8
pub fn get_partition_context(&self, bsize: BlockSize) -> u8
Get context for partition.
Sourcepub fn get_above_ctx(&self, offset: u32) -> u8
pub fn get_above_ctx(&self, offset: u32) -> u8
Get above context value.
Sourcepub fn get_left_ctx(&self, offset: u32) -> u8
pub fn get_left_ctx(&self, offset: u32) -> u8
Get left context value.
Sourcepub fn update_context(&mut self, bsize: BlockSize)
pub fn update_context(&mut self, bsize: BlockSize)
Update context after decoding a block.
Sourcepub fn reset_left_context(&mut self)
pub fn reset_left_context(&mut self)
Reset left context for new superblock row.
Trait Implementations§
Source§impl Clone for BlockContextManager
impl Clone for BlockContextManager
Source§fn clone(&self) -> BlockContextManager
fn clone(&self) -> BlockContextManager
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 BlockContextManager
impl Debug for BlockContextManager
Auto Trait Implementations§
impl Freeze for BlockContextManager
impl RefUnwindSafe for BlockContextManager
impl Send for BlockContextManager
impl Sync for BlockContextManager
impl Unpin for BlockContextManager
impl UnsafeUnpin for BlockContextManager
impl UnwindSafe for BlockContextManager
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