Avisynth DeblockPP7

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

DeblockPP7 is a fast deblocking and deringing filter, a port of the pp7 postprocessing filter of MPlayer/FFmpeg.

Filtering → Avisynth → DeBlock

DeblockPP7 controls in Hybrid
DeblockPP7 controls in Hybrid

What it does

pp7 works like a simplified spp (simple postprocessing): each 7×7 neighborhood is transformed with a DCT, small coefficients are removed by thresholding, and only the center sample of the inverse transform is kept. The thresholds come from a constant quantizer (Quant); higher values remove more blocking and ringing, but also more detail.

Settings

Control Parameter Range / values Hybrid default Meaning
Quant qp 1–63 2 Constant quantizer; higher means stronger filtering.
Mode mode hard, soft, medium hard Hard keeps more detail; soft removes ringing better but is blurrier; medium is in between.

Example

Default settings (Quant 2, Mode hard) on a 10-bit YUV 4:2:0 source:

vsDeblockPP7()

How Hybrid calls it

  • Hybrid loads vsDeblockPP7.dll. The plugin needs planar YUV or gray with 8–16-bit integer samples; other formats (including YUY2 and YV411) are converted first. Hybrid adds no bit-depth conversion.
  • Quant and Mode are only written when they differ from the plugin defaults (2 and hard). Soft is written as mode=1, medium as mode=2.
  • If the frame size is not a multiple of 8, Hybrid pads the frame before the call and crops the padding afterwards.
  • Interlaced input is not supported.
  • DeblockPP7 also offers the common options and can be added to the filter queue several times.

Background

  • The plugin is AviSynth-vsDeblockPP7 by Asd-g, itself a port of VapourSynth-DeblockPP7. Signature: vsDeblockPP7(clip, float qp=2.0, int mode=0, int y=3, int u=3, int v=3). The plugin also has per-plane switches (1 = garbage, 2 = copy, 3 = process), which Hybrid does not offer.
  • Mode is a number in the plugin: 0 hard, 1 soft, 2 medium.
  • FFmpeg's own pp7 filter has the same three modes, but medium is its default.

See also: Vapoursynth DeblockPP7

Sources