ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/pfilt.h
Revision: 2.4
Committed: Sat Jun 7 05:09:46 2025 UTC (12 days, 7 hours ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 2.3: +2 -1 lines
Log Message:
refactor: Put some declarations into "paths.h" and included in "platform.h"

File Contents

# Content
1 /* RCSid: $Id: pfilt.h,v 2.3 2023/12/08 17:56:26 greg Exp $ */
2 /*
3 * Header file for picture filtering
4 */
5 #ifndef _RAD_PFILT_H_
6 #define _RAD_PFILT_H_
7
8 #include "standard.h"
9 #include "paths.h"
10 #include "color.h"
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 extern double CHECKRAD; /* radius over which gaussian is summed */
17 extern double rad; /* output pixel radius for filtering */
18 extern double thresh; /* maximum contribution for subpixel */
19 extern int nrows, ncols; /* number of rows and columns for output */
20 extern int xres, yres; /* x and y resolution */
21 extern int avghot; /* true means average in avgbrt spots */
22 extern double hotlvl; /* brightness considered "hot" */
23 extern int npts; /* # of points for stars */
24 extern double spread; /* spread for star points */
25 extern char *progname;
26 extern COLOR exposure; /* exposure for frame */
27
28 extern double x_c, y_r; /* conversion factors */
29
30 extern int xrad; /* x search radius */
31 extern int yrad; /* y search radius */
32 extern int xbrad; /* x box size */
33 extern int ybrad; /* y box size */
34
35 extern int barsize; /* size of input scan bar */
36 extern COLORV **scanin; /* input scan bar */
37 extern COLORV *scanout; /* output scan line */
38 extern COLORV **scoutbar; /* output scan bar (if thresh > 0) */
39 extern float **greybar; /* grey-averaged input values */
40 extern int obarsize; /* size of output scan bar */
41 extern int orad; /* output window radius */
42
43 extern int wrapfilt; /* wrap filter horizontally? */
44
45 typedef double brightfunc_t(SCOLOR c);
46 extern brightfunc_t *ourbright; /* brightness calculation function */
47
48 /* defined in pf2.c */
49 extern void pass1init(void); /* prepare for first pass */
50 extern void pass1default(void); /* for single pass */
51 extern void pass1scan(COLORV *scan, int y); /* process first pass scanline */
52 extern void pass2init(void); /* prepare for final pass */
53 extern void pass2scan(COLORV *scan, int y); /* process final pass scanline */
54
55 /* defined in pf3.c */
56 extern void initmask(void); /* initialize gaussian lookup table */
57 extern void dobox(SCOLOR csum, int xcent, int ycent,
58 int c, int r); /* simple box filter */
59 extern void dogauss(SCOLOR csum, int xcent, int ycent,
60 int c, int r); /* gaussian filter */
61 extern void dothresh(int xcent, int ycent,
62 int ccent, int rcent); /* gaussian threshold filter */
63
64 #ifdef __cplusplus
65 }
66 #endif
67 #endif /* _RAD_PFILT_H_ */