[x265] [PATCH] tcomdataCU:Remove initialization (memset) in initCU() which was already initialized in create()

Gopu Govindaswamy gopu at multicorewareinc.com
Tue Oct 29 09:45:46 CET 2013


# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1383036328 -19800
# Node ID fee46b42d31061bf684864bf5f002b6804f57a7b
# Parent  4c618e33c25f98597d529d4e6ec9fb899bdc1d41
tcomdataCU:Remove initialization (memset) in initCU() which was already initialized in create()

currently m_partSizes, m_mvpIdx[0] and m_mvpIdx[1] all three variables initialized using memset in TComDataCU::create()
and same initialization in done in TComDataCU::initCU(), removed the memset in initCU() to avoid the duplicate initilization

diff -r 4c618e33c25f -r fee46b42d310 source/Lib/TLibCommon/TComDataCU.cpp
--- a/source/Lib/TLibCommon/TComDataCU.cpp	Tue Oct 29 11:16:32 2013 +0530
+++ b/source/Lib/TLibCommon/TComDataCU.cpp	Tue Oct 29 14:15:28 2013 +0530
@@ -287,7 +287,6 @@
     if (numElements > 0)
     {
         memset(m_skipFlag         + firstElement, false,                    numElements * sizeof(*m_skipFlag));
-        memset(m_partSizes        + firstElement, SIZE_NONE,                numElements * sizeof(*m_partSizes));
         memset(m_predModes        + firstElement, MODE_NONE,                numElements * sizeof(*m_predModes));
         memset(m_cuTransquantBypass + firstElement, false,                  numElements * sizeof(*m_cuTransquantBypass));
         memset(m_depth            + firstElement, 0,                        numElements * sizeof(*m_depth));
@@ -297,8 +296,6 @@
         memset(m_transformSkip[2] + firstElement, 0,                        numElements * sizeof(*m_transformSkip[2]));
         memset(m_width            + firstElement, g_maxCUWidth,             numElements * sizeof(*m_width));
         memset(m_height           + firstElement, g_maxCUHeight,            numElements * sizeof(*m_height));
-        memset(m_mvpIdx[0]        + firstElement, -1,                       numElements * sizeof(*m_mvpIdx[0]));
-        memset(m_mvpIdx[1]        + firstElement, -1,                       numElements * sizeof(*m_mvpIdx[1]));
         memset(m_mvpNum[0]        + firstElement, -1,                       numElements * sizeof(*m_mvpNum[0]));
         memset(m_mvpNum[1]        + firstElement, -1,                       numElements * sizeof(*m_mvpNum[1]));
         memset(m_qp               + firstElement, getSlice()->getSliceQp(), numElements * sizeof(*m_qp));


More information about the x265-devel mailing list