Avisynth nediaa x2

From wiki.selur.net
Revision as of 23:08, 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

nediaa x2 runs the nediaa step twice and then limits the change against the original picture.

Filtering → Avisynth → Line → AntiAliasing

nediaa x2 controls in Hybrid
nediaa x2 controls in Hybrid

What it does

The picture is turned by 90°, doubled with NNEDI3, turned back and scaled to the original size with a bicubic resize. This is done twice in a row. A masktools expression then compares the result with the original: every pixel may differ from the source by at most about 2 levels (on the 8-bit scale). The result smooths aliasing more than a single nediaa pass, but the hard limit keeps the filter from changing the picture much.

Requirements

OpenCL is optional. With OpenCL on, NNEDI3CL runs on the GPU; this needs an OpenCL-capable GPU and AviSynth+ r3688 or newer. The check box is disabled when no such GPU is found.

Settings

Control Parameter Range Hybrid default Meaning
OpenCL – on/off off Use NNEDI3CL on the GPU instead of nnedi3 on the CPU. The result is close to the CPU result, but not bit-identical.
OpenCL device device 0–15 0 GPU to use. 0 is the default device; devices are counted over all OpenCL platforms. Only written when greater than 0.

Example

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

o = (last)
TurnLeft().nnedi3(field=1,nsize=4,dh=true).TurnRight().BicubicResize(width,height,0,0,0.5,0)
TurnLeft().nnedi3(field=1,nsize=4,dh=true).TurnRight().BicubicResize(width,height,0,0,0.5,0)
mt_lutxy(o,"x 1 + y < x 2 + x 1 - y > x 2 - y ? ?",U=4,V=4)

How Hybrid calls it

  • The filter is written inline, no script file is needed. The input is stored in o, the two passes follow, and mt_lutxy from masktools2 limits the result against o.
  • With OpenCL on, nnedi3 is replaced by NNEDI3CL (with device= when a device other than 0 is chosen).
  • nediaa x2 is not meant for interlaced material.
  • nediaa x2 also offers the common options and can be added to the filter queue several times.

Background

  • The limiter expression keeps each pixel inside the range source ± 2; chroma planes are handled by the same expression.

Sources

  • nnedi3 by tritical (Doom9)
  • Hybrid's tooltips
  • The AviSynth+ documentation does not cover nediaa x2.