diff options
author | sdeng <sdeng@google.com> | 2018-12-13 16:47:10 -0800 |
---|---|---|
committer | sdeng <sdeng@google.com> | 2018-12-17 15:25:37 -0800 |
commit | 9d8122dd72e05408cd438118419f47561855e6bc (patch) | |
tree | ab7c83846000bc6822f72c789da0262c491261e1 /tools | |
parent | 581eed2bc0565f3ddd169c5084cb2afbde188597 (diff) | |
download | libvpx-9d8122dd72e05408cd438118419f47561855e6bc.tar libvpx-9d8122dd72e05408cd438118419f47561855e6bc.tar.gz libvpx-9d8122dd72e05408cd438118419f47561855e6bc.tar.bz2 libvpx-9d8122dd72e05408cd438118419f47561855e6bc.zip |
Disallow the comparison between videos with different bit depth
Change-Id: I1fd8e991f2440925e989d8e7ab33fdf5f6b1d36b
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tiny_ssim.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/tiny_ssim.c b/tools/tiny_ssim.c index 67a6903b5..6be190393 100644 --- a/tools/tiny_ssim.c +++ b/tools/tiny_ssim.c @@ -629,6 +629,15 @@ int main(int argc, char *argv[]) { 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 |