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

Diego Santa Cruz Diego.SantaCruz
Tue Nov 13 16:01:56 CET 2007

> > 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
to reduce the complexity of the calculations.

> reindentions must be in seperate patches from functional changes (see
> 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.


Diego Santa Cruz, PhD
Software Architect, SpinetiX S.A.

PSE-C, CH-1015, Lausanne, Switzerland
Tel:    +41 (0) 21 693 89 81
Mail:   Diego.SantaCruz at spinetix.com

Get Information : www.spinetix.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-stream-info-head.patch
Type: application/octet-stream
Size: 1318 bytes
Desc: ffmpeg-stream-info-head.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071113/27c6bc0c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-stream-info-head-indent.patch
Type: application/octet-stream
Size: 1175 bytes
Desc: ffmpeg-stream-info-head-indent.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071113/27c6bc0c/attachment-0001.obj>

More information about the ffmpeg-devel mailing list