Hello, I am getting an CL_INVALID_VALUE error in a test program where I am trying to create an 'oclmat' structure from a 4000x3000 image that is 24-bit RGB. I believe this corresponds to the CV_8UC3 type.
My code looks like this:
IplImage* src = cvLoadImage("c:\\mediaworkloads\\JIVE.JPG",CV_LOAD_IMAGE_COLOR);
ocl::oclMat oclSrc(src->height, src->width, CV_8UC3, src);
I noticed when debugging into the oclMat constructor that it adds "tail_padding" of 3072 and ends up creating a buffer of size 3600768 when my original image is 3600000 bytes. What is that for? Does the OpenCL buffer width need to be divisible by 1024 bytes?
The fault occurs on line 468 of 'initialization.cpp', on the clEnqueueWriteBuffer call. This suggests that the region being written to is out of bounds. How do I fix this?
Thanks.... Mike