[libav-commits] avutil: Add deprecation ifdefs around obsolete intfloat code

Diego Biurrun git at libav.org
Fri Dec 13 23:52:42 CET 2013


Module: libav
Branch: master
Commit: 70a7b24d56a823894440a372c46e89e212b89c35

Author:    Diego Biurrun <diego at biurrun.de>
Committer: Diego Biurrun <diego at biurrun.de>
Date:      Fri Dec 13 13:34:07 2013 +0100

avutil: Add deprecation ifdefs around obsolete intfloat code

This long-deprecated code should disappear at the next version bump.

---

 libavutil/intfloat_readwrite.c |    3 +++
 libavutil/intfloat_readwrite.h |    4 ++++
 libavutil/version.h            |    3 +++
 3 files changed, 10 insertions(+)

diff --git a/libavutil/intfloat_readwrite.c b/libavutil/intfloat_readwrite.c
index 6838563..71daa38 100644
--- a/libavutil/intfloat_readwrite.c
+++ b/libavutil/intfloat_readwrite.c
@@ -28,7 +28,9 @@
 #include <stdint.h>
 #include "mathematics.h"
 #include "intfloat_readwrite.h"
+#include "version.h"
 
+#if FF_API_INTFLOAT
 double av_int2dbl(int64_t v){
     if((uint64_t)v+v > 0xFFEULL<<52)
         return NAN;
@@ -95,3 +97,4 @@ AVExtFloat av_dbl2ext(double d){
         ext.exponent[0] |= 0x80;
     return ext;
 }
+#endif /* FF_API_INTFLOAT */
diff --git a/libavutil/intfloat_readwrite.h b/libavutil/intfloat_readwrite.h
index f093b92..4759ab4 100644
--- a/libavutil/intfloat_readwrite.h
+++ b/libavutil/intfloat_readwrite.h
@@ -22,8 +22,11 @@
 #define AVUTIL_INTFLOAT_READWRITE_H
 
 #include <stdint.h>
+
 #include "attributes.h"
+#include "version.h"
 
+#if FF_API_INTFLOAT
 /* IEEE 80 bits extended float */
 typedef struct AVExtFloat  {
     uint8_t exponent[2];
@@ -36,5 +39,6 @@ attribute_deprecated double av_ext2dbl(const AVExtFloat ext) av_const;
 attribute_deprecated int64_t av_dbl2int(double d) av_const;
 attribute_deprecated int32_t av_flt2int(float d) av_const;
 attribute_deprecated AVExtFloat av_dbl2ext(double d) av_const;
+#endif /* FF_API_INTFLOAT */
 
 #endif /* AVUTIL_INTFLOAT_READWRITE_H */
diff --git a/libavutil/version.h b/libavutil/version.h
index dad8e2f..eafc521 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -91,6 +91,9 @@
 #ifndef FF_API_XVMC
 #define FF_API_XVMC                     (LIBAVUTIL_VERSION_MAJOR < 53)
 #endif
+#ifndef FF_API_INTFLOAT
+#define FF_API_INTFLOAT                 (LIBAVUTIL_VERSION_MAJOR < 53)
+#endif
 
 /**
  * @}



More information about the libav-commits mailing list