From 891f6d772070ee7ee49386c50952191072250044 Mon Sep 17 00:00:00 2001 From: nothings Date: Thu, 18 Sep 2014 12:52:11 -0700 Subject: [PATCH] Removing bitpacking warning for srgb conversion --- stb_image_resize.h | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/stb_image_resize.h b/stb_image_resize.h index ff057b7..bcca92c 100644 --- a/stb_image_resize.h +++ b/stb_image_resize.h @@ -31,13 +31,9 @@ ADDITIONAL DOCUMENTATION SRGB & FLOATING POINT REPRESENTATION - Some srgb-related code in this library relies on floats being 32-bit - IEEE floating point, and relies on a specific bitpacking order of C - bitfields. If you are on a system that uses non-IEEE floats or packs - C bitfields in the opposite order, then you can use a slower fallback - codepath by defining STBIR_NON_IEEE_FLOAT. (We didn't make this choice - idly; using mostly-but-not-100%-portable-code for this is a massive - speedup, especially upsampling where colorspace conversion dominates.) + The sRGB functions presume IEEE floating point. If you do not have + IEEE floating point, define STBIR_NON_IEEE_FLOAT. This will use + a slower implementation. MEMORY ALLOCATION The resize functions here perform a single memory allocation using @@ -655,12 +651,6 @@ typedef union { stbir_uint32 u; float f; - struct - { - stbir_uint32 Mantissa : 23; - stbir_uint32 Exponent : 8; - stbir_uint32 Sign : 1; - }; } stbir__FP32; static const stbir_uint32 fp32_to_srgb8_tab4[104] = {