[Ffmpeg-devel] (minor) performance improvement suggestions
Sat Jun 4 06:22:56 CEST 2005
been looking at some minor optimizations during some of the initialization
functions. due to the sheer number of format/codecs, i think some
improvements can be made. not on the scale of improving a couple
milliseconds on a decoder loop, but every little bit counts, right?
anyway, here's my suggestions:
1) in av_probe_input_format, it does an exhaustive search over a large
number of input format types. some probes return AVPROBE_SCORE_MAX.
shouldn't the loop just break there?
2) in a similar vein, perhaps some of the lesser used formats (ie westwood,
sierra, etc) shouldn't be enabled (and registered ) by default.
3) similarly, avcodec_find_encoder and avcodec_find_decoder look through a
long linked list. seems like there's a natural hash key using the codec id
and encode/decode. but, finding a minimal perfect hash function generator
in a friday night is making my head hurt :)
More information about the ffmpeg-devel