MCPcopy Create free account
hub / github.com/defold/defold / bc7_interp

Function bc7_interp

engine/dlib/src/basis/encoder/basisu_gpu_texture.cpp:438–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436 static inline uint32_t bc7_interp3(uint32_t l, uint32_t h, uint32_t w) { assert(w < 8); return (l * (64 - basist::g_bc7_weights3[w]) + h * basist::g_bc7_weights3[w] + 32) >> 6; }
437 static inline uint32_t bc7_interp4(uint32_t l, uint32_t h, uint32_t w) { assert(w < 16); return (l * (64 - basist::g_bc7_weights4[w]) + h * basist::g_bc7_weights4[w] + 32) >> 6; }
438 static inline uint32_t bc7_interp(uint32_t l, uint32_t h, uint32_t w, uint32_t bits)
439 {
440 assert(l <= 255 && h <= 255);
441 switch (bits)
442 {
443 case 2: return bc7_interp2(l, h, w);
444 case 3: return bc7_interp3(l, h, w);
445 case 4: return bc7_interp4(l, h, w);
446 default:
447 break;
448 }
449 return 0;
450 }
451
452 bool unpack_bc7_mode0_2(uint32_t mode, const void* pBlock_bits, color_rgba* pPixels)
453 {

Callers 3

unpack_bc7_mode0_2Function · 0.85
unpack_bc7_mode1_3_7Function · 0.85
unpack_bc7_mode4_5Function · 0.85

Calls 4

bc7_interp2Function · 0.85
bc7_interp3Function · 0.85
bc7_interp4Function · 0.85
assertFunction · 0.50

Tested by

no test coverage detected