5.3.3.1. Image Formats for DirectX 9 Media Surface Sharing
5.3.3.1. DirectX 9媒体表面共享的图像格式
When the cl_khr_dx9_media_sharing extension is supported, image objects sharing storage with Direct3D 9 surfaces can be created. This section describes the Direct3D 9 surface formats that are supported when the adapter type is one of the Direct 3D lineage. Using a Direct3D 9 surface format not listed here is an error. To extend the use of this extension to support media adapters beyond DirectX 9 tables similar to the ones in this section will need to be defined for the surface formats supported by the new media adapter. All implementations that support this extension are required to support the NV12 surface format. The other surface formats supported are the same surface formats that the adapter you are sharing with supports as long as they are listed in the YUV FourCC Codes and Corresponding OpenCL Image Formats or Direct3D 9 Formats and Corresponding OpenCL Image Formats tables.
当支持cl_khr_dx9_media_sharing扩展时,可以创建与Direct3D 9表面共享存储的图像对象。本节介绍适配器类型为Direct 3D沿袭时支持的Direct3D 9表面格式。使用此处未列出的Direct3D 9表面格式是错误的。要将此扩展的使用扩展到支持DirectX 9以外的介质适配器,需要为新介质适配器支持的表面格式定义与本节中的表类似的表。所有支持此扩展的实现都需要支持NV12表面格式。支持的其他表面格式与共享的适配器支持的表面格式相同,只要它们列在YUV FourCC代码和相应的OpenCL图像格式或Direct3D 9格式和相应的OpenCL图像格式表中即可。
FOUR CC Code | CL Image Format (Channel Order, Channel Data Type) CL图像格式(通道顺序、通道数据类型) |
---|---|
FOURCC('N','V','1','2'), Plane 0 | |
FOURCC('N','V','1','2'), Plane 1 | |
FOURCC('Y','V','1','2'), Plane 0 | |
FOURCC('Y','V','1','2'), Plane 1 | |
FOURCC('Y','V','1','2'), Plane 2 |
In the YUV FourCC Codes and Corresponding OpenCL Image Formats table, NV12 Plane 0 corresponds to the luminance (Y) channel and Plane 1 corresponds to the UV channels. The YV12 Plane 0 corresponds to the Y channel, Plane 1 corresponds to the V channel and Plane 2 corresponds to the U channel. Note that the YUV formats map to CL_R and CL_RG but do not perform any YUV to RGB conversion, and vice-versa.
在YUV FourCC码和相应的OpenCL图像格式表中,NV12平面0对应于亮度(Y)通道,平面1对应于UV通道。YV12平面0对应于Y通道,平面1对应于V通道,平面2对应于U通道。注意,YUV格式映射到CL_R和CL_RG,但不执行任何YUV到RGB的转换,反之亦然。
Direct3D 9 Format Direct3D 9格式 | CL Image Format (Channel Order, Channel Data Type) CL图像格式(通道顺序、通道数据类型) |
---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
The Direct3D 9 format names in the table above seem to imply that the order of the color channels are switched relative to OpenCL, but this is not the case. For example, the layout of channels for each pixel for |