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

Function reverseLutFromBitmap

Source/ThirdParty/tinyexr.h:3204–3217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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]) {
3206 int k = 0;
3207
3208 for (int i = 0; i < USHORT_RANGE; ++i) {
3209 if ((i == 0) || (bitmap[i >> 3] & (1 << (i & 7)))) lut[k++] = i;
3210 }
3211
3212 int n = k - 1;
3213
3214 while (k < USHORT_RANGE) lut[k++] = 0;
3215
3216 return n; // maximum k where lut[k] is non-zero,
3217} // i.e. number of ones in bitmap minus 1
3218
3219static void applyLut(const unsigned short lut[USHORT_RANGE],
3220 unsigned short data[/*nData*/], int nData) {

Callers 1

DecompressPizFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected