[x265] [PATCH 2 of 2] TComDataCU: replace getTotalNumPart() with CU structure details

santhoshini at multicorewareinc.com santhoshini at multicorewareinc.com
Tue Sep 30 05:34:29 CEST 2014


# HG changeset patch
# User Santhoshini Sekar <santhoshini at multicorewareinc.com>
# Date 1412047862 -19800
#      Tue Sep 30 09:01:02 2014 +0530
# Node ID ecd15b4dfdeab9ddd16b11b1894aebfc66738c47
# Parent  21b1e8daa7e97e3828dfd948ff776951b939f423
TComDataCU: replace getTotalNumPart() with CU structure details

diff -r 21b1e8daa7e9 -r ecd15b4dfdea source/Lib/TLibCommon/TComDataCU.cpp
--- a/source/Lib/TLibCommon/TComDataCU.cpp	Tue Sep 30 08:52:56 2014 +0530
+++ b/source/Lib/TLibCommon/TComDataCU.cpp	Tue Sep 30 09:01:02 2014 +0530
@@ -409,7 +409,7 @@
     m_mvBits           = 0;
     m_coeffBits        = 0;
 
-    m_numPartitions    = cu->getTotalNumPart() >> 2;
+    m_numPartitions    = cuData->numPartitions;
 
     for (int i = 0; i < 4; i++)
     {
@@ -456,7 +456,7 @@
 {
     X265_CHECK(partUnitIdx < 4, "part unit should be less than 4\n");
 
-    uint32_t partOffset = (cu->getTotalNumPart() >> 2) * partUnitIdx;
+    uint32_t partOffset = cuData->numPartitions * partUnitIdx;
 
     m_pic              = cu->m_pic;
     m_slice            = cu->m_slice;
@@ -474,7 +474,7 @@
     m_totalBits        = 0;
     m_mvBits           = 0;
     m_coeffBits        = 0;
-    m_numPartitions    = cu->getTotalNumPart() >> 2;
+    m_numPartitions    = cuData->numPartitions;
 
     TComDataCU* otherCU = m_pic->getCU(m_cuAddr);
     int sizeInChar  = sizeof(char) * m_numPartitions;
@@ -496,7 +496,7 @@
 
 // Copy small CU to bigger CU.
 // One of quarter parts overwritten by predicted sub part.
-void TComDataCU::copyPartFrom(TComDataCU* cu, uint32_t partUnitIdx, uint32_t depth, bool isRDObasedAnalysis)
+void TComDataCU::copyPartFrom(TComDataCU* cu, CU* cuData, uint32_t partUnitIdx, uint32_t depth, bool isRDObasedAnalysis)
 {
     X265_CHECK(partUnitIdx < 4, "part unit should be less than 4\n");
     if (isRDObasedAnalysis)
@@ -511,8 +511,8 @@
     m_mvBits           += cu->m_mvBits;
     m_coeffBits        += cu->m_coeffBits;
 
-    uint32_t offset       = cu->getTotalNumPart() * partUnitIdx;
-    uint32_t numPartition = cu->getTotalNumPart();
+    uint32_t offset       = cuData->numPartitions * partUnitIdx;
+    uint32_t numPartition = cuData->numPartitions;
     int sizeInBool  = sizeof(bool) * numPartition;
     int sizeInChar  = sizeof(char) * numPartition;
     memcpy(m_skipFlag  + offset, cu->getSkipFlag(),       sizeof(*m_skipFlag)   * numPartition);
@@ -544,8 +544,8 @@
     m_cuAbove          = cu->getCUAbove();
     m_cuLeft           = cu->getCULeft();
 
-    m_cuMvField[0].copyFrom(cu->getCUMvField(REF_PIC_LIST_0), cu->getTotalNumPart(), offset);
-    m_cuMvField[1].copyFrom(cu->getCUMvField(REF_PIC_LIST_1), cu->getTotalNumPart(), offset);
+    m_cuMvField[0].copyFrom(cu->getCUMvField(REF_PIC_LIST_0), cuData->numPartitions, offset);
+    m_cuMvField[1].copyFrom(cu->getCUMvField(REF_PIC_LIST_1), cuData->numPartitions, offset);
 
     uint32_t tmp  = 1 << ((g_maxLog2CUSize - depth) * 2);
     uint32_t tmp2 = partUnitIdx * tmp;
@@ -2435,6 +2435,7 @@
                 cu->childIdx = child_idx;
                 cu->encodeIdx = g_depthScanIdx[yOffset][xOffset] * 4;
                 cu->flags = 0;
+                cu->numPartitions = (NUM_CU_PARTITIONS >> ((g_maxLog2CUSize - cu->log2CUSize) * 2));
 
                 CU_SET_FLAG(cu->flags, CU::PRESENT, present_flag);
                 CU_SET_FLAG(cu->flags, CU::SPLIT_MANDATORY | CU::SPLIT, split_mandatory_flag);
diff -r 21b1e8daa7e9 -r ecd15b4dfdea source/Lib/TLibCommon/TComDataCU.h
--- a/source/Lib/TLibCommon/TComDataCU.h	Tue Sep 30 08:52:56 2014 +0530
+++ b/source/Lib/TLibCommon/TComDataCU.h	Tue Sep 30 09:01:02 2014 +0530
@@ -115,6 +115,7 @@
     uint32_t childIdx;   // Index of the first child CU
     uint32_t encodeIdx;  // Encoding index of this CU in terms of 8x8 blocks.
     uint32_t flags;      // CU flags.
+    uint32_t numPartitions;// Number of 4x4 blocks in the CU
 };
 
 // Partition count table, index represents partitioning mode.
@@ -276,7 +277,7 @@
     void          loadCTUData(uint32_t maxCUSize);
 
     void          copyToSubCU(TComDataCU* lcu, CU* cuData, uint32_t partUnitIdx, uint32_t depth);
-    void          copyPartFrom(TComDataCU* cu, uint32_t partUnitIdx, uint32_t depth, bool isRDObasedAnalysis = true);
+    void          copyPartFrom(TComDataCU* cu, CU* cuData, uint32_t partUnitIdx, uint32_t depth, bool isRDObasedAnalysis = true);
 
     void          copyToPic(uint32_t depth);
     void          copyToPic(uint32_t depth, uint32_t partIdx, uint32_t partDepth);
@@ -510,8 +511,6 @@
     // member functions for RD cost storage
     // -------------------------------------------------------------------------------------------------------------------
 
-    uint32_t&     getTotalNumPart()     { return m_numPartitions; }
-
     ScanType      getCoefScanIdx(uint32_t absPartIdx, uint32_t log2TrSize, bool bIsLuma, bool bIsIntra);
     void          getTUEntropyCodingParameters(TUEntropyCodingParameters &result, uint32_t absPartIdx, uint32_t log2TrSize, bool bIsLuma);
 
diff -r 21b1e8daa7e9 -r ecd15b4dfdea source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp	Tue Sep 30 08:52:56 2014 +0530
+++ b/source/encoder/analysis.cpp	Tue Sep 30 09:01:02 2014 +0530
@@ -240,7 +240,7 @@
     m_tempCU[0]->initCU(pic, cuAddr);
 
     // analysis of CU
-    uint32_t numPartition = cu->getTotalNumPart();
+    uint32_t numPartition = cu->m_CULocalData->numPartitions;
     if (m_bestCU[0]->m_slice->m_sliceType == I_SLICE)
     {
         if (m_param->analysisMode == X265_ANALYSIS_LOAD && pic->m_intraData)
@@ -256,9 +256,9 @@
             compressIntraCU(m_bestCU[0], m_tempCU[0], false, cu->m_CULocalData);
             if (m_param->analysisMode == X265_ANALYSIS_SAVE && pic->m_intraData)
             {
-                memcpy(&pic->m_intraData->depth[cuAddr * cu->m_numPartitions], m_bestCU[0]->getDepth(), sizeof(uint8_t) * cu->getTotalNumPart());
-                memcpy(&pic->m_intraData->modes[cuAddr * cu->m_numPartitions], m_bestCU[0]->getLumaIntraDir(), sizeof(uint8_t) * cu->getTotalNumPart());
-                memcpy(&pic->m_intraData->partSizes[cuAddr * cu->m_numPartitions], m_bestCU[0]->getPartitionSize(), sizeof(char) * cu->getTotalNumPart());
+                memcpy(&pic->m_intraData->depth[cuAddr * cu->m_numPartitions], m_bestCU[0]->getDepth(), sizeof(uint8_t) * numPartition);
+                memcpy(&pic->m_intraData->modes[cuAddr * cu->m_numPartitions], m_bestCU[0]->getLumaIntraDir(), sizeof(uint8_t) * numPartition);
+                memcpy(&pic->m_intraData->partSizes[cuAddr * cu->m_numPartitions], m_bestCU[0]->getPartitionSize(), sizeof(char) * numPartition);
                 pic->m_intraData->cuAddr[cuAddr] = cuAddr;
                 pic->m_intraData->poc[cuAddr]    = cu->m_pic->m_POC;
             }
@@ -414,13 +414,13 @@
                     m_rdEntropyCoders[nextDepth][CI_CURR_BEST].load(m_rdEntropyCoders[nextDepth][CI_NEXT_BEST]);
 
                 compressIntraCU(subBestPartCU, subTempPartCU, nextDepth, child_cu);
-                outTempCU->copyPartFrom(subBestPartCU, partUnitIdx, nextDepth); // Keep best part data to current temporary data.
-                m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], subBestPartCU->getTotalNumPart() * partUnitIdx);
+                outTempCU->copyPartFrom(subBestPartCU, child_cu, partUnitIdx, nextDepth); // Keep best part data to current temporary data.
+                m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], child_cu->numPartitions * partUnitIdx);
             }
             else
             {
                 subBestPartCU->copyToPic(nextDepth);
-                outTempCU->copyPartFrom(subBestPartCU, partUnitIdx, nextDepth);
+                outTempCU->copyPartFrom(subBestPartCU, child_cu, partUnitIdx, nextDepth);
             }
         }
         if (cu_unsplit_flag)
