AccumulateLSIM: fix double -> float warnings

Change-Id: I234a5cd09b9351dbbbbc5076be35bb794d1bf890
This commit is contained in:
James Zern 2012-10-19 19:23:39 -07:00
parent c6e98658d2
commit 704818980f

View File

@ -915,7 +915,7 @@ void WebPCleanupTransparentArea(WebPPicture* pic) {
// search radius. Shouldn't be too large.
#define RADIUS 2
static double AccumulateLSIM(const uint8_t* src, int src_stride,
static float AccumulateLSIM(const uint8_t* src, int src_stride,
const uint8_t* ref, int ref_stride,
int w, int h) {
int x, y;
@ -939,7 +939,7 @@ static double AccumulateLSIM(const uint8_t* src, int src_stride,
total_sse += best_sse;
}
}
return total_sse;
return (float)total_sse;
}
#undef RADIUS
@ -993,7 +993,7 @@ int WebPPictureDistortion(const WebPPicture* src, const WebPPicture* ref,
sse[3] = has_alpha ? AccumulateLSIM(src->a, src->a_stride,
ref->a, ref->a_stride,
src->width, src->height)
: 0;
: 0.f;
result[0] = GetPSNR(sse[0] / (src->width * src->height));
result[1] = GetPSNR(sse[1] / (uv_w * uv_h));
result[2] = GetPSNR(sse[2] / (uv_w * uv_h));