jueves, 29 de noviembre de 2007


Field Ordering in PAL with DV and Non-DV Footage

by Greg Staten, Senior Product Designer for Media Composer and Symphony

One of the most frustrating aspects of DV, as implemented in the PAL (625-line) format is the difference in the field ordering between regular PAL frames and PAL DV. The PAL analog and digital formats are specified in ITU-R BT.470 and ITU-R BT.656. Here is the blanking-to-active line structure of the format:

Field 1:
1. - First line of blanking: second (left) half of line 623
2. - Last line of blanking: first (right) half of line 23
3. - First line of active: second (left) half of line 23
4. - Last line of active picture: 310 (full line)
Field 2:
1. - First line of blanking: 311 (full line)
2. - Last line of blanking: 335 (full line)
3. - First line of active: 336 (full line)
4. - Last line of active picture: first (right) half of 623

Notice that the transition between field 1 and field 2 is between two lines (310 and 311) and the transition between field 2 and 1 is in the middle of a line (623). This identical transition occurs in each field between blanking and active (Field 1: in the middle of line 23, Field 2: line 336).
By rule the half line transitions must occur at the very top and the very bottom of the active picture. Therefore, the highest active line in the frame is line 23 which is field one and the lowest active line in the frame is line 623 which is field two. This means that the top line of the active picture is a field one line and that PAL is field one (upper), not field two (lower) ordered.
All Avid two-field resolutions – with the exception of the DV25 resolutions – are upper field ordered. This is in compliance with the spec. Notice though the DV exception for this is where things can get very frustrating.

Now let’s take a look at PAL DV. When the Japanese developers behind the DV format created the 625-line version they either misread or misinterpreted ITU-R BT.470 and incorrectly positioned the active lines of field 2, placing the first active line at 335 instead of 336. This resulted in the field ordering being switched from upper field to lower field? How is that possible? Well let’s look at the line ordering we find in the interlaced frame. Each line in the illustrations below is prefaced with the field number followed by the line number.

PAL Digital Aperture (ITU-R BT.470, ITU-R BT.656)

f1 / 23 –––––––––––=============== ß First active picture line (field 1)
f2 / 336 = = = = = = = = = = = = = = =
f1 / 24 ==========================
f2 / 337 = = = = = = = = = = = = = = =
f1 / 25 ==========================
f2 / 338 = = = = = = = = = = = = = = =
DV PAL Digital Aperture
f2 / 335 – – – – – – – – – – – – – – – ß First active picture line (field 2)
f1 / 23 –––––––––––===============
f2 / 336 = = = = = = = = = = = = = = =
f1 / 24 ==========================
f2 / 337 = = = = = = = = = = = = = = =
f1 / 25 ==========================
f2 / 338 = = = = = = = = = = = = = = =

Key: ––– and – – – – – indicate blanking
=== and = = = = = indicate picture

Notice that in PAL DV the “first” line of the active picture is actually a line reserved for blanking. This caused the field order to swap (as the top line changes from field 1 to field 2).
BTW – this is the case with most MPEG-2 implementations in the 625-line world, including DVD.
Avid’s editing products (Media Composer/Xpress Pro/Symphony) have always supported this line positioning internally and we have not changed this from the first day we implemented it. If you were to capture or output DV via FireWire, even when using a resolution other than DV25, everything maps correctly and there is no shift in line position.
(Incidentally, in the NTSC realm the field ordering is always lower field ordered regardless of whether you are using DV or not. And interlaced HD is always upper field ordered.)
---------
The trick comes in Import/Export. Here a lot of things can go wrong and the user must be very careful how they choose the import or export options when working DV-formatted QuickTime/etc files. (Note that there were bugs regarding some of the import choices and PAL DV in past releases, especially the early 2.x/5.x releases. These have been resolved in the 2.7/5.7 releases.)
Where many editors run into problems are the Import and Export options and how they should be configured. Let’s look at how to configure them.
Import:
The key section is the File Field Order options in the upper right hand of the Import Options dialog. It is critical that you configure this to tell Media Composer/Xpress Pro what the field ordering is of the file you are importing. Simply tell it whether the file you are importing is upper or lower ordered. Regardless of the resolution you choose to create media with, if you set this correctly then the media inside Media Composer/Xpress Pro will be correctly ordered. Due to the PAL DV field ordering issue sometimes you may not know what the ordering is. In that case try one – I usually assume upper ordered first as is correct for regular PAL – and if the image is misaligned import it again as lower field. (You can easily check proper ordering by either playing the imported video out to an external video monitor or stepping through it field by field. This is accomplished either in Effect mode or with the Step By Field buttons found in the Command Palette.
Export (QuickTime reference):
If you are exporting QuickTime reference movies then all of your footage must be either DV or non-DV (ex: 1:1). Otherwise the field ordering will change from cut to cut. Though we can handle this easily – and correctly – inside our editor, many QuickTime programs don’t and you may run into problems. If this is a problem, simply Transcode your sequence to a single resolution then export the reference movie.
When you use this reference movie in another application, you will need to inform it as to the field ordering. Remember:
1.- Non DV (1:1, 2:1, etc) resolution = upper field ordered
2.- DV (4:2:0 or 4:1:1) resolution = lower field ordered
Set as appropriate in the third party application and you should be good to go.
Note: The above rules also apply if you Export to a QuickTime movie with the “Same as Source” option enabled. We send the media out with the same codec – and field ordering – as you used n your timeline. In the case of mixed resolutions in the timeline it uses the first resolution/codec in the timeline for all clips.
Export (Non-reference):
Here you are given a choice of the codec you wish to encode with. In these cases you should set the field ordering as is appropriate for the codec you are choosing:
1.- DV25 (Avid DV or Apple) codec = lower field ordered
2.- All others (Animation, JPEG, etc) codec = upper field ordered
Once you have exported the file you need to set the field ordering as appropriate in the third party application.