Skip to main content

Vp8EncoderOptions

Struct Vp8EncoderOptions 

Source
#[non_exhaustive]
pub struct Vp8EncoderOptions { pub effort: EncodeEffort, pub threads: usize, pub qindex: u8, pub quality: Option<f32>, pub loop_filter_level: u8, pub auto_loop_filter: bool, pub partitions: u8, }
Expand description

Typed options of the registry key-frame encoder — the struct behind the CodecParameters::options bag the registered factory (make_encoder_from_param_options) parses, and the argument of the direct make_encoder_with_options door.

keykinddefaultmeaning
effortu323mode-search effort, 0 fastest ..= 3 thorough (EncodeEffort)
threadsu320thread budget; 0 follows the ExecutionContext (serial when none is announced)
qindexu3232§9.6 y_ac_qi, 0..=127
qualityf32-10..=100 quality; when ≥ 0 it replaces qindex and also sets the trellis strength
loop_filter_levelu320§9.4 level, 0..=63
auto_loop_filterboolfalseRD-select the §9.4 level / sharpness per frame
partitionsu321§9.5 token partition count (1 / 2 / 4 / 8)

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.
§effort: EncodeEffort

Mode-search effort.

§threads: usize

Thread budget; 0 follows the announced ExecutionContext.

§qindex: u8

§9.6 y_ac_qi (ignored when quality is set).

§quality: Option<f32>

0..=100 quality (see super::quality_to_qindex / super::quality_to_trellis_strength); None uses qindex.

§loop_filter_level: u8

§9.4 loop_filter_level.

§auto_loop_filter: bool

RD-select the §9.4 level / sharpness.

§partitions: u8

§9.5 token partition count.

Implementations§

Source§

impl Vp8EncoderOptions

Source

pub fn new() -> Self

The defaults (see the table on the type).

Source

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

Set effort.

Source

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

Set threads.

Source

pub fn with_qindex(self, v: u8) -> Self

Set qindex.

Source

pub fn with_quality(self, v: Option<f32>) -> Self

Set quality.

Source

pub fn with_loop_filter_level(self, v: u8) -> Self

Set loop_filter_level.

Source

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

Set auto_loop_filter.

Source

pub fn with_partitions(self, v: u8) -> Self

Set partitions.

Trait Implementations§

Source§

impl Clone for Vp8EncoderOptions

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 CodecOptionsStruct for Vp8EncoderOptions

Source§

const SCHEMA: &'static [OptionField]

Static schema listing every option key this struct consumes, with its declared kind, default, and help text.
Source§

fn apply(&mut self, key: &str, value: &OptionValue) -> Result<()>

Write one coerced value into the struct. key is guaranteed to be present in SCHEMA and value to match the declared OptionKind when called via parse_options.
Source§

impl Copy for Vp8EncoderOptions

Source§

impl Debug for Vp8EncoderOptions

Source§

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

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

impl Default for Vp8EncoderOptions

Source§

fn default() -> Self

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

impl PartialEq for Vp8EncoderOptions

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 Vp8EncoderOptions

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.