@@ -438,7 +438,7 @@
         if (depth == slice->m_pps->maxCuDQPDepth && slice->m_pps->bUseDQP)
         {
             bool hasResidual = false;
-            for (uint32_t blkIdx = 0; blkIdx < outTempCU->getTotalNumPart(); blkIdx++)
+            for (uint32_t blkIdx = 0; blkIdx < cu->numPartitions; blkIdx++)
             {
                 if (outTempCU->getCbf(blkIdx, TEXT_LUMA) || outTempCU->getCbf(blkIdx, TEXT_CHROMA_U) ||
                     outTempCU->getCbf(blkIdx, TEXT_CHROMA_V))
@@ -553,17 +553,17 @@
                 subTempPartCU->m_totalRDCost = 1;
 
                 compressSharedIntraCTU(subBestPartCU, subTempPartCU, nextDepth, child_cu, sharedDepth, sharedPartSizes, sharedModes, zOrder);
-                outTempCU->copyPartFrom(subBestPartCU, partUnitIdx, nextDepth); // Keep best part data to current temporary data.
+                outTempCU->copyPartFrom(subBestPartCU, child_cu, partUnitIdx, nextDepth); // Keep best part data to current temporary data.
 
                 if (!subBestPartCU->m_totalRDCost) // if cost is 0, CU is best CU
                     outTempCU->m_totalRDCost = 0;  // set outTempCU cost to 0, so later check will use this CU as best CU
 
-                m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], subBestPartCU->getTotalNumPart() * partUnitIdx);
+                m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], child_cu->numPartitions * partUnitIdx);
             }
             else
             {
                 subBestPartCU->copyToPic(nextDepth);
-                outTempCU->copyPartFrom(subBestPartCU, partUnitIdx, nextDepth);
+                outTempCU->copyPartFrom(subBestPartCU, child_cu, partUnitIdx, nextDepth);
 
                 // increment zOrder offset to point to next best depth in sharedDepth buffer
                 zOrder += g_depthInc[ctuToDepthIndex][nextDepth];
@@ -579,7 +579,7 @@
         if (depth == slice->m_pps->maxCuDQPDepth && slice->m_pps->bUseDQP)
         {
             bool hasResidual = false;
-            for (uint32_t blkIdx = 0; blkIdx < outTempCU->getTotalNumPart(); blkIdx++)
+            for (uint32_t blkIdx = 0; blkIdx < cu->numPartitions; blkIdx++)
             {
                 if (outTempCU->getCbf(blkIdx, TEXT_LUMA) || outTempCU->getCbf(blkIdx, TEXT_CHROMA_U) ||
                     outTempCU->getCbf(blkIdx, TEXT_CHROMA_V))
@@ -704,8 +704,7 @@
         char previousQP = colocated0->getQP(0);
         uint32_t delta = 0, minDepth0 = 4, minDepth1 = 4;
         uint32_t sum0 = 0, sum1 = 0;
-        uint32_t numPartitions = outTempCU->getTotalNumPart();
-        for (uint32_t i = 0; i < numPartitions; i = i + 4)
+        for (uint32_t i = 0; i < cu->numPartitions; i = i + 4)
         {
             uint32_t j = absPartIdx + i;
             if (colocated0 && colocated0->getDepth(j) < minDepth0)
@@ -718,7 +717,7 @@
                 sum1 += (colocated1->getDepth(j) * 4);
         }
 
-        uint32_t avgDepth2 = (sum0 + sum1) / numPartitions;
+        uint32_t avgDepth2 = (sum0 + sum1) / cu->numPartitions;
         minDepth = X265_MIN(minDepth0, minDepth1);
         if (((currentQP - previousQP) < 0) || (((currentQP - previousQP) >= 0) && ((avgDepth2 - 2 * minDepth) > 1)))
             delta = 0;
@@ -1032,16 +1031,16 @@
                 }
 
                 /* Adding costs from best SUbCUs */
-                outTempCU->copyPartFrom(subBestPartCU, partUnitIdx, nextDepth, true); // Keep best part data to current temporary data.
+                outTempCU->copyPartFrom(subBestPartCU, child_cu, partUnitIdx, nextDepth, true); // Keep best part data to current temporary data.
                 if (m_param->rdLevel)
-                    m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], subBestPartCU->getTotalNumPart() * partUnitIdx);
+                    m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], child_cu->numPartitions * partUnitIdx);
                 else
