Skip to content

Hunter 2025.05.12 802cd454 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 262 commits into
base: hunter-0.0.0-80c8f6a
Choose a base branch
from

Conversation

jg-x2x
Copy link

@jg-x2x jg-x2x commented May 15, 2025

Updated to latest master and add some compile fixes for new versions of Xcode and upcoming CMake 4

Adopted versioning system as suggested in the previous PR:

Builds successfully on local machine:

cmake --build .
[  5%] Building C object CMakeFiles/stb.dir/generated/stb.c.o
[ 11%] Building C object CMakeFiles/stb.dir/generated/stb_c_lexer.c.o
[ 17%] Building C object CMakeFiles/stb.dir/generated/stb_connected_components.c.o
[ 23%] Building C object CMakeFiles/stb.dir/generated/stb_divide.c.o
[ 29%] Building C object CMakeFiles/stb.dir/generated/stb_ds.c.o
[ 35%] Building C object CMakeFiles/stb.dir/generated/stb_dxt.c.o
[ 41%] Building C object CMakeFiles/stb.dir/generated/stb_herringbone_wang_tile.c.o
[ 47%] Building C object CMakeFiles/stb.dir/generated/stb_hexwave.c.o
[ 52%] Building C object CMakeFiles/stb.dir/generated/stb_image.c.o
[ 58%] Building C object CMakeFiles/stb.dir/generated/stb_image_resize2.c.o
[ 64%] Building C object CMakeFiles/stb.dir/generated/stb_image_write.c.o
[ 70%] Building C object CMakeFiles/stb.dir/generated/stb_include.c.o
[ 76%] Building C object CMakeFiles/stb.dir/generated/stb_leakcheck.c.o
[ 82%] Building C object CMakeFiles/stb.dir/generated/stb_perlin.c.o
[ 88%] Building C object CMakeFiles/stb.dir/generated/stb_truetype.c.o
[ 94%] Building C object CMakeFiles/stb.dir/generated/stb_voxel_render.c.o
[100%] Linking C static library libstb.a
[100%] Built target stb

aganm and others added 30 commits July 1, 2021 15:39
This allows for compiler verification of the format string
just like printf.
Also fix a "potentially uninitialized variable" warning.

This is a modified version of Alan's original PR that keeps the
table generator in the file (in case there's interest) and also
replaces the expand[] tables with math, since it's trivial.

Fixes issue nothings#1117.
Don't truncate error as aggressively; easily done, but wanted
to keep it separate from the previous change.
Keep STB_DXT_DITHER so as not to break existing code that tries
to enable it, but just leave it permanently off. I originally
introduced it somewhat superstitiously because of the RGB565
endpoint resolution but it never improved either perceptual quality
or objective quality metrics, and the code is appreciably simpler
without it.
va_arg() is in stdarg.h, which is already being included
Should use xh argument not ph (which is the name of the
variable that it actually gets instantiated with the
one time it is used).
Fixes the bug covered by PR nothings#1066, but with a slightly different
fix that's hopefully a bit clearer.
Accidentally introduced during a merge.
These two variables are unused on some targets, resulting in
warnings. Add STBI_NOTUSED around them to suppress those
warnings.
A few were missing. Make sure to always report ouf-of-memory
errors.

Fixes issue nothings#1056.
extend_receive implicitly requires n <= 15 (code length);
the maximum that actually makes sense for 8-bit baseline JPEG is
11, but 15 is the natural limit for us because the AC coding path
stores the number of magnitude bits in a nibble.

Check that DC delta bits are in range before attempting to call
extend_receive.

Fixes issue nothings#1108.
Define lrot in a way that doesn't involve UB when n==0.
Also, the previous patch ensures that n <= 15 for all callers
of stbi__extend_receive, so can remove the (less restrictive)
bounds check for 0 <= n < 17 (the bounds of stbi__bmask)
entirely.

Fixes issue nothings#1065.
For the stb_image fix, also replace the magic 288 with a more
descriptive name while I'm at it.

Fixes nothings#1100
Use an equivalent formulation that has sgn=0 or 1, not 0 or -1.
This avoids right-shifting signed values, at least in this place.

Fixes issue nothings#1061.
It's implementation-specified behavior. Writing this code and then
relying on compiler strength reduction to turn it back into shifts
feels extremely silly but it is what it is.

Fixes issue nothings#1097.
As per recent patches, we do support 16-bit PNMs.
Need to do the second-part shift on uint32 not int.
There was both the assert and the error check; should just be
the error check.

Fixes issue nothings#881 (or rather, part of it).
Try to be a bit more explicit still.

Fixes issue nothings#903, or so I hope.
Both the buffer size limits and the image dimension limits.

Fixes issue nothings#672.
Sean Barrett and others added 29 commits July 15, 2024 08:28
`stb_image_resize2.h:6734:5: runtime error: member access within null pointer of type 'stbir__info' (aka 'struct stbir__info')`
add specific issue for stb_image incorrect load
fixed a bug when using input callbacks, 
turned off simd for tiny-c, 
fixed some variables that should have been static,
fixes a bug when calculating temp memory with resizes that exceed 2GB of temp memory (very large resizes).
@jg-x2x jg-x2x changed the base branch from master to hunter-0.0.0-80c8f6a May 15, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.