gradfun2db (clip, float "thr") clip = Input clip. float thr = 1.2 Threshold representing the strength of the filter; default value is 1.2. Coders : The code is separated from avisynth, and can act as a standalone library. The files you'll need are "gradfun.cpp", "gradfun.h" and "gradfun.asm". Have a look at gradfun.h to see how to use it (it's pretty simple, really). The avisynth filter's code can be seen as the sample code for the "library". GradFun2DBmod (clip input, float "thr", float "thrC", int "mode", float "str", float "strC", int "temp", int "adapt", string "custom", bool "mask", int "radius", int "range", bool "show", int "screenW", int "screenH") clip input = Input clip. Dither float thr = 1.2 GradFun2db "thr" parameter; threshold representing the strength of the filter on the luma channel. float thrC = 1.2 Same as thr but for the chroma channels. If this parameter is not specified it defaults to the value of thr. int mode = 2 Mode for the addition of 16 pixels around the image. Turning this parameter off will leave the outer 16 pixels on all borders unprocessed, this is a limitation of GradFun2db. 0 = Off [same as GradFun2db] 1 = AddBorders (speed:+ quality:-) [same as GradFunk] 2 = PointResize (speed:+ quality:+) [recommended] 3 = Flip/Stack (speed:- quality:+) [same as GradFunkMirror] Grain float str = 0.8 AddGrainC "var" parameter; the standard deviation (strength) of the luma noise, 0.0 is disabled. float strC = 0.0 AddGrainC "uvar" parameter; the standard deviation (strength) of the chroma noise, 0.0 is disabled (default). int temp = 50 Strength for temporal stabilization. -1 = off 0 = nervous grain 50 = half and half 100 = calm grain Range: -1 to 100 int adapt = 64 Threshold for luma-adaptative grain. -1 = off 0 = source 255 = invert Range: -1 to 255 string custom = "empty" Use your own grain generator instead of AddGrainC (temp & adapt parameters are on, set -1 to turn off). Mask bool mask = true Use adaptative deband mask(dither/grain is only applied to areas with banding's susceptibility). int radius = 2 Radius for the mask (1 is the fastest, 2-3 are slower) int range = 2 Range used in the mask (1-3 are good value) Debug bool show = false Show debug clip & information [1]. int screenW = 1280 int screenH = 1024 Screen resolution (for show clip).