[FFmpeg-devel] [PATCH] Reduce usage of strcmp when setting default options

Edward Hervey bilboed
Mon Nov 2 22:23:14 CET 2009


On Mon, 2009-11-02 at 21:07 +0000, M?ns Rullg?rd wrote:
> Edward Hervey <bilboed at gmail.com> writes:
> 
> > Hi all,
> >
> >  While doing some profiling, I noticed that av_opt_set_defaults2 would
> > end up doing a rather big number of strcmp calls.
> 
> Is that a problem?
> 

 It slows down the startup of a decoder/encoder.

 If one doesn't call av_opt_set_defaults2() all the options (except for
the function pointers and a couple of other variables) are left at
0/NULL instead of being set to the default value specified in each
AVOption.




More information about the ffmpeg-devel mailing list