Skip to content
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

Update stb_image version 2.12 -> 2.28 #3125

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,861 changes: 2,045 additions & 816 deletions renderdoc/3rdparty/stb/stb_image.h

Large diffs are not rendered by default.

2,578 changes: 0 additions & 2,578 deletions renderdoc/3rdparty/stb/stb_image_resize.h

This file was deleted.

10,303 changes: 10,303 additions & 0 deletions renderdoc/3rdparty/stb/stb_image_resize2.h

Large diffs are not rendered by default.

930 changes: 803 additions & 127 deletions renderdoc/3rdparty/stb/stb_image_write.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion renderdoc/3rdparty/stb/stb_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@

#include "stb_image.h"
#include "stb_image_write.h"
#include "stb_image_resize.h"
#include "stb_image_resize2.h"
#include "stb_truetype.h"
2,188 changes: 1,999 additions & 189 deletions renderdoc/3rdparty/stb/stb_truetype.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion renderdoc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ set(sources
3rdparty/zstd/zstdmt_compress.h
3rdparty/stb/stb_image.h
3rdparty/stb/stb_image_write.h
3rdparty/stb/stb_image_resize.h
3rdparty/stb/stb_image_resize2.h
3rdparty/stb/stb_impl.c
3rdparty/stb/stb_truetype.h
3rdparty/tinyexr/tinyexr.cpp
Expand Down
5 changes: 3 additions & 2 deletions renderdoc/os/win32/win32_shellext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
#include "maths/formatpacking.h"
#include "maths/half_convert.h"
#include "serialise/rdcfile.h"
#include "stb/stb_image_resize.h"

#include "stb/stb_image_resize2.h"

// {5D6BF029-A6BA-417A-8523-120492B1DCE3}
static const GUID CLSID_RDCThumbnailProvider = {0x5d6bf029,
Expand Down Expand Up @@ -625,7 +626,7 @@ struct RDCThumbnailProvider : public IThumbnailProvider, IInitializeWithStream
byte *resizedpixels = (byte *)malloc(3 * bi.bV5Width * bi.bV5Height);

stbir_resize_uint8_srgb(thumbpixels, thumbwidth, thumbheight, 0, resizedpixels, bi.bV5Width,
bi.bV5Height, 0, 3, -1, 0);
bi.bV5Height, 0, STBIR_RGB);

free(thumbpixels);

Expand Down
2 changes: 1 addition & 1 deletion renderdoc/renderdoc.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
<ClInclude Include="3rdparty\pugixml\pugiconfig.hpp" />
<ClInclude Include="3rdparty\pugixml\pugixml.hpp" />
<ClInclude Include="3rdparty\stb\stb_image.h" />
<ClInclude Include="3rdparty\stb\stb_image_resize.h" />
<ClInclude Include="3rdparty\stb\stb_image_resize2.h" />
<ClInclude Include="3rdparty\stb\stb_image_write.h" />
<ClInclude Include="3rdparty\stb\stb_truetype.h" />
<ClInclude Include="3rdparty\superluminal\PerformanceAPI_capi.h" />
Expand Down
2 changes: 1 addition & 1 deletion renderdoc/renderdoc.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
<ClInclude Include="3rdparty\plthook\plthook.h">
<Filter>3rdparty\plthook</Filter>
</ClInclude>
<ClInclude Include="3rdparty\stb\stb_image_resize.h">
<ClInclude Include="3rdparty\stb\stb_image_resize2.h">
<Filter>3rdparty\stb</Filter>
</ClInclude>
<ClInclude Include="api\replay\version.h">
Expand Down
4 changes: 2 additions & 2 deletions renderdoc/replay/capture_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "serialise/rdcfile.h"
#include "serialise/serialiser.h"
#include "stb/stb_image.h"
#include "stb/stb_image_resize.h"
#include "stb/stb_image_resize2.h"
#include "stb/stb_image_write.h"

static void writeToBytebuf(void *context, void *data, int size)
Expand Down Expand Up @@ -624,7 +624,7 @@ Thumbnail CaptureFile::GetThumbnail(FileType type, uint32_t maxsize)
byte *resizedpixels = (byte *)malloc(3 * clampedWidth * clampedHeight);

stbir_resize_uint8_srgb(thumbpixels, thumbwidth, thumbheight, 0, resizedpixels,
clampedWidth, clampedHeight, 0, 3, -1, 0);
clampedWidth, clampedHeight, 0, STBIR_RGB);

free(allocatedBuffer);

Expand Down
Loading