Contact
- Brian Paul, Tungsten Graphics, Inc. (brian 'at' tungstengraphics.com)
+ Brian Paul, Tungsten Graphics, Inc. (brian.paul 'at' tungstengraphics.com)
Keith Whitwell, Tungsten Graphics, Inc. (keith 'at' tungstengraphics.com)
Status
Overview
- This extension supports texture images in the YCbCr format. There is
- no support for converting YCbCr images to RGB or vice versa. The
- intention is for YCbCr image data to be directly sent to the renderer
- without any pixel transfer operations. Only 2D texture images are
- supported (not glDrawPixels, glReadPixels, etc).
+ This extension supports texture images stored in the YCbCr format.
+ There is no support for converting YCbCr images to RGB or vice versa
+ during pixel transfer. The texture's YCbCr colors are converted to
+ RGB during texture sampling, after-which, all the usual per-fragment
+ operations take place. Only 2D texture images are supported (not
+ glDrawPixels, glReadPixels, etc).
A YCbCr pixel (texel) is a 16-bit unsigned short with two components.
The first component is luminance (Y). For pixels in even-numbered
Accepted by the <internalFormat> and <format> parameters of
TexImage2D and TexSubImage2D:
- GL_YCBCR_MESA 0x8757
+ YCBCR_MESA 0x8757
Accepted by the <type> parameter of TexImage2D and TexSubImage2D:
- GL_UNSIGNED_SHORT_8_8_MESA 0x85BA /* same as Apple's */
- GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB /* same as Apple's */
+ UNSIGNED_SHORT_8_8_MESA 0x85BA /* same as Apple's */
+ UNSIGNED_SHORT_8_8_REV_MESA 0x85BB /* same as Apple's */
Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation)
Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
- In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
+ In section 3.6.4, Rasterization of Pixel Rectangles, on page 101,
add the following to Table 3.8 (Packed pixel formats):
type Parameter GL Data Number of Matching
Token Name Type Components Pixel Formats
-------------- ------- ---------- -------------
- UNSIGNED_SHORT_8_8_MESA ushort 3 YCBCR_422_MESA
- UNSIGNED_SHORT_8_8_REV_MESA ushort 3 YCBCR_422_MESA
+ UNSIGNED_SHORT_8_8_MESA ushort 2 YCBCR_MESA
+ UNSIGNED_SHORT_8_8_REV_MESA ushort 2 YCBCR_MESA
In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
+-------------------------------+-------------------------------+
- In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
+ In section 3.6.4, Rasterization of Pixel Rectangles, on page 104,
add the following to Table 3.12 (Packed pixel fiedl assignments):
First Second Third Fourth
Format Element Element Element Element
------ ------- ------- ------- -------
- YCBCR_422_MESA luminance chroma
+ YCBCR_MESA luminance chroma
In section 3.8.1, Texture Image Specification, on page 125, add
TEXTURE_RECTANGLE_NV or PROXY_TEXTURE_RECTANGLE_NV.
All pixel transfer operations are bypassed. The texture is stored as
YCbCr, not RGB. Queries of the texture's red, green and blue component
- sizes will return zero.
+ sizes will return zero. The YCbCr colors are converted to RGB during
+ texture sampling using an implementation dependent conversion.
In section 3.8.1, Texture Image Specification, on page 126, add
<internalFormat> is MESA_YCBCR and <border> is not zero.
INVALID_OPERATION is generated by TexSubImage2D if the internal image
- format is YCBCR_MESA and format is not YCBCR_MESA.
+ format is YCBCR_MESA and <format> is not YCBCR_MESA.
INVALID_OPERATION is generated by CopyTexSubImage2D if the internal
image is YCBCR_MESA.
Revision History
20 September 2002 - Initial draft
+ 29 April 2003 - minor updates
+ 3 September 2003 - further clarify when YCbCr->RGB conversion takes place
+ 19 September 2003 - a few more updates prior to submitting to extension
+ registry.
+ 3 April 2004 - fix assorted inaccuracies