[XviD-devel] function of the "DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment)"

suxen_drol xvid-devel@xvid.org
Wed, 22 Jan 2003 00:29:57 +1100


On Tue, 21 Jan 2003 14:03:41 +0100 josse <josse11@epost.de> wrote:

> Hi,
> 
> What function have the
>     DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment)
> Macro in the porttab.h File
> 
> I implement the code to Analog Devices DSP and i dont no if i need the 
> macro of this platform.
> 
> Have anyone a idea

on many platforms there is a significant memory access
penalty for unaligned data. the purpose of the macro, as the name
suggests, is to DECLARE an ALIGNED MATRIX (array).

how alignment is performed is dependant upon the compiler. what compiler
are you using?


if you wish to ignore alignment, try the following:

#define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \
	type name[(sizex)*(sizey)]

-- pete; life is like a box of ammo