[FFmpeg-devel] [PATCH 6/6] lavu/cpu: deprecate AV_CPU_FLAG_RV{F, D}

Rémi Denis-Courmont remi at remlab.net
Thu Jul 25 23:25:20 EEST 2024


---
 doc/APIchanges      | 3 +++
 libavutil/cpu.h     | 3 +++
 libavutil/version.h | 1 +
 3 files changed, 7 insertions(+)

diff --git a/doc/APIchanges b/doc/APIchanges
index fb54c3fbc9..16993d310e 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07
 
 API changes, most recent first:
 
+2024-07-28 - xxxxxxxxx - lavu 59.30.101 - cpu.h
+  Deprecate AV_CPU_FLAG_RVF and AV_CPU_FLAG_RVD without replacement.
+
 2024-07-25 - xxxxxxxxx - lavu 59.29.100 - cpu.h
   Add AV_CPU_FLAG_RVB.
 
diff --git a/libavutil/cpu.h b/libavutil/cpu.h
index 9f419aae02..8af1233e6f 100644
--- a/libavutil/cpu.h
+++ b/libavutil/cpu.h
@@ -22,6 +22,7 @@
 #define AVUTIL_CPU_H
 
 #include <stddef.h>
+#include <libavutil/version.h>
 
 #define AV_CPU_FLAG_FORCE    0x80000000 /* force usage of selected flags (OR) */
 
@@ -82,8 +83,10 @@
 
 // RISC-V extensions
 #define AV_CPU_FLAG_RVI          (1 << 0) ///< I (full GPR bank)
+#if FF_API_RISCV_FD
 #define AV_CPU_FLAG_RVF          (1 << 1) ///< F (single precision FP)
 #define AV_CPU_FLAG_RVD          (1 << 2) ///< D (double precision FP)
+#endif
 #define AV_CPU_FLAG_RVV_I32      (1 << 3) ///< Vectors of 8/16/32-bit int's */
 #define AV_CPU_FLAG_RVV_F32      (1 << 4) ///< Vectors of float's */
 #define AV_CPU_FLAG_RVV_I64      (1 << 5) ///< Vectors of 64-bit int's */
diff --git a/libavutil/version.h b/libavutil/version.h
index 852eeef1d6..df43dcc321 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -113,6 +113,7 @@
 #define FF_API_VULKAN_CONTIGUOUS_MEMORY (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_H274_FILM_GRAIN_VCS      (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_MOD_UINTP2               (LIBAVUTIL_VERSION_MAJOR < 60)
+#define FF_API_RISCV_FD                 (LIBAVUTIL_VERSION_MAJOR < 60)
 
 /**
  * @}
-- 
2.45.2



More information about the ffmpeg-devel mailing list