summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2001-08-15 22:33:03 +0000
committerFabrice Bellard <fabrice@bellard.org>2001-08-15 22:33:03 +0000
commita74127c071fd46cdd40b9beca6721a9ca6338142 (patch)
treece84b21312cf30edc838cd5fbfba62ac21912b9b /libavcodec
parentd0a0b2483e7b62e0f72c3b60f0a5f24175d665ee (diff)
win32 fixes
Originally committed as revision 110 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/common.h33
-rw-r--r--libavcodec/i386/idct_mmx.c2
-rw-r--r--libavcodec/mjpeg.c17
-rw-r--r--libavcodec/mpeg12.c17
4 files changed, 34 insertions, 35 deletions
diff --git a/libavcodec/common.h b/libavcodec/common.h
index 920c4ebc2c..696ec5703d 100644
--- a/libavcodec/common.h
+++ b/libavcodec/common.h
@@ -4,7 +4,7 @@
#define FFMPEG_VERSION_INT 0x000405
#define FFMPEG_VERSION "0.4.5"
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
#define CONFIG_WIN32
#endif
@@ -43,6 +43,7 @@ typedef INT16 int16_t;
typedef UINT32 uint32_t;
typedef INT32 int32_t;
+#ifndef __MINGW32__
#define INT64_C(c) (c ## i64)
#define UINT64_C(c) (c ## i64)
@@ -56,6 +57,11 @@ typedef INT32 int32_t;
#pragma warning( disable : 4244 )
#pragma warning( disable : 4305 )
+#else
+#define INT64_C(c) (c ## LL)
+#define UINT64_C(c) (c ## ULL)
+#endif /* __MINGW32__ */
+
#define M_PI 3.14159265358979323846
#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
@@ -71,10 +77,13 @@ typedef INT32 int32_t;
#define snprintf _snprintf
+#ifndef __MINGW32__
+/* no config.h with VC */
#define CONFIG_ENCODERS 1
#define CONFIG_DECODERS 1
#define CONFIG_AC3 1
#define CONFIG_MPGLIB 1
+#endif
#else
@@ -112,15 +121,35 @@ typedef signed long long INT64;
#include "fastmemcpy.h"
#endif
+#endif /* HAVE_AV_CONFIG_H */
+
+#endif /* !CONFIG_WIN32 */
+
+/* debug stuff */
+#ifdef HAVE_AV_CONFIG_H
+
#ifndef DEBUG
#define NDEBUG
#endif
#include <assert.h>
-#endif /* HAVE_AV_CONFIG_H */
+/* dprintf macros */
+#if defined(CONFIG_WIN32) && !defined(__MINGW32__)
+
+inline void dprintf(const char* fmt,...) {}
+
+#else
+
+#ifdef DEBUG
+#define dprintf(fmt,args...) printf(fmt, ## args)
+#else
+#define dprintf(fmt,args...)
+#endif
#endif /* !CONFIG_WIN32 */
+#endif /* HAVE_AV_CONFIG_H */
+
/* bit output */
struct PutBitContext;
diff --git a/libavcodec/i386/idct_mmx.c b/libavcodec/i386/idct_mmx.c
index 9f093d1c3e..618c1cfdee 100644
--- a/libavcodec/i386/idct_mmx.c
+++ b/libavcodec/i386/idct_mmx.c
@@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <inttypes.h>
+#include "../common.h"
#include "mmx.h"
diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c
index 1103e11d04..08281a5014 100644
--- a/libavcodec/mjpeg.c
+++ b/libavcodec/mjpeg.c
@@ -16,6 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+//#define DEBUG
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
@@ -419,22 +420,6 @@ void mjpeg_encode_mb(MpegEncContext *s,
/******************************************/
/* decoding */
-//#define DEBUG
-
-#ifndef CONFIG_WIN32
-
-#ifdef DEBUG
-#define dprintf(fmt,args...) printf(fmt, ## args)
-#else
-#define dprintf(fmt,args...)
-#endif
-
-#else
-
-inline void dprintf(const char* fmt,...) {}
-
-#endif
-
/* compressed picture size */
#define PICTURE_BUFFER_SIZE 100000
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index f0aecd9803..758124eea6 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -16,28 +16,13 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+//#define DEBUG
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
#include "mpeg12data.h"
-//#define DEBUG
-
-#ifndef CONFIG_WIN32
-
-#ifdef DEBUG
-#define dprintf(fmt,args...) printf(fmt, ## args)
-#else
-#define dprintf(fmt,args...)
-#endif
-
-#else
-
-inline void dprintf(const char* fmt,...) {}
-
-#endif
-
/* Start codes. */
#define SEQ_END_CODE 0x000001b7
#define SEQ_START_CODE 0x000001b3