• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    EXT_422_pixels
4
5Name Strings
6
7    GL_EXT_422_pixels
8
9Version
10
11    Date: 3/22/1998    Version 1.2
12
13Number
14
15    178
16
17Dependencies
18
19    None
20
21Overview
22
23    This extension provides support for converting 422 pixels in host
24    memory to 444 pixels as part of the pixel storage operation.
25
26    The pixel unpack storage operation treats a 422 pixel as a 2 element
27    format where the first element is C (chrominance) and the second
28    element is L (luminance). Luminance is present on all pixels; a full
29    chrominance value requires two pixels.
30
31    The pixel pack storage operation converts RGB to a 422 pixel defined as
32    a 2 element format where the first element stored is C (chrominance)
33    and the second element stored is L (luminance).  Luminance is present
34    on all pixels; a full chrominance value requires two pixels.
35
36    Both averaging and non-averaging is supported for green and blue
37    assignments for pack and unpack operations.
38
39New Procedures and Functions
40
41    None
42
43New Tokens
44
45    Accepted by the <format> parameter of DrawPixels, ReadPixels,
46    TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D,
47    TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax,
48    ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D,
49    GetConvolutionFilter, SeparableFilter2D, SeparableFilter3D,
50    GetSeparableFilter, ColorTable, and GetColorTable.
51
52        422_EXT                            0x80CC
53        422_REV_EXT                        0x80CD
54        422_AVERAGE_EXT                    0x80CE
55        422_REV_AVERAGE_EXT                0x80CF
56
57Additions to Chapter 2 of the 1.2 Specification (OpenGL Operation)
58
59    None
60
61Additions to Chapter 3 of the 1.2 Specification (Rasterization)
62
63    The four tokens defined by this extension are added to Table 3.6:
64
65      Format Name           Element Meaning and Order   Target Buffer
66      -------------------   -------------------------   --------------
67      422_EXT                       C, L, C, L              Color
68      422_REV_EXT                   L, C, L, C              Color
69      422_AVERAGE_EXT               C, L, C, L              Color
70      422_REV_AVERAGE_EXT           L, C, L, C              Color
71
72      Table 3.6: DrawPixels and ReadPixels formats.  The second column
73      gives a description of and the number and order of elements in a
74      group.  Unless specified as an index, formats yield components.
75
76    3.6.4 Rasterization of Pixel Rectangles
77
78    [The new formats are added to the discussion of "Conversion to RGB"]
79
80    This step is applied only if <format> is 422_EXT, 422_REV_EXT,
81    422_AVERAGE_EXT, or 422_AVERAGE_REV_EXT.  For 422_EXT and
82    422_REV_EXT, the assignment of the elements in a group to
83    R, G, and B are defined in the following equations:
84
85          Even Pixel           Odd Pixel
86        -------------        -------------
87         R = L[n*2]           R = L[n*2+1]
88         G = C[n*2]           G = C[n*2]
89         B = C[n*2+1]         B = C[n*2+1]
90
91    where 0 < n < width/2. If the <width> of the image is odd, then
92    the last column of pixels will have an undefined color value.
93
94    For 422_AVERAGE_EXT and 422_AVERAGE_REV_EXT, the assignment of the
95    elements in a group to R, G, and B are defined in the following
96    equations:
97
98          Even Pixel             Odd Pixel (Averaged)
99        -------------        ------------------------------
100         R = L[n*2]           R = L[n*2+1]
101         G = C[n*2]           G = (C[n*2] + C[n*2+2]) / 2
102         B = C[n*2+1]         B = (C[n*2+1] + C[n*2+3]) / 2
103
104    where 0 < n < width/2. If the <width> of the image is odd, then the
105    last column of pixels will have an undefined color value.  If the
106    pixels at [n*2+2] or [n*2+3] are not present, then the non-averaging
107    odd pixel equations are used for that pixel.
108
109Additions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations
110and the Framebuffer)
111
112    [The new formats are added to the discussion of "Obtaining Pixels
113    from the Framebuffer."]
114
115    [A new section, "Conversion to 422," is added after the section
116    "Conversion to L."]
117
118    This step applies only to RGBA component groups, and only if the
119    <format> is 422_EXT, 422_REV_EXT, 422_AVERAGE_EXT, or
120    422_AVERAGE_REV_EXT.  For 422_EXT, RGB is converted to a 422 pixel
121    defined as a 2 element format where the first element stored is
122    C (chrominance) and the second element stored is L (luminance).
123    For 422_REV_EXT, the first element stored is luminance and the
124    second element stored is chrominance.
125
126    Luminance is present on all pixels; only one chrominance value is
127    present on each pixel.  The conversion is performed according to the
128    following equations.
129
130          Even Pixel           Odd Pixel
131        -------------        -------------
132         L = R[n*2]           L = R[n*2+1]
133         C = G[n*2]           C = B[n*2]
134
135    where 0 < n < width/2.
136
137    For 422_AVERAGE_EXT and 422_AVERAGE_REV_EXT, the calculation of
138    the chrominance is performed by averaging adjacent pixel components
139    according to the following equations:
140
141             Even Pixel (Averaged)              Odd Pixel (Averaged)
142        ------------------------------      -----------------------------
143         L = R[n*2]                          L = R[n*2+1]
144         C = (G[n*2] + G[n*2+1]) / 2         C = (B[n*2] + B[n*2+1]) / 2
145
146    where 0 < n < width/2.  If the pixel at [n*2+1] is not present, then
147    the non-averaging pixel equations are used for that pixel.
148
149Additions to Chapter 5 of the 1.2 Specification (Special Functions)
150
151    None
152
153Additions to Chapter 6 of the 1.2 Specification (State and State Requests)
154
155    None
156
157Additions to the GLX Specification
158
159    None
160
161GLX Protocol
162
163    None
164
165Errors
166
167    None
168
169New State
170
171    None
172
173New Implementation Dependent State
174
175    None
176