ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/tonemap.h
(Generate patch)

Comparing ray/src/common/tonemap.h (file contents):
Revision 3.19 by greg, Fri Jan 7 22:05:30 2005 UTC vs.
Revision 3.23 by greg, Sat May 31 19:38:36 2008 UTC

# Line 7 | Line 7
7   #ifndef _RAD_TONEMAP_H_
8   #define _RAD_TONEMAP_H_
9  
10 < #include        "tifftypes.h"
10 > #include        "tiff.h"        /* needed for int32, etc. */
11  
12   #ifdef __cplusplus
13   extern "C" {
14   #endif
15  
16   /****    Argument Macros    ****/
17 <                                /* Flags of what to do */
17 >                                /* flags of what to do */
18   #define TM_F_HCONTR     01              /* human contrast sensitivity */
19   #define TM_F_MESOPIC    02              /* mesopic color sensitivity */
20   #define TM_F_LINEAR     04              /* linear brightness mapping */
# Line 70 | Line 70 | extern char    *tmErrorMessage[];      /* error messages */
70   typedef short   TMbright;               /* encoded luminance type */
71  
72                                  /* basic tone mapping data structure */
73 < typedef struct tmStruct {
73 > typedef struct {
74          int             flags;          /* flags of what to do */
75          RGBPRIMP        monpri;         /* monitor RGB primaries */
76          double          mongam;         /* monitor gamma value (approx.) */
# Line 118 | Line 118 | extern int     tmNumPkgs;      /* number of registered packages
118  
119   /****    Library Function Calls    ****/
120  
121 + extern TMbright
122 + tmCvLuminance(double lum);
123 + /*
124 +        Convert a single luminance value to an encoded brightness value.
125 + */
126  
127 + extern int
128 + tmCvLums(TMbright *ls, float *scan, int len);
129 + /*
130 +        Convert luminance values to encoded brightness values using lookup.
131 +
132 +        ls      -       returned encoded luminance values.
133 +        scan    -       input scanline.
134 +        len     -       scanline length.
135 +
136 +        returns -       0 on success, TM_E_* on error.
137 + */
138 +
139   extern TMstruct *
140   tmInit(int flags, RGBPRIMP monpri, double gamval);
141   /*
# Line 230 | Line 247 | tmDone(TMstruct *tms);
247   */
248  
249   extern int
250 < tmCvColors(TMstruct *tms, TMbright *ls, BYTE *cs, COLOR *scan, int len);
250 > tmCvGrays(TMstruct *tms, TMbright *ls, float *scan, int len);
251   /*
252 <        Convert RGB/XYZ float scanline to encoded luminance and chrominance.
252 >        Convert gray float scanline to encoded luminance.
253  
254          tms     -       tone mapping structure pointer.
255          ls      -       returned encoded luminance values.
239        cs      -       returned encoded chrominance values (Note 2).
256          scan    -       input scanline.
257          len     -       scanline length.
258  
# Line 244 | Line 260 | tmCvColors(TMstruct *tms, TMbright *ls, BYTE *cs, COLO
260   */
261  
262   extern int
263 < tmCvGrays(TMstruct *tms, TMbright *ls, float *scan, int len);
263 > tmCvColors(TMstruct *tms, TMbright *ls, BYTE *cs, COLOR *scan, int len);
264   /*
265 <        Convert gray float scanline to encoded luminance.
265 >        Convert RGB/XYZ float scanline to encoded luminance and chrominance.
266  
267          tms     -       tone mapping structure pointer.
268          ls      -       returned encoded luminance values.
269 +        cs      -       returned encoded chrominance values (Note 2).
270          scan    -       input scanline.
271          len     -       scanline length.
272  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines