From 95000b0ca7f253eccc971712d96533abf0902b0c Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 26 Apr 2007 23:07:11 +0000 Subject: cosmetics: Remove trailing whitespace. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23147 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale-example.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'libswscale/swscale-example.c') diff --git a/libswscale/swscale-example.c b/libswscale/swscale-example.c index 1c71ba7e16..803ffa0459 100644 --- a/libswscale/swscale-example.c +++ b/libswscale/swscale-example.c @@ -35,7 +35,7 @@ static uint64_t getSSD(uint8_t *src1, uint8_t *src2, int stride1, int stride2, i uint64_t ssd=0; //printf("%d %d\n", w, h); - + for(y=0; y src -> dst -> out & compare out against ref // ref & out are YV12 -static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat, int dstFormat, +static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat, int dstFormat, int srcW, int srcH, int dstW, int dstH, int flags){ uint8_t *src[3]; uint8_t *dst[3]; @@ -59,7 +59,7 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat uint64_t ssdY, ssdU, ssdV; struct SwsContext *srcContext, *dstContext, *outContext; int res; - + res = 0; for(i=0; i<3; i++){ // avoid stride % bpp != 0 @@ -67,12 +67,12 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat srcStride[i]= srcW*3; else srcStride[i]= srcW*4; - + if(dstFormat==PIX_FMT_RGB24 || dstFormat==PIX_FMT_BGR24) dstStride[i]= dstW*3; else dstStride[i]= dstW*4; - + src[i]= (uint8_t*) malloc(srcStride[i]*srcH); dst[i]= (uint8_t*) malloc(dstStride[i]*dstH); out[i]= (uint8_t*) malloc(refStride[i]*h); @@ -122,27 +122,27 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat #if defined(ARCH_X86) asm volatile ("emms\n\t"); #endif - + ssdY= getSSD(ref[0], out[0], refStride[0], refStride[0], w, h); ssdU= getSSD(ref[1], out[1], refStride[1], refStride[1], (w+1)>>1, (h+1)>>1); ssdV= getSSD(ref[2], out[2], refStride[2], refStride[2], (w+1)>>1, (h+1)>>1); - + if(srcFormat == PIX_FMT_GRAY8 || dstFormat==PIX_FMT_GRAY8) ssdU=ssdV=0; //FIXME check that output is really gray - + ssdY/= w*h; ssdU/= w*h/4; ssdV/= w*h/4; - + if(ssdY>100 || ssdU>100 || ssdV>100){ - printf(" %s %dx%d -> %s %4dx%4d flags=%2d SSD=%5lld,%5lld,%5lld\n", - sws_format_name(srcFormat), srcW, srcH, + printf(" %s %dx%d -> %s %4dx%4d flags=%2d SSD=%5lld,%5lld,%5lld\n", + sws_format_name(srcFormat), srcW, srcH, sws_format_name(dstFormat), dstW, dstH, flags, ssdY, ssdU, ssdV); } end: - + sws_freeContext(srcContext); sws_freeContext(dstContext); sws_freeContext(outContext); @@ -170,14 +170,14 @@ static void selfTest(uint8_t *src[3], int stride[3], int w, int h){ printf("%s -> %s\n", sws_format_name(srcFormat), sws_format_name(dstFormat)); - + srcW= w; srcH= h; for(dstW=w - w/3; dstW<= 4*w/3; dstW+= w/3){ for(dstH=h - h/3; dstH<= 4*h/3; dstH+= h/3){ for(flags=1; flags<33; flags*=2) { int res; - + res = doTest(src, stride, w, h, srcFormat, dstFormat, srcW, srcH, dstW, dstH, flags); if (res < 0) { @@ -206,7 +206,7 @@ int main(int argc, char **argv){ struct SwsContext *sws; sws= sws_getContext(W/12, H/12, PIX_FMT_RGB32, W, H, PIX_FMT_YUV420P, 2, NULL, NULL, NULL); - + for(y=0; y