Revision 60c99b55 libavcodec/dsputil.h

View differences:

libavcodec/dsputil.h
661 661
#   define STRIDE_ALIGN 8
662 662
#endif
663 663

  
664
#define LOCAL_ALIGNED(a, t, v, s, ...)                          \
665
    uint8_t la_##v[sizeof(t s __VA_ARGS__) + (a)];              \
666
    t (*v) __VA_ARGS__ = (void *)FFALIGN((uintptr_t)la_##v, a)
664
#define LOCAL_ALIGNED_A(a, t, v, s, o, ...)             \
665
    uint8_t la_##v[sizeof(t s o) + (a)];                \
666
    t (*v) o = (void *)FFALIGN((uintptr_t)la_##v, a)
667

  
668
#define LOCAL_ALIGNED_D(a, t, v, s, o, ...) DECLARE_ALIGNED(a, t, v) s o
669

  
670
#define LOCAL_ALIGNED(a, t, v, ...) LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,)
667 671

  
668 672
#if HAVE_LOCAL_ALIGNED_8
669
#   define LOCAL_ALIGNED_8(t, v, s, ...) DECLARE_ALIGNED(8, t, v) s __VA_ARGS__
673
#   define LOCAL_ALIGNED_8(t, v, ...) LOCAL_ALIGNED_D(8, t, v, __VA_ARGS__,,)
670 674
#else
671
#   define LOCAL_ALIGNED_8(t, v, s, ...) LOCAL_ALIGNED(8, t, v, s, __VA_ARGS__)
675
#   define LOCAL_ALIGNED_8(t, v, ...) LOCAL_ALIGNED(8, t, v, __VA_ARGS__)
672 676
#endif
673 677

  
674 678
#if HAVE_LOCAL_ALIGNED_16
675
#   define LOCAL_ALIGNED_16(t, v, s, ...) DECLARE_ALIGNED(16, t, v) s __VA_ARGS__
679
#   define LOCAL_ALIGNED_16(t, v, ...) LOCAL_ALIGNED_D(16, t, v, __VA_ARGS__,,)
676 680
#else
677
#   define LOCAL_ALIGNED_16(t, v, s, ...) LOCAL_ALIGNED(16, t, v, s, __VA_ARGS__)
681
#   define LOCAL_ALIGNED_16(t, v, ...) LOCAL_ALIGNED(16, t, v, __VA_ARGS__)
678 682
#endif
679 683

  
680 684
/* PSNR */

Also available in: Unified diff