A question about NvBufferCreate API

In NVIDIA’s API for creating NvBuffer, using the Buffer created by NvBufferCreate, layout=NvBufferLayout_Pitch, and the created DMA memory, can the user specify the data layout in it?
At present, it has been tested and found that the image stored in the memory, after storing a line, will jump a segment of memory, and then store the data of the next line. (For example, to store the 1920x1080 image , after storing 1920 Y data in the memory, 128 bytes of data will be vacated, and then the next line of Y data will be stored) Is there a way to continue the DMA transfer without writing additional code for copy line by line?

NvBuffer is DMA buffer and we have to fit the data alignment. You can get pitch, width,height of each plane by calling NvBufferGetParams(). Or can call Raw2NvBuffer() to copy data to the buffer.

Good received ! Thanks!

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