pub struct TransformContext {
pub tx_size: TxSize,
pub tx_type: TxType,
pub plane: u8,
pub row: u32,
pub col: u32,
pub skip: bool,
pub eob: u16,
pub bit_depth: u8,
pub lossless: bool,
}Expand description
Context for transform coefficient parsing.
Fields§
§tx_size: TxSizeTransform size.
tx_type: TxTypeTransform type.
plane: u8Plane index (0=Y, 1=U, 2=V).
row: u32Block row in 4x4 units.
col: u32Block column in 4x4 units.
skip: boolSkip coefficient reading (all zero).
eob: u16End of block position.
bit_depth: u8Block bit depth.
lossless: boolLossless mode.
Implementations§
Source§impl TransformContext
impl TransformContext
Sourcepub const fn new(tx_size: TxSize, tx_type: TxType, plane: u8) -> Self
pub const fn new(tx_size: TxSize, tx_type: TxType, plane: u8) -> Self
Create a new transform context.
Sourcepub fn set_position(&mut self, row: u32, col: u32)
pub fn set_position(&mut self, row: u32, col: u32)
Set block position.
Sourcepub const fn num_coeffs(&self) -> u32
pub const fn num_coeffs(&self) -> u32
Get the number of coefficients.
Sourcepub const fn effective_size(&self) -> (u32, u32)
pub const fn effective_size(&self) -> (u32, u32)
Get the effective transform for inverse transform. For 64-point transforms, AV1 only uses 32 coefficients.
Trait Implementations§
Source§impl Clone for TransformContext
impl Clone for TransformContext
Source§fn clone(&self) -> TransformContext
fn clone(&self) -> TransformContext
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 TransformContext
impl Debug for TransformContext
Source§impl Default for TransformContext
impl Default for TransformContext
Source§fn default() -> TransformContext
fn default() -> TransformContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TransformContext
impl RefUnwindSafe for TransformContext
impl Send for TransformContext
impl Sync for TransformContext
impl Unpin for TransformContext
impl UnsafeUnpin for TransformContext
impl UnwindSafe for TransformContext
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