-                    m_bestPredYuv[nextDepth]->copyToPartYuv(m_tmpPredYuv[depth], subBestPartCU->getTotalNumPart() * partUnitIdx);
+                    m_bestPredYuv[nextDepth]->copyToPartYuv(m_tmpPredYuv[depth], child_cu->numPartitions * partUnitIdx);
             }
             else
             {
                 subTempPartCU->copyToPic(nextDepth);
-                outTempCU->copyPartFrom(subTempPartCU, partUnitIdx, nextDepth, false);
+                outTempCU->copyPartFrom(subTempPartCU, child_cu, partUnitIdx, nextDepth, false);
             }
         }
 
@@ -1064,7 +1063,7 @@
         if (depth == slice->m_pps->maxCuDQPDepth && slice->m_pps->bUseDQP)
         {
             bool hasResidual = false;
-            for (uint32_t blkIdx = 0; blkIdx < outTempCU->getTotalNumPart(); blkIdx++)
+            for (uint32_t blkIdx = 0; blkIdx < cu->numPartitions; blkIdx++)
             {
                 if (outTempCU->getCbf(blkIdx, TEXT_LUMA) || outTempCU->getCbf(blkIdx, TEXT_CHROMA_U) ||
                     outTempCU->getCbf(blkIdx, TEXT_CHROMA_V))
@@ -1370,13 +1369,13 @@
                     m_rdEntropyCoders[nextDepth][CI_CURR_BEST].load(m_rdEntropyCoders[depth][CI_CURR_BEST]);
 
                 compressInterCU_rd5_6(subBestPartCU, subTempPartCU, nextDepth, child_cu);
-                outTempCU->copyPartFrom(subBestPartCU, partUnitIdx, nextDepth); // Keep best part data to current temporary data.
-                m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], subBestPartCU->getTotalNumPart() * partUnitIdx);
+                outTempCU->copyPartFrom(subBestPartCU, child_cu, partUnitIdx, nextDepth); // Keep best part data to current temporary data.
+                m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], child_cu->numPartitions * partUnitIdx);
             }
             else
             {
                 subBestPartCU->copyToPic(nextDepth);
-                outTempCU->copyPartFrom(subBestPartCU, partUnitIdx, nextDepth);
+                outTempCU->copyPartFrom(subBestPartCU, child_cu, partUnitIdx, nextDepth);
             }
         }
 
