[x265] cleanup clear()

Satoshi Nakagawa nakagawa424 at oki.com
Wed May 14 07:18:47 CEST 2014


# HG changeset patch
# User Satoshi Nakagawa <nakagawa424 at oki.com>
# Date 1400044388 -32400
#      Wed May 14 14:13:08 2014 +0900
# Node ID 6bc19f61d3d6e7e93bf2b020458015e50e4bfc04
# Parent  a4d0d5679c28d6523e6b01a55fe548c3140118a6
cleanup clear()

diff -r a4d0d5679c28 -r 6bc19f61d3d6 source/Lib/TLibEncoder/TEncCu.cpp
--- a/source/Lib/TLibEncoder/TEncCu.cpp	Sun May 11 17:32:37 2014 +0900
+++ b/source/Lib/TLibEncoder/TEncCu.cpp	Wed May 14 14:13:08 2014 +0900
@@ -1354,8 +1354,6 @@
     outTempCU->setPredModeSubParts(MODE_INTER, 0, depth);
     outTempCU->setCUTransquantBypassSubParts(m_CUTransquantBypassFlagValue, 0, depth);
 
-    m_tmpRecoYuv[depth]->clear(); // TODO: Are either of these clears necessary?
-    m_tmpResiYuv[depth]->clear();
     if (m_search->predInterSearch(outTempCU, m_tmpPredYuv[depth], bUseMRG, true))
     {
         m_search->encodeResAndCalcRdInterCU(outTempCU, m_origYuv[depth], m_tmpPredYuv[depth], m_tmpResiYuv[depth], m_bestResiYuv[depth], m_tmpRecoYuv[depth], false, true);
diff -r a4d0d5679c28 -r 6bc19f61d3d6 source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp	Sun May 11 17:32:37 2014 +0900
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp	Wed May 14 14:13:08 2014 +0900
@@ -2662,8 +2662,6 @@
     {
         cu->setSkipFlagSubParts(true, 0, cu->getDepth(0));
 
-        outResiYuv->clear();
-
         predYuv->copyToPartYuv(outReconYuv, 0);
         //Luma
         int part = partitionFromSizes(width, height);
@@ -2745,11 +2743,7 @@
 
     if (cost < bcost)
     {
-        if (!cu->getQtRootCbf(0))
-        {
-            outBestResiYuv->clear();
-        }
-        else
+        if (cu->getQtRootCbf(0))
         {
             xSetResidualQTData(cu, 0, 0, outBestResiYuv, cu->getDepth(0), true);
         }


More information about the x265-devel mailing list