[Bug 383240] Re: Integrate and enable ARMv5TE/v6/VFP and NEON optimisations from ffmpeg trunk for armel

Mans Rullgard mans at mansr.com
Tue Jun 30 09:52:44 UTC 2009


Let me explain how the ARM feature selection in FFmpeg works.  First, there is the question of runtime feature detection.
This is not done on ARM for two reasons: 1) building the entire code for the correct target makes a big difference in
performance, and 2) there is currently no good way to detect processor features from userspace.

The CPU selection flags passed to the compiler are determined by the --cpu configure option.  Specific optimisations
are activated by compiling a test file using a representative instruction.  The assembler will reject this if the chosen target
does not support that instruction.  For this approach to work, the compiler must be either statically configured for the
correct target, or the appropriate flags must be passed.  The FFmpeg configure script has no means of determining
correct values for -mfpu and similar flags.  If any such flags are required, these must be set using --extra-cflags.

The correct way to configure for Cortex-A8 with NEON looks like this:

  configure --arch=arm --cpu=cortex-a8 --extra-cflags='-mfpu=neon
-mfloat-abi=softfp' --cross-prefix=arm-none-linux-gnueabi-

Add other flags such as --sysroot, --enable/disable-stuff as necessary.  There is rarely any need to explicitly --disable
anything, since optional features are only enabled if the required support libraries etc are available.

Hope this clarifies the situation.

As for the ultrasparc flags, this is weird and probably broken.  I'd fix
it, but I don't have the hardware.

-- 
Integrate and enable ARMv5TE/v6/VFP and NEON optimisations from ffmpeg trunk for armel
https://bugs.launchpad.net/bugs/383240
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list