[FFmpeg-devel] H.264 + PAFF: BBC HD recording shows extreme interlacing artefacts

Loren Merritt lorenm
Mon Oct 29 13:07:56 CET 2007


On Mon, 29 Oct 2007, Reinhard Nissl wrote:
> M?ns Rullg?rd schrieb:
>
>> The progressive_sequence flag in the MPEG2 sequence extension header
>> is often misleadingly set to 0 due to soft telecine being used.  I say
>> misleadingly, not incorrectly, since the spec allows any picture
>> structure when this flag is 0.
>>
>> The flags in the picture header and picture coding extension are
>> generally more reliable.
>
> Hmm, I've read the relevant part of the MPEG2 spec again and come to
> this conclusion:
>
> a) there can be field pictures
> b) there can be progressive frame pictures
> c) there can be interlaced frame pictures
>
> a) requires to do the colorspace conversion per field while for b) and
> c) the colorspace conversion needs to be done per frame. Is this correct?
>
> Is it correct that ffmpeg combines two field pictures into a frame picture?

Yes.

> In the case this is correct, how can I see, when to use the colorspace
> conversion for a) or c) as interlaced_frame seems to be set in both cases?
>
> In H.264 it seems that only a) and b) is possible. Is this correct?

H.264 has all 3 modes within the codec. Like MPEG2, (a) and (c) are 
indistinguishable to the application after decoding.

I don't know how (c) is supposed to be displayed. The H.264 standard 
describes chroma subsampling for frames and fields, but doesn't say which 
one to use for MBAFF.
It can be specified in an SEI message, but that's independent of coding 
type and not present in all streams. A picture could be coded as a 
progressive frame but with an SEI that says to display it as 2 (or 3 or 
4) fields, or vice versa. And I'm not sure whether that SEI is supposed to 
affect subsampling.

--Loren Merritt



More information about the ffmpeg-devel mailing list