MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / bitrev8

Function bitrev8

Source/astcenc_symbolic_physical.cpp:33–39  ·  view source on GitHub ↗

* @brief Reverse bits in a byte. * * @param p The value to reverse. * * @return The reversed result. */

Source from the content-addressed store, hash-verified

31 * @return The reversed result.
32 */
33static inline int bitrev8(int p)
34{
35 p = ((p & 0x0F) << 4) | ((p >> 4) & 0x0F);
36 p = ((p & 0x33) << 2) | ((p >> 2) & 0x33);
37 p = ((p & 0x55) << 1) | ((p >> 1) & 0x55);
38 return p;
39}
40
41
42/**

Callers 2

symbolic_to_physicalFunction · 0.85
physical_to_symbolicFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected