- Board:
* Jetpack: 4.3 [L4T 32.3.1]
* Type: AGX Xavier
* Name: NVIDIA Jetson AGX Xavier
* GPU-Arch: 7.2
- Libraries:
* cuDNN: 7.6.3.28-1+cuda10.0
* VisionWorks: 1.6.0.500n
* OpenCV: 4.1.2 compiled CUDA: YES
* CUDA: 10.0.326
* TensorRT: 6.0.1.10-1+cuda10.0
Hi.
I want to access to device memory in nvbufsurface.
I access to cpu memory like below.
GstMapInfo in_map_info;
NvBufSurface* in_surf = nullptr;
if (!gst_buffer_map(inbuf, &in_map_info, GST_MAP_READ))
return GST_FLOW_ERROR;
in_surf = (NvBufSurface*) (in_map_info.data);
NvBufSurfaceMap(in_surf, -1, -1, NVBUF_MAP_READ);
NvBufSurfaceSyncForCpu(in_surf, -1, -1);
Mat mat = Mat(in_surf->surfaceList[0].height, in_surf->surfaceList[0].width, CV_8UC4,
in_surf->surfaceList[0].mappedAddr.addr[0], in_surf->surfaceList[0].pitch);
cvtColor(mat, mat, COLOR_RGBA2BGR);
But, I want to access directly device memory and use cuda functions.
How can I do?
Thanks.