On 2014-06-28 00:10:59 +0300, Martin Storsjö wrote: > When running on a 64 bit kernel, /proc/cpuinfo lists different > optional features than on 32 bit kernels (because some of them > are mandatory in the 64 bit implemenations). > > The kernel does list the old features properly if they are queried > via /proc/self/auxv though - however this file is not always readable > (e.g. on most android systems). > > The android cpufeatures library does this slightly differently, > by assuming that these are available if the "CPU architecture" > line is >= 8, see [1] for details. > > It has been suggested to include the old, non-optional features in > /proc/cpuinfo as well, but that suggested patch never was merged. > See [2] for the discussion around this suggestion. > > [1] https://android-review.googlesource.com/91380 > [2] http://marc.info/?l=linux-arm-kernel&m=139087240101974 > > --- > Updated according to Janne's suggestions. > --- > libavutil/arm/cpu.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavutil/arm/cpu.c b/libavutil/arm/cpu.c > index 85ea662..8bdaa88 100644 > --- a/libavutil/arm/cpu.c > +++ b/libavutil/arm/cpu.c > @@ -90,8 +90,10 @@ static int get_cpuinfo(uint32_t *hwcap) > *hwcap |= HWCAP_VFP; > if (strstr(buf, " vfpv3 ")) > *hwcap |= HWCAP_VFPv3; > - if (strstr(buf, " neon ")) > + if (strstr(buf, " neon ") || strstr(buf, " asimd ")) > *hwcap |= HWCAP_NEON; > + if (strstr(buf, " fp ")) // Listed on 64 bit ARMv8 kernels > + *hwcap |= HWCAP_VFP | HWCAP_VFPv3; > break; > } > }
ok Janne _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
