From 4596673c062e3834b6d31d1e8e210b64d74ce26b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 11 Feb 2003 15:06:44 +0000 Subject: -fPIC compileable Originally committed as revision 9395 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc --- postproc/rgb2rgb_template.c | 63 ++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 35 deletions(-) (limited to 'postproc') diff --git a/postproc/rgb2rgb_template.c b/postproc/rgb2rgb_template.c index 6ca1510..eb81370 100644 --- a/postproc/rgb2rgb_template.c +++ b/postproc/rgb2rgb_template.c @@ -1409,7 +1409,7 @@ static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *u "addl $8, %%eax \n\t" "cmpl %4, %%eax \n\t" " jb 1b \n\t" - ::"r"(dst), "r"(ysrc), "r"(usrc), "r"(vsrc), "r" (chromWidth) + ::"r"(dst), "r"(ysrc), "r"(usrc), "r"(vsrc), "g" (chromWidth) : "%eax" ); #else @@ -1590,7 +1590,7 @@ static inline void RENAME(yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t "addl $8, %%eax \n\t" "cmpl %4, %%eax \n\t" " jb 1b \n\t" - ::"r"(src), "r"(ydst), "r"(udst), "r"(vdst), "r" (chromWidth) + ::"r"(src), "r"(ydst), "r"(udst), "r"(vdst), "g" (chromWidth) : "memory", "%eax" ); @@ -1620,7 +1620,7 @@ static inline void RENAME(yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t "cmpl %4, %%eax \n\t" " jb 1b \n\t" - ::"r"(src), "r"(ydst), "r"(udst), "r"(vdst), "r" (chromWidth) + ::"r"(src), "r"(ydst), "r"(udst), "r"(vdst), "g" (chromWidth) : "memory", "%eax" ); #else @@ -1828,7 +1828,7 @@ static inline void RENAME(uyvytoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t "addl $8, %%eax \n\t" "cmpl %4, %%eax \n\t" " jb 1b \n\t" - ::"r"(src), "r"(ydst), "r"(udst), "r"(vdst), "r" (chromWidth) + ::"r"(src), "r"(ydst), "r"(udst), "r"(vdst), "g" (chromWidth) : "memory", "%eax" ); @@ -1858,7 +1858,7 @@ static inline void RENAME(uyvytoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t "cmpl %4, %%eax \n\t" " jb 1b \n\t" - ::"r"(src), "r"(ydst), "r"(udst), "r"(vdst), "r" (chromWidth) + ::"r"(src), "r"(ydst), "r"(udst), "r"(vdst), "g" (chromWidth) : "memory", "%eax" ); #else @@ -2385,32 +2385,24 @@ static inline void RENAME(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2 int srcStride1, int srcStride2, int srcStride3, int dstStride) { - unsigned y,x,x2,w,h; + unsigned y,x,w,h; w=width/2; h=height; -#ifdef HAVE_MMX - asm volatile( - PREFETCH" %0\n\t" - PREFETCH" %1\n\t" - PREFETCH" %2\n\t" - ::"m"(*(src1+srcStride1)),"m"(*(src2+srcStride2)),"m"(*(src3+srcStride3)):"memory"); -#endif for(y=0;y>2); const uint8_t* vp=src3+srcStride3*(y>>2); uint8_t* d=dst+dstStride*y; - x2=0; x=0; #ifdef HAVE_MMX - for(;x