--- trunk/xvidcore/src/portab.h 2002/03/25 20:01:54 68 +++ trunk/xvidcore/src/portab.h 2002/03/28 12:24:41 73 @@ -78,15 +78,19 @@ #endif #define CACHE_LINE 16 -#define CACHE_ALIGN __attribute__ ((__aligned__(CACHE_LINE))) - #if defined(LINUX) #include +#define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \ + type name##_storage[(sizex)*(sizey)+(alignment)-1]; \ + typedef type name##_sub[sizey]; \ + name##_sub * name = (void *) (((int32_t) name##_storage+(alignment)) & ~((int32_t)(alignment)-1)) + #else +#define CACHE_ALIGN __attribute__ ((__aligned__(CACHE_LINE))) #define int8_t char #define uint8_t unsigned char #define int16_t short