Avisynth Users :

gradfun2db is a banding removal filter.

Syntax of the filter : gradfun2db( clip c, float "thr" )

 * thr is a threshold represneting 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".