[x265] [PATCH] tcomdatacu: remove memset in initSubCU()

Gopu Govindaswamy gopu at multicorewareinc.com
Wed Nov 6 07:29:59 CET 2013


# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1383719384 -19800
# Node ID c84c0847919f5a3988afe55c1380ee0c1e0235bc
# Parent  4a1df198c432d27d5edb3be5bd9f898176a9e3f4
tcomdatacu: remove memset in initSubCU()

m_trCoeffY, m_trCoeffCb, m_trCoeffCr, m_iPCMSampleY, m_iPCMSampleCb and m_iPCMSampleCr
buffers are getting initialized in initCU(), and its not required to set 0 in initSubCU()

diff -r 4a1df198c432 -r c84c0847919f source/Lib/TLibCommon/TComDataCU.cpp
--- a/source/Lib/TLibCommon/TComDataCU.cpp	Wed Nov 06 11:51:45 2013 +0530
+++ b/source/Lib/TLibCommon/TComDataCU.cpp	Wed Nov 06 11:59:44 2013 +0530
@@ -503,16 +503,6 @@
         m_mvpNum[1][i] = -1;
     }
 
-    uint32_t tmp = width * heigth;
-    memset(m_trCoeffY, 0, sizeof(TCoeff) * tmp);
-    memset(m_iPCMSampleY, 0, sizeof(Pel) * tmp);
-
-    tmp = (width >> m_hChromaShift) * (heigth >> m_vChromaShift);
-    memset(m_trCoeffCb, 0, sizeof(TCoeff) * tmp);
-    memset(m_trCoeffCr, 0, sizeof(TCoeff) * tmp);
-    memset(m_iPCMSampleCb, 0, sizeof(Pel) * tmp);
-    memset(m_iPCMSampleCr, 0, sizeof(Pel) * tmp);
-
     m_cuMvField[0].clearMvField();
     m_cuMvField[1].clearMvField();
 


More information about the x265-devel mailing list