pub struct ObuWriter<W: Write>(/* private fields */);Implementations§
Source§impl<W: Write> ObuWriter<W>
impl<W: Write> ObuWriter<W>
pub fn new(writer: W) -> Self
Sourcepub fn write_f<T: Into<u32>>(
&mut self,
bits: usize,
value: T,
) -> ObuWriterResult<usize>
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.
Sourcepub fn write_uvlc<T: Into<u32>>(&mut self, value: T) -> ObuWriterResult<usize>
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.
Sourcepub fn write_le<T: Into<u32>>(
&mut self,
n: usize,
value: T,
) -> ObuWriterResult<usize>
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.
Sourcepub fn write_leb128<T: Into<u32>>(
&mut self,
value: T,
min_bytes: usize,
) -> ObuWriterResult<usize>
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.
pub fn write_su<T: Into<i32>>( &mut self, bits: usize, value: T, ) -> ObuWriterResult<usize>
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> 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