@@ -1395,7 +1394,7 @@
         if (depth == slice->m_pps->maxCuDQPDepth && slice->m_pps->bUseDQP)
         {
             bool hasResidual = false;
-            for (uint32_t blkIdx = 0; blkIdx < outTempCU->getTotalNumPart(); blkIdx++)
+            for (uint32_t blkIdx = 0; blkIdx < cu->numPartitions; blkIdx++)
             {
                 if (outTempCU->getCbf(blkIdx, TEXT_LUMA) || outTempCU->getCbf(blkIdx, TEXT_CHROMA_U) ||
                     outTempCU->getCbf(blkIdx, TEXT_CHROMA_V))
diff -r 21b1e8daa7e9 -r ecd15b4dfdea source/encoder/search.cpp
--- a/source/encoder/search.cpp	Tue Sep 30 08:52:56 2014 +0530
+++ b/source/encoder/search.cpp	Tue Sep 30 09:01:02 2014 +0530
@@ -196,7 +196,7 @@
     }
 }
 
-void Search::xEncIntraHeaderLuma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx)
+void Search::xEncIntraHeaderLuma(TComDataCU* cu, CU* cuData, uint32_t trDepth, uint32_t absPartIdx)
 {
     // CU header
     if (!absPartIdx)
@@ -219,7 +219,7 @@
     }
     else
     {
-        uint32_t qtNumParts = cu->getTotalNumPart() >> 2;
+        uint32_t qtNumParts = cuData->numPartitions >> 2;
         if (!trDepth)
         {
             X265_CHECK(absPartIdx == 0, "unexpected absPartIdx %d\n", absPartIdx);
@@ -231,7 +231,7 @@
     }
 }
 
