Struct Frame

Source
pub struct Frame { /* private fields */ }
Expand description

A VP9 frame.

Implementations§

Source§

impl Frame

Source

pub fn compressed_header_data(&self) -> &[u8]

Returns a slice into the data of the compressed header.

Source

pub fn compressed_header_and_tile_data(&self) -> &[u8]

Returns a slice into the data of the compressed header and tile data.

Source

pub fn tile_data(&self) -> &[u8]

Returns a slice into the data of the tile data.

Source

pub fn profile(&self) -> Profile

The profile the frame is using.

Source

pub fn show_existing_frame(&self) -> bool

Indicates that the frame indexed by frame_to_show_map_idx is to be displayed. The frame contains no actual frame data.

Source

pub fn frame_to_show_map_idx(&self) -> Option<u8>

Specifies the frame to be displayed. It is only available if show_existing_frame is true.

Source

pub fn last_frame_type(&self) -> FrameType

The frame type of the previous frame.

Source

pub fn frame_type(&self) -> FrameType

The frame type of this frame.

Source

pub fn show_frame(&self) -> bool

Indicates that the frame is to be displayed.

Source

pub fn error_resilient_mode(&self) -> bool

Indicates that error resilient mode is enabled.

Error resilient mode allows the syntax of a frame to be decoded independently of previous frames.

Source

pub fn intra_only(&self) -> bool

Indicates that a frame is an intra-only frame.

A key frame is different to an intra-only frame even though both only use intra prediction. The difference is that a key frame fully resets the decoding process.

Source

pub fn reset_frame_context(&self) -> ResetFrameContext

Specifies whether the frame context should be reset to default values.

Source

pub fn ref_frame_indices(&self) -> &[u8; 3]

The indices of the used reference frames.

Source

pub fn last_ref_frame_index(&self) -> u8

Last reference frame index.

Source

pub fn golden_ref_frame_index(&self) -> u8

Golden reference frame index.

Source

pub fn alt_ref_frame_index(&self) -> u8

Alternate reference frame index.

Source

pub fn ref_frame_sign_bias(&self) -> &[bool; 4]

Specifies the intended direction of the motion vector in time for each reference frame.

Source

pub fn allow_high_precision_mv(&self) -> bool

Specifies the precision of the motion vectors.

False = quarter precision, True = eighth precision.

Source

pub fn refresh_frame_context(&self) -> bool

Specifies that the probabilities computed for this frame should be stored for reference by future frames.

Source

pub fn refresh_frame_flags(&self) -> u8

Contains a bitmask that specifies which reference frame slots will be updated with the current frame after it is decoded.

First bit = first frame (1). Last bit = last frame (8).

Source

pub fn frame_parallel_decoding_mode(&self) -> bool

Specifies if parallel decoding mode is activated.

Source

pub fn frame_context_idx(&self) -> u8

Specifies which frame context to use.

Source

pub fn uncompressed_header_size(&self) -> usize

The size of the uncompressed header.

Source

pub fn compressed_header_size(&self) -> usize

The size of the uncompressed header.

Source

pub fn tile_size(&self) -> usize

The size of the tile data.

Source

pub fn color_depth(&self) -> ColorDepth

The color depth of the frame.

Source

pub fn color_space(&self) -> ColorSpace

The color space of the frame.

Source

pub fn color_range(&self) -> ColorRange

The color range of the frame.

Source

pub fn subsampling(&self) -> Subsampling

The subsampling the frame is using.

Source

pub fn subsampling_x(&self) -> bool

Indicates if sub sampling is used along the x axis.

Source

pub fn subsampling_y(&self) -> bool

Indicates if sub sampling is used along the y axis.

Source

pub fn width(&self) -> u16

The width of the frame.

Source

pub fn height(&self) -> u16

The height of the frame.

Source

pub fn render_width(&self) -> u16

A hint for the application for the desired width to render.

Source

pub fn render_height(&self) -> u16

A hint for the application for the desired height to render.

Source

pub fn mi_cols(&self) -> u16

A variable holding the vertical location of the block in units of 8x8 pixels.

Source

pub fn mi_rows(&self) -> u16

A variable holding the horizontal location of the block in units of 8x8 pixels.

Source

pub fn tile_rows_log2(&self) -> u8

The base 2 logarithm of the height of each tile (where the height is measured in units of 8x8 blocks)

Source

pub fn tile_cols_log2(&self) -> u8

The base 2 logarithm of the width of each tile (where the width is measured in units of 8x8 blocks)

Source

pub fn interpolation_filter(&self) -> InterpolationFilter

The type of filter used in inter prediction.

Source

pub fn loop_filter_level(&self) -> u8

The loop filter strength.

Source

pub fn loop_filter_sharpness(&self) -> u8

The loop filter sharpness.

Source

pub fn loop_filter_delta_enabled(&self) -> bool

Indicates that the filter level depends on the mode and reference frame used to predict a block.

Source

pub fn update_ref_delta(&self) -> bool

Indicates that the the bitstream contains the syntax element loop_filter_ref_delta.

Source

pub fn loop_filter_ref_deltas(&self) -> &[i8; 4]

Contains the adjustment needed for the filter level based on the chosen reference frame.

Source

pub fn update_mode_delta(&self) -> bool

Indicates that the the bitstream contains the syntax element loop_filter_mode_deltas.

Source

pub fn loop_filter_mode_deltas(&self) -> &[i8; 2]

Contains the adjustment needed for the filter level based on the chosen mode.

Source

pub fn base_q_idx(&self) -> i32

The base frame qindex. This is used for Y AC coefficients and as the base value for the other quantizers.

Source

pub fn delta_q_y_dc(&self) -> i32

The Y DC quantizer relative to base_q_idx.

Source

pub fn delta_q_uv_dc(&self) -> i32

The UV DC quantizer relative to base_q_idx.

Source

pub fn delta_q_uv_ac(&self) -> i32

The UV AC quantizer relative to base_q_idx.

Source

pub fn lossless(&self) -> bool

Indicates that the frame is coded using a special 4x4 transform designed for encoding frames that are bit-identical with the original frames.

Source

pub fn segmentation_enabled(&self) -> bool

Specifies that this frame makes use of the segmentation tool.

Source

pub fn segmentation_update_map(&self) -> bool

Specifies that the segmentation map should be updated during the decoding of this frame.

Source

pub fn segment_tree_probs(&self) -> &[u8; 7]

The probability values to be used when decoding segment_id.

Source

pub fn segment_pred_probs(&self) -> &[u8; 3]

The probability values to be used when decoding seg_id_predicted.

Source

pub fn segmentation_temporal_update(&self) -> bool

Indicates that the updates to the segmentation map are coded relative to the existing segmentation map.

Source

pub fn segmentation_update_data(&self) -> bool

Indicates that new parameters are about to be specified for each segment.

Source

pub fn segmentation_abs_or_delta_update(&self) -> bool

Indicates that the segmentation parameters represent the actual values to be used, otherwise the segmentation parameters represent adjustments relative to the standard values.

Source

pub fn segment_feature_enabled(&self) -> &[[bool; 4]; 8]

Indicates that the corresponding feature is used in a segment.

Source

pub fn segment_feature_data(&self) -> &[[i16; 4]; 8]

Specifies the values of the active features of a segment.

Source

pub fn into_vec(self) -> Vec<u8>

Destroys the frame and returns the underlying data buffer.

Trait Implementations§

Source§

impl Clone for Frame

Source§

fn clone(&self) -> Frame

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Frame

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Frame

§

impl RefUnwindSafe for Frame

§

impl Send for Frame

§

impl Sync for Frame

§

impl Unpin for Frame

§

impl UnwindSafe for Frame

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.