Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
7th December 2004, 13:11 | #1 | Link |
Registered User
Join Date: Apr 2004
Location: Romania
Posts: 101
|
How to process interlaced and the final result to be interlaced
I'm not a native English speaker and I feel that I don't understand correctly, so please help me.
Let's say SeparateFiels() Degrain() Wave() or SeparateFields() odd=SelectOdd.Degrain() evn=SelectEven.Degrain() Interleave(evn,odd) Weave() DoubleWeave.SelectOdd() My AviSource is RAW YUV captured from a S-VHS JVC camcorder that process internaly Digital and record on a S-VHS cassete. My processor is a Duron 950 MHz Can I use Convolution3D? My Duron is not SSE. |
8th December 2004, 09:14 | #3 | Link |
Registered User
Join Date: Apr 2004
Location: Romania
Posts: 101
|
I don't understand the sequence
Weave() [I read that is equivalent to DoubleWeave().SelectEven] DoubleWeve().SelectOdd() I found an other script on http://www.afterdawn.com/avisynth_tu...age_6.cfm.html #Functions For Processing Interlaced Video #By stickboy (James D. Lin)# # SetParity function SetParity(clip c, bool parity) { return parity ? c.AssumeTFF() : c.AssumeBFF() } # UnfoldFieldsVertical function UnfoldFieldsVertical(clip c, bool "flip") { flip = default(flip, false) oldParity = c.GetParity() c = c.AssumeTFF().SeparateFields().AssumeFrameBased() top = c.SelectEven() bottom = c.SelectOdd() c = StackVertical(top, flip ? bottom.FlipVertical() \ : bottom) return c.SetParity(oldParity) } # FoldFieldsVertical function FoldFieldsVertical(clip c, bool "flip") { assert(c.Height() % 2 == 0, "FoldFieldsVertical: unexpected frame height") flip = default(flip, false) oldParity = c.GetParity() originalHeight = c.Height() / 2 evens = c.Crop(0, 0, c.Width(), originalHeight) odds = c.Crop(0, originalHeight, c.Width(), originalHeight) odds = flip ? odds.FlipVertical() : odds c = Interleave(evens, odds).AssumeFieldBased().AssumeTFF().Weave() return c.SetParity(oldParity) } #Stop Copying Here |
8th December 2004, 09:49 | #4 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
Try this (you'll need TomsMoComp) :
Code:
AssumeTFF() or AssumeBFF() depending on your input clip's field order TMCBob() Degrain() AssumeTFF() or AssumeBFF() depending on your input clip's field order SeparateFields() SelectEvery(4,0,3) Weave() function TMCbob(clip c) { ord = getparity(c) ? 1 : 0 c = c.SeparateFields.TomsMoComp(1,-1,0) c = stackvertical(c.crop(0,0,0,1-c.height),c,c.crop(0,c.height-1,0,0)) evn = c.SelectEven odd = c.SelectOdd evn = (ord == 0) ? evn : evn.crop(0,1,0,0).addborders(0,0,0,1) odd = (ord == 1) ? odd : odd.crop(0,1,0,0).addborders(0,0,0,1) interleave(evn,odd).crop(0,0,0,-2).assumeframebased() } Code:
AVISource("path\clip.avi") AssumeTFF() SeparateFields()
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
8th December 2004, 10:17 | #5 | Link |
Registered User
Join Date: Apr 2004
Location: Romania
Posts: 101
|
You lost me!
Let's take easy please. 1. AssumeTTF() - the correct order 2. TMCBob() - deinterlace and re-interlace correct??? 3. Degrain() - grain removal 4. AssumeTTF() - once again the correct order 5. SeparateFields() - once again separate the fields 6. SelectEvery(4,0,3) - select frames I don't know 7. Wave() - that means to SelectEven() As far as I can understand it seems to me that I apply Degrain() to an interlaced clip. I understand correct??? |
8th December 2004, 10:37 | #6 | Link | ||||||
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
||||||
8th December 2004, 10:53 | #7 | Link |
Registered User
Join Date: Apr 2004
Location: Romania
Posts: 101
|
Thank you for your time.
What does Interleave(), I didn't understand. Please say it in simple English. I represented Interleave() as combining 2 fiels in one frame, but that is not true. Why I try to understand how to process interlaced clips? I made some hours of deinterlaced home captures and it was painfully slow 1fps (even the grass was clear). Now I think that deinterlacing is not at all needed for my home videos. If the target is MPEG2 on a TV set or on a PC via DVDplayer interlaced is just fine. If the target is MPEG4 just SeparateFields and everything is OK, even on my 950 MHz Duron. The Doom9 guide tells how to deinterlace, once again for me I think I don't need, but says allmost nothing on how to treat interlaced video. Once again thank you. |
8th December 2004, 11:05 | #8 | Link | ||||
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
Quote:
Quote:
Quote:
Quote:
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
||||
8th December 2004, 11:20 | #9 | Link |
Registered User
Join Date: Apr 2004
Location: Romania
Posts: 101
|
My first attempts to process interlaced was quite simple
AsumeTTF() - frame order established via VirtualDub SeparateFields() Degrain() resize Wave() - without Interleave() the references for Interleave were not clear to me. The quality and speed were just fine. I used Degrain() because I filmed on poor light conditions, and Degrain() did a good job for me. |
8th December 2004, 11:44 | #10 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
If you use SeparateFields and then use a temporal filter (or a spatio-temporal filter), you can mess things up easily as you are filtering the two scanlines from the same frame against each other. And that's a big no-no.
If you don't want to do a bob-then-reinterlace, I suggest you check stickboy's functions. http://www.avisynth.org/stickboy/ What you are looking for are JDL_UnfoldFieldsVertical and JDL_FoldFieldsVertical.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
8th December 2004, 11:50 | #11 | Link |
Registered User
Join Date: Apr 2004
Location: Romania
Posts: 101
|
Degrain() is just a spatial filter and this is why I used.
I think if I want to use a spatial filter I had to make 2 clips from the original one, apply the temporal filter to each and after that I have to recombine the 2 clips in just 1. But is too complex for my knowledge. |
10th December 2004, 18:08 | #12 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
You can use stickboy's JDL_UnFoldFields function to get the fields separate but displayed on the same frame. Then use JDL_FoldFields to get them back as they were.
JDL_UnFoldFieldsVertical(flip=true) DeGrainMedian() JDL_FoldFieldsVertical(flip=true) Download this : http://www.avisynth.org/stickboy/jdl-interlace.avsi and save it to your Avisynth 2.5 plugins folder. By default it is C:\Program Files\Avisynth 2.5\plugins . That way it will be auto-loaded when needed. Then try that script, if you don't know what it does, comment out (by placing a # in front of the line you comment out) line by line and you'll see what happens. No need for separating fields, weaving etc.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... Last edited by Boulder; 10th December 2004 at 18:14. |
13th December 2004, 10:49 | #13 | Link |
Registered User
Join Date: Apr 2004
Location: Romania
Posts: 101
|
Thanks,
I allready see James D. Lin (stickboy) AVIS, but I didn't tested yet. I found also a thread about spliting the RAW avi into 2 field avi to apply Dust(), and recombining the 2 avi into a interlaced file. |
15th December 2004, 23:14 | #14 | Link | |
Registered User
Join Date: Oct 2002
Location: The Pandorica
Posts: 527
|
Quote:
__________________
PC specs for bug reports: Intel Core i7-4790K @4Ghz Win10(Linux VM) PCI express NVIDIA RTX 2060 SUPER graphics card http://twitter.com/cwebdesign |
|
16th December 2004, 00:12 | #15 | Link |
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,653
|
the best solution for filtering interlaced video is this:
avisource("video.avi") assume?ff() #set the correct fieldorder! bob() # or use any other bobbing deinterlacer you like #maybe with converttoyv12(interlaced=false), if needed yourfilterchainhere() converttoyuy2(interlaced=false) assume?ff() #set the fieldorder again (the same as above!) separatefields().selectevery(4,0,3).weave()
__________________
Don't forget the 'c'! Don't PM me for technical support, please. |
16th December 2004, 04:09 | #16 | Link | |
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
Quote:
|
|
16th December 2004, 06:13 | #17 | Link |
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,653
|
separatefields().temporalfilter().weave()
results in vertical misalignement! wich further leads to bobbing denoised static backgrounds on TV! because of this I recommend my method.
__________________
Don't forget the 'c'! Don't PM me for technical support, please. |
16th December 2004, 08:47 | #18 | Link | |
Registered User
Join Date: Apr 2004
Location: Romania
Posts: 101
|
Quote:
1. bob() Frame based interlaced material -> field material frame 0 that consist in 2 fields -> frame 0 and 1 from each field 2. separatefields() ??? 3. selectevery(4,0,3) frames selected 0,3,4,7,8,11,12,15 Is that a correct understanding? 4. Wave() Frames 0 and 3, 4 and 7, 8 and 11, 12 and 15 are combinated in frame 0 1 2 3 I clearly don't understand |
|
16th December 2004, 11:44 | #19 | Link | ||
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
Quote:
Quote:
So let's say your frames look like this: Code:
A C E G I (field 0) b d f h j (field 1) Code:
A B' C D' E F' G H' I J' (field 0) a' b c' d e' f g' h i' j (field 1) and you then filter. After the SeparateFields step, it looks like (assuming TFF): Code:
A a' B' b C c' D' d E e' F' f G g' H' h I i' J' j Code:
A b C d E f G h I j Code:
A C E G I (field 0) b d f h j (field 1) [Edit: Tweaked the way I named the fields for clarity (hopefully).] Last edited by stickboy; 16th December 2004 at 20:32. |
||
16th December 2004, 12:44 | #20 | Link |
Registered User
Join Date: Apr 2004
Location: Romania
Posts: 101
|
I belived that bob() transform a field based clip in a frame based clip that have as frame a single enlarged field.
Now I understand that bob() transform a field based clip with 2 different fields per frame in a field based clip with 2 identical fields in a frame. It is that right? |
|
|