--- ray/src/common/tmprivat.h 2005/01/07 21:41:06 3.15 +++ ray/src/common/tmprivat.h 2009/02/09 20:23:51 3.18 @@ -1,4 +1,4 @@ -/* RCSid $Id: tmprivat.h,v 3.15 2005/01/07 21:41:06 greg Exp $ */ +/* RCSid $Id: tmprivat.h,v 3.18 2009/02/09 20:23:51 greg Exp $ */ /* * Private header file for tone mapping routines. */ @@ -37,6 +37,9 @@ extern "C" { #define MINBRT (-16*TM_BRTSCALE) /* minimum usable brightness */ #define MINLUM (1.125352e-7) /* tmLuminance(MINBRT) */ +#define HISTI(li) (((li)-MINBRT)/HISTEP) +#define HISTV(i) (MINBRT + HISTEP/2 + (i)*HISTEP) + #define LMESLOWER (5.62e-3) /* lower mesopic limit */ #define LMESUPPER (5.62) /* upper mesopic limit */ #if (TM_BRTSCALE==128) @@ -54,6 +57,8 @@ extern "C" { #define normscot(c) ( ( (int32)(SCO_rf*256.+.5)*(c)[RED] + \ (int32)(SCO_gf*256.+.5)*(c)[GRN] + \ (int32)(SCO_bf*256.+.5)*(c)[BLU] ) >> 8 ) + +extern int tmNewMap(TMstruct *tms); /* allocate new tone-mapping */ #ifndef malloc MEM_PTR malloc();