pangxie
September 7, 2022, 8:40am
1
In the dump_raw_dmabuf() function, there is a code that uses the for loop to extract data. After testing, this code is very inefficient.
What is the efficient way to extract data from nvbuf_surf->surfaceList?
How can the memory in nvbuf_surf->surfaceList[0].mappedAddr.addr[plane] be converted into cuda device memory?
DaneLLL
September 7, 2022, 10:12am
3
Hi,
There is data alignment in hardware DMA buffer so for dumping frame data to a file, we have to copy line by line to eliminate the additional pixels.
For getting CUDA buffer of a NvBufSurface, please refer to cuda_postprocess() in
/usr/src/jetson_multimedia_api/samples/12_camera_v4l2_cuda
pangxie
September 8, 2022, 2:06am
4
hat’s what I’m doing now.
But I find it very performance-consuming and time-consuming. Is there a high-performance method to extract DMA buffer data ?
pangxie
September 8, 2022, 3:10am
5
The memory type of DMA buffer is NVBUF_MEM_SURFACE_ARRAY, which cannot be used by [_device ] Functions of type.
How can I convert NVBUF_MEM_SURFACE_ARRAY type memory into [_device ] without copying memory data What about functions of type?
DaneLLL
September 8, 2022, 4:20am
6
Hi,
With the following function calls:
NvEGLImageFromFd();
cuGraphicsEGLRegisterImage();
cuGraphicsResourceGetMappedEglFrame();
You can get CUDA pointer to the buffer and there is no additional memory copy. It is the optimal method on Jetson platforms.
pangxie
September 8, 2022, 5:58am
7
Can you provide a specific use method or example?
DaneLLL
September 8, 2022, 6:37am
8
Hi,
It is demonstrated in HandleEGLImage() . The code of the function is in
/usr/src/jetson_multimedia_api/samples/common/algorithm/cuda
system
Closed
September 28, 2022, 6:20am
10
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.