From 086aab7e131ef05cc02f82566d45815ee6878427 Mon Sep 17 00:00:00 2001 From: James Zern Date: Sat, 29 Oct 2016 13:02:50 -0700 Subject: [PATCH] tiny_ssim: fix visual studio build s/inttypes.h/vpx_integer.h/ clear a uint64_t -> double conversion warning Change-Id: I58d108b083787a754152eb79ef6df61c2c5f95b1 --- tools.mk | 1 + tools/tiny_ssim.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools.mk b/tools.mk index 6bd1effb3..3c660b1df 100644 --- a/tools.mk +++ b/tools.mk @@ -10,6 +10,7 @@ # List of tools to build. TOOLS-yes += tiny_ssim.c +tiny_ssim.SRCS += vpx/vpx_integer.h tiny_ssim.GUID = 3afa9b05-940b-4d68-b5aa-55157d8ed7b4 tiny_ssim.DESCRIPTION = Generate SSIM/PSNR from raw .yuv files diff --git a/tools/tiny_ssim.c b/tools/tiny_ssim.c index 89984e5ff..28052e0a8 100644 --- a/tools/tiny_ssim.c +++ b/tools/tiny_ssim.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include "vpx/vpx_integer.h" void vp8_ssim_parms_8x8_c(unsigned char *s, int sp, unsigned char *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, @@ -177,7 +177,8 @@ int main(int argc, char *argv[]) { psnr_and_ssim(ssimv, psnrv, buf[0] + w * h * 5 / 4, buf[1] + w * h * 5 / 4, w / 2, h / 2); ssim += 0.8 * ssimy + 0.1 * (ssimu + ssimv); - psnravg += vp9_mse2psnr(w * h * 6 / 4, 255.0, psnry + psnru + psnrv); + psnravg += + vp9_mse2psnr(w * h * 6 / 4, 255.0, (double)psnry + psnru + psnrv); psnrglb += psnry + psnru + psnrv; n_frames++; } -- 2.40.0