Skip to main content

Nl4dOptions

Struct Nl4dOptions 

Source
pub struct Nl4dOptions {
    pub motion: MotionSearch,
    pub sigma: Option<f32>,
    pub sigma_scale: f32,
    pub thsad_scale: f32,
    pub refine: u32,
    pub spatial_radius: u32,
    pub lambda_ht: Option<f32>,
    pub lambda_ht_scale: f32,
    pub c_min: f32,
    pub mismatch_scale: f32,
    pub confidence_variance: bool,
    pub windowed_noise_estimation: bool,
}
Expand description

Settings for Algorithm::Nl4d.

nl4d runs the HQ front end only for its machinery, the frame ring, the motion field, and the noise estimate. Nothing weights or averages patches the NLM way, so the NLM knobs are absent here and the fields below are the whole surface.

The temporal radius comes from DenoiserOptions::mode, which has to be Temporal { .. }. Motion tracking is always on, because the grouping kernel reads the motion field and confidence scores it produces.

lambda_ht has a per-plane default. None resolves through nl4d_default_lambda_ht once the plane being denoised is known. lambda_ht_scale then multiplies whichever value that resolves to.

Every other default comes from [Nl4dParams::default].

Fields§

§motion: MotionSearch

How motion between frames is tracked.

§sigma: Option<f32>

A fixed noise standard deviation in [0, 1] units, replacing the automatic per-frame estimate.

None, the default, measures the noise in each pushed frame and smooths it over time.

§sigma_scale: f32

A multiplier applied to the measured noise level before anything reads it. Defaults to 1.0.

This does nothing when sigma pins the noise level, because the estimator never runs in that case.

§thsad_scale: f32

A multiplier on the per-block mismatch threshold, which sets how much extra SAD a block tolerates before its confidence starts to fall. Defaults to 1.0.

Higher values tolerate larger mismatches.

§refine: u32

Half-width of the refine window searched around each neighbour frame’s motion-predicted position, in 1..=4. Defaults to 2.

§spatial_radius: u32

Half-width of the spatial candidate window searched in the centre frame, in 1..=16. Defaults to 9.

§lambda_ht: Option<f32>

Hard-threshold multiplier on the propagated coefficient sigma. Higher removes more noise and more fine detail.

None resolves through nl4d_default_lambda_ht, which returns a different value for luma than for chroma.

§lambda_ht_scale: f32

A multiplier applied to the resolved lambda_ht. Defaults to 1.0.

It scales an explicit lambda_ht and the calibrated per-plane default alike, so one value moves both planes together. Has to be finite and in [0.1, 10.0].

§c_min: f32

The confidence floor below which a whole neighbour block is skipped rather than scored, in [0, 1). Defaults to 0.05. Only affects how much compute a submit spends, never which candidates are admitted once they are scored.

§mismatch_scale: f32

A multiplier on the mismatch variance a poorly matched temporal member carries into the hard threshold. Defaults to 1.0.

The variance grows with the square of this. The mechanism saturates well before the top of its accepted range, see [crate::nl4d::Nl4dParams::mismatch_scale].

§confidence_variance: bool

Whether a temporal member’s mismatch variance reaches the hard-threshold shrinkage at all. Defaults to true. See [crate::nl4d::Nl4dParams::confidence_variance].

§windowed_noise_estimation: bool

Estimates noise fresh from each frame’s own window instead of smoothing it across the whole stream’s history. Defaults to false, matching every calibrated preset.

av-denoise-vs turns this on unconditionally, because a VapourSynth filter has to return the same pixels for a frame no matter what order frames were requested in, and history-dependent estimation breaks that guarantee under random access. See HqParams::windowed_noise_estimation.

Trait Implementations§

Source§

impl Clone for Nl4dOptions

Source§

fn clone(&self) -> Nl4dOptions

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 Nl4dOptions

Source§

impl Debug for Nl4dOptions

Source§

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

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

impl Default for Nl4dOptions

Source§

fn default() -> Nl4dOptions

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

impl PartialEq for Nl4dOptions

Source§

fn eq(&self, other: &Nl4dOptions) -> 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 Nl4dOptions

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 = !

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