From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(v0.4.0 documentation update)
m (Requirements)
Line 29: Line 29:
== Requirements ==
== Requirements ==
* [x86]: [[AviSynth+]] or [ AviSynth 2.6]
* [x86]: [[AviSynth+]] or [ AviSynth 2.6]
* [x64]: [[AviSynth+]]
* [x64]: [[AviSynth+]]
* Supported color formats: [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]
* Supported color formats: [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]

Revision as of 06:57, 25 May 2020

Author tp7, Asd-g
Version v0.4.0
Download SangNom2-
Category Deinterlacing
License MIT but binaries are GPLv2
Discussion Doom9 Thread



SangNom2 is a reimplementation of MarcFD's old SangNom filter. Originally it's a single field deinterlacer using edge-directed interpolation but nowadays it's mainly used in anti-aliasing scripts. The output is not completely but mostly identical to the original SangNom.

What's Different

  • It's open source
  • Correct borders processing
  • Additional colorspace support
  • Internal multithreading support (v0.35 only)
  • Requires SSE2
  • Single threaded performance is mostly identical to the old version despite this plugin using SSE2.
  • High bit-depth support (v0.4.0)


One of the most important differences is Y8 support in AviSynth 2.6. This enables much faster anti-aliasing (especially when used with the FTurn plugin) without any chroma processing. See MAA2 for example.


*** vcredist_x86.exe required for SangNom2-x86
*** vcredist_x64.exe required for SangNom2-x64

Syntax and Parameters

SangNom2 (clip, int "order", int "aa", int "aac", int "threads", bool "dh" , bool "luma", bool "chroma" )

clip   =
Input clip must be planar Y or YUV, 8-16bit and 32-bit float.

int  order = 1
Order of deinterlacing:
  • 0 : Double frame rate, top and bottom fields are kept but DoubleWeave must be called before SangNom2.
  • 1 : Single frame rate, keep top field.
  • 2 : Single frame rate, Keep bottom field.

int  aa = 48
The strength of luma anti-aliasing, this value is considered in 8 bit clip.
Must be between 0 and 128.

int  aac = 0
Strength of chroma anti-aliasing. The strength of chroma anti-aliasing, this value is considered in 8 bit clip.
Must be between 0 and 128.
  • The original SangNom always assumes aa=0 for chroma processing.
  • This makes some use cases harder to implement, so additional parameter aac was introduced. Default value is 0 to maintain backward compatibility.

int  threads =
It's a dummy parameter for backward compatibility. (v0.4.0 only)
v0.35 only:
  • Control how many threads SangNom2 uses. This plugin uses min(number of logical processors, 4) threads to do its job.
  • In my tests performance doesn't get any better when using more than 4 threads. Internally it uses a simple thread pool.

bool  dh = false
Doubles the height of the input. Each line of the input is copied to every other line of the output and the missing lines are interpolated.
Note: If dh=true, it will force all planes to be processed.
Default: false.

bool  luma = true
bool  chroma = true
Planes to process.
Default: luma=true; chroma=true.


SangNom with default settings:

SangNom2(order=1, aa=48, aac=0, dh=false, luma=true, chroma=false)

SangNom with double frame rate output:

SangNom2(order=0, aa=48, aac=0)


Version      Date            Changes
v0.4.0 2020/05/23 - Backport VapourSynth port by James1201 and dubhater. - High bit depth support - Add parameters: "dh", "luma", "chroma". - Internal multithreading disabled, "threads" is now just a dummy parameter. - AviSynth+: self-registers as MT_MULTI_INSTANCE. - Added support for AviSynth+ v8 interface.
v0.35 2013/11/26 - x64 build added. Confirmed to be a little slower than x86 on some resolutions with 4 threads and faster in other cases. - Compiled with MSVC++12, requires Microsoft Visual C++ 2012 Redistributable Package
v0.3 2013/07/26 - This plugin now works only with AviSynth 2.6 Alpha4 or later. All previous versions are not supported. Download previous release if you need that. - This version adds aac parameter, which allows to configure chroma aa strength. - It now also works on YV24 correctly, instead of processing only half chroma resolution.
v0.2 2013/07/14 - Second release, containing some significant performance improvements. - This plugin is now threaded with min(number of logical processors, 4) threads used by default. To change number of threads, just use threads parameter.
v0.1 2013/07/13 - First public release. Should be more or less stable but doesn't include many improvements.

Archived Downloads

Version Download Source Code
v0.3 SangNom2.dll
v0.2 SangNom2.dll
v0.1 SangNom2.dll

External Links

  • GitHub - Source code repository.
  • GitHub - Source code repository (updated).
  • GitHub - Source code repository (VapourSynth Port).

Back to External Filters

Personal tools