48 , m_binCountIncrement( 0 )
208 if( binValue != rcCtxModel.
getMps() )
212 m_uiRange = uiLPS << numBits;
221 if ( m_uiRange < 256 )
231 if ((
g_debugCounter + debugCabacBinWindow) >= debugCabacBinTargetLine)
233 std::cout <<
g_debugCounter <<
": coding bin value " << binValue <<
", range = [" << startingRange <<
"->" << m_uiRange <<
"]\n";
238 UChar breakPointThis;
241 if (
g_debugCounter >= (debugCabacBinTargetLine + debugCabacBinWindow))
295 for (
Int i = 0; i < numBins; i++ )
310 while ( numBins > 8 )
313 UInt pattern = binValues >> numBins;
316 binValues -= pattern << numBins;
336 Int binsRemaining = numBins;
340 while (binsRemaining > 0)
342 const UInt binsToCode = std::min<UInt>(binsRemaining, 8);
343 const UInt binMask = (1 << binsToCode) - 1;
345 const UInt newBins = (binValues >> (binsRemaining - binsToCode)) & binMask;
364 binsRemaining -= binsToCode;
418 if ( leadByte == 0xff )
426 UInt carry = leadByte >> 8;
431 byte = ( 0xff + carry ) & 0xff;
Void encodeBinsEP(UInt binValues, Int numBins)
Encode equiprobable bins.
Void encodePCMAlignBits()
static const UChar sm_aucLPSTable[1<< CONTEXT_STATE_BITS][4]
virtual Void write(UInt uiBits, UInt uiNumberOfBits)=0
pure virtual class for basic bit handling
global variables & functions (header)
Void encodeBinTrm(UInt binValue)
Encode terminating bin.
Void copyState(const TEncBinIf *pcTEncBinIf)
#define FAST_BIT_EST
G763: Table-based bit estimation for CABAC.
UChar getState()
get current state
Void encodeBin(UInt binValue, ContextModel &rcCtxModel)
Encode bin.
virtual TEncBinCABAC * getTEncBinCABAC()
binary entropy encoder of CABAC
#define DTRACE_CABAC_VL(x)
Void setBinsCoded(UInt val)
#define DTRACE_CABAC_T(x)
Void encodeAlignedBinsEP(UInt binValues, Int numBins)
UChar getMps()
get curret MPS
virtual Void writeAlignZero()
#define DTRACE_CABAC_V(x)
Void init(TComBitIf *pcTComBitIf)
Void writeOut()
Move bits from register into bitstream.
Void xWritePCMCode(UInt uiCode, UInt uiLength)
Void encodeBinEP(UInt binValue)
Encode equiprobable bin.
static const UChar sm_aucRenormTable[32]
TComBitIf * m_pcTComBitIf
Defines types and objects for environment-variable-based debugging and feature control.
virtual UInt getNumberOfWrittenBits() const =0