diff options
author | Robin KAY <komadori@users.sourceforge.net> | 2002-10-06 03:48:13 +0000 |
---|---|---|
committer | Robin KAY <komadori@users.sourceforge.net> | 2002-10-06 03:48:13 +0000 |
commit | 24ed40652239b8e3841803e473b31736b4d04bca (patch) | |
tree | 32858182f1bbd66458e4467608cdad8efe6a9b09 /src/demuxers | |
parent | 08d0890139902ec1a227d2bd429585534fa6ff24 (diff) | |
download | xine-lib-24ed40652239b8e3841803e473b31736b4d04bca.tar.gz xine-lib-24ed40652239b8e3841803e473b31736b4d04bca.tar.bz2 |
Workaround for code generation bug in gcc on SPARC. Mike's endian macros now moved to bswap.h
CVS patchset: 2794
CVS date: 2002/10/06 03:48:13
Diffstat (limited to 'src/demuxers')
-rw-r--r-- | src/demuxers/demux_aiff.c | 5 | ||||
-rw-r--r-- | src/demuxers/demux_film.c | 5 | ||||
-rw-r--r-- | src/demuxers/demux_fli.c | 5 | ||||
-rw-r--r-- | src/demuxers/demux_idcin.c | 5 | ||||
-rw-r--r-- | src/demuxers/demux_mpeg.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_mpgaudio.c | 6 | ||||
-rw-r--r-- | src/demuxers/demux_qt.c | 7 | ||||
-rw-r--r-- | src/demuxers/demux_real.c | 5 | ||||
-rw-r--r-- | src/demuxers/demux_roq.c | 5 | ||||
-rw-r--r-- | src/demuxers/demux_smjpeg.c | 5 | ||||
-rw-r--r-- | src/demuxers/demux_snd.c | 5 | ||||
-rw-r--r-- | src/demuxers/demux_voc.c | 5 | ||||
-rw-r--r-- | src/demuxers/demux_vqa.c | 7 | ||||
-rw-r--r-- | src/demuxers/demux_wav.c | 5 | ||||
-rw-r--r-- | src/demuxers/demux_wc3movie.c | 7 |
15 files changed, 18 insertions, 63 deletions
diff --git a/src/demuxers/demux_aiff.c b/src/demuxers/demux_aiff.c index f5b0e6112..593f4cae0 100644 --- a/src/demuxers/demux_aiff.c +++ b/src/demuxers/demux_aiff.c @@ -19,7 +19,7 @@ * * AIFF File Demuxer by Mike Melanson (melanson@pcisys.net) * - * $Id: demux_aiff.c,v 1.9 2002/10/05 21:09:18 komadori Exp $ + * $Id: demux_aiff.c,v 1.10 2002/10/06 03:48:13 komadori Exp $ * */ @@ -41,9 +41,6 @@ #include "buffer.h" #include "bswap.h" -#define BE_16(x) (be2me_16(*(unsigned short *)(x))) -#define BE_32(x) (be2me_32(*(unsigned int *)(x))) - #define FOURCC_TAG( ch0, ch1, ch2, ch3 ) \ ( (long)(unsigned char)(ch3) | \ ( (long)(unsigned char)(ch2) << 8 ) | \ diff --git a/src/demuxers/demux_film.c b/src/demuxers/demux_film.c index 6ee537650..c90af8828 100644 --- a/src/demuxers/demux_film.c +++ b/src/demuxers/demux_film.c @@ -21,7 +21,7 @@ * For more information on the FILM file format, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_film.c,v 1.31 2002/10/05 21:09:18 komadori Exp $ + * $Id: demux_film.c,v 1.32 2002/10/06 03:48:13 komadori Exp $ */ #ifdef HAVE_CONFIG_H @@ -41,9 +41,6 @@ #include "demux.h" #include "bswap.h" -#define BE_16(x) (be2me_16(*(unsigned short *)(x))) -#define BE_32(x) (be2me_32(*(unsigned int *)(x))) - #define FOURCC_TAG( ch0, ch1, ch2, ch3 ) \ ( (long)(unsigned char)(ch3) | ( (long)(unsigned char)(ch2) << 8 ) | \ ( (long)(unsigned char)(ch1) << 16 ) | ( (long)(unsigned char)(ch0) << 24 ) ) diff --git a/src/demuxers/demux_fli.c b/src/demuxers/demux_fli.c index 946e88d2b..48e5c32a0 100644 --- a/src/demuxers/demux_fli.c +++ b/src/demuxers/demux_fli.c @@ -22,7 +22,7 @@ * avoid while programming a FLI decoder, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_fli.c,v 1.14 2002/10/06 02:35:08 tmmm Exp $ + * $Id: demux_fli.c,v 1.15 2002/10/06 03:48:13 komadori Exp $ */ #ifdef HAVE_CONFIG_H @@ -42,9 +42,6 @@ #include "demux.h" #include "bswap.h" -#define LE_16(x) (le2me_16(*(unsigned short *)(x))) -#define LE_32(x) (le2me_32(*(unsigned int *)(x))) - #define VALID_ENDS "fli,flc" #define FLI_HEADER_SIZE 128 diff --git a/src/demuxers/demux_idcin.c b/src/demuxers/demux_idcin.c index 309073b75..217c5faba 100644 --- a/src/demuxers/demux_idcin.c +++ b/src/demuxers/demux_idcin.c @@ -63,7 +63,7 @@ * - if any bytes exceed 63, do not shift the bytes at all before * transmitting them to the video decoder * - * $Id: demux_idcin.c,v 1.14 2002/10/06 02:35:08 tmmm Exp $ + * $Id: demux_idcin.c,v 1.15 2002/10/06 03:48:13 komadori Exp $ */ #ifdef HAVE_CONFIG_H @@ -83,9 +83,6 @@ #include "demux.h" #include "bswap.h" -#define LE_16(x) (le2me_16(*(unsigned short *)(x))) -#define LE_32(x) (le2me_32(*(unsigned int *)(x))) - #define VALID_ENDS "cin" #define IDCIN_HEADER_SIZE 20 #define HUFFMAN_TABLE_SIZE 65536 diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c index 35ab025c1..fd392b80c 100644 --- a/src/demuxers/demux_mpeg.c +++ b/src/demuxers/demux_mpeg.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpeg.c,v 1.79 2002/10/06 01:37:27 tmmm Exp $ + * $Id: demux_mpeg.c,v 1.80 2002/10/06 03:48:13 komadori Exp $ * * demultiplexer for mpeg 1/2 program streams * reads streams of variable blocksizes @@ -89,8 +89,6 @@ typedef struct demux_mpeg_s { */ #include "bswap.h" -#define BE_16(x) (be2me_16(*(uint16_t *)(x))) -#define BE_32(x) (be2me_32(*(uint32_t *)(x))) #define QT_ATOM( ch0, ch1, ch2, ch3 ) \ ( (long)(unsigned char)(ch3) | ( (long)(unsigned char)(ch2) << 8 ) | \ ( (long)(unsigned char)(ch1) << 16 ) | ( (long)(unsigned char)(ch0) << 24 ) ) diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c index 7a490518c..246aae632 100644 --- a/src/demuxers/demux_mpgaudio.c +++ b/src/demuxers/demux_mpgaudio.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpgaudio.c,v 1.65 2002/10/05 21:09:18 komadori Exp $ + * $Id: demux_mpgaudio.c,v 1.66 2002/10/06 03:48:13 komadori Exp $ * * demultiplexer for mpeg audio (i.e. mp3) streams * @@ -556,7 +556,7 @@ static int demux_mpgaudio_open(demux_plugin_t *this_gen, if (input->read(input, riff_check, 4) != 4) return DEMUX_CANNOT_HANDLE; /* head gets to be a generic variable in this case */ - head = le2me_32(*(unsigned int *)&riff_check[0]); + head = LE_32(&riff_check[0]); /* skip over the chunk and the 'data' tag and length */ input->seek(input, head + 8, SEEK_CUR); @@ -567,7 +567,7 @@ static int demux_mpgaudio_open(demux_plugin_t *this_gen, return DEMUX_CANNOT_HANDLE; for (i = 0; i < RIFF_CHECK_BYTES - 4; i++) { - head = be2me_32(*(unsigned int *)&riff_check[i]); + head = BE_32(&riff_check[i]); #ifdef LOG printf ("demux_mpgaudio: **** mpg123: checking %08X\n", head); #endif diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index b557c9959..edb4f8b36 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -30,7 +30,7 @@ * build_frame_table * free_qt_info * - * $Id: demux_qt.c,v 1.93 2002/10/06 02:27:53 tmmm Exp $ + * $Id: demux_qt.c,v 1.94 2002/10/06 03:48:13 komadori Exp $ * */ @@ -57,9 +57,6 @@ typedef unsigned int qt_atom; -#define BE_16(x) (be2me_16(*(uint16_t *)(x))) -#define BE_32(x) (be2me_32(*(uint32_t *)(x))) - #define QT_ATOM( ch0, ch1, ch2, ch3 ) \ ( (long)(unsigned char)(ch3) | ( (long)(unsigned char)(ch2) << 8 ) | \ ( (long)(unsigned char)(ch1) << 16 ) | ( (long)(unsigned char)(ch0) << 24 ) ) @@ -572,7 +569,7 @@ static qt_error parse_trak_atom(qt_sample_table *sample_table, BE_16(&trak_atom[i + 0x2E]); } sample_table->media_description.video.codec_format = - *(uint32_t *)&trak_atom[i + 0x10]; + ME_32(&trak_atom[i + 0x10]); /* figure out the palette situation */ color_depth = trak_atom[i + 0x5F]; diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index 9d76dc783..53392314d 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -21,7 +21,7 @@ * For more information regarding the Real file format, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_real.c,v 1.2 2002/10/06 02:35:08 tmmm Exp $ + * $Id: demux_real.c,v 1.3 2002/10/06 03:48:13 komadori Exp $ */ #ifdef HAVE_CONFIG_H @@ -41,9 +41,6 @@ #include "demux.h" #include "bswap.h" -#define BE_16(x) (be2me_16(*(uint16_t *)(x))) -#define BE_32(x) (be2me_32(*(uint32_t *)(x))) - #define FOURCC_TAG( ch0, ch1, ch2, ch3 ) \ ( (long)(unsigned char)(ch3) | \ ( (long)(unsigned char)(ch2) << 8 ) | \ diff --git a/src/demuxers/demux_roq.c b/src/demuxers/demux_roq.c index f3cdf6b82..ebebc17de 100644 --- a/src/demuxers/demux_roq.c +++ b/src/demuxers/demux_roq.c @@ -21,7 +21,7 @@ * For more information regarding the RoQ file format, visit: * http://www.csse.monash.edu.au/~timf/ * - * $Id: demux_roq.c,v 1.18 2002/10/06 02:35:08 tmmm Exp $ + * $Id: demux_roq.c,v 1.19 2002/10/06 03:48:13 komadori Exp $ */ #ifdef HAVE_CONFIG_H @@ -41,9 +41,6 @@ #include "demux.h" #include "bswap.h" -#define LE_16(x) (le2me_16(*(unsigned short *)(x))) -#define LE_32(x) (le2me_32(*(unsigned int *)(x))) - #define RoQ_MAGIC_NUMBER 0x1084 #define RoQ_CHUNK_PREAMBLE_SIZE 8 #define RoQ_AUDIO_SAMPLE_RATE 22050 diff --git a/src/demuxers/demux_smjpeg.c b/src/demuxers/demux_smjpeg.c index 547222b1b..1619d36a3 100644 --- a/src/demuxers/demux_smjpeg.c +++ b/src/demuxers/demux_smjpeg.c @@ -21,7 +21,7 @@ * For more information on the SMJPEG file format, visit: * http://www.lokigames.com/development/smjpeg.php3 * - * $Id: demux_smjpeg.c,v 1.17 2002/10/05 21:09:18 komadori Exp $ + * $Id: demux_smjpeg.c,v 1.18 2002/10/06 03:48:13 komadori Exp $ */ #ifdef HAVE_CONFIG_H @@ -41,9 +41,6 @@ #include "demux.h" #include "bswap.h" -#define BE_16(x) (be2me_16(*(unsigned short *)(x))) -#define BE_32(x) (be2me_32(*(unsigned int *)(x))) - #define FOURCC_TAG( ch0, ch1, ch2, ch3 ) \ ( (long)(unsigned char)(ch3) | ( (long)(unsigned char)(ch2) << 8 ) | \ ( (long)(unsigned char)(ch1) << 16 ) | ( (long)(unsigned char)(ch0) << 24 ) ) diff --git a/src/demuxers/demux_snd.c b/src/demuxers/demux_snd.c index 4336cda8e..d90099463 100644 --- a/src/demuxers/demux_snd.c +++ b/src/demuxers/demux_snd.c @@ -19,7 +19,7 @@ * * SND/AU File Demuxer by Mike Melanson (melanson@pcisys.net) * - * $Id: demux_snd.c,v 1.10 2002/10/05 21:09:18 komadori Exp $ + * $Id: demux_snd.c,v 1.11 2002/10/06 03:48:13 komadori Exp $ * */ @@ -41,9 +41,6 @@ #include "buffer.h" #include "bswap.h" -#define BE_16(x) (be2me_16(*(unsigned short *)(x))) -#define BE_32(x) (be2me_32(*(unsigned int *)(x))) - #define SND_HEADER_SIZE 24 #define PCM_BLOCK_ALIGN 1024 /* this is the big-endian hex value '.snd' */ diff --git a/src/demuxers/demux_voc.c b/src/demuxers/demux_voc.c index 099a64524..0d9e19c68 100644 --- a/src/demuxers/demux_voc.c +++ b/src/demuxers/demux_voc.c @@ -23,7 +23,7 @@ * It will only play that block if it is PCM data. More variations will be * supported as they are encountered. * - * $Id: demux_voc.c,v 1.10 2002/10/05 21:09:18 komadori Exp $ + * $Id: demux_voc.c,v 1.11 2002/10/06 03:48:13 komadori Exp $ * */ @@ -45,9 +45,6 @@ #include "buffer.h" #include "bswap.h" -#define LE_16(x) (le2me_16(*(uint16_t *)(x))) -#define LE_32(x) (le2me_32(*(uint32_t *)(x))) - #define VALID_ENDS "voc" #define PCM_BLOCK_ALIGN 1024 #define VOC_HEADER_SIZE 0x1A diff --git a/src/demuxers/demux_vqa.c b/src/demuxers/demux_vqa.c index 563cfba20..5af16b6f0 100644 --- a/src/demuxers/demux_vqa.c +++ b/src/demuxers/demux_vqa.c @@ -27,7 +27,7 @@ * block needs information from the previous audio block in order to be * decoded, thus making random seeking difficult. * - * $Id: demux_vqa.c,v 1.11 2002/10/06 02:35:08 tmmm Exp $ + * $Id: demux_vqa.c,v 1.12 2002/10/06 03:48:13 komadori Exp $ */ #ifdef HAVE_CONFIG_H @@ -47,11 +47,6 @@ #include "demux.h" #include "bswap.h" -#define BE_16(x) (be2me_16(*(unsigned short *)(x))) -#define BE_32(x) (be2me_32(*(unsigned int *)(x))) -#define LE_16(x) (le2me_16(*(unsigned short *)(x))) -#define LE_32(x) (le2me_32(*(unsigned int *)(x))) - #define FOURCC_TAG( ch0, ch1, ch2, ch3 ) \ ( (long)(unsigned char)(ch3) | \ ( (long)(unsigned char)(ch2) << 8 ) | \ diff --git a/src/demuxers/demux_wav.c b/src/demuxers/demux_wav.c index 4a6b379f2..836a0562b 100644 --- a/src/demuxers/demux_wav.c +++ b/src/demuxers/demux_wav.c @@ -20,7 +20,7 @@ * MS WAV File Demuxer by Mike Melanson (melanson@pcisys.net) * based on WAV specs that are available far and wide * - * $Id: demux_wav.c,v 1.16 2002/10/05 21:09:18 komadori Exp $ + * $Id: demux_wav.c,v 1.17 2002/10/06 03:48:13 komadori Exp $ * */ @@ -42,9 +42,6 @@ #include "buffer.h" #include "bswap.h" -#define LE_16(x) (le2me_16(*(uint16_t *)(x))) -#define LE_32(x) (le2me_32(*(uint32_t *)(x))) - #define VALID_ENDS "wav" #define WAV_SIGNATURE_SIZE 16 /* this is the hex value for 'data' */ diff --git a/src/demuxers/demux_wc3movie.c b/src/demuxers/demux_wc3movie.c index 71fe1cf70..5b19de52d 100644 --- a/src/demuxers/demux_wc3movie.c +++ b/src/demuxers/demux_wc3movie.c @@ -22,7 +22,7 @@ * For more information on the MVE file format, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_wc3movie.c,v 1.15 2002/10/05 21:09:18 komadori Exp $ + * $Id: demux_wc3movie.c,v 1.16 2002/10/06 03:48:13 komadori Exp $ */ #ifdef HAVE_CONFIG_H @@ -42,11 +42,6 @@ #include "demux.h" #include "bswap.h" -#define BE_16(x) (be2me_16(*(unsigned short *)(x))) -#define BE_32(x) (be2me_32(*(unsigned int *)(x))) -#define LE_16(x) (le2me_16(*(unsigned short *)(x))) -#define LE_32(x) (le2me_32(*(unsigned int *)(x))) - #define FOURCC_TAG( ch0, ch1, ch2, ch3 ) \ ( (long)(unsigned char)(ch3) | \ ( (long)(unsigned char)(ch2) << 8 ) | \ |