<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 29, 2014 at 3:41 PM, Deepthi Nandakumar <span dir="ltr"><<a href="mailto:deepthi@multicorewareinc.com" target="_blank">deepthi@multicorewareinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Mon, Sep 29, 2014 at 3:33 PM, <span dir="ltr"><<a href="mailto:santhoshini@multicorewareinc.com" target="_blank">santhoshini@multicorewareinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"># HG changeset patch<br>
# User Santhoshini Sekar <<a href="mailto:santhoshini@multicorewareinc.com" target="_blank">santhoshini@multicorewareinc.com</a>><br>
# Date 1411983173 -19800<br>
# Mon Sep 29 15:02:53 2014 +0530<br>
# Node ID 594bad474d684cc23c84890f74b02ac42a85fc3e<br>
# Parent ed887d8ae5cd24b0c2317fb83b3c908be27e037a<br>
TComDataCU: replace getTotalNumPart() with CU structure details<br>
<br>
diff -r ed887d8ae5cd -r 594bad474d68 source/Lib/TLibCommon/TComDataCU.cpp<br>
--- a/source/Lib/TLibCommon/TComDataCU.cpp Mon Sep 29 12:11:32 2014 +0530<br>
+++ b/source/Lib/TLibCommon/TComDataCU.cpp Mon Sep 29 15:02:53 2014 +0530<br>
@@ -409,7 +409,7 @@<br>
m_mvBits = 0;<br>
m_coeffBits = 0;<br>
<br>
- m_numPartitions = cu->getTotalNumPart() >> 2;<br>
+ m_numPartitions = cuData->numPartitions;<br>
<br>
for (int i = 0; i < 4; i++)<br>
{<br>
@@ -456,7 +456,7 @@<br>
{<br>
X265_CHECK(partUnitIdx < 4, "part unit should be less than 4\n");<br>
<br>
- uint32_t partOffset = (cu->getTotalNumPart() >> 2) * partUnitIdx;<br>
+ uint32_t partOffset = cuData->numPartitions * partUnitIdx;<br>
<br></blockquote></span><div><br>Am I missing something here? In some locations, you have replaced cu->getTotalNumPart() with cuData->numPartition.<br></div><div>In some other locations, (cu->getTotalNumPart() >> 2) has been replaced with cuData->numPartition. </div><div> </div></div></div></div></blockquote><div><br></div><div>In TComDataCU (cu->getTotalNumPart() >> 2) is equivalent to cuData->numPartitions. In rest of the files cu->getTotalNumPart() is equivalent to cuData->numPartitions.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div><div class="h5">
m_pic = cu->m_pic;<br>
m_slice = cu->m_slice;<br>
@@ -474,7 +474,7 @@<br>
m_totalBits = 0;<br>
m_mvBits = 0;<br>
m_coeffBits = 0;<br>
- m_numPartitions = cu->getTotalNumPart() >> 2;<br>
+ m_numPartitions = cuData->numPartitions;<br>
<br>
TComDataCU* otherCU = m_pic->getCU(m_cuAddr);<br>
int sizeInChar = sizeof(char) * m_numPartitions;<br>
@@ -496,7 +496,7 @@<br>
<br>
// Copy small CU to bigger CU.<br>
// One of quarter parts overwritten by predicted sub part.<br>
-void TComDataCU::copyPartFrom(TComDataCU* cu, uint32_t partUnitIdx, uint32_t depth, bool isRDObasedAnalysis)<br>
+void TComDataCU::copyPartFrom(TComDataCU* cu, CU* cuData, uint32_t partUnitIdx, uint32_t depth, bool isRDObasedAnalysis)<br>
{<br>
X265_CHECK(partUnitIdx < 4, "part unit should be less than 4\n");<br>
if (isRDObasedAnalysis)<br>
@@ -511,8 +511,8 @@<br>
m_mvBits += cu->m_mvBits;<br>
m_coeffBits += cu->m_coeffBits;<br>
<br>
- uint32_t offset = cu->getTotalNumPart() * partUnitIdx;<br>
- uint32_t numPartition = cu->getTotalNumPart();<br>
+ uint32_t offset = cuData->numPartitions * partUnitIdx;<br>
+ uint32_t numPartition = cuData->numPartitions;<br>
int sizeInBool = sizeof(bool) * numPartition;<br>
int sizeInChar = sizeof(char) * numPartition;<br>
memcpy(m_skipFlag + offset, cu->getSkipFlag(), sizeof(*m_skipFlag) * numPartition);<br>
@@ -544,8 +544,8 @@<br>
m_cuAbove = cu->getCUAbove();<br>
m_cuLeft = cu->getCULeft();<br>
<br>
- m_cuMvField[0].copyFrom(cu->getCUMvField(REF_PIC_LIST_0), cu->getTotalNumPart(), offset);<br>
- m_cuMvField[1].copyFrom(cu->getCUMvField(REF_PIC_LIST_1), cu->getTotalNumPart(), offset);<br>
+ m_cuMvField[0].copyFrom(cu->getCUMvField(REF_PIC_LIST_0), cuData->numPartitions, offset);<br>
+ m_cuMvField[1].copyFrom(cu->getCUMvField(REF_PIC_LIST_1), cuData->numPartitions, offset);<br>
<br>
uint32_t tmp = 1 << ((g_maxLog2CUSize - depth) * 2);<br>
uint32_t tmp2 = partUnitIdx * tmp;<br>
diff -r ed887d8ae5cd -r 594bad474d68 source/Lib/TLibCommon/TComDataCU.h<br>
--- a/source/Lib/TLibCommon/TComDataCU.h Mon Sep 29 12:11:32 2014 +0530<br>
+++ b/source/Lib/TLibCommon/TComDataCU.h Mon Sep 29 15:02:53 2014 +0530<br>
@@ -111,11 +111,12 @@<br>
LEAF = 1<<3, // CU is a leaf node of the CTU<br>
SPLIT = 1<<4, // CU is currently split in four child CUs.<br>
};<br>
- uint32_t log2CUSize; // Log of the CU size.<br>
- uint32_t childIdx; // Index of the first child CU<br>
- uint32_t encodeIdx; // Encoding index of this CU in terms of 8x8 blocks.<br>
- uint32_t offset[2]; // Offset of the luma CU in the X, Y direction in terms of pixels from the CTU origin<br>
- uint32_t flags; // CU flags.<br>
+ uint32_t log2CUSize; // Log of the CU size.<br>
+ uint32_t childIdx; // Index of the first child CU<br>
+ uint32_t encodeIdx; // Encoding index of this CU in terms of 8x8 blocks.<br>
+ uint32_t offset[2]; // Offset of the luma CU in the X, Y direction in terms of pixels from the CTU origin<br>
+ uint32_t flags; // CU flags.<br>
+ uint32_t numPartitions;// Number of 4x4 blocks in the CU<br>
};<br>
<br>
// Partition count table, index represents partitioning mode.<br>
@@ -276,7 +277,7 @@<br>
void initSubCU(TComDataCU* cu, CU* cuData, uint32_t partUnitIdx, uint32_t depth, int qp);<br>
<br>
void copyToSubCU(TComDataCU* lcu, CU* cuData, uint32_t partUnitIdx, uint32_t depth);<br>
- void copyPartFrom(TComDataCU* cu, uint32_t partUnitIdx, uint32_t depth, bool isRDObasedAnalysis = true);<br>
+ void copyPartFrom(TComDataCU* cu, CU* cuData, uint32_t partUnitIdx, uint32_t depth, bool isRDObasedAnalysis = true);<br>
<br>
void copyToPic(uint32_t depth);<br>
void copyToPic(uint32_t depth, uint32_t partIdx, uint32_t partDepth);<br>
@@ -510,8 +511,6 @@<br>
// member functions for RD cost storage<br>
// -------------------------------------------------------------------------------------------------------------------<br>
<br>
- uint32_t& getTotalNumPart() { return m_numPartitions; }<br>
-<br>
ScanType getCoefScanIdx(uint32_t absPartIdx, uint32_t log2TrSize, bool bIsLuma, bool bIsIntra);<br>
void getTUEntropyCodingParameters(TUEntropyCodingParameters &result, uint32_t absPartIdx, uint32_t log2TrSize, bool bIsLuma);<br>
<br>
diff -r ed887d8ae5cd -r 594bad474d68 source/encoder/analysis.cpp<br>
--- a/source/encoder/analysis.cpp Mon Sep 29 12:11:32 2014 +0530<br>
+++ b/source/encoder/analysis.cpp Mon Sep 29 15:02:53 2014 +0530<br>
@@ -283,6 +283,7 @@<br>
cu->offset[0] = sb_x * blockSize;<br>
cu->offset[1] = sb_y * blockSize;<br>
cu->encodeIdx = getDepthScanIdx(cu->offset[0] >> 3, cu->offset[1] >> 3, b8Width) * 4;<br>
+ cu->numPartitions = (NUM_CU_PARTITIONS >> ((g_maxLog2CUSize - cu->log2CUSize) * 2));<br>
cu->flags = 0;<br>
<br>
CU_SET_FLAG(cu->flags, CU::PRESENT, present_flag);<br>
@@ -307,7 +308,7 @@<br>
m_tempCU[0]->initCU(pic, cuAddr);<br>
<br>
// analysis of CU<br>
- uint32_t numPartition = cu->getTotalNumPart();<br>
+ uint32_t numPartition = cu->m_CULocalData->numPartitions;<br>
if (m_bestCU[0]->m_slice->m_sliceType == I_SLICE)<br>
{<br>
if (m_param->analysisMode == X265_ANALYSIS_LOAD && pic->m_intraData)<br>
@@ -323,9 +324,9 @@<br>
compressIntraCU(m_bestCU[0], m_tempCU[0], false, cu->m_CULocalData);<br>
if (m_param->analysisMode == X265_ANALYSIS_SAVE && pic->m_intraData)<br>
{<br>
- memcpy(&pic->m_intraData->depth[cuAddr * cu->m_numPartitions], m_bestCU[0]->getDepth(), sizeof(uint8_t) * cu->getTotalNumPart());<br>
- memcpy(&pic->m_intraData->modes[cuAddr * cu->m_numPartitions], m_bestCU[0]->getLumaIntraDir(), sizeof(uint8_t) * cu->getTotalNumPart());<br>
- memcpy(&pic->m_intraData->partSizes[cuAddr * cu->m_numPartitions], m_bestCU[0]->getPartitionSize(), sizeof(char) * cu->getTotalNumPart());<br>
+ memcpy(&pic->m_intraData->depth[cuAddr * cu->m_numPartitions], m_bestCU[0]->getDepth(), sizeof(uint8_t) * numPartition);<br>
+ memcpy(&pic->m_intraData->modes[cuAddr * cu->m_numPartitions], m_bestCU[0]->getLumaIntraDir(), sizeof(uint8_t) * numPartition);<br>
+ memcpy(&pic->m_intraData->partSizes[cuAddr * cu->m_numPartitions], m_bestCU[0]->getPartitionSize(), sizeof(char) * numPartition);<br>
pic->m_intraData->cuAddr[cuAddr] = cuAddr;<br>
pic->m_intraData->poc[cuAddr] = cu->m_pic->m_POC;<br>
}<br>
@@ -481,13 +482,13 @@<br>
m_rdEntropyCoders[nextDepth][CI_CURR_BEST].load(m_rdEntropyCoders[nextDepth][CI_NEXT_BEST]);<br>
<br>
compressIntraCU(subBestPartCU, subTempPartCU, nextDepth, child_cu);<br>
- outTempCU->copyPartFrom(subBestPartCU, partUnitIdx, nextDepth); // Keep best part data to current temporary data.<br>
- m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], subBestPartCU->getTotalNumPart() * partUnitIdx);<br>
+ outTempCU->copyPartFrom(subBestPartCU, child_cu, partUnitIdx, nextDepth); // Keep best part data to current temporary data.<br>
+ m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], child_cu->numPartitions * partUnitIdx);<br>
}<br>
else<br>
{<br>
subBestPartCU->copyToPic(nextDepth);<br>
- outTempCU->copyPartFrom(subBestPartCU, partUnitIdx, nextDepth);<br>
+ outTempCU->copyPartFrom(subBestPartCU, child_cu, partUnitIdx, nextDepth);<br>
}<br>
}<br>
if (cu_unsplit_flag)<br>
@@ -505,7 +506,7 @@<br>
if (depth == slice->m_pps->maxCuDQPDepth && slice->m_pps->bUseDQP)<br>
{<br>
bool hasResidual = false;<br>
- for (uint32_t blkIdx = 0; blkIdx < outTempCU->getTotalNumPart(); blkIdx++)<br>
+ for (uint32_t blkIdx = 0; blkIdx < cu->numPartitions; blkIdx++)<br>
{<br>
if (outTempCU->getCbf(blkIdx, TEXT_LUMA) || outTempCU->getCbf(blkIdx, TEXT_CHROMA_U) ||<br>
outTempCU->getCbf(blkIdx, TEXT_CHROMA_V))<br>
@@ -620,17 +621,17 @@<br>
subTempPartCU->m_totalRDCost = 1;<br>
<br>
compressSharedIntraCTU(subBestPartCU, subTempPartCU, nextDepth, child_cu, sharedDepth, sharedPartSizes, sharedModes, zOrder);<br>
- outTempCU->copyPartFrom(subBestPartCU, partUnitIdx, nextDepth); // Keep best part data to current temporary data.<br>
+ outTempCU->copyPartFrom(subBestPartCU, child_cu, partUnitIdx, nextDepth); // Keep best part data to current temporary data.<br>
<br>
if (!subBestPartCU->m_totalRDCost) // if cost is 0, CU is best CU<br>
outTempCU->m_totalRDCost = 0; // set outTempCU cost to 0, so later check will use this CU as best CU<br>
<br>
- m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], subBestPartCU->getTotalNumPart() * partUnitIdx);<br>
+ m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], child_cu->numPartitions * partUnitIdx);<br>
}<br>
else<br>
{<br>
subBestPartCU->copyToPic(nextDepth);<br>
- outTempCU->copyPartFrom(subBestPartCU, partUnitIdx, nextDepth);<br>
+ outTempCU->copyPartFrom(subBestPartCU, child_cu, partUnitIdx, nextDepth);<br>
<br>
// increment zOrder offset to point to next best depth in sharedDepth buffer<br>
zOrder += g_depthInc[ctuToDepthIndex][nextDepth];<br>
@@ -646,7 +647,7 @@<br>
if (depth == slice->m_pps->maxCuDQPDepth && slice->m_pps->bUseDQP)<br>
{<br>
bool hasResidual = false;<br>
- for (uint32_t blkIdx = 0; blkIdx < outTempCU->getTotalNumPart(); blkIdx++)<br>
+ for (uint32_t blkIdx = 0; blkIdx < cu->numPartitions; blkIdx++)<br>
{<br>
if (outTempCU->getCbf(blkIdx, TEXT_LUMA) || outTempCU->getCbf(blkIdx, TEXT_CHROMA_U) ||<br>
outTempCU->getCbf(blkIdx, TEXT_CHROMA_V))<br>
@@ -771,8 +772,7 @@<br>
char previousQP = colocated0->getQP(0);<br>
uint32_t delta = 0, minDepth0 = 4, minDepth1 = 4;<br>
uint32_t sum0 = 0, sum1 = 0;<br>
- uint32_t numPartitions = outTempCU->getTotalNumPart();<br>
- for (uint32_t i = 0; i < numPartitions; i = i + 4)<br>
+ for (uint32_t i = 0; i < cu->numPartitions; i = i + 4)<br>
{<br>
uint32_t j = absPartIdx + i;<br>
if (colocated0 && colocated0->getDepth(j) < minDepth0)<br>
@@ -785,7 +785,7 @@<br>
sum1 += (colocated1->getDepth(j) * 4);<br>
}<br>
<br>
- uint32_t avgDepth2 = (sum0 + sum1) / numPartitions;<br>
+ uint32_t avgDepth2 = (sum0 + sum1) / cu->numPartitions;<br>
minDepth = X265_MIN(minDepth0, minDepth1);<br>
if (((currentQP - previousQP) < 0) || (((currentQP - previousQP) >= 0) && ((avgDepth2 - 2 * minDepth) > 1)))<br>
delta = 0;<br>
@@ -1099,16 +1099,16 @@<br>
}<br>
<br>
/* Adding costs from best SUbCUs */<br>
- outTempCU->copyPartFrom(subBestPartCU, partUnitIdx, nextDepth, true); // Keep best part data to current temporary data.<br>
+ outTempCU->copyPartFrom(subBestPartCU, child_cu, partUnitIdx, nextDepth, true); // Keep best part data to current temporary data.<br>
if (m_param->rdLevel)<br>
- m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], subBestPartCU->getTotalNumPart() * partUnitIdx);<br>
+ m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], child_cu->numPartitions * partUnitIdx);<br>
else<br>
- m_bestPredYuv[nextDepth]->copyToPartYuv(m_tmpPredYuv[depth], subBestPartCU->getTotalNumPart() * partUnitIdx);<br>
+ m_bestPredYuv[nextDepth]->copyToPartYuv(m_tmpPredYuv[depth], child_cu->numPartitions * partUnitIdx);<br>
}<br>
else<br>
{<br>
subTempPartCU->copyToPic(nextDepth);<br>
- outTempCU->copyPartFrom(subTempPartCU, partUnitIdx, nextDepth, false);<br>
+ outTempCU->copyPartFrom(subTempPartCU, child_cu, partUnitIdx, nextDepth, false);<br>
}<br>
}<br>
<br>
@@ -1131,7 +1131,7 @@<br>
if (depth == slice->m_pps->maxCuDQPDepth && slice->m_pps->bUseDQP)<br>
{<br>
bool hasResidual = false;<br>
- for (uint32_t blkIdx = 0; blkIdx < outTempCU->getTotalNumPart(); blkIdx++)<br>
+ for (uint32_t blkIdx = 0; blkIdx < cu->numPartitions; blkIdx++)<br>
{<br>
if (outTempCU->getCbf(blkIdx, TEXT_LUMA) || outTempCU->getCbf(blkIdx, TEXT_CHROMA_U) ||<br>
outTempCU->getCbf(blkIdx, TEXT_CHROMA_V))<br>
@@ -1437,13 +1437,13 @@<br>
m_rdEntropyCoders[nextDepth][CI_CURR_BEST].load(m_rdEntropyCoders[depth][CI_CURR_BEST]);<br>
<br>
compressInterCU_rd5_6(subBestPartCU, subTempPartCU, nextDepth, child_cu);<br>
- outTempCU->copyPartFrom(subBestPartCU, partUnitIdx, nextDepth); // Keep best part data to current temporary data.<br>
- m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], subBestPartCU->getTotalNumPart() * partUnitIdx);<br>
+ outTempCU->copyPartFrom(subBestPartCU, child_cu, partUnitIdx, nextDepth); // Keep best part data to current temporary data.<br>
+ m_bestRecoYuv[nextDepth]->copyToPartYuv(m_tmpRecoYuv[depth], child_cu->numPartitions * partUnitIdx);<br>
}<br>
else<br>
{<br>
subBestPartCU->copyToPic(nextDepth);<br>
- outTempCU->copyPartFrom(subBestPartCU, partUnitIdx, nextDepth);<br>
+ outTempCU->copyPartFrom(subBestPartCU, child_cu, partUnitIdx, nextDepth);<br>
}<br>
}<br>
<br>
@@ -1462,7 +1462,7 @@<br>
if (depth == slice->m_pps->maxCuDQPDepth && slice->m_pps->bUseDQP)<br>
{<br>
bool hasResidual = false;<br>
- for (uint32_t blkIdx = 0; blkIdx < outTempCU->getTotalNumPart(); blkIdx++)<br>
+ for (uint32_t blkIdx = 0; blkIdx < cu->numPartitions; blkIdx++)<br>
{<br>
if (outTempCU->getCbf(blkIdx, TEXT_LUMA) || outTempCU->getCbf(blkIdx, TEXT_CHROMA_U) ||<br>
outTempCU->getCbf(blkIdx, TEXT_CHROMA_V))<br>
diff -r ed887d8ae5cd -r 594bad474d68 source/encoder/search.cpp<br>
--- a/source/encoder/search.cpp Mon Sep 29 12:11:32 2014 +0530<br>
+++ b/source/encoder/search.cpp Mon Sep 29 15:02:53 2014 +0530<br>
@@ -198,7 +198,7 @@<br>
}<br>
}<br>
<br>
-void Search::xEncIntraHeaderLuma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx)<br>
+void Search::xEncIntraHeaderLuma(TComDataCU* cu, CU* cuData, uint32_t trDepth, uint32_t absPartIdx)<br>
{<br>
// CU header<br>
if (!absPartIdx)<br>
@@ -221,7 +221,7 @@<br>
}<br>
else<br>
{<br>
- uint32_t qtNumParts = cu->getTotalNumPart() >> 2;<br>
+ uint32_t qtNumParts = cuData->numPartitions >> 2;<br>
if (!trDepth)<br>
{<br>
X265_CHECK(absPartIdx == 0, "unexpected absPartIdx %d\n", absPartIdx);<br>
@@ -233,7 +233,7 @@<br>
}<br>
}<br>
<br>
-void Search::xEncIntraHeaderChroma(TComDataCU* cu, uint32_t absPartIdx)<br>
+void Search::xEncIntraHeaderChroma(TComDataCU* cu, CU* cuData, uint32_t absPartIdx)<br>
{<br>
// chroma prediction mode<br>
if (cu->getPartitionSize(0) == SIZE_2Nx2N || cu->getChromaFormat() != X265_CSP_I444)<br>
@@ -243,27 +243,27 @@<br>
}<br>
else<br>
{<br>
- uint32_t qtNumParts = cu->getTotalNumPart() >> 2;<br>
+ uint32_t qtNumParts = cuData->numPartitions >> 2;<br>
if (!(absPartIdx & (qtNumParts - 1)))<br>
m_entropyCoder->codeIntraDirChroma(cu, absPartIdx);<br>
}<br>
}<br>
<br>
-uint32_t Search::xGetIntraBitsQTChroma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx, uint32_t absPartIdxStep)<br>
+uint32_t Search::xGetIntraBitsQTChroma(TComDataCU* cu, CU* cuData, uint32_t trDepth, uint32_t absPartIdx, uint32_t absPartIdxStep)<br>
{<br>
int cuSize = 1 << cu->getLog2CUSize(absPartIdx);<br>
m_entropyCoder->resetBits();<br>
- xEncIntraHeaderChroma(cu, absPartIdx);<br>
+ xEncIntraHeaderChroma(cu, cuData, absPartIdx);<br>
xEncSubdivCbfQTChroma(cu, trDepth, absPartIdx, absPartIdxStep, cuSize, cuSize);<br>
xEncCoeffQTChroma(cu, trDepth, absPartIdx, TEXT_CHROMA_U);<br>
xEncCoeffQTChroma(cu, trDepth, absPartIdx, TEXT_CHROMA_V);<br>
return m_entropyCoder->getNumberOfWrittenBits();<br>
}<br>
<br>
-uint32_t Search::xGetIntraBitsLuma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx, uint32_t log2TrSize, coeff_t* coeff, uint32_t depthRange[2])<br>
+uint32_t Search::xGetIntraBitsLuma(TComDataCU* cu, CU* cuData, uint32_t trDepth, uint32_t absPartIdx, uint32_t log2TrSize, coeff_t* coeff, uint32_t depthRange[2])<br>
{<br>
m_entropyCoder->resetBits();<br>
- xEncIntraHeaderLuma(cu, trDepth, absPartIdx);<br>
+ xEncIntraHeaderLuma(cu, cuData, trDepth, absPartIdx);<br>
<br>
// Transform subdiv flag<br>
if (log2TrSize != *depthRange)<br>
@@ -511,7 +511,7 @@<br>
break;<br>
else<br>
{<br>
- singleBits = xGetIntraBitsLuma(cu, trDepth, absPartIdx, log2TrSize, coeff, depthRange);<br>
+ singleBits = xGetIntraBitsLuma(cu, cuData, trDepth, absPartIdx, log2TrSize, coeff, depthRange);<br>
if (m_rdCost.m_psyRd)<br>
singleCostTmp = m_rdCost.calcPsyRdCost(singleDistYTmp, singleBits, singlePsyEnergyYTmp);<br>
else<br>
@@ -565,7 +565,7 @@<br>
}<br>
cu->setCbfSubParts(singleCbfY << trDepth, TEXT_LUMA, absPartIdx, fullDepth);<br>
<br>
- singleBits = xGetIntraBitsLuma(cu, trDepth, absPartIdx, log2TrSize, coeffY, depthRange);<br>
+ singleBits = xGetIntraBitsLuma(cu, cuData, trDepth, absPartIdx, log2TrSize, coeffY, depthRange);<br>
if (m_param->rdPenalty && (log2TrSize == 5) && !isIntraSlice)<br>
singleBits *= 4;<br>
<br>
@@ -1215,7 +1215,7 @@<br>
uint32_t numPU = 1 << (2 * initTrDepth);<br>
uint32_t log2TrSize = cu->getLog2CUSize(0) - initTrDepth;<br>
uint32_t tuSize = 1 << log2TrSize;<br>
- uint32_t qNumParts = cu->getTotalNumPart() >> 2;<br>
+ uint32_t qNumParts = cuData->numPartitions >> 2;<br>
uint32_t sizeIdx = log2TrSize - 2;<br>
uint32_t partOffset = 0;<br>
uint32_t srcstride = reconYuv->getStride();<br>
@@ -1392,7 +1392,7 @@<br>
uint32_t initTrDepth = cu->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1;<br>
uint32_t numPU = 1 << (2 * initTrDepth);<br>
uint32_t log2TrSize = cu->getLog2CUSize(0) - initTrDepth;<br>
- uint32_t qNumParts = cu->getTotalNumPart() >> 2;<br>
+ uint32_t qNumParts = cuData->numPartitions >> 2;<br>
<br>
// loop over partitions<br>
uint32_t partOffset = 0;<br>
@@ -1536,7 +1536,7 @@<br>
if (cu->m_slice->m_pps->bTransformSkipEnabled)<br>
m_entropyCoder->load(m_rdEntropyCoders[depth][CI_CURR_BEST]);<br>
<br>
- uint32_t bits = xGetIntraBitsQTChroma(cu, initTrDepth, absPartIdxC, tuIterator.absPartIdxStep);<br>
+ uint32_t bits = xGetIntraBitsQTChroma(cu, cuData, initTrDepth, absPartIdxC, tuIterator.absPartIdxStep);<br>
uint64_t cost = 0;<br>
if (m_rdCost.m_psyRd)<br>
cost = m_rdCost.calcPsyRdCost(dist, bits, psyEnergy);<br>
diff -r ed887d8ae5cd -r 594bad474d68 source/encoder/search.h<br>
--- a/source/encoder/search.h Mon Sep 29 12:11:32 2014 +0530<br>
+++ b/source/encoder/search.h Mon Sep 29 15:02:53 2014 +0530<br>
@@ -103,11 +103,11 @@<br>
<br>
void xEncSubdivCbfQTChroma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx, uint32_t absPartIdxStep, uint32_t width, uint32_t height);<br>
void xEncCoeffQTChroma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx, TextType ttype);<br>
- void xEncIntraHeaderLuma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx);<br>
- void xEncIntraHeaderChroma(TComDataCU* cu, uint32_t absPartIdx);<br>
+ void xEncIntraHeaderLuma(TComDataCU* cu, CU* cuData, uint32_t trDepth, uint32_t absPartIdx);<br>
+ void xEncIntraHeaderChroma(TComDataCU* cu, CU* cuData, uint32_t absPartIdx);<br>
<br>
- uint32_t xGetIntraBitsQTChroma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx, uint32_t absPartIdxStep);<br>
- uint32_t xGetIntraBitsLuma(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx, uint32_t log2TrSize, coeff_t* coeff, uint32_t depthRange[2]);<br>
+ uint32_t xGetIntraBitsQTChroma(TComDataCU* cu, CU* cuData, uint32_t trDepth, uint32_t absPartIdx, uint32_t absPartIdxStep);<br>
+ uint32_t xGetIntraBitsLuma(TComDataCU* cu, CU* cuData, uint32_t trDepth, uint32_t absPartIdx, uint32_t log2TrSize, coeff_t* coeff, uint32_t depthRange[2]);<br>
uint32_t xGetIntraBitsChroma(TComDataCU* cu, uint32_t absPartIdx, uint32_t log2TrSizeC, uint32_t chromaId, coeff_t* coeff);<br>
uint32_t xIntraCodingLumaBlk(TComDataCU* cu, CU* cuData, uint32_t absPartIdx, uint32_t log2TrSize, TComYuv* fencYuv, TComYuv* predYuv, ShortYuv* resiYuv,<br>
int16_t* reconQt, uint32_t reconQtStride, coeff_t* coeff, uint32_t& cbf);<br></div></div>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br></div></div>
<br>_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
<br></blockquote></div><br></div></div>