ref: 794b033f78b332b3935e4afd97f56940a3541953
parent: 2beb5c9f91e7166c2c9d01c94bf84767815121e4
author: Jingning Han <jingning@google.com>
date: Tue Oct 2 06:21:43 EDT 2018
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
--- a/tools/tiny_ssim.c
+++ b/tools/tiny_ssim.c
@@ -605,7 +605,7 @@
}
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 @@
}
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]);