Mercurial > libavcodec.hg
comparison common.h @ 76:0b09bd08ef4b libavcodec
win32 fixes
author | glantau |
---|---|
date | Wed, 15 Aug 2001 22:33:03 +0000 |
parents | 2bb522261514 |
children | b0bdab6b8bc6 |
comparison
equal
deleted
inserted
replaced
75:bb7d6fe159ad | 76:0b09bd08ef4b |
---|---|
2 #define COMMON_H | 2 #define COMMON_H |
3 | 3 |
4 #define FFMPEG_VERSION_INT 0x000405 | 4 #define FFMPEG_VERSION_INT 0x000405 |
5 #define FFMPEG_VERSION "0.4.5" | 5 #define FFMPEG_VERSION "0.4.5" |
6 | 6 |
7 #ifdef WIN32 | 7 #if defined(WIN32) && !defined(__MINGW32__) |
8 #define CONFIG_WIN32 | 8 #define CONFIG_WIN32 |
9 #endif | 9 #endif |
10 | 10 |
11 #ifdef HAVE_AV_CONFIG_H | 11 #ifdef HAVE_AV_CONFIG_H |
12 /* only include the following when compiling package */ | 12 /* only include the following when compiling package */ |
41 typedef UINT16 uint16_t; | 41 typedef UINT16 uint16_t; |
42 typedef INT16 int16_t; | 42 typedef INT16 int16_t; |
43 typedef UINT32 uint32_t; | 43 typedef UINT32 uint32_t; |
44 typedef INT32 int32_t; | 44 typedef INT32 int32_t; |
45 | 45 |
46 #ifndef __MINGW32__ | |
46 #define INT64_C(c) (c ## i64) | 47 #define INT64_C(c) (c ## i64) |
47 #define UINT64_C(c) (c ## i64) | 48 #define UINT64_C(c) (c ## i64) |
48 | 49 |
49 #define inline __inline | 50 #define inline __inline |
50 | 51 |
54 warning C4305: 'argument' : truncation from 'const double' to 'float' | 55 warning C4305: 'argument' : truncation from 'const double' to 'float' |
55 */ | 56 */ |
56 #pragma warning( disable : 4244 ) | 57 #pragma warning( disable : 4244 ) |
57 #pragma warning( disable : 4305 ) | 58 #pragma warning( disable : 4305 ) |
58 | 59 |
60 #else | |
61 #define INT64_C(c) (c ## LL) | |
62 #define UINT64_C(c) (c ## ULL) | |
63 #endif /* __MINGW32__ */ | |
64 | |
59 #define M_PI 3.14159265358979323846 | 65 #define M_PI 3.14159265358979323846 |
60 #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ | 66 #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ |
61 | 67 |
62 #ifdef _DEBUG | 68 #ifdef _DEBUG |
63 #define DEBUG | 69 #define DEBUG |
69 (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) | 75 (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) |
70 #define be2me_32(x) bswap_32(x) | 76 #define be2me_32(x) bswap_32(x) |
71 | 77 |
72 #define snprintf _snprintf | 78 #define snprintf _snprintf |
73 | 79 |
80 #ifndef __MINGW32__ | |
81 /* no config.h with VC */ | |
74 #define CONFIG_ENCODERS 1 | 82 #define CONFIG_ENCODERS 1 |
75 #define CONFIG_DECODERS 1 | 83 #define CONFIG_DECODERS 1 |
76 #define CONFIG_AC3 1 | 84 #define CONFIG_AC3 1 |
77 #define CONFIG_MPGLIB 1 | 85 #define CONFIG_MPGLIB 1 |
86 #endif | |
78 | 87 |
79 #else | 88 #else |
80 | 89 |
81 /* unix */ | 90 /* unix */ |
82 | 91 |
110 | 119 |
111 #ifdef USE_FASTMEMCPY | 120 #ifdef USE_FASTMEMCPY |
112 #include "fastmemcpy.h" | 121 #include "fastmemcpy.h" |
113 #endif | 122 #endif |
114 | 123 |
124 #endif /* HAVE_AV_CONFIG_H */ | |
125 | |
126 #endif /* !CONFIG_WIN32 */ | |
127 | |
128 /* debug stuff */ | |
129 #ifdef HAVE_AV_CONFIG_H | |
130 | |
115 #ifndef DEBUG | 131 #ifndef DEBUG |
116 #define NDEBUG | 132 #define NDEBUG |
117 #endif | 133 #endif |
118 #include <assert.h> | 134 #include <assert.h> |
119 | 135 |
136 /* dprintf macros */ | |
137 #if defined(CONFIG_WIN32) && !defined(__MINGW32__) | |
138 | |
139 inline void dprintf(const char* fmt,...) {} | |
140 | |
141 #else | |
142 | |
143 #ifdef DEBUG | |
144 #define dprintf(fmt,args...) printf(fmt, ## args) | |
145 #else | |
146 #define dprintf(fmt,args...) | |
147 #endif | |
148 | |
149 #endif /* !CONFIG_WIN32 */ | |
150 | |
120 #endif /* HAVE_AV_CONFIG_H */ | 151 #endif /* HAVE_AV_CONFIG_H */ |
121 | |
122 #endif /* !CONFIG_WIN32 */ | |
123 | 152 |
124 /* bit output */ | 153 /* bit output */ |
125 | 154 |
126 struct PutBitContext; | 155 struct PutBitContext; |
127 | 156 |