Name Strings

cl_img_yuv_image

Contact

Imagination Technologies Developer Forum:
https://forums.imgtec.com/

Jeremy Kemp, Imagination Technologies (Jeremy.Kemp 'at' imgtec.com)

Contributors

James Laverack, Imagination Technologies.
Robert Quill, Imagination Technologies.
Jeremy Kemp, Imagination Technologies.

Shipping

Version

Built On: 2020-11-10
Version: 1.0.0

Dependencies

Requires OpenCL version 1.2 or later.

This extension is written against the wording of the OpenCL 3.0 Specification.

Overview

This extension provides new image formats to read YUV images, such as those provided by cameras on mobile devices.

New API Enums

New values accepted for the image_channel_order member in cl_image_format:

CL_NV21_IMG 0x40D0
CL_YV12_IMG 0x40D1

Modifications to the OpenCL API Specification

(Modify Section 5.3, Image Objects)
(Add the following to return conditions to Section 5.3.1, Creating Image Objects)
• CL_INVALID_IMAGE_SIZE if the image_channel_order is CL_NV21_IMG or CL_YV12_IMG and image dimensions specified in image_desc are not supported for all devices in context.

• CL_INVALID_VALUE if the image_channel_order is CL_NV21_IMG or CL_YV12_IMG and the image_desc is not CL_MEM_OBJECT_IMAGE2D.

(Add the following to Table 16, Image Format Descriptor)
Image Channel Order Description

CL_NV21_IMG, CL_YV12_IMG

This format can only be used if image_channel_data_type is CL_UNORM_INT8.

(Add the following to return conditions to Section 5.3.3, Reading, Writing and Copying Image Objects)
• CL_INVALID_VALUE if image_channel_order is CL_NV21_IMG or CL_YV12_IMG and the region is not the full size of the image and/or the origin is not (0, 0).

(Add the following to return conditions to Section 5.3.4, Filling Image Objects)
• CL_IMAGE_FORMAT_NOT_SUPPORTED if image_channel_order is CL_NV21_IMG or CL_YV12_IMG.

(Add the following to return conditions to Section 5.3.6, Mapping Image Objects)
• CL_INVALID_VALUE if image_channel_order is CL_NV21_IMG or CL_YV12_IMG and the region is not the full size of the image and/or the origin is not (0, 0).

Modifications to the OpenCL C Specification

(Modify Section 8.2, Addressing and Filter Modes)
(Replace the following paragraph)

If the sampler is specified as using unnormalized coordinates (floating-point or integer coordinates), filter mode set to CLK_FILTER_NEAREST and addressing mode set to one of the following modes - CLK_ADDRESS_NONE, CLK_ADDRESS_CLAMP_TO_EDGE or CLK_ADDRESS_CLAMP, the location of the image element in the image given by (i,j,k) will be computed without any loss of precision.

with

If the sampler is specified as using unnormalized coordinates (floating-point or integer coordinates), filter mode set to CLK_FILTER_NEAREST and addressing mode set to one of the following modes - CLK_ADDRESS_NONE, CLK_ADDRESS_CLAMP_TO_EDGE or CLK_ADDRESS_CLAMP, and image_channel_order is not CL_NV21_IMG or CL_YV12_IMG, the location of the image element in the image given by (i,j,k) will be computed without any loss of precision.

Revision History

Version Date Author Changes

1.0.0

2020-11-10

Jeremy Kemp

Refreshed to AsciiDoc. Updated Contributors. Updated copyright notice. Updated the OpenCL spec which this extension spec is written against.

0.3.0

2018-05-23

GitHub User H1Gdev

Remove duplicate 'for' in cl_img_yuv_image.txt.

0.2.0

2017-10-17

James Laverack & Robert Quill

Replace CL_NV21 and CL_YV12 with CL_NV21_IMG and CL_YV12_IMG respectively.

0.1.0

2014-05-02

James Laverack

Initial revision.