diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-02-23 22:05:55 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-02-23 22:05:55 +0000 |
commit | d4e242755f3a3c5c27b26b86cccd4670c4bd3b40 (patch) | |
tree | ce934efe60fcfa2cdee7d925d700f11509ea5975 /postproc/swscale_template.c | |
parent | efa04ce2967724778a10a1db0fa65fa693625557 (diff) | |
download | ffmpeg-d4e242755f3a3c5c27b26b86cccd4670c4bd3b40.tar.gz |
sws_ prefix, more seperation between internal & external swscaler API
sws_scale() returns the number of outputed lines
Originally committed as revision 9495 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
Diffstat (limited to 'postproc/swscale_template.c')
-rw-r--r-- | postproc/swscale_template.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/postproc/swscale_template.c b/postproc/swscale_template.c index 4166e50203..fed7a4875d 100644 --- a/postproc/swscale_template.c +++ b/postproc/swscale_template.c @@ -2502,7 +2502,7 @@ FUNNY_UV_CODE } } -static void RENAME(swScale)(SwsContext *c, uint8_t* srcParam[], int srcStrideParam[], int srcSliceY, +static int RENAME(swScale)(SwsContext *c, uint8_t* srcParam[], int srcStrideParam[], int srcSliceY, int srcSliceH, uint8_t* dstParam[], int dstStrideParam[]){ /* load a few things into local vars to make the code more readable? and faster */ @@ -2540,6 +2540,7 @@ static void RENAME(swScale)(SwsContext *c, uint8_t* srcParam[], int srcStridePar uint8_t *formatConvBuffer= c->formatConvBuffer; const int chrSrcSliceY= srcSliceY >> c->chrSrcVSubSample; const int chrSrcSliceH= -((-srcSliceH) >> c->chrSrcVSubSample); + int lastDstY; /* vars whch will change and which we need to storw back in the context */ int dstY= c->dstY; @@ -2603,6 +2604,8 @@ i--; lastInChrBuf= -1; } + lastDstY= dstY; + for(;dstY < dstH; dstY++){ unsigned char *dest =dst[0]+dstStride[0]*dstY; const int chrDstY= dstY>>c->chrDstVSubSample; @@ -2810,4 +2813,6 @@ i--; c->chrBufIndex= chrBufIndex; c->lastInLumBuf= lastInLumBuf; c->lastInChrBuf= lastInChrBuf; + + return dstY - lastDstY; } |