| 9 |
|
#undef NOPROTO |
| 10 |
|
#define NOPROTO 1 |
| 11 |
|
#include "tonemap.h" |
| 12 |
+ |
|
| 13 |
+ |
/* required constants */ |
| 14 |
+ |
#ifndef M_LN2 |
| 15 |
+ |
#define M_LN2 0.69314718055994530942 |
| 16 |
+ |
#endif |
| 17 |
+ |
#ifndef M_LN10 |
| 18 |
+ |
#define M_LN10 2.30258509299404568402 |
| 19 |
+ |
#endif |
| 20 |
|
/* minimum values and defaults */ |
| 21 |
|
#define MINGAM 0.75 |
| 22 |
|
#define DEFGAM 2.2 |
| 37 |
|
#define MINLUM (1.125352e-7) /* tmLuminance(MINBRT) */ |
| 38 |
|
|
| 39 |
|
#define LMESLOWER (5.62e-3) /* lower mesopic limit */ |
| 40 |
< |
#define BMESLOWER ((int)(-5.18*TM_BRTSCALE-.5)) |
| 40 |
> |
#define BMESLOWER (-663) /* encoded LMESLOWER */ |
| 41 |
|
#define LMESUPPER (5.62) /* upper mesopic limit */ |
| 42 |
< |
#define BMESUPPER ((int)(1.73*TM_BRTSCALE+.5)) |
| 42 |
> |
#define BMESUPPER (221) /* encoded LMESUPPER */ |
| 43 |
|
|
| 44 |
|
#ifndef int4 |
| 45 |
|
#define int4 int /* assume 32-bit integers */ |