--- portab.h 2002/11/23 18:11:58 1.36 +++ portab.h 2002/12/28 13:53:08 1.40 @@ -5,7 +5,7 @@ * * Copyright(C) 2002 Michael Militzer * 2002 Peter Ross - * 2002 Edouard Gomez + * 2002 Edouard Gomez * * This file is part of XviD, a free MPEG-4 video encoder/decoder * @@ -52,7 +52,7 @@ * exception also makes it possible to release a modified version which * carries forward this exception. * - * $Id: portab.h,v 1.36 2002/11/23 18:11:58 chl Exp $ + * $Id: portab.h,v 1.40 2002/12/28 13:53:08 edgomez Exp $ * ****************************************************************************/ @@ -110,7 +110,7 @@ | Fallback when using gcc *---------------------------------------------------------------------------*/ -#elif defined(__GNUC__) || defined(__ICC__) +#elif defined(__GNUC__) || defined(__ICC) # define int8_t char # define uint8_t unsigned char @@ -140,7 +140,9 @@ # define CACHE_LINE 32 # define ptr_t uint64_t #else -# error Architecture not supported. +/* todo: fix cache_line 0 operation */ +# define CACHE_LINE 16 +# define ptr_t uint32_t #endif /***************************************************************************** @@ -210,7 +212,14 @@ | msvc unknown architecture *---------------------------------------------------------------------------*/ # else -# error Architecture not supported. +/* ANSI C version of BSWAP */ +#define BSWAP(x) \ + x = ((((x) & 0xff000000) >> 24) | \ + (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | \ + (((x) & 0x000000ff) << 24)) + +#define EMMS() # endif @@ -220,7 +229,7 @@ * GNU CC compiler stuff ****************************************************************************/ -#elif defined(__GNUC__) || defined(__ICC__) /* Compiler test */ +#elif defined(__GNUC__) || defined(__ICC) /* Compiler test */ /*---------------------------------------------------------------------------- | Common gcc stuff @@ -346,7 +355,14 @@ | XviD + gcc unsupported Architecture *---------------------------------------------------------------------------*/ # else -# error Architecture not supported. +/* ANSI C version of BSWAP */ +#define BSWAP(x) \ + x = ((((x) & 0xff000000) >> 24) | \ + (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | \ + (((x) & 0x000000ff) << 24)) + +#define EMMS() # endif /* Architecture checking */ /*****************************************************************************