| 1377 | } |
| 1378 | |
| 1379 | static uint8_t bitRangeConvert(uint32_t _in, uint32_t _from, uint32_t _to) |
| 1380 | { |
| 1381 | using namespace bx; |
| 1382 | uint32_t tmp0 = uint32_sll(1, _to); |
| 1383 | uint32_t tmp1 = uint32_sll(1, _from); |
| 1384 | uint32_t tmp2 = uint32_dec(tmp0); |
| 1385 | uint32_t tmp3 = uint32_dec(tmp1); |
| 1386 | uint32_t tmp4 = uint32_mul(_in, tmp2); |
| 1387 | uint32_t tmp5 = uint32_add(tmp3, tmp4); |
| 1388 | uint32_t tmp6 = uint32_srl(tmp5, _from); |
| 1389 | uint32_t tmp7 = uint32_add(tmp5, tmp6); |
| 1390 | uint32_t result = uint32_srl(tmp7, _from); |
| 1391 | |
| 1392 | return uint8_t(result); |
| 1393 | } |
| 1394 | |
| 1395 | static void decodeBlockDxt(uint8_t _dst[16*4], const uint8_t _src[8]) |
| 1396 | { |
no outgoing calls
no test coverage detected