View Full Version : Field Order Transitions
Incast
6th September 2008, 04:45
Relatively straightforward question, are there any particular rules in the MPEG2/DVD specification determining what is deemed to be a valid field order transition?
For example if the video was as such in a single track:
GOP 0: Top Field First
GOP 1: Top Field First
GOP 2: Bottom Field First
GOP 3: Bottom Field First
Would this be compliant, or would I have to encode with any special parameters (e.g. closing GOPs 1 and 2)?
neuron2
6th September 2008, 04:55
Good question. Let me know when you find out. :)
If you have control of the encoding, why would you do something like that?
Sulik
6th September 2008, 07:06
It's not compliant unless the repeat_first_field flag is set in the last frame of GOP1 in the example above (it means there is a missing field, so a HW device would not be able to generate a proper odd/even combination to drive an interlaced analog display).
Incast
7th September 2008, 00:39
Thanks for both of your rapid responses.
Good question. Let me know when you find out. :)
If you have control of the encoding, why would you do something like that?
I've got some interlaced material complete with onscreen graphics which move midway through resulting in a rather visible vertical shift. Unfortunately the movement is by an odd number of pixels, the only way to perfectly correct the shift is to reverse the field order of either the first or second half. I've investigated adjusting individual fields, but this damages the structure of the onscreen graphics.
To my knowledge I either have to accept a deviation of +-1 (no big deal of course, but I like to seek perfection where possible!), or accept a field order change to pixel shift vertically by an odd number.
Do let me know if I'm wrong, your knowledge is supreme when it comes to MPEG2.
It's not compliant unless the repeat_first_field flag is set in the last frame of GOP1 in the example above (it means there is a missing field, so a HW device would not be able to generate a proper odd/even combination to driver an interlaced analog display).
The logic of that makes a lot of sense.
I note, however, that the simple version I outlined in my initial post works flawlessly decoded on both my desktop and laptop using different video decoders. I believe intuitively that if I deinterlace prior to outputting in any analogue format I shouldn't require the repeat_first_field flag anywhere, as long as the video decoder is capable of dealing with it:
1. MPEG2 Decoder deinterlaces initial field order
2. Output is 50/60p
3. MPEG2 Decoder reaches field transition GOP
4. MPEG2 Decoder deinterlaces based on new field order
5. Output remains unchanged at 50/60p
But of course if I were to output in analogue interlaced (as I intend to try later) I expect the repeat_first_field flag will be required based on the logic of what you've stated, unless modern DVD players can handle this 'on the fly' and replicate the RFF frame.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.