Avisynth nediaa x2
nediaa x2 runs the nediaa step twice and then limits the change against the original picture.
Filtering → Avisynth → Line → AntiAliasing

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, andmt_lutxyfrom masktools2 limits the result againsto. - With OpenCL on,
nnedi3is replaced byNNEDI3CL(withdevice=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.