Soften

From Avisynth wiki
Revision as of 17:06, 8 November 2015 by Raffriff42 (Talk | contribs)

Jump to: navigation, search

SpatialSoften(clip clip, int radius, int luma_threshold, int chroma_threshold)
TemporalSoften(clip clip, int radius, int luma_threshold, int chroma_threshold [, int scenechange] [, int mode])

The SpatialSoften and TemporalSoften filters remove noise from a video clip by selectively blending pixels. These filters can work miracles, and I highly encourage you to try them. But they can also wipe out fine detail if set too high, so don't go overboard. And they are very slow, especially with a large value of radius, so don't turn them on until you've got everything else ready.

TemporalSoften is similar to SpatialSoften, except that it looks at the same pixel in nearby frames, instead of nearby pixels in the same frame. All frames no more than radius away are examined. This filter doesn't seem to be as effective as SpatialSoften.

I encourage you to play around with the parameters for these filters to get an idea of what they do--for example, try setting one of the three parameters to a very high value while leaving the others low, and see what happens. Note that setting any of the three parameters to zero will cause the filter to become a very slow no-op.

TemporalSoften smooths luma and chroma separately, but SpatialSoften smooths only if both luma and chroma have passed the threshold.

The SpatialSoften filter work only with YUY2 input. You can use the ConvertToYUY2 filter if your input is not in YUY2 format. Note that large values for radius (>32) will cause AviSynth to crash.

Starting from v2.5 two options are added to TemporalSoften:

  • Added scenechange=n parameter: Using this parameter will avoid blending across scene changes. 'n' defines the maximum average pixel change between frames. Good values for 'n' are between 5 and 30. Requires ISSE.
  • An optional mode=2 parameter: It has a new and better way of blending frame and provides better quality. It is also much faster. mode=1 is default operation, and works as always.

[Good initial values: TemporalSoften(4,4,8,15,2)]

Changes:

v2.56 TemporalSoften working also with RGB32 input (as well as YV12, YUY2)
Personal tools