| 36 |
|
|
| 37 |
|
extern COLOR exposure; /* exposure for frame */ |
| 38 |
|
|
| 39 |
+ |
extern double (*ourbright)(); /* brightness calculation function */ |
| 40 |
+ |
|
| 41 |
|
#define AVGLVL 0.5 /* target mean brightness */ |
| 42 |
|
|
| 43 |
|
double avgbrt; /* average picture brightness */ |
| 82 |
|
|
| 83 |
|
for (x = 0; x < xres; x++) { |
| 84 |
|
|
| 85 |
< |
cbrt = bright(scan[x]); |
| 85 |
> |
cbrt = (*ourbright)(scan[x]); |
| 86 |
|
|
| 87 |
|
if (cbrt <= 0) |
| 88 |
|
continue; |
| 120 |
|
|
| 121 |
|
scalecolor(exposure, AVGLVL/avgbrt); |
| 122 |
|
|
| 123 |
< |
sprdfact = spread / (hotlvl * bright(exposure)) |
| 123 |
> |
sprdfact = spread / (hotlvl * (*ourbright)(exposure)) |
| 124 |
|
* ((double)xres*xres + (double)yres*yres) / 4.0; |
| 125 |
|
} |
| 126 |
|
|