Struct Vp8Decoder

Source
pub struct Vp8Decoder<R> {
Show 26 fields r: R, b: ArithmeticDecoder, mbwidth: u16, mbheight: u16, macroblocks: Vec<MacroBlock>, frame: Frame, segments_enabled: bool, segments_update_map: bool, segment: [Segment; 4], loop_filter_adjustments_enabled: bool, ref_delta: [i32; 4], mode_delta: [i32; 4], partitions: [ArithmeticDecoder; 8], num_partitions: u8, segment_tree_nodes: [TreeNode; 3], token_probs: Box<[[[[TreeNode; 11]; 3]; 8]; 4]>, prob_intra: u8, prob_skip_false: Option<u8>, top: Vec<MacroBlock>, left: MacroBlock, top_border_y: Vec<u8>, left_border_y: Vec<u8>, top_border_u: Vec<u8>, left_border_u: Vec<u8>, top_border_v: Vec<u8>, left_border_v: Vec<u8>,
}
Expand description

VP8 Decoder

Only decodes keyframes

Fields§

§r: R§b: ArithmeticDecoder§mbwidth: u16§mbheight: u16§macroblocks: Vec<MacroBlock>§frame: Frame§segments_enabled: bool§segments_update_map: bool§segment: [Segment; 4]§loop_filter_adjustments_enabled: bool§ref_delta: [i32; 4]§mode_delta: [i32; 4]§partitions: [ArithmeticDecoder; 8]§num_partitions: u8§segment_tree_nodes: [TreeNode; 3]§token_probs: Box<[[[[TreeNode; 11]; 3]; 8]; 4]>§prob_intra: u8§prob_skip_false: Option<u8>§top: Vec<MacroBlock>§left: MacroBlock§top_border_y: Vec<u8>§left_border_y: Vec<u8>§top_border_u: Vec<u8>§left_border_u: Vec<u8>§top_border_v: Vec<u8>§left_border_v: Vec<u8>

Implementations§

Source§

impl<R: Read> Vp8Decoder<R>

Source

fn new(r: R) -> Self

Create a new decoder. The reader must present a raw vp8 bitstream to the decoder

Source

fn update_token_probabilities(&mut self) -> Result<(), DecodingError>

Source

fn init_partitions(&mut self, n: usize) -> Result<(), DecodingError>

Source

fn read_quantization_indices(&mut self) -> Result<(), DecodingError>

Source

fn read_loop_filter_adjustments(&mut self) -> Result<(), DecodingError>

Source

fn read_segment_updates(&mut self) -> Result<(), DecodingError>

Source

fn read_frame_header(&mut self) -> Result<(), DecodingError>

Source

fn read_macroblock_header( &mut self, mbx: usize, ) -> Result<MacroBlock, DecodingError>

Source

fn intra_predict_luma( &mut self, mbx: usize, mby: usize, mb: &MacroBlock, resdata: &[i32], )

Source

fn intra_predict_chroma( &mut self, mbx: usize, mby: usize, mb: &MacroBlock, resdata: &[i32], )

Source

fn read_coefficients( &mut self, block: &mut [i32; 16], p: usize, plane: usize, complexity: usize, dcq: i16, acq: i16, ) -> Result<bool, DecodingError>

Source

fn read_residual_data( &mut self, mb: &mut MacroBlock, mbx: usize, p: usize, ) -> Result<[i32; 384], DecodingError>

Source

fn loop_filter(&mut self, mbx: usize, mby: usize, mb: &MacroBlock)

Does loop filtering on the macroblock

Source

fn calculate_filter_parameters(&self, macroblock: &MacroBlock) -> (u8, u8, u8)

Source

pub fn decode_frame(r: R) -> Result<Frame, DecodingError>

Decodes the current frame

Source

fn decode_frame_(self) -> Result<Frame, DecodingError>

Auto Trait Implementations§

§

impl<R> Freeze for Vp8Decoder<R>
where R: Freeze,

§

impl<R> RefUnwindSafe for Vp8Decoder<R>
where R: RefUnwindSafe,

§

impl<R> Send for Vp8Decoder<R>
where R: Send,

§

impl<R> Sync for Vp8Decoder<R>
where R: Sync,

§

impl<R> Unpin for Vp8Decoder<R>
where R: Unpin,

§

impl<R> UnwindSafe for Vp8Decoder<R>
where R: 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.