summaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorramiro <ramiro@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-08-13 11:48:06 +0000
committerramiro <ramiro@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-08-13 11:48:06 +0000
commit3c4aba428f2944315993ba3a9ff57c0df0da84a0 (patch)
tree60a77bd5f34c41b486944943e2b8bdb679733aaa /libswscale
parentfef358505eda7aee3ac022261925694e90778dbc (diff)
downloadmpv-3c4aba428f2944315993ba3a9ff57c0df0da84a0.tar.bz2
mpv-3c4aba428f2944315993ba3a9ff57c0df0da84a0.tar.xz
swscale-example: Remove hack to end loop by setting variables to break.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29505 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/swscale-example.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/libswscale/swscale-example.c b/libswscale/swscale-example.c
index ec73495568..af959b11a6 100644
--- a/libswscale/swscale-example.c
+++ b/libswscale/swscale-example.c
@@ -180,6 +180,8 @@ static void selfTest(uint8_t *src[4], int stride[4], int w, int h){
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 @@ static void selfTest(uint8_t *src[4], int stride[4], int w, int h){
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;
- }
- }
- }
- }
}
}
}