shithub: libvpx

Download patch

ref: 9d8122dd72e05408cd438118419f47561855e6bc
parent: 581eed2bc0565f3ddd169c5084cb2afbde188597
author: sdeng <[email protected]>
date: Thu Dec 13 11:47:10 EST 2018

Disallow the comparison between videos with different bit depth

Change-Id: I1fd8e991f2440925e989d8e7ab33fdf5f6b1d36b

--- a/tools/tiny_ssim.c
+++ b/tools/tiny_ssim.c
@@ -629,6 +629,15 @@
     goto clean_up;
   }
 
+  if (in[0].bit_depth != in[1].bit_depth) {
+    fprintf(stderr,
+            "Failing: Image bit depths don't match or are unspecified!\n");
+    return_value = 1;
+    goto clean_up;
+  }
+
+  bit_depth = in[0].bit_depth;
+
   // Number of frames to skip from file1.yuv for every frame used. Normal
   // values 0, 1 and 3 correspond to TL2, TL1 and TL0 respectively for a 3TL
   // encoding in mode 10. 7 would be reasonable for comparing TL0 of a 4-layer