1
_C_ License Applicability. Except to the extent portions of this file are
2
_C_ made subject to an alternative license as permitted in the SGI Free
3
_C_ Software License B, Version 1.1 (the "License"), the contents of this
4
_C_ file are subject only to the provisions of the License. You may not use
5
_C_ this file except in compliance with the License. You may obtain a copy
6
_C_ of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
7
_C_ Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
9
_C_ http://oss.sgi.com/projects/FreeB
11
_C_ Note that, as provided in the License, the Software is distributed on an
12
_C_ "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
13
_C_ DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
14
_C_ CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
15
_C_ PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
17
_C_ Original Code. The Original Code is: OpenGL Sample Implementation,
18
_C_ Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
19
_C_ Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
20
_C_ Copyright in any portions created by third parties is as indicated
21
_C_ elsewhere herein. All Rights Reserved.
23
_C_ Additional Notice Provisions: The application programming interfaces
24
_C_ established by SGI in conjunction with the Original Code are The
25
_C_ OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
26
_C_ April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
27
_C_ 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
28
_C_ Window System(R) (Version 1.3), released October 19, 1998. This software
29
_C_ was created using the OpenGL(R) version 1.2.1 Sample Implementation
30
_C_ published by SGI, but has not been independently verified as being
31
_C_ compliant with the OpenGL(R) version 1.2.1 Specification.
33
_C_ The first character in this file must be an '_'!
34
_C_ Anything on a line after _C_ is ignored
35
_define(_filters,tbl)_C_
36
_header(ConvolutionFilter1D,define a one-dimensional convolution filter)
37
_names(ConvolutionFilter1D)
38
_define(@<__target>@,@<_param1>@)_C_
39
_define(@<__internalformat>@,@<_param2>@)_C_
40
_define(@<__width>@,@<_param3>@)_C_
41
_define(@<__format>@,@<_param4>@)_C_
42
_define(@<__type>@,@<_param5>@)_C_
43
_define(@<__image>@,@<_param6>@)_C_
46
Must be _const(CONVOLUTION_1D).
47
_phead(__internalformat)
48
The internal format of the convolution filter kernel.
49
The allowable values are
52
_const(LUMINANCE_ALPHA),
57
The width of the pixel array referenced by __image.
59
The format of the pixel data in __image.
60
The allowable values are
71
_const(LUMINANCE_ALPHA),
72
_const(LUMINANCE4_ALPHA4),
73
_const(LUMINANCE6_ALPHA2),
74
_const(LUMINANCE8_ALPHA8),
75
_const(LUMINANCE12_ALPHA4),
76
_const(LUMINANCE12_ALPHA12),
77
_const(LUMINANCE16_ALPHA16),
100
The type of the pixel data in __image.
102
_const(UNSIGNED_BYTE),
105
_const(UNSIGNED_SHORT),
107
_const(UNSIGNED_INT),
110
_const(UNSIGNED_BYTE_3_3_2),
111
_const(UNSIGNED_BYTE_2_3_3_REV),
112
_const(UNSIGNED_SHORT_5_6_5),
113
_const(UNSIGNED_SHORT_5_6_5_REV),
114
_const(UNSIGNED_SHORT_4_4_4_4),
115
_const(UNSIGNED_SHORT_4_4_4_4_REV),
116
_const(UNSIGNED_SHORT_5_5_5_1),
117
_const(UNSIGNED_SHORT_1_5_5_5_REV),
118
_const(UNSIGNED_INT_8_8_8_8),
119
_const(UNSIGNED_INT_8_8_8_8_REV),
120
_const(UNSIGNED_INT_10_10_10_2), and
121
_const(UNSIGNED_INT_2_10_10_10_REV)
124
Pointer to a one-dimensional array of pixel data that is processed to
125
build the convolution filter kernel.
127
_cmnd builds a one-dimensional convolution filter kernel from an array of
130
The pixel array specified by __width, __format, __type, and __image
131
is extracted from memory and
132
processed just as if _cmnd(DrawPixels) were called, but processing
133
stops after the final expansion to RGBA is completed.
135
The R, G, B, and A components of each pixel are next scaled by the four
136
1D _const(CONVOLUTION_FILTER_SCALE) parameters and biased by the
137
four 1D _const(CONVOLUTION_FILTER_BIAS) parameters.
138
(The scale and bias parameters are set by _cmnd(ConvolutionParameter)
139
using the _const(CONVOLUTION_1D) target and the names
140
_const(CONVOLUTION_FILTER_SCALE) and _const(CONVOLUTION_FILTER_BIAS).
141
The parameters themselves are vectors of four values that are applied to red,
142
green, blue, and alpha, in that order.)
143
The R, G, B, and A values are not clamped to [0,1] at any time during this
146
Each pixel is then converted to the internal format specified by
148
This conversion simply maps the component values of the pixel (R, G, B,
149
and A) to the values included in the internal format (red, green, blue,
150
alpha, luminance, and intensity). The mapping is as follows:
157
Internal Format Red Green Blue Alpha Luminance Intensity
161
_const(LUMINANCE_ALPHA) A R
168
The red, green, blue, alpha, luminance, and/or intensity components of
169
the resulting pixels are stored in floating-point rather than integer
171
They form a one-dimensional filter kernel image indexed with coordinate
172
\f2i\fP such that \f2i\fP starts at 0 and increases from left to right.
173
Kernel location \f2i\fP is derived from the \f2i\fPth pixel, counting from 0.
175
Note that after a convolution is performed, the resulting color
176
components are also scaled by their corresponding
177
_const(POST_CONVOLUTION_c_SCALE) parameters and biased by their
178
corresponding _const(POST_CONVOLUTION_c_BIAS) parameters (where
179
\f2c\fP takes on the values \f3RED\fP, \f3GREEN\fP, \f3BLUE\fP, and
181
These parameters are set by _cmnd(PixelTransfer).
183
_cmnd is present only if _arbstring(imaging) is returned when _cmnd(GetString)
184
is called with an argument of _const(EXTENSIONS).
186
_const(INVALID_ENUM) is generated if __target is not
187
_const(CONVOLUTION_1D).
189
_const(INVALID_ENUM) is generated if __internalformat is not one of the
192
_const(INVALID_VALUE) is generated if __width is less than zero or greater
193
than the maximum supported value.
194
This value may be queried with _cmnd(GetConvolutionParameter)
195
using target _const(CONVOLUTION_1D) and name
196
_const(MAX_CONVOLUTION_WIDTH).
198
_const(INVALID_ENUM) is generated if __format is not one of the allowable
201
_const(INVALID_ENUM) is generated if __type is not one of the allowable
204
_const(INVALID_OPERATION) is generated if _cmnd is executed
205
between the execution of _cmnd(Begin) and the corresponding
206
execution of _cmnd(End).
208
_const(INVALID_OPERATION) is generated if _param4 is one of
209
_const(UNSIGNED_BYTE_3_3_2),
210
_const(UNSIGNED_BYTE_2_3_3_REV),
211
_const(UNSIGNED_SHORT_5_6_5), or
212
_const(UNSIGNED_SHORT_5_6_5_REV)
213
and _param5 is not _const(RGB).
215
_const(INVALID_OPERATION) is generated if _param4 is one of
216
_const(UNSIGNED_SHORT_4_4_4_4),
217
_const(UNSIGNED_SHORT_4_4_4_4_REV),
218
_const(UNSIGNED_SHORT_5_5_5_1),
219
_const(UNSIGNED_SHORT_1_5_5_5_REV),
220
_const(UNSIGNED_INT_8_8_8_8),
221
_const(UNSIGNED_INT_8_8_8_8_REV),
222
_const(UNSIGNED_INT_10_10_10_2), or
223
_const(UNSIGNED_INT_2_10_10_10_REV)
224
and _param5 is neither _const(RGBA) nor _const(BGRA).
226
_cmnd(GetConvolutionParameter), _cmnd(GetConvolutionFilter)
228
_cmnd(ConvolutionFilter2D),
229
_cmnd(SeparableFilter2D),
230
_cmnd(ConvolutionParameter),