Skip to main content

FrameHeader

Struct FrameHeader 

Source
pub struct FrameHeader {
Show 41 fields pub frame_type: FrameType, pub show_frame: bool, pub showable_frame: bool, pub show_existing_frame: bool, pub frame_to_show_map_idx: u8, pub error_resilient_mode: bool, pub current_frame_id: u32, pub order_hint: u8, pub primary_ref_frame: u8, pub refresh_frame_flags: u8, pub frame_size: FrameSize, pub render_size: RenderSize, pub allow_high_precision_mv: bool, pub interpolation_filter: InterpolationFilter, pub is_filter_switchable: bool, pub allow_intrabc: bool, pub ref_frame_info: RefFrameInfo, pub allow_screen_content_tools: bool, pub force_integer_mv: bool, pub is_motion_mode_switchable: bool, pub use_ref_frame_mvs: bool, pub reference_mode: ReferenceMode, pub skip_mode_frame: [u8; 2], pub skip_mode_allowed: bool, pub skip_mode_present: bool, pub compound_reference_allowed: bool, pub tx_mode: TxMode, pub reduced_tx_set: bool, pub allow_warped_motion: bool, pub quantization: QuantizationParams, pub segmentation: SegmentationParams, pub loop_filter: LoopFilterParams, pub cdef: CdefParams, pub loop_restoration: LoopRestorationParams, pub tile_info: TileInfo, pub global_motion: GlobalMotion, pub film_grain: FilmGrainParams, pub frame_is_intra: bool, pub lossless_array: [bool; 8], pub coded_lossless: bool, pub all_lossless: bool,
}
Expand description

Complete frame header structure.

Fields§

§frame_type: FrameType

Frame type (KEY_FRAME, INTER_FRAME, INTRA_ONLY_FRAME, SWITCH_FRAME).

§show_frame: bool

Whether to show this frame.

§showable_frame: bool

Whether this frame can be shown later via show_existing_frame.

§show_existing_frame: bool

Show an existing frame from the buffer.

§frame_to_show_map_idx: u8

Frame to show (if show_existing_frame is true).

§error_resilient_mode: bool

Error resilient mode (disables some dependencies).

§current_frame_id: u32

Frame ID for error resilience.

§order_hint: u8

Order hint for temporal ordering.

§primary_ref_frame: u8

Primary reference frame index.

§refresh_frame_flags: u8

Refresh frame flags (which slots to update).

§frame_size: FrameSize

Frame size information.

§render_size: RenderSize

Render size information.

§allow_high_precision_mv: bool

Allow high precision motion vectors.

§interpolation_filter: InterpolationFilter

Interpolation filter for motion compensation.

§is_filter_switchable: bool

Whether the filter is switchable per-block.

§allow_intrabc: bool

Intra block copy allowed.

§ref_frame_info: RefFrameInfo

Reference frame information.

§allow_screen_content_tools: bool

Allow screen content tools.

§force_integer_mv: bool

Force integer motion vectors.

§is_motion_mode_switchable: bool

Motion mode (simple, obmc, warp).

§use_ref_frame_mvs: bool

Use reference frame motion vectors.

§reference_mode: ReferenceMode

Reference mode (single, compound, select).

§skip_mode_frame: [u8; 2]

Skip mode frame indices.

§skip_mode_allowed: bool

Skip mode allowed.

§skip_mode_present: bool

Skip mode present.

§compound_reference_allowed: bool

Compound inter allowed.

§tx_mode: TxMode

TX mode for transform selection.

§reduced_tx_set: bool

Reduced TX set for complexity reduction.

§allow_warped_motion: bool

Allow warped motion.

§quantization: QuantizationParams

Quantization parameters.

§segmentation: SegmentationParams

Segmentation parameters.

§loop_filter: LoopFilterParams

Loop filter parameters.

§cdef: CdefParams

CDEF parameters.

§loop_restoration: LoopRestorationParams

Loop restoration parameters.

§tile_info: TileInfo

Tile information.

§global_motion: GlobalMotion

Global motion parameters.

§film_grain: FilmGrainParams

Film grain parameters.

§frame_is_intra: bool

Frame is intra-only (key frame or intra-only frame).

§lossless_array: [bool; 8]

All lossless mode.

§coded_lossless: bool

Coded lossless (all segments lossless and no chroma subsampling issues).

§all_lossless: bool

All lossless (coded lossless and frame size equals superres size).

Implementations§

Source§

impl FrameHeader

Source

pub fn new() -> Self

Create a new default frame header.

Source

pub fn parse(data: &[u8], seq: &SequenceHeader) -> CodecResult<Self>

Parse a frame header from the bitstream.

§Errors

Returns error if the frame header is malformed.

Source

pub fn get_qindex(&self, seg_id: usize) -> u8

Get quantizer index for a segment.

Source

pub const fn is_key_frame(&self) -> bool

Check if this frame is a keyframe.

Source

pub const fn is_inter_frame(&self) -> bool

Check if this frame uses inter prediction.

Source

pub const fn display_order(&self) -> u8

Get the display order for this frame.

Trait Implementations§

Source§

impl Clone for FrameHeader

Source§

fn clone(&self) -> FrameHeader

Returns a duplicate 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 FrameHeader

Source§

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

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

impl Default for FrameHeader

Source§

fn default() -> FrameHeader

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

Auto Trait Implementations§

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> 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.
Source§

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> 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.