Visible to Intel only — GUID: GUID-BCBAD245-353A-40E8-A170-FCC18F1D718B
Visible to Intel only — GUID: GUID-BCBAD245-353A-40E8-A170-FCC18F1D718B
Creating Image Variables
To create a new image variable, open the variable management dialog. Go to Tools > Intel Code Builder for OpenCL API > OpenCL Kernel Development > Windows > Variable Management.
Create Image Variables in Bitmap Format
- Click the Add button in the Code Builder Variable Management dialog and choose Image in the opened context menu.
- In the Image Variable context menu, enter the Input image variable:
- Enter a meaningful name, such as bmp_input1.
- For IO Mode from the drop-down, select Input.
- In the Source field browse to, or enter the path to input bitmap files.
- Enter the appropriate size, type, channel order, and other parameters for your input image.
- Click Done to create the Input Variable.
- Click the Add button in the Code Builder Variable Management dialog and choose Image in the opened context menu.
- In the Image Variable context menu, enter the Output image variable:
- Enter a meaningful name, such as bmp_output1.
- For IO Mode from the drop-down, select Output. The output image variable does not take a source file.
- Enter the appropriate size, type, channel order, and other parameters for your output image.
- Click Done to create the output Variable.
Create output images with the correct size, type, channel order, and so on.
Check the Get output image data checkbox to disable reading back the output buffer or image. This enables you to try more than one combination of global or local work sizes, where there is no need to read the same output for all the combinations.
Create Image Variables in YUV Format
In the IO mode, select Input.
Fill out the image variable dialog box features for the input image.
For the Source field, browse to select your YUV image file.
For Source Format, select the appropriate YUV format from the drop-down.
For width and height enter the appropriate values for the image file.
For the rest of the fields, you can use the defaults, or revise to use one of the valid options.
Click Done to create the input images. The number of created images depends on the image YUV format. For example, for NV12 format 2 new images are created
Click Add () and choose Image to create the output image variable. This variable does not require a source file.
Click Done to create the output images.
The YUV planes are created. You can now run the kernel with the image.