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

Function stbi__bitreverse16

Source/ThirdParty/stb_image.h:4107–4114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

stbi__bit_reverseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected