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

Loren Merritt lorenm
Sat Sep 5 20:09:57 CEST 2009


On Sat, 5 Sep 2009, Loren Merritt wrote:
> On Sat, 5 Sep 2009, Nathan Caldwell wrote:
>> On Sat, Sep 5, 2009, Loren Merritt wrote:
>> 
>>> + // 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.
>
> Yes. 1.3x instead of 1.5x.

Oops, rather:
my patch as-is: 1.5x faster than before
with av_log2 instead of clz: 1.33x
with div instead of the whole workaround: 1.26x (i.e. this is from 
skipping div just on the val=0 case)

--Loren Merritt



More information about the ffmpeg-devel mailing list