Struct AVFilmGrainAOMParams

#[repr(C)]
pub struct AVFilmGrainAOMParams {
Show 16 fields pub num_y_points: i32, pub y_points: [[u8; 2]; 14], pub chroma_scaling_from_luma: i32, pub num_uv_points: [i32; 2], pub uv_points: [[[u8; 2]; 10]; 2], pub scaling_shift: i32, pub ar_coeff_lag: i32, pub ar_coeffs_y: [i8; 24], pub ar_coeffs_uv: [[i8; 25]; 2], pub ar_coeff_shift: i32, pub grain_scale_shift: i32, pub uv_mult: [i32; 2], pub uv_mult_luma: [i32; 2], pub uv_offset: [i32; 2], pub overlap_flag: i32, pub limit_output_range: i32,
}
Expand description

This structure describes how to handle film grain synthesis for AOM codecs.

@note The struct must be allocated as part of AVFilmGrainParams using av_film_grain_params_alloc(). Its size is not a part of the public ABI.

Fields§

§num_y_points: i32

Number of points, and the scale and value for each point of the piecewise linear scaling function for the uma plane.

§y_points: [[u8; 2]; 14]§chroma_scaling_from_luma: i32

Signals whether to derive the chroma scaling function from the luma. Not equivalent to copying the luma values and scales.

§num_uv_points: [i32; 2]

If chroma_scaling_from_luma is set to 0, signals the chroma scaling function parameters.

§uv_points: [[[u8; 2]; 10]; 2]§scaling_shift: i32

Specifies the shift applied to the chroma components. For AV1, its within [8; 11] and determines the range and quantization of the film grain.

§ar_coeff_lag: i32

Specifies the auto-regression lag.

§ar_coeffs_y: [i8; 24]

Luma auto-regression coefficients. The number of coefficients is given by 2 * ar_coeff_lag * (ar_coeff_lag + 1).

§ar_coeffs_uv: [[i8; 25]; 2]

Chroma auto-regression coefficients. The number of coefficients is given by 2 * ar_coeff_lag * (ar_coeff_lag + 1) + !!num_y_points.

§ar_coeff_shift: i32

Specifies the range of the auto-regressive coefficients. Values of 6, 7, 8 and so on represent a range of [-2, 2), [-1, 1), [-0.5, 0.5) and so on. For AV1 must be between 6 and 9.

§grain_scale_shift: i32

Signals the down shift applied to the generated gaussian numbers during synthesis.

§uv_mult: [i32; 2]

Specifies the luma/chroma multipliers for the index to the component scaling function.

§uv_mult_luma: [i32; 2]§uv_offset: [i32; 2]

Offset used for component scaling function. For AV1 its a 9-bit value with a range [-256, 255]

§overlap_flag: i32

Signals whether to overlap film grain blocks.

§limit_output_range: i32

Signals to clip to limited color levels after film grain application.

Trait Implementations§

§

impl Clone for AVFilmGrainAOMParams

§

fn clone(&self) -> AVFilmGrainAOMParams

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
§

impl Debug for AVFilmGrainAOMParams

§

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

Formats the value using the given formatter. Read more
§

impl Copy for AVFilmGrainAOMParams

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = 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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more