View Full Version : separatefields
grokwik
14th July 2005, 23:05
in the DV to DVD guide, it is recomended tu use
SeparateFields()
odd=SelectOdd.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
evn=SelectEven.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
Interleave(evn,odd)
Weave()
DoubleWeave.SelectOdd()
for interlaced source to preserve the the interlaced structure.
What i don't understand is why this structure would'nt be preserve without this ? What do we get if the source is interlaced and we don't use these lines or a deinterlacer filter ?
Guest
14th July 2005, 23:32
If the source is interlaced, the odd lines of a frame come from a moment in time we can call T, and the even lines come from moment in time T + 1/field_rate, i.e., they are sampled from different times and so will in general be different scene pictures. Thus if you do a spatial average of 3 lines (without separating), you will mix content from the two different times. That will not achieve the desired spatial smoothing and will cause a nasty ghosting effect.
I was just reading an older thread where Stickboy recommended stacking the separated fields on top of another in the same frame(as opposed to handling them as if they were separate clips) before de-noising, and then re-weaving. Do these two approaches lead to any differences in quality? On the surface of it, it does not appear that they would.
ck
grokwik
15th July 2005, 09:36
thank you neuron2 it's clear!
mg262
15th July 2005, 10:18
I was just reading an older thread where Stickboy recommended stacking the separated fields on top of another in the same frame(as opposed to handling them as if they were separate clips) before de-noising, and then re-weaving. Do these two approaches lead to any differences in quality? On the surface of it, it does not appear that they would.
I'm not sure what you mean by stacking the fields on top of each other in the same frame... if you mean
stackvertical(selecteven, selectodd)
then the results will be pretty much the same, except that you may get artefacts because the top of one field is touching the bottom of the next. I think @stickboy may have written something to reduce this effect by flipping the bottom field vertically... Anyway, one advantage of this method is that if you are applying a complex processing chain then it's easier than applying it to 2 separate clips (which you would probably do by putting the chain into a function).
One problem with processing the odd and even fields separately is that you are doubling the motion and all the other 'differences' between the pictures being processed. Just interleaving the even and odd fields (which is what you get when you use separatefields) is of course less than perfect because one set will be shifted down by half a scanline. You could get round this by doing this to get the top fields in the result like this (assuming TFF):
Separatefields #25i
Bob, #25i->50p #fills in 'gaps'
separatefields.selecteven #50p, top fields only
# process
selectevery(2,0) #back to 25, top fields only
and similarly for the bottom fields... but you end up doing a fair bit of extra processing, so it's probably not worth it in most situations.
That script was off the top of my head so I'm not sure it's correct (it's also not the fastest way to achieve that)... but you get the idea: shift the bottom fields up by half a scanline to fill in the 'gaps' and then throw them away after processing.
scharfis_brain
15th July 2005, 13:28
mg262: your script will cut the vertical resolution in half and will destroy the vertical alignment of the fields.
use this filterchain for filtering:
assume?ff() # set input fieldorder
bob() #leakkernelbob (better) # tdeint(mode=1) (even better)
#process()
assume?ff() # set input fieldorder again!
separatefields().selectevery(4,0,3).weave()
mg262
15th July 2005, 13:53
mg262: your script will cut the vertical resolution in half and will destroy the vertical alignment of the fields.
Oops... :thanks: :stupid:
Edit: looking back, I kind of meant to do that... I was trying to avoid using interpolated spatial data. So I meant to process the top and bottom fields separately (both with interpolated temporal data) and then put them back together... although I didn't write that out very clearly.
OTOH you have much much more experience of actually doing this than I do, so I would advise anyone reading this to stick with your method!
Thanks for your replies guys,
The Bobbers other than Bob() result in greater vertical resolution, but also in artifacts. My thinking is that I don't need to worry about these.
assume?ff()
separatefields()
selectevery(4,0,3)
weave()
Will remove the interpolated lines -- and therefore the artifacts -- anyway.
Does this sound correct?
scharfis_brain
16th July 2005, 10:12
jep. this is corect and also intended.
BUT deinterlacing artifacts CAN also influence the filters after the deinterlacer, but with tdeint(mode=1) and enabled artifact protection you will supress nearly every artifact that derives from motion mapping (false static..) ...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.