Revision 92db6235

View differences:

libswscale/swscale.c
283 283

  
284 284
static SwsVector *sws_getConvVec(SwsVector *a, SwsVector *b);
285 285

  
286
static const uint8_t  __attribute__((aligned(8))) dither_2x2_4[2][8]={
286
DECLARE_ALIGNED(8, static const uint8_t, dither_2x2_4[2][8])={
287 287
{  1,   3,   1,   3,   1,   3,   1,   3, },
288 288
{  2,   0,   2,   0,   2,   0,   2,   0, },
289 289
};
290 290

  
291
static const uint8_t  __attribute__((aligned(8))) dither_2x2_8[2][8]={
291
DECLARE_ALIGNED(8, static const uint8_t, dither_2x2_8[2][8])={
292 292
{  6,   2,   6,   2,   6,   2,   6,   2, },
293 293
{  0,   4,   0,   4,   0,   4,   0,   4, },
294 294
};
295 295

  
296
const uint8_t  __attribute__((aligned(8))) dither_8x8_32[8][8]={
296
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_32[8][8])={
297 297
{ 17,   9,  23,  15,  16,   8,  22,  14, },
298 298
{  5,  29,   3,  27,   4,  28,   2,  26, },
299 299
{ 21,  13,  19,  11,  20,  12,  18,  10, },
......
305 305
};
306 306

  
307 307
#if 0
308
const uint8_t  __attribute__((aligned(8))) dither_8x8_64[8][8]={
308
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_64[8][8])={
309 309
{  0,  48,  12,  60,   3,  51,  15,  63, },
310 310
{ 32,  16,  44,  28,  35,  19,  47,  31, },
311 311
{  8,  56,   4,  52,  11,  59,   7,  55, },
......
317 317
};
318 318
#endif
319 319

  
320
const uint8_t  __attribute__((aligned(8))) dither_8x8_73[8][8]={
320
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_73[8][8])={
321 321
{  0,  55,  14,  68,   3,  58,  17,  72, },
322 322
{ 37,  18,  50,  32,  40,  22,  54,  35, },
323 323
{  9,  64,   5,  59,  13,  67,   8,  63, },
......
329 329
};
330 330

  
331 331
#if 0
332
const uint8_t  __attribute__((aligned(8))) dither_8x8_128[8][8]={
332
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_128[8][8])={
333 333
{ 68,  36,  92,  60,  66,  34,  90,  58, },
334 334
{ 20, 116,  12, 108,  18, 114,  10, 106, },
335 335
{ 84,  52,  76,  44,  82,  50,  74,  42, },
......
342 342
#endif
343 343

  
344 344
#if 1
345
const uint8_t  __attribute__((aligned(8))) dither_8x8_220[8][8]={
345
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220[8][8])={
346 346
{117,  62, 158, 103, 113,  58, 155, 100, },
347 347
{ 34, 199,  21, 186,  31, 196,  17, 182, },
348 348
{144,  89, 131,  76, 141,  86, 127,  72, },
......
354 354
};
355 355
#elif 1
356 356
// tries to correct a gamma of 1.5
357
const uint8_t  __attribute__((aligned(8))) dither_8x8_220[8][8]={
357
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220[8][8])={
358 358
{  0, 143,  18, 200,   2, 156,  25, 215, },
359 359
{ 78,  28, 125,  64,  89,  36, 138,  74, },
360 360
{ 10, 180,   3, 161,  16, 195,   8, 175, },
......
366 366
};
367 367
#elif 1
368 368
// tries to correct a gamma of 2.0
369
const uint8_t  __attribute__((aligned(8))) dither_8x8_220[8][8]={
369
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220[8][8])={
370 370
{  0, 124,   8, 193,   0, 140,  12, 213, },
371 371
{ 55,  14, 104,  42,  66,  19, 119,  52, },
372 372
{  3, 168,   1, 145,   6, 187,   3, 162, },
......
378 378
};
379 379
#else
380 380
// tries to correct a gamma of 2.5
381
const uint8_t  __attribute__((aligned(8))) dither_8x8_220[8][8]={
381
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220[8][8])={
382 382
{  0, 107,   3, 187,   0, 125,   6, 212, },
383 383
{ 39,   7,  86,  28,  49,  11, 102,  36, },
384 384
{  1, 158,   0, 131,   3, 180,   1, 151, },
libswscale/swscale_internal.h
166 166
#define Y_TEMP                "11*8+4*4*256*2+40"
167 167
#define ALP_MMX_FILTER_OFFSET "11*8+4*4*256*2+48"
168 168

  
169
    uint64_t redDither   __attribute__((aligned(8)));
170
    uint64_t greenDither __attribute__((aligned(8)));
171
    uint64_t blueDither  __attribute__((aligned(8)));
172

  
173
    uint64_t yCoeff      __attribute__((aligned(8)));
174
    uint64_t vrCoeff     __attribute__((aligned(8)));
175
    uint64_t ubCoeff     __attribute__((aligned(8)));
176
    uint64_t vgCoeff     __attribute__((aligned(8)));
177
    uint64_t ugCoeff     __attribute__((aligned(8)));
178
    uint64_t yOffset     __attribute__((aligned(8)));
179
    uint64_t uOffset     __attribute__((aligned(8)));
180
    uint64_t vOffset     __attribute__((aligned(8)));
169
    DECLARE_ALIGNED(8, uint64_t, redDither);
170
    DECLARE_ALIGNED(8, uint64_t, greenDither);
171
    DECLARE_ALIGNED(8, uint64_t, blueDither);
172

  
173
    DECLARE_ALIGNED(8, uint64_t, yCoeff);
174
    DECLARE_ALIGNED(8, uint64_t, vrCoeff);
175
    DECLARE_ALIGNED(8, uint64_t, ubCoeff);
176
    DECLARE_ALIGNED(8, uint64_t, vgCoeff);
177
    DECLARE_ALIGNED(8, uint64_t, ugCoeff);
178
    DECLARE_ALIGNED(8, uint64_t, yOffset);
179
    DECLARE_ALIGNED(8, uint64_t, uOffset);
180
    DECLARE_ALIGNED(8, uint64_t, vOffset);
181 181
    int32_t  lumMmxFilter[4*MAX_FILTER_SIZE];
182 182
    int32_t  chrMmxFilter[4*MAX_FILTER_SIZE];
183 183
    int dstW;
184
    uint64_t esp          __attribute__((aligned(8)));
185
    uint64_t vRounder     __attribute__((aligned(8)));
186
    uint64_t u_temp       __attribute__((aligned(8)));
187
    uint64_t v_temp       __attribute__((aligned(8)));
188
    uint64_t y_temp       __attribute__((aligned(8)));
184
    DECLARE_ALIGNED(8, uint64_t, esp);
185
    DECLARE_ALIGNED(8, uint64_t, vRounder);
186
    DECLARE_ALIGNED(8, uint64_t, u_temp);
187
    DECLARE_ALIGNED(8, uint64_t, v_temp);
188
    DECLARE_ALIGNED(8, uint64_t, y_temp);
189 189
    int32_t  alpMmxFilter[4*MAX_FILTER_SIZE];
190 190

  
191 191
#if HAVE_ALTIVEC
......
200 200
#endif
201 201

  
202 202
#if ARCH_BFIN
203
    uint32_t oy           __attribute__((aligned(4)));
204
    uint32_t oc           __attribute__((aligned(4)));
205
    uint32_t zero         __attribute__((aligned(4)));
206
    uint32_t cy           __attribute__((aligned(4)));
207
    uint32_t crv          __attribute__((aligned(4)));
208
    uint32_t rmask        __attribute__((aligned(4)));
209
    uint32_t cbu          __attribute__((aligned(4)));
210
    uint32_t bmask        __attribute__((aligned(4)));
211
    uint32_t cgu          __attribute__((aligned(4)));
212
    uint32_t cgv          __attribute__((aligned(4)));
213
    uint32_t gmask        __attribute__((aligned(4)));
203
    DECLARE_ALIGNED(4, uint32_t, oy);
204
    DECLARE_ALIGNED(4, uint32_t, oc);
205
    DECLARE_ALIGNED(4, uint32_t, zero);
206
    DECLARE_ALIGNED(4, uint32_t, cy);
207
    DECLARE_ALIGNED(4, uint32_t, crv);
208
    DECLARE_ALIGNED(4, uint32_t, rmask);
209
    DECLARE_ALIGNED(4, uint32_t, cbu);
210
    DECLARE_ALIGNED(4, uint32_t, bmask);
211
    DECLARE_ALIGNED(4, uint32_t, cgu);
212
    DECLARE_ALIGNED(4, uint32_t, cgv);
213
    DECLARE_ALIGNED(4, uint32_t, gmask);
214 214
#endif
215 215

  
216 216
#if HAVE_VIS
217
    uint64_t sparc_coeffs[10] __attribute__((aligned(8)));
217
    DECLARE_ALIGNED(8, uint64_t, sparc_coeffs[10]);
218 218
#endif
219 219

  
220 220
    /* function pointers for swScale() */

Also available in: Unified diff