Exemplo n.º 1
0
MLint32 U3DBitStreamWriter::getDataPositionWithoutPadding()
{ 
  MLuint32 uBitCount = getBitCount();

  MLint32 dataPositionWithoutPadding = (uBitCount / 8) + ( ((uBitCount % 8) == 0) ? 0 : 1 );
  return dataPositionWithoutPadding; 
}
Exemplo n.º 2
0
void U3DBitStreamWriter::alignToByte()
{
  // Check input(s)
  MLuint32 uBitCount = getBitCount();
  uBitCount = (8 - (uBitCount & 7)) & 7;
  _dataBitOffset += uBitCount;

  if(_dataBitOffset >= 32)
  {
      _dataBitOffset -= 32;
      incrementPosition();
  }
}
Exemplo n.º 3
0
static inline void processCurrentToken(int curLen) {
	if (curLen > maxLen)
		maxLen = curLen;
	if (curLen > 0)
		bitCounts[getBitCount(curLen)]++;
}