diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-01-19 21:52:00 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-01-19 21:52:00 +0000 |
commit | 731c04ad659715fa4353d53f2d06821602e6b573 (patch) | |
tree | 6ef75498ddcbd50793a5e73c3e6ac51895fdad1a /libswscale | |
parent | fdf4662211fb8e50854e795f47a59753378f2a10 (diff) | |
download | ffmpeg-731c04ad659715fa4353d53f2d06821602e6b573.tar.gz |
Make selfTest() perform tests where both the input and output formats
are supported, avoid pointless loops.
Originally committed as revision 30377 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale-example.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libswscale/swscale-example.c b/libswscale/swscale-example.c index 7c43a39467..c8faf80f55 100644 --- a/libswscale/swscale-example.c +++ b/libswscale/swscale-example.c @@ -198,10 +198,16 @@ static void selfTest(uint8_t *ref[4], int refStride[4], int w, int h) enum PixelFormat srcFormat, dstFormat; for (srcFormat = 0; srcFormat < PIX_FMT_NB; srcFormat++) { + if (!sws_isSupportedInput(srcFormat)) + continue; + for (dstFormat = 0; dstFormat < PIX_FMT_NB; dstFormat++) { int i, j, k; int res = 0; + if (!sws_isSupportedOutput(dstFormat)) + continue; + printf("%s -> %s\n", sws_format_name(srcFormat), sws_format_name(dstFormat)); |