diff options
Diffstat (limited to 'src/libffmpeg/libavutil/internal.h')
-rw-r--r-- | src/libffmpeg/libavutil/internal.h | 93 |
1 files changed, 91 insertions, 2 deletions
diff --git a/src/libffmpeg/libavutil/internal.h b/src/libffmpeg/libavutil/internal.h index 7d850141b..0c4b44170 100644 --- a/src/libffmpeg/libavutil/internal.h +++ b/src/libffmpeg/libavutil/internal.h @@ -26,6 +26,94 @@ #ifndef INTERNAL_H #define INTERNAL_H +#ifndef attribute_used +#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0) +# define attribute_used __attribute__((used)) +#else +# define attribute_used +#endif +#endif + +#ifndef attribute_unused +#if defined(__GNUC__) +# define attribute_unused __attribute__((unused)) +#else +# define attribute_unused +#endif +#endif + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +#ifndef PRId64 +#define PRId64 "lld" +#endif + +#ifndef PRIu64 +#define PRIu64 "llu" +#endif + +#ifndef PRIx64 +#define PRIx64 "llx" +#endif + +#ifndef PRIX64 +#define PRIX64 "llX" +#endif + +#ifndef PRId32 +#define PRId32 "d" +#endif + +#ifndef PRIdFAST16 +#define PRIdFAST16 PRId32 +#endif + +#ifndef PRIdFAST32 +#define PRIdFAST32 PRId32 +#endif + +#ifndef INT16_MIN +#define INT16_MIN (-0x7fff-1) +#endif + +#ifndef INT16_MAX +#define INT16_MAX 0x7fff +#endif + +#ifndef INT32_MIN +#define INT32_MIN (-0x7fffffff-1) +#endif + +#ifndef INT32_MAX +#define INT32_MAX 0x7fffffff +#endif + +#ifndef UINT32_MAX +#define UINT32_MAX 0xffffffff +#endif + +#ifndef INT64_MIN +#define INT64_MIN (-0x7fffffffffffffffLL-1) +#endif + +#ifndef INT64_MAX +#define INT64_MAX INT64_C(9223372036854775807) +#endif + +#ifndef UINT64_MAX +#define UINT64_MAX UINT64_C(0xFFFFFFFFFFFFFFFF) +#endif + +#ifndef INT_BIT +# if INT_MAX != 2147483647 +# define INT_BIT 64 +# else +# define INT_BIT 32 +# endif +#endif + #if ( defined(__PIC__) || defined(__pic__) ) && ! defined(PIC) # define PIC #endif @@ -34,6 +122,7 @@ # define ENODATA 61 #endif +#include "intreadwrite.h" #include "bswap.h" #include <stddef.h> @@ -136,7 +225,7 @@ extern const uint32_t ff_inverse[256]; # define FASTDIV(a,b) ((a)/(b)) #endif -extern FF_IMPORT_ATTR const uint8_t ff_sqrt_tab[128]; +extern const uint8_t ff_sqrt_tab[128]; static inline int ff_sqrt(int a) { @@ -216,7 +305,7 @@ if((y)<(x)){\ /* XXX: add ISOC specific test to avoid specific BSD testing. */ /* better than nothing implementation. */ /* btw, rintf() is existing on fbsd too -- alex */ -static always_inline long int lrintf(float x) +static av_always_inline long int lrintf(float x) { #ifdef __MINGW32__ # ifdef ARCH_X86_32 |