# HG changeset patch # User ramiro # Date 1250164086 0 # Node ID d3c577bcd1dd02e3e14ff375768e2fc3a305be46 # Parent db2d76bfaaa6477b922b4e0a5d07d3c269d175fb swscale-example: Remove hack to end loop by setting variables to break. diff -r db2d76bfaaa6 -r d3c577bcd1dd libswscale/swscale-example.c --- a/libswscale/swscale-example.c Thu Aug 13 11:34:27 2009 +0000 +++ b/libswscale/swscale-example.c Thu Aug 13 11:48:06 2009 +0000 @@ -180,6 +180,8 @@ for (srcFormat = 0; srcFormat < PIX_FMT_NB; srcFormat++) { for (dstFormat = 0; dstFormat < PIX_FMT_NB; dstFormat++) { + int res = 0; + printf("%s -> %s\n", sws_format_name(srcFormat), sws_format_name(dstFormat)); @@ -187,21 +189,11 @@ 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; - + for (dstW=w - w/3; !res && dstW<= 4*w/3; dstW+= w/3) + for (dstH=h - h/3; !res && dstH<= 4*h/3; dstH+= h/3) + for (flags=1; !res && flags<33; flags*=2) res = doTest(src, stride, w, h, srcFormat, dstFormat, srcW, srcH, dstW, dstH, flags); - if (res < 0) { - dstW = 4 * w / 3; - dstH = 4 * h / 3; - flags = 33; - } - } - } - } } } }