PDA

View Full Version : Need Help with UFF / TFF


Amnon82
23rd August 2005, 11:45
In the different CCE Versions UFF is not the same.

2.50:

CCE 2.50 always encodes TFF, so UFF is the top_first.value To get UFF You must check Upper field first in CCE. In AutoQ2 0.6.8 B30 You check UFF (OSL) to get the same. So CCE 2.50 is clear for me.

2.70:

Since 2.70 if You want TFF You must check Top Frame First. UFF is replaced with OSL (offset_line). TFF only gets unchecked when You have a BFF Source.

To get UFF check UFF (OSL) in AutoQ2 0.6.8 B30. Till now I uncheck TFF for Interlaced sources. I think this is wrong atm.

2.67:

Also here I have TFF and OSL. ATM I did the same settings for 2.67 like in 2.70. What does top_first means in 2.67. OSL (offset_line) stands for UFF in 2.67.

THX for all advices.

Amnon82
23rd August 2005, 20:02
A friend posted me this:

in 2.50: tff(uff)... marks top_first=1
2.67: tff(uff)... which would mark offsetline as 0
2.70: tff(uff)... marks top_first=1 offset_line=0

TFF (UFF), OSL and PFF. PFF is clear.

Why we don't do it like this:

PFF, TFF and UFF (OSL).

I disable TFF in the 2.50 and 2.67 mode. Only in 2.70 it is enabled.

UFF (OSL) checked will mark Top_first=1 in 2.50
and offset_line=1 in 2.67/2.70

To get bff uncheck TFF in 2.70 so it will be

top_first=0 and offset_line=1 and normal UFF will be top_first=1 and offset_line=1 if You check UFF and TFF.

... or I'm again wrong. So it is atm in B30, cos top_first doesn't exists.

Amnon82
23rd August 2005, 20:04
Here the Q10 out of the CCE FAQ:

Q10: What's the deal with the "Upper Field First" option? I heard it has a bug?

The confusion about this option arises from that it works different from what you think. Naturally, you'd think that you set this option according to the field order of the video to be encoded, that is, deactivate it if source is bff (bottom field first) and activate it if source is tff (top field first). However, when you do this the encoded video plays back jerky with artifacts typical for incorrect field order.

So how do we set it right? First, you have to know that CCE (SP as well as Basic) always outputs video that is flagged "top field first" (there is a flag in the MPEG header that tells the player which field of the decoded frame to display first on a TV screen). There is no way in CCE to change this. According to Custom Technology, this is not a bug but a feature of CCE... Actually what happens if you check "Upper Field First" is that CCE assumes that source is bff and converts it to tff so it complies with the always set tff flag. It does so by shifting each frame up by one line, ensuring that the previously bottom fields are now top fields and the video is played back correctly. This is not the most sophisticated way to handle the situation, but it works and you won't notice the missing line at the top.

So here is the rule of thumb: Always uncheck "Upper Field First" unless your video is interlaced AND bottom field first. Progressive material is always top field first. To check whether your interlaced video is bottom field first, use the following AVISynth script:
Code:

#Use Mpeg2Source() for MPEG2 video AVISource("E:\Video\holiday.avi") AssumeBFF() SeparateFields()

Now open this script in Windows Media Player. If all movements and horizontal pans look smooth, it's definitely bottom field first, but if you notice stuttery/jerkiness, it's top field first.

If for some reason you want to encode bff video without that line shift, there are two ways to do this:

1. Frameserve bff video into CCE via AVISynth and convert it to tff "the right way". Here is a basic AVISynth script that does this:
Code:

AVISource("E:\Video\holiday.avi") DoubleWeave().SelectOdd()

Uncheck "Upper Field First" in CCE and encode.
2. Uncheck "Upper Field First" and encode bff video directly. Then use ReStream to clear the top field first flag in the MPV file CCE generated. Load the MPV into ReStream, uncheck "top field first" and click "Write!".



Q11: Where is the "Upper Field First" option in CCE-SP 2.67 and CCE-Basic?

In CCE-SP 2.67 and CCE-Basic, this option has been replaced by "Offset Line" (a text input control in Video Settings you can type a line number into). It works exactly like "Upper Field First" in that it tells CCE by how many lines to shift up the video.

Again here is the rule of thumb: Always set "Offset Line" to 0 unless your video is interlaced AND bottom field first in which case you set it to 1. Progressive material is always top field first.

While possible, it makes no sense to set this option to anything other than 0 and 1. I wonder why they are implementing it that way, now it's possibly even more confusing than before

Amnon82
23rd August 2005, 20:21
... now it's possibly even more confusing than before

2.50:

To get UFF check UFF so top_frame will get 1

2.67:

There is no top_frame in the ecl. It is replaced with offset_line.
To get UFF write 1 into offset_line.

So here the final question:

What do we do in 2.70?

To get UFF you have to write 1 into offset_line.

To get TFF top_first should be 1. BFF is top_first=0.

What is right now?

This:

UFF Normal:

TFF 1, OSL1

UFF BFF

TFF 0, OSL1

or this:

UFF Normal:

TFF 0, OSL1

UFF BFF

TFF 1, OSL1

or did I get it totally wrong?

drob
23rd August 2005, 21:48
Amnon you are making awhole salad of this, the reason is your relating to the words and not their process, TFF and UFF is the same, see each frame is combined of two field, upper one and lower one, in an interlaced video like your TV, the beam first paints the screen with the upper field then the lower field that why its interlaced that is laced two fields into one frame giving you the illusion you see one full frame this is why a movie not interlaced with the right Field order looks like lines and lines, the two fields don't match, so if you think of a square halved in the middle to two parts you understand that top or upper is the same. so UFF and TFF is the same thing!

