Browse Source

Avoid more pointless tests, the input and output formats need to be

supported both as input and as output, as the conversion performed is:
yuva420p -> src -> dst -> yuva420p.

Originally committed as revision 30379 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
tags/v0.6
Stefano Sabatini 16 years ago
parent
commit
613f2dc4ae
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libswscale/swscale-example.c

+ 2
- 2
libswscale/swscale-example.c View File

@@ -198,14 +198,14 @@ 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))
if (!sws_isSupportedInput(srcFormat) || !sws_isSupportedOutput(srcFormat))
continue;

for (dstFormat = 0; dstFormat < PIX_FMT_NB; dstFormat++) {
int i, j, k;
int res = 0;

if (!sws_isSupportedOutput(dstFormat))
if (!sws_isSupportedInput(dstFormat) || !sws_isSupportedOutput(dstFormat))
continue;

printf("%s -> %s\n",


Loading…
Cancel
Save