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

Function forwardLutFromBitmap

Source/ThirdParty/tinyexr.h:3190–3202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3188}
3189
3190static unsigned short forwardLutFromBitmap(
3191 const unsigned char bitmap[BITMAP_SIZE], unsigned short lut[USHORT_RANGE]) {
3192 int k = 0;
3193
3194 for (int i = 0; i < USHORT_RANGE; ++i) {
3195 if ((i == 0) || (bitmap[i >> 3] & (1 << (i & 7))))
3196 lut[i] = k++;
3197 else
3198 lut[i] = 0;
3199 }
3200
3201 return k - 1; // maximum value stored in lut[],
3202} // i.e. number of ones in bitmap minus 1
3203
3204static unsigned short reverseLutFromBitmap(
3205 const unsigned char bitmap[BITMAP_SIZE], unsigned short lut[USHORT_RANGE]) {

Callers 1

CompressPizFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected