Scharfi,
what the hell are you doing there?
Your script gives me sort of an psychedelic-solarized picture, which doesn't give me the impression of being too useful. (Using Avisysnth Oct11, feeded with yv12.)
Are you aiming for an effect only, or do you want to perform a detection-of-something?
To do something *similar* to what you told (adding with increasing lightness), what about
a=whatever.levels(0,1.0,255,255,0)
b=whatever.levels(0,1.0,255,255,0)
layer(a,b,"mul")
levels(0,1.0,255,255,0)
Not really adding, but inverse-multiplying.
In order to avoid 16-235 limiting, use YV12layer from Kurosu's MaskTools instead.
- Didée
P.S.
BTW, is there a clamping filter out there somewhere?
i.e. WannaClamp(32,224) ==> [0-31] == black, [32-224] == original, [225-255] ==
BLACK
?