1. MulticoreWare
  2. mcw
  3. x265

Commits

nandaku2  committed 0ab1c01

RD: change cost measurements for inter

The cost calculation for inter modes now use cost = satd(orig, pred) + lambda*mebits.
This is an estimation to the actual RD-cost.

  • Participants
  • Parent commits 949f853
  • Branches default

Comments (0)

Files changed (1)

File source/encoder/compress.cpp

View file
  • Ignore whitespace
     outTempCU->m_totalBits = 0;
     m_search->predInterSearch(outTempCU, outPredYuv, bUseMRG, true, false);
     int part = partitionFromSizes(outTempCU->getWidth(0), outTempCU->getHeight(0));
-    uint32_t distortion = primitives.sse_pp[part](m_origYuv[depth]->getLumaAddr(), m_origYuv[depth]->getStride(),
+    uint32_t distortion = primitives.satd[part](m_origYuv[depth]->getLumaAddr(), m_origYuv[depth]->getStride(),
                                                   outPredYuv->getLumaAddr(), outPredYuv->getStride());
-    m_rdGoOnSbacCoder->load(m_rdSbacCoders[outTempCU->getDepth(0)][CI_CURR_BEST]);
-    outTempCU->m_totalBits = m_search->xSymbolBitsInter(outTempCU);
-
-    outTempCU->m_totalCost = m_rdCost->calcRdCost(distortion, outTempCU->m_totalBits);
+    outTempCU->m_totalCost = m_rdCost->calcRdSADCost(distortion, outTempCU->m_totalBits);
 }
 
 void TEncCu::xComputeCostMerge2Nx2N(TComDataCU*& outBestCU, TComDataCU*& outTempCU, bool* earlyDetectionSkip, TComYuv*& bestPredYuv, TComYuv*& yuvReconBest)