Commit aee29698 authored by alex's avatar alex

use DECLARE_ALIGNED from mem.h (which is included through common.h)

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@9015 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c8f8ec76
...@@ -470,11 +470,7 @@ static inline int get_penalty_factor(int lambda, int lambda2, int type){ ...@@ -470,11 +470,7 @@ static inline int get_penalty_factor(int lambda, int lambda2, int type){
one or more MultiMedia extension */ one or more MultiMedia extension */
int mm_support(void); int mm_support(void);
#ifdef __GNUC__ #define DECLARE_ALIGNED_16(t, v) DECLARE_ALIGNED(16, t, v)
#define DECLARE_ALIGNED_16(t,v) t v __attribute__ ((aligned (16)))
#else
#define DECLARE_ALIGNED_16(t,v) __declspec(align(16)) t v
#endif
#if defined(HAVE_MMX) #if defined(HAVE_MMX)
...@@ -507,11 +503,7 @@ static inline void emms(void) ...@@ -507,11 +503,7 @@ static inline void emms(void)
emms();\ emms();\
} }
#ifdef __GNUC__ #define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v)
#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (8)))
#else
#define DECLARE_ALIGNED_8(t,v) __declspec(align(8)) t v
#endif
#define STRIDE_ALIGN 8 #define STRIDE_ALIGN 8
...@@ -522,7 +514,7 @@ void dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx); ...@@ -522,7 +514,7 @@ void dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx);
/* This is to use 4 bytes read to the IDCT pointers for some 'zero' /* This is to use 4 bytes read to the IDCT pointers for some 'zero'
line optimizations */ line optimizations */
#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (4))) #define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(4, t, v)
#define STRIDE_ALIGN 4 #define STRIDE_ALIGN 4
#define MM_IWMMXT 0x0100 /* XScale IWMMXT */ #define MM_IWMMXT 0x0100 /* XScale IWMMXT */
...@@ -534,7 +526,7 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx); ...@@ -534,7 +526,7 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx);
#elif defined(HAVE_MLIB) #elif defined(HAVE_MLIB)
/* SPARC/VIS IDCT needs 8-byte aligned DCT blocks */ /* SPARC/VIS IDCT needs 8-byte aligned DCT blocks */
#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (8))) #define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v)
#define STRIDE_ALIGN 8 #define STRIDE_ALIGN 8
void dsputil_init_mlib(DSPContext* c, AVCodecContext *avctx); void dsputil_init_mlib(DSPContext* c, AVCodecContext *avctx);
...@@ -542,13 +534,13 @@ void dsputil_init_mlib(DSPContext* c, AVCodecContext *avctx); ...@@ -542,13 +534,13 @@ void dsputil_init_mlib(DSPContext* c, AVCodecContext *avctx);
#elif defined(ARCH_SPARC) #elif defined(ARCH_SPARC)
/* SPARC/VIS IDCT needs 8-byte aligned DCT blocks */ /* SPARC/VIS IDCT needs 8-byte aligned DCT blocks */
#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (8))) #define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v)
#define STRIDE_ALIGN 8 #define STRIDE_ALIGN 8
void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx); void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx);
#elif defined(ARCH_ALPHA) #elif defined(ARCH_ALPHA)
#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (8))) #define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v)
#define STRIDE_ALIGN 8 #define STRIDE_ALIGN 8
void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx); void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx);
...@@ -565,35 +557,35 @@ extern int mm_flags; ...@@ -565,35 +557,35 @@ extern int mm_flags;
#undef pixel #undef pixel
#endif #endif
#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (16))) #define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v)
#define STRIDE_ALIGN 16 #define STRIDE_ALIGN 16
void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx); void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx);
#elif defined(HAVE_MMI) #elif defined(HAVE_MMI)
#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (16))) #define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v)
#define STRIDE_ALIGN 16 #define STRIDE_ALIGN 16
void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx); void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx);
#elif defined(ARCH_SH4) #elif defined(ARCH_SH4)
#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (8))) #define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v)
#define STRIDE_ALIGN 8 #define STRIDE_ALIGN 8
void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx); void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx);
#elif defined(ARCH_BFIN) #elif defined(ARCH_BFIN)
#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (8))) #define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v)
#define STRIDE_ALIGN 8 #define STRIDE_ALIGN 8
void dsputil_init_bfin(DSPContext* c, AVCodecContext *avctx); void dsputil_init_bfin(DSPContext* c, AVCodecContext *avctx);
#else #else
#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (8))) #define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v)
#define STRIDE_ALIGN 8 #define STRIDE_ALIGN 8
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment