]> git.sesse.net Git - ffmpeg/commitdiff
avutil: Add deprecation ifdefs around obsolete intfloat code
authorDiego Biurrun <diego@biurrun.de>
Fri, 13 Dec 2013 12:34:07 +0000 (13:34 +0100)
committerDiego Biurrun <diego@biurrun.de>
Fri, 13 Dec 2013 22:45:54 +0000 (23:45 +0100)
This long-deprecated code should disappear at the next version bump.

libavutil/intfloat_readwrite.c
libavutil/intfloat_readwrite.h
libavutil/version.h

index 68385635efffbb61b47364dbc37ece92ab310d74..71daa381bd1ea13feac845da63759ad9a46c4983 100644 (file)
@@ -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 */
index f093b92cd23b33e9069f5654e7c3eb1a2ce482ea..4759ab4916992484c1d951396aaafea47388a60b 100644 (file)
 #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 */
index dad8e2fd2ab34918d9cb7f17a4190e83a7198526..eafc52194964422be86ec9f28014d4af01d846f3 100644 (file)
@@ -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
 
 /**
  * @}