MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / stbi__mad3sizes_valid

Function stbi__mad3sizes_valid

include/stb/stb_image.h:1031–1035  ·  view source on GitHub ↗

returns 1 if "a*b*c + add" has no negative terms/factors and doesn't overflow

Source from the content-addressed store, hash-verified

1029
1030// returns 1 if "a*b*c + add" has no negative terms/factors and doesn't overflow
1031static int stbi__mad3sizes_valid(int a, int b, int c, int add)
1032{
1033 return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) &&
1034 stbi__addsizes_valid(a*b*c, add);
1035}
1036
1037// returns 1 if "a*b*c*d + add" has no negative terms/factors and doesn't overflow
1038#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) || !defined(STBI_NO_PNM)

Callers 8

stbi__malloc_mad3Function · 0.85
stbi__bmp_loadFunction · 0.85
stbi__tga_loadFunction · 0.85
stbi__psd_loadFunction · 0.85
stbi__pic_loadFunction · 0.85
stbi__gif_load_nextFunction · 0.85

Calls 2

stbi__mul2sizes_validFunction · 0.85
stbi__addsizes_validFunction · 0.85

Tested by

no test coverage detected