mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 05:38:22 +01:00
AccumulateLSIM: fix double -> float warnings
Change-Id: I234a5cd09b9351dbbbbc5076be35bb794d1bf890
This commit is contained in:
parent
c6e98658d2
commit
704818980f
@ -915,9 +915,9 @@ void WebPCleanupTransparentArea(WebPPicture* pic) {
|
||||
// search radius. Shouldn't be too large.
|
||||
#define RADIUS 2
|
||||
|
||||
static double AccumulateLSIM(const uint8_t* src, int src_stride,
|
||||
const uint8_t* ref, int ref_stride,
|
||||
int w, int h) {
|
||||
static float AccumulateLSIM(const uint8_t* src, int src_stride,
|
||||
const uint8_t* ref, int ref_stride,
|
||||
int w, int h) {
|
||||
int x, y;
|
||||
double total_sse = 0.;
|
||||
for (y = 0; y < h; ++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));
|
||||
|
Loading…
Reference in New Issue
Block a user