Revision 43c7c7c7

View differences:

libavcodec/dsputil.h
470 470
   one or more MultiMedia extension */
471 471
int mm_support(void);
472 472

  
473
#ifdef __GNUC__
474
  #define DECLARE_ALIGNED_16(t,v)       t v __attribute__ ((aligned (16)))
475
#else
476
  #define DECLARE_ALIGNED_16(t,v)      __declspec(align(16)) t v
477
#endif
473
#define DECLARE_ALIGNED_16(t, v) DECLARE_ALIGNED(16, t, v)
478 474

  
479 475
#if defined(HAVE_MMX)
480 476

  
......
507 503
        emms();\
508 504
}
509 505

  
510
#ifdef __GNUC__
511
  #define DECLARE_ALIGNED_8(t,v)       t v __attribute__ ((aligned (8)))
512
#else
513
  #define DECLARE_ALIGNED_8(t,v)      __declspec(align(8)) t v
514
#endif
506
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v)
515 507

  
516 508
#define STRIDE_ALIGN 8
517 509

  
......
522 514

  
523 515
/* This is to use 4 bytes read to the IDCT pointers for some 'zero'
524 516
   line optimizations */
525
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (4)))
517
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(4, t, v)
526 518
#define STRIDE_ALIGN 4
527 519

  
528 520
#define MM_IWMMXT    0x0100 /* XScale IWMMXT */
......
534 526
#elif defined(HAVE_MLIB)
535 527

  
536 528
/* SPARC/VIS IDCT needs 8-byte aligned DCT blocks */
537
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
529
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v)
538 530
#define STRIDE_ALIGN 8
539 531

  
540 532
void dsputil_init_mlib(DSPContext* c, AVCodecContext *avctx);
......
542 534
#elif defined(ARCH_SPARC)
543 535

  
544 536
/* SPARC/VIS IDCT needs 8-byte aligned DCT blocks */
545
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
537
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v)
546 538
#define STRIDE_ALIGN 8
547 539
void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx);
548 540

  
549 541
#elif defined(ARCH_ALPHA)
550 542

  
551
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
543
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v)
552 544
#define STRIDE_ALIGN 8
553 545

  
554 546
void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx);
......
565 557
#undef pixel
566 558
#endif
567 559

  
568
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (16)))
560
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v)
569 561
#define STRIDE_ALIGN 16
570 562

  
571 563
void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx);
572 564

  
573 565
#elif defined(HAVE_MMI)
574 566

  
575
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (16)))
567
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v)
576 568
#define STRIDE_ALIGN 16
577 569

  
578 570
void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx);
579 571

  
580 572
#elif defined(ARCH_SH4)
581 573

  
582
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
574
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v)
583 575
#define STRIDE_ALIGN 8
584 576

  
585 577
void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx);
586 578

  
587 579
#elif defined(ARCH_BFIN)
588 580

  
589
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
581
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v)
590 582
#define STRIDE_ALIGN 8
591 583

  
592 584
void dsputil_init_bfin(DSPContext* c, AVCodecContext *avctx);
593 585

  
594 586
#else
595 587

  
596
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
588
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v)
597 589
#define STRIDE_ALIGN 8
598 590

  
599 591
#endif

Also available in: Unified diff