diff options
author | Ramiro Polla | 2009-08-14 15:52:40 +0000 |
---|---|---|
committer | Ramiro Polla | 2009-08-14 15:52:40 +0000 |
commit | 52154148f462a5b4c77c865e0893b5ca599a55af (patch) | |
tree | 5c085a745a38e6c818013c820f5cde7433c36539 /libswscale/swscale_template.c | |
parent | 562f6853078bf541b8d8d8888c92ca5ab0123aa5 (diff) |
Vertical yuv -> yuv16 scaler.
Originally committed as revision 29517 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/swscale_template.c')
-rw-r--r-- | libswscale/swscale_template.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c index d1177f598e..14957dc656 100644 --- a/libswscale/swscale_template.c +++ b/libswscale/swscale_template.c @@ -2813,6 +2813,15 @@ static int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int s { const int chrSkipMask= (1<<c->chrDstVSubSample)-1; if ((dstY&chrSkipMask) || isGray(dstFormat)) uDest=vDest= NULL; //FIXME split functions in lumi / chromi + if (is16BPS(dstFormat)) + { + yuv2yuvX16inC( + vLumFilter+dstY*vLumFilterSize , lumSrcPtr, vLumFilterSize, + vChrFilter+chrDstY*vChrFilterSize, chrSrcPtr, vChrFilterSize, + alpSrcPtr, (uint16_t *) dest, (uint16_t *) uDest, (uint16_t *) vDest, (uint16_t *) aDest, dstW, chrDstW, + dstFormat); + } + else if (vLumFilterSize == 1 && vChrFilterSize == 1) // unscaled YV12 { int16_t *lumBuf = lumPixBuf[0]; @@ -2898,10 +2907,21 @@ static int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int s { const int chrSkipMask= (1<<c->chrDstVSubSample)-1; if ((dstY&chrSkipMask) || isGray(dstFormat)) uDest=vDest= NULL; //FIXME split functions in lumi / chromi + if (is16BPS(dstFormat)) + { + yuv2yuvX16inC( + vLumFilter+dstY*vLumFilterSize , lumSrcPtr, vLumFilterSize, + vChrFilter+chrDstY*vChrFilterSize, chrSrcPtr, vChrFilterSize, + alpSrcPtr, (uint16_t *) dest, (uint16_t *) uDest, (uint16_t *) vDest, (uint16_t *) aDest, dstW, chrDstW, + dstFormat); + } + else + { yuv2yuvXinC( vLumFilter+dstY*vLumFilterSize , lumSrcPtr, vLumFilterSize, vChrFilter+chrDstY*vChrFilterSize, chrSrcPtr, vChrFilterSize, alpSrcPtr, dest, uDest, vDest, aDest, dstW, chrDstW); + } } else { |