mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-25 04:30:02 +00:00
better logic for bswap
Originally committed as revision 596 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
d75dd1ca4c
commit
d503f97038
@ -50,6 +50,8 @@ typedef UINT16 uint16_t;
|
|||||||
typedef INT16 int16_t;
|
typedef INT16 int16_t;
|
||||||
typedef UINT32 uint32_t;
|
typedef UINT32 uint32_t;
|
||||||
typedef INT32 int32_t;
|
typedef INT32 int32_t;
|
||||||
|
typedef UINT64 uint64_t;
|
||||||
|
typedef INT64 int64_t;
|
||||||
|
|
||||||
#ifndef __MINGW32__
|
#ifndef __MINGW32__
|
||||||
#define INT64_C(c) (c ## i64)
|
#define INT64_C(c) (c ## i64)
|
||||||
@ -69,22 +71,15 @@ typedef INT32 int32_t;
|
|||||||
#define DEBUG
|
#define DEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// code from bits/byteswap.h (C) 1997, 1998 Free Software Foundation, Inc.
|
|
||||||
#define bswap_32(x) \
|
|
||||||
((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
|
|
||||||
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
|
|
||||||
#define be2me_32(x) bswap_32(x)
|
|
||||||
|
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
|
|
||||||
#ifndef __MINGW32__
|
#ifdef HAVE_AV_CONFIG_H
|
||||||
/* no config.h with VC */
|
|
||||||
#define CONFIG_ENCODERS 1
|
|
||||||
#define CONFIG_DECODERS 1
|
|
||||||
#define CONFIG_AC3 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
#define MANGLE(a) "_" #a
|
||||||
|
|
||||||
|
#endif /* HAVE_AV_CONFIG_H */
|
||||||
|
|
||||||
|
#else /* CONFIG_WIN32 */
|
||||||
|
|
||||||
/* unix */
|
/* unix */
|
||||||
|
|
||||||
@ -114,20 +109,23 @@ typedef signed long long INT64;
|
|||||||
#define UINT64_C(c) (c ## ULL)
|
#define UINT64_C(c) (c ## ULL)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "bswap.h"
|
|
||||||
|
|
||||||
#ifdef USE_FASTMEMCPY
|
#ifdef USE_FASTMEMCPY
|
||||||
#include "fastmemcpy.h"
|
#include "fastmemcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define MANGLE(a) #a
|
||||||
|
|
||||||
#endif /* HAVE_AV_CONFIG_H */
|
#endif /* HAVE_AV_CONFIG_H */
|
||||||
|
|
||||||
#endif /* !CONFIG_WIN32 */
|
#endif /* !CONFIG_WIN32 */
|
||||||
|
|
||||||
|
|
||||||
/* debug stuff */
|
|
||||||
#ifdef HAVE_AV_CONFIG_H
|
#ifdef HAVE_AV_CONFIG_H
|
||||||
|
|
||||||
|
#include "bswap.h"
|
||||||
|
|
||||||
|
/* debug stuff */
|
||||||
|
|
||||||
#ifndef DEBUG
|
#ifndef DEBUG
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user