Scintilla's Guide to AVISynth Postprocessing Filters: Temporal Smoothers
FaeryDust -
FluxSmooth -
TemporalCleaner
(
Home -
Spatial Smoothers - Spatio-Temporal Smoothers -
Sharpeners - Dealing with Dot Crawl -
Dealing with Rainbows
)
Intro
While the more intuitive spatial smoothers smooth out the differences between different pixels in the same frame, temporal
smoothers aim to improve compressibility and/or visual quality by smoothing out the changes of pixels between different
frames. Though this usually doesn't have as noticeable of an effect (unless it causes ghosting artifacts, natch!),
it can often improve compressibility more than spatial smoothing. This is because distribution codecs such as MPEG-1, XviD,
and DivX use P-frames and B-frames that only store differences between the current frame and the previous (or previous and
next) one instead of storing an entire image.
But because the visual differences are so slight, I'm going to dispense with screenshots for this page and just give
the straight-up 411.
FaeryDust
The temporal filter from the Dust family.
Type: Plugin
Found in file: DustV5.dll
Author: Steady
Homepage: None
Colorspaces: RGB24, RGB32, or YUY2 (note: NO YV12 SUPPORT)
Interlacing: Progressive only (I believe)
Speed: Slow to very slow (7-14 fps at default settings, depending on scene changes, crossfades, etc.)
Defaults: FaeryDust(limit=2)
Parameters:
- limit (1-8) determines the maximum amount FaeryDust can change each pixel by; if a pixel would have been changed by
more than this value, it is changed by exactly this value instead. Raising this value will
increase the strength of the smoothing (but may hurt details).
Usage notes:
- IMPORTANT: The Dust filters do NOT support YV12. This is because they were written for AVISynth 2.0.x, which
was incapable of working in the YV12 colorspace; a version for AVISynth 2.5.x was never coded.
If you try to feed FaeryDust YV12 input, your application will suddenly quit without warning. Always convert to YUY2 first.
- IMPORTANT: The Dust filters do not autoload. Again, this is because they were written for AVISynth 2.0.x and
not 2.5.x.
To use them, you first have to load a plugin called LoadPluginEx2.dll (in a separate directory from your default
plugins directory, because it will break autoloading otherwise); I've taken care of this for you in an autoloading .AVSI
helper script. Then you manually load DustV5.dll by putting the following line before calling the filter:
LoadPlugin("C:\avs25\plugins\DustV5.dll") (of course, replace the path given
with the path to your AVISynth plugins directory).
- IMPORTANT: Do not call the Dust filters more than once in one script. This also means that if you use FaeryDust
in a
script, you can't use SpaceDust, PixieDust, or GoldDust in that same script.
- FaeryDust should probably be used after cropping and resizing, but I'm not sure about this.
FaeryDust is the temporal-only filter from the Dust family of filters, coded by Steady for AVISynth 2.0.x (a version for
2.5.x was never released). All I know about its theory of operation is that it uses some kind of motion compensation.
According to Steady, it should preserve the maximum detail of all the Dust filters, but raising the limit setting
too far may negate this.
Personally, I don't use it that much, probably because it's just as slow as PixieDust but doesn't offer nearly as
impressive compressibility gains. However, it definitely doesn't cause as much blockiness as PixieDust. Still, I would
suggest trying SpaceDust before FaeryDust, if only because of the speed issue.
Back to top
FluxSmooth
Targets fluctuating pixels. Comes in two flavors.
Type: Plugin
Found in file: FluxSmooth.dll
Author: SansGrip
Homepage:
http://kvcd.net/sansgrip/avisynth/
Colorspaces: YUY2 or YV12
Interlacing: Progressive or interlaced (FluxSmoothT), or progressive only (FluxSmoothST)
Speed: Fast! (300+ fps for FluxSmoothT; 140+ fps for FluxSmoothST)
Defaults: FluxSmoothT(temporal_threshold=7)
or FluxSmoothST(temporal_threshold=7, spatial_threshold=7)
Parameters:
- temporal_threshold (-1 to 255?) determines how close to the current pixel's value a temporal neighbor pixel
has to be in order to be included in the averaging. Raising this value will increase the strength of the smoothing (but
may introduce ghosting). If set to -1, then no temporal smoothing occurs (cannot be set to -1 with FluxSmoothT).
- spatial_threshold (-1 to 255?) determines how close to the current pixel's value a spatial neighbor pixel
has to be in order to be included in the averaging. Raising this value will increase the strength of the smoothing (but
may introduce blurring). If set to -1, then no spatial smoothing occurs (but in that case, you should just be using
FluxSmoothT anyway).
Usage notes:
Many of you may be looking at FluxSmoothST and wondering "WTH? That's a spatio-temporal smoother! Why is it on
this page?" Well, in order to answer that, I have to explain the theory of operation of FluxSmooth.
FluxSmooth only corrects a pixel if it has a value that's either lower or higher than the values of BOTH its
temporal neighbor pixels (a.k.a. the same pixel in the previous and next frames). SansGrip refers to these as fluctuating
pixels, hence the filter's name. The idea is that such a pixel is more likely to be noise than signal.
So you see, in order to decide which pixels should be changed, FluxSmooth makes only temporal considerations, no spatial
ones. That's why it goes on the temporal smoothers page.
In my experience, FluxSmooth (at least FluxSmoothST) is very good at preserving detail while still helping compressibility,
and it would probably make a good filter to go before other, more heavy-duty smoothers. Personally, what I'd really like
to see is another threshold that could be used to ignore pixels that are fluctuating by more than a certain amount...
Back to top
TemporalCleaner
Simple, fast, safe temporal smoother.
Type: Plugin
Found in file: TemporalCleaner.dll
Author: Vlad59 after Jim Casaburi
Homepage: None
Colorspaces: YUY2 or YV12
Interlacing: Progressive or interlaced
Speed: FAST! (300+ fps)
Defaults: TemporalCleaner(ythresh=5, cthresh=10)
Parameters:
- ythresh (1-255?) determines how close the previous pixel's luma has to be to that of the current pixel
in order for averaging to occur. Vlad59 advises that this not be raised higher than about 8, in the interests of not
introducing ghosting.
- cthresh (1-255?) determines how close the previous pixel's chroma has to be to that of the current pixel
in order for averaging to occur. However, if the luma difference for a pixel is above ythresh, then this is ignored
and the chroma is automatically left as is. So this parameter can normally safely be set higher than ythresh.
Usage notes:
TemporalCleaner's theory of operation is very simple: if a pixel differs from the same pixel in the previous frame by
less than a threshold, the pixel is replaced by the average of itself and the previous pixel. That's it (but see the note
above about the chroma).
Personally, I haven't found TemporalCleaner to be as effective as the other temporal smoothers such as FluxSmooth.
However, it's undeniably very fast, and I've never seen it introduce any artifacts or wreck any details
at the default settings.
Back to top
Home -
Spatial Smoothers - Spatio-Temporal Smoothers -
Sharpeners - Dealing with Dot Crawl -
Dealing with Rainbows
Last updated on 3/20/08
Questions? Comments? Concerns? Contact Scintilla
Fight Spam! Click Here!