MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / stbi__blinn_8x8

Function stbi__blinn_8x8

lite/example/cpp_example/mge/cv/stb_image.h:4168–4171  ·  view source on GitHub ↗

fast 0..255 * 0..255 => 0..255 rounded multiplication

Source from the content-addressed store, hash-verified

4166
4167// fast 0..255 * 0..255 => 0..255 rounded multiplication
4168static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) {
4169 unsigned int t = x * y + 128;
4170 return (stbi_uc)((t + (t >> 8)) >> 8);
4171}
4172
4173static stbi_uc* load_jpeg_image(
4174 stbi__jpeg* z, int* out_x, int* out_y, int* comp, int req_comp) {

Callers 1

load_jpeg_imageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected