[x265] [PATCH] sao.cpp: init additional pixels for SAO

praveen at multicorewareinc.com praveen at multicorewareinc.com
Thu Mar 5 11:36:15 CET 2015


# HG changeset patch
# User Praveen Tiwari <praveen at multicorewareinc.com>
# Date 1425551764 -19800
# Node ID 60f49deb3fa58bc35ba6e0557259433c01ee43e6
# Parent  ea9bdb10353fcb06cea1045ba0186c22c448df63
sao.cpp: init additional pixels for SAO

Prevents uninit read warnings from valgrind

diff -r ea9bdb10353f -r 60f49deb3fa5 source/encoder/sao.cpp
--- a/source/encoder/sao.cpp	Wed Mar 04 13:20:55 2015 +0530
+++ b/source/encoder/sao.cpp	Thu Mar 05 16:06:04 2015 +0530
@@ -261,6 +261,8 @@
     int8_t _upBuff1[MAX_CU_SIZE + 2], *upBuff1 = _upBuff1 + 1;
     int8_t _upBufft[MAX_CU_SIZE + 2], *upBufft = _upBufft + 1;
 
+    memset(_upBuff1 + MAX_CU_SIZE, 0, 2 * sizeof(int8_t));
+
     {
         const pixel* recR = &rec[ctuWidth - 1];
         for (int i = 0; i < ctuHeight + 1; i++)


More information about the x265-devel mailing list