Skip to content

Commit

Permalink
Use our own version of half to float to avoid using the half.h header…
Browse files Browse the repository at this point in the history
…file
  • Loading branch information
dlemstra committed Apr 30, 2024
1 parent 3570e33 commit c50fb81
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions coders/exr.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@
#if (OPENEXR_VERSION_HACK) >= 0x3010000
#define USE_OPENEXR_CORE
#include <openexr.h>
#define IMATH_HALF_NO_LOOKUP_TABLE
#include <half.h>
#endif

/*
Expand Down Expand Up @@ -440,7 +438,7 @@ static Image *ReadEXRImage(const ImageInfo *image_info,ExceptionInfo *exception)
pixel_channel;

if (channel->data_type == EXR_PIXEL_HALF)
value=imath_half_to_float(*(imath_half_bits_t *) p);
value=HalfToSinglePrecision(*(unsigned short *) p);
else
value=*(float *) p;
pixel_channel=pixel_channels[c];
Expand Down

0 comments on commit c50fb81

Please sign in to comment.