NvBuffer to NvBufSurface copy without CPU

Is there a way to get the image data stored in an NvBuffer from nvbuf_utils into an NvBufSurface from the deepstream api without doing the copying on the CPU?

1 Like

There is no such method currently. Please use NvBufSurface.
Which version are you using ?

Thanks for the reply. I am using deepstream 6.1 on an Orin AGX. We developed a library for transferring NvBuffers between processes, using the method described here, on JetPacks prior to NvBuffers becoming deprecated in favor of NvBufSurfaces. NvBufSurface doesn’t have the ability to transfer them between processes, according to this so I was hoping that it might be possible to transfer NvBuffers between processes and then convert them to NvBufSurfaces.

Do you know if there have been any updated plans made to support transferring NvBufSurfaces between processes? Also are there any plans to make converting between NvBuffers and NvBufSurfaces possible?

Do you use Jetpack 5.1.1? On 5.1.1, we add NvBufSurfaceImport() for sharing NvBufSurface between processes. It runs like:

    NvBufSurface *nvbuf_surf;
    NvBufSurfaceMapParams buf_par;
    NvBufSurfaceFromFd(dmabuf_fd, (void**)(&nvbuf_surf));
    NvBufSurfaceGetMapParams(nvbuf_surf, 0, &buf_par);



    NvBufSurface *nvbuf_surf;
    NvBufSurfaceMapParams buf_par;

    __receive_fd_and buf_par__;
    buf_par.fd = received_fd;
    NvBufSurfaceImport(&nvbuf_surf, &buf_par);
    nvbuf_surf->numFilled = 1;


1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.