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

Deepthi Nandakumar deepthi at multicorewareinc.com
Mon Sep 29 12:11:51 CEST 2014


On Mon, Sep 29, 2014 at 3:33 PM, <santhoshini at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Santhoshini Sekar <santhoshini at multicorewareinc.com>
> # Date 1411983173 -19800
> #      Mon Sep 29 15:02:53 2014 +0530
> # Node ID 594bad474d684cc23c84890f74b02ac42a85fc3e
> # Parent  ed887d8ae5cd24b0c2317fb83b3c908be27e037a
> TComDataCU: replace getTotalNumPart() with CU structure details
>
> diff -r ed887d8ae5cd -r 594bad474d68 source/Lib/TLibCommon/TComDataCU.cpp
> --- a/source/Lib/TLibCommon/TComDataCU.cpp      Mon Sep 29 12:11:32 2014
> +0530
> +++ b/source/Lib/TLibCommon/TComDataCU.cpp      Mon Sep 29 15:02:53 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;
>
>
Am I missing something here? In some locations, you have replaced
cu->getTotalNumPart() with cuData->numPartition.
In some other locations, (cu->getTotalNumPart() >> 2) has been replaced
with cuData->numPartition.


>      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;
> diff -r ed887d8ae5cd -r 594bad474d68 source/Lib/TLibCommon/TComDataCU.h
> --- a/source/Lib/TLibCommon/TComDataCU.h        Mon Sep 29 12:11:32 2014
> +0530
> +++ b/source/Lib/TLibCommon/TComDataCU.h        Mon Sep 29 15:02:53 2014
> +0530
> @@ -111,11 +111,12 @@
>          LEAF            = 1<<3, // CU is a leaf node of the CTU
>          SPLIT           = 1<<4, // CU is currently split in four child
> CUs.
>      };
> -    uint32_t log2CUSize; // Log of the CU size.
> -    uint32_t childIdx;   // Index of the first child CU
> -    uint32_t encodeIdx;  // Encoding index of this CU in terms of 8x8
> blocks.
> -    uint32_t offset[2];  // Offset of the luma CU in the X, Y direction
> in terms of pixels from the CTU origin
> -    uint32_t flags;      // CU flags.
> +    uint32_t log2CUSize;   // Log of the CU size.
> +    uint32_t childIdx;     // Index of the first child CU
> +    uint32_t encodeIdx;    // Encoding index of this CU in terms of 8x8
> blocks.
> +    uint32_t offset[2];    // Offset of the luma CU in the X, Y direction
> in terms of pixels from the CTU origin
> +    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          initSubCU(TComDataCU* cu, CU* cuData, uint32_t
> partUnitIdx, uint32_t depth, int qp);
>
>      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 ed887d8ae5cd -r 594bad474d68 source/encoder/analysis.cpp
> --- a/source/encoder/analysis.cpp       Mon Sep 29 12:11:32 2014 +0530
> +++ b/source/encoder/analysis.cpp       Mon Sep 29 15:02:53 2014 +0530
> @@ -283,6 +283,7 @@
>                  cu->offset[0] = sb_x * blockSize;
>                  cu->offset[1] = sb_y * blockSize;
>                  cu->encodeIdx = getDepthScanIdx(cu->offset[0] >> 3,
> cu->offset[1] >> 3, b8Width) * 4;
> +                cu->numPartitions = (NUM_CU_PARTITIONS >>
> ((g_maxLog2CUSize - cu->log2CUSize) * 2));
>                  cu->flags = 0;
>
>                  CU_SET_FLAG(cu->flags, CU::PRESENT, present_flag);
> @@ -307,7 +308,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)
> @@ -323,9 +324,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;
>              }
> @@ -481,13 +482,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)
> @@ -505,7 +506,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))
> @@ -620,17 +621,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];
> @@ -646,7 +647,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))
> @@ -771,8 +772,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)
> @@ -785,7 +785,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;
> @@ -1099,16 +1099,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);
>              }
>          }
>
> @@ -1131,7 +1131,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))
> @@ -1437,13 +1437,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);
>              }
>          }
>
> @@ -1462,7 +1462,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 ed887d8ae5cd -r 594bad474d68 source/encoder/search.cpp
> --- a/source/encoder/search.cpp Mon Sep 29 12:11:32 2014 +0530
> +++ b/source/encoder/search.cpp Mon Sep 29 15:02:53 2014 +0530
> @@ -198,7 +198,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)
> @@ -221,7 +221,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);
> @@ -233,7 +233,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)
> @@ -243,27 +243,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)
> @@ -511,7 +511,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
> @@ -565,7 +565,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;
>
> @@ -1215,7 +1215,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();
> @@ -1392,7 +1392,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;
> @@ -1536,7 +1536,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 ed887d8ae5cd -r 594bad474d68 source/encoder/search.h
> --- a/source/encoder/search.h   Mon Sep 29 12:11:32 2014 +0530
> +++ b/source/encoder/search.h   Mon Sep 29 15:02:53 2014 +0530
> @@ -103,11 +103,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);
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20140929/ff48b6f4/attachment-0001.html>


More information about the x265-devel mailing list