Skip to main content

SymbolDecoder

Struct SymbolDecoder 

Source
pub struct SymbolDecoder { /* private fields */ }
Expand description

Symbol decoder for AV1 syntax elements.

Implementations§

Source§

impl SymbolDecoder

Source

pub fn new(data: Vec<u8>, frame_is_intra: bool) -> Self

Create a new symbol decoder.

Source

pub fn read_partition( &mut self, bsize: BlockSize, _ctx: u8, ) -> CodecResult<PartitionType>

Read partition symbol.

Source

pub fn read_skip(&mut self, _ctx: u8) -> bool

Read skip flag.

Source

pub fn read_skip_mode(&mut self, _ctx: u8) -> bool

Read skip_mode flag.

Source

pub fn read_segment_id(&mut self, _ctx: u8, max_segments: u8) -> u8

Read segment ID.

Source

pub fn read_is_inter(&mut self, _ctx: u8) -> bool

Read is_inter flag.

Source

pub fn read_intra_mode( &mut self, _ctx: u8, _bsize: BlockSize, ) -> CodecResult<IntraMode>

Read intra mode for luma.

Source

pub fn read_uv_mode( &mut self, _y_mode: IntraMode, _ctx: u8, ) -> CodecResult<IntraMode>

Read intra mode for chroma (UV).

Source

pub fn read_angle_delta(&mut self, mode: IntraMode) -> i8

Read angle delta for directional intra modes.

Source

pub fn read_use_palette(&mut self, bsize: BlockSize, _ctx: u8) -> bool

Read palette mode flag.

Source

pub fn read_filter_intra_mode(&mut self) -> u8

Read filter intra mode.

Source

pub fn read_inter_mode(&mut self, _ctx: u8) -> CodecResult<InterMode>

Read inter mode.

Source

pub fn read_ref_frames(&mut self, _ctx: u8) -> [i8; 2]

Read reference frame indices.

Source

pub fn read_mv(&mut self, ctx: u8) -> [i16; 2]

Read motion vector.

Source

pub fn read_tx_size(&mut self, bsize: BlockSize, _ctx: u8) -> TxSize

Read transform size.

Source

pub fn read_tx_type( &mut self, _tx_size: TxSize, _is_inter: bool, _ctx: u8, ) -> TxType

Read transform type.

Source

pub fn read_compound_type(&mut self, _ctx: u8) -> u8

Read compound type for compound prediction.

Source

pub fn read_interp_filter(&mut self, _ctx: u8) -> u8

Read interpolation filter.

Source

pub fn read_motion_mode(&mut self, bsize: BlockSize, _ctx: u8) -> u8

Read motion mode (simple, OBMC, warped).

Source

pub fn decode_block_mode( &mut self, bsize: BlockSize, ctx_skip: u8, ctx_mode: u8, ) -> CodecResult<BlockModeInfo>

Decode complete block mode info.

Source

pub fn has_more_data(&self) -> bool

Check if more data is available.

Source

pub fn position(&self) -> usize

Get current position in bytes.

Source

pub fn remaining(&self) -> usize

Get remaining bytes.

Trait Implementations§

Source§

impl Debug for SymbolDecoder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.