Searched refs:bit_left (Results 1 – 2 of 2) sorted by relevance
362 FX_DWORD bit_pos = m_BitPos % 8, bit_left = nBits; in GetBits() local365 if (8 - bit_pos >= bit_left) { in GetBits()367 (m_pData[byte_pos] & (0xff >> bit_pos)) >> (8 - bit_pos - bit_left); in GetBits()368 m_BitPos += bit_left; in GetBits()371 bit_left -= 8 - bit_pos; in GetBits()372 result = (m_pData[byte_pos++] & ((1 << (8 - bit_pos)) - 1)) << bit_left; in GetBits()374 while (bit_left >= 8) { in GetBits()375 bit_left -= 8; in GetBits()376 result |= m_pData[byte_pos++] << bit_left; in GetBits()378 if (bit_left) { in GetBits()[all …]
155 int bit_pos = m_InPos % 8, bit_left = m_CodeLen; in Decode() local158 bit_left -= 8 - bit_pos; in Decode()159 code = (m_pInput[byte_pos++] & ((1 << (8 - bit_pos)) - 1)) << bit_left; in Decode()161 if (bit_left < 8) { in Decode()162 code |= m_pInput[byte_pos] >> (8 - bit_left); in Decode()164 bit_left -= 8; in Decode()165 code |= m_pInput[byte_pos++] << bit_left; in Decode()166 if (bit_left) { in Decode()167 code |= m_pInput[byte_pos] >> (8 - bit_left); in Decode()