Skip to main content

InterCodingOptions

Struct InterCodingOptions 

Source
#[non_exhaustive]
pub struct InterCodingOptions { pub intra_pick: bool, pub auto_loop_filter: bool, pub fitted_token_prob_updates: bool, pub effort: Option<EncodeEffort>, pub threads: usize, pub search_token_probs: Option<TokenProbUpdates>, }
Expand description

Orthogonal per-frame quality/size feature toggles for the generic inter front door encode_p_frame_multi_ref_with_refresh_and_coding_options.

Each flag switches on one already-proven inter encoder feature; the all-false default reproduces encode_p_frame_multi_ref_with_refresh byte-for-byte. This struct replaces the combinatorial _intra_pick / _auto_loop_filter / _fitted_token_prob_updates function-name ladder for callers (like the lagged stream driver) that need the features combined.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§intra_pick: bool

§11 intra-within-inter picker: every MB additionally scores the 16 whole-block (y_mode, uv_mode) intra candidates against the best inter pick — the encode_p_frame_multi_ref_with_refresh_and_intra_pick behaviour.

§auto_loop_filter: bool

RD-select the §9.4 loop_filter_level / sharpness per frame (ignoring params.loop_filter_level) — the encode_p_frame_multi_ref_auto_loop_filter behaviour, but composable with any refresh ladder and the other toggles.

§fitted_token_prob_updates: bool

Two-pass §13.4 token_prob_update() fit (defaults pass → fit_token_prob_updates → fitted pass → smaller wire ships).

§effort: Option<EncodeEffort>

The rate-distortion search at an EncodeEffort level. None (the default) is the original exhaustive search — the bytes of the option-less entry points, kept for compatibility; it is both slower and less rate-efficient than any level.

§threads: usize

Thread budget for the encode. 0 and 1 both mean serial (the default); with n > 1 the macroblock search runs as a macroblock-row wavefront on up to n scoped threads that end with the call. The output bytes are the same for every budget.

§search_token_probs: Option<TokenProbUpdates>

§13.4 updates the search prices tokens against instead of the §13.5 defaults — typically the InterEncoded::token_prob_updates of the previous frame. With an effort level and fitted_token_prob_updates they only steer the search and the frame ships its own fit; without the fit they are shipped as given. (The two-pass fit of the original search — fitted_token_prob_updates without an effort level — ignores them.)

Implementations§

Source§

impl InterCodingOptions

Source

pub fn with_effort(self, v: EncodeEffort) -> Self

Select the rate-distortion search at effort level v.

Source

pub fn with_threads(self, v: usize) -> Self

Set threads.

Source

pub fn with_search_token_probs(self, v: Option<TokenProbUpdates>) -> Self

Set search_token_probs.

Source

pub fn with_intra_pick(self, v: bool) -> Self

Set intra_pick.

Source

pub fn with_auto_loop_filter(self, v: bool) -> Self

Set auto_loop_filter.

Source

pub fn with_fitted_token_prob_updates(self, v: bool) -> Self

Set fitted_token_prob_updates.

Trait Implementations§

Source§

impl Clone for InterCodingOptions

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for InterCodingOptions

Source§

impl Debug for InterCodingOptions

Source§

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

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

impl Default for InterCodingOptions

Source§

fn default() -> Self

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

impl Eq for InterCodingOptions

Source§

impl PartialEq for InterCodingOptions

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for InterCodingOptions

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> 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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.