MLint32 U3DBitStreamWriter::getDataPositionWithoutPadding()
{ 
  MLuint32 uBitCount = getBitCount();

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

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