~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/extras/ogl-sample/main/doc/man/mangl/standard/convolutionfilter1d.gl

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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:
 
8
_C_ 
 
9
_C_ http://oss.sgi.com/projects/FreeB
 
10
_C_ 
 
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.
 
16
_C_ 
 
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.
 
22
_C_ 
 
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.
 
32
_C_
 
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_
 
44
.SH PARAMETERS
 
45
_phead(__target)
 
46
Must be _const(CONVOLUTION_1D).
 
47
_phead(__internalformat)
 
48
The internal format of the convolution filter kernel.
 
49
The allowable values are
 
50
_const(ALPHA),
 
51
_const(LUMINANCE),
 
52
_const(LUMINANCE_ALPHA),
 
53
_const(INTENSITY),
 
54
_const(RGB), and
 
55
_const(RGBA).
 
56
_phead(__width)
 
57
The width of the pixel array referenced by __image.
 
58
_phead(__format)
 
59
The format of the pixel data in __image.
 
60
The allowable values are
 
61
_const(ALPHA),
 
62
_const(ALPHA4),
 
63
_const(ALPHA8),
 
64
_const(ALPHA12),
 
65
_const(ALPHA16),
 
66
_const(LUMINANCE),
 
67
_const(LUMINANCE4),
 
68
_const(LUMINANCE8),
 
69
_const(LUMINANCE12),
 
70
_const(LUMINANCE16),
 
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),
 
78
_const(INTENSITY),
 
79
_const(INTENSITY4),
 
80
_const(INTENSITY8),
 
81
_const(INTENSITY12),
 
82
_const(INTENSITY16),
 
83
_const(R3_G3_B2),
 
84
_const(RGB),
 
85
_const(RGB4),
 
86
_const(RGB5),
 
87
_const(RGB8),
 
88
_const(RGB10),
 
89
_const(RGB12),
 
90
_const(RGB16),
 
91
_const(RGBA),
 
92
_const(RGBA2),
 
93
_const(RGBA4),
 
94
_const(RGB5_A1),
 
95
_const(RGBA8),
 
96
_const(RGB10_A2),
 
97
_const(RGBA12), or
 
98
_const(RGBA16).
 
99
_phead(__type)
 
100
The type of the pixel data in __image.
 
101
Symbolic constants
 
102
_const(UNSIGNED_BYTE),
 
103
_const(BYTE),
 
104
_const(BITMAP),
 
105
_const(UNSIGNED_SHORT),
 
106
_const(SHORT),
 
107
_const(UNSIGNED_INT),
 
108
_const(INT),
 
109
_const(FLOAT),
 
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)
 
122
are accepted.
 
123
_phead(__image)
 
124
Pointer to a one-dimensional array of pixel data that is processed to
 
125
build the convolution filter kernel.
 
126
.SH DESCRIPTION
 
127
_cmnd builds a one-dimensional convolution filter kernel from an array of
 
128
pixels.
 
129
.sp
 
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.
 
134
.sp
 
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
 
144
process.
 
145
.sp
 
146
Each pixel is then converted to the internal format specified by
 
147
__internalformat.
 
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:
 
151
.sp
 
152
.TS
 
153
center;
 
154
lb cb cb cb cb cb cb
 
155
l c c c c c c.
 
156
_
 
157
Internal Format Red     Green   Blue    Alpha   Luminance       Intensity
 
158
_
 
159
_const(ALPHA)                           A
 
160
_const(LUMINANCE)                               R
 
161
_const(LUMINANCE_ALPHA)                 A       R
 
162
_const(INTENSITY)                                               R
 
163
_const(RGB)     R       G       B
 
164
_const(RGBA)    R       G       B       A
 
165
_
 
166
.TE
 
167
.sp
 
168
The red, green, blue, alpha, luminance, and/or intensity components of
 
169
the resulting pixels are stored in floating-point rather than integer
 
170
format.
 
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.
 
174
.PP
 
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
 
180
\f3ALPHA\fP).
 
181
These parameters are set by _cmnd(PixelTransfer).
 
182
.SH NOTES
 
183
_cmnd is present only if _arbstring(imaging) is returned when _cmnd(GetString)
 
184
is called with an argument of _const(EXTENSIONS).
 
185
.SH ERRORS
 
186
_const(INVALID_ENUM) is generated if __target is not
 
187
_const(CONVOLUTION_1D).
 
188
.P
 
189
_const(INVALID_ENUM) is generated if __internalformat is not one of the
 
190
allowable values.
 
191
.P
 
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).
 
197
.P
 
198
_const(INVALID_ENUM) is generated if __format is not one of the allowable
 
199
values.
 
200
.P
 
201
_const(INVALID_ENUM) is generated if __type is not one of the allowable
 
202
values.
 
203
.P
 
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).
 
207
.P
 
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).
 
214
.P
 
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).
 
225
.SH ASSOCIATED GETS
 
226
_cmnd(GetConvolutionParameter), _cmnd(GetConvolutionFilter)
 
227
.SH SEE ALSO
 
228
_cmnd(ConvolutionFilter2D),
 
229
_cmnd(SeparableFilter2D),
 
230
_cmnd(ConvolutionParameter),
 
231
_cmnd(PixelTransfer)