Revision 68b51e58 libavcodec/dsputil.h

View differences:

libavcodec/dsputil.h
390 390
   one or more MultiMedia extension */
391 391
int mm_support(void);
392 392

  
393
#define __align16 __attribute__ ((aligned (16)))
393
#ifdef __GNUC__
394
  #define DECLARE_ALIGNED_16(t,v)       t v __attribute__ ((aligned (16)))
395
#else
396
  #define DECLARE_ALIGNED_16(t,v)      __declspec(align(16)) t v
397
#endif
394 398

  
395 399
#if defined(HAVE_MMX)
396 400

  
......
421 425
        emms();\
422 426
}
423 427

  
424
#define __align8 __attribute__ ((aligned (8)))
428
#ifdef __GNUC__
429
  #define DECLARE_ALIGNED_8(t,v)       t v __attribute__ ((aligned (8)))
430
#else
431
  #define DECLARE_ALIGNED_8(t,v)      __declspec(align(8)) t v
432
#endif
433

  
425 434
#define STRIDE_ALIGN 8
426 435

  
427 436
void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx);
......
431 440

  
432 441
/* This is to use 4 bytes read to the IDCT pointers for some 'zero'
433 442
   line optimizations */
434
#define __align8 __attribute__ ((aligned (4)))
443
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (4)))
435 444
#define STRIDE_ALIGN 4
436 445

  
437 446
#define MM_IWMMXT    0x0100 /* XScale IWMMXT */
......
443 452
#elif defined(HAVE_MLIB)
444 453

  
445 454
/* SPARC/VIS IDCT needs 8-byte aligned DCT blocks */
446
#define __align8 __attribute__ ((aligned (8)))
455
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
447 456
#define STRIDE_ALIGN 8
448 457

  
449 458
void dsputil_init_mlib(DSPContext* c, AVCodecContext *avctx);
......
451 460
#elif defined(ARCH_SPARC)
452 461

  
453 462
/* SPARC/VIS IDCT needs 8-byte aligned DCT blocks */
454
#define __align8 __attribute__ ((aligned (8)))
463
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
455 464
#define STRIDE_ALIGN 8
456 465
void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx);
457 466

  
458 467
#elif defined(ARCH_ALPHA)
459 468

  
460
#define __align8 __attribute__ ((aligned (8)))
469
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
461 470
#define STRIDE_ALIGN 8
462 471

  
463 472
void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx);
......
474 483
#undef pixel
475 484
#endif
476 485

  
477
#define __align8 __attribute__ ((aligned (16)))
486
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (16)))
478 487
#define STRIDE_ALIGN 16
479 488

  
480 489
void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx);
481 490

  
482 491
#elif defined(HAVE_MMI)
483 492

  
484
#define __align8 __attribute__ ((aligned (16)))
493
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (16)))
485 494
#define STRIDE_ALIGN 16
486 495

  
487 496
void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx);
488 497

  
489 498
#elif defined(ARCH_SH4)
490 499

  
491
#define __align8 __attribute__ ((aligned (8)))
500
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
492 501
#define STRIDE_ALIGN 8
493 502

  
494 503
void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx);
495 504

  
496 505
#else
497 506

  
498
#define __align8 __attribute__ ((aligned (8)))
507
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
499 508
#define STRIDE_ALIGN 8
500 509

  
501 510
#endif

Also available in: Unified diff