MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / stbi__bitreverse16

Function stbi__bitreverse16

Source/Utils/stb_image.h:4106–4113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4104} stbi__zhuffman;
4105
4106stbi_inline static int stbi__bitreverse16(int n)
4107{
4108 n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1);
4109 n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2);
4110 n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4);
4111 n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8);
4112 return n;
4113}
4114
4115stbi_inline static int stbi__bit_reverse(int v, int bits)
4116{

Callers 1

stbi__bit_reverseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected