diff --git a/src/test/OpenEXRCoreTest/compression.cpp b/src/test/OpenEXRCoreTest/compression.cpp index aed0257ff3..14f09e5246 100644 --- a/src/test/OpenEXRCoreTest/compression.cpp +++ b/src/test/OpenEXRCoreTest/compression.cpp @@ -49,6 +49,15 @@ using namespace IMATH_NAMESPACE; namespace IMF = OPENEXR_IMF_NAMESPACE; using namespace IMF; +#if (IMATH_VERSION_MAJOR < 3) || (IMATH_VERSION_MAJOR == 3 && IMATH_VERSION_MINOR < 1) +inline float imath_half_to_float( uint16_t a ) +{ + half tmp; + tmp.setBits( a ); + return static_cast( tmp ); +} +#endif + //////////////////////////////////////// inline int