Partager via


Interlace flags in DirectShow

Recently I was working on a project that involves generating interlaced video and noticed this statement in the documentation for the VIDEOINFOHEADER structure:

"AMINTERLACE_Field1First: Field 1 is first. If this flag is absent, field 2 is first. (The top field in PAL is field 1, and the top field in NTSC is field 2.)"

The parenthetical remark is confusing, because it implies that the meaning of the flag changes if the format is PAL or NTSC, which is not the case. (In fact, the media type does not explicitly say whether the format is NTSC or PAL. This information must be deduced from other details in the media type, including the interlace flag.[1])

 

Forget about even/odd and field 1/field 2. Here is a simpler explanation:

 

If the AMINTERLACE_Field1First flag is present, the top field is displayed first. If the flag is absent, the bottom field is displayed first. This corresponds directly to the top_field_first flag in MPEG-2.

 

[1] "NTSC" and "PAL" strictly refer to color standards, not interlace scanning. (see Poynton, Digital Video and HDTV Algorithms and Interfaces.) By NTSC and PAL people usually mean NTSC 525/59.94 and PAL 625/50. Unfortunately, the DirectShow docs perpetuate this error.

 


 

 This posting is provided "AS IS" with no warranties, and confers no rights.