Santiag

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(santiag)
 
m (link)
 
(11 intermediate revisions by one user not shown)
Line 1: Line 1:
{{FilterCat|External_filters|Restoration_filters|Anti-aliasing}}
+
{{FilterCat4|External_filters|Scripts|Restoration_filters|Anti-aliasing}}
[[Category:Scripts]]
+
 
{{Filter3
 
{{Filter3
 
| {{Author/cretindesalpes}}
 
| {{Author/cretindesalpes}}
| v1.4
+
| v1.6
| 3=[http://forum.doom9.org/showpost.php?p=1393006&postcount=12 santiag v1.4 script]
+
| 3=[http://forum.doom9.org/showthread.php?p=1393006#post1393006 santiag v1.6 script]
 
| 4=Anti-aliasing  
 
| 4=Anti-aliasing  
| 5=
+
| 5=[http://en.wikipedia.org/wiki/WTFPL WTFPL]
| 6=[http://forum.doom9.org/showthread.php?p=1393006#post1393006 Doom9 Thread]
+
| 6=[http://forum.doom9.org/showthread.php?t=153835#post1393006 Doom9 Thread]
 
}}
 
}}
 +
 
== Description ==
 
== Description ==
:Simple anti-aliasing with independent horizontal and vertical strength.
+
Simple anti-aliasing with independent horizontal and vertical strength.<br>
 
<br>
 
<br>
 
== Requirements ==
 
== Requirements ==
:- [http://forum.doom9.org/showthread.php?t=168764 AviSynth 2.6.0 Alpha5] or later
+
* [http://sourceforge.net/projects/avisynth2/ AviSynth 2.6.0] or greater
:- [[FAQ_different_types_content#How_do_I_recognize_progressive.2C_interlaced.2C_telecined.2C_hybrid_and_blended_content.3F|Progressive]] input only  
+
* [[FAQ_different_types_content#How_do_I_recognize_progressive.2C_interlaced.2C_telecined.2C_hybrid_and_blended_content.3F|Progressive]] input only  
:- Supported color formats: [[YV12]]
+
* Supported color formats: [[YV12]], [[YV24]]
<br>
+
 
 
==== Required Plugins ====
 
==== Required Plugins ====
:*[[eedi2]]**
+
Latest version of the following plugins are recommended unless stated otherwise.<br>
:*[[eedi3]]**
+
*[[MaskTools2]]
:*[[MaskTools2]]
+
*[[nnedi3|NNEDI3]]
:*[[nnedi3]]
+
Optional plugins:
:*[[SangNom2]]**
+
*[[EEDI2]]
:: **Only required if specifically set by the <tt>{{Template:FuncDef|type}}</tt> parameter.
+
*[[eedi3|EEDI3]]
 +
*[[SangNom2]]
 +
Only required if specifically set by the <tt>{{Template:FuncDef|type}}</tt> parameter.
 +
<br>
 
<br>
 
<br>
  
 
== [[Script variables|Syntax and Parameters]] ==
 
== [[Script variables|Syntax and Parameters]] ==
:{{Template:FuncDef| santiag (clip c, int "strh", int "strv", string "type", int "nns", int "aa", int "aac", int "threads", int "nsize", int "vcheck", int "fw", int "fh", bool "halfres", string "scaler_post", int "maskt")}}
+
:{{Template:FuncDef| santiag (clip c, int "strh", int "strv", string "type", int "nns", int "aa", int "aac", int "threads", int "nsize", int "vcheck", int "fw", int "fh", bool "halfres", string "scaler_post", int "maskt", string "typeh", string "typev")}}
 
<br>
 
<br>
 
::{{Par2|c|clip| }}
 
::{{Par2|c|clip| }}
Line 33: Line 36:
 
<br>
 
<br>
 
::{{Par2|strh|int|1}}
 
::{{Par2|strh|int|1}}
:::Horizontal anti-aliasing strength.
 
:::Set between 0 and 3, anything over these values there is not much improvement and it generates artifacts.
 
<br>
 
 
::{{Par2|strv|int|1}}
 
::{{Par2|strv|int|1}}
:::Vertical anti-aliasing strength.
+
:::Horizontal and vertical anti-aliasing strength.
 
:::Set between 0 and 3, anything over these values there is not much improvement and it generates artifacts.
 
:::Set between 0 and 3, anything over these values there is not much improvement and it generates artifacts.
 
<br>
 
<br>
 
::{{Par2|type|string|"nnedi3"}}
 
::{{Par2|type|string|"nnedi3"}}
 
:::Choose the interpolation method:
 
:::Choose the interpolation method:
::::*"eedi2"
+
:::*"eedi2"
::::*"eedi3"
+
:::*"eedi3"
::::*"nnedi3"
+
:::*"nnedi3"
::::*"sangnom"
+
:::*"sangnom"
 
<br>
 
<br>
 
::{{Par2|nns|int|1}}
 
::{{Par2|nns|int|1}}
 
:::Sets the number of neurons in the predictor neural network in [[nnedi3/nnedi3|nnedi3]].  
 
:::Sets the number of neurons in the predictor neural network in [[nnedi3/nnedi3|nnedi3]].  
:::Possible settings are 0, 1, 2, 3, and 4. 0 is fastest. 4 is slowest, but should give the best quality.  
+
:::Possible settings are 0, 1, 2, 3, and 4. 0 is fastest. 4 is slowest, but should give the best quality. This is a quality vs speed option; however, differences are usually small.
:::This is a quality vs speed option; however, differences are usually small.
+
  
::::*0 - 16
+
:::*0 - 16
::::*1 - 32
+
:::*1 - 32
::::*2 - 64
+
:::*2 - 64
::::*3 - 128
+
:::*3 - 128
::::*4 - 256
+
:::*4 - 256
  
 
:::This parameter only has an effect when <tt>{{Template:FuncDef|type}}="nnedi3"</tt>.
 
:::This parameter only has an effect when <tt>{{Template:FuncDef|type}}="nnedi3"</tt>.
 
<br>
 
<br>
 
::{{Par2|aa|int|48}}
 
::{{Par2|aa|int|48}}
:::Luma antialiasing strength for [[SangNom2]].
 
:::This parameter only has an effect when <tt>{{Template:FuncDef|type}}="sangnom"</tt>.
 
<br>
 
 
::{{Par2|aac|int|0}}
 
::{{Par2|aac|int|0}}
:::Chroma antialiasing strength for [[SangNom2]].
+
:::Luma(<tt>{{Template:FuncDef|aa}}</tt>) and chroma(<tt>{{Template:FuncDef|aac}}</tt>) antialiasing strength for [[SangNom2]].
 
:::This parameter only has an effect when <tt>{{Template:FuncDef|type}}="sangnom"</tt>.
 
:::This parameter only has an effect when <tt>{{Template:FuncDef|type}}="sangnom"</tt>.
 
<br>
 
<br>
Line 73: Line 69:
 
<br>
 
<br>
 
::{{Par2|nsize|int|6}}
 
::{{Par2|nsize|int|6}}
:::Sets the size of the local neighborhood around each pixel that is used by the predictor
+
:::Sets the size of the local neighborhood around each pixel that is used by the predictor neural network in [[nnedi3/nnedi3|nnedi3]].  
:::neural network in [[nnedi3/nnedi3|nnedi3]]. Possible settings (x_diameter x y_diameter):
+
:::Possible settings (x_diameter x y_diameter):
  
::::*0 -  8x6
+
:::*0 -  8x6
::::*1 -  16x6
+
:::*1 -  16x6
::::*2 -  32x6
+
:::*2 -  32x6
::::*3 -  48x6
+
:::*3 -  48x6
::::*4 -  8x4
+
:::*4 -  8x4
::::*5 -  16x4
+
:::*5 -  16x4
::::*6 -  32x4
+
:::*6 -  32x4
  
:::What setting to use really depends on the amount of aliasing (lost information) in the source. If the source was
+
:::What setting to use really depends on the amount of aliasing (lost information) in the source.  
:::heavily low-pass filtered before interlacing then aliasing will be low and a large x_diameter setting won't be needed, and vice versa.
+
:::If the source was heavily low-pass filtered before interlacing then aliasing will be low and a large x_diameter setting won't be needed, and vice versa.
  
 
:::This parameter only has an effect when <tt>{{Template:FuncDef|type}}="nnedi3"</tt>.
 
:::This parameter only has an effect when <tt>{{Template:FuncDef|type}}="nnedi3"</tt>.
Line 92: Line 88:
 
:::Possible values:
 
:::Possible values:
  
::::*0 - no reliability check
+
:::*0 - no reliability check
::::*1 - weak reliability check
+
:::*1 - weak reliability check
::::*2 - med reliability check
+
:::*2 - med reliability check
::::*3 - strong reliability check
+
:::*3 - strong reliability check
  
 
:::This parameter only has an effect when <tt>{{Template:FuncDef|type}}="eedi3"</tt>.
 
:::This parameter only has an effect when <tt>{{Template:FuncDef|type}}="eedi3"</tt>.
Line 109: Line 105:
 
:::True or false.
 
:::True or false.
 
<br>
 
<br>
::{{Par2|scaler_pos|string|"Spline36Resize"}}
+
::{{Par2|scaler_post|string|"Spline36Resize"}}
 
:::[[Resize]] method for mandatory center shift correction (subpixel shifting).
 
:::[[Resize]] method for mandatory center shift correction (subpixel shifting).
  
::::*"BicubicResize"
+
:::*"BicubicResize"
::::*"BilinearResize"
+
:::*"BilinearResize"
::::*"BlackmanResize"
+
:::*"BlackmanResize"
::::*"GaussResize"
+
:::*"GaussResize"
::::*"LanczosResize"
+
:::*"LanczosResize"
::::*"Lanczos4Resize"
+
:::*"Lanczos4Resize"
::::*"PointResize"
+
:::*"PointResize"
::::*"SincResize"
+
:::*"SincResize"
::::*"Spline16Resize"
+
:::*"Spline16Resize"
::::*"Spline36Resize"
+
:::*"Spline36Resize"
::::*"Spline64Resize"
+
:::*"Spline64Resize"
 
<br>
 
<br>
 
::{{Par2|maskt|int| }}
 
::{{Par2|maskt|int| }}
Line 130: Line 126:
 
:::By default this parameter is not defined and only has an effect when <tt>{{Template:FuncDef|type}}="eedi3"</tt>.
 
:::By default this parameter is not defined and only has an effect when <tt>{{Template:FuncDef|type}}="eedi3"</tt>.
 
<br>
 
<br>
 +
::{{Par2|typeh|string|type}}
 +
::{{Par2|typev|string|type}}
 +
:::Choose the horizontal/vertical interpolation method; if not defined it defaults to <tt>{{Template:FuncDef|type}}</tt>.
 +
<br>
 +
 
== Examples ==
 
== Examples ==
 
santiag with default settings:
 
santiag with default settings:
Line 137: Line 138:
 
== Changelog ==
 
== Changelog ==
 
  Version      Date            Changes<br>
 
  Version      Date            Changes<br>
 +
v1.6        04/06/2015      - support for 4:4:4 colorspace
 +
v1.5        11/10/2014      - add "typeh" and "typev" parameters, enhance internal mclip handling, and other minor changes
 
  v1.4        11/22/2013      - update to use SangNom2 and updated eedi3 (v0.9.2).  
 
  v1.4        11/22/2013      - update to use SangNom2 and updated eedi3 (v0.9.2).  
  v1.3        01/20/2012     - update
+
  v1.3        ??/??/20??     - ????
  v1.2        ??/??/????     - ????
+
  v1.2        10/09/2012     - ????
 
  v1.1        ??/??/????      - ????
 
  v1.1        ??/??/????      - ????
 
  v1.0        04/19/2010      - public release  
 
  v1.0        04/19/2010      - public release  
 
<br>
 
<br>
 
== External Links ==
 
== External Links ==
*[http://forum.videohelp.com/threads/323127-Improve-the-quality-of-video-animation?p=2011595&viewfull=1#post2011595 VideoHelp Forum] - Original v1.0 santiag script (for reference only).
+
These older scripts are here for reference and completeness only.
*[http://pastebin.com/Kx8KS3uy Pastebin] - Santiag v1.3 (for reference only)
+
*[http://web.archive.org/web/20150502221126/http://forum.doom9.org/showthread.php?t=153835#post1393006 Doom9 Forum] - santiag v1.6
<br>
+
*[http://web.archive.org/web/20141117042547/http://forum.doom9.org/showthread.php?t=153835#post1393006 Doom9 Forum] - santiag v1.5
 +
*[http://web.archive.org/web/20140629003732/http://forum.doom9.org/showthread.php?t=153835#post1393006 Doom9 Forum] - santiag v1.4
 +
*[http://pastebin.com/Kx8KS3uy Pastebin] - santiag v1.3
 +
*[http://web.archive.org/web/20131009184859/http://forum.doom9.org/showthread.php?p=1393006#post1393006 Doom9 Forum] - santiag v1.2
 +
*[http://forum.videohelp.com/threads/323127-Improve-the-quality-of-video-animation?p=2011595&viewfull=1#post2011595 VideoHelp Forum] - Original v1.0 santiag script.
 
<br>
 
<br>
 
<br>
 
<br>
 
-----------------------------------------------
 
-----------------------------------------------
 
'''Back to [[External_filters#Anti-aliasing|External Filters]] &larr;'''
 
'''Back to [[External_filters#Anti-aliasing|External Filters]] &larr;'''

Latest revision as of 05:35, 18 July 2016

Abstract
Author cretindesalpes
Version v1.6
Download santiag v1.6 script
Category Anti-aliasing
License WTFPL
Discussion Doom9 Thread

Contents

[edit] Description

Simple anti-aliasing with independent horizontal and vertical strength.

[edit] Requirements

[edit] Required Plugins

Latest version of the following plugins are recommended unless stated otherwise.

Optional plugins:

Only required if specifically set by the type parameter.

[edit] Syntax and Parameters

santiag (clip c, int "strh", int "strv", string "type", int "nns", int "aa", int "aac", int "threads", int "nsize", int "vcheck", int "fw", int "fh", bool "halfres", string "scaler_post", int "maskt", string "typeh", string "typev")


clip  c =
Input clip to be processed.


int  strh = 1
int  strv = 1
Horizontal and vertical anti-aliasing strength.
Set between 0 and 3, anything over these values there is not much improvement and it generates artifacts.


string  type = "nnedi3"
Choose the interpolation method:
  • "eedi2"
  • "eedi3"
  • "nnedi3"
  • "sangnom"


int  nns = 1
Sets the number of neurons in the predictor neural network in nnedi3.
Possible settings are 0, 1, 2, 3, and 4. 0 is fastest. 4 is slowest, but should give the best quality. This is a quality vs speed option; however, differences are usually small.
  • 0 - 16
  • 1 - 32
  • 2 - 64
  • 3 - 128
  • 4 - 256
This parameter only has an effect when type="nnedi3".


int  aa = 48
int  aac = 0
Luma(aa) and chroma(aac) antialiasing strength for SangNom2.
This parameter only has an effect when type="sangnom".


int  threads = 0
Set the number of threads to use; 0 means this will be automatically set.
This parameter only affects eedi3 and nnedi3.


int  nsize = 6
Sets the size of the local neighborhood around each pixel that is used by the predictor neural network in nnedi3.
Possible settings (x_diameter x y_diameter):
  • 0 - 8x6
  • 1 - 16x6
  • 2 - 32x6
  • 3 - 48x6
  • 4 - 8x4
  • 5 - 16x4
  • 6 - 32x4
What setting to use really depends on the amount of aliasing (lost information) in the source.
If the source was heavily low-pass filtered before interlacing then aliasing will be low and a large x_diameter setting won't be needed, and vice versa.
This parameter only has an effect when type="nnedi3".


int  vcheck = 2
Possible values:
  • 0 - no reliability check
  • 1 - weak reliability check
  • 2 - med reliability check
  • 3 - strong reliability check
This parameter only has an effect when type="eedi3".



int  fw =
int  fh =
fw (width) and fh (height) allows to set a new output resolution.
Center shift correction and resampling happen in one call using the internal AviSynth resizer specified by scaler_pos.
If fw and fh are not specified, they default to the width and height of the input clip.


bool  halfres = false
True or false.


string  scaler_post = "Spline36Resize"
Resize method for mandatory center shift correction (subpixel shifting).
  • "BicubicResize"
  • "BilinearResize"
  • "BlackmanResize"
  • "GaussResize"
  • "LanczosResize"
  • "Lanczos4Resize"
  • "PointResize"
  • "SincResize"
  • "Spline16Resize"
  • "Spline36Resize"
  • "Spline64Resize"


int  maskt =
threshold for mt_binarize. Sensible range is 0 to 255; 0 means full processing, higher values equals less processing.
If the value of maskt is greater than 0 an edge mask will be created. This mask will be used by eedi3 via the mclip parameter.
By default this parameter is not defined and only has an effect when type="eedi3".


string  typeh = type
string  typev = type
Choose the horizontal/vertical interpolation method; if not defined it defaults to type.


[edit] Examples

santiag with default settings:

AviSource("Blah.avi")
santiag(strh=1, strv=1, type="nnedi3", nns=1, threads=0, nsize=6, halfres=false, scaler_post="Spline36Resize")


[edit] Changelog

Version      Date            Changes
v1.6 04/06/2015 - support for 4:4:4 colorspace v1.5 11/10/2014 - add "typeh" and "typev" parameters, enhance internal mclip handling, and other minor changes v1.4 11/22/2013 - update to use SangNom2 and updated eedi3 (v0.9.2). v1.3  ??/??/20?? - ???? v1.2 10/09/2012 - ???? v1.1  ??/??/???? - ???? v1.0 04/19/2010 - public release


[edit] External Links

These older scripts are here for reference and completeness only.




Back to External Filters

Personal tools