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

Edward Hervey bilboed
Mon Nov 2 21:12:34 CET 2009


Hi all,

 While doing some profiling, I noticed that av_opt_set_defaults2 would
end up doing a rather big number of strcmp calls.

 The problem was that av_opt_set_defaults2 would, for each AVOption:
 * call av_set_* ... with the name of the option as the argument
 * av_set_* would... search for the AVOption based on the name.

 The following patch creates some variants of the existing av_set_*
functions that take an AVOption directly instead of the name of an
option.

 The new functions are static and not exposed, if some people want them
to be public, I can add that.

   Edward
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-opt-speedup-20433.patch
Type: text/x-patch
Size: 4335 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091102/62b0a753/attachment.bin>



More information about the ffmpeg-devel mailing list