-void Search::xEncIntraHeaderChroma(TComDataCU* cu, uint32_t absPartIdx)
+void Search::xEncIntraHeaderChroma(TComDataCU* cu, CU* cuData, uint32_t absPartIdx)
 {
     // chroma prediction mode
     if (cu->getPartitionSize(0) == SIZE_2Nx2N || cu->getChromaFormat() != X265_CSP_I444)
@@ -241,27 +241,27 @@
     }
     else
     {
-        uint32_t qtNumParts = cu->getTotalNumPart() >> 2;
+        uint32_t qtNumParts = cuData->numPartitions >> 2;
         if (!(absPartIdx & (qtNumParts - 1)))
             m_entropyCoder.codeIntraDirChroma(cu, absPartIdx);
     }
 }
 
-uint32_t Search::xGetIntraBitsQTChroma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx, uint32_t absPartIdxStep)
+uint32_t Search::xGetIntraBitsQTChroma(TComDataCU* cu, CU* cuData, uint32_t trDepth, uint32_t absPartIdx, uint32_t absPartIdxStep)
 {
     int cuSize = 1 << cu->getLog2CUSize(absPartIdx);
     m_entropyCoder.resetBits();
-    xEncIntraHeaderChroma(cu, absPartIdx);
+    xEncIntraHeaderChroma(cu, cuData, absPartIdx);
     xEncSubdivCbfQTChroma(cu, trDepth, absPartIdx, absPartIdxStep, cuSize, cuSize);
     xEncCoeffQTChroma(cu, trDepth, absPartIdx, TEXT_CHROMA_U);
     xEncCoeffQTChroma(cu, trDepth, absPartIdx, TEXT_CHROMA_V);
     return m_entropyCoder.getNumberOfWrittenBits();
 }
 
