Commit Graph

2114 Commits

Author SHA1 Message Date
b77192742d oss-fuzz: integrate with CIFuzz 2021-07-06 21:47:13 -07:00
9f98546022 Travis-ci: added support for ppc64le 2021-07-06 21:45:40 -07:00
6ca560c9af stb_image: Update documentation for de-iPhone flag
It's default off, not default on.

Fixes issue #651.
2021-07-06 21:40:31 -07:00
15d2dc5c51 stb_tilemap_editor: Update contributors 2021-07-06 21:25:41 -07:00
77eedd4fcf stb_tilemap_editor: Several fixes.
Re-added calls to `stbte__hittest()`, fixed some compiler errors.
Also fixed some GCC warnings about unused variables when
STBTE__COLORPICKER and STBTE_ALLOW_LINK is not defined.
2021-07-06 21:24:25 -07:00
21bfcbbc3d stb_tilemap_editor: Update version, credits 2021-07-06 21:07:34 -07:00
b18c989dc2 stb_tilemap_editor: Fix variable usage 2021-07-06 21:06:39 -07:00
7e10880f53 stb_image: Update credits 2021-07-06 20:47:30 -07:00
2c8cd33e2e stb_image: make unpremultiply and de-iPhone flags thread_local.
Follows the change done for vertical flipping in
eb48fbdced for these two options as well.
2021-07-06 20:46:41 -07:00
b691fc4305 stb_truetype: Remove dead assignments
Confirmed from the OpenType spec that there's nothing missing
here. (These were just annotations listing the total sizes of
the tables, but this is not used for anything here.)

Fixes issue #704.
2021-07-06 20:39:35 -07:00
44f046af0c stb_textedit: Fix paste failure handling breaking undo stack
Could lead to freezes.

Fixes issue #734.
2021-07-06 20:30:55 -07:00
eb677dda6e stb_textedit: Update credit, version history 2021-07-06 20:25:16 -07:00
85bc8060be Support for Page Up/Down
(changes from ocornut/imgui/commit/ec945f44)
2021-07-06 20:23:26 -07:00
76a0a00874 stb.h: _MSC_VER in readdir_raw -> _WIN32
For MinGW.
2021-07-06 20:19:51 -07:00
e817b4a998 stb_ds: Fix typos in docs. 2021-07-06 20:17:12 -07:00
ba5cc43d33 stb_truetype: Fix stbtt__solve_cubic comment 2021-07-06 20:10:22 -07:00
a5d989c358 stb_truetype: Tabs->spaces
Whitespace only.
2021-07-06 20:07:12 -07:00
1e82fd4a4e stb_image: BMP v4/v5 header parsing fixes
As per MS's own docs, should ignore the r/g/b bitmasks in the
header unless BI_BITFIELDS compression is selected. Factor out
setting the default masks since that now exists in two branches.

Add some more checking for unsupported compression formats and
illegal bpp/compression combinations while I'm at it.

Fixes issue #783.
2021-07-04 22:17:57 -07:00
17bc84e15d stb_image: stbi__bmp_info only rewind stream on error
To be consistent with the other info functions.

Fixes issue #892.
2021-07-04 21:47:13 -07:00
ab18d9b250 stb_image: Fix two bugs found via VC++ /analyze
Also fixes issue #366.
2021-07-04 21:42:44 -07:00
e5fd7f6ce0 stb: Remove stua entirely
As per issue 634, Stua "will be deleted from stb.h" soonish. That
was 3 years ago, which should be plenty of warning, and the
language has been de-facto orphaned and undocumented for a
good while longer than that.

Fixes issue #634.
2021-07-04 21:09:20 -07:00
70136cd5f1 stb_vorbis: Change imdct_step3_inner_s_loop_ld654
Released Clang 12 generates bad code for the original loop in here.
While this is a compiler bug plain and simple, we still have to deal
with it.

This is related to the SLP vectorizer, and in particular the two
reverse subtracts in the butterflies for the second half to avoid
unary negates.

Use the more regular dataflow that has the unary negates in it
(we can at least fold one of them into a constant, namely for A2)
and introduce a few temporaries that also make alias analysis (and
possible block-level vectorization) a whole let easier while I'm at
it.

This fixes the codegen issues on Clang 12, which now produces a
working decoder, and I expect the single unary negate that we
actually gain per iteration of this loop is not a significant
perf concern. (There are bigger fish to fry here regardless.)

Fixes issue #1152.
2021-07-04 20:54:18 -07:00
0d47d17002 stb_vorbis: Set error on open_memory with NULL data
"Unexpected EOF" seems like the closest match from the error
codes we have.

Fixes issue #1123.
2021-07-04 19:26:31 -07:00
0def11ae17 stb_vorbis: Fix some unused variables.
Fixes issue #817.
2021-07-04 16:35:45 -07:00
39a0641385 stb_vorbis: Clarify lifetime of pushdata *output buffers
Fixes issue #929.
2021-07-04 16:25:33 -07:00
d5613c9511 stb_vorbis: A few UB fixes.
Fixes issue #1018.
2021-07-04 16:19:46 -07:00
c817c9621e stb_vorbis: Add missing cast to uint to avoid UB
Fixes issue #574.
2021-07-04 16:12:32 -07:00
e31da438e8 stb_vorbis: Fix unused parameter warnings.
Some parameters do not get used, or only when certain config
defines are set. Explicitly mark them as unused to make compilers
happy.

Fixes issue #396.
2021-07-04 16:08:30 -07:00
904ecbfc37 stb_vorbis: Remove spurious assignment to val
This is definitely unnecessary, or at least I can't find anything
in the Vorbis spec that would indicate anything special happening
here.

Fixes issue #816.
2021-07-04 03:15:43 -07:00
5300d55277 stb_vorbis: Include alloca.h on Sun targets
See PR #1006.
2021-07-04 03:00:17 -07:00
6fe053614c stb_vorbis: Fix memory leak in stb_vorbis
When start_decoder() fails it may already have allocated memory
for .vendor and/or .comment_list. Call vorbis_deinit() to free
any allocated memory.

Fixes issue #1051.
2021-07-04 02:52:24 -07:00
2e3a6e8222 stb_vorbis: Move asserts around a bit
Not an actual bug, it just looked wonky, but this code runs
with code lengths that are verified to be in range (<32) by
the length-reading code. Anyway.

Fixes issue #901.
2021-07-04 02:43:00 -07:00
3f671b870f stb_vorbis: rename BUFFER_SIZE macro to STB_BUFFER_SIZE
Fixes issue #1076.
2021-07-04 02:31:31 -07:00
a5e40739ac stb_image_write: Fix define tested for sprintf_s
Fixes issue 744.
2021-07-04 01:39:10 -07:00
ba3ba9b78c stb_image_write: Disable HDR writer completely in NO_STDIO build
Fixes issue #793, hopefully.
2021-07-04 01:39:10 -07:00
76f55ac210 stb_image_write: STBI_WINDOWS_UTF8 -> STBIW_WINDOWS_UTF8
Fixes issue #925.
2021-07-04 01:39:10 -07:00
81bcfa9043 stb_image_write: Remove tabs
Whitespace-only change.
2021-07-04 01:39:10 -07:00
82f9950cea stb_image: Update credits 2021-07-04 01:39:10 -07:00
db864a1e30 stb_image: fix building by MSVC for Windows 10 on ARM 2021-07-04 01:39:10 -07:00
2506215e8a stb_image: Key Win32 UTF-8 support off _WIN32 not _MSC_VER
So that it also works on MinGW.

Fixes issue #729.
2021-07-04 01:39:10 -07:00
991f1f6419 stb_image: Fix wrong buffer sizes passed to MultiByteToWideChar
Fixes issue #772.
2021-07-04 01:39:10 -07:00
56a7113cd0 stb_image: Reorder format test sequence
Put the formats that start with a clear magic number first,
the dodgy ones that don't have much of a distinctive header
should be tested for later after we've ruled out the clearer
ones.

Fixes issue #787, hopefully. (Never got a clean repro.)
2021-07-04 01:39:10 -07:00
618dbd01c8 stb_image: Document image size limits
Both the buffer size limits and the image dimension limits.

Fixes issue #672.
2021-07-04 01:39:10 -07:00
55a180671c readme: Add "how to use these libs" section
Try to be a bit more explicit still.

Fixes issue #903, or so I hope.
2021-07-04 01:39:09 -07:00
4d3b93f589 stb_image: Erorr in BMP should error, not assert.
There was both the assert and the error check; should just be
the error check.

Fixes issue #881 (or rather, part of it).
2021-07-04 01:39:09 -07:00
31ba943e3f stb_image: UB fix in stbi__get32le
Need to do the second-part shift on uint32 not int.
2021-07-04 01:39:09 -07:00
d6ab7faec0 stb_image: Update comment
As per recent patches, we do support 16-bit PNMs.
2021-07-04 01:39:09 -07:00
bb09317445 stb_image: Avoid left-shifts of signed values
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 #1097.
2021-07-04 01:39:09 -07:00
43b32c7bab stb_image: Avoid shift of signed values in extend_receive
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 #1061.
2021-07-04 01:39:09 -07:00
6d857933d5 stb_image, stb_image_write: Fix compare sign warnings
For the stb_image fix, also replace the magic 288 with a more
descriptive name while I'm at it.

Fixes #1100
2021-07-04 01:39:09 -07:00