| 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 | { |
no test coverage detected