[x265] [PATCH] cleanup: remove unused updateContextTables()

Min Chen chenm003 at 163.com
Wed Oct 16 15:53:31 CEST 2013


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1381931605 -28800
# Node ID 82f99723527e5025090a374784a63bc490e5d275
# Parent  4b1716b232e56399cdc11abf5abb3c0b37d1c9ee
cleanup: remove unused updateContextTables()

diff -r 4b1716b232e5 -r 82f99723527e source/Lib/TLibEncoder/TEncCavlc.h
--- a/source/Lib/TLibEncoder/TEncCavlc.h	Wed Oct 16 02:35:57 2013 -0500
+++ b/source/Lib/TLibEncoder/TEncCavlc.h	Wed Oct 16 21:53:25 2013 +0800
@@ -111,10 +111,6 @@
 
     void codeSaoUflc(UInt, UInt) { printf("Not supported\n"); assert(0); }
 
-    void updateContextTables(SliceType, int, bool) {}
-
-    void updateContextTables(SliceType, int) {}
-
     void codeCUTransquantBypassFlag(TComDataCU* cu, UInt absPartIdx);
     void codeSkipFlag(TComDataCU* cu, UInt absPartIdx);
     void codeMergeFlag(TComDataCU* cu, UInt absPartIdx);
diff -r 4b1716b232e5 -r 82f99723527e source/Lib/TLibEncoder/TEncEntropy.h
--- a/source/Lib/TLibEncoder/TEncEntropy.h	Wed Oct 16 02:35:57 2013 -0500
+++ b/source/Lib/TLibEncoder/TEncEntropy.h	Wed Oct 16 21:53:25 2013 +0800
@@ -116,9 +116,6 @@
     virtual void codeSaoUflc(UInt length, UInt code) = 0;
     virtual void estBit(estBitsSbacStruct* estBitsSbac, int width, int height, TextType ttype) = 0;
 
-    virtual void updateContextTables(SliceType sliceType, int qp, bool bExecuteFinish)   = 0;
-    virtual void updateContextTables(SliceType sliceType, int qp)   = 0;
-
     virtual void codeDFFlag(UInt code, const char *symbolName) = 0;
     virtual void codeDFSvlc(int code, const char *symbolName)   = 0;
 
@@ -187,9 +184,6 @@
     void encodeQtRootCbfZero(TComDataCU* cu);
     void encodeQtRootCbf(TComDataCU* cu, UInt absPartIdx);
     void encodeQP(TComDataCU* cu, UInt absPartIdx, bool bRD = false);
-    void updateContextTables(SliceType sliceType, int qp, bool bExecuteFinish)   { m_entropyCoderIf->updateContextTables(sliceType, qp, bExecuteFinish);     }
-
-    void updateContextTables(SliceType sliceType, int qp)                        { m_entropyCoderIf->updateContextTables(sliceType, qp, true);               }
 
     void encodeScalingList(TComScalingList* scalingList);
 
diff -r 4b1716b232e5 -r 82f99723527e source/Lib/TLibEncoder/TEncSbac.cpp
--- a/source/Lib/TLibEncoder/TEncSbac.cpp	Wed Oct 16 02:35:57 2013 -0500
+++ b/source/Lib/TLibEncoder/TEncSbac.cpp	Wed Oct 16 21:53:25 2013 +0800
@@ -198,43 +198,6 @@
     }
 }
 
