diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-08-19 09:07:56 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-08-19 09:07:56 +0000 |
commit | d130a78de5a2f10575da1d9603d84b3b2050d52e (patch) | |
tree | 00e4e602a83b3d3f18653dd9ec03936c7480f68c /dvdread/libdvdread_changes.diff | |
parent | 46afe7d1d271f865566fcb838d95e256c4b7637a (diff) | |
download | mpv-d130a78de5a2f10575da1d9603d84b3b2050d52e.tar.bz2 mpv-d130a78de5a2f10575da1d9603d84b3b2050d52e.tar.xz |
Replace dvdread bswap.h by something more sane for us.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24100 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dvdread/libdvdread_changes.diff')
-rw-r--r-- | dvdread/libdvdread_changes.diff | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/dvdread/libdvdread_changes.diff b/dvdread/libdvdread_changes.diff index 69862fd074..c7ee3dc1fa 100644 --- a/dvdread/libdvdread_changes.diff +++ b/dvdread/libdvdread_changes.diff @@ -1,53 +1,3 @@ ---- dvdread.orig/bswap.h 2007-08-16 09:18:58.000000000 +0200 -+++ dvdread/bswap.h 2007-08-16 09:19:02.000000000 +0200 -@@ -83,8 +87,46 @@ - #define B2N_32(x) x = OSSwapBigToHostConstInt32(x) - #define B2N_64(x) x = OSSwapBigToHostConstInt64(x) - -+#elif defined(ARCH_X86) -+inline static unsigned short bswap_16(unsigned short x) -+{ -+ __asm("xchgb %b0,%h0" : -+ "=q" (x) : -+ "0" (x)); -+ return x; -+} -+#define B2N_16(x) x = bswap_16(x) -+ -+inline static unsigned int bswap_32(unsigned int x) -+{ -+ __asm( -+#if __CPU__ != 386 -+ "bswap %0": -+ "=r" (x) : - #else --#if defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32) || defined(__BEOS__) || defined(__INTERIX) -+ "xchgb %b0,%h0\n" -+ " rorl $16,%0\n" -+ " xchgb %b0,%h0": -+ "=q" (x) : -+#endif -+ "0" (x)); -+ return x; -+} -+#define B2N_32(x) x = bswap_32(x) -+ -+inline static unsigned long long int bswap_64(unsigned long long int x) -+{ -+ register union { __extension__ uint64_t __ll; -+ uint32_t __l[2]; } __x; -+ asm("xchgl %0,%1": -+ "=r"(__x.__l[0]),"=r"(__x.__l[1]): -+ "0"(bswap_32((unsigned long)x)),"1"(bswap_32((unsigned long)(x>>32)))); -+ return __x.__ll; -+} -+#define B2N_64(x) x = bswap_64(x) -+ -+#else -+#if defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32) || defined(__BEOS__) || defined(__INTERIX) || defined(__CYGWIN__) - /* These systems don't have swap macros */ - #else - /* If there isn't a header provided with your system with this functionality --- dvdread.orig/dvd_reader.c 2007-08-06 13:34:37.000000000 +0200 +++ dvdread/dvd_reader.c 2007-08-06 13:35:19.000000000 +0200 @@ -39,9 +43,11 @@ |