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

Function stbi__jpeg_load

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

Source from the content-addressed store, hash-verified

4362}
4363
4364static void* stbi__jpeg_load(
4365 stbi__context* s, int* x, int* y, int* comp, int req_comp,
4366 stbi__result_info* ri) {
4367 unsigned char* result;
4368 stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg));
4369 if (!j)
4370 return stbi__errpuc("outofmem", "Out of memory");
4371 STBI_NOTUSED(ri);
4372 j->s = s;
4373 stbi__setup_jpeg(j);
4374 result = load_jpeg_image(j, x, y, comp, req_comp);
4375 STBI_FREE(j);
4376 return result;
4377}
4378
4379static int stbi__jpeg_test(stbi__context* s) {
4380 int r;

Callers 1

stbi__load_mainFunction · 0.85

Calls 3

stbi__mallocFunction · 0.85
stbi__setup_jpegFunction · 0.85
load_jpeg_imageFunction · 0.85

Tested by

no test coverage detected