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