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

Reinhard Nissl rnissl
Thu Nov 1 23:43:09 CET 2007


Hi,

Jeff Downs schrieb:

>>> Well, I had a look into the spec and into h264.c and cannot find any
>>> other variable which explicitly tells me "bottom_field_first" than
>>> picture_structure.
>>
>> maybe field_poc could be used,i dunno if this is how its supposed to be
>> detected though
> 
> Annex C, Section 4 talks about removal from the DPB for output in the 
> Hypothetical Reference Decoder.  In there they discuss output order based 
> on POC and decoding order.
> 
> Not sure if this is what you are looking for (I'm not familiar with the 
> top_field_first flag that's interested in being populated).
> 
> If it is, its kind of messy. The basic gist is that you go by field poc. 
> If two complementary field pairs have the same POC, first in decoding 
> order is output first except when dealing with complementary reference 
> field pairs, in which case they are output together.

Please have a look at the attached patch. It derives top_field_first by
comparing poc against field_poc.

While looking for a suitable place for the top_field_first
determination, I found that the current location where interlaced_frame
is set, is not correct, as it sets this information on a frame in
display order but derives this information from the current frame which
is in decoding order. Furthermore, if the frame is returned from the
code at the beginning of decode_frame(), interlaced_frame wouldn't have
been set at all. The second attached patch addresses this issues.

Bye.
-- 
Dipl.-Inform. (FH) Reinhard Nissl
mailto:rnissl at gmx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h264-top_field_first2.patch
Type: text/x-patch
Size: 621 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071101/f84e832d/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h264-interlaced_frame.patch
Type: text/x-patch
Size: 651 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071101/f84e832d/attachment-0001.bin>



More information about the ffmpeg-devel mailing list