[FFmpeg-devel] [PATCH] avutil: use getauxval on linux/android for CPU capabilities

Aman Karmani ffmpeg at tmm1.net
Sat Feb 5 08:25:03 EET 2022


On Fri, Feb 4, 2022 at 2:20 PM Martin Storsjö <martin at martin.st> wrote:

> On Fri, 4 Feb 2022, Aman Karmani wrote:
>
> > From: Aman Karmani <aman at tmm1.net>
> >
> > fixes #6578
> >
> > Signed-off-by: Aman Karmani <aman at tmm1.net>
> > ---
> > libavutil/arm/cpu.c | 17 ++++++++++++++---
> > 1 file changed, 14 insertions(+), 3 deletions(-)
>
> It would be good if the commit message actually explained the upsides to
> doing this.
>
> It's also important to point out that this function didn't use to exist in
> all Android versions (hence the /proc/cpuinfo parsing). The point when the
> function appeared (Android 4.4, API 20, according to the referenced trac
> issue) is kinda far in the past today, but I'm not sure if strictly all
> users of the library have stopped supporting older versions still - at
> least for some use cases I've heard of recently, Android 4.1 was still
> supported.
>
> If coupled with a configure check for the function, so that users
> explicitly targeting an older version that lack it wouldn't get it, I
> guess this could be more easily acceptable.


Thanks for the review.

I discovered some older Linux arm toolchains (< glibc 2.16) are also
missing the function, so a configure check seems prudent.

Sent v2 patch with the requested changes.


>
> // Martin
>
>


More information about the ffmpeg-devel mailing list