diff mbox series

[FFmpeg-devel,6/6] lavu/cpu: deprecate RISC-V F, D and zba CPU flags

Message ID 20240801195917.43555-6-remi@remlab.net
State New
Headers show
Series [FFmpeg-devel,1/6] lavu/riscv: depend on RVB and simplify accordingly | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Rémi Denis-Courmont Aug. 1, 2024, 7:59 p.m. UTC
---
 doc/APIchanges      | 4 ++++
 libavutil/cpu.h     | 5 +++++
 libavutil/version.h | 3 ++-
 3 files changed, 11 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/doc/APIchanges b/doc/APIchanges
index 6937718e83..046828ded1 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,10 @@  The last version increases of all libraries were on 2024-03-07
 
 API changes, most recent first:
 
+2024-07-30 - xxxxxxxxx - lavu 59.32.100 - cpu.h
+  Deprecate AV_CPU_FLAG_RVF and AV_CPU_FLAG_RVD without replacement.
+  Deprecate AV_CPU_FLAG_RVB_ADDR, subsumed into AV_CPU_FLAG_RVB.
+
 2024-07-29 - xxxxxxxxx - lavu 59.31.100 - intreadwrite.h
   Add AV_{R,W}{L,B}{16,32}A and AV_{R,W}B64A.
 
diff --git a/libavutil/cpu.h b/libavutil/cpu.h
index 9f419aae02..ba6c234e04 100644
--- a/libavutil/cpu.h
+++ b/libavutil/cpu.h
@@ -22,6 +22,7 @@ 
 #define AVUTIL_CPU_H
 
 #include <stddef.h>
+#include "version.h"
 
 #define AV_CPU_FLAG_FORCE    0x80000000 /* force usage of selected flags (OR) */
 
@@ -82,14 +83,18 @@ 
 
 // RISC-V extensions
 #define AV_CPU_FLAG_RVI          (1 << 0) ///< I (full GPR bank)
+#if FF_API_RISCV_FD_ZBA
 #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 */
 #define AV_CPU_FLAG_RVV_F64      (1 << 6) ///< Vectors of double's
 #define AV_CPU_FLAG_RVB_BASIC    (1 << 7) ///< Basic bit-manipulations
+#if FF_API_RISCV_FD_ZBA
 #define AV_CPU_FLAG_RVB_ADDR     (1 << 8) ///< Address bit-manipulations
+#endif
 #define AV_CPU_FLAG_RV_ZVBB      (1 << 9) ///< Vector basic bit-manipulations
 #define AV_CPU_FLAG_RV_MISALIGNED (1 <<10) ///< Fast misaligned accesses
 #define AV_CPU_FLAG_RVB          (1 <<11) ///< B (bit manipulations)
diff --git a/libavutil/version.h b/libavutil/version.h
index 24418600f0..aa2b3900ee 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,7 +79,7 @@ 
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  59
-#define LIBAVUTIL_VERSION_MINOR  31
+#define LIBAVUTIL_VERSION_MINOR  32
 #define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
@@ -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_ZBA             (LIBAVUTIL_VERSION_MAJOR < 60)
 
 /**
  * @}