Skip to main content

MotionCompensationMode

Enum MotionCompensationMode 

Source
#[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 configured for a denoise pass.

None disables motion compensation entirely (zero-cost; no extra buffers are allocated). Mvtools enables an MVTools-inspired per-block estimator and warps neighbours toward the centre at denoise time.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

None

§

Mvtools

Fields

§blksize: u32

Side length of each motion-estimation block in pixels at the finest pyramid level.

§overlap: u32

Overlap between neighbouring blocks in pixels. Must be strictly less than blksize so the step (blksize - overlap) stays positive. Values > 0 reserve room for raised-cosine blending in the compensate step (v1 uses a winner-block rule).

§search_radius: u32

Pixel search radius at the finest pyramid level. The coarse pass uses the same radius on the /2 image so its effective reach is doubled.

§pyramid_levels: u32

Number of pyramid levels. 1 disables the hierarchical coarse pass; 2 adds a /2 coarse pass that seeds the fine pass. Bounded by [MAX_PYRAMID_LEVELS].

§estimation: MotionEstimation

How temporal MVs are estimated. Auto (the default) picks the strategy from the temporal radius. Callers normally leave this at the default. Explicit Direct/Chained are mainly useful for pinning a variant in tests and benches.

Implementations§

Source§

impl MotionCompensationMode

Source

pub fn mvtools_default() -> Self

Convenience constructor for Mvtools with library defaults.

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 does.

Source

pub fn validate(&self) -> Result<(), Error>

Reject parameter combinations that the kernels can’t honour.

Trait Implementations§

Source§

impl Clone for MotionCompensationMode

Source§

fn clone(&self) -> MotionCompensationMode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for MotionCompensationMode

Source§

impl Debug for MotionCompensationMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MotionCompensationMode

Source§

fn default() -> MotionCompensationMode

Returns the “default value” for a type. Read more
Source§

impl PartialEq for MotionCompensationMode

Source§

fn eq(&self, other: &MotionCompensationMode) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MotionCompensationMode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<C> CloneExpand for C
where C: Clone,

Source§

fn __expand_clone_method(&self, _scope: &mut Scope) -> C

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoComptime for T

Source§

fn comptime(self) -> Self

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> TuneInputs for T
where T: Clone + Send + Sync + 'static,

Source§

type At<'a> = T

The concrete input type at lifetime 'a.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more