15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    OML_resample
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_OML_resample
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Jon Leech, Silicon Graphics (ljp 'at' sgi.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciStatus
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Complete. Approved by the Khronos SIG on July 19, 2001.
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciVersion
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    Last Modified Date: 07/23/2001
205bd8deadSopenharmony_ci    Author Revision: $Header: //depot/main/doc/registry/extensions/OML/resample.spec#10 $
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ciNumber
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ci    241
255bd8deadSopenharmony_ci
265bd8deadSopenharmony_ciDependencies
275bd8deadSopenharmony_ci
285bd8deadSopenharmony_ci    OML_subsample is required.
295bd8deadSopenharmony_ci    This extension is written against the OpenGL 1.2.1 Specification,
305bd8deadSopenharmony_ci
315bd8deadSopenharmony_ciOverview
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ci    This extension enhances the resampling capabilities of the
345bd8deadSopenharmony_ci    OML_subsample extension. It is loosely based on the SGIX_resample
355bd8deadSopenharmony_ci    extension.
365bd8deadSopenharmony_ci
375bd8deadSopenharmony_ci    When converting data from subsampled to uniform sampling, upsampling
385bd8deadSopenharmony_ci    may be performed by one of three methods: component replication,
395bd8deadSopenharmony_ci    zero fill, or adjacent neighbor averaging.
405bd8deadSopenharmony_ci
415bd8deadSopenharmony_ci    When converting data from uniform sampling to subsampled form,
425bd8deadSopenharmony_ci    downsampling may be performed only by component decimation (point
435bd8deadSopenharmony_ci    sampling) or averaging.
445bd8deadSopenharmony_ci
455bd8deadSopenharmony_ci    Upsampling and downsampling filters other than those defined by this
465bd8deadSopenharmony_ci    extension may be performed by appropriate use of convolution and
475bd8deadSopenharmony_ci    other pixel transfer operations. The zero fill unpacking mode is
485bd8deadSopenharmony_ci    included to assist applications wanting to define their own filters.
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ciIssues
515bd8deadSopenharmony_ci
525bd8deadSopenharmony_ci  * Should RESAMPLE_xxx enums be renamed to PIXEL_RESAMPLE_xxx?
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ciIP Status
555bd8deadSopenharmony_ci
565bd8deadSopenharmony_ci    No known issues.
575bd8deadSopenharmony_ci
585bd8deadSopenharmony_ciNew Procedures and Functions
595bd8deadSopenharmony_ci
605bd8deadSopenharmony_ci    None.
615bd8deadSopenharmony_ci
625bd8deadSopenharmony_ciNew Tokens
635bd8deadSopenharmony_ci
645bd8deadSopenharmony_ci    Accepted by the <pname> parameter of PixelStoref, PixelStorei,
655bd8deadSopenharmony_ci    GetBooleanv, GetIntegerv, GetFloatv and GetDoublev:
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci	PACK_RESAMPLE_OML		    0x8984
685bd8deadSopenharmony_ci	UNPACK_RESAMPLE_OML		    0x8985
695bd8deadSopenharmony_ci
705bd8deadSopenharmony_ci    Accepted by the <param> parameter of PixelStoref and PixelStorei
715bd8deadSopenharmony_ci    when the <pname> parameter is UNPACK_RESAMPLE_OML:
725bd8deadSopenharmony_ci
735bd8deadSopenharmony_ci	RESAMPLE_REPLICATE_OML		    0x8986
745bd8deadSopenharmony_ci	RESAMPLE_ZERO_FILL_OML		    0x8987
755bd8deadSopenharmony_ci	RESAMPLE_AVERAGE_OML		    0x8988
765bd8deadSopenharmony_ci
775bd8deadSopenharmony_ci    Accepted by the <param> parameter of PixelStoref and PixelStorei
785bd8deadSopenharmony_ci    when the <pname> parameter is PACK_RESAMPLE_OML:
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci	RESAMPLE_DECIMATE_OML		    0x8989
815bd8deadSopenharmony_ci	RESAMPLE_AVERAGE_OML		    0x8988
825bd8deadSopenharmony_ci
835bd8deadSopenharmony_ci
845bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation)
855bd8deadSopenharmony_ci
865bd8deadSopenharmony_ci    None.
875bd8deadSopenharmony_ci
885bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 1.2.1 Specification (Rasterization)
895bd8deadSopenharmony_ci
905bd8deadSopenharmony_ci  - (3.6.1, p. 75 "Pixel Storage Modes")
915bd8deadSopenharmony_ci
925bd8deadSopenharmony_ci    Add to table 3.1 (p. 76):
935bd8deadSopenharmony_ci
945bd8deadSopenharmony_ci    Parameter Name	Type	Initial Value		Valid Range
955bd8deadSopenharmony_ci    --------------	----	-------------		-----------
965bd8deadSopenharmony_ci    UNPACK_RESAMPLE_OML integer RESAMPLE_REPLICATE_OML	RESAMPLE_REPLICATE_OML
975bd8deadSopenharmony_ci							RESAMPLE_ZERO_FILL_OML
985bd8deadSopenharmony_ci							RESAMPLE_AVERAGE_OML
995bd8deadSopenharmony_ci
1005bd8deadSopenharmony_ci    PACK_RESAMPLE_OML	integer RESAMPLE_DECIMATE_OML	RESAMPLE_DECIMATE_OML
1015bd8deadSopenharmony_ci							RESAMPLE_AVERAGE_OML
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ci  - (3.6.4, p. 88 "Rasterization of Pixel Rectangles")
1055bd8deadSopenharmony_ci
1065bd8deadSopenharmony_ci  - Modify the new subsection "Conversion to Uniform Sampling"
1075bd8deadSopenharmony_ci    (introduced by OML_subsample) to read:
1085bd8deadSopenharmony_ci
1095bd8deadSopenharmony_ci    Conversion to Uniform Sampling
1105bd8deadSopenharmony_ci
1115bd8deadSopenharmony_ci    This step is applied only to subsampled data. If <format> is
1125bd8deadSopenharmony_ci    FORMAT_SUBSAMPLE_24_24_OML, then the number of components per pixel
1135bd8deadSopenharmony_ci    is increased from two to three. If <format> is
1145bd8deadSopenharmony_ci    FORMAT_SUBSAMPLE_244_244_OML. then the number of components per
1155bd8deadSopenharmony_ci    pixel is increased from three to four. The upsampling method used is
1165bd8deadSopenharmony_ci    determined by the value of the PixelStore parameter
1175bd8deadSopenharmony_ci    UNPACK_RESAMPLE_OML.
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ci    After conversion to uniform sampling (see figure 3.9). pixels are
1205bd8deadSopenharmony_ci    thereafter treated as though they were RGB (three component) or RGBA
1215bd8deadSopenharmony_ci    (four component) format.
1225bd8deadSopenharmony_ci
1235bd8deadSopenharmony_ci    In the remainder of this section, the j'th component of the i'th
1245bd8deadSopenharmony_ci    pixel in a row is denoted by S_i,j (for source pixels in client
1255bd8deadSopenharmony_ci    memory) and D_i,j (for destination pixels in the color buffer).
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ci    Replication
1285bd8deadSopenharmony_ci
1295bd8deadSopenharmony_ci    If the value of UNPACK_RESAMPLE_OML is RESAMPLE_REPLICATE_OML (see
1305bd8deadSopenharmony_ci    figure 3.9), destination component values are defined as:
1315bd8deadSopenharmony_ci
1325bd8deadSopenharmony_ci    For even pixels ((i mod 2) == 0):
1335bd8deadSopenharmony_ci
1345bd8deadSopenharmony_ci	D_i,0 = S_i,0
1355bd8deadSopenharmony_ci	D_i,1 = S_i,1
1365bd8deadSopenharmony_ci	D_i,2 = S_i+1,0
1375bd8deadSopenharmony_ci	D_i,3 = S_i,2
1385bd8deadSopenharmony_ci
1395bd8deadSopenharmony_ci    For odd pixels ((i mod 2) == 1):
1405bd8deadSopenharmony_ci
1415bd8deadSopenharmony_ci	D_i,0 = S_i-1,0
1425bd8deadSopenharmony_ci	D_i,1 = S_i,1
1435bd8deadSopenharmony_ci	D_i,2 = S_i,0
1445bd8deadSopenharmony_ci	D_i,3 = S_i,2
1455bd8deadSopenharmony_ci
1465bd8deadSopenharmony_ci
1475bd8deadSopenharmony_ci  - (figure 3.9, introduced by OML_subsample, is unchanged)
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ci    Zero Fill
1505bd8deadSopenharmony_ci
1515bd8deadSopenharmony_ci    If the value of UNPACK_RESAMPLE_OML is RESAMPLE_ZERO_FILL_OML (see
1525bd8deadSopenharmony_ci    figure 3.10), destination component values are defined as:
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci    For even pixels ((i mod 2) == 0):
1555bd8deadSopenharmony_ci
1565bd8deadSopenharmony_ci	D_i,0 = S_i,0
1575bd8deadSopenharmony_ci	D_i,1 = S_i,1
1585bd8deadSopenharmony_ci	D_i,2 = S_i+1,0
1595bd8deadSopenharmony_ci	D_i,3 = S_i,2
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ci    For odd pixels ((i mod 2) == 1):
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ci	D_i,0 = 0
1645bd8deadSopenharmony_ci	D_i,1 = S_i,1
1655bd8deadSopenharmony_ci	D_i,2 = 0
1665bd8deadSopenharmony_ci	D_i,3 = S_i,2
1675bd8deadSopenharmony_ci
1685bd8deadSopenharmony_ci  - Add new figure 3.10, following the new figure 3.9 defined in the
1695bd8deadSopenharmony_ci    OML_subsample extension:
1705bd8deadSopenharmony_ci
1715bd8deadSopenharmony_ci    FORMAT_SUBSAMPLE_24_24_OML:
1725bd8deadSopenharmony_ci    <Cb0,Y0>	 <Cr0,Y1>     <Cb2,Y2>	  <Cr2, Y3>
1735bd8deadSopenharmony_ci      |  |	  |   |        |   |	    |	|
1745bd8deadSopenharmony_ci      |  |   ____/    |        |   |   ____/	|
1755bd8deadSopenharmony_ci      |  |  /	      |        |   |  /		|
1765bd8deadSopenharmony_ci      |  |  |	 0.0  | 0.0    |   |  |    0.0	| 0.0
1775bd8deadSopenharmony_ci      |  |  |	  |   |  |     |   |  |     |	|  |
1785bd8deadSopenharmony_ci      V  V  V	  V   V  V     V   V  V     V	V  V
1795bd8deadSopenharmony_ci    <Cb0,Y0,Cr0> <Cb0,Y1,Cr0> <Cb2,Y2,Cr2> <Cb2,Y3,Cr2>
1805bd8deadSopenharmony_ci    < R0,G0,B1 > < R0,G1,B1 > < R2,G2,B3 > < R2,G3,B3 >
1815bd8deadSopenharmony_ci
1825bd8deadSopenharmony_ci    FORMAT_SUBSAMPLE_244_244_OML:
1835bd8deadSopenharmony_ci    <Cb0,Y0,A0>     <Cr0,Y1,A1>     <Cb2,Y2,A2>     <Cr2,Y3,A3>
1845bd8deadSopenharmony_ci      |  |   \	     |	 |   \	     |	 |   \	     |	 |   \
1855bd8deadSopenharmony_ci      |  |   _\_____/	 |    \      |	 |   _\_____/	 |    \
1865bd8deadSopenharmony_ci      |  |  /  \	 |     \     |	 |  /  \	 |     \
1875bd8deadSopenharmony_ci      |  |  |	\   0.0  | 0.0	\    |	 |  |	\   0.0  | 0.0	\
1885bd8deadSopenharmony_ci      |  |  |	|    |	 |  |	|    |	 |  |	|    |	 |  |	|
1895bd8deadSopenharmony_ci      V  V  V	V    V	 V  V	V    V	 V  V	V    V	 V  V	V
1905bd8deadSopenharmony_ci    <Cb0,Y0,Cr0,A0> <Cb0,Y1,Cr0,A1> <Cb2,Y2,Cr2,A2> <Cb2,Y3,Cr2,A3>
1915bd8deadSopenharmony_ci    < R0,G0,B1,A0 > < R0,G1,B1,A1 > < R2,G2,B3,A2 > < R2,G3,B3,A3 >
1925bd8deadSopenharmony_ci
1935bd8deadSopenharmony_ci
1945bd8deadSopenharmony_ci    Figure 3.10: Upsampling with zero fill of subsampled data from host
1955bd8deadSopenharmony_ci    memory to form RGB or RGBA pixels.
1965bd8deadSopenharmony_ci
1975bd8deadSopenharmony_ci
1985bd8deadSopenharmony_ci    Averaging
1995bd8deadSopenharmony_ci
2005bd8deadSopenharmony_ci    If the value of UNPACK_RESAMPLE_OML is RESAMPLE_AVERAGE_OML (see
2015bd8deadSopenharmony_ci    figure 3.11), destination component values are defined as:
2025bd8deadSopenharmony_ci
2035bd8deadSopenharmony_ci    For even pixels:
2045bd8deadSopenharmony_ci
2055bd8deadSopenharmony_ci	D_i,0 = S_i,0
2065bd8deadSopenharmony_ci	D_i,1 = S_i,1
2075bd8deadSopenharmony_ci	D_i,2 = S_i+1,0
2085bd8deadSopenharmony_ci	D_i,3 = S_i,2
2095bd8deadSopenharmony_ci
2105bd8deadSopenharmony_ci	(No special case for D_i,2 can arise when i is the last pixel,
2115bd8deadSopenharmony_ci	because of the restriction to even image widths).
2125bd8deadSopenharmony_ci
2135bd8deadSopenharmony_ci    For odd pixels:
2145bd8deadSopenharmony_ci
2155bd8deadSopenharmony_ci	D_i,0 = S_i,0			    i == <width>-1 (last pixel)
2165bd8deadSopenharmony_ci	      = 1/2 S_i-1,0 + 1/2 S_i+1,0   otherwise
2175bd8deadSopenharmony_ci	D_i,1 = S_i,1
2185bd8deadSopenharmony_ci	D_i,2 = S_i,0			    i == <width>-1 (last pixel)
2195bd8deadSopenharmony_ci	      = 1/2 S_i,0 + 1/2 S_i+2,0     otherwise
2205bd8deadSopenharmony_ci	D_i,3 = S_i,2
2215bd8deadSopenharmony_ci
2225bd8deadSopenharmony_ci  - Add new figure 3.11, following the new figure 3.10:
2235bd8deadSopenharmony_ci
2245bd8deadSopenharmony_ci    FORMAT_SUBSAMPLE_24_24_OML:
2255bd8deadSopenharmony_ci    <Cb0,Y0>	 <Cr0,Y1>     <Cb2,Y2>	  <Cr2, Y3>
2265bd8deadSopenharmony_ci      |  |	  |   |        |   |	    |	|
2275bd8deadSopenharmony_ci      |  |   ____/ \__|__  ____|___|_______/ \__|__  _
2285bd8deadSopenharmony_ci      |  |  /	      |  \/    |   |  /		|  \/
2295bd8deadSopenharmony_ci      |\_|__|_____  __|__|___ /|\__|__|_____  __|__|__
2305bd8deadSopenharmony_ci      |  |  |	  \/  |  |     |   |  |     \/	|  |
2315bd8deadSopenharmony_ci      V  V  V	  V   V  V     V   V  V     V	V  V
2325bd8deadSopenharmony_ci    <Cb0,Y0,Cr0> <Cb0,Y1,Cr0> <Cb2,Y2,Cr2> <Cb2,Y3,Cr2>
2335bd8deadSopenharmony_ci    < R0,G0,B1 > < R0,G1,B1 > < R2,G2,B3 > < R2,G3,B3 >
2345bd8deadSopenharmony_ci
2355bd8deadSopenharmony_ci
2365bd8deadSopenharmony_ci    FORMAT_SUBSAMPLE_244_244_OML:
2375bd8deadSopenharmony_ci    <Cb0,Y0,A0>     <Cr0,Y1,A1>     <Cb2,Y2,A2>     <Cr2,Y3,A3>
2385bd8deadSopenharmony_ci      |  |   \	     |	 |   \	     |	 |   \	      |   |   \
2395bd8deadSopenharmony_ci      |  |   _\_____/ \__|__  \______|___|____\______/ \__|__  \___
2405bd8deadSopenharmony_ci      |  |  /  \	 |  \/ \     |	 |  /  \	  |  \/ \
2415bd8deadSopenharmony_ci      |\_|__|___\____  __|__|___\___/|\__|__|___\_____	__|__|___\_
2425bd8deadSopenharmony_ci      |  |  |	|    \/  |  |	|    |	 |  |	|     \/  |  |	 |
2435bd8deadSopenharmony_ci      V  V  V	V    V	 V  V	V    V	 V  V	V     V   V  V	 V
2445bd8deadSopenharmony_ci    <Cb0,Y0,Cr0,A0> <Cb0,Y1,Cr0,A1> <Cb2,Y2,Cr2,A2> <Cb2,Y3,Cr2,A3>
2455bd8deadSopenharmony_ci    < R0,G0,B1,A0 > < R0,G1,B1,A1 > < R2,G2,B3,A2 > < R2,G3,B3,A3 >
2465bd8deadSopenharmony_ci
2475bd8deadSopenharmony_ci    Figure 3.11: Upsampling with averaging of subsampled data from host
2485bd8deadSopenharmony_ci    memory to form RGB or RGBA pixels.
2495bd8deadSopenharmony_ci
2505bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 1.2.1 Specification (Per-Fragment
2515bd8deadSopenharmony_ciOperations and the Frame Buffer)
2525bd8deadSopenharmony_ci
2535bd8deadSopenharmony_ci  - Modify the new section "Conversion to Subsampled Form" (introduced
2545bd8deadSopenharmony_ci    by OML_subsample) to read:
2555bd8deadSopenharmony_ci
2565bd8deadSopenharmony_ci    Conversion to Subsampled Form
2575bd8deadSopenharmony_ci
2585bd8deadSopenharmony_ci    This step is applied only if <format> is FORMAT_SUBSAMPLE_24_24_OML
2595bd8deadSopenharmony_ci    or FORMAT_SUBSAMPLE_244_244_OML. A filter operation specified by the
2605bd8deadSopenharmony_ci    value of PACK_RESAMPLE_OML is applied prior to the subsampling step.
2615bd8deadSopenharmony_ci
2625bd8deadSopenharmony_ci    In the remainder of this section, the j'th component of the i'th
2635bd8deadSopenharmony_ci    pixel in a row is denoted by S_i,j (for source pixels in the color
2645bd8deadSopenharmony_ci    buffer) and D_i,j (for destination pixels in client memory).
2655bd8deadSopenharmony_ci
2665bd8deadSopenharmony_ci    If <format> is FORMAT_SUBSAMPLE_24_24_OML, then the resulting pixels
2675bd8deadSopenharmony_ci    have 2 components (see figure 4.3); if <format> is
2685bd8deadSopenharmony_ci    FORMAT_SUBSAMPLE_244_244_OML, then the resulting pixels have 3
2695bd8deadSopenharmony_ci    components (see figure 4.4).
2705bd8deadSopenharmony_ci
2715bd8deadSopenharmony_ci    Decimation
2725bd8deadSopenharmony_ci
2735bd8deadSopenharmony_ci    If the value of PACK_RESAMPLE_OML is RESAMPLE_DECIMATE_OML, then
2745bd8deadSopenharmony_ci    destination component values are defined as:
2755bd8deadSopenharmony_ci
2765bd8deadSopenharmony_ci    For even pixels ((i mod 2) == 0):
2775bd8deadSopenharmony_ci
2785bd8deadSopenharmony_ci	D_i,0 = S_i,0
2795bd8deadSopenharmony_ci	D_i,1 = S_i,1
2805bd8deadSopenharmony_ci	D_i,2 = S_i,3	(only for FORMAT_SUBSAMPLE_244_244_OML)
2815bd8deadSopenharmony_ci
2825bd8deadSopenharmony_ci    For odd pixels ((i mod 2) == 1):
2835bd8deadSopenharmony_ci
2845bd8deadSopenharmony_ci	D_i,0 = S_i-1,2
2855bd8deadSopenharmony_ci	D_i,1 = S_i,1
2865bd8deadSopenharmony_ci	D_i,2 = S_i,3	(only for FORMAT_SUBSAMPLE_244_244_OML)
2875bd8deadSopenharmony_ci
2885bd8deadSopenharmony_ci  - Add new figure 4.3 (renumber following figures):
2895bd8deadSopenharmony_ci
2905bd8deadSopenharmony_ci    FORMAT_SUBSAMPLE_24_24_OML:
2915bd8deadSopenharmony_ci    <R0,G0,B0,A0> <R1,G1,B1,A1> <R2,G2,B2,A2> <R3,G3,B3,A3>
2925bd8deadSopenharmony_ci      |  | |   |   |  |  |  |	 |  |  |  |    |  |  |	|
2935bd8deadSopenharmony_ci      |  |  \  *   *  |  *  *	 |  |	\ *    *  |  *	*
2945bd8deadSopenharmony_ci      |  |   |	      |		 |  |	 |	  |
2955bd8deadSopenharmony_ci      V  V   V	      V		 V  V	 V	  V
2965bd8deadSopenharmony_ci    <Cb0,Y0><Cr0,     Y1>	<Cb2,Y2><Cr2,	  Y3>
2975bd8deadSopenharmony_ci    <--- pixel pair ---->	<--- pixel pair ---->
2985bd8deadSopenharmony_ci
2995bd8deadSopenharmony_ci    FORMAT_SUBSAMPLE_244_244_OML:
3005bd8deadSopenharmony_ci    <R0,G0,B0,A0> <R1,G1,B1,A1> <R2,G2,B2,A2> <R3,G3,B3,A3>
3015bd8deadSopenharmony_ci      |  |  |  |   |   |  |  |	  |  |	|  |   |   |  |  |
3025bd8deadSopenharmony_ci      |  |  \__|__ *   |  *  |	  |  |	\__|__ *   |  *  |
3035bd8deadSopenharmony_ci      |  |     |  \    |     |	  |  |	   |  \    |	 |
3045bd8deadSopenharmony_ci      |  |    /    |   |    /	  |  |	  /    |   |	/
3055bd8deadSopenharmony_ci      V  V   V	   V   V   V	  V  V	 V     V   V   V
3065bd8deadSopenharmony_ci    <Cb0,Y0,A0>   <Cr0,Y1,A1>	<Cb2,Y2,A2>   <Cr2,Y3,A3>
3075bd8deadSopenharmony_ci    <--- pixel pair ---->	<--- pixel pair ---->
3085bd8deadSopenharmony_ci
3095bd8deadSopenharmony_ci    Figure 4.3: Downsampling with decimation of RGB or RGBA pixels to
3105bd8deadSopenharmony_ci    form subsampled data in host memory.
3115bd8deadSopenharmony_ci
3125bd8deadSopenharmony_ci
3135bd8deadSopenharmony_ci    Averaging
3145bd8deadSopenharmony_ci
3155bd8deadSopenharmony_ci    If the value of PACK_RESAMPLE_OML is RESAMPLE_AVERAGE_OML, then
3165bd8deadSopenharmony_ci    destination component values are defined as:
3175bd8deadSopenharmony_ci
3185bd8deadSopenharmony_ci    For even pixels:
3195bd8deadSopenharmony_ci
3205bd8deadSopenharmony_ci	D_i,0 = 3/4 S_i,0 + 1/4 S_i+1,0     i == 0 (first pixel)
3215bd8deadSopenharmony_ci	      = 1/4 S_i-1,0 + 3/4 S_i,0     i == <width>-1 (last pixel)
3225bd8deadSopenharmony_ci	      = 1/4 S_i-1,0 +		    otherwise
3235bd8deadSopenharmony_ci		1/2 S_i,0 +
3245bd8deadSopenharmony_ci		1/4 S_i+1,0
3255bd8deadSopenharmony_ci	D_i,1 = S_i,1
3265bd8deadSopenharmony_ci	D_i,2 = S_i,3
3275bd8deadSopenharmony_ci
3285bd8deadSopenharmony_ci    For odd pixels:
3295bd8deadSopenharmony_ci
3305bd8deadSopenharmony_ci	D_i,0 = 3/4 S_i-1,2 + 1/4 S_i,2     i == <width>-1 (last pixel)
3315bd8deadSopenharmony_ci	      = 1/4 S_i-1,2 +		    otherwise
3325bd8deadSopenharmony_ci		1/2 S_i,2 +
3335bd8deadSopenharmony_ci		1/4 S_i+1,2
3345bd8deadSopenharmony_ci	D_i,1 = S_i,1
3355bd8deadSopenharmony_ci	D_i,2 = S_i,3
3365bd8deadSopenharmony_ci
3375bd8deadSopenharmony_ciXXX Note that the "last pixel" case is only needed for readbacks where
3385bd8deadSopenharmony_ciXXX <width> is not even, so may be removable.
3395bd8deadSopenharmony_ci
3405bd8deadSopenharmony_ci  - Add new figure 4.4 (renumber following figures):
3415bd8deadSopenharmony_ci
3425bd8deadSopenharmony_ci    FORMAT_SUBSAMPLE_24_24_OML:
3435bd8deadSopenharmony_ci    <R0,G0,B0,A0> <R1,G1,B1,A1> <R2,G2,B2,A2> <R3,G3,B3,A3>
3445bd8deadSopenharmony_ci      | _|_|_______/\_|__|______ | _|__|_______/\_|__|_______
3455bd8deadSopenharmony_ci      |/ | |	      |  |	\|/ |  \_______   |  |
3465bd8deadSopenharmony_ci      |  |  \______  _|_/ \______|__|_________ \ _|_/ \______
3475bd8deadSopenharmony_ci      |  |	   \/ |		 |  |	      \|/ |
3485bd8deadSopenharmony_ci      V  V	   V  V		 V  V	       V  V
3495bd8deadSopenharmony_ci    <Cb0,Y0>	 <Cr0,Y1>      <Cb2,Y2>      <Cr2,Y3>
3505bd8deadSopenharmony_ci
3515bd8deadSopenharmony_ci    FORMAT_SUBSAMPLE_244_244_OML:
3525bd8deadSopenharmony_ci    <R0,G0,B0,A0> <R1,G1,B1,A1> <R2,G2,B2,A2> <R3,G3,B3,A3>
3535bd8deadSopenharmony_ci      | _|_|___|___/\_|__|___|__ | _|__|___|___/\_|__|___|___
3545bd8deadSopenharmony_ci      |/ | |   |      |  |   |	\|/ |  \___|___   |  |	 |
3555bd8deadSopenharmony_ci      |  |  \__|___  _|_/ \__|___|__|______|__ \ _|_/ \__|___
3565bd8deadSopenharmony_ci      |  |     |   \/ |      |	 |  |	   |  \|/ |	 |
3575bd8deadSopenharmony_ci      V  V     V   V  V      V	 V  V	   V   V  V	 V
3585bd8deadSopenharmony_ci    <Cb0,Y0,  A0><Cr0,Y1,   A1><Cb2,Y2,   A2><Cr2,Y3,	A3>
3595bd8deadSopenharmony_ci
3605bd8deadSopenharmony_ci    Figure 4.4: Downsampling with averaging of RGB or RGBA pixels to
3615bd8deadSopenharmony_ci    form subsampled data in host memory.
3625bd8deadSopenharmony_ci
3635bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions)
3645bd8deadSopenharmony_ci
3655bd8deadSopenharmony_ci    None.
3665bd8deadSopenharmony_ci
3675bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 1.2.1 Specification (State and State Requests)
3685bd8deadSopenharmony_ci
3695bd8deadSopenharmony_ci    None.
3705bd8deadSopenharmony_ci
3715bd8deadSopenharmony_ciAdditions to the GLX 1.3 Specification
3725bd8deadSopenharmony_ci
3735bd8deadSopenharmony_ci    None.
3745bd8deadSopenharmony_ci
3755bd8deadSopenharmony_ciErrors
3765bd8deadSopenharmony_ci
3775bd8deadSopenharmony_ci    See above.
3785bd8deadSopenharmony_ci
3795bd8deadSopenharmony_ciNew State
3805bd8deadSopenharmony_ci
3815bd8deadSopenharmony_ci(table 6.17, p. 207)
3825bd8deadSopenharmony_ci    Get Value		Type	Get Command Initial Value
3835bd8deadSopenharmony_ci    ---------		----	----------- -------------
3845bd8deadSopenharmony_ci    UNPACK_RESAMPLE_OML Z3	GetIntegerv RESAMPLE_REPLICATE_OML
3855bd8deadSopenharmony_ci    PACK_RESAMPLE_OML	Z2	GetIntegerv RESAMPLE_DECIMATE_OML
3865bd8deadSopenharmony_ci
3875bd8deadSopenharmony_ci(continued columns)
3885bd8deadSopenharmony_ci    Get Value		Description		Sec Attribute
3895bd8deadSopenharmony_ci    ---------		-----------		--- ---------
3905bd8deadSopenharmony_ci    UNPACK_RESAMPLE_OML Pixel upsampling mode	3.6 pixel-store
3915bd8deadSopenharmony_ci    PACK_RESAMPLE_OML	Pixel downsampling mode 4.3 pixel-store
3925bd8deadSopenharmony_ci
3935bd8deadSopenharmony_ciNew Implementation Dependent State
3945bd8deadSopenharmony_ci
3955bd8deadSopenharmony_ci    None.
3965bd8deadSopenharmony_ci
3975bd8deadSopenharmony_ciRevision History
3985bd8deadSopenharmony_ci
3995bd8deadSopenharmony_ci  * Revision 10, 07/24/2001 - Finalized Status for OpenML 1.0.
4005bd8deadSopenharmony_ci  * Revision 9, 07/16/2001 - Remove erroneous redefinition of
4015bd8deadSopenharmony_ci    RESAMPLE_AVERAGE enumerant value.
4025bd8deadSopenharmony_ci  * Revisions 7-8, 07/11/2001 - Assign enum values and extension number
4035bd8deadSopenharmony_ci    for the registry.
4045bd8deadSopenharmony_ci  * Revision 6 - Correct errors in the equations describing subsampling.
4055bd8deadSopenharmony_ci  * Revision 5 - formatting changes for OpenML Specification
4065bd8deadSopenharmony_ci  * Revision 4, 03/27/2001 - Rewrite to use the <format> parameter,
4075bd8deadSopenharmony_ci    rather than a pixel storage mode, to specify subsampled data.
4085bd8deadSopenharmony_ci  * Revision 3 - Removed support for YC component orders. Renamed CY and
4095bd8deadSopenharmony_ci    CYA enumerants more sensibly. Added Discreet's RESAMPLE_AVERAGE
4105bd8deadSopenharmony_ci    resampling mode. Changed text descriptions of sampling to equations.
4115bd8deadSopenharmony_ci    Made enum values undefined until we've determined if this extension
4125bd8deadSopenharmony_ci    is backwards compatible with SGIX_resample.
4135bd8deadSopenharmony_ci  * Revision 2 - corrected 4224 upsampling and downsampling figures.
4145bd8deadSopenharmony_ci    Moved discussion of errors for non-even image widths to the
4155bd8deadSopenharmony_ci    OML_subsample specification.
4165bd8deadSopenharmony_ci  * Revision 1 - derived from SGIX_resample.
417