From 794b033f78b332b3935e4afd97f56940a3541953 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Tue, 2 Oct 2018 10:21:43 -0700 Subject: [PATCH] Minor clean-up in tiny_ssim.c Report the correct filename in error message. Explicitly assign floating point value to double type. Change-Id: I42fd2da6e16b1e3e7ec221d5d562a728a93c0196 --- tools/tiny_ssim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tiny_ssim.c b/tools/tiny_ssim.c index 315d1c1..6f4b6d7 100644 --- a/tools/tiny_ssim.c +++ b/tools/tiny_ssim.c @@ -605,7 +605,7 @@ int main(int argc, char *argv[]) { } if (open_input_file(argv[1], &in[0], w, h, bit_depth) < 0) { - fprintf(stderr, "File %s can't be opened or parsed!\n", argv[2]); + fprintf(stderr, "File %s can't be opened or parsed!\n", argv[1]); goto clean_up; } @@ -617,7 +617,7 @@ int main(int argc, char *argv[]) { } if (bit_depth == 10) peak = 1023.0; - if (bit_depth == 12) peak = 4095; + if (bit_depth == 12) peak = 4095.0; if (open_input_file(argv[2], &in[1], w, h, bit_depth) < 0) { fprintf(stderr, "File %s can't be opened or parsed!\n", argv[2]); -- 2.7.4