SangNom2

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "== SangNom2 == Reimplementation of the old MarcFD's SangNom filter. Output is not completely but mostly identical. <br> === What's different === * It's open source * Correct...")
 
m (update)
Line 1: Line 1:
== SangNom2 ==
+
{{FilterCat|External_filters|Restoration_filters|Deinterlacers}}
 +
[[Category:Plugins]]
 +
{{Filter3
 +
| {{Author/tp7}}
 +
| v0.35
 +
| [http://github.com/tp7/SangNom2/releases/download/0.35/SangNom2-x86.zip SangNom2-x86.zip]
 +
| Deinterlacing
 +
| [http://opensource.org/licenses/MIT MIT]
 +
|}}
 +
<br>
 +
== Description ==
 +
:SangNom2 is a reimplementation of MarcFD's old [[SangNom]] filter. The output is not completely but mostly identical.
 +
<br>
 +
==== What's different ====
 +
:*It's open source
 +
:*Correct borders processing
 +
:*Additional colorspace support
 +
:*Multithreading support
 +
:*Requires [[SSE2]]
  
Reimplementation of the old MarcFD's SangNom filter. Output is not completely but mostly identical.
+
:: *Single threaded performance is mostly identical to the old version despite this plugin using [[SSE2]].
 
<br>
 
<br>
 +
==== Y8 ====
  
=== What's different ===
+
:One of the most important differences is [[Y8]] support in AviSynth 2.6. This enables much faster anti-aliasing
* It's open source
+
:(especially when used with FTurn plugin) without any chroma processing. See [[maa]] for example.
* Correct borders processing
+
* Additinal colorspace support
+
* Multithreading support
+
* Requries SSE2
+
 
+
Singlethreaded performance is mostly identical to the old version despite this plugin using SSE2.
+
 
<br>
 
<br>
 +
== Requirements ==
 +
:- [http://forum.doom9.org/showthread.php?t=168764 AviSynth 2.6.0 Alpha5] or later
 +
:- Supported color formats: [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]
  
=== Y8 ===
+
:- [[SSE2]] capbale CPU
One of the most important differences is Y8 support in AviSynth 2.6. This enables much faster antialiasing (especially when used with [https://github.com/tp7/fturn FTurn] plugin) without any chroma processing.
+
 
<br>
 
<br>
function maa(clip input) {
+
== [[Script variables|Syntax and Parameters]] ==
    mask = input.mt_edge("sobel",7,7,5,5).mt_inflate()
+
:{{Template:FuncDef|SangNom2 (''clip'', ''int'' "order", ''int'' "aa", ''int'' "aac", ''int'' "threads")}}
    aa_clip = input.ConvertToY8().Spline36Resize(width(input)*2,height(input)*2).FTurnLeft() \
+
<br>
                  .SangNom2().FTurnRight().SangNom2().Spline36Resize(width(input),height(input))
+
::{{Par2|order|int|1}}
    return mt_merge(input,aa_clip,mask,u=2,v=2)<br>
+
:::Order of deinterlacing:
}
+
 
+
=== Multithreading ===
+
This plugin uses min(number of logical processors, 4) threads to do its job. You can control number of threads using the *threads* parameter.
+
In my tests performance doesn't get any better when using more than 4 threads.
+
  
Internally it uses a simple thread pool but I do consider switching to avstp if it gets a bit nicer api.<br>
+
::::*0 : Double frame rate, top and bottom fields are kept but [[DoubleWeave]] must be called before SangNom2.
 
+
::::*1 : Single frame rate, keep top field.
=== Chroma processing ===
+
::::*2 : Single frame rate, Keep bottom field.
Originally, SangNom always assumes aa=0 for chroma processing. This makes some use cases harder to implement, so additional parameter *aac* was introduced.<br>
+
<br>
It's the same as *aa* but for chroma. Default value is 0 to maintain backward compatibility.<br>
+
::{{Par2|aa|int|48}}
 
+
:::Strength of luma anti-aliasing.
=== License ===
+
<br>
This project is licensed under the [http://opensource.org/licenses/MIT MIT license.] Binaries are [http://www.gnu.org/licenses/gpl-2.0.html GPL v2] because if I understand licensing stuff right (please tell me if I don't) they must be.
+
::{{Par2|aac|int|0}}
 +
:::Strength of chroma anti-aliasing. The original [[SangNom]] always assumes {{Template:FuncDef|aa}}=0 for chroma processing. This makes some use  
 +
:::cases harder to implement, so additional parameter {{Template:FuncDef|aac}} was introduced. It's the same as {{Template:FuncDef|aa}} but for chroma. Default value  
 +
:::is 0 to maintain backward compatibility.  
 +
<br>
 +
::{{Par2|threads|int| }}
 +
:::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.
 +
<br>
 +
== Changelog ==
 +
Version      Date            Changes<br>
 +
v0.35        11/26/2013      - x64 build added.
 +
                                Confirmed to be a little slower than x86 on some resolutions with 4 threads and faster in other cases.<br>
 +
v0.3        07/26/2013      - 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.<br>
 +
v0.2        07/14/2013      - 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.<br>
 +
v0.1        07/13/2013      - First public release.
 +
                                Should be more or less stable but doesn't include many improvements.
 +
<br>
 +
== Archived Downloads ==
 +
{| class="wikitable" border="1"; width="400px"
 +
|-
 +
!!width="100px"| Version
 +
!!width="150px"| Download
 +
!!width="150px"| Source Code
 +
|-
 +
!v0.35
 +
|[http://github.com/tp7/SangNom2/releases/download/0.35/SangNom2-x86.zip SangNom2-x86.zip]
 +
[http://github.com/tp7/SangNom2/releases/download/0.35/SangNom2-x64.zip SangNom2-x64.zip]
 +
|[http://github.com/tp7/SangNom2/archive/0.35.zip 0.35.zip]
 +
|-
 +
!v0.3
 +
|[http://github.com/tp7/SangNom2/releases/download/v0.3/SangNom2.dll SangNom2.dll]
 +
|[http://github.com/tp7/SangNom2/archive/v0.3.zip v0.3.zip]
 +
|-
 +
!v0.2
 +
|[http://github.com/tp7/SangNom2/releases/download/v0.2/SangNom2.dll SangNom2.dll]
 +
|[http://github.com/tp7/SangNom2/archive/v0.2.zip v0.2.zip]
 +
|-
 +
!v0.1
 +
|[http://github.com/tp7/SangNom2/releases/download/v0.1/SangNom2.dll SangNom2.dll]
 +
|[http://github.com/tp7/SangNom2/archive/v0.1.zip v0.1.zip]
 +
|}
 +
<br>
 +
== External Links ==
 +
*[http://forum.doom9.org/showthread.php?t=168315 Doom9 Forum] - SangNom2 discussion.

Revision as of 20:02, 10 May 2014

Abstract
Author tp7
Version v0.35
Download SangNom2-x86.zip
Category Deinterlacing
License MIT
Discussion


Contents

Description

SangNom2 is a reimplementation of MarcFD's old SangNom filter. The output is not completely but mostly identical.


What's different

  • It's open source
  • Correct borders processing
  • Additional colorspace support
  • Multithreading support
  • Requires SSE2
*Single threaded performance is mostly identical to the old version despite this plugin using SSE2.


Y8

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


Requirements

- AviSynth 2.6.0 Alpha5 or later
- Supported color formats: Y8, YV12, YV16, YV24, YV411
- SSE2 capbale CPU


Syntax and Parameters

SangNom2 (clip, int "order", int "aa", int "aac", int "threads")


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
Strength of luma anti-aliasing.


int  aac = 0
Strength of chroma anti-aliasing. The original SangNom always assumes aa=0 for chroma processing. This makes some use
cases harder to implement, so additional parameter aac was introduced. It's the same as aa but for chroma. Default value
is 0 to maintain backward compatibility.


int  threads =
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.


Changelog

Version      Date            Changes
v0.35 11/26/2013 - x64 build added. Confirmed to be a little slower than x86 on some resolutions with 4 threads and faster in other cases.
v0.3 07/26/2013 - 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 07/14/2013 - 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 07/13/2013 - First public release. Should be more or less stable but doesn't include many improvements.


Archived Downloads

Version Download Source Code
v0.35 SangNom2-x86.zip

SangNom2-x64.zip

0.35.zip
v0.3 SangNom2.dll v0.3.zip
v0.2 SangNom2.dll v0.2.zip
v0.1 SangNom2.dll v0.1.zip


External Links

Personal tools