[FFmpeg-devel] [PATCH] H.264/AVCHD interlaced fixes

Ivan Schreter schreter
Sat Feb 7 13:45:06 CET 2009


Hi Michael,

Michael Niedermayer wrote:
> On Sat, Jan 31, 2009 at 04:30:01PM +0100, Ivan Schreter wrote:
>   
>> Additionally,
>>     
>
> every additionally belongs in a seperate patch
>
>   

According to your wish, here the patch separated into several smaller 
ones. I also addressed the problem of correct pairing of key frames. 
Together with MPEG-TS patches I posted last night, interlaced AVCHD 
decoding and seeking works perfectly (at least those from Panasonic and 
Sony camcorders).

Description of attached patches:

#1: Make some h264.c functions visible to the parser via h264.h (used in 
other patches).

#2: Replace hard-coded SEI type constants with symbolic names.

#3: Decode SEI recovery point and set key_frame appropriately. Still 
missing a possibility to pass recovery frame count to lavf, so this is 
left open.

#4: Helper function to reset pointer in combined frame, used by 
h264_parser to correctly append data of second field to the frame.

#5: If h264 decoder becomes a buffer with two field pictures, make sure 
the second one is decoded correctly as well. Until now, NAL_AUD was 
ignored, so decoding would go wrong.

#6: Parsing needed picture parameters for and combining of two fields 
belonging to same frame into one buffer. Until now, av_read_frame() 
would return two buffers for an interlaced frame coded as two field 
pictures, which is against av_read_frame() contract to return a buffer 
with whole frame (and thus it breaks applications).

#7: Trivial patch to fix a constness warning.

Please review/apply them.

BTW, it would be nice to have some test file for regression tests with 
field-coded interlaced video. How to go about it?

Regards,

Ivan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: avchd_1_funcs.patch
Type: text/x-patch
Size: 4962 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090207/4a0babf5/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avchd_2_sei_constants.patch
Type: text/x-patch
Size: 1182 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090207/4a0babf5/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avchd_3_recovery_point.patch
Type: text/x-patch
Size: 2379 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090207/4a0babf5/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avchd_4_frame_cont.patch
Type: text/x-patch
Size: 1246 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090207/4a0babf5/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avchd_5_decode_multifield.patch
Type: text/x-patch
Size: 7844 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090207/4a0babf5/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avchd_6_frame_combining.patch
Type: text/x-patch
Size: 11983 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090207/4a0babf5/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avchd_7_const_fix.patch
Type: text/x-patch
Size: 916 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090207/4a0babf5/attachment-0006.bin>



More information about the ffmpeg-devel mailing list