now you didn't understand the mixup in version 2.5 and 2.67. in there it always always puts out video flagged as TFF only in 2.5 they call it UFF and 2.67 offset line. the check marks are reversed

Actually what happens if you check "Upper Field First" is that CCE assumes that source is BFF and converts it to TFF so it complies with the always set TFF flag
so here is what happens in 2.50 if you check UFF you tell it hey my video is BFF please make it TFF like you like, the effect is shifting one line up , so if for instance you enter TFF and check UFF, it would shift the field order now making the bottom half the upper half and reversing the order into BFF movie, not good at all. in 2.67 they change it instead of calling it by name they called it by the action, that is if your source is TFF you know CCE gives always TFF, and you want your material to remain TFF then you do not need any offset to be done so you leave offset at zero. if your source is BFF and CCE always turns out TFF you need to shift it one line up to change the order so bottom would become upper, so offset is one.

only in 2.70 they got it right, if you check TFF you get a TFF movie, if you change offset line you get shift so to get TFF from a progressive movie you set TFF and offset to 0 since no Field order needs to be changed, but if you have BFF interlaced material you want TFF checked and you need to shift it one line up to change the order of fields.

you need to understand the mechanics of this to get the definitions right.

to summarize, we have TFF(uff), OSL:

2.50:
to get UFF from a TFF material=do nothing = in AutoQ UNCHECKED TFF = top_first=0 (i got it wrong in the msg i last sent you).

to get UFF from an interlaced BFF material= shift one line up= in AutoQ CHECKED TFF(OSL unchecked and grayed out, adds nothing to the ecl file) =top_first=1.

in 2.67:

to get UFF from a TFF material= do nothing =in AutoQ (TFF grayed out unchecked, adds nothing to the ecl) OSL unchecked= offset_line=0.

to get UFF from BFF and interlaced material= shift one line up= in AutoQ (TFF grayed out unchecked, adds nothing to the ecl) OSL checked = offset_line=1.

in 2.70
UFF from a TFF material= do nothing =in AutoQ TFF checked (OSL not checked not grayed) =top_first=1 offset_line=0
to get UFF from BFF and interlaced material= shift one line up= in AutoQ TFF checked, OSL checked=top_first=1 offset_line=1

Amnon82
23rd August 2005, 22:47
K. I think I got it now. I only wanted to get it easier for beginners.
I released Beta 31 of AutoQ2. You have a PM.

Changes:

0.6.8 B31:
* INTERNAL RELEASE
* Internal Notes:
+BFF is only for CCE 2.70 enabled. If You check BFF top_first gets zero.
+UFF (OSL) does the top_first in 2.50 and offset_line in 2.67/2.70
+BFF is for the top_first in 2.70.

+Only for 2.70:

++To get UFF form a TFF source uncheck BFF and uncheck UFF (OSL) to get top_first=1 and offset_line=0

++To get UFF from BFF source check UFF and uncheck BFF to get top_first=1 and offset_line=1

* Updated italian, english and german language file to 0.6.8 B31
* This version works only on NT-OSs!!!!

Only question is:

When do we need top_first=0 in 2.70?

I read in a german forum that ntsc is bff and pal tff. So I autocheck BFF when You switch to the framerates 23.97 and 29.97 atm.

Wilbert
29th August 2005, 13:32
I read in a german forum that ntsc is bff and pal tff. So I autocheck BFF when You switch to the framerates 23.97 and 29.97 atm.
Please give a link, because that statement is in general false.

auenf
29th August 2005, 14:31
I read in a german forum that ntsc is bff and pal tff. So I autocheck BFF when You switch to the framerates 23.97 and 29.97 atm.
Please give a link, because that statement is in general false.

Generally speaking NTSC is TFF when telecined, anything captured thru MJPEG (or variants) or DV is BFF


2.70:

Since 2.70 if You want TFF You must check Top Frame First. UFF is replaced with OSL (offset_line). TFF only gets unchecked when You have a BFF Source.

To get UFF check UFF (OSL) in AutoQ2 0.6.8 B30. Till now I uncheck TFF for Interlaced sources. I think this is wrong atm.


with 2.70 you have a check box "Output top field first stream" and the offset line box. for TFF source: check the box, put 0 in the box; for BFF source: uncheck the box and put 0 in the box.

Enf...

fccHandler
29th August 2005, 15:58
Generally speaking NTSC is TFF when telecined, anything captured thru MJPEG (or variants) or DV is BFF
Not true. For example, I have one PC which always captures TFF and another which always captures BFF. It is because of the different hardware and drivers. It's also possible for a video to switch in the middle. There are just too many variables involved to make a general rule.

Amnon82
30th August 2005, 10:57
Hey guys,

THX for the imput, but I fixed it already in RC1:

0.7.0 RC1:
* Yoop, we got an release canidate ;)
* RC Notes: TFF is only for CCE 2.70 enabled.
UFF in 2.50 Mode: simple check UFF.
UFF in 2.67 Mode: simple check OSL.
UFF in 2.70 Mode: If the source is BFF check OSL and TFF
If the source is TFF uncheck OSL and keep TFF checked.
BFF in 2.70 Mode: To encode in BFF uncheck TFF.
* Updated italian, english and german language file to 0.7.0 RC1

Actual version of my program is RC4a

Trahald
6th September 2005, 20:40
i updated the cce faq a few weeks ago to add 2.70 to the mix.. should be accurate.. if anything is off , please let me know

Amnon82
6th September 2005, 21:54
I noticed. It is all ok. Don't worry ;)

... I only got confused ...