| 1 |
– |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
| 2 |
– |
|
| 1 |
|
#ifndef lint |
| 2 |
< |
static char SCCSid[] = "$SunId$ SGI"; |
| 2 |
> |
static const char RCSid[] = "$Id$"; |
| 3 |
|
#endif |
| 6 |
– |
|
| 4 |
|
/* |
| 5 |
|
* Integer operations on COLR scanlines |
| 6 |
|
*/ |
| 7 |
|
|
| 8 |
+ |
#include "copyright.h" |
| 9 |
+ |
|
| 10 |
+ |
#include <math.h> |
| 11 |
|
#include "color.h" |
| 12 |
|
|
| 13 |
|
#define NULL 0 |
| 20 |
|
|
| 21 |
|
static BYTE (*g_bval)[256] = NULL; |
| 22 |
|
|
| 23 |
– |
#ifndef pow |
| 24 |
– |
extern double pow(); |
| 25 |
– |
#endif |
| 23 |
|
|
| 24 |
< |
|
| 24 |
> |
int |
| 25 |
|
setcolrcor(f, a2) /* set brightness correction */ |
| 26 |
|
double (*f)(); |
| 27 |
|
double a2; |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
|
| 46 |
+ |
int |
| 47 |
|
setcolrinv(f, a2) /* set inverse brightness correction */ |
| 48 |
|
double (*f)(); |
| 49 |
|
double a2; |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
|
| 72 |
+ |
int |
| 73 |
|
setcolrgam(g) /* set gamma conversion */ |
| 74 |
|
double g; |
| 75 |
|
{ |
| 79 |
|
} |
| 80 |
|
|
| 81 |
|
|
| 82 |
+ |
int |
| 83 |
|
colrs_gambs(scan, len) /* convert scanline of colrs to gamma bytes */ |
| 84 |
|
register COLR *scan; |
| 85 |
|
int len; |
| 129 |
|
} |
| 130 |
|
|
| 131 |
|
|
| 132 |
+ |
int |
| 133 |
|
gambs_colrs(scan, len) /* convert gamma bytes to colr scanline */ |
| 134 |
|
register COLR *scan; |
| 135 |
|
int len; |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
|
| 169 |
+ |
void |
| 170 |
|
shiftcolrs(scan, len, adjust) /* shift a scanline of colors by 2^adjust */ |
| 171 |
|
register COLR *scan; |
| 172 |
|
register int len; |
| 188 |
|
} |
| 189 |
|
|
| 190 |
|
|
| 191 |
+ |
void |
| 192 |
|
normcolrs(scan, len, adjust) /* normalize a scanline of colrs */ |
| 193 |
|
register COLR *scan; |
| 194 |
|
int len; |