diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-06-24 00:18:29 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-06-24 00:18:29 +0000 |
commit | 5859233b70289d2f5bf5474559a4efe3e17ff6e0 (patch) | |
tree | 9445778d6172b493b199816c5b959fdb619bd5f5 /postproc/swscale_template.c | |
parent | 0c51ef979f715b2e1ecb7f921f65a2a4883eec86 (diff) | |
download | ffmpeg-5859233b70289d2f5bf5474559a4efe3e17ff6e0.tar.gz |
100l (non mmx versions didnt compile)
some cleanup
Originally committed as revision 6541 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
Diffstat (limited to 'postproc/swscale_template.c')
-rw-r--r-- | postproc/swscale_template.c | 59 |
1 files changed, 12 insertions, 47 deletions
diff --git a/postproc/swscale_template.c b/postproc/swscale_template.c index b50a10f71b..6e14881cc5 100644 --- a/postproc/swscale_template.c +++ b/postproc/swscale_template.c @@ -683,9 +683,9 @@ static inline void RENAME(yuv2yuvX)(int16_t *lumFilter, int16_t **lumSrc, int lu : "%eax", "%edx", "%esi" ); #else -yuv2yuvXinC(c, lumFilter, lumSrc, lumFilterSize, +yuv2yuvXinC(lumFilter, lumSrc, lumFilterSize, chrFilter, chrSrc, chrFilterSize, - dest, uDest, vDest); + dest, uDest, vDest, dstW, chrDstW); #endif } @@ -2623,56 +2623,21 @@ static void RENAME(swScale)(SwsContext *c, uint8_t* srcParam[], int srcStridePar int dstStride[3]; uint8_t *src[3]; uint8_t *dst[3]; + + orderYUV(c->srcFormat, src, srcStride, srcParam, srcStrideParam); + orderYUV(c->dstFormat, dst, dstStride, dstParam, dstStrideParam); - if(c->srcFormat == IMGFMT_I420){ - src[0]= srcParam[0]; - src[1]= srcParam[2]; - src[2]= srcParam[1]; - srcStride[0]= srcStrideParam[0]; - srcStride[1]= srcStrideParam[2]; - srcStride[2]= srcStrideParam[1]; - } - else if(c->srcFormat==IMGFMT_YV12 || c->srcFormat==IMGFMT_YVU9){ - src[0]= srcParam[0]; - src[1]= srcParam[1]; - src[2]= srcParam[2]; - srcStride[0]= srcStrideParam[0]; - srcStride[1]= srcStrideParam[1]; - srcStride[2]= srcStrideParam[2]; - } - else if(isPacked(c->srcFormat)){ + if(isPacked(c->srcFormat)){ src[0]= src[1]= src[2]= srcParam[0]; - srcStride[0]= srcStrideParam[0]; - srcStride[1]= - srcStride[2]= srcStrideParam[0]<<1; - } - else if(isGray(c->srcFormat)){ - src[0]= srcParam[0]; - src[1]= - src[2]= NULL; - srcStride[0]= srcStrideParam[0]; + srcStride[0]= srcStride[1]= - srcStride[2]= 0; + srcStride[2]= srcStrideParam[0]; } + srcStride[1]<<= c->vChrDrop; + srcStride[2]<<= c->vChrDrop; - if(dstFormat == IMGFMT_I420){ - dst[0]= dstParam[0]; - dst[1]= dstParam[2]; - dst[2]= dstParam[1]; - dstStride[0]= dstStrideParam[0]; - dstStride[1]= dstStrideParam[2]; - dstStride[2]= dstStrideParam[1]; - }else{ - dst[0]= dstParam[0]; - dst[1]= dstParam[1]; - dst[2]= dstParam[2]; - dstStride[0]= dstStrideParam[0]; - dstStride[1]= dstStrideParam[1]; - dstStride[2]= dstStrideParam[2]; - } - // printf("swscale %X %X %X -> %X %X %X\n", (int)src[0], (int)src[1], (int)src[2], // (int)dst[0], (int)dst[1], (int)dst[2]); @@ -2878,10 +2843,10 @@ i--; if(isPlanarYUV(dstFormat)) //YV12 { if(dstY&1) uDest=vDest= NULL; - yuv2yuvXinC(c, + yuv2yuvXinC( vLumFilter+dstY*vLumFilterSize , lumSrcPtr, vLumFilterSize, vChrFilter+chrDstY*vChrFilterSize, chrSrcPtr, vChrFilterSize, - dest, uDest, vDest); + dest, uDest, vDest, dstW, chrDstW); } else { |