mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
AccumulateLSIM: fix double -> float warnings
Change-Id: I234a5cd09b9351dbbbbc5076be35bb794d1bf890
This commit is contained in:
parent
c6e98658d2
commit
704818980f
@ -915,7 +915,7 @@ void WebPCleanupTransparentArea(WebPPicture* pic) {
|
|||||||
// search radius. Shouldn't be too large.
|
// search radius. Shouldn't be too large.
|
||||||
#define RADIUS 2
|
#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,
|
const uint8_t* ref, int ref_stride,
|
||||||
int w, int h) {
|
int w, int h) {
|
||||||
int x, y;
|
int x, y;
|
||||||
@ -939,7 +939,7 @@ static double AccumulateLSIM(const uint8_t* src, int src_stride,
|
|||||||
total_sse += best_sse;
|
total_sse += best_sse;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return total_sse;
|
return (float)total_sse;
|
||||||
}
|
}
|
||||||
#undef RADIUS
|
#undef RADIUS
|
||||||
|
|
||||||
@ -993,7 +993,7 @@ int WebPPictureDistortion(const WebPPicture* src, const WebPPicture* ref,
|
|||||||
sse[3] = has_alpha ? AccumulateLSIM(src->a, src->a_stride,
|
sse[3] = has_alpha ? AccumulateLSIM(src->a, src->a_stride,
|
||||||
ref->a, ref->a_stride,
|
ref->a, ref->a_stride,
|
||||||
src->width, src->height)
|
src->width, src->height)
|
||||||
: 0;
|
: 0.f;
|
||||||
result[0] = GetPSNR(sse[0] / (src->width * src->height));
|
result[0] = GetPSNR(sse[0] / (src->width * src->height));
|
||||||
result[1] = GetPSNR(sse[1] / (uv_w * uv_h));
|
result[1] = GetPSNR(sse[1] / (uv_w * uv_h));
|
||||||
result[2] = GetPSNR(sse[2] / (uv_w * uv_h));
|
result[2] = GetPSNR(sse[2] / (uv_w * uv_h));
|
||||||
|
Loading…
Reference in New Issue
Block a user