Struct ObuWriter

Source
pub struct ObuWriter<W: Write>(/* private fields */);

Implementations§

Source§

impl<W: Write> ObuWriter<W>

Source

pub fn new(writer: W) -> Self

Source

pub fn write_f<T: Into<u32>>( &mut self, bits: usize, value: T, ) -> ObuWriterResult<usize>

Writes fixed bit size integer. Corresponds to f(n) in AV1 spec defined in 4.10.2.

Source

pub fn write_uvlc<T: Into<u32>>(&mut self, value: T) -> ObuWriterResult<usize>

Writes variable length unsigned n-bit number. Corresponds to uvlc() in AV1 spec defined in 4.10.3.

Source

pub fn write_le<T: Into<u32>>( &mut self, n: usize, value: T, ) -> ObuWriterResult<usize>

Writes unsigned little-endian n-byte integer. Corresponds to le(n) in AV1 spec defined in 4.10.4.

Source

pub fn write_leb128<T: Into<u32>>( &mut self, value: T, min_bytes: usize, ) -> ObuWriterResult<usize>

Writes unsigned integer represented by a variable number of little-endian bytes. Corresponds to leb128() in AV1 spec defined in 4.10.4.

Note: Despite the name, the AV1 4.10.4 limits the value to u32::MAX = (1 << 32) - 1.

Source

pub fn write_su<T: Into<i32>>( &mut self, bits: usize, value: T, ) -> ObuWriterResult<usize>

Source

pub fn aligned(&self) -> bool

Auto Trait Implementations§

§

impl<W> Freeze for ObuWriter<W>
where W: Freeze,

§

impl<W> RefUnwindSafe for ObuWriter<W>
where W: RefUnwindSafe,

§

impl<W> Send for ObuWriter<W>
where W: Send,

§

impl<W> Sync for ObuWriter<W>
where W: Sync,

§

impl<W> Unpin for ObuWriter<W>
where W: Unpin,

§

impl<W> UnwindSafe for ObuWriter<W>
where W: UnwindSafe,

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, 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.