[FFmpeg-devel] Reducing time spent in av_find_stream_info()

Michael Niedermayer michaelni
Tue Nov 13 18:48:12 CET 2007


On Tue, Nov 13, 2007 at 04:01:56PM +0100, Diego Santa Cruz wrote:
> > > For video streams there is still a good deal of time spent updating
> duration_error, due to the lack
> > of FPU and the large amount of standard timebases tested when updating
> duration_error. Is it really
> > necessary to have all those standard time bases? There are currently
> 725. As far as I understand all
> > frame rates between 1/1001 and 60/1001, in steps of 1/12, are
> included. Can this be reduced to a
> > (much) more reduced set so that it does not take that much time to
> compute duration_error? As this
> > code affects all file formats and broken files I do not know all the
> implications by far...
> > 
> > its surely possible to remove some of frame rates, but the code must
> be clean
> > if its more complex than currently then it likely will be rejected
> > also the floats could be chnaged to integers
> > and there are likely many optimizations possible, ive not expected
> this code
> > to matter speedwise at all
> > 
> I see, any hints about which framerates should be kept? I will try also

well, i dont know, but all which occur in real files at least :)

> to reduce the complexity of the calculations.
> > reindentions must be in seperate patches from functional changes (see
> the
> > docs on ffmpeg.org)
> > 
> Ooops, sorry. Please see attached patches, first one is the actual
> change, second one reindents the code to make it prettier.

patches look ok

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071113/ae933297/attachment.pgp>

More information about the ffmpeg-devel mailing list