[FFmpeg-devel] [PATCH] Use ff_thread_once() to initialize sin/cos static tables.

Michael Niedermayer michael at niedermayer.cc
Sun Oct 25 12:44:31 CET 2015

On Sun, Oct 25, 2015 at 11:19:53AM +0000, Derek Buitenhuis wrote:
> On 10/25/2015 11:09 AM, Michael Niedermayer wrote:
> > on ARM (cubox) this changes
> > time ./ffmpeg -i ~/fate-suite/qt-surge-suite/surge-2-16-B-QDM2.mov
> > from
> > real    0m0.028s
> > user    0m0.010s
> > sys     0m0.010s
> > 
> > real    0m0.028s
> > user    0m0.020s
> > sys     0m0.000s
> > 
> > 
> > to
> > 
> > real    0m0.050s
> > user    0m0.020s
> > sys     0m0.030s
> > 
> > real    0m0.050s
> > user    0m0.030s
> > sys     0m0.010s
> One could argue this is not a representative sample. It's a single small file,
> which must always init (as opposed to a longer running process such as Chrome.
> Whereas if you have a longer sample, it wouldn't even be within the margin of
> error, I bet.

If the usecase is to probe many files, then file duration would not
help hideing the init time. (to fill a GUI list or whatever)

Also startup time for normal playback itself does matter, as its
part of user vissible responsiveness, the user clicks play in his
players playlist and if that isnt instantaneaously starting playback
the user notices. So IMO startup time is not irrelevant

on arm:

time for i in  `seq 100` ; do ./ffprobe ~/fate-suite/qt-surge-suite/surge-2-16-B-QDM2.mov >& /dev/null ; done
test is also run twice and the system is completely unused, nothing
else running

real    0m2.208s
user    0m0.320s
sys     0m0.900s

real    0m2.197s
user    0m0.300s
sys     0m0.910s


real    0m4.371s
user    0m3.350s
sys     0m0.860s

real    0m4.375s
user    0m3.300s
sys     0m0.910s

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151025/d607eb94/attachment.sig>

More information about the ffmpeg-devel mailing list