#[non_exhaustive]pub enum MotionCompensationMode {
None,
Mvtools {
blksize: u32,
overlap: u32,
search_radius: u32,
pyramid_levels: u32,
estimation: MotionEstimation,
},
}Expand description
How motion compensation is set up for a denoise pass.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
Motion compensation is off, and no extra buffers are allocated.
Mvtools
An estimator inspired by MVTools tracks each block, and the neighbouring frames are shifted toward the centre frame at denoise time.
Fields
overlap: u32How many pixels neighbouring blocks overlap.
This has to be strictly below blksize, so the step between
blocks stays positive.
Anything above 0 leaves room for the raised-cosine blend in the compensate step, which currently uses a winner-takes-all rule instead.
search_radius: u32The search radius in pixels at the finest pyramid level.
The coarse pass uses the same radius on a half-size image, so its real reach is twice as far.
pyramid_levels: u32How many levels the pyramid has.
1 means a single full-resolution search. 2 adds a
half-size coarse pass that seeds the fine one. The maximum is
[MAX_PYRAMID_LEVELS].
estimation: MotionEstimationHow motion toward each temporal neighbour is estimated.
Auto, the default, picks a strategy from the temporal
radius and is what callers normally want. Naming Direct or
Chained is mostly useful for pinning one strategy in tests
and benches.
Implementations§
Source§impl MotionCompensationMode
impl MotionCompensationMode
Sourcepub fn mvtools_default() -> MotionCompensationMode
pub fn mvtools_default() -> MotionCompensationMode
Builds an Mvtools mode from the library defaults.
This pins estimation to Direct rather than the field’s own
Auto default, so it never switches to Chained at larger
temporal radii the way an Auto configuration would.
Trait Implementations§
Source§impl Clone for MotionCompensationMode
impl Clone for MotionCompensationMode
Source§fn clone(&self) -> MotionCompensationMode
fn clone(&self) -> MotionCompensationMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more