Revision 8d884020

View differences:

libswscale/swscale-test.c
28 28
#include "libavcore/imgutils.h"
29 29
#include "libavutil/mem.h"
30 30
#include "libavutil/avutil.h"
31
#include "libavutil/crc.h"
31 32
#include "libavutil/pixdesc.h"
32 33
#include "libavutil/lfg.h"
33 34
#include "swscale.h"
......
83 84
    int i;
84 85
    uint64_t ssdY, ssdU=0, ssdV=0, ssdA=0;
85 86
    struct SwsContext *dstContext = NULL, *outContext = NULL;
87
    uint32_t crc = 0;
86 88
    int res = 0;
87 89

  
88 90
    av_fill_image_linesizes(dstStride, dstFormat, dstW);
......
135 137
    sws_scale(dstContext, src, srcStride, 0, srcH, dst, dstStride);
136 138
    sws_scale(outContext, dst, dstStride, 0, dstH, out, refStride);
137 139

  
140
    for (i = 0; i < 4 && dstStride[i]; i++) {
141
        crc = av_crc(av_crc_get_table(AV_CRC_32_IEEE), crc, dst[i], dstStride[i] * dstH);
142
    }
143

  
138 144
    ssdY= getSSD(ref[0], out[0], refStride[0], refStride[0], w, h);
139 145
    if (hasChroma(srcFormat) && hasChroma(dstFormat)) {
140 146
        //FIXME check that output is really gray
......
149 155
    ssdV/= w*h/4;
150 156
    ssdA/= w*h;
151 157

  
152
    printf(" SSD=%5"PRId64",%5"PRId64",%5"PRId64",%5"PRId64"\n",
153
           ssdY, ssdU, ssdV, ssdA);
158
    printf(" CRC=%08x SSD=%5"PRId64",%5"PRId64",%5"PRId64",%5"PRId64"\n",
159
           crc, ssdY, ssdU, ssdV, ssdA);
154 160

  
155 161
end:
156 162

  

Also available in: Unified diff