- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Recently I use VME to derive MVs information and I need Write Source and Reference image into memory. I use clEnqueueMapImage to do this operation as follows: (host to device side)
size_t pitch;
unsigned char* dst = (unsigned char*)clEnqueueMapImage(queue, srcImage, CL_TRUE,CL_MAP_WRITE, offset, region, &pitch,0, 0, NULL, NULL, &err);
unsigned char* src = YBuffer;
for(i, i<height; i++)
{
memcpy(dst, src, sizeof(unsigned char)*width);
src+=src_pitch;
dst += pitch;
}
clEnqueueUnmapMemObject(queue, srcImage, dst,0, NULL, NULL);
The simulation results show wrong data. all MVs are a fix value (-64, -48). However when I use clEnqueueWriteImage, the result is correct. I don't know if the usage of Map/Unmap operation not correct? Thanks a lot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Depending on how the image was created, you may be missing out on the conversion to tiled memory layout that you would get with clEnqueWriteImage.
The driver may be able to help automate the conversion so you can still use mapping. For more information see:
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Depending on how the image was created, you may be missing out on the conversion to tiled memory layout that you would get with clEnqueWriteImage.
The driver may be able to help automate the conversion so you can still use mapping. For more information see:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jeffrey, thank you so much for quickly reply. I have found the question. and fixed this problem.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page