ref: 086aab7e131ef05cc02f82566d45815ee6878427
parent: ae206924a621f42cac1a252f2695fac43c9b166a
author: James Zern <jzern@google.com>
date: Sat Oct 29 09:02:50 EDT 2016
tiny_ssim: fix visual studio build s/inttypes.h/vpx_integer.h/ clear a uint64_t -> double conversion warning Change-Id: I58d108b083787a754152eb79ef6df61c2c5f95b1
--- 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
--- a/tools/tiny_ssim.c
+++ b/tools/tiny_ssim.c
@@ -13,7 +13,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <inttypes.h>
+#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 @@
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++;
}