Struct image::codecs::webp::vp8::Vp8Decoder

source ·
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>

source

pub fn new(r: R) -> Vp8Decoder<R>

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

source

fn update_token_probabilities(&mut self)

source

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

source

fn read_quantization_indices(&mut self)

source

fn read_loop_filter_adjustments(&mut self)

source

fn read_segment_updates(&mut self)

source

fn read_frame_header(&mut self) -> ImageResult<()>

source

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

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], p: usize, plane: usize, complexity: usize, dcq: i16, acq: i16 ) -> bool

source

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

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(&mut self) -> ImageResult<&Frame>

Decodes the current frame

Auto Trait Implementations§

§

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 Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where F: FnOnce(&Self) -> bool,

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
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.