I try to build my AKP under android using the 64bit openCL library. Coplilation and insrtallation are fine with 32 lib and 64 lib.
But at run time, using the 64 lib i got clSetKernelArg -51 error.
bufferNV21 = cl::Buffer(gContext, CL_MEM_READ_ONLY|CL_MEM_USE_HOST_PTR , isize*sizeof(cl_uchar), in, NULL);
where isize is the size of NV21 format
gNV21Kernel.setArg(0,0); // debug
gNV21Kernel.setArg(1,0); // debugIdx
gNV21Kernel.setArg(2,0); // GRAY
gNV21Kernel.setArg(3,bufferRGBA); // output RGBA
gNV21Kernel.setArg(4,0); // HSV
gNV21Kernel.setArg(5,0); // HSL
gNV21Kernel.setArg(6,0); // HSI
gNV21Kernel.setArg(7,0); // MMM
gNV21Kernel.setArg(8,bufferNV21); // input NV21
gNV21Kernel.setArg(9,w);
gNV21Kernel.setArg(10,h);
gNV21Kernel.setArg(11,ligth);
__kernel void nv21torgba( __global int* debug,
__global int* debugIdx,
__global uchar4* Gray,
__global uchar4* RGBA,
__global uchar4* HSV,
__global uchar4* HSL,
__global uchar4* HSI,
__global uchar4* MMM,
__global uchar* in,
int im_width,
int im_height,
int im_ligth)
do not worry about the kernel name i remame it.
Where can come from the error ?
I still got error on another phonne where 32lib work but 64lib got error at linckage state (.rel.dyn). I read it is related to PIE security or somethings like that, i did not anderstoud the problem.