PDA

View Full Version : Swapping Field Parity


jcsston
20th January 2004, 07:22
Hi,
I've been trying to convert some old home videos to DVD and am having trouble getting smooth playback.
I find out that the fields are not always in the correct order. Ex. Sometimes they are TFF at other times they are BFF. I thought, No worries AviSynth can handle this :D

But my script doesn't want to change the parity of a selection of frames only the whole served clip.

Here is my script

#Load Source(s)
SegmentedAviSource("I:\home_video.avi")

#Trim out bad/blank parts
Trim(0,267) ++ Trim(275,11376) ++ Trim(11707,14104) ++ Trim(14528,19437) ++ Trim(19459,19622) ++ Trim(19641,23027) ++ Trim(23442,73309) ++ Trim(73440,111009) ++ Trim(119817,142918) ++ Trim(150262,152494)

# I divide the frame nos by 2 because I was using SeparateFields() and VDubMOD to aquire them
Trim(0, 37372/2) + SwapFields(Trim(37372/2,102819/2)) + Trim(102819/2, 0)

SeparateFields()
Info()

With the SwapFields(), the Trim(37372/2,102819/2) area looks fine, but the rest is choppy and painful for the eyes.
Without SwapFields(), Trim(37372/2,102819/2) is painful.

So, is there an error in my script or is this a trick bug in AviSynth?

stickboy
20th January 2004, 07:36
Swapping fields is not the same as changing field parity.

If your fields look like:
A A A A A
B B B B Bthen SwapFields will change it to:
B B B B B
A A A A Abut what you probably want is:
A A A A A
B B B B B(The only time you should need to use SwapFields is if there's a bug in your capture drivers that causes the bottom fields' scanlines to appear above the top fields' scanlines. It would completely apparent in a still scene.)

You can't directly change the parity of a portion of a clip using AssumeTFF or AssumeBFF. An AviSynth clip is treated entirely as TFF or entirely as BFF.

Instead, you'll need to use something like Simon Walters' ReverseFieldDominance (http://www.geocities.com/siwalters_uk/reversefielddominance.html) plug-in.

jcsston
20th January 2004, 07:53
ReverseFieldDominance() did it
Thanks :D :D :D