pub struct DiffGenerator {
    fps: Ratio<i64>,
    source_bit_depth: usize,
    denoised_bit_depth: usize,
    frame_count: usize,
    prev_timestamp: u64,
    flat_block_finder: FlatBlockFinder,
    noise_model: NoiseModel,
    grain_table: Vec<GrainTableSegment>,
}Fields§
§fps: Ratio<i64>§source_bit_depth: usize§denoised_bit_depth: usize§frame_count: usize§prev_timestamp: u64§flat_block_finder: FlatBlockFinder§noise_model: NoiseModel§grain_table: Vec<GrainTableSegment>Implementations§
Source§impl DiffGenerator
 
impl DiffGenerator
pub fn new( fps: Ratio<i64>, source_bit_depth: usize, denoised_bit_depth: usize, ) -> DiffGenerator
Sourcepub fn diff_frame<T, U>(
    &mut self,
    source: &Frame<T>,
    denoised: &Frame<U>,
) -> Result<(), Error>
 
pub fn diff_frame<T, U>( &mut self, source: &Frame<T>, denoised: &Frame<U>, ) -> Result<(), Error>
Processes the next frame and adds the results to the state of this
DiffGenerator.
§Errors
- If the frames do not have the same resolution
 - If the frames do not have the same chroma subsampling
 
Sourcepub fn finish(self) -> Vec<GrainTableSegment>
 
pub fn finish(self) -> Vec<GrainTableSegment>
Finalize the state of this DiffGenerator and return the resulting
grain table segments.
Auto Trait Implementations§
impl Freeze for DiffGenerator
impl RefUnwindSafe for DiffGenerator
impl Send for DiffGenerator
impl Sync for DiffGenerator
impl Unpin for DiffGenerator
impl UnwindSafe for DiffGenerator
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
Mutably borrows from an owned value. Read more
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>
Converts 
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>
Converts 
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