View Full Version : using reverse field dominance filter for avisynth
bachopin
12th August 2003, 14:54
I have PAL 704x576 interlaced captured movies
with a bad field-dominance information (probably due to
some kind of field shifting which probably sneaks in during the capture process. I assume that sometimes one field is simply discarded by the VHS player and this particalar field never reach the capture card thus effectively changing field dominance in the recorded material.)
By using swapfields() or SeparateFields.ComplementParity.Weave()
[ which is at first glance gave me the correct solution to this problem] on an interlaced video material which has bad field dominance eventually gave visually bad results while playing on DVD-player due to the incorrect spatial order as Donald pointed out in his RFD plugin documetation.
I'd be extremely grateful if anyone could help me with how to use Donald Graft's Reverse Field Dominance VDF filter for avisynth, and/or
other suggestions would be warmly appreciated too.
Thanks a lot in advance
best regards
Peter
Si
12th August 2003, 18:35
I've made a native Avisynth version of Donald's filter.
ReverseFieldDominance (http://www.geocities.com/siwalters_uk/reversefielddominance.html)
regards
Simon
stickboy
12th August 2003, 18:48
Try Simon Walters' Reverse-Field Dominance (http://www.geocities.com/siwalters_uk/reversefieldominance.html) filter or my attempt at a user-defined version:
# SetParity
#
# Sets the parity of a clip.
#
# PARAMETERS:
# parity - true for TFF;
# false for BFF
#
function SetParity(clip c, bool parity)
{
return parity ? c.AssumeTFF() : c.AssumeBFF()
}
# ReverseFieldDominance
#
# Reverses the field-dominance in an interlaced clip.
#
function ReverseFieldDominance(clip c)
{
originallyFrameBased = c.IsFrameBased()
oldParity = c.GetParity()
c = originallyFrameBased ? c.SeparateFields() : c
# we can't use ComplementParity because it swaps fields when used on
# field-based clips
c = (c.Blackness(1) ++ c ++ c.Blackness(1)).AssumeFieldBased().SetParity(!oldParity)
return originallyFrameBased ? c.Weave() : c
}(Simon's is probably better tested.)
Edit:
Oops, too slow. :)
cheap-red-wine
12th August 2003, 22:12
Originally posted by siwalters
I've made a native Avisynth version of Donald's filter.
No. Donald made a VirtualDub version of your filter.
siwalters: 1
cheap-red-wine: 1
:)
Si
12th August 2003, 22:35
I'll think you'll find neuron2 posted his VirtualDub code at 23rd Feb at 6:08 GMT and I copied it and posted an Avisynth version at 13:43.
Check out this thread (http://forum.doom9.org/showthread.php?s=&threadid=46765&perpage=20&pagenumber=1) for confirmation :)
I couldn't possibly have managed to code it by myself without the original version to work with :o
regards
Simon
cheap-red-wine
12th August 2003, 22:48
Just damn.
siwalters: 2
cheap-red-wine: 0
bachopin
13th August 2003, 08:13
@stickboy
interesting script - I'll give it a try - thank you !
@siwalters
Obviously I wasn't aware of your native avisynth
version of Reverse Field Dominance (RFD) filter.
It would make my case a whole lot easier than I previously
anticipated. Thank you very much !
But still I have a case to solve related to field dominance and maybe one of you could lead me to the right solution.
The thing is that this effect ( reversed field dominance ) occurs
more than one time during VHS captures.
The resulting 30 minutes avi file has e.g. 5 FD change
which effectively requires to deal with segments.( segments are grouped with similar field dominance)
I wonder if my only solution is that to save these segments to
individual avi files and after that apply the RFD filter to segments where needed. But this eventually requires reassembly the saved segments to the original form - which requires much HD space and time.
Or( maybe I'm too naive) can I use something similar to the function
trim(clip,l_int,l_int) ++ trim(clip,_l_in,l_int) where I could select specific frame interval and change FD on only frames with bad FD, and leave intact the rest of good frames.
I hope I could convey my thoughts promptly into words, and sorry if my English is possibly a bit "awkward".
best regards
Peter
Si
14th August 2003, 14:59
can I use something similar to the function
trim(clip,l_int,l_int) ++ trim(clip,_l_in,l_int) where I could select specific frame interval and change FD on only frames with bad FD, and leave intact the rest of good frames.
That will work.
regards
Simon
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.