PDA

View Full Version : Order of filters in AviSynth.


nitinpushpan
10th July 2009, 17:10
Is there any specific order for using the filters in Avisynth? I'm not sure whether to use UnDot() filter before or after the spatial temporal smoothers like FluxSmoothST() and Deblock() filter? Please suggest a good ordering for the filters. Also somebody please suggest a better filter that performs the same operation than Undot()?

Adub
10th July 2009, 18:13
Sure order matters, but it depends on what you want to do with your source. Remember (usually) each filter will filter the output of the line before it.

For example:

#Filter 1
#Filter 2
#Filter 3

Filter 1 filters the video first. Filter 2 filters the results produced from Filter 1.
Filter 3 filters the results from Filter 2, which are produced from the output of Filter 1, etc...

For an alternative to undot(), many people use RemoveGrain(2).

nitinpushpan
10th July 2009, 18:33
So what do you suggest? Should I use it before or after FluxSmoothST()?

Adub
10th July 2009, 21:46
The rule of thumb is always: "Do what looks good to you."

But if you want my professional opinion, UnDot() is usually just used to smooth out the irregular "hot" pixels, so I would usually put it first, or at least high up on the filter list.

The reason is that it doesn't destroy a whole lot of detail, and can it's output can allow for better motion compensation down the line.

BigDid
10th July 2009, 22:25
...
For an alternative to undot(), many people use RemoveGrain(2).
Hi,

Hmmm, is'nt mode1 the equivalent to undot (but quicker)...?
http://forum.doom9.org/showthread.php?t=106413
http://videoprocessing.11.forumer.com/viewtopic.php?p=148&sid=1e0922978f95bbcea42016423cc6a950#148

As for mode2 I find it already more destructive than mode5 but, it is my opinion only... :D

Did

Adub
10th July 2009, 22:44
It appears you are correct, however, I have always seen people use RemoveGrain(2), and never mode 1. I'm not saying that it's bad to do so, just that it seems to be the general practice to use mode 2.

nitinpushpan
11th July 2009, 08:19
Thanks guys for the useful advice...

m3mbran3
11th July 2009, 08:40
Generally I would do something like

deinterlace
crop
resize
degrain
sharpen

Of course it is all user preference but as some filters don't work well with interlaced content you should deinterlace first (if needed). I also find that sharpening after degraining provides better results too.

10L23r
12th July 2009, 03:08
I would do deblock, undot/removegrain, fluxsmooth.

It's mostly "common sense" and experience. Generally, you will want to let each filter have the best input possible. For example, you will not want to resize and then deinterlace/ivtc because the fields will be destroyed.

Here are some general tips:

Don't crop or resize before deblocking. cropping or resizing will shift or blur the boundaries of the blocks, making deblocking less effective.

Cropping/resizing: use "crop(l,t,w,h).xxxresize(x,y)" to remove black borders. use "xxxresize(x,y,l,t,w,h)" if you want to extract a specific part of an image.
Look here: http://avisynth.org/mediawiki/Resize#General_information for more information

Sharpening (usually) amplifies noise, so putting it before a denoiser is (usually) not a great idea.

n0an
17th July 2009, 00:21
Generally I would do something like

deinterlace
crop
resize
degrain
sharpen

Of course it is all user preference but as some filters don't work well with interlaced content you should deinterlace first (if needed). I also find that sharpening after degraining provides better results too.

Doesn't sharpening in the end produce some noise? I usually use sharpening just after FFT3D(denoising) or degraining and then use a light smoothener or a denoiser to remove the artifacts of sharpening. Does anyone have any better ways?