--- portab.h 2002/11/23 22:00:43 1.37 +++ 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.37 2002/11/23 22:00:43 chl Exp $ + * $Id: portab.h,v 1.40 2002/12/28 13:53:08 edgomez Exp $ * ****************************************************************************/ @@ -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 @@ -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 */ /*****************************************************************************