Xaa

From Avisynth wiki
Revision as of 03:21, 3 August 2015 by Reel.Deal (Talk | contribs)

Jump to: navigation, search
Abstract
Author Desbreko
Version v1.1.1
Download xaa_v1.1.1.avsi
Category Anti-aliasing
License
Discussion

Contents

Description

Versatile anti-aliasing script.

Requirements

**Some functionality isn't available for YV24 due to plugin limitations.

Required Plugins

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

Required Scripts


Syntax and Parameters

xaa (clip input, int "ow", int "oh", float "ss", val "ssw", val "ssh", string "mode", string "uscl", string "dscl", int "csharp", float "cstr", int "mask", string "mtype", float "mthr", int "chroma", int "nns", float "eedimthr", float "eediA", float "eediB", float "eediG", bool "lsb_in", bool "lsb", int "dithermode", int "threads")


clip  input =
Input clip to be processed.


int  ow = input.width()
int  oh = input.height()
The output width and height. Useful for when the video is going to be resized after antialising.
Use a negative value for either to disable resizing after supersampling. If not defined it defaults to the dimensions of the input clip.


float  ss = 2.0
The multiplier for determining the supersampled width and height.
Supersampled resolution is automatically rounded to mod4. Defaults to 1.0 (no supersampling) for merged double rate aa modes.


val  ssw = ss
val  ssh = ss
Allows separate control of the supersampled width and height. Overrides the ss value.
When specified as a float, they act as a multiplier like the ss parameter.
When specified as an int, the given value is used for the supersampled width or height without rounding to mod4. Beware of chroma issues with mod2 YV12 resolutions.


string  mode = "SangNom2"
Determines which type of antialiasing is performed. Preset modes will change default settings to mimic other antialiasing filters.
TurnLeft/TurnRight aa types: "SangNom2", "nnedi3", "eedi3", "eedi3+nnedi3", "eedi2"
Merged double rate aa types: "dnnedi3", "deedi3", "deedi3+dnnedi3"
Presets: "maa2, "daa", "MrdaaLame"
Disable aa: "null"


string  uscl = "Spline36"
string  dscl = "Spline36"
The resizing kernels used when upscaling the video, such as when supersampling, and when downscaling the video, such as after supersampling.
Supports all kernels from Resize8 and Dither_resize16 plus "nnedi3" and "eedi3" for their rpow2 scalers. For the Lanczos, Blackman, and Sinc kernels, the taps parameter can be set with a number after the kernel name. E.g. "Blackman3" for BlackmanResize(taps=3).


int  csharp = 0
  • 0 : No contra-sharpening.
  • 1 : Applies contra-sharpening before scaling to output resolution.
  • 2 : Applies contra-sharpening after scaling to output resolution.


float  cstr = -1.0
Controls the strength of the contra-sharpening.
Any negative value uses RemoveGrain(11) as in daa.
A positive value uses Blur as in Mrdaa, up to a max of 7.9.
A value of 0 disables contra-sharpening and overrides the csharp setting.


int  mask = 1
  • 0 : Processes the entire frame
  • 1 : Processes edges only
  • 2 : Processes everything except edges
A negative value will show an overlay of the mask.


string  mtype = "TEMmod"
The type of edge mask to use. Options are: "TEMmod", "TCannyMod", and mt_edge's "sobel", "roberts", "laplace", "prewitt", "cartoon", and "min/max". A custom kernel for mt_edge may also be used. See its documentation for more info.
TEMmod's type parameter can be set with a number on the end of the string. E.g. "TEMmod5" for type=5. If no number is given, the default of 4 is used. See TEMmod's documentation for explanations of the different types.
This setting also determines the mask type for the eedimthr parameter.


float  mthr = 8.0
The threshold of the edge mask. Rounded to the nearest integer for mt_edge types.
  • When mask=1, lower values result in more edges getting processed.
  • When mask=2, lower values result in fewer edges getting excluded.


int  chroma = 0
  • 0 : Processes the luma plane only
  • 1 : Processes both the luma and chroma planes
  • 2 : Processes the chroma planes only


int  nns = 1
nnedi3's nns parameter for modes that use it. Ranges from 0 to 4. Higher values will provide better quality but will be slower.
This setting doesn't affect resizing with nnedi3_rpow2.


float  eedimthr = 0.0
A value greater than 0 creates an edge mask with the given value's threshold to be used with eedi3 modes. Edge-directed interpolation will be used only on masked edges, increasing the filter's speed as the threshold is raised, but at the risk of excluding edges that need antialiasing.
A value of 0 or below disables the mask.
This setting doesn't affect resizing with eedi3_rpow2.


float  eediA = 0.2
float  eediB = 0.25
float  eediG = 20.0
eedi3's alpha, beta, and gamma parameters for modes that use it. They adjust the balance between connecting lines and creating artifacts.
eediA and eediB must be in the range 0 to 1 and their sum can't exceed 1. See eedi3's documentation for more info.
These settings also affect resizing with eedi3_rpow2.


bool  lsb_in = false
Set to true if the input is a stacked 16-bit clip.
Because none of the plugins used for antialiasing support 16-bit, the input will almost always need to be dithered to 8-bit at some point, but it will be processed in 16-bit where possible.


bool  lsb = false
Set to true to output a stacked 16-bit clip.
Because some functions don't support 16-bit, a few combinations of settings will result in the lsb being empty.


int  dithermode = 6
The mode parameter for DitherPost when converting from stacked 16-bit to 8-bit. See Dither's documentation for explanations of the different modes.


int  threads = Undefined
The number of threads to use for each instance of SangNom2, nnedi3, and eedi3.
Leave this undefined to let the plugins choose automatically.


Examples

xaa with default settings:

AviSource("Blah.avi")
xaa()


Changelog

Version      Date            Changes
v1.1.1 04/09/2015 - Added option to set TEMmod's type that I forgot - Improved handling of borders with merged modes v1.1 02/28/2015 - Supports TEMmod and TCannyMod masks, more eedi3 options, MrdaaLame preset as fast as the original. v1.0.3 11/06/2014 - Fixed a bug with csharp=2. It wasn't actually being applied when lsb=true v1.0.2 11/02/2014 - Now preserves the lsb in masked areas when using csharp=2, cstr>0, mask>0


External Links




Back to External Filters

Personal tools