]> granicus.if.org Git - libvpx/commitdiff
fix a bug of tiny_ssim when the bit depth is 8
authorLiu Peng <pengliu.mail@gmail.com>
Fri, 14 Sep 2018 20:04:16 +0000 (15:04 -0500)
committerJohann Koenig <johannkoenig@google.com>
Fri, 14 Sep 2018 20:10:15 +0000 (20:10 +0000)
Change-Id: I2563e661c71b474fe04b70cd9b713d478a27ac5f

tools/tiny_ssim.c

index 6c1d784d3b7734b62df32f768fb6458e2b2e4253..d6b213859584a17fd83b8661aaaadb0ba8790665 100644 (file)
@@ -124,8 +124,8 @@ static int open_input_file(const char *file_name, input_file_t *input, int w,
         input->frame_size = w * h + ((w + 1) / 2 * (h + 1) / 2) * 2;
         if (bit_depth > 8) {
           input->frame_size *= 2;
-          input->buf = malloc(input->frame_size);
         }
+        input->buf = malloc(input->frame_size);
         break;
     }
   }