[x265] [PATCH] no-rdo: Use entropy encoder for bit estimation

deepthidevaki at multicorewareinc.com deepthidevaki at multicorewareinc.com
Thu Oct 31 08:14:41 CET 2013


# HG changeset patch
# User Deepthi Devaki <deepthidevaki at multicorewareinc.com>
# Date 1383203307 -19800
# Node ID 4b4332d038832ab8812773d618b38329ec75ae4b
# Parent  ec6b4d35f11053b06d0e1ea46df798ff89a4c127
no-rdo: Use entropy encoder for bit estimation.

Instead of me-bit estimation, use entropy encoder.

diff -r ec6b4d35f110 -r 4b4332d03883 source/Lib/TLibEncoder/TEncSearch.h
--- a/source/Lib/TLibEncoder/TEncSearch.h	Thu Oct 31 00:09:49 2013 -0500
+++ b/source/Lib/TLibEncoder/TEncSearch.h	Thu Oct 31 12:38:27 2013 +0530
@@ -165,6 +165,12 @@
 
     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 @@
                              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);
 };
 }
diff -r ec6b4d35f110 -r 4b4332d03883 source/encoder/compress.cpp
--- a/source/encoder/compress.cpp	Thu Oct 31 00:09:49 2013 -0500
+++ b/source/encoder/compress.cpp	Thu Oct 31 12:38:27 2013 +0530
@@ -228,6 +228,9 @@
     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);
 }
 


More information about the x265-devel mailing list