diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-02-23 22:05:55 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-02-23 22:05:55 +0000 |
commit | 41b847f6a8af2013338a63c1b7311f804b2bf5b7 (patch) | |
tree | d4dfb5b969edcaf963f4ca68030a3e16650b2589 /postproc/swscale_template.c | |
parent | 4bd87c35eb568740b2ae8e6c636d4e63622aa067 (diff) | |
download | mpv-41b847f6a8af2013338a63c1b7311f804b2bf5b7.tar.bz2 mpv-41b847f6a8af2013338a63c1b7311f804b2bf5b7.tar.xz |
sws_ prefix, more seperation between internal & external swscaler API
sws_scale() returns the number of outputed lines
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9495 b3059339-0415-0410-9bf9-f77b7e298cf2
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; } |