LMFlicker 0.1 by Loren Merritt, Copyright 2004 LMFlicker is an Avisynth 2.5 filter, intended to reduce flickering in some film/vhs transfers. FieldFade is a similar concept, but applied on a per-field basis, to reduce combing in a video where fades were applied after telecine. Warning: this is alpha software. It will contain bugs, though I haven't found them yet. Tips: For LMFlicker, you may want to tweak radius and blur. All other settings are purely optional and probably don't need to be changed. LMFlicker should be safe to apply to a whole movie, even if only some parts need to be deflickered. Try FieldFade with no arguments. FieldFade probably has side-effects that I haven't discovered, so should probably only be applied to the sections that need it. Don't expect perfect results from FieldFade: I approximate fading as an affine transform, and that should be good enough. But if you trust the DVD masterers to do the right thing, you wouldn't need this filter in the first place. Usage: LMFlicker(clip, int startframe, int endframe, int frame, int lthresh, int cthresh, float scene, bool show, string log, int radius, int blur) FieldFade(clip, int startframe, int endframe, int frame, int lthresh, int cthresh, float scene, bool show, string log, int field, bool chroma, bool affine) startframe, endframe: (default=none) If specified, the filter will process only the frames between startframe and endframe (inclusive), and pass all others through unmodified. If only one of these is specified, the other is assumed to be the other end of the video. frame: (default=none) Like start/endframe, but filters only one frame. lthresh: (default=20, max=255) cthresh: (default=20, max=255) When calculating the fade transform, ignore any pixels that differ from their neighbors by more than this much (luma and chroma are processed independently). In LMFlicker, this neighbor is temporal. In FieldFade, this neighbor is vertical. scene: (default=0.6) If less than this fraction of all pixels pass lthresh and cthresh, then the frame is considered to be a scene change, and is not modified. show: unimplemented log: (default=none) print some statistics to a file radius: (default=4, max=20) Look at this many neighbors when calculating the target brightness. blur: (default=1) Run this many iterations of blur() before comparing frames, to reduce noise. (This affects only the analysis; it doesn't blur the output.) field: Which field to modify when equalizing the two. 0 => modify top field 1 => modify bottom field 2 => modify both, to meet in the middle (default) chroma: (default=true) Decomb chroma too. affine: (default=true) Search for an affine transform (scale and offset) of brightness, as opposed to just scale.