[Ffmpeg-devel] [PATH] test if cpu supports CMOV

Michael Niedermayer michaelni
Tue Oct 17 11:15:14 CEST 2006


On Mon, Oct 16, 2006 at 10:54:31PM +0200, Guillaume POIRIER wrote:
> Hi,
> Michael Niedermayer a ?crit :
> >this will break runtime cpudetect (yeah i know my crap code already
> >broke it but thats not supposed to stay that way in svn)
> >
> >solution:
> >1. clean configure so that
> >--cpu  selects the minimum cpu required (-mcpu/-march)
> >--tune selects the target cpu for which to tune but doent cause possibly
> >       unsupported instructions to be generated (-mtune)
> Ok, I had a look at current configure, and I'm quite surprised.
> From what I can see, currently, --cpu (which already exists) allows to 
> select an Architecture, _not_ a CPU.
> This means that the first step IMHO is to rename this missleading option 
> to --arch (as in attached patch).

patch ok

> Then add --cpu option to allow to set -march (which implies -mtune so no 
> need to always set --cpu and --tune) (this is mostly what current --tune 
> does, so that would pretty much mean to rename $tune to $cpu).
> Then add --tune so it ONLY sets -mtune. (without code duplication 
> between --tune and --cpu)
> As you can see, if we want to do this (which is certainly desirable), 
> what kinda mean we do perfect_shuffle(configure_option).
> I don't mind, but users may hate this.

iam ok with this, any objections from anyone?

> BTW, do we agree that we aren't looking for automatic CPU detection as 
> things are done in MPlayer's configure?

the cpu detection should be split out of mplayers configure so it can
be easily used by other projects, i dunno if anyone is working on that...

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is

More information about the ffmpeg-devel mailing list