[FFmpeg-devel] [PATCH] Optimisations for av_log2 and integer clip functions

Måns Rullgård mans
Thu Jan 14 01:31:58 CET 2010

Michael Niedermayer <michaelni at gmx.at> writes:

> On Wed, Jan 13, 2010 at 05:55:26PM -0500, Jason Garrett-Glaser wrote:
>> On Wed, Jan 13, 2010 at 5:49 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> > On Wed, Jan 13, 2010 at 10:10:30PM +0000, M?ns Rullg?rd wrote:
>> >> Jason Garrett-Glaser <darkshikari at gmail.com> writes:
>> > [...]
>> >> > Also, __builtin_clz/ctz maps to bsr/bsf, which are extraordinarily
>> >> > slow on Athlons.
>> >>
>> >> Fabulous. ?So what shall we do? ?List the CPUs with good clz support
>> >> in configure like we do with cmov et al?
>> >
>> > yes, if someone wants to use it
>> Is it better to default to BSR/BSF and be slower on some CPUs, or is
>> it better to default to table lookup, and be slower on a _different_
>> set of CPUs (when people aren't compiling specifically for their own
>> CPU)?
> hmm, you dont happen to have an easy question? :)
> well, if someone really wants to choose the ideal default the following
> could be calculated:
> score A= sum for all X (number of people who have cpuX) * speed_of_optionAonX
> If thats to easy one also could factor the question in about the speed
> difference actually making a difference for a file a user wants to play

Perhaps someone with an AMD processor could try the patch on a flac file.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list