pub struct GrainTableSegment {Show 21 fields
pub start_time: u64,
pub end_time: u64,
pub scaling_points_y: ArrayVec<[u8; 2], av1_grain::::GrainTableSegment::{constant#0}>,
pub scaling_points_cb: ArrayVec<[u8; 2], av1_grain::::GrainTableSegment::{constant#1}>,
pub scaling_points_cr: ArrayVec<[u8; 2], av1_grain::::GrainTableSegment::{constant#2}>,
pub scaling_shift: u8,
pub ar_coeff_lag: u8,
pub ar_coeffs_y: ArrayVec<i8, av1_grain::::GrainTableSegment::{constant#3}>,
pub ar_coeffs_cb: ArrayVec<i8, av1_grain::::GrainTableSegment::{constant#4}>,
pub ar_coeffs_cr: ArrayVec<i8, av1_grain::::GrainTableSegment::{constant#5}>,
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], av1_grain::::GrainTableSegment::{constant#0}>
Values for the cutoffs and scale factors for luma scaling points
scaling_points_cb: ArrayVec<[u8; 2], av1_grain::::GrainTableSegment::{constant#1}>
Values for the cutoffs and scale factors for Cb scaling points
scaling_points_cr: ArrayVec<[u8; 2], av1_grain::::GrainTableSegment::{constant#2}>
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, av1_grain::::GrainTableSegment::{constant#3}>
Values for the AR coefficients for luma scaling points
ar_coeffs_cb: ArrayVec<i8, av1_grain::::GrainTableSegment::{constant#4}>
Values for the AR coefficients for Cb scaling points
ar_coeffs_cr: ArrayVec<i8, av1_grain::::GrainTableSegment::{constant#5}>
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
impl Eq for GrainTableSegment
impl StructuralPartialEq for GrainTableSegment
Auto Trait Implementations§
impl Freeze for GrainTableSegment
impl RefUnwindSafe for GrainTableSegment
impl Send for GrainTableSegment
impl Sync for GrainTableSegment
impl Unpin for GrainTableSegment
impl UnwindSafe for GrainTableSegment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more