Log in

View Full Version : Using avisynth filters on interlaced video


HighInBC
25th June 2004, 16:41
Ok, lets say I have some DV video, and it is interlaced.

Say I want to use the Dissolve command, can I just do:

Dissolve (clip1,clip2.10)

or will that damage the interlacing? It looks to the eye like it damages the interlacing so I wrote this:

function interlaced_dissolve(clip clip1, clip clip2, int iter)
{
clip1 = clip1.SeparateFields()
odd1 = clip1.SelectOdd
evn1 = clip1.SelectEven

clip2 = clip2.SeparateFields()
odd2 = clip2.SelectOdd
evn2 = clip2.SelectEven

odd = Dissolve(odd1,odd2,iter)
evn = Dissolve(evn1,evn2,iter)

return Interleave(evn,odd).Weave().DoubleWeave.SelectOdd()
} # I wrote this with some help from the DV to DVD faq as a base

and it is invoked like this:

source = a1.interlaced_dissolve(a2,10).interlaced_dissolve(b1,10).interlaced_dissolve(c1,10).interlaced_dissolve(d,10)

so will that function dissolve better without damaging interlacing lines? or does avisynth handle that internally?

P.S.

I got most of that routine for a noise reduction routine in the DV2DVD faq, but what is the '.DoubleWeave.SelectOdd()' for? it seems redundant?

bb
26th June 2004, 14:29
Yes, the dissolve should be done on a field basis like you've described it (didn't test the script, but looks good).

DoubleWeave.SelectOdd() changes the field order from bff to tff or vice versa. This is necessary for ecoders that encode tff only, like CCE (except the latest version, which can encode bff).

bb

HighInBC
26th June 2004, 19:29
thank you you are most helpful