summaryrefslogtreecommitdiff
path: root/vpx_dsp
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2016-06-28 09:53:11 -0700
committerYaowu Xu <yaowu@google.com>2016-06-28 09:53:11 -0700
commitd34b49d7b9d6d32d5e291e9c47687e744d893017 (patch)
tree8e885eec2cc12f09ee739ba19a73298f7f0ae456 /vpx_dsp
parent32ac7cabdff90ce4c91e88d220d6c419b092b973 (diff)
downloadlibvpx-d34b49d7b9d6d32d5e291e9c47687e744d893017.tar.gz
libvpx-d34b49d7b9d6d32d5e291e9c47687e744d893017.tar.bz2
libvpx-d34b49d7b9d6d32d5e291e9c47687e744d893017.zip
psnr.c: use int64_t for sum of differences
Since the values can be negative. Change-Id: Idda69e9fb47bb34696aeb20170341a0191c5d85e
Diffstat (limited to 'vpx_dsp')
-rw-r--r--vpx_dsp/psnr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vpx_dsp/psnr.c b/vpx_dsp/psnr.c
index 1655f116c..5bf786271 100644
--- a/vpx_dsp/psnr.c
+++ b/vpx_dsp/psnr.c
@@ -51,7 +51,7 @@ static void encoder_variance(const uint8_t *a, int a_stride,
static void encoder_highbd_variance64(const uint8_t *a8, int a_stride,
const uint8_t *b8, int b_stride,
int w, int h, uint64_t *sse,
- uint64_t *sum) {
+ int64_t *sum) {
int i, j;
uint16_t *a = CONVERT_TO_SHORTPTR(a8);
@@ -75,7 +75,7 @@ static void encoder_highbd_8_variance(const uint8_t *a8, int a_stride,
int w, int h,
unsigned int *sse, int *sum) {
uint64_t sse_long = 0;
- uint64_t sum_long = 0;
+ int64_t sum_long = 0;
encoder_highbd_variance64(a8, a_stride, b8, b_stride, w, h,
&sse_long, &sum_long);
*sse = (unsigned int)sse_long;