Log in

View Full Version : Telecine (rff flags) and what is shown


BoyElroy
17th July 2002, 05:47
I'm in the process of converting a progressive 24fps project to 29.97 interlaced and got curious about the MPEG2 encoding.

I found the article at http://www.doom9.org/synch.htm and it all makes sense up until the logic used in figuring out which field is repeated when the rff flag is set.

The example shown is:

29.97
Frame 1 2 3 4 5 6

Type B B I B B P B B P B B P
tff 0 1 1 0 0 1 1 0 0 1 1 0
rff 1 0 1 0 1 0 1 0 1 0 1 0

AlAu AlBu BlCu ClCu DlDu ElEu El

I'm probably being brain dead on this, but I can't find the correlation of which field is supposed to be repeated.

Previous, current, next??

I was assuming that the next frame has the first field of the previous frame, but that doesn't work here on frames 3,4 and 5.

I'm guessing there is a relationship between rff and the I,B and P types of data.

Does someone have a simple IF..THEN type of explaination??

Thanks in advance.

mpucoder
17th July 2002, 06:09
The flags apply to the source frame, not the display frame. So when rff is set, it means to repeat the first field (as the name implies), displaying 3 fields. Which field is the first is determined by TFF, if set the TOP field is first, else the bottom field.
The sequence starts with both flags set, which means display the top field, bottom field, and top (first) field again.
2nd source frame will have both flags cleared, meaning display the bottom field, then the top field.
3rd source frame will have RFF set, but TFF clear, meaning display bottom field, top field, and bottom field again.
Finally the 4th frame has RFF clear, TFF set, meaning display top field, bottom field.

There is no relationship between I, P, or B frames and the flags.