Struct av1_grain::GrainTableSegment
source · 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
impl Clone for GrainTableSegment
source§fn clone(&self) -> GrainTableSegment
fn clone(&self) -> GrainTableSegment
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GrainTableSegment
impl Debug for GrainTableSegment
source§impl PartialEq for GrainTableSegment
impl PartialEq for GrainTableSegment
source§fn eq(&self, other: &GrainTableSegment) -> bool
fn eq(&self, other: &GrainTableSegment) -> bool
self
and other
values to be equal, and is used
by ==
.