diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2001-11-05 23:49:15 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2001-11-05 23:49:15 +0000 |
commit | bdc2eb9a0022aa1567edc9e4f3f7a38a076f0ab9 (patch) | |
tree | 72a5017e2565841761472b7436ce6d6f09f91b37 | |
parent | cfc15dc6bc9caea26606ea366cced8801349899b (diff) | |
download | ffmpeg-bdc2eb9a0022aa1567edc9e4f3f7a38a076f0ab9.tar.gz |
only 6 registers used
Originally committed as revision 2729 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
-rw-r--r-- | postproc/swscale.c | 17 | ||||
-rw-r--r-- | postproc/swscale_template.c | 17 |
2 files changed, 20 insertions, 14 deletions
diff --git a/postproc/swscale.c b/postproc/swscale.c index e92364fd70..41649b4900 100644 --- a/postproc/swscale.c +++ b/postproc/swscale.c @@ -474,10 +474,10 @@ static int canMMX2BeUsed=0; "psllq $16, %%mm3 \n\t" /* RGBRGB00 3 */\ "por %%mm4, %%mm3 \n\t" /* RGBRGBRG 2.5 */\ \ - "leal (%%eax, %%eax, 2), %%ebx \n\t"\ - MOVNTQ(%%mm0, (%4, %%ebx))\ - MOVNTQ(%%mm2, 8(%4, %%ebx))\ - MOVNTQ(%%mm3, 16(%4, %%ebx))\ + MOVNTQ(%%mm0, (%%ebx))\ + MOVNTQ(%%mm2, 8(%%ebx))\ + MOVNTQ(%%mm3, 16(%%ebx))\ + "addl $24, %%ebx \n\t"\ \ "addl $8, %%eax \n\t"\ "cmpl %5, %%eax \n\t"\ @@ -740,10 +740,11 @@ FULL_YSCALEYUV2RGB else if(dstbpp==24) { asm volatile( + "movl %4, %%ebx \n\t" YSCALEYUV2RGB WRITEBGR24 - :: "r" (buf0), "r" (buf1), "r" (uvbuf0), "r" (uvbuf1), "r" (dest), "m" (dstw), + :: "r" (buf0), "r" (buf1), "r" (uvbuf0), "r" (uvbuf1), "m" (dest), "m" (dstw), "m" (yalpha1), "m" (uvalpha1) : "%eax", "%ebx" ); @@ -922,9 +923,10 @@ static inline void yuv2rgb1(uint16_t *buf0, uint16_t *buf1, uint16_t *uvbuf0, ui else if(dstbpp==24) { asm volatile( + "movl %4, %%ebx \n\t" YSCALEYUV2RGB1 WRITEBGR24 - :: "r" (buf0), "r" (buf1), "r" (uvbuf0), "r" (uvbuf1), "r" (dest), "m" (dstw), + :: "r" (buf0), "r" (buf1), "r" (uvbuf0), "r" (uvbuf1), "m" (dest), "m" (dstw), "m" (yalpha1), "m" (uvalpha1) : "%eax", "%ebx" ); @@ -978,9 +980,10 @@ static inline void yuv2rgb1(uint16_t *buf0, uint16_t *buf1, uint16_t *uvbuf0, ui else if(dstbpp==24) { asm volatile( + "movl %4, %%ebx \n\t" YSCALEYUV2RGB1b WRITEBGR24 - :: "r" (buf0), "r" (buf1), "r" (uvbuf0), "r" (uvbuf1), "r" (dest), "m" (dstw), + :: "r" (buf0), "r" (buf1), "r" (uvbuf0), "r" (uvbuf1), "m" (dest), "m" (dstw), "m" (yalpha1), "m" (uvalpha1) : "%eax", "%ebx" ); diff --git a/postproc/swscale_template.c b/postproc/swscale_template.c index e92364fd70..41649b4900 100644 --- a/postproc/swscale_template.c +++ b/postproc/swscale_template.c @@ -474,10 +474,10 @@ static int canMMX2BeUsed=0; "psllq $16, %%mm3 \n\t" /* RGBRGB00 3 */\ "por %%mm4, %%mm3 \n\t" /* RGBRGBRG 2.5 */\ \ - "leal (%%eax, %%eax, 2), %%ebx \n\t"\ - MOVNTQ(%%mm0, (%4, %%ebx))\ - MOVNTQ(%%mm2, 8(%4, %%ebx))\ - MOVNTQ(%%mm3, 16(%4, %%ebx))\ + MOVNTQ(%%mm0, (%%ebx))\ + MOVNTQ(%%mm2, 8(%%ebx))\ + MOVNTQ(%%mm3, 16(%%ebx))\ + "addl $24, %%ebx \n\t"\ \ "addl $8, %%eax \n\t"\ "cmpl %5, %%eax \n\t"\ @@ -740,10 +740,11 @@ FULL_YSCALEYUV2RGB else if(dstbpp==24) { asm volatile( + "movl %4, %%ebx \n\t" YSCALEYUV2RGB WRITEBGR24 - :: "r" (buf0), "r" (buf1), "r" (uvbuf0), "r" (uvbuf1), "r" (dest), "m" (dstw), + :: "r" (buf0), "r" (buf1), "r" (uvbuf0), "r" (uvbuf1), "m" (dest), "m" (dstw), "m" (yalpha1), "m" (uvalpha1) : "%eax", "%ebx" ); @@ -922,9 +923,10 @@ static inline void yuv2rgb1(uint16_t *buf0, uint16_t *buf1, uint16_t *uvbuf0, ui else if(dstbpp==24) { asm volatile( + "movl %4, %%ebx \n\t" YSCALEYUV2RGB1 WRITEBGR24 - :: "r" (buf0), "r" (buf1), "r" (uvbuf0), "r" (uvbuf1), "r" (dest), "m" (dstw), + :: "r" (buf0), "r" (buf1), "r" (uvbuf0), "r" (uvbuf1), "m" (dest), "m" (dstw), "m" (yalpha1), "m" (uvalpha1) : "%eax", "%ebx" ); @@ -978,9 +980,10 @@ static inline void yuv2rgb1(uint16_t *buf0, uint16_t *buf1, uint16_t *uvbuf0, ui else if(dstbpp==24) { asm volatile( + "movl %4, %%ebx \n\t" YSCALEYUV2RGB1b WRITEBGR24 - :: "r" (buf0), "r" (buf1), "r" (uvbuf0), "r" (uvbuf1), "r" (dest), "m" (dstw), + :: "r" (buf0), "r" (buf1), "r" (uvbuf0), "r" (uvbuf1), "m" (dest), "m" (dstw), "m" (yalpha1), "m" (uvalpha1) : "%eax", "%ebx" ); |