Vapoursynth FineSharp

From wiki.selur.net
Revision as of 05:12, 15 November 2026 by Selur (talk | contribs) (New filter page (via create-page on MediaWiki MCP Server))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

FineSharp is Didée's small and fast generic sharpener, meant for good 1080p sources or 720p material upscaled to 1080p.

Filtering → Vapoursynth → Sharpen

FineSharp controls in Hybrid
FineSharp controls in Hybrid

What it does

FineSharp first sharpens with a non-linear curve against a blurred reference. Then it subtracts a blurred copy of the sharpening difference again (equalization), so strong and weak edges get a more even effect. An optional final pass in the style of XSharpen sharpens once more and is limited by Repair. Noise and grain are sharpened as well. On YUV only luma is processed.

Settings

Control Parameter Range / values Hybrid default Meaning
Mode mode -3 – 3 1 1 – 3: weakest to strongest; negative values use a broader kernel for the equalization. 0 is accepted and currently behaves like -2.
Sharpen sstr 0 – 10 2.5 Strength of the sharpening.
Equalization cstr 0 – 2 0.5, auto on Strength of the equalization (recommended 0.5 – 1.25). With auto the value is derived from Sharpen; for modes ≤ 0 the derived value is raised to the power 0.8.
X-Sharpen xstr 0 – 1 0 Strength of the final XSharpen-style pass; 0 = off, better not above 0.25.
Non-Linear Sharpen (mod / exp) lstr / pstr 0 – 10 1.5 / 1.28 Modifier and exponent of the non-linear curve.
Low damp ldmp 0 – 10 off (2.5) Damps very small differences (noise in flat areas). Off: the Sharpen value is used.
High damp hdmp 0.01 – 10 off (0.01) Damps larger differences; has more effect than low damp once the difference is above 1. Off: 0.01.
Repair mode rep 1 – 18 12 Repair mode of the final pass; 1, 12 and 13 are recommended.
Tools: Expr – akarin, cranexpr, std akarin (std without AVX2) Expression plugin.
Tools: RG – zsmooth, neo_smo zsmooth Repair plugin.
Tools: Median – zsmooth, std zsmooth Median plugin.

Example

Default settings on a 10-bit YUV 4:2:0 source (640x356):

# sharpening using FineSharp
clip = sharpen.FineSharp(clip, tools={'expr': 'akarin', 'rg': 'zsmooth', 'median': 'zsmooth'})

How Hybrid calls it

  • FineSharp works on YUV and gray clips of any bit depth; RGB is converted first.
  • Mode, Sharpen, X-Sharpen, the non-linear values and Repair mode are only written when they differ from the defaults, which equal the script's own defaults.
  • With auto unticked the equalization value is always written; with auto ticked the script derives it.
  • Low and high damp are written whenever their checkbox is ticked.
  • The damp values stay on the 8-bit scale at every bit depth; the script normalizes the differences itself.
  • When Sharpen, Equalization and X-Sharpen are all below 0.01, the clip is returned unchanged.
  • FineSharp also offers the common options (Masked, ApplyOnlyTo, Merge, OnRegion, Gimmick).

Background

Origin

FineSharp was posted by Didée on Doom9 as an AviSynth script. The AviSynth version uses 0.19 for X-Sharpen and slightly different values for the non-linear curve (1.49 / 1.272); the VapourSynth port used here has X-Sharpen off by default and uses 1.5 / 1.28.

Sources