Opened 7 years ago

Closed 2 years ago

#6578 closed enhancement (fixed)

ARM NEON detection should use getauxval instead of parsing files in /proc

Reported by: James Cowgill Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Aman Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

It was suggested in this message from the Debian BTS that ffmpeg should use the getauxval function to detect the presence of NEON instead of parsing files in /proc. This is theoretically faster and doesn't require /proc to be mounted.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=870676#49

Change History (2)

comment:1 by Aman, 2 years ago

somewhat related, I experienced SEGV on some android/arm devices when attempting to read /proc/self/auxv

OS Version: Android 9 (PS7242)
Report Version: 104

Exception Type: Unknown (SIGSEGV)

Application Specific Information:
Segfault

Thread 0 Crashed:
0   libc.so                         0xf23ac550          fread
1   libavutil.so                    0xd585c3ca          [inlined] get_hwcap (cpu.c:60)
2   libavutil.so                    0xd585c3ca          ff_get_cpu_flags_arm (cpu.c:109)

it appears since API20 getauxval() is part of android libc

https://chromium.googlesource.com/skia/+/chrome/m49/platform_tools/android/third_party/cpufeatures/cpu-features.c#478

comment:2 by Aman, 2 years ago

Cc: Aman added
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.