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

Method peek

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

Source from the content-addressed store, hash-verified

1747 }
1748
1749 uint16_t peek(uint16_t _offset, uint8_t _numBits)
1750 {
1751 const uint16_t bitPos = m_bitPos + _offset;
1752 const uint16_t shift = bitPos & 7;
1753 uint16_t pos = bitPos / 8;
1754 uint32_t data = 0;
1755 bx::memCopy(&data, &m_data[pos], bx::min(4, 16-pos) );
1756 return uint8_t( (data >> shift) & ( (1 << _numBits)-1) );
1757 }
1758
1759 const uint8_t* m_data;
1760 uint16_t m_bitPos;

Callers 1

decodeBlockBc7Function · 0.45

Calls 2

memCopyFunction · 0.85
minFunction · 0.50

Tested by

no test coverage detected