Contact
Please see the Issues list in the Khronos OpenCL-Docs repository:
https://github.com/KhronosGroup/OpenCL-Docs
Notice
Copyright 2008-2024 The Khronos Group Inc.
This Specification is protected by copyright laws and contains material proprietary to Khronos. Except as described by these terms, it or any components may not be reproduced, republished, distributed, transmitted, displayed, broadcast or otherwise exploited in any manner without the express prior written permission of Khronos.
This Specification has been created under the Khronos Intellectual Property Rights Policy, which is Attachment A of the Khronos Group Membership Agreement available at www.khronos.org/files/member_agreement.pdf and defines the terms 'Scope', 'Compliant Portion', and 'Necessary Patent Claims'.
Khronos grants a conditional copyright license to use and reproduce the unmodified Specification for any purpose, without fee or royalty, EXCEPT no licenses to any patent, trademark or other intellectual property rights are granted under these terms. Parties desiring to implement the Specification and make use of Khronos trademarks in relation to that implementation, and receive reciprocal patent license protection under the Khronos Intellectual Property Rights Policy must become Adopters and confirm the implementation as conformant under the process defined by Khronos for this Specification; see https://www.khronos.org/adopters.
Khronos makes no, and expressly disclaims any, representations or warranties, express or implied, regarding this Specification, including, without limitation: merchantability, fitness for a particular purpose, non-infringement of any intellectual property, correctness, accuracy, completeness, timeliness, and reliability. Under no circumstances will Khronos, or any of its Promoters, Contributors or Members, or their respective partners, officers, directors, employees, agents or representatives be liable for any damages, whether direct, indirect, special or consequential damages for lost revenues, lost profits, or otherwise, arising from or in connection with these materials.
Where this Specification identifies specific sections of external references, only those specifically identified sections define normative functionality. The Khronos Intellectual Property Rights Policy excludes external references to materials and associated enabling technology not created by Khronos from the Scope of this specification, and any licenses that may be required to implement such referenced materials and associated technologies must be obtained separately and may involve royalty payments.
Khronos® and Vulkan® are registered trademarks, and SPIR™, SPIR-V™, and SYCL™ are trademarks of The Khronos Group Inc. OpenCL™ is a trademark of Apple Inc. used under license by Khronos. OpenGL® is a registered trademark and the OpenGL ES™ and OpenGL SC™ logos are trademarks of Hewlett Packard Enterprise used under license by Khronos. All other product names, trademarks, and/or company names are used solely for identification and belong to their respective owners.
Dependencies
This extension is written against the OpenCL Specification version 3.0.14.
This extension requires OpenCL 1.2.
Overview
This extension adds support for single channel RAW10 and RAW12 images typically used to represent Bayer pattern images coming from an image sensor.
New API Enums
New values for cl_channel_type:
CL_UNSIGNED_INT_RAW10_EXT 0x10E3
CL_UNSIGNED_INT_RAW12_EXT 0x10E4
New OpenCL C Enums
Value returned by get_image_channel_data_type:
CLK_UNSIGNED_INT_RAW10_EXT
CLK_UNSIGNED_INT_RAW12_EXT
Modifications to the OpenCL API Specification
- (Modify Section 5.3.1, Creating Image Objects)
-
- (Add the following to Table 17, List of supported Image Channel Data Types)
| Image Channel Data Type | Description |
|---|---|
|
Each channel component is an unnormalized unsigned 10-bit integer value.
The channel order must be |
|
Each channel component is an unnormalized unsigned 12-bit integer value.
The channel order must be |
- (Add the following to Section 5.3.1.1, Image Format Descriptor)
If image_channel_data_type = CL_UNSIGNED_, pixel data is densely
packed in each row and each 4 consecutive pixels are packed into 5 bytes. Each one
of the first 4 bytes contains the top 8 bits of each pixel, the fifth byte
contains the 2 least significant bits of the 4 pixels. The memory layout of
this image format is described below (Pi[j] stands for the jth bit of the
ith pixel):
| bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
|---|---|---|---|---|---|---|---|---|
Byte 0 |
P0[9] |
P0[8] |
P0[7] |
P0[6] |
P0[5] |
P0[4] |
P0[3] |
P0[2] |
Byte 1 |
P1[9] |
P1[8] |
P1[7] |
P1[6] |
P1[5] |
P1[4] |
P1[3] |
P1[2] |
Byte 2 |
P2[9] |
P2[8] |
P2[7] |
P2[6] |
P2[5] |
P2[4] |
P2[3] |
P2[2] |
Byte 3 |
P3[9] |
P3[8] |
P3[7] |
P3[6] |
P3[5] |
P3[4] |
P3[3] |
P3[2] |
Byte 4 |
P3[1] |
P3[0] |
P2[1] |
P2[0] |
P1[1] |
P1[0] |
P0[1] |
P0[0] |
If image_channel_data_type = CL_UNSIGNED_, pixel data is densely
packed in each row and each 2 consecutive pixels are packed into 3 bytes. The
first and second byte contains the top 8 bits of first and second pixel. The
third byte contains the 4 least significant bits of the two pixels, the memory
layout of this image format is described below (Pi[j] stands for the jth bit
of the ith pixel):
| bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
|---|---|---|---|---|---|---|---|---|
Byte 0 |
P0[11] |
P0[10] |
P0[9] |
P0[8] |
P0[7] |
P0[6] |
P0[5] |
P0[4] |
Byte 1 |
P1[11] |
P1[10] |
P1[9] |
P1[8] |
P1[7] |
P1[6] |
P1[5] |
P1[4] |
Byte 2 |
P1[3] |
P1[2] |
P1[1] |
P1[0] |
P0[3] |
P0[2] |
P0[1] |
P0[0] |
- (Modify Section 5.3.1.2, Image Descriptor)
Add the following to the description of image_width:
The image width must be a multiple of 4 for images image_channel_data_type
is CL_UNSIGNED_. The image width must be a multiple of 2 for
images image_channel_data_type is CL_UNSIGNED_.