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

Michael Niedermayer michaelni
Thu Jan 14 01:17:41 CET 2010


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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100114/501eb617/attachment.pgp>



More information about the ffmpeg-devel mailing list