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

Function stbi__readval

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

Source from the content-addressed store, hash-verified

6986} stbi__pic_packet;
6987
6988static stbi_uc* stbi__readval(stbi__context* s, int channel, stbi_uc* dest) {
6989 int mask = 0x80, i;
6990
6991 for (i = 0; i < 4; ++i, mask >>= 1) {
6992 if (channel & mask) {
6993 if (stbi__at_eof(s))
6994 return stbi__errpuc("bad file", "PIC file too short");
6995 dest[i] = stbi__get8(s);
6996 }
6997 }
6998
6999 return dest;
7000}
7001
7002static void stbi__copyval(int channel, stbi_uc* dest, const stbi_uc* src) {
7003 int mask = 0x80, i;

Callers 1

stbi__pic_load_coreFunction · 0.85

Calls 2

stbi__at_eofFunction · 0.85
stbi__get8Function · 0.85

Tested by

no test coverage detected