]> granicus.if.org Git - libvpx/commitdiff
tiny_ssim: fix visual studio build
authorJames Zern <jzern@google.com>
Sat, 29 Oct 2016 20:02:50 +0000 (13:02 -0700)
committerJames Zern <jzern@google.com>
Sat, 29 Oct 2016 20:04:07 +0000 (13:04 -0700)
s/inttypes.h/vpx_integer.h/
clear a uint64_t -> double conversion warning

Change-Id: I58d108b083787a754152eb79ef6df61c2c5f95b1

tools.mk
tools/tiny_ssim.c

index 6bd1effb309c9a3110dd91c5591de3d383458940..3c660b1dfd5450ce5ca15648c9d871a42cf201b4 100644 (file)
--- 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
 
index 89984e5ff14945bc5bab8062932c83048fcdbdef..28052e0a84d7fb60cb57299342dcd71f6e7b468e 100644 (file)
@@ -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 @@ 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++;
   }