[FFmpeg-devel] adding --cpu=native option to ffmpeg configure script

emil Karlson jekarlson
Thu Jul 30 12:00:56 CEST 2009


Basically the motivation and some sort of draft solution (only for gentoo
ebuild though) is described here.

ie. ffmpeg configure --cpu=native option might be able to optionally choose
the cpu type on the local computer.

Sample solution:
cpu=`echo "int main() {}" | gcc -march=native -xc -S -Q -v - |& egrep -m 1
-o "\-march=.*" | cut -f 1 -d \ | cut -f 2 -d \=`

It's a bit ugly but shouldn't cause any regressions, if you limit this code
to option --cpu=native.

Any comments?

More information about the ffmpeg-devel mailing list