pub struct GrainTableSegment {
Show 21 fields pub start_time: u64, pub end_time: u64, pub scaling_points_y: ArrayVec<[u8; 2], NUM_Y_POINTS>, pub scaling_points_cb: ArrayVec<[u8; 2], NUM_UV_POINTS>, pub scaling_points_cr: ArrayVec<[u8; 2], NUM_UV_POINTS>, pub scaling_shift: u8, pub ar_coeff_lag: u8, pub ar_coeffs_y: ArrayVec<i8, NUM_Y_COEFFS>, pub ar_coeffs_cb: ArrayVec<i8, NUM_UV_COEFFS>, pub ar_coeffs_cr: ArrayVec<i8, NUM_UV_COEFFS>, pub ar_coeff_shift: u8, pub cb_mult: u8, pub cb_luma_mult: u8, pub cb_offset: u16, pub cr_mult: u8, pub cr_luma_mult: u8, pub cr_offset: u16, pub overlap_flag: bool, pub chroma_scaling_from_luma: bool, pub grain_scale_shift: u8, pub random_seed: u16,
}
Expand description

Specifies parameters for enabling decoder-side grain synthesis for a segment of video from start_time to end_time.

Fields§

§start_time: u64

The beginning timestamp of this segment, in 10,000,000ths of a second.

§end_time: u64

The ending timestamp of this segment, not inclusive, in 10,000,000ths of a second.

§scaling_points_y: ArrayVec<[u8; 2], NUM_Y_POINTS>

Values for the cutoffs and scale factors for luma scaling points

§scaling_points_cb: ArrayVec<[u8; 2], NUM_UV_POINTS>

Values for the cutoffs and scale factors for Cb scaling points

§scaling_points_cr: ArrayVec<[u8; 2], NUM_UV_POINTS>

Values for the cutoffs and scale factors for Cr scaling points

§scaling_shift: u8

Determines the range and quantization step of the standard deviation of film grain.

Accepts values between 8..=11.

§ar_coeff_lag: u8

A factor specifying how many AR coefficients are provided, based on the forumla coeffs_len = (2 * ar_coeff_lag * (ar_coeff_lag + 1)).

Accepts values between 0..=3.

§ar_coeffs_y: ArrayVec<i8, NUM_Y_COEFFS>

Values for the AR coefficients for luma scaling points

§ar_coeffs_cb: ArrayVec<i8, NUM_UV_COEFFS>

Values for the AR coefficients for Cb scaling points

§ar_coeffs_cr: ArrayVec<i8, NUM_UV_COEFFS>

Values for the AR coefficients for Cr scaling points

§ar_coeff_shift: u8

Shift value: Specifies the range of acceptable AR coefficients 6: [-2, 2) 7: [-1, 1) 8: [-0.5, 0.5) 9: [-0.25, 0.25)

§cb_mult: u8

Multiplier to the grain strength of the Cb plane

§cb_luma_mult: u8

Multiplier to the grain strength of the Cb plane inherited from the luma plane

§cb_offset: u16

A base value for the Cb plane grain

§cr_mult: u8

Multiplier to the grain strength of the Cr plane

§cr_luma_mult: u8

Multiplier to the grain strength of the Cr plane inherited from the luma plane

§cr_offset: u16

A base value for the Cr plane grain

§overlap_flag: bool

Whether film grain blocks should overlap or not

§chroma_scaling_from_luma: bool

Scale chroma grain from luma instead of providing chroma scaling points

§grain_scale_shift: u8

Specifies how much the Gaussian random numbers should be scaled down during the grain synthesis process.

§random_seed: u16

Random seed used for generating grain

Trait Implementations§

source§

impl Clone for GrainTableSegment

source§

fn clone(&self) -> GrainTableSegment

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
source§

impl Debug for GrainTableSegment

source§

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

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

impl PartialEq for GrainTableSegment

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for GrainTableSegment

source§

impl StructuralEq for GrainTableSegment

source§

impl StructuralPartialEq for GrainTableSegment

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> 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,

§

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>,

§

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>,

§

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.