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

Function forwardLutFromBitmap

tutorials/common/image/tinyexr.h:3120–3132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3118}
3119
3120static unsigned short forwardLutFromBitmap(
3121 const unsigned char bitmap[BITMAP_SIZE], unsigned short lut[USHORT_RANGE]) {
3122 int k = 0;
3123
3124 for (int i = 0; i < USHORT_RANGE; ++i) {
3125 if ((i == 0) || (bitmap[i >> 3] & (1 << (i & 7))))
3126 lut[i] = k++;
3127 else
3128 lut[i] = 0;
3129 }
3130
3131 return k - 1; // maximum value stored in lut[],
3132} // i.e. number of ones in bitmap minus 1
3133
3134static unsigned short reverseLutFromBitmap(
3135 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