Skip to content
Myr

Merge branch 'issue-609' of https://github.com/dp304/stb into working

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parents d1252e1, a66dd42 · Browse files · 1 file+9 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−1 removed

  • other:+9 added−1 removed

1 file+9 added−1 removed

modified:stb_image.h+9 added-1 removed
667 unmodified lines
668#endif669670#define STBI_SIMD_ALIGN(type, name) __declspec(align(16)) type name671672#if !defined(STBI_NO_JPEG) && defined(STBI_SSE2)673static int stbi__sse2_available(void)674{675 int info3 = stbi__cpuid3();676 return ((info3 >> 26) & 1) != 0;677}678#endif679680#else // assume GCC-style if not VC++681#define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16)))682683#if !defined(STBI_NO_JPEG) && defined(STBI_SSE2)684static int stbi__sse2_available(void)685{686 // If we're even attempting to compile this on GCC/Clang, that means687 // -msse2 is on, which means the compiler is allowed to use SSE2688 // instructions at will, and so are we.689 return 1;690}691#endif692693#endif694#endif695696// ARM NEON697#if defined(STBI_NO_SIMD) && defined(STBI_NEON)698#undef STBI_NEON
396 unmodified lines
1095 }1096 }1097}10981099#ifndef STBI_NO_GIF1100static void stbi__vertical_flip_slices(void *image, int w, int h, int z, int bytes_per_pixel)1101{1102 int slice;1103 int slice_size = w * h * bytes_per_pixel;
3 unmodified lines
1107 stbi__vertical_flip(bytes, w, h, bytes_per_pixel); 1108 bytes += slice_size; 1109 }1110}1111#endif11121113static unsigned char *stbi__load_and_postprocess_8bit(stbi__context *s, int *x, int *y, int *comp, int req_comp)1114{1115 stbi__result_info ri;
42 unmodified lines
11581159 return (stbi__uint16 *) result;1160}11611154#if !defined(STBI_NO_HDR) || !defined(STBI_NO_LINEAR)1162#if !defined(STBI_NO_HDR) && !defined(STBI_NO_LINEAR)1163static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, int req_comp)1164{1165 if (stbi__vertically_flip_on_load && result != NULL) {1166 int channels = req_comp ? req_comp : *comp;
6354 unmodified lines