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 set up for a denoise pass.

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

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

§blksize: u32

The side length of each motion-search block, in pixels at the finest pyramid level.

§overlap: u32

How 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: u32

The 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: u32

How 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: MotionEstimation

How 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

Source

pub fn mvtools_default() -> Self

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.

Source

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

Rejects parameter combinations the kernels cannot 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 From<MotionSearch> for MotionCompensationMode

Source§

fn from(search: MotionSearch) -> Self

Converts to this type from the input type.
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