Changeset 1313 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncBinCoderCABACCounter.cpp
- Timestamp:
- 13 Aug 2015, 17:38:13 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/TEncBinCoderCABACCounter.cpp
r1179 r1313 2 2 * License, included below. This software may be subject to other third party 3 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2015, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 38 38 #include "TEncBinCoderCABACCounter.h" 39 39 #include "TLibCommon/TComRom.h" 40 #include "TLibCommon/Debug.h" 41 40 42 41 43 #if FAST_BIT_EST … … 57 59 m_pcTComBitIf->write(0, UInt(m_fracBits >> 15) ); 58 60 m_fracBits &= 32767; 61 D_PRINT_INDENT( g_traceEncFracBits, "Finish " + n2s(m_fracBits) ); 59 62 } 60 63 … … 72 75 Void TEncBinCABACCounter::encodeBin( UInt binValue, ContextModel &rcCtxModel ) 73 76 { 77 #if DEBUG_ENCODER_SEARCH_BINS 78 const UInt64 startingFracBits = m_fracBits; 79 #endif 80 74 81 m_uiBinsCoded += m_binCountIncrement; 75 76 82 m_fracBits += rcCtxModel.getEntropyBits( binValue ); 83 D_PRINT_INDENT( g_traceEncFracBits, "EncodeBin " + n2s(m_fracBits) ); 84 77 85 rcCtxModel.update( binValue ); 86 87 #if DEBUG_ENCODER_SEARCH_BINS 88 if ((g_debugCounter + debugEncoderSearchBinWindow) >= debugEncoderSearchBinTargetLine) 89 { 90 std::cout << g_debugCounter << ": coding bin value " << binValue << ", fracBits = [" << startingFracBits << "->" << m_fracBits << "]\n"; 91 } 92 93 if (g_debugCounter >= debugEncoderSearchBinTargetLine) 94 { 95 Char breakPointThis; 96 breakPointThis = 7; 97 } 98 if (g_debugCounter >= (debugEncoderSearchBinTargetLine + debugEncoderSearchBinWindow)) 99 { 100 exit(0); 101 } 102 g_debugCounter++; 103 #endif 78 104 } 79 105 … … 83 109 * \param binValue bin value 84 110 */ 85 Void TEncBinCABACCounter::encodeBinEP( UInt binValue)111 Void TEncBinCABACCounter::encodeBinEP( UInt /*binValue*/ ) 86 112 { 87 113 m_uiBinsCoded += m_binCountIncrement; 88 114 m_fracBits += 32768; 115 D_PRINT_INDENT( g_traceEncFracBits , "EncodeBinEP " + n2s(m_fracBits) ); 89 116 } 90 117 … … 95 122 * \param numBins number of bins 96 123 */ 97 Void TEncBinCABACCounter::encodeBinsEP( UInt binValues, Int numBins )124 Void TEncBinCABACCounter::encodeBinsEP( UInt /*binValues*/, Int numBins ) 98 125 { 99 126 m_uiBinsCoded += numBins & -m_binCountIncrement; 100 127 m_fracBits += 32768 * numBins; 128 D_PRINT_INDENT( g_traceEncFracBits , "EncodeBinsEP " + n2s(m_fracBits) ); 101 129 } 102 130 … … 110 138 m_uiBinsCoded += m_binCountIncrement; 111 139 m_fracBits += ContextModel::getEntropyBitsTrm( binValue ); 140 D_PRINT_INDENT( g_traceEncFracBits , "EncodeBinTrm " + n2s(m_fracBits) ); 141 } 142 143 Void TEncBinCABACCounter::align() 144 { 145 m_fracBits = (m_fracBits + 32767) & (~32767); 146 D_PRINT_INDENT( g_traceEncFracBits, "Align " + n2s(m_fracBits) ); 112 147 } 113 148
Note: See TracChangeset for help on using the changeset viewer.