| 1 |
< |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
| 2 |
< |
|
| 3 |
< |
/* SCCSid "$SunId$ SGI" */ |
| 4 |
< |
|
| 1 |
> |
/* RCSid: $Id$ */ |
| 2 |
|
/* |
| 3 |
|
* Header file for picture file conditioning. |
| 4 |
|
*/ |
| 5 |
+ |
#ifndef _RAD_PCOND_H_ |
| 6 |
+ |
#define _RAD_PCOND_H_ |
| 7 |
|
|
| 8 |
|
#include "standard.h" |
| 10 |
– |
|
| 9 |
|
#include "color.h" |
| 12 |
– |
|
| 10 |
|
#include "view.h" |
| 11 |
|
|
| 12 |
< |
#include "resolu.h" |
| 12 |
> |
#ifdef __cplusplus |
| 13 |
> |
extern "C" { |
| 14 |
> |
#endif |
| 15 |
|
|
| 16 |
+ |
#ifndef ADJ_VEIL |
| 17 |
+ |
#define ADJ_VEIL 0 /* adjust veil to preserve contrast? */ |
| 18 |
+ |
#endif |
| 19 |
|
|
| 20 |
|
#define SWNORM 2.26 /* scotopic/photopic ratio for white */ |
| 21 |
|
#define WHTSEFFICACY (SWNORM*WHTEFFICACY) |
| 23 |
|
#define BotMesopic 5.62e-3 /* top of scotopic range */ |
| 24 |
|
#define TopMesopic 5.62 /* bottom of photopic range */ |
| 25 |
|
|
| 26 |
< |
#define FOVDIA (1.0*PI/180.) /* foveal diameter (radians) */ |
| 26 |
> |
#define FOVDIA (1.0*PI/180.0) /* foveal diameter (radians) */ |
| 27 |
|
|
| 28 |
|
#define HISTRES 100 /* histogram resolution */ |
| 29 |
+ |
#define MAXPREHIST 1024 /* maximum precomputed histogram */ |
| 30 |
|
|
| 31 |
|
#define LMIN 1e-7 /* minimum visible world luminance */ |
| 32 |
|
#define LMAX 1e5 /* maximum visible world luminance */ |
| 43 |
|
#define DO_COLOR 010 |
| 44 |
|
#define DO_CWEIGHT 020 |
| 45 |
|
#define DO_FIXHIST 040 |
| 46 |
< |
#define DO_LINEAR 0100 |
| 46 |
> |
#define DO_PREHIST 0100 |
| 47 |
> |
#define DO_LINEAR 0200 |
| 48 |
|
|
| 49 |
|
#define DO_HUMAN (DO_ACUITY|DO_VEIL|DO_HSENS|DO_COLOR) |
| 50 |
|
|
| 68 |
|
#define ldmin (ldmax/lddyn) |
| 69 |
|
|
| 70 |
|
extern COLOR *fovimg; /* foveal (1 degree) averaged image */ |
| 71 |
< |
extern short fvxr, fvyr; /* foveal image resolution */ |
| 71 |
> |
extern int fvxr, fvyr; /* foveal image resolution */ |
| 72 |
> |
extern float *crfimg; /* contrast reduction factors */ |
| 73 |
|
|
| 74 |
|
#define fovscan(y) (fovimg+(y)*fvxr) |
| 75 |
+ |
#define crfscan(y) (crfimg+(y)*fvxr) |
| 76 |
|
|
| 77 |
|
extern double fixfrac; /* histogram share due to fixations */ |
| 78 |
|
extern short (*fixlst)[2]; /* fixation history list */ |
| 79 |
|
extern int nfixations; /* number of fixation points */ |
| 80 |
|
|
| 81 |
< |
extern float bwhist[HISTRES]; /* luminance histogram */ |
| 81 |
> |
extern double bwhist[HISTRES]; /* luminance histogram */ |
| 82 |
|
extern double histot; /* total count of histogram */ |
| 83 |
|
extern double bwmin, bwmax; /* histogram limits */ |
| 84 |
|
extern double bwavg; /* mean brightness */ |
| 101 |
|
|
| 102 |
|
extern double hacuity(); /* human acuity func. (cycles/deg.) */ |
| 103 |
|
extern double htcontrs(); /* human contrast sens. func. */ |
| 104 |
+ |
extern double clampf(); /* histogram clamping function */ |
| 105 |
+ |
extern double crfactor(); /* contrast reduction factor */ |
| 106 |
|
|
| 107 |
|
extern COLOR *firstscan(); /* first processed scanline */ |
| 108 |
|
extern COLOR *nextscan(); /* next processed scanline */ |
| 109 |
+ |
|
| 110 |
+ |
#ifdef __cplusplus |
| 111 |
+ |
} |
| 112 |
+ |
#endif |
| 113 |
+ |
#endif /* _RAD_PCOND_H_ */ |