[vlc-devel] [vlc-commits] Avcodec: set the dsp_mask for NEON too
jb at videolan.org
Tue Oct 2 11:15:43 CEST 2012
On Tue, Oct 02, 2012 at 12:19:29AM +0100, Måns Rullgård wrote :
> Jean-Baptiste Kempf <jb at videolan.org> writes:
> > On Mon, Oct 01, 2012 at 11:45:40PM +0100, Måns Rullgård wrote :
> >> Because runtime CPU detection on ARM is not generally possible (some
> >> systems expose a subset of the information we need), we rely on probing
> >> the compiler settings to determine which code to build and use.
> > The information of having NEON or not is not enough?
> Obviosly not. You need to know about armv5te, armv6, armv6t2, vfp,
> vfpv3, vfpv3-d32, neon, etc. Some of these are reported in Linux hwcaps
> (listed in /proc/cpuinfo) but not all.
Hmmm. I think that for VLC, we mostly care for Android and iOS, since
most of the other OSes are marginalized (whether we like it or not)
According to docs, on Android, NEON can only be with ARMv7. And ARMv7
guarantees to have vfpv3.
iOS is easy to deal with, because of the limited number of devices (10
> >> Furthermore, even if runtime detection is possible, you still want to
> >> build with the compiler flags best matching the target device. Compared
> >> to x86, much greater gains are made in plain C code when building for
> >> the actual target hardware rather than something less capable.
> > Sure, but can't one do a "average" binary (not best match) to work on
> > all cortex-a8 and a9 and just activate NEON code when a NEON fpu is present?
> > Or am I too naive?
Well, my (our?) issue is to be have to have, for Android, a minimum
binary that can work on all classic devices (Cortex-A8+NEON) and not
crash on nVidia Tegra2 devices.
If I understand you correctly, it probably won't be 100% optimized for
Cortex-A9+NEON nor for tegra2, but that is a limitation that we can
accept, if it avoids having to do .so downloading...
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel