[FFmpeg-cvslog] lavu/riscv: add Zvbb CPU capability detection

Rémi Denis-Courmont git at videolan.org
Sat May 11 17:12:30 EEST 2024


ffmpeg | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue May  7 22:09:27 2024 +0300| [5d8f62feb5e3512a04ebb6eceae7dd55bab14ce0] | committer: Rémi Denis-Courmont

lavu/riscv: add Zvbb CPU capability detection

This requires Linux kernel version 6.8 or later.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5d8f62feb5e3512a04ebb6eceae7dd55bab14ce0
---

 libavutil/riscv/cpu.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavutil/riscv/cpu.c b/libavutil/riscv/cpu.c
index 69d1afe853..3cf4e25bc9 100644
--- a/libavutil/riscv/cpu.c
+++ b/libavutil/riscv/cpu.c
@@ -54,6 +54,10 @@ int ff_get_cpu_flags_riscv(void)
             ret |= AV_CPU_FLAG_RVB_ADDR;
         if (pairs[1].value & RISCV_HWPROBE_EXT_ZBB)
             ret |= AV_CPU_FLAG_RVB_BASIC;
+#ifdef RISCV_HWPROBE_EXT_ZVBB
+        if (pairs[1].value & RISCV_HWPROBE_EXT_ZVBB)
+            ret |= AV_CPU_FLAG_RV_ZVBB;
+#endif
     } else
 #endif
 #if HAVE_GETAUXVAL
@@ -105,6 +109,9 @@ int ff_get_cpu_flags_riscv(void)
     ret |= AV_CPU_FLAG_RVV_F64;
 #endif
 #endif
+#endif
+#ifdef __riscv_zvbb
+    ret |= AV_CPU_FLAG_RV_ZVBB;
 #endif
 
     return ret;



More information about the ffmpeg-cvslog mailing list