[x265] [PATCH] fix overflow error in satd_4x4 for psyCost_ss

Divya Manivannan divya at multicorewareinc.com
Wed Jan 7 12:49:11 CET 2015


# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1420631331 -19800
#      Wed Jan 07 17:18:51 2015 +0530
# Node ID 3f4259a9b8c34f858b2f48de8664b6a372f9bb5c
# Parent  ee358bb8ea82a68c5efe56120f8a2657ff59c983
fix overflow error in satd_4x4 for psyCost_ss

diff -r ee358bb8ea82 -r 3f4259a9b8c3 source/common/pixel.cpp
--- a/source/common/pixel.cpp	Wed Jan 07 15:18:13 2015 +0530
+++ b/source/common/pixel.cpp	Wed Jan 07 17:18:51 2015 +0530
@@ -243,9 +243,9 @@
 
 int satd_4x4(const int16_t* pix1, intptr_t stride_pix1, const int16_t* pix2, intptr_t stride_pix2)
 {
-    ssum2_t tmp[4][2];
-    ssum2_t a0, a1, a2, a3, b0, b1;
-    ssum2_t sum = 0;
+    long long tmp[4][2];
+    long long a0, a1, a2, a3, b0, b1;
+    long long sum = 0;
 
     for (int i = 0; i < 4; i++, pix1 += stride_pix1, pix2 += stride_pix2)
     {


More information about the x265-devel mailing list