MCPcopy Create free account
hub / github.com/RenderKit/embree / stbi__bitreverse16

Function stbi__bitreverse16

tutorials/common/image/stb_image.h:4050–4057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4048} stbi__zhuffman;
4049
4050stbi_inline static int stbi__bitreverse16(int n)
4051{
4052 n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1);
4053 n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2);
4054 n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4);
4055 n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8);
4056 return n;
4057}
4058
4059stbi_inline static int stbi__bit_reverse(int v, int bits)
4060{

Callers 1

stbi__bit_reverseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected