Struct Header

Source
pub struct Header {
Show 36 fields pub key_frame: bool, pub version: u8, pub show_frame: bool, pub data_chunk_size: u8, pub first_part_size: u32, pub width: u16, pub height: u16, pub horiz_scale_code: u8, pub vert_scale_code: u8, pub color_space: bool, pub clamping_type: bool, pub filter_type: bool, pub loop_filter_level: u8, pub sharpness_level: u8, pub partition_size: [u32; 8], pub quant_indices: QuantIndices, pub refresh_entropy_probs: bool, pub refresh_last: bool, pub refresh_golden_frame: bool, pub refresh_alternate_frame: bool, pub copy_buffer_to_golden: u8, pub copy_buffer_to_alternate: u8, pub sign_bias_golden: bool, pub sign_bias_alternate: bool, pub coeff_prob: [[[[u8; 11]; 3]; 8]; 4], pub mv_prob: [[u8; 19]; 2], pub mb_no_coeff_skip: bool, pub prob_skip_false: u8, pub prob_intra: u8, pub prob_last: u8, pub prob_golden: u8, pub mode_probs: ModeProbs, pub bd_range: usize, pub bd_value: usize, pub bd_count: isize, pub header_size: u32, /* private fields */
}

Fields§

§key_frame: bool

Indicates if the current frame is a key frame or not.

§version: u8

Determines the bitstream version.

§show_frame: bool

Indicates if the current frame is meant to be displayed or not.

§data_chunk_size: u8

The size in bytes of the Uncompressed Data Chunk

§first_part_size: u32

Determines the size of the first partition (control partition) excluding the size of the Uncompressed Data Chunk

§width: u16

The frame’s width, in pixels.

§height: u16

The frame’s height, in pixels.

§horiz_scale_code: u8

Horizontal scale code value.

§vert_scale_code: u8

Vertical scale code value.

§color_space: bool

Defines the YUV color space of the sequence.

§clamping_type: bool

Specifies if the decoder is required to clamp the reconstructed pixel values.

§filter_type: bool

Determines whether the normal or the simple loop filter is used.

§loop_filter_level: u8

Controls the deblocking filter.

§sharpness_level: u8

Controls the deblocking filter.

§partition_size: [u32; 8]§quant_indices: QuantIndices

Dequantizer indices.

§refresh_entropy_probs: bool

Determines whether updated token probabilities are used only for this frame or until further update

§refresh_last: bool

Determines if the current decoded frame refreshes the last frame reference buffer

§refresh_golden_frame: bool

Determines if the current decoded frame refreshes the golden frame.

§refresh_alternate_frame: bool

Determines if the current decoded frame refreshes the alternate reference frame.

§copy_buffer_to_golden: u8

Determines if the golden reference is replaced by another reference.

§copy_buffer_to_alternate: u8

Determines if the alternate reference is replaced by another reference.

§sign_bias_golden: bool

Controls the sign of motion vectors when the golden frame is referenced.

§sign_bias_alternate: bool

Controls the sign of motion vectors when the alternate frame is referenced.

§coeff_prob: [[[[u8; 11]; 3]; 8]; 4]

The new branch probability for the DCT/WHT tree.

§mv_prob: [[u8; 19]; 2]

MV decoding probability.

§mb_no_coeff_skip: bool

Enables or disables the skipping of macroblocks containing no non-zero coefficients.

§prob_skip_false: u8

The probability that the macroblock is not skipped (flag indicating skipped macroblock is false).

§prob_intra: u8

The probability of an intra macroblock.

§prob_last: u8

The probability that the last reference frame is used for inter prediction.

§prob_golden: u8

The probability that the golden reference frame is used for inter prediction.

§mode_probs: ModeProbs

Branch probabilities kept live across frames.

§bd_range: usize

Boolean decoder range for this frame.

§bd_value: usize

Boolean decoder value for this frame.

§bd_count: isize

Boolean decoder count for this frame.

§header_size: u32

The size in bits of the Frame Header, thus excluding any Uncompressed Data Chunk bytes.

Implementations§

Source§

impl Header

Source

pub fn num_dct_partitions(&self) -> usize

Returns the number of separate partitions containing the DCT coefficients of the macroblocks.

Source

pub fn frame_len(&self) -> usize

Returns the total size of the encoded frame in bytes, as computed from the header.

Trait Implementations§

Source§

impl Clone for Header

Source§

fn clone(&self) -> Header

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 Header

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for Header

Source§

fn default() -> Header

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Header

Source§

fn eq(&self, other: &Header) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Header

Source§

impl StructuralPartialEq for Header

Auto Trait Implementations§

§

impl Freeze for Header

§

impl RefUnwindSafe for Header

§

impl Send for Header

§

impl Sync for Header

§

impl Unpin for Header

§

impl UnwindSafe for Header

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.