diff --git a/libavutil/intfloat_readwrite.c b/libavutil/intfloat_readwrite.c index 142331dac1..af5da623cd 100644 --- a/libavutil/intfloat_readwrite.c +++ b/libavutil/intfloat_readwrite.c @@ -29,7 +29,9 @@ #include "common.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; @@ -96,3 +98,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 9709f4dae4..1d79e3e8af 100644 --- a/libavutil/intfloat_readwrite.h +++ b/libavutil/intfloat_readwrite.h @@ -22,8 +22,11 @@ #define AVUTIL_INTFLOAT_READWRITE_H #include + #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 f698e41bbc..4c0aed37d2 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -150,6 +150,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 /** * @}