http://avisynth.org/mediawiki/Condit...ring:_part_III
It's not thought through well. I've got a badly modified version with some fixes, so if you want to use it as a reference or something just ask. Also masktools has some scenechange stuff, as well as mvtools IIRC.