Log in

View Full Version : Deinterlace when using filters?


arnie.d
3rd September 2005, 18:03
Hi,

I want to use the following filters in virtualdub:

resize (lanczos)
sharpen
temp smoother
HSV adjust

Should I use the deinterlace/unfold fields filter before using these filters?
And after that fold them back?

LoRd_MuldeR
3rd September 2005, 18:18
Hi,

I want to use the following filters in virtualdub:

resize (lanczos)
sharpen
temp smoother
HSV adjust

Should I use the deinterlace/unfold fields filter before using these filters?
And after that fold them back?

Yes! I think the Deinterlacer should always be the *first* filter. Most filters (for example resize) will "destroy" the interlaced frames, so they cannot be deinterlaced any more! The only filters you can put in front of the Deinterlacer are filter that can handle interlaced frames correctly.

LoRd_MuldeR
3rd September 2005, 18:27
This image shows a frame which was first resized and then deinterlaced. Obviously not a very good idea ;-)

http://www.100fps.com/distortion1.jpg

stephanV
3rd September 2005, 18:34
some filters are interlace aware though, the resizer is on one of them IIRC. but if you are going to resize, it is normal practice to deinterlace first.

arnie.d
3rd September 2005, 19:57
Are you talking about deinterlacing as blend fields together or unfold fields, apply other filters and refold fields? I want the output avi to be interlaced.

mic
3rd September 2005, 20:03
resize (lanczos)
sharpen
temp smoother
HSV adjust

Should I use the deinterlace/unfold fields filter before using these filters?
And after that fold them back?
As posted already, interlace should come before resize...
FWIW, each alternating line in a frame is part of a field, ie. all evens and all odds -- think of these as separate pictures. When you enlarge, the 1st line of the original frame is now taller, ocupies at least a portion of the 2nd line. If you reduce, the first line has parts of the 2nd. The results are not always as dramatic as the picture kindly posted, but always there. :)

By rights then you want the most de-interlaced picture before resize. It makes sense to run smoothing filters after de-interlace but before resize. You can use the default deinterlace (you can experiment with the interlaced box checked for downsize, but never with enlarge), or use one of those filters based on the results of interlacing found in each frame. The advantage = not everything is blurred, but it's harder to use because of having to set thresholds etc... IMO you can experiment with the HSV filter placement, & sharpen I would think you'd want last, though I have had cases [not often] where I used a filter for *slight* softening after sharpen. Separating to fields is up to you -- I've never experienced any benefit worth it.

When it comes to interlaced output, you've pretty much destroyed that by the resize (also posted already). When going to mpg2 (SVCD/DVD), it can *sometimes* help to do IVT first, using or adding pulldown flags to the m2v video.

arnie.d
3rd September 2005, 20:11
Oops, I forgot to mention I have PAL video.

mic
3rd September 2005, 20:53
Oops, I forgot to mention I have PAL video.
I'm sorry :(

Just teasing... :D
It shouldn't matter except for IVT, but otherwise interlaced is interlaced.

Depending on how you do the deinterlacing, and the original source, sometimes some effects of the interlacing remain as a sort of ghost. Every once in a while this causes an extremely short motion stutter on TV. I sometimes run IVT when this happens because the adaptive method of IVT can often remove these interlacing artifacts with a shotgun approach, by removing worst frames.