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>
impl<R: Read> Vp8Decoder<R>
Sourcefn new(r: R) -> Self
fn new(r: R) -> Self
Create a new decoder. The reader must present a raw vp8 bitstream to the decoder
fn update_token_probabilities(&mut self) -> Result<(), DecodingError>
fn init_partitions(&mut self, n: usize) -> Result<(), DecodingError>
fn read_quantization_indices(&mut self) -> Result<(), DecodingError>
fn read_loop_filter_adjustments(&mut self) -> Result<(), DecodingError>
fn read_segment_updates(&mut self) -> Result<(), DecodingError>
fn read_frame_header(&mut self) -> Result<(), DecodingError>
fn read_macroblock_header( &mut self, mbx: usize, ) -> Result<MacroBlock, DecodingError>
fn intra_predict_luma( &mut self, mbx: usize, mby: usize, mb: &MacroBlock, resdata: &[i32], )
fn intra_predict_chroma( &mut self, mbx: usize, mby: usize, mb: &MacroBlock, resdata: &[i32], )
fn read_coefficients( &mut self, block: &mut [i32; 16], p: usize, plane: usize, complexity: usize, dcq: i16, acq: i16, ) -> Result<bool, DecodingError>
fn read_residual_data( &mut self, mb: &mut MacroBlock, mbx: usize, p: usize, ) -> Result<[i32; 384], DecodingError>
Sourcefn loop_filter(&mut self, mbx: usize, mby: usize, mb: &MacroBlock)
fn loop_filter(&mut self, mbx: usize, mby: usize, mb: &MacroBlock)
Does loop filtering on the macroblock
fn calculate_filter_parameters(&self, macroblock: &MacroBlock) -> (u8, u8, u8)
Sourcepub fn decode_frame(r: R) -> Result<Frame, DecodingError>
pub fn decode_frame(r: R) -> Result<Frame, DecodingError>
Decodes the current frame
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> 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