diff mbox series

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

Message ID 20240725202522.276182-6-remi@remlab.net
State New
Headers show
Series [FFmpeg-devel,1/6] lavu/riscv: implement floating point clips | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Rémi Denis-Courmont July 25, 2024, 8:25 p.m. UTC
---
 doc/APIchanges      | 3 +++
 libavutil/cpu.h     | 3 +++
 libavutil/version.h | 1 +
 3 files changed, 7 insertions(+)

Comments

Andreas Rheinhardt July 26, 2024, 9:16 a.m. UTC | #1
Rémi Denis-Courmont:
> ---
>  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>

"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)
>  
>  /**
>   * @}
Rémi Denis-Courmont July 27, 2024, 12:22 p.m. UTC | #2
Le perjantaina 26. heinäkuuta 2024, 12.16.11 EEST Andreas Rheinhardt a écrit :
> Rémi Denis-Courmont:
> > ---
> > 
> >  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>
> 
> "version.h"

Fixed locally.
Rémi Denis-Courmont July 27, 2024, 12:27 p.m. UTC | #3
Le lauantaina 27. heinäkuuta 2024, 15.22.27 EEST Rémi Denis-Courmont a écrit :
> Le perjantaina 26. heinäkuuta 2024, 12.16.11 EEST Andreas Rheinhardt a écrit 
:
> > Rémi Denis-Courmont:
> > > ---
> > > 
> > >  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>
> > 
> > "version.h"
> 
> Fixed locally.

Scratch that, the patch is wrong anyway. Will drop it from the series for now.
diff mbox series

Patch

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)
 
 /**
  * @}