| 4654 | }; |
| 4655 | |
| 4656 | static int stbi__paeth(int a, int b, int c) |
| 4657 | { |
| 4658 | // This formulation looks very different from the reference in the PNG spec, but is |
| 4659 | // actually equivalent and has favorable data dependencies and admits straightforward |
| 4660 | // generation of branch-free code, which helps performance significantly. |
| 4661 | int thresh = c*3 - (a + b); |
| 4662 | int lo = a < b ? a : b; |
| 4663 | int hi = a < b ? b : a; |
| 4664 | int t0 = (hi <= thresh) ? lo : c; |
| 4665 | int t1 = (thresh <= lo) ? hi : t0; |
| 4666 | return t1; |
| 4667 | } |
| 4668 | |
| 4669 | static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; |
| 4670 |
no outgoing calls
no test coverage detected