MCPcopy Create free account
hub / github.com/crownengine/crown / read

Method read

3rdparty/bimg/src/image.cpp:1739–1747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1737 }
1738
1739 uint16_t read(uint8_t _numBits)
1740 {
1741 const uint16_t pos = m_bitPos / 8;
1742 const uint16_t shift = m_bitPos & 7;
1743 uint32_t data = 0;
1744 bx::memCopy(&data, &m_data[pos], bx::min(4, 16-pos) );
1745 m_bitPos += _numBits;
1746 return uint16_t( (data >> shift) & ( (1 << _numBits)-1) );
1747 }
1748
1749 uint16_t peek(uint16_t _offset, uint8_t _numBits)
1750 {

Callers 2

decodeBlockBc6hFunction · 0.45
decodeBlockBc7Function · 0.45

Calls 2

memCopyFunction · 0.85
minFunction · 0.50

Tested by

no test coverage detected