The branch, release/8.0 has been updated
       via  d8605a6b5549887edcca69c1ba0400fe14e0de3d (commit)
       via  c9b8e5999b5aae485917ecf7ec90b01ccbdd747d (commit)
      from  b9adbf0fcc26e04a0f291c9f8857affb4540a6e3 (commit)


- Log -----------------------------------------------------------------
commit d8605a6b5549887edcca69c1ba0400fe14e0de3d
Author:     Brad Smith <b...@comstyle.com>
AuthorDate: Mon Sep 22 07:28:21 2025 -0400
Commit:     Brad Smith <b...@comstyle.com>
CommitDate: Wed Sep 24 19:55:16 2025 -0400

    libavutil/arm: Rename the HWCAP defines
    
    Rename the HWCAP defines to use the same naming scheme as AArch64 and PPC.
    
    (cherry picked from commit ced4a6ebc9e7cd92d0ca9b9fb8f9d1013d23cbfa)
    Signed-off-by: Brad Smith <b...@comstyle.com>

diff --git a/libavutil/arm/cpu.c b/libavutil/arm/cpu.c
index 8ec28143d7..2e2977efc9 100644
--- a/libavutil/arm/cpu.c
+++ b/libavutil/arm/cpu.c
@@ -47,12 +47,12 @@
 #endif
 
 /* Relevant HWCAP values from kernel headers */
-#define HWCAP_VFP       (1 << 6)
-#define HWCAP_EDSP      (1 << 7)
-#define HWCAP_THUMBEE   (1 << 11)
-#define HWCAP_NEON      (1 << 12)
-#define HWCAP_VFPv3     (1 << 13)
-#define HWCAP_TLS       (1 << 15)
+#define HWCAP_ARM_VFP     (1 << 6)
+#define HWCAP_ARM_EDSP    (1 << 7)
+#define HWCAP_ARM_THUMBEE (1 << 11)
+#define HWCAP_ARM_NEON    (1 << 12)
+#define HWCAP_ARM_VFPv3   (1 << 13)
+#define HWCAP_ARM_TLS     (1 << 15)
 
 static int get_auxval(uint32_t *hwcap)
 {
@@ -101,19 +101,19 @@ static int get_cpuinfo(uint32_t *hwcap)
     while (fgets(buf, sizeof(buf), f)) {
         if (av_strstart(buf, "Features", NULL)) {
             if (strstr(buf, " edsp "))
-                *hwcap |= HWCAP_EDSP;
+                *hwcap |= HWCAP_ARM_EDSP;
             if (strstr(buf, " tls "))
-                *hwcap |= HWCAP_TLS;
+                *hwcap |= HWCAP_ARM_TLS;
             if (strstr(buf, " thumbee "))
-                *hwcap |= HWCAP_THUMBEE;
+                *hwcap |= HWCAP_ARM_THUMBEE;
             if (strstr(buf, " vfp "))
-                *hwcap |= HWCAP_VFP;
+                *hwcap |= HWCAP_ARM_VFP;
             if (strstr(buf, " vfpv3 "))
-                *hwcap |= HWCAP_VFPv3;
+                *hwcap |= HWCAP_ARM_VFPv3;
             if (strstr(buf, " neon ") || strstr(buf, " asimd "))
-                *hwcap |= HWCAP_NEON;
+                *hwcap |= HWCAP_ARM_NEON;
             if (strstr(buf, " fp ")) // Listed on 64 bit ARMv8 kernels
-                *hwcap |= HWCAP_VFP | HWCAP_VFPv3;
+                *hwcap |= HWCAP_ARM_VFP | HWCAP_ARM_VFPv3;
             break;
         }
     }
@@ -135,7 +135,7 @@ int ff_get_cpu_flags_arm(void)
                 return flags;
 
 #define check_cap(cap, flag) do {               \
-        if (hwcap & HWCAP_ ## cap)              \
+        if (hwcap & HWCAP_ARM_ ## cap)          \
             flags |= AV_CPU_FLAG_ ## flag;      \
     } while (0)
 

commit c9b8e5999b5aae485917ecf7ec90b01ccbdd747d
Author:     Brad Smith <b...@comstyle.com>
AuthorDate: Sat Sep 20 23:06:08 2025 -0400
Commit:     Brad Smith <b...@comstyle.com>
CommitDate: Wed Sep 24 19:53:04 2025 -0400

    libavutil/arm: Make use of elf_aux_info() on FreeBSD/OpenBSD
    
    - FreBSD/OpenBSD have elf_aux_info() on arm
    - Wrap AT_HWCAP as the value is different for BSD vs Linux (16 vs 25)
    
    (cherry picked from commit cdae5c3639f4adcd289e643a203d43d4e01d87f5)
    Signed-off-by: Brad Smith <b...@comstyle.com>

diff --git a/libavutil/arm/cpu.c b/libavutil/arm/cpu.c
index b84882005a..8ec28143d7 100644
--- a/libavutil/arm/cpu.c
+++ b/libavutil/arm/cpu.c
@@ -31,18 +31,20 @@
      CORE_FLAG(VFPV3)   |                       \
      CORE_FLAG(NEON))
 
-#if defined __linux__ || defined __ANDROID__
+#if defined __linux__ || defined __ANDROID__ || HAVE_ELF_AUX_INFO
 
 #include <stdint.h>
 #include <stdio.h>
 #include <string.h>
 #include "libavutil/avstring.h"
 
-#if HAVE_GETAUXVAL
+#if HAVE_GETAUXVAL || HAVE_ELF_AUX_INFO
 #include <sys/auxv.h>
 #endif
 
+#ifndef AT_HWCAP
 #define AT_HWCAP        16
+#endif
 
 /* Relevant HWCAP values from kernel headers */
 #define HWCAP_VFP       (1 << 6)
@@ -54,7 +56,7 @@
 
 static int get_auxval(uint32_t *hwcap)
 {
-#if HAVE_GETAUXVAL
+#if HAVE_GETAUXVAL || HAVE_ELF_AUX_INFO
     unsigned long ret = ff_getauxval(AT_HWCAP);
     if (ret == 0)
         return -1;
@@ -65,6 +67,7 @@ static int get_auxval(uint32_t *hwcap)
 #endif
 }
 
+#if defined __linux__ || defined __ANDROID__
 static int get_hwcap(uint32_t *hwcap)
 {
     struct { uint32_t a_type; uint32_t a_val; } auxv;
@@ -117,6 +120,7 @@ static int get_cpuinfo(uint32_t *hwcap)
     fclose(f);
     return 0;
 }
+#endif
 
 int ff_get_cpu_flags_arm(void)
 {
@@ -124,8 +128,10 @@ int ff_get_cpu_flags_arm(void)
     uint32_t hwcap;
 
     if (get_auxval(&hwcap) < 0)
+#if defined __linux__ || defined __ANDROID__
         if (get_hwcap(&hwcap) < 0)
             if (get_cpuinfo(&hwcap) < 0)
+#endif
                 return flags;
 
 #define check_cap(cap, flag) do {               \

-----------------------------------------------------------------------

Summary of changes:
 libavutil/arm/cpu.c | 40 +++++++++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 17 deletions(-)


hooks/post-receive
-- 

_______________________________________________
ffmpeg-cvslog mailing list -- ffmpeg-cvslog@ffmpeg.org
To unsubscribe send an email to ffmpeg-cvslog-le...@ffmpeg.org

Reply via email to