mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 20:19:55 +00:00
Use DECLARE_ALIGNED macro instead of gcc __attribute__.
Patch by Pavel Pavlov <pavel at summit-tech dot ca> Originally committed as revision 29348 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
This commit is contained in:
parent
51222d1041
commit
92db623584
@ -283,17 +283,17 @@ static unsigned char clip_table[768];
|
||||
|
||||
static SwsVector *sws_getConvVec(SwsVector *a, SwsVector *b);
|
||||
|
||||
static const uint8_t __attribute__((aligned(8))) dither_2x2_4[2][8]={
|
||||
DECLARE_ALIGNED(8, static const uint8_t, dither_2x2_4[2][8])={
|
||||
{ 1, 3, 1, 3, 1, 3, 1, 3, },
|
||||
{ 2, 0, 2, 0, 2, 0, 2, 0, },
|
||||
};
|
||||
|
||||
static const uint8_t __attribute__((aligned(8))) dither_2x2_8[2][8]={
|
||||
DECLARE_ALIGNED(8, static const uint8_t, dither_2x2_8[2][8])={
|
||||
{ 6, 2, 6, 2, 6, 2, 6, 2, },
|
||||
{ 0, 4, 0, 4, 0, 4, 0, 4, },
|
||||
};
|
||||
|
||||
const uint8_t __attribute__((aligned(8))) dither_8x8_32[8][8]={
|
||||
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_32[8][8])={
|
||||
{ 17, 9, 23, 15, 16, 8, 22, 14, },
|
||||
{ 5, 29, 3, 27, 4, 28, 2, 26, },
|
||||
{ 21, 13, 19, 11, 20, 12, 18, 10, },
|
||||
@ -305,7 +305,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_32[8][8]={
|
||||
};
|
||||
|
||||
#if 0
|
||||
const uint8_t __attribute__((aligned(8))) dither_8x8_64[8][8]={
|
||||
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_64[8][8])={
|
||||
{ 0, 48, 12, 60, 3, 51, 15, 63, },
|
||||
{ 32, 16, 44, 28, 35, 19, 47, 31, },
|
||||
{ 8, 56, 4, 52, 11, 59, 7, 55, },
|
||||
@ -317,7 +317,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_64[8][8]={
|
||||
};
|
||||
#endif
|
||||
|
||||
const uint8_t __attribute__((aligned(8))) dither_8x8_73[8][8]={
|
||||
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_73[8][8])={
|
||||
{ 0, 55, 14, 68, 3, 58, 17, 72, },
|
||||
{ 37, 18, 50, 32, 40, 22, 54, 35, },
|
||||
{ 9, 64, 5, 59, 13, 67, 8, 63, },
|
||||
@ -329,7 +329,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_73[8][8]={
|
||||
};
|
||||
|
||||
#if 0
|
||||
const uint8_t __attribute__((aligned(8))) dither_8x8_128[8][8]={
|
||||
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_128[8][8])={
|
||||
{ 68, 36, 92, 60, 66, 34, 90, 58, },
|
||||
{ 20, 116, 12, 108, 18, 114, 10, 106, },
|
||||
{ 84, 52, 76, 44, 82, 50, 74, 42, },
|
||||
@ -342,7 +342,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_128[8][8]={
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={
|
||||
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220[8][8])={
|
||||
{117, 62, 158, 103, 113, 58, 155, 100, },
|
||||
{ 34, 199, 21, 186, 31, 196, 17, 182, },
|
||||
{144, 89, 131, 76, 141, 86, 127, 72, },
|
||||
@ -354,7 +354,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={
|
||||
};
|
||||
#elif 1
|
||||
// tries to correct a gamma of 1.5
|
||||
const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={
|
||||
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220[8][8])={
|
||||
{ 0, 143, 18, 200, 2, 156, 25, 215, },
|
||||
{ 78, 28, 125, 64, 89, 36, 138, 74, },
|
||||
{ 10, 180, 3, 161, 16, 195, 8, 175, },
|
||||
@ -366,7 +366,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={
|
||||
};
|
||||
#elif 1
|
||||
// tries to correct a gamma of 2.0
|
||||
const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={
|
||||
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220[8][8])={
|
||||
{ 0, 124, 8, 193, 0, 140, 12, 213, },
|
||||
{ 55, 14, 104, 42, 66, 19, 119, 52, },
|
||||
{ 3, 168, 1, 145, 6, 187, 3, 162, },
|
||||
@ -378,7 +378,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={
|
||||
};
|
||||
#else
|
||||
// tries to correct a gamma of 2.5
|
||||
const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={
|
||||
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220[8][8])={
|
||||
{ 0, 107, 3, 187, 0, 125, 6, 212, },
|
||||
{ 39, 7, 86, 28, 49, 11, 102, 36, },
|
||||
{ 1, 158, 0, 131, 3, 180, 1, 151, },
|
||||
|
@ -166,26 +166,26 @@ typedef struct SwsContext{
|
||||
#define Y_TEMP "11*8+4*4*256*2+40"
|
||||
#define ALP_MMX_FILTER_OFFSET "11*8+4*4*256*2+48"
|
||||
|
||||
uint64_t redDither __attribute__((aligned(8)));
|
||||
uint64_t greenDither __attribute__((aligned(8)));
|
||||
uint64_t blueDither __attribute__((aligned(8)));
|
||||
DECLARE_ALIGNED(8, uint64_t, redDither);
|
||||
DECLARE_ALIGNED(8, uint64_t, greenDither);
|
||||
DECLARE_ALIGNED(8, uint64_t, blueDither);
|
||||
|
||||
uint64_t yCoeff __attribute__((aligned(8)));
|
||||
uint64_t vrCoeff __attribute__((aligned(8)));
|
||||
uint64_t ubCoeff __attribute__((aligned(8)));
|
||||
uint64_t vgCoeff __attribute__((aligned(8)));
|
||||
uint64_t ugCoeff __attribute__((aligned(8)));
|
||||
uint64_t yOffset __attribute__((aligned(8)));
|
||||
uint64_t uOffset __attribute__((aligned(8)));
|
||||
uint64_t vOffset __attribute__((aligned(8)));
|
||||
DECLARE_ALIGNED(8, uint64_t, yCoeff);
|
||||
DECLARE_ALIGNED(8, uint64_t, vrCoeff);
|
||||
DECLARE_ALIGNED(8, uint64_t, ubCoeff);
|
||||
DECLARE_ALIGNED(8, uint64_t, vgCoeff);
|
||||
DECLARE_ALIGNED(8, uint64_t, ugCoeff);
|
||||
DECLARE_ALIGNED(8, uint64_t, yOffset);
|
||||
DECLARE_ALIGNED(8, uint64_t, uOffset);
|
||||
DECLARE_ALIGNED(8, uint64_t, vOffset);
|
||||
int32_t lumMmxFilter[4*MAX_FILTER_SIZE];
|
||||
int32_t chrMmxFilter[4*MAX_FILTER_SIZE];
|
||||
int dstW;
|
||||
uint64_t esp __attribute__((aligned(8)));
|
||||
uint64_t vRounder __attribute__((aligned(8)));
|
||||
uint64_t u_temp __attribute__((aligned(8)));
|
||||
uint64_t v_temp __attribute__((aligned(8)));
|
||||
uint64_t y_temp __attribute__((aligned(8)));
|
||||
DECLARE_ALIGNED(8, uint64_t, esp);
|
||||
DECLARE_ALIGNED(8, uint64_t, vRounder);
|
||||
DECLARE_ALIGNED(8, uint64_t, u_temp);
|
||||
DECLARE_ALIGNED(8, uint64_t, v_temp);
|
||||
DECLARE_ALIGNED(8, uint64_t, y_temp);
|
||||
int32_t alpMmxFilter[4*MAX_FILTER_SIZE];
|
||||
|
||||
#if HAVE_ALTIVEC
|
||||
@ -200,21 +200,21 @@ typedef struct SwsContext{
|
||||
#endif
|
||||
|
||||
#if ARCH_BFIN
|
||||
uint32_t oy __attribute__((aligned(4)));
|
||||
uint32_t oc __attribute__((aligned(4)));
|
||||
uint32_t zero __attribute__((aligned(4)));
|
||||
uint32_t cy __attribute__((aligned(4)));
|
||||
uint32_t crv __attribute__((aligned(4)));
|
||||
uint32_t rmask __attribute__((aligned(4)));
|
||||
uint32_t cbu __attribute__((aligned(4)));
|
||||
uint32_t bmask __attribute__((aligned(4)));
|
||||
uint32_t cgu __attribute__((aligned(4)));
|
||||
uint32_t cgv __attribute__((aligned(4)));
|
||||
uint32_t gmask __attribute__((aligned(4)));
|
||||
DECLARE_ALIGNED(4, uint32_t, oy);
|
||||
DECLARE_ALIGNED(4, uint32_t, oc);
|
||||
DECLARE_ALIGNED(4, uint32_t, zero);
|
||||
DECLARE_ALIGNED(4, uint32_t, cy);
|
||||
DECLARE_ALIGNED(4, uint32_t, crv);
|
||||
DECLARE_ALIGNED(4, uint32_t, rmask);
|
||||
DECLARE_ALIGNED(4, uint32_t, cbu);
|
||||
DECLARE_ALIGNED(4, uint32_t, bmask);
|
||||
DECLARE_ALIGNED(4, uint32_t, cgu);
|
||||
DECLARE_ALIGNED(4, uint32_t, cgv);
|
||||
DECLARE_ALIGNED(4, uint32_t, gmask);
|
||||
#endif
|
||||
|
||||
#if HAVE_VIS
|
||||
uint64_t sparc_coeffs[10] __attribute__((aligned(8)));
|
||||
DECLARE_ALIGNED(8, uint64_t, sparc_coeffs[10]);
|
||||
#endif
|
||||
|
||||
/* function pointers for swScale() */
|
||||
|
Loading…
Reference in New Issue
Block a user