Revision 9075bc7c libswscale/swscaletest.c
libswscale/swscaletest.c  

205  205 
} 
206  206 
sws_scale(outContext, dst, dstStride, 0, dstH, out, refStride); 
207  207  
208 
ssdY= getSSD(ref[0], out[0], refStride[0], refStride[0], w, h); 

209 
if (hasChroma(srcFormat) && hasChroma(dstFormat)) { 

210 
//FIXME check that output is really gray 

211 
ssdU= getSSD(ref[1], out[1], refStride[1], refStride[1], (w+1)>>1, (h+1)>>1); 

212 
ssdV= getSSD(ref[2], out[2], refStride[2], refStride[2], (w+1)>>1, (h+1)>>1); 

213 
} 

214 
if (isALPHA(srcFormat) && isALPHA(dstFormat)) 

215 
ssdA= getSSD(ref[3], out[3], refStride[3], refStride[3], w, h); 

208 
ssdY= getSSD(ref[0], out[0], refStride[0], refStride[0], w, h);


209 
if (hasChroma(srcFormat) && hasChroma(dstFormat)) {


210 
//FIXME check that output is really gray


211 
ssdU= getSSD(ref[1], out[1], refStride[1], refStride[1], (w+1)>>1, (h+1)>>1);


212 
ssdV= getSSD(ref[2], out[2], refStride[2], refStride[2], (w+1)>>1, (h+1)>>1);


213 
}


214 
if (isALPHA(srcFormat) && isALPHA(dstFormat))


215 
ssdA= getSSD(ref[3], out[3], refStride[3], refStride[3], w, h);


216  216  
217 
ssdY/= w*h; 

218 
ssdU/= w*h/4; 

219 
ssdV/= w*h/4; 

220 
ssdA/= w*h; 

217 
ssdY/= w*h;


218 
ssdU/= w*h/4;


219 
ssdV/= w*h/4;


220 
ssdA/= w*h;


221  221  
222  222 
sws_freeContext(outContext); 
223  223 
Also available in: Unified diff