Commit 0dfd226c authored by michael's avatar michael

simplify yuv2yuv1()


git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@27320 b3059339-0415-0410-9bf9-f77b7e298cf2
parent c76c46c4
...@@ -973,29 +973,20 @@ static inline void RENAME(yuv2yuv1)(int16_t *lumSrc, int16_t *chrSrc, ...@@ -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) uint8_t *dest, uint8_t *uDest, uint8_t *vDest, long dstW, long chrDstW)
{ {
#ifdef HAVE_MMX #ifdef HAVE_MMX
if (uDest) long p= uDest ? 3 : 1;
{ uint8_t *src[3]= {lumSrc + dstW, chrSrc + chrDstW, chrSrc + VOFW + chrDstW};
asm volatile( uint8_t *dst[3]= {dest, uDest, vDest};
YSCALEYUV2YV121 long counter[3] = {dstW, chrDstW, chrDstW};
:: "r" (chrSrc + chrDstW), "r" (uDest + chrDstW),
"g" (-chrDstW)
: "%"REG_a
);
while(p--){
asm volatile( asm volatile(
YSCALEYUV2YV121 YSCALEYUV2YV121
:: "r" (chrSrc + VOFW + chrDstW), "r" (vDest + chrDstW), :: "r" (src[p]), "r" (dst[p] + counter[p]),
"g" (-chrDstW) "g" (-counter[p])
: "%"REG_a : "%"REG_a
); );
} }
asm volatile(
YSCALEYUV2YV121
:: "r" (lumSrc + dstW), "r" (dest + dstW),
"g" (-dstW)
: "%"REG_a
);
#else #else
int i; int i;
for (i=0; i<dstW; i++) for (i=0; i<dstW; i++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment