28 #ifndef __SYNFIG_COLOR_COMMON_H
29 #define __SYNFIG_COLOR_COMMON_H
40 #include <OpenEXR/half.h>
45 #define use_colorspace_gamma() App::use_colorspace_gamma
46 #define colorspace_gamma() (2.2f)
47 #define gamma_in(x) ((x>=0) ? pow((float)x,1.0f/colorspace_gamma()) : -pow((float)-x,1.0f/colorspace_gamma()))
48 #define gamma_out(x) ((x>=0) ? pow((float)x, colorspace_gamma()) : -pow((float)-x, colorspace_gamma()))
52 #if defined(__APPLE__) && !defined(SYNFIG_ISNAN_FIX)
56 inline bool isnan(
double x) {
return x != x; }
57 inline bool isnan(
float x) {
return x != x; }
58 #define SYNFIG_ISNAN_FIX 1
61 #define isnan(x) (std::isnan)(x)
75 { 0.299f, 0.587f, 0.114f },
76 { -0.168736f, -0.331264f, 0.5f },
77 { 0.5f, -0.418688f, -0.081312f }
82 { 1.0f, 0.0f, 1.402f },
83 { 1.0f, -0.344136f, -0.714136f },
84 { 1.0f, 1.772f, 0.0f }
90 #endif // __SYNFIG_COLOR_COMMON_H