AviSynth/tmaskcleaner — pull request #1 by tophf (2013-12-22 22:09:38+00:00)
Title: Add 'fade' parameter

Usage:
tmaskcleaner(length=100, fade=200) will zero areas below _length_, assign 0..255 to areas in _[length,length+fade]_ range, and 255 to areas above _length+fade_.

This allows adaptive processing of area ranges for example by transforming the mask from linear 0..255 distribution denoted here as / to:
* /\ with mt_lut("x 128 > 255 x - x ?")
* \_||\_ to grab some arbitrary range with mt_lut("x 118 > x 138 < | 255 0 ?")
* non-linear \_/\\_ mask by smoothly amplifying the middle with mt_lut("x 128 > 255 x - x ? 100 - 28 / 0.5 ^ 256 *")