[FFmpeg-devel] [PATCH] H.264 timestamps

Ivan Schreter schreter
Sat Feb 14 23:22:00 CET 2009


Hi,

attached three patches to get/compute some timestamp-relevant 
information from H.264 streams as a prerequisite for correct H.264 
timestamp computation (comes later).

#1: get field flags from stream
#2: compute DeltaTfiDivisor
#3: get output delay from stream

Please review.

Further, I have following questions:

To h264.c:

            s->avctx->time_base= (AVRational){h->sps.num_units_in_tick * 
2, h->sps.time_scale};

why always *2? Is this 100% correct, i.e., is Tc always 1/2 of 
full-frame duration? I couldn't find any indication for this in the 
standard.

To lavf/utils.c:

Timestamp computation is now done there, but it is only working 
correctly for MPEG-2 and only some subset of H.264. Where to write 
timestamp computation for H.264? Obviously, adding special case for 
H.264 is probably not the best idea. Which module should actually 
compute timestamps (h264_parser.c, I suppose) and via which structures 
can timestamps from transport stream be communicated to h264 code and 
gotten back from h264 code?

Thanks & regards,

Ivan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: h264_timing_1_flags.patch
Type: text/x-patch
Size: 1490 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090214/940ac1b8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h264_timing_2_divisor.patch
Type: text/x-patch
Size: 2172 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090214/940ac1b8/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h264_timing_3_output_delay.patch
Type: text/x-patch
Size: 1217 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090214/940ac1b8/attachment-0002.bin>



More information about the ffmpeg-devel mailing list