8MB are fine. IIRC someone reported problems with allocating 1GB image.
you don't need "convert" image from read to write only. the restriction is on for single kernel invocation. you can use image as read in first invocation and as write in next. just to be sure that you mark image with proper flags during creation (CL_MEM_READ_ONLY, CL_WRITE_ONLY, CL_MEM_READ_WRITE).
THanks. So, if I create two images with CL_MEM_READ_WRITE flag, then I can
1) run kernel 1, read from image1 and write to image 2
2) run kernel 2, read from image 2, and write to image1
Yes. A CL_MEM_READ_WRITE image can be read from or written to from a kernel but not both (in OpenCL 1.x; in OpenCL 2.x it is possible to do both).
Maximum device image size is available using CL_DEVICE_IMAGE2D_MAX_WIDTH & CL_DEVICE_IMAGE2D_MAX_HEIGHT. The OpenCL 1.1 specification says the minimum is 2K x 2K. Modern devices provide 4K, 8K, 16K or even 32K pixel width and/or tall images (but you'll likely run out of memory if you try both dimensions that large at once).
Since OpenCL doesn't have a YUV image type and YUV layout are frequently sub-sampled in chroma and/or have planar layouts, you'll likely need a Buffer (not an Image) to store them.
Thanks, guys. @dithermaster: there is no subsampling involved: this is the first step in jpeg 2000 compression:
RGB channels are converted to YUV. So, I should be able to use an image.
One twist: after RGB to YUV conversion, each channel is processed separately by subsequent kernels..
So, it looks like I need 4 images:
RGB read only
Y greyscale write only
U greyscale write only
V greyscale write only
The kernel will read (r,g,b) from the source image and store (y,u,v) to the three images respectively.
Next step is a wavelet transform, but each channel is transformed separately. So, my second kernel will treat
the three Y,U and V images as read only, and transform to another set of three images.
Please, if there is someone help me to find BOOKS about (Image Processing) working with AMD Card and AMPC++ Library