aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-07-17 23:35:36 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-07-17 23:35:36 +0000
commit7bae01c62c8519f1d06f75ad9628a446eadf69f6 (patch)
treedf4e81638ec7725be3213fe717f6706ce81c28e2 /libswscale
parentc52d2da905fc02f5131768a8cbc9d3dfe891e021 (diff)
downloadffmpeg-7bae01c62c8519f1d06f75ad9628a446eadf69f6.tar.gz
simplify yuv2yuv1()
Originally committed as revision 27320 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/swscale_template.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c
index 893f346074..ee3c96836b 100644
--- a/libswscale/swscale_template.c
+++ b/libswscale/swscale_template.c
@@ -973,29 +973,20 @@ static inline void RENAME(yuv2yuv1)(int16_t *lumSrc, int16_t *chrSrc,
uint8_t *dest, uint8_t *uDest, uint8_t *vDest, long dstW, long chrDstW)
{
#ifdef HAVE_MMX
- if (uDest)
- {
- asm volatile(
- YSCALEYUV2YV121
- :: "r" (chrSrc + chrDstW), "r" (uDest + chrDstW),
- "g" (-chrDstW)
- : "%"REG_a
- );
+ long p= uDest ? 3 : 1;
+ uint8_t *src[3]= {lumSrc + dstW, chrSrc + chrDstW, chrSrc + VOFW + chrDstW};
+ uint8_t *dst[3]= {dest, uDest, vDest};
+ long counter[3] = {dstW, chrDstW, chrDstW};
+ while(p--){
asm volatile(
YSCALEYUV2YV121
- :: "r" (chrSrc + VOFW + chrDstW), "r" (vDest + chrDstW),
- "g" (-chrDstW)
+ :: "r" (src[p]), "r" (dst[p] + counter[p]),
+ "g" (-counter[p])
: "%"REG_a
);
}
- asm volatile(
- YSCALEYUV2YV121
- :: "r" (lumSrc + dstW), "r" (dest + dstW),
- "g" (-dstW)
- : "%"REG_a
- );
#else
int i;
for (i=0; i<dstW; i++)