[FFmpeg-devel] [PATCH] Provide top_field_first logic for h264.c

Reinhard Nissl rnissl
Fri Nov 9 21:10:08 CET 2007


Hi,

Michael Niedermayer schrieb:

>>>> the patch was last posted in the thread "H.264 + PAFF: BBC HD recording
>>>> shows extreme interlacing artefacts".
>>>>
>>>> It provides top_field_first by comparing frame poc (picture order count)
>>>> against top field poc. When both match, the frame shall be displayed
>>>> with top field first.
>>>
>>> looks ok, except maybe that top_field_first would be 1 for non interlaced
>>> content which is a little odd to me
>>> i think (though havnt checked) that top_field_first is 0 for non interlaced
>>> content in other codecs
>>
>> If the content is non-interlaced the fields should be displayed
>> simultaneously, so there is no field order.  If the hardware isn't
>> capable of this, the order chosen doesn't matter.  Hence there is no
>> problem with setting it to top_field_first in this case.
> 
> mpeg 2 uses top field first for specifying field repeation together
> with repeat first field (for progressive sequences)
> we export this cleanly as repeat_pict but
> 
> i just thought it might be less confusing for applications if tff is set
> consistently relative to the mpeg2 spec and repeat_pict

Strange, I've read that part of MPEG2 spec a few days ago but didn't
think of it. After reading it again, I agree with you in that regard.
Please find the updated patch below.

Bye.
-- 
Dipl.-Inform. (FH) Reinhard Nissl
mailto:rnissl at gmx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h264-top_field_first6.diff
Type: text/x-patch
Size: 506 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071109/d1f2a75e/attachment.bin>



More information about the ffmpeg-devel mailing list