Video Codec SDK: cuvidMapVideoFrame followed by cudaMemcpy2D

The sample does this

  1. cuvidMapVideoFrame

  2. Create destination frames using cuMemAlloc (Driver API)

  3. cuMemcpy2DAsync (Driver API) (copy mapped frame to allocated frame)

Can this instead be done:

  1. cuvidMapVideoFrame

  2. Create destination frames using cudaMalloc (Runtime API)

  3. cudaMemcpy2DAsync (Runtime API) (copy mapped frame to allocated frame)

The reason why we want to do this is that the destination frames are sent to a video processing pipeline which also creates device frames but using the Runtime API (cudaMalloc).

We prefer not to have to distinguish between frames that we have to release using cuMemFree and those that we have to release using cudaFree.

You might want to ask such questions on the Video Codec SDK forum:

[url]Video Processing & Optical Flow - NVIDIA Developer Forums