changeset 4785:775519fb9ba1

no-rdo: Use entropy encoder for bit estimation. Instead of me-bit estimation, use entropy encoder.
author Deepthi Devaki <deepthidevaki@multicorewareinc.com>
date Thu, 31 Oct 2013 12:38:27 +0530
parents ed884e91d5d5
children eed2b51675cf
files source/Lib/TLibEncoder/TEncSearch.h source/encoder/compress.cpp
diffstat 2 files changed, 9 insertions(+-), 6 deletions(-) [+]
line wrap: on
line diff
--- a/source/Lib/TLibEncoder/TEncSearch.h	Thu Oct 31 17:09:43 2013 +0530
+++ b/source/Lib/TLibEncoder/TEncSearch.h	Thu Oct 31 12:38:27 2013 +0530
@@ -165,6 +165,12 @@ public:
 
     void xSetIntraResultQT(TComDataCU* cu, uint32_t trDepth, uint32_t absPartIdx, bool bLumaOnly, TComYuv* reconYuv);
 
+    // -------------------------------------------------------------------------------------------------------------------
+    // compute symbol bits
+    // -------------------------------------------------------------------------------------------------------------------
+
+    uint32_t xSymbolBitsInter(TComDataCU* cu);
+
 protected:
 
     // --------------------------------------------------------------------------------------------
@@ -232,12 +238,6 @@ protected:
                              UInt64 &rdCost, uint32_t &outBits, uint32_t &outDist, uint32_t *puiZeroDist);
     void xSetResidualQTData(TComDataCU* cu, uint32_t absPartIdx, uint32_t absTUPartIdx, TShortYUV* resiYuv, uint32_t depth, bool bSpatial);
 
-    // -------------------------------------------------------------------------------------------------------------------
-    // compute symbol bits
-    // -------------------------------------------------------------------------------------------------------------------
-
-    uint32_t xSymbolBitsInter(TComDataCU* cu);
-
     void setWpScalingDistParam(TComDataCU* cu, int refIdx, int picList);
 };
 }
--- a/source/encoder/compress.cpp	Thu Oct 31 17:09:43 2013 +0530
+++ b/source/encoder/compress.cpp	Thu Oct 31 12:38:27 2013 +0530
@@ -228,6 +228,9 @@ void TEncCu::xComputeCostInter(TComDataC
     int part = partitionFromSizes(outTempCU->getWidth(0), outTempCU->getHeight(0));
     uint32_t distortion = primitives.sse_pp[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);
 }