#[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.
| key | kind | default | meaning |
|---|---|---|---|
effort | u32 | 3 | mode-search effort, 0 fastest ..= 3 thorough (EncodeEffort) |
threads | u32 | 0 | thread budget; 0 follows the ExecutionContext (serial when none is announced) |
qindex | u32 | 32 | §9.6 y_ac_qi, 0..=127 |
quality | f32 | -1 | 0..=100 quality; when ≥ 0 it replaces qindex and also sets the trellis strength |
loop_filter_level | u32 | 0 | §9.4 level, 0..=63 |
auto_loop_filter | bool | false | RD-select the §9.4 level / sharpness per frame |
partitions | u32 | 1 | §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: EncodeEffortMode-search effort.
threads: usizeThread 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: boolRD-select the §9.4 level / sharpness.
partitions: u8§9.5 token partition count.
Implementations§
Source§impl Vp8EncoderOptions
impl Vp8EncoderOptions
Sourcepub fn with_effort(self, v: EncodeEffort) -> Self
pub fn with_effort(self, v: EncodeEffort) -> Self
Set effort.
Sourcepub fn with_threads(self, v: usize) -> Self
pub fn with_threads(self, v: usize) -> Self
Set threads.
Sourcepub fn with_qindex(self, v: u8) -> Self
pub fn with_qindex(self, v: u8) -> Self
Set qindex.
Sourcepub fn with_quality(self, v: Option<f32>) -> Self
pub fn with_quality(self, v: Option<f32>) -> Self
Set quality.
Sourcepub fn with_loop_filter_level(self, v: u8) -> Self
pub fn with_loop_filter_level(self, v: u8) -> Self
Set loop_filter_level.
Sourcepub fn with_auto_loop_filter(self, v: bool) -> Self
pub fn with_auto_loop_filter(self, v: bool) -> Self
Set auto_loop_filter.
Sourcepub fn with_partitions(self, v: u8) -> Self
pub fn with_partitions(self, v: u8) -> Self
Set partitions.
Trait Implementations§
Source§impl Clone for Vp8EncoderOptions
impl Clone for Vp8EncoderOptions
Source§impl CodecOptionsStruct for Vp8EncoderOptions
impl CodecOptionsStruct for Vp8EncoderOptions
Source§const SCHEMA: &'static [OptionField]
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<()>
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.impl Copy for Vp8EncoderOptions
Source§impl Debug for Vp8EncoderOptions
impl Debug for Vp8EncoderOptions
Source§impl Default for Vp8EncoderOptions
impl Default for Vp8EncoderOptions
Source§impl PartialEq for Vp8EncoderOptions
impl PartialEq for Vp8EncoderOptions
impl StructuralPartialEq for Vp8EncoderOptions
Auto Trait Implementations§
impl Forget for Vp8EncoderOptions
impl Freeze for Vp8EncoderOptions
impl Move for Vp8EncoderOptions
impl RefUnwindSafe for Vp8EncoderOptions
impl Send for Vp8EncoderOptions
impl Sync for Vp8EncoderOptions
impl Unpin for Vp8EncoderOptions
impl UnsafeUnpin for Vp8EncoderOptions
impl UnwindSafe for Vp8EncoderOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more