I am developing an application using
- OpenCV with OpenCL support and
- the Video Codec SDK, creating a CUDA encoding session (analog to the NvEncoder sample)
So far I am required to read the OpenCL image or buffer objects processed by my OpenCV code back into RAM, in order to feed them into the CUDA surfaces for the video encoder, which of course is wasting quite some time, especially on bigger frames. I would like to save this extra up- and download by copying the data directly in VRAM (or even reference the OpenCL image/buffer in case this is possible). I have no idea how I could accomplish this, can anybody help me with that? Any hints, samples, reference implementations?