-/** The function does the followng: Write out terminate bit. Flush CABAC. Intialize CABAC states. Start CABAC.
- */
-void TEncSbac::updateContextTables(SliceType sliceType, int qp, bool bExecuteFinish)
-{
-    m_binIf->encodeBinTrm(1);
-    if (bExecuteFinish) m_binIf->finish();
-    m_cuSplitFlagSCModel.initBuffer(sliceType, qp, (UChar*)INIT_SPLIT_FLAG);
-
-    m_cuSkipFlagSCModel.initBuffer(sliceType, qp, (UChar*)INIT_SKIP_FLAG);
-    m_cuMergeFlagExtSCModel.initBuffer(sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT);
-    m_cuMergeIdxExtSCModel.initBuffer(sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT);
-    m_cuPartSizeSCModel.initBuffer(sliceType, qp, (UChar*)INIT_PART_SIZE);
-    m_cuAMPSCModel.initBuffer(sliceType, qp, (UChar*)INIT_CU_AMP_POS);
-    m_cuPredModeSCModel.initBuffer(sliceType, qp, (UChar*)INIT_PRED_MODE);
-    m_cuIntraPredSCModel.initBuffer(sliceType, qp, (UChar*)INIT_INTRA_PRED_MODE);
-    m_cuChromaPredSCModel.initBuffer(sliceType, qp, (UChar*)INIT_CHROMA_PRED_MODE);
-    m_cuInterDirSCModel.initBuffer(sliceType, qp, (UChar*)INIT_INTER_DIR);
-    m_cuMvdSCModel.initBuffer(sliceType, qp, (UChar*)INIT_MVD);
-    m_cuRefPicSCModel.initBuffer(sliceType, qp, (UChar*)INIT_REF_PIC);
-    m_cuDeltaQpSCModel.initBuffer(sliceType, qp, (UChar*)INIT_DQP);
-    m_cuQtCbfSCModel.initBuffer(sliceType, qp, (UChar*)INIT_QT_CBF);
-    m_cuQtRootCbfSCModel.initBuffer(sliceType, qp, (UChar*)INIT_QT_ROOT_CBF);
-    m_cuSigCoeffGroupSCModel.initBuffer(sliceType, qp, (UChar*)INIT_SIG_CG_FLAG);
-    m_cuSigSCModel.initBuffer(sliceType, qp, (UChar*)INIT_SIG_FLAG);
-    m_cuCtxLastX.initBuffer(sliceType, qp, (UChar*)INIT_LAST);
-    m_cuCtxLastY.initBuffer(sliceType, qp, (UChar*)INIT_LAST);
-    m_cuOneSCModel.initBuffer(sliceType, qp, (UChar*)INIT_ONE_FLAG);
-    m_cuAbsSCModel.initBuffer(sliceType, qp, (UChar*)INIT_ABS_FLAG);
-    m_mvpIdxSCModel.initBuffer(sliceType, qp, (UChar*)INIT_MVP_IDX);
-    m_cuTransSubdivFlagSCModel.initBuffer(sliceType, qp, (UChar*)INIT_TRANS_SUBDIV_FLAG);
-    m_saoMergeSCModel.initBuffer(sliceType, qp, (UChar*)INIT_SAO_MERGE_FLAG);
-    m_saoTypeIdxSCModel.initBuffer(sliceType, qp, (UChar*)INIT_SAO_TYPE_IDX);
-    m_transformSkipSCModel.initBuffer(sliceType, qp, (UChar*)INIT_TRANSFORMSKIP_FLAG);
-    m_cuTransquantBypassFlagSCModel.initBuffer(sliceType, qp, (UChar*)INIT_CU_TRANSQUANT_BYPASS_FLAG);
-    m_binIf->start();
-}
-
 void TEncSbac::codeVPS(TComVPS*)
 {
     assert(0);
diff -r 4b1716b232e5 -r 82f99723527e source/Lib/TLibEncoder/TEncSbac.h
--- a/source/Lib/TLibEncoder/TEncSbac.h	Wed Oct 16 02:35:57 2013 -0500
+++ b/source/Lib/TLibEncoder/TEncSbac.h	Wed Oct 16 21:53:25 2013 +0800
@@ -167,9 +167,6 @@
     void estSignificantMapBit(estBitsSbacStruct* estBitsSbac, int width, int height, TextType ttype);
     void estSignificantCoefficientsBit(estBitsSbacStruct* estBitsSbac, TextType ttype);
 
-    void updateContextTables(SliceType sliceType, int qp, bool bExecuteFinish = true);
-    void updateContextTables(SliceType sliceType, int qp) { this->updateContextTables(sliceType, qp, true); }
-
     TEncBinIf* getEncBinIf()  { return m_binIf; }
 
 private:



More information about the x265-devel mailing list