-uint32_t Search::xGetIntraBitsLuma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx, uint32_t log2TrSize, coeff_t* coeff, uint32_t depthRange[2])
+uint32_t Search::xGetIntraBitsLuma(TComDataCU* cu, CU* cuData, uint32_t trDepth, uint32_t absPartIdx, uint32_t log2TrSize, coeff_t* coeff, uint32_t depthRange[2])
 {
     m_entropyCoder.resetBits();
-    xEncIntraHeaderLuma(cu, trDepth, absPartIdx);
+    xEncIntraHeaderLuma(cu, cuData, trDepth, absPartIdx);
 
     // Transform subdiv flag
     if (log2TrSize != *depthRange)
@@ -509,7 +509,7 @@
                     break;
                 else
                 {
-                    singleBits = xGetIntraBitsLuma(cu, trDepth, absPartIdx, log2TrSize, coeff, depthRange);
+                    singleBits = xGetIntraBitsLuma(cu, cuData, trDepth, absPartIdx, log2TrSize, coeff, depthRange);
                     if (m_rdCost.m_psyRd)
                         singleCostTmp = m_rdCost.calcPsyRdCost(singleDistYTmp, singleBits, singlePsyEnergyYTmp);
                     else
@@ -563,7 +563,7 @@
             }
             cu->setCbfSubParts(singleCbfY << trDepth, TEXT_LUMA, absPartIdx, fullDepth);
 
-            singleBits = xGetIntraBitsLuma(cu, trDepth, absPartIdx, log2TrSize, coeffY, depthRange);
+            singleBits = xGetIntraBitsLuma(cu, cuData, trDepth, absPartIdx, log2TrSize, coeffY, depthRange);
             if (m_param->rdPenalty && (log2TrSize == 5) && !isIntraSlice)
                 singleBits *= 4;
 
@@ -1213,7 +1213,7 @@
     uint32_t numPU        = 1 << (2 * initTrDepth);
     uint32_t log2TrSize   = cu->getLog2CUSize(0) - initTrDepth;
     uint32_t tuSize       = 1 << log2TrSize;
-    uint32_t qNumParts    = cu->getTotalNumPart() >> 2;
+    uint32_t qNumParts    = cuData->numPartitions >> 2;
     uint32_t sizeIdx      = log2TrSize - 2;
     uint32_t partOffset   = 0;
     uint32_t srcstride   = reconYuv->getStride();
@@ -1390,7 +1390,7 @@
     uint32_t initTrDepth = cu->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1;
     uint32_t numPU       = 1 << (2 * initTrDepth);
     uint32_t log2TrSize  = cu->getLog2CUSize(0) - initTrDepth;
-    uint32_t qNumParts   = cu->getTotalNumPart() >> 2;
+    uint32_t qNumParts   = cuData->numPartitions >> 2;
 
     // loop over partitions
     uint32_t partOffset  = 0;
@@ -1534,7 +1534,7 @@
             if (cu->m_slice->m_pps->bTransformSkipEnabled)
                 m_entropyCoder.load(m_rdEntropyCoders[depth][CI_CURR_BEST]);
 
-            uint32_t bits = xGetIntraBitsQTChroma(cu, initTrDepth, absPartIdxC, tuIterator.absPartIdxStep);
+            uint32_t bits = xGetIntraBitsQTChroma(cu, cuData, initTrDepth, absPartIdxC, tuIterator.absPartIdxStep);
             uint64_t cost = 0; 
             if (m_rdCost.m_psyRd)
                 cost = m_rdCost.calcPsyRdCost(dist, bits, psyEnergy);
diff -r 21b1e8daa7e9 -r ecd15b4dfdea source/encoder/search.h
--- a/source/encoder/search.h	Tue Sep 30 08:52:56 2014 +0530
+++ b/source/encoder/search.h	Tue Sep 30 09:01:02 2014 +0530
@@ -104,11 +104,11 @@
 
     void     xEncSubdivCbfQTChroma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx,  uint32_t absPartIdxStep, uint32_t width, uint32_t height);
     void     xEncCoeffQTChroma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx, TextType ttype);
-    void     xEncIntraHeaderLuma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx);
-    void     xEncIntraHeaderChroma(TComDataCU* cu, uint32_t absPartIdx);
+    void     xEncIntraHeaderLuma(TComDataCU* cu, CU* cuData, uint32_t trDepth, uint32_t absPartIdx);
+    void     xEncIntraHeaderChroma(TComDataCU* cu, CU* cuData, uint32_t absPartIdx);
 
-    uint32_t xGetIntraBitsQTChroma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx, uint32_t absPartIdxStep);
-    uint32_t xGetIntraBitsLuma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx, uint32_t log2TrSize, coeff_t* coeff, uint32_t depthRange[2]);
+    uint32_t xGetIntraBitsQTChroma(TComDataCU* cu, CU* cuData, uint32_t trDepth, uint32_t absPartIdx, uint32_t absPartIdxStep);
+    uint32_t xGetIntraBitsLuma(TComDataCU* cu, CU* cuData, uint32_t trDepth, uint32_t absPartIdx, uint32_t log2TrSize, coeff_t* coeff, uint32_t depthRange[2]);
     uint32_t xGetIntraBitsChroma(TComDataCU* cu, uint32_t absPartIdx, uint32_t log2TrSizeC, uint32_t chromaId, coeff_t* coeff);
     uint32_t xIntraCodingLumaBlk(TComDataCU* cu, CU* cuData, uint32_t absPartIdx, uint32_t log2TrSize, TComYuv* fencYuv, TComYuv* predYuv, ShortYuv* resiYuv,
                                  int16_t* reconQt, uint32_t reconQtStride, coeff_t* coeff, uint32_t& cbf);


More information about the x265-devel mailing list