[FFmpeg-devel] [PATCH 2/2] lavu/riscv: add hwprobe() for CPU detection
Martin Storsjö
martin at martin.st
Mon May 6 23:37:02 EEST 2024
On Fri, 3 May 2024, Rémi Denis-Courmont wrote:
> This adds the Linux-specific function call to detect CPU features. Unlike
> the more portable auxillary vector, this supports extensions other than
> single lettered ones. At this point, FFmpeg already needs this to detect
> Zba and Zbb at run-time, and probably will need it for Zvbb in the near
> future.
>
> Support will be available in glibc 2.40 onward.
> ---
> configure | 3 +++
> libavutil/riscv/cpu.c | 25 +++++++++++++++++++++++++
> 2 files changed, 28 insertions(+)
> @@ -27,10 +29,33 @@
> #include <sys/auxv.h>
> #define HWCAP_RV(letter) (1ul << ((letter) - 'A'))
> #endif
> +#ifdef HAVE_SYS_HWPROBE_H
Aren't these kind of config.h macros always defined, but with the values
0/1? I.e., shouldn't this use #if instead of #ifdef?
// Martin
More information about the ffmpeg-devel
mailing list