# HG changeset patch # User ramiro # Date 1284315413 0 # Node ID 1aa005842273271a74aa153b29850ec88214dbe3 # Parent 10d9bda4b56f891f69d57a2f2d51ea4b25157ff7 indent diff -r 10d9bda4b56f -r 1aa005842273 libswscale/swscale-test.c --- a/libswscale/swscale-test.c Sun Sep 12 18:16:33 2010 +0000 +++ b/libswscale/swscale-test.c Sun Sep 12 18:16:53 2010 +0000 @@ -205,19 +205,19 @@ } sws_scale(outContext, dst, dstStride, 0, dstH, out, refStride); - ssdY= getSSD(ref[0], out[0], refStride[0], refStride[0], w, h); - if (hasChroma(srcFormat) && hasChroma(dstFormat)) { - //FIXME check that output is really gray - ssdU= getSSD(ref[1], out[1], refStride[1], refStride[1], (w+1)>>1, (h+1)>>1); - ssdV= getSSD(ref[2], out[2], refStride[2], refStride[2], (w+1)>>1, (h+1)>>1); - } - if (isALPHA(srcFormat) && isALPHA(dstFormat)) - ssdA= getSSD(ref[3], out[3], refStride[3], refStride[3], w, h); + ssdY= getSSD(ref[0], out[0], refStride[0], refStride[0], w, h); + if (hasChroma(srcFormat) && hasChroma(dstFormat)) { + //FIXME check that output is really gray + ssdU= getSSD(ref[1], out[1], refStride[1], refStride[1], (w+1)>>1, (h+1)>>1); + ssdV= getSSD(ref[2], out[2], refStride[2], refStride[2], (w+1)>>1, (h+1)>>1); + } + if (isALPHA(srcFormat) && isALPHA(dstFormat)) + ssdA= getSSD(ref[3], out[3], refStride[3], refStride[3], w, h); - ssdY/= w*h; - ssdU/= w*h/4; - ssdV/= w*h/4; - ssdA/= w*h; + ssdY/= w*h; + ssdU/= w*h/4; + ssdV/= w*h/4; + ssdA/= w*h; sws_freeContext(outContext);