diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-12-07 18:34:16 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-12-07 19:09:34 +0300 |
commit | 4f25e168a255950f46cf10e9b6d84d0646004d7d (patch) | |
tree | 9293635cdbb9fefa22b19c82bc3a0caddf4f53e8 /source/blender/imbuf/intern/cineon/dpxlib.h | |
parent | b14b57fc0535afe245bff00ec59854ab8db97bb5 (diff) |
Fix DPX image output having invalid float metadata
Casting 0xFFFFFFFF to float does not give NaN as is needed here. Found through
compiler warning which is now fixed.
Diffstat (limited to 'source/blender/imbuf/intern/cineon/dpxlib.h')
-rw-r--r-- | source/blender/imbuf/intern/cineon/dpxlib.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/cineon/dpxlib.h b/source/blender/imbuf/intern/cineon/dpxlib.h index 6b729dba59a..1228ac4ee66 100644 --- a/source/blender/imbuf/intern/cineon/dpxlib.h +++ b/source/blender/imbuf/intern/cineon/dpxlib.h @@ -24,6 +24,8 @@ #pragma once +#include <math.h> + #include "logImageCore.h" #ifdef __cplusplus @@ -34,7 +36,8 @@ extern "C" { #define DPX_UNDEFINED_U8 0xFF #define DPX_UNDEFINED_U16 0xFFFF #define DPX_UNDEFINED_U32 0xFFFFFFFF -#define DPX_UNDEFINED_R32 0xFFFFFFFF +#define DPX_UNDEFINED_R32 NAN +#define IS_DPX_UNDEFINED_R32(x) isnan(x) #define DPX_UNDEFINED_CHAR 0 typedef struct { |