[FFmpeg-devel] [PATCH] Lagarith range decoder.

Nathan Caldwell saintdev
Sat Sep 5 19:19:59 CEST 2009

On Sat, Sep 5, 2009 at 9:51 AM, Loren Merritt<lorenm at u.washington.edu> wrote:
> On Sat, 5 Sep 2009, Nathan Caldwell wrote:
>> Here's the patch for just the lagarith range decoder. Hopefully I've
>> taken care of anyone's concerns.
> division-free version. 1.5x faster lag_decode_line on Core2.

Thanks Loren!
To be honest I wasn't sure what you were hinting at on how to do this.

> +            // FIXME make av_log2 fast so it's usable here
> +            shift = __builtin_clz(range_scaled) - 1;

Is this still faster than division using av_log2?
If you didn't test, I'll check it out later tonight.

-Nathan Caldwell

More information about the ffmpeg-devel mailing list