* commit '70a7b24d56a823894440a372c46e89e212b89c35': avutil: Add deprecation ifdefs around obsolete intfloat code
Unified · Split
| @@ -29,7 +29,9 @@ · 28 unmodified lines | ||
| 29 | 29 | #include "common.h" |
| 30 | 30 | #include "mathematics.h" |
| 31 | 31 | #include "intfloat_readwrite.h" |
| 32 | +#include "version.h" | |
| 32 | 33 | |
| 34 | +#if FF_API_INTFLOAT | |
| 33 | 35 | double av_int2dbl(int64_t v){ |
| 34 | 36 | if((uint64_t)v+v > 0xFFEULL<<52) |
| 35 | 37 | return NAN; |
| @@ -96,3 +98,4 @@ AVExtFloat av_dbl2ext(double d){ · 60 unmodified lines | ||
| 96 | 98 | ext.exponent[0] |= 0x80; |
| 97 | 99 | return ext; |
| 98 | 100 | } |
| 101 | +#endif /* FF_API_INTFLOAT */ | |
| @@ -22,8 +22,11 @@ · 21 unmodified lines | ||
| 22 | 22 | #define AVUTIL_INTFLOAT_READWRITE_H |
| 23 | 23 | |
| 24 | 24 | #include <stdint.h> |
| 25 | + | |
| 25 | 26 | #include "attributes.h" |
| 27 | +#include "version.h" | |
| 26 | 28 | |
| 29 | +#if FF_API_INTFLOAT | |
| 27 | 30 | /* IEEE 80 bits extended float */ |
| 28 | 31 | typedef struct AVExtFloat { |
| 29 | 32 | uint8_t exponent[2]; |
| @@ -36,5 +39,6 @@ attribute_deprecated double av_ext2dbl(const AVExtFloat ext) av_const; · 6 unmodified lines | ||
| 36 | 39 | attribute_deprecated int64_t av_dbl2int(double d) av_const; |
| 37 | 40 | attribute_deprecated int32_t av_flt2int(float d) av_const; |
| 38 | 41 | attribute_deprecated AVExtFloat av_dbl2ext(double d) av_const; |
| 42 | +#endif /* FF_API_INTFLOAT */ | |
| 39 | 43 | |
| 40 | 44 | #endif /* AVUTIL_INTFLOAT_READWRITE_H */ |
| @@ -150,6 +150,9 @@ · 149 unmodified lines | ||
| 150 | 150 | #ifndef FF_API_XVMC |
| 151 | 151 | #define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 53) |
| 152 | 152 | #endif |
| 153 | +#ifndef FF_API_INTFLOAT | |
| 154 | +#define FF_API_INTFLOAT (LIBAVUTIL_VERSION_MAJOR < 53) | |
| 155 | +#endif | |
| 153 | 156 | |
| 154 | 157 | /** |
| 155 | 158 | * @} |