From 62651fa729b7d0b1b5c8cb42077b42640254948e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Reimar=20D=C3=B6ffinger?= Date: Wed, 18 Mar 2009 22:11:50 +0000 Subject: [PATCH] Fix libswscale compilation on non-x86, hopefully without breaking MinGW64 again. Originally committed as revision 28996 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale --- libswscale/rgb2rgb_template.c | 46 +++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c index e2b66c922..fb4ac23d8 100644 --- a/libswscale/rgb2rgb_template.c +++ b/libswscale/rgb2rgb_template.c @@ -1339,7 +1339,12 @@ static inline void RENAME(rgb16to32)(const uint8_t *src, uint8_t *dst, long src_ static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long src_size) { - x86_reg idx = 15 - src_size; +#if HAVE_MMX + x86_reg +#else + long +#endif + idx = 15 - src_size; const uint8_t *s = src-idx; uint8_t *d = dst-idx; #if HAVE_MMX @@ -1476,10 +1481,11 @@ static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *u long lumStride, long chromStride, long dstStride, long vertLumPerChroma) { long y; - const x86_reg chromWidth= width>>1; + const long chromWidth= width>>1; for (y=0; y>1; + const long chromWidth= width>>1; for (y=0; y>1; + const long chromWidth= width>>1; for (y=0; y>2; dst[dstStride]= ( src[0] + 3*src[srcStride])>>2; @@ -1996,10 +2004,11 @@ static inline void RENAME(uyvytoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t long lumStride, long chromStride, long srcStride) { long y; - const x86_reg chromWidth= width>>1; + const long chromWidth= width>>1; for (y=0; y>1; + const long chromWidth= width>>1; #if HAVE_MMX + x86_reg cw = chromWidth; for (y=0; y>2); const uint8_t* vp=src3+srcStride3*(y>>2); uint8_t* d=dst+dstStride*y; - x=0; #if HAVE_MMX + x86_reg x = 0; for (;x