diff postproc/swscale_template.c @ 9494:543ab3909b78

sws_ prefix, more seperation between internal & external swscaler API sws_scale() returns the number of outputed lines
author michael
date Sun, 23 Feb 2003 22:05:55 +0000
parents eff727517e6b
children bc5b87370cd1
line wrap: on
line diff
--- a/postproc/swscale_template.c	Sun Feb 23 20:48:13 2003 +0000
+++ b/postproc/swscale_template.c	Sun Feb 23 22:05:55 2003 +0000
@@ -2502,7 +2502,7 @@
    }
 }
 
-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 @@
 	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 @@
 		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 @@
 	c->chrBufIndex= chrBufIndex;
 	c->lastInLumBuf= lastInLumBuf;
 	c->lastInChrBuf= lastInChrBuf;
+
+	return dstY - lastDstY;
 }