comparison libswscale/swscale-example.c @ 30335:a31ec2f03d54

Make selfTest() perform tests where both the input and output formats are supported, avoid pointless loops.
author stefano
date Tue, 19 Jan 2010 21:52:00 +0000
parents 4398e647c2ea
children 98086c4f3cb4
comparison
equal deleted inserted replaced
30334:f117b72cc42b 30335:a31ec2f03d54
196 const int dstW[] = { srcW - srcW/3, srcW, srcW + srcW/3, 0 }; 196 const int dstW[] = { srcW - srcW/3, srcW, srcW + srcW/3, 0 };
197 const int dstH[] = { srcH - srcH/3, srcH, srcH + srcH/3, 0 }; 197 const int dstH[] = { srcH - srcH/3, srcH, srcH + srcH/3, 0 };
198 enum PixelFormat srcFormat, dstFormat; 198 enum PixelFormat srcFormat, dstFormat;
199 199
200 for (srcFormat = 0; srcFormat < PIX_FMT_NB; srcFormat++) { 200 for (srcFormat = 0; srcFormat < PIX_FMT_NB; srcFormat++) {
201 if (!sws_isSupportedInput(srcFormat))
202 continue;
203
201 for (dstFormat = 0; dstFormat < PIX_FMT_NB; dstFormat++) { 204 for (dstFormat = 0; dstFormat < PIX_FMT_NB; dstFormat++) {
202 int i, j, k; 205 int i, j, k;
203 int res = 0; 206 int res = 0;
207
208 if (!sws_isSupportedOutput(dstFormat))
209 continue;
204 210
205 printf("%s -> %s\n", 211 printf("%s -> %s\n",
206 sws_format_name(srcFormat), 212 sws_format_name(srcFormat),
207 sws_format_name(dstFormat)); 213 sws_format_name(dstFormat));
208 fflush(stdout); 214 fflush(stdout);