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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st August 2005, 13:58   #1  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
puzzled by DoubleWeave and SeparateFields

I'd like some help in understanding the behaviour of DoubleWeave and SeparateFields.

Consider the following script:
Code:
b = blankclip(width=720, height=288, color=$000000)
w = blankclip(width=720, height=288, color=$ffffff)
Interleave(b,w).AssumeFieldBased.Weave
all frames are the same. First line is white, second line black, third line white, etc ...

Next script:
Code:
b = blankclip(width=720, height=288, color=$000000)
w = blankclip(width=720, height=288, color=$ffffff)
Interleave(b,w).AssumeFieldBased.Weave
DoubleWeave
all frames are the same. First line is white, second line black, third line white, etc ... The number of frames is doubled though.

Ok, it all makes sense up to here. Next script:
Code:
b = blankclip(width=720, height=288, color=$000000)
w = blankclip(width=720, height=288, color=$ffffff)
Interleave(b,w).AssumeFieldBased.Weave
DoubleWeave
SeparateFields
Ok, now I'm a bit confused. I would expect a black frame, followed by a white frame, followed by a black frame, etc ... But instead i get the following: black, white, white, black, black, etc ... How can that be, i thought that BFF or TFF is a property of the clip itself, not a frame property? (If it would be a frame property it would make sense i guess, as a result of DoubleWeave.)
Wilbert is offline   Reply With Quote
Old 21st August 2005, 14:02   #2  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
that is correct!

assume this:
assumefieldbased.weave() -> every frame is BFF

an additional doubleweave() lets every other frame being TFF (fieldorder reversed!)

this is, why doubleweave().selectodd() can change the fieldorder seamlessly
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 21st August 2005, 14:33   #3  |  Link
mg262
Clouded
 
mg262's Avatar
 
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
... but that is a bit troubling because as Wilbert says, a clip (or more precisely a VideoInfo) contains top field first/bottom field first information...

Edit: congrats on 2000, scharfis!
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed.
mg262 is offline   Reply With Quote
Old 21st August 2005, 14:44   #4  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
huh, completely missed the 2nd thousand post.

try

doubleweave().info()

and you'll see, that TFF and BFF are alternating, which is correct.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 21st August 2005, 14:58   #5  |  Link
mg262
Clouded
 
mg262's Avatar
 
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
Yup, I believe you, it's just that (as well as whatever per frame stuff) it is possible for filters to request this information for the entire clip -- which means that there is an implicit assumption that either the entire clip is TFF or that it is BFF. So finding out that it can vary from frame to frame is a bit troubling...

I could be wrong here! I will check more carefully when I have some more time...
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed.
mg262 is offline   Reply With Quote
Old 21st August 2005, 15:05   #6  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
doubleweave().assume?ff() should restore the bwbwbwbw - pattern for Wilbert.
without assume?ff() it remains bwwbbwwbbwwb
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 21st August 2005, 15:36   #7  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
doubleweave().info()

and you'll see, that TFF and BFF are alternating, which is correct.
I thought TFF and BFF are clip properties, but i guess that's not the case.

So, it is possible to write a filter with returns the first three frames as BFF, next two as TFF, next ten as BFF, etc ... ? Just to give an example

Is there a way of knowning whether frame X is BFF or TFF?
Wilbert is offline   Reply With Quote
Old 21st August 2005, 16:03   #8  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Ok, another question which is bothering me.

Consider
Code:
b = blankclip(width=720, height=288, color=$000000)
w = blankclip(width=720, height=288, color=$ffffff)
Interleave(b,w).AssumeFieldBased.Weave # white, black, white, ...
The clip is BFF (as scharfis noticed), because after using SeparateFields we get bwbw...

Next script:
Code:
b = blankclip(width=720, height=288, color=$000000)
w = blankclip(width=720, height=288, color=$ffffff)
Interleave(b,w).AssumeFieldBased.Weave # white, black, white, ...
ReverseFieldDominance(false) # black, white, black, ...
The clip is TFF, because after SeparateFields we get: wbwb...

The problem is that if i put
Code:
subtitle(string(GetParity())) # false = BFF; true = TFF
after both scripts, both return to false. But the latter should return true, no?

edit: oh god, i'm getting complete nuts. I thought that GetParity indicates the field-dominance, right?
Code:
b = blankclip(width=720, height=288, color=$000000)
w = blankclip(width=720, height=288, color=$ffffff)
Interleave(b,w).AssumeFieldBased.Weave # white, black, white, ...
Subtitle(string(GetParity())) # false = BFF; true = TFF
returns false. Well, that's good.
Code:
b = blankclip(width=720, height=288, color=$000000)
w = blankclip(width=720, height=288, color=$ffffff)
Interleave(b,w).AssumeFieldBased.Weave # white, black, white, ...
AssumeTFF # white first after SeparateFields
Subtitle(string(GetParity())) # false = BFF; true = TFF
returns true. Also good.

But if i use SwapFields (which doesn't change the field dominance) GetParity returns true:
Code:
b = blankclip(width=720, height=288, color=$000000)
w = blankclip(width=720, height=288, color=$ffffff)
Interleave(b,w).AssumeFieldBased.Weave # white, black, white, ...
SwapFields
Subtitle(string(GetParity())) # false = BFF; true = TFF
returns true. (Although the first field is black after SeparateFields.)

Last edited by Wilbert; 21st August 2005 at 16:30.
Wilbert is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.