[x265] [PATCH 1 of 2] rd: remove unnecessary sbaccoder loads

deepthidevaki at multicorewareinc.com deepthidevaki at multicorewareinc.com
Tue Dec 17 10:40:21 CET 2013


# HG changeset patch
# User Deepthi Devaki <deepthidevaki at multicorewareinc.com>
# Date 1387272198 -19800
# Node ID 37e0b00adeec53e94726fa4e0f44a3fdee966354
# Parent  119d09b54b956a376b3d1f6a86bb9d625513ca7e
rd: remove unnecessary sbaccoder loads

diff -r 119d09b54b95 -r 37e0b00adeec source/Lib/TLibEncoder/TEncCu.h
--- a/source/Lib/TLibEncoder/TEncCu.h	Tue Dec 17 12:40:04 2013 +0530
+++ b/source/Lib/TLibEncoder/TEncCu.h	Tue Dec 17 14:53:18 2013 +0530
@@ -174,7 +174,7 @@
     void xComputeCostInter(TComDataCU* outTempCU, TComYuv* outPredYUV, PartSize partSize, bool bUseMRG = false);
     void xComputeCostMerge2Nx2N(TComDataCU*& outBestCU, TComDataCU*& outTempCU, TComYuv*& bestPredYuv, TComYuv*& tmpPredYuv);
     void xEncodeIntraInInter(TComDataCU* cu, TComYuv* fencYuv, TComYuv* predYuv, TShortYUV* outResiYuv, TComYuv* outReconYuv);
-    void encodeResidue(TComDataCU* lcu, TComDataCU* cu, uint32_t absPartIdx, UChar depth, uint32_t partIndex);
+    void encodeResidue(TComDataCU* lcu, TComDataCU* cu, uint32_t absPartIdx, UChar depth);
     void xCheckRDCostIntra(TComDataCU*& outBestCU, TComDataCU*& outTempCU, PartSize partSize);
     void xCheckRDCostIntraInInter(TComDataCU*& outBestCU, TComDataCU*& outTempCU, PartSize partSize);
     void xCheckDQP(TComDataCU* cu);
diff -r 119d09b54b95 -r 37e0b00adeec source/encoder/compress.cpp
--- a/source/encoder/compress.cpp	Tue Dec 17 12:40:04 2013 +0530
+++ b/source/encoder/compress.cpp	Tue Dec 17 14:53:18 2013 +0530
@@ -830,7 +830,7 @@
 
     if (m_cfg->param.rdLevel == 0 && depth == 0)
     {
-        encodeResidue(outBestCU, outBestCU, 0, 0, 0);
+        encodeResidue(outBestCU, outBestCU, 0, 0);
     }
     else
     {
@@ -847,25 +847,13 @@
     assert(outBestCU->m_totalCost != MAX_DOUBLE);
 }
 
-void TEncCu::encodeResidue(TComDataCU* lcu, TComDataCU* cu, uint32_t absPartIdx, UChar depth, uint32_t partIndex)
+void TEncCu::encodeResidue(TComDataCU* lcu, TComDataCU* cu, uint32_t absPartIdx, UChar depth)
 {
     UChar nextDepth = (UChar)(depth + 1);
     TComDataCU* subTempPartCU = m_tempCU[nextDepth];
     TComPic* pic = cu->getPic();
     TComSlice* slice = cu->getPic()->getSlice();
 
-    if (depth != 0)
-    {
-        if (0 == partIndex) //initialize RD with previous depth buffer
-        {
-            m_rdSbacCoders[depth][CI_CURR_BEST]->load(m_rdSbacCoders[depth - 1][CI_CURR_BEST]);
-        }
-        else
-        {
-            m_rdSbacCoders[depth][CI_CURR_BEST]->load(m_rdSbacCoders[depth][CI_NEXT_BEST]);
-        }
-    }
-
     if (((depth < lcu->getDepth(absPartIdx)) && (depth < (g_maxCUDepth - g_addCUDepth))))
     {
         uint32_t qNumParts = (pic->getNumPartInCU() >> (depth << 1)) >> 2;
@@ -877,7 +865,7 @@
             if (bInSlice && (lpelx < slice->getSPS()->getPicWidthInLumaSamples()) && (tpely < slice->getSPS()->getPicHeightInLumaSamples()))
             {
                 subTempPartCU->copyToSubCU(cu, partUnitIdx, depth + 1);
-                encodeResidue(lcu, subTempPartCU, absPartIdx, depth + 1, partUnitIdx);
+                encodeResidue(lcu, subTempPartCU, absPartIdx, depth + 1);
             }
         }
 


More information about the x265-devel mailing list