Clone of mesa.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

MESA_ycbcr_texture.spec 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. Name
  2. MESA_ycbcr_texture
  3. Name Strings
  4. GL_MESA_ycbcr_texture
  5. Contact
  6. Brian Paul, Tungsten Graphics, Inc. (brian 'at' tungstengraphics.com)
  7. Keith Whitwell, Tungsten Graphics, Inc. (keith 'at' tungstengraphics.com)
  8. Status
  9. Shipping (Mesa 4.0.4 and later)
  10. Version
  11. 1.0
  12. Number
  13. TBD
  14. Dependencies
  15. OpenGL 1.0 or later is required
  16. This extensions is written against the OpenGL 1.4 Specification.
  17. NV_texture_rectangle effects the definition of this extension.
  18. Overview
  19. This extension supports texture images in the YCbCr format. There is
  20. no support for converting YCbCr images to RGB or vice versa. The
  21. intention is for YCbCr image data to be directly sent to the renderer
  22. without any pixel transfer operations. Only 2D texture images are
  23. supported (not glDrawPixels, glReadPixels, etc).
  24. A YCbCr pixel (texel) is a 16-bit unsigned short with two components.
  25. The first component is luminance (Y). For pixels in even-numbered
  26. image columns, the second component is Cb. For pixels in odd-numbered
  27. image columns, the second component is Cr. If one were to convert the
  28. data to RGB one would need to examine two pixels from columns N and N+1
  29. (where N is even) to deduce the RGB color.
  30. IP Status
  31. None
  32. Issues
  33. None
  34. New Procedures and Functions
  35. None
  36. New Tokens
  37. Accepted by the <internalFormat> and <format> parameters of
  38. TexImage2D and TexSubImage2D:
  39. GL_YCBCR_MESA 0x8757
  40. Accepted by the <type> parameter of TexImage2D and TexSubImage2D:
  41. GL_UNSIGNED_SHORT_8_8_MESA 0x85BA /* same as Apple's */
  42. GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB /* same as Apple's */
  43. Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation)
  44. None
  45. Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
  46. In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
  47. add the following to Table 3.8 (Packed pixel formats):
  48. type Parameter GL Data Number of Matching
  49. Token Name Type Components Pixel Formats
  50. -------------- ------- ---------- -------------
  51. UNSIGNED_SHORT_8_8_MESA ushort 3 YCBCR_422_MESA
  52. UNSIGNED_SHORT_8_8_REV_MESA ushort 3 YCBCR_422_MESA
  53. In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
  54. add the following to Table 3.10 (UNSIGNED_SHORT formats):
  55. UNSIGNED_SHORT_8_8_MESA:
  56. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  57. +-------------------------------+-------------------------------+
  58. | 1st | 2nd |
  59. +-------------------------------+-------------------------------+
  60. UNSIGNED_SHORT_8_8_REV_MESA:
  61. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  62. +-------------------------------+-------------------------------+
  63. | 2nd | 1st |
  64. +-------------------------------+-------------------------------+
  65. In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
  66. add the following to Table 3.12 (Packed pixel fiedl assignments):
  67. First Second Third Fourth
  68. Format Element Element Element Element
  69. ------ ------- ------- ------- -------
  70. YCBCR_422_MESA luminance chroma
  71. In section 3.8.1, Texture Image Specification, on page 125, add
  72. another item to the list of TexImage2D and TexImage3D equivalence
  73. exceptions:
  74. * The value of internalformat and format may be YCBCR_MESA to
  75. indicate that the image data is in YCbCr format. type must
  76. be either UNSIGNED_SHORT_8_8_MESA or UNSIGNED_SHORT_8_8_REV_MESA
  77. as seen in tables 3.8 and 3.10. Table 3.12 describes the mapping
  78. between Y and Cb/Cr to the components.
  79. If NV_texture_rectangle is supported target may also be
  80. TEXTURE_RECTANGLE_NV or PROXY_TEXTURE_RECTANGLE_NV.
  81. All pixel transfer operations are bypassed. The texture is stored as
  82. YCbCr, not RGB. Queries of the texture's red, green and blue component
  83. sizes will return zero.
  84. In section 3.8.1, Texture Image Specification, on page 126, add
  85. another item to the list of TexImage1D and TexImage2D equivalence
  86. exceptions:
  87. * The value of internalformat and format can not be YCBCR_MESA.
  88. In section 3.8.2, Alternate Texture Image Specification Commands, on
  89. page 129, insert this paragraph after the first full paragraph on the
  90. page:
  91. "If the internal storage format of the image being updated by
  92. TexSubImage2D is YCBCR_MESA then format must be YCBCR_MESA.
  93. The error INVALID_OPERATION will be generated otherwise."
  94. Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment
  95. Operations and the Frame Buffer)
  96. None
  97. Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions)
  98. None
  99. Additions to Chapter 6 of the OpenGL 1.4 Specification (State and
  100. State Requests)
  101. None
  102. Additions to Appendix A of the OpenGL 1.4 Specification (Invariance)
  103. None
  104. Additions to the AGL/GLX/WGL Specifications
  105. None
  106. GLX Protocol
  107. None
  108. Errors
  109. INVALID_ENUM is generated by TexImage2D if <internalFormat> is
  110. MESA_YCBCR but <format> is not MESA_YCBCR.
  111. INVALID_ENUM is generated by TexImage2D if <format> is MESA_YCBCR but
  112. <internalFormat> is not MESA_YCBCR.
  113. INVALID_VALUE is generated by TexImage2D if <format> is MESA_YCBCR and
  114. <internalFormat> is MESA_YCBCR and <border> is not zero.
  115. INVALID_OPERATION is generated by TexSubImage2D if the internal image
  116. format is YCBCR_MESA and format is not YCBCR_MESA.
  117. INVALID_OPERATION is generated by CopyTexSubImage2D if the internal
  118. image is YCBCR_MESA.
  119. New State
  120. Edit table 6.16 on page 231: change the type of TEXTURE_INTERNAL_FORMAT
  121. from n x Z42 to n x Z43 to indicate that internal format may also be
  122. YCBCR_MESA.
  123. Revision History
  124. 20 September 2002 - Initial draft