[FFmpeg-devel] [PATCH] optimize init_vlc

Maxim max_pole
Sun Mar 28 09:04:51 CEST 2010


Hello,
> optimize init_vlc().
> Reduce worst case time from O(N^2) to O(N*log(N)).
> Reduce average case by a factor of 7 in ffv2 (total decoding speed
> +4-25%)
> Reduce average case by a factor of 1.3 in ffvhuff (total decoding
> speed +0.5%)
> Reduce average case by a factor of 1.05 in mjpeg (total decoding speed
> +0.05%)
> I haven't extensively benchmarked other codecs, because these are the
> only ones I know of that use init_vlc during decoding.

Indeo5 and the future Indeo4 (see
ivi_common.c->ff_ivi_create_huff_from_desc()) often change vlc tables
during decoding as well...

Regards
Maxim



More information about the ffmpeg-devel mailing list