Skip to main content

AvifDecoderOptions

Struct AvifDecoderOptions 

Source
#[non_exhaustive]
pub struct AvifDecoderOptions { pub tone_mapped: bool, pub reference_white: f64, pub threads: u32, pub max_width: u32, pub max_height: u32, pub max_pixels: u32, pub max_bytes: u32, pub strict: bool, pub layer: i32, }
Expand description

The registry decoder’s option schema (see AvifDecoder::with_params), parsed strictly through oxideav_core::parse_options.

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.
§tone_mapped: bool

gain_map=apply (tone_mapped): the tmap alternative of the primary with its gain map applied; default false = the base.

§reference_white: f64

reference_white in cd/m² (default 203).

§threads: u32

threads: the AV1 worker budget; 0 (default) follows the execution context.

§max_width: u32

max_width (0 = unlimited; default 16384).

§max_height: u32

max_height (0 = unlimited; default 16384).

§max_pixels: u32

max_pixels (0 = unlimited; default 1 << 28).

§max_bytes: u32

max_bytes (0 = unlimited; default 1 << 30).

§strict: bool

strict conformance (default false).

§layer: i32

layer: the spatial layer to render (-1 = the file’s lsel).

Implementations§

Source§

impl AvifDecoderOptions

Source

pub fn new() -> Self

The defaults (the DecodeOptions defaults, serial, the file’s lsel).

Source

pub fn apply_to(&self, o: DecodeOptions) -> DecodeOptions

Fold these options into a DecodeOptions (every field set).

Trait Implementations§

Source§

impl Clone for AvifDecoderOptions

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 AvifDecoderOptions

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 AvifDecoderOptions

Source§

impl Debug for AvifDecoderOptions

Source§

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

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

impl Default for AvifDecoderOptions

Source§

fn default() -> Self

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

impl PartialEq for AvifDecoderOptions

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 AvifDecoderOptions

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.