[Ffmpeg-devel] RUNTIME_CPUDETECT broken on PPC due to -maltivec

matthieu castet castet.matthieu
Fri Mar 9 19:31:39 CET 2007

Sam Hocevar wrote:
>    FFmpeg's runtime AltiVec detection doesn't work, the library crashes
> in random places on a G3 machine.
>    Contrary to common belief, when using -maltivec gcc *can* generate
> AltiVec code in unexpected, non-vector-using places. Whether this is the
> correct behaviour or not, I don't know, but it's gcc's behaviour. And
> without -maltivec, there is no way to include <altivec.h> and use vector
> types.
Doesn't the same apply for x86 or other arches ?

According to my gcc man :

  These options will enable GCC to use these extended instructions in
  generated code, even without -mfpmath=sse.  Applications which per-
  form runtime CPU detection must compile separate files for each
  supported architecture, using the appropriate flags.  In particu-
  lar, the file containing the CPU detection code should be compiled
  without these options.

More information about the ffmpeg-devel mailing list