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 */ |
32 |
– |
#define BMESLOWER ((int)(-5.18*TM_BRTSCALE-.5)) |
40 |
|
#define LMESUPPER (5.62) /* upper mesopic limit */ |
41 |
+ |
#if (TM_BRTSCALE==128) |
42 |
+ |
#define BMESLOWER (-663) /* encoded LMESLOWER */ |
43 |
+ |
#define BMESUPPER (221) /* encoded LMESUPPER */ |
44 |
+ |
#else |
45 |
+ |
#define BMESLOWER ((int)(-5.18*TM_BRTSCALE-.5)) |
46 |
|
#define BMESUPPER ((int)(1.73*TM_BRTSCALE+.5)) |
47 |
+ |
#endif |
48 |
|
|
49 |
|
#ifndef int4 |
50 |
|
#define int4 int /* assume 32-bit integers */ |