From 68b51e58ce73d99d2cd9bfa14cb7daaf4a74047e Mon Sep 17 00:00:00 2001 From: Steve L'Homme <slhomme@divxcorp.com> Date: Sun, 5 Feb 2006 13:35:17 +0000 Subject: MSVC-compatible __align8/__align16 declaration patch by Steve Lhomme, steve .dot. lhomme .at. free .dot. fr Originally committed as revision 4942 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/i386/dsputil_h264_template_mmx.c | 8 ++++---- libavcodec/i386/dsputil_mmx.c | 6 +++--- libavcodec/i386/mpegvideo_mmx_template.c | 2 +- libavcodec/i386/vp3dsp_sse2.c | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'libavcodec/i386') diff --git a/libavcodec/i386/dsputil_h264_template_mmx.c b/libavcodec/i386/dsputil_h264_template_mmx.c index 8099132be6..d52938ccf4 100644 --- a/libavcodec/i386/dsputil_h264_template_mmx.c +++ b/libavcodec/i386/dsputil_h264_template_mmx.c @@ -25,8 +25,8 @@ */ static void H264_CHROMA_MC8_TMPL(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y) { - uint64_t AA __align8; - uint64_t DD __align8; + DECLARE_ALIGNED_8(uint64_t, AA); + DECLARE_ALIGNED_8(uint64_t, DD); int i; if(y==0 && x==0) { @@ -242,8 +242,8 @@ static void H264_CHROMA_MC8_TMPL(uint8_t *dst/*align 8*/, uint8_t *src/*align 1* static void H264_CHROMA_MC4_TMPL(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y) { - uint64_t AA __align8; - uint64_t DD __align8; + DECLARE_ALIGNED_8(uint64_t, AA); + DECLARE_ALIGNED_8(uint64_t, DD); int i; /* no special case for mv=(0,0) in 4x*, since it's much less common than in 8x*. diff --git a/libavcodec/i386/dsputil_mmx.c b/libavcodec/i386/dsputil_mmx.c index 830c1fcf88..7d69859a67 100644 --- a/libavcodec/i386/dsputil_mmx.c +++ b/libavcodec/i386/dsputil_mmx.c @@ -303,7 +303,7 @@ void put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size :"memory"); } -static const unsigned char __align8 vector128[8] = +static DECLARE_ALIGNED_8(const unsigned char, vector128[8]) = { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }; void put_signed_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size) @@ -1546,7 +1546,7 @@ static void sub_hfyu_median_prediction_mmx2(uint8_t *dst, uint8_t *src1, uint8_t "movq "#d", "#o"+48(%1) \n\t"\ static int hadamard8_diff_mmx(void *s, uint8_t *src1, uint8_t *src2, int stride, int h){ - uint64_t temp[16] __align8; + DECLARE_ALIGNED_8(uint64_t, temp[16]); int sum=0; assert(h==8); @@ -1633,7 +1633,7 @@ static int hadamard8_diff_mmx(void *s, uint8_t *src1, uint8_t *src2, int stride, } static int hadamard8_diff_mmx2(void *s, uint8_t *src1, uint8_t *src2, int stride, int h){ - uint64_t temp[16] __align8; + DECLARE_ALIGNED_8(uint64_t, temp[16]); int sum=0; assert(h==8); diff --git a/libavcodec/i386/mpegvideo_mmx_template.c b/libavcodec/i386/mpegvideo_mmx_template.c index 48dc1bc689..2c50df232d 100644 --- a/libavcodec/i386/mpegvideo_mmx_template.c +++ b/libavcodec/i386/mpegvideo_mmx_template.c @@ -51,7 +51,7 @@ static int RENAME(dct_quantize)(MpegEncContext *s, long last_non_zero_p1; int level=0, q; //=0 is cuz gcc says uninitalized ... const uint16_t *qmat, *bias; - __align8 int16_t temp_block[64]; + DECLARE_ALIGNED_8(int16_t, temp_block[64]); assert((7&(int)(&temp_block[0])) == 0); //did gcc align it correctly? diff --git a/libavcodec/i386/vp3dsp_sse2.c b/libavcodec/i386/vp3dsp_sse2.c index 4897ad8958..cf822f7d48 100644 --- a/libavcodec/i386/vp3dsp_sse2.c +++ b/libavcodec/i386/vp3dsp_sse2.c @@ -24,7 +24,7 @@ #include "../dsputil.h" #include "mmx.h" -static const unsigned short __align16 SSE2_dequant_const[] = +static DECLARE_ALIGNED_16(const unsigned short, SSE2_dequant_const[]) = { 0,65535,65535,0,0,0,0,0, // 0x0000 0000 0000 0000 0000 FFFF FFFF 0000 0,0,0,0,65535,65535,0,0, // 0x0000 0000 FFFF FFFF 0000 0000 0000 0000 @@ -35,7 +35,7 @@ static const unsigned short __align16 SSE2_dequant_const[] = 0,0,65535,65535, 0,0,0,0 // 0x0000 0000 0000 0000 FFFF FFFF 0000 0000 }; -static const unsigned int __align16 eight_data[] = +static DECLARE_ALIGNED_16(const unsigned int, eight_data[]) = { 0x00080008, 0x00080008, @@ -43,7 +43,7 @@ static const unsigned int __align16 eight_data[] = 0x00080008 }; -static const unsigned short __align16 SSE2_idct_data[7 * 8] = +static DECLARE_ALIGNED_16(const unsigned short, SSE2_idct_data[7 * 8]) = { 64277,64277,64277,64277,64277,64277,64277,64277, 60547,60547,60547,60547,60547,60547,60547,60547, -- cgit v1.2.3