diff --git a/libs/getbits/gstgetbits.h b/libs/getbits/gstgetbits.h index 7e56796c39..79b29f3de0 100644 --- a/libs/getbits/gstgetbits.h +++ b/libs/getbits/gstgetbits.h @@ -17,22 +17,7 @@ #include #endif /* HAVE_LIBSSE */ -#ifdef WORDS_BIGENDIAN -# define swab32(x) (x) -#else -# if defined (__i386__) -# define swab32(x) __i386_swab32(x) - static inline const unsigned long __i386_swab32(unsigned long x) - { - __asm__("bswap %0" : "=r" (x) : "0" (x)); - return x; - } -# else -# define swab32(x)\ - ((((guint8*)&x)[0] << 24) | (((guint8*)&x)[1] << 16) | \ - (((guint8*)&x)[2] << 8) | (((guint8*)&x)[3])) -# endif -#endif +#define swab32(x) GUINT32_FROM_BE(x) typedef struct _gst_getbits_t gst_getbits_t; typedef void (*GstGetbitsCallback) (gst_getbits_t *gb, void *data); diff --git a/libs/getbits/gstgetbits_inl.h b/libs/getbits/gstgetbits_inl.h index 2e025c7aaa..0fcbc3b590 100644 --- a/libs/getbits/gstgetbits_inl.h +++ b/libs/getbits/gstgetbits_inl.h @@ -73,22 +73,7 @@ #define checklength2(src, dst) #endif -#ifdef WORDS_BIGENDIAN -# define swab32(x) (x) -#else -# if defined (__i386__) -# define swab32(x) __i386_swab32(x) - static inline const guint32 __i386_swab32(guint32 x) - { - __asm__("bswap %0" : "=r" (x) : "0" (x)); - return x; - } -# else -# define swab32(x)\ - ((((guint8*)&x)[0] << 24) | (((guint8*)&x)[1] << 16) | \ - (((guint8*)&x)[2] << 8) | (((guint8*)&x)[3])) -# endif -#endif +#define swab32(x) GUINT32_FROM_BE(x) /* External declarations for bitstream i/o operations. */ extern unsigned long gst_getbits_nBitMask[];