diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-03-08 14:11:52 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-03-08 14:11:52 +0000 |
commit | 3e6ea60cd46d69cfb663d52c7853751d456210ae (patch) | |
tree | 5fcee38b900267b50bc5f99203a0286049d5d81d /src/libspudec/bswap.h | |
parent | 33b1749ad986f19df42e61be870cb7953db46ac6 (diff) | |
download | xine-lib-3e6ea60cd46d69cfb663d52c7853751d456210ae.tar.gz xine-lib-3e6ea60cd46d69cfb663d52c7853751d456210ae.tar.bz2 |
first step towards fixing the DVD menu highlighting problems
The problem arises because of inconsistent usage of libdvdread's functions regarding
NAV packet reading: libspudec and the dxr3 spu decoder use some of these functions,
but they used to have private copies of the relevant files of libdvdread. These do
not work any more now, since the internal layout of NAV packets in libdvdread
changed lately. So we should always use the functions from current libdvdread.
Please note that highlights might not work yet.
The next step will be to sync libdvdnav. Stay tuned.
CVS patchset: 4371
CVS date: 2003/03/08 14:11:52
Diffstat (limited to 'src/libspudec/bswap.h')
-rw-r--r-- | src/libspudec/bswap.h | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/src/libspudec/bswap.h b/src/libspudec/bswap.h deleted file mode 100644 index 23e2863b4..000000000 --- a/src/libspudec/bswap.h +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Copyright (C) 2000, 2001 Billy Biggs <vektor@dumbterm.net>, - * Håkan Hjort <d95hjort@dtek.chalmers.se> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef BSWAP_H_INCLUDED -#define BSWAP_H_INCLUDED - -#include <config.h> - -#if defined(WORDS_BIGENDIAN) -/* All bigendian systems are fine, just ignore the swaps. */ -#define B2N_16(x) (void)(x) -#define B2N_32(x) (void)(x) -#define B2N_64(x) (void)(x) - -#else - -#if defined(__linux__) -#include <byteswap.h> -#define B2N_16(x) x = bswap_16(x) -#define B2N_32(x) x = bswap_32(x) -#define B2N_64(x) x = bswap_64(x) - -#elif defined(__NetBSD__) -#include <sys/endian.h> -#define B2N_16(x) BE16TOH(x) -#define B2N_32(x) BE32TOH(x) -#define B2N_64(x) BE64TOH(x) - -#elif defined(__OpenBSD__) -#include <sys/endian.h> -#define B2N_16(x) x = swap16(x) -#define B2N_32(x) x = swap32(x) -#define B2N_64(x) x = swap64(x) - -/* This is a slow but portable implementation, it has multiple evaluation - * problems so beware. - * FreeBSD and Solaris don't have <byteswap.h> or any other such - * functionality! - */ - -#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) -#define B2N_16(x) \ - x = ((((x) & 0xff00) >> 8) | \ - (((x) & 0x00ff) << 8)) -#define B2N_32(x) \ - x = ((((x) & 0xff000000) >> 24) | \ - (((x) & 0x00ff0000) >> 8) | \ - (((x) & 0x0000ff00) << 8) | \ - (((x) & 0x000000ff) << 24)) -#define B2N_64(x) \ - x = ((((x) & 0xff00000000000000) >> 56) | \ - (((x) & 0x00ff000000000000) >> 40) | \ - (((x) & 0x0000ff0000000000) >> 24) | \ - (((x) & 0x000000ff00000000) >> 8) | \ - (((x) & 0x00000000ff000000) << 8) | \ - (((x) & 0x0000000000ff0000) << 24) | \ - (((x) & 0x000000000000ff00) << 40) | \ - (((x) & 0x00000000000000ff) << 56)) - -#else - -/* If there isn't a header provided with your system with this functionality - * add the relevant || define( ) to the portable implementation above. - */ -#error "You need to add endian swap macros for you're system" - -#endif - -#endif /* WORDS_BIGENDIAN */ - -#endif /* BSWAP_H_INCLUDED */ |