Searched refs:bit_left (Results 1 – 2 of 2) sorted by relevance
38 uint32_t bit_left = nBits; in GetBits() local41 if (8 - bit_pos >= bit_left) { in GetBits()42 result = (data[byte_pos] & (0xff >> bit_pos)) >> (8 - bit_pos - bit_left); in GetBits()43 m_BitPos += bit_left; in GetBits()46 bit_left -= 8 - bit_pos; in GetBits()47 result = (data[byte_pos++] & ((1 << (8 - bit_pos)) - 1)) << bit_left; in GetBits()49 while (bit_left >= 8) { in GetBits()50 bit_left -= 8; in GetBits()51 result |= data[byte_pos++] << bit_left; in GetBits()53 if (bit_left) in GetBits()[all …]
177 int bit_pos = m_InPos % 8, bit_left = m_CodeLen; in Decode() local180 bit_left -= 8 - bit_pos; in Decode()181 code = (m_pInput[byte_pos++] & ((1 << (8 - bit_pos)) - 1)) << bit_left; in Decode()183 if (bit_left < 8) { in Decode()184 code |= m_pInput[byte_pos] >> (8 - bit_left); in Decode()186 bit_left -= 8; in Decode()187 code |= m_pInput[byte_pos++] << bit_left; in Decode()188 if (bit_left) { in Decode()189 code |= m_pInput[byte_pos] >> (8 - bit_left); in Decode()