pub struct Vp8Decoder<R> {Show 21 fields
r: R,
b: BoolReader,
mbwidth: u16,
mbheight: u16,
macroblocks: Vec<MacroBlock>,
frame: Frame,
segments_enabled: bool,
segments_update_map: bool,
segment: [Segment; 4],
ref_delta: [i32; 4],
mode_delta: [i32; 4],
partitions: [BoolReader; 8],
num_partitions: u8,
segment_tree_probs: [u8; 3],
token_probs: Box<[[[[u8; 11]; 3]; 8]; 4]>,
prob_intra: u8,
prob_skip_false: Option<u8>,
top: Vec<MacroBlock>,
left: MacroBlock,
top_border: Vec<u8>,
left_border: Vec<u8>,
}
Expand description
VP8 Decoder
Only decodes keyframes
Fields§
§r: R
§b: BoolReader
§mbwidth: u16
§mbheight: u16
§macroblocks: Vec<MacroBlock>
§frame: Frame
§segments_enabled: bool
§segments_update_map: bool
§segment: [Segment; 4]
§ref_delta: [i32; 4]
§mode_delta: [i32; 4]
§partitions: [BoolReader; 8]
§num_partitions: u8
§segment_tree_probs: [u8; 3]
§token_probs: Box<[[[[u8; 11]; 3]; 8]; 4]>
§prob_intra: u8
§prob_skip_false: Option<u8>
§top: Vec<MacroBlock>
§left: MacroBlock
§top_border: Vec<u8>
§left_border: Vec<u8>
Implementations§
source§impl<R: Read> Vp8Decoder<R>
impl<R: Read> Vp8Decoder<R>
sourcepub fn new(r: R) -> Vp8Decoder<R>
pub fn new(r: R) -> Vp8Decoder<R>
Create a new decoder. The reader must present a raw vp8 bitstream to the decoder
fn update_token_probabilities(&mut self)
fn init_partitions(&mut self, n: usize) -> ImageResult<()>
fn read_quantization_indices(&mut self)
fn read_loop_filter_adjustments(&mut self)
fn read_segment_updates(&mut self)
fn read_frame_header(&mut self) -> ImageResult<()>
fn read_macroblock_header(&mut self, mbx: usize) -> ImageResult<MacroBlock>
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], p: usize, plane: usize, complexity: usize, dcq: i16, acq: i16, ) -> bool
fn read_residual_data( &mut self, mb: &MacroBlock, mbx: usize, p: usize, ) -> [i32; 384]
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(&mut self) -> ImageResult<&Frame>
pub fn decode_frame(&mut self) -> ImageResult<&Frame>
Decodes the current frame
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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