Skip to main content

nl4d_default_lambda_ht

Function nl4d_default_lambda_ht 

Source
pub fn nl4d_default_lambda_ht(channels: ChannelMode) -> f32
Expand description

The default lambda_ht for nl4d’s hard-threshold stage, per plane.

lambda_ht is how many standard deviations of estimated noise a transform coefficient has to clear to survive. Raising it removes more noise and more fine detail with it, so the value is a trade rather than an optimum.

Luma gets 5.3, picked by eye from rendered comparisons on real grain and deliberately biased toward keeping detail. Higher values remove visibly more noise, but not enough to be worth what they cost in texture.

ChannelMode::Yuv reads the luma value, on the same “a fused pass is dominated by luma” assumption [hq_default_strength] makes for its own Yuv case.

Chroma gets 4.2, picked the same way from the chroma residuals with luma pinned at 5.3.