pub struct FilmGrainParams {Show 29 fields
pub apply_grain: bool,
pub grain_seed: u16,
pub update_grain: bool,
pub film_grain_params_ref_idx: u8,
pub num_y_points: u8,
pub point_y_value: [u8; 16],
pub point_y_scaling: [u8; 16],
pub chroma_scaling_from_luma: bool,
pub num_cb_points: u8,
pub point_cb_value: [u8; 16],
pub point_cb_scaling: [u8; 16],
pub num_cr_points: u8,
pub point_cr_value: [u8; 16],
pub point_cr_scaling: [u8; 16],
pub grain_scaling_minus_8: u8,
pub ar_coeff_lag: u32,
pub ar_coeffs_y_plus_128: [u8; 25],
pub ar_coeffs_cb_plus_128: [u8; 25],
pub ar_coeffs_cr_plus_128: [u8; 25],
pub ar_coeff_shift_minus_6: u8,
pub grain_scale_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 clip_to_restricted_range: bool,
}
Fields§
§apply_grain: bool
If set, specifies that film grain should be added to this frame. If not set, specifies that film grain should not be added.
grain_seed: u16
Specifies the starting value for the pseudo-random numbers used during film grain synthesis.
update_grain: bool
If set means that a new set of parameters should be sent. If not set, means that the previous set of parameters should be used.
film_grain_params_ref_idx: u8
Indicates which reference frame contains the film grain parameters to be used for this frame.
num_y_points: u8
Specifies the number of points for the piece-wise linear scaling function of the luma component.
point_y_value: [u8; 16]
Represents the x (luma value) coordinate for the i-th point of the piecewise linear scaling function for luma component. The values are signaled on the scale of 0..255. (In case of 10 bit video, these values correspond to luma values divided by 4. In case of 12 bit video, these values correspond to luma values divided by 16.)
point_y_scaling: [u8; 16]
Pepresents the scaling (output) value for the i-th point of the piecewise linear scaling function for luma component.
chroma_scaling_from_luma: bool
Specifies that the chroma scaling is inferred from the luma scaling.
num_cb_points: u8
Specifies the number of points for the piece-wise linear scaling function of the cb component.
point_cb_value: [u8; 16]
Represents the x coordinate for the i-th point of the piece-wise linear scaling function for cb component. The values are signaled on the scale of 0..255.
point_cb_scaling: [u8; 16]
Represents the scaling (output) value for the i-th point of the piecewise linear scaling function for cb component.
num_cr_points: u8
Specifies represents the number of points for the piece-wise linear scaling function of the cr component.
point_cr_value: [u8; 16]
Represents the x coordinate for the i-th point of the piece-wise linear scaling function for cr component. The values are signaled on the scale of 0..255.
point_cr_scaling: [u8; 16]
Represents the scaling (output) value for the i-th point of the piecewise linear scaling function for cr component.
grain_scaling_minus_8: u8
Represents the shift – 8 applied to the values of the chroma component. The grain_scaling_minus_8 can take values of 0..3 and determines the range and quantization step of the standard deviation of film grain.
ar_coeff_lag: u32
Specifies the number of auto-regressive coefficients for luma and chroma.
ar_coeffs_y_plus_128: [u8; 25]
Specifies auto-regressive coefficients used for the Y plane.
ar_coeffs_cb_plus_128: [u8; 25]
Specifies auto-regressive coefficients used for the U plane.
ar_coeffs_cr_plus_128: [u8; 25]
Specifies auto-regressive coefficients used for the V plane.
ar_coeff_shift_minus_6: u8
Specifies the range of the auto-regressive coefficients. Values of 0, 1, 2, and 3 correspond to the ranges for auto-regressive coefficients of [-2, 2), [-1, 1), [-0.5, 0.5) and [-0.25, 0.25) respectively.
grain_scale_shift: u8
Specifies how much the Gaussian random numbers should be scaled down during the grain synthesis process.
cb_mult: u8
Represents a multiplier for the cb component used in derivation of the input index to the cb component scaling function.
cb_luma_mult: u8
Represents a multiplier for the average luma component used in derivation of the input index to the cb component scaling function.
cb_offset: u16
Represents an offset used in derivation of the input index to the cb component scaling function.
cr_mult: u8
Represents a multiplier for the cr component used in derivation of the input index to the cr component scaling function.
cr_luma_mult: u8
Represents a multiplier for the average luma component used in derivation of the input index to the cr component scaling function.
cr_offset: u16
Represents an offset used in derivation of the input index to the cr component scaling function.
overlap_flag: bool
If set, indicates that the overlap between film grain blocks shall be applied. If not set, indicates that the overlap between film grain blocks shall not be applied.
clip_to_restricted_range: bool
If set, indicates that clipping to the restricted (studio) range shall be applied to the sample values after adding the film grain (see the semantics for color_range for an explanation of studio swing). If not set, indicates that clipping to the full range shall be applied to the sample values after adding the film grain.
Trait Implementations§
Source§impl Clone for FilmGrainParams
impl Clone for FilmGrainParams
Source§fn clone(&self) -> FilmGrainParams
fn clone(&self) -> FilmGrainParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more