Avisynth SPresso

From wiki.selur.net
Jump to navigation Jump to search

SPresso is a gentle spatial smoother by Didee. It dampens grain while leaving contours alone, so the result compresses better but keeps its look.

Filtering → Avisynth → DeGrain

SPresso controls in Hybrid
SPresso controls in Hybrid

What it does

SPresso builds a smoothed copy of the picture with a RemoveGrain mode. Each pixel is then moved toward the smoothed copy, but only by a limited amount. Small differences, which are mostly grain, are removed; large differences, which are real edges and detail, are kept.

Typical use: reduce bitrate on grainy sources without visibly blurring them. For a version that also smooths over time see STPresso.

Requirements

Windows, CPU only. masktools2.dll, neo-smo.dll and RgTools.dll are shipped with Hybrid.

Settings

Control Parameter Range Hybrid default Meaning
Limit limit 1–100 2 Maximum change per pixel, on the 8-bit scale.
Bias bias 1–100 25 Percentage of the smoothed value that is applied. 20 is very light, 33 is already strong.
RemoveGrain Mode RGmode -1–25 4 RemoveGrain mode that makes the smoothed copy.

Example

Default settings on a 10-bit YUV 4:2:0 source:

SPresso()

How Hybrid calls it

  • Hybrid loads masktools2.dll and neo-smo.dll and imports the SPresso script.
  • The settings are only written when they differ from the defaults, so the default call is a plain SPresso().
  • The script is bit-depth aware and works on gray and planar YUV; Hybrid inserts no conversion. Interlaced input is not supported.
  • The chroma settings of the script (limitC, biasC, RGmodeC) and its HD and radius parameters are not offered.
  • For clips taller than 720 lines the script replaces RemoveGrain with a different blur, so RemoveGrain Mode has no effect there.
  • SPresso also offers the common options and can be added to the filter queue several times.

Background

SPresso was posted by Didee on Doom9. The version in Hybrid is a 2020 revision with high bit depth support. It uses masktools2 for the limiting step and RemoveGrain (neo-smo, RgTools for modes 25–28) for the smoothing.

Sources

  • Hybrid's tooltips
  • The AviSynth+ documentation does not cover SPresso.