Avisynth STPresso

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

STPresso ("Spatio-Temporal Pressdown") by Didée dampens grain only a little: the original look stays, but the clip becomes noticeably easier to compress. It is SPresso with an added temporal part.

Filtering → Avisynth → DeGrain

STPresso controls in Hybrid
STPresso controls in Hybrid

What it does

  1. A limited spatial pass (RemoveGrain): at most Limit change, of which Bias percent is applied.
  2. A limited temporal pass (FluxSmoothT): threshold Temporal threshold, at most Temporal limit change, Temporal bias percent applied.
  3. A Back step that pulls every change slightly back toward the source.

The result keeps most of the grain texture and removes only the part that costs the most bits. For stronger denoising use a real degrainer like SMDegrain or MDegrain.

Requirements

  • The script needs masktools2, neo-smo (for zRemoveGrain and zFluxSmoothT) and RgTools (for RemoveGrain modes 25–28). All ship with Hybrid.

Settings

Control Parameter Range Hybrid default Meaning
Bias bias 1–100 24 Percentage of the spatial filter that is applied; around 20 is light, 33 already strong.
Limit limit 1–100 3 Maximum change of the spatial part (8-bit scale).
RemoveGrain RGmode −1–25 4 Spatial filter mode; 4 is a median, 11/12 are blurs.
Temporal threshold tthr 0–64 12 Threshold of the temporal smoother; can be set higher than usual. 0 skips the temporal pass.
Temporal limit tlimit 1–100 3 Maximum change of the temporal part (8-bit scale).
Temporal bias tbias 1–100 49 Percentage of the temporal filter that is applied.
Back back 0–100 1 How far every change is pulled back toward the source. 0 skips this step.

Example

Default settings on a 10-bit YUV 4:2:0 source (no conversion is needed):

STPresso()

How Hybrid calls it

  • Hybrid loads masktools2.dll and neo-smo, and imports the STPresso script.
  • STPresso works on gray and planar YUV (4:2:0, 4:2:2, 4:4:4, and YV411) with 8–16 bit integer samples; other formats are converted first. The script handles the bit depth itself, so Hybrid adds no conversion.
  • Only values that differ from the defaults are written.
  • For clips taller than 720 lines the script uses a minblur instead of RemoveGrain.
  • STPresso also offers the common options and can be added to the filter queue several times.

Background

STPresso is by Didée; the high bit depth version used by Hybrid is a 2020 modification of the script, with motion compensation by SilaSurfer. Hybrid does not offer the optional motion-compensated temporal pass (mc) or the HD and radius parameters of the script.

See also: Vapoursynth STPresso, SPresso

Sources

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