pub struct DiffGenerator {
fps: Rational64,
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: Rational64
§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: Rational64, source_bit_depth: usize, denoised_bit_depth: usize, ) -> Self
Sourcepub fn diff_frame<T: Pixel, U: Pixel>(
&mut self,
source: &Frame<T>,
denoised: &Frame<U>,
) -> Result<()>
pub fn diff_frame<T: Pixel, U: Pixel>( &mut self, source: &Frame<T>, denoised: &Frame<U>, ) -> Result<()>
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.
fn diff_frame_internal( &mut self, source: &Frame<u8>, denoised: &Frame<u8>, ) -> Result<()>
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