[x265] [PATCH 2 of 5] cleanup: remove unused getNumberOfWrittenBits() from TEncBinCABAC::getNumWrittenBits()

Min Chen chenm003 at 163.com
Tue Oct 22 13:05:43 CEST 2013


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1382439694 -28800
# Node ID 87cad2d10d9d441c4376e111afca7a9eddde5ccc
# Parent  a049d7518e6b924d28307d51249a1adbfea8e794
cleanup: remove unused getNumberOfWrittenBits() from TEncBinCABAC::getNumWrittenBits()

diff -r a049d7518e6b -r 87cad2d10d9d source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp
--- a/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp	Tue Oct 22 19:01:12 2013 +0800
+++ b/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp	Tue Oct 22 19:01:34 2013 +0800
@@ -170,8 +170,11 @@
 
 UInt TEncBinCABAC::getNumWrittenBits()
 {
+    // NOTE: in Counter mode, we always not call testAndWriteOut(), so m_bitIf unused
+    assert(!bIsCounter || (m_bitIf->getNumberOfWrittenBits() == 0));
+
     if (bIsCounter)
-        return m_bitIf->getNumberOfWrittenBits() + UInt(m_fracBits >> 15);
+        return UInt(m_fracBits >> 15);
     else
         return m_bitIf->getNumberOfWrittenBits() + 8 * m_numBufferedBytes + 23 - m_bitsLeft;
 }



More information about the x265-devel mailing list