Thank you for your answer.
I want to use nvbuffer for easy to convert from opencv Mat.
How to convert nvbuffer to Fd?
Or can I convert opencv mat to Fd?
No, we don’t have solution for this. It is not possible to achieve zero memcpy() in this case. cv::Mat is mainly in BGR format, which is not supported in hardware DMA buffer NvBuffer.
Thank you for your answer.
I wish I could understand a little more about Nvbuffer.
The output of decodeToBuffer is the Nvbuffer software buffer.
The output of decodeToFd is hardware DMA buffer NvBuffer.
Is that possible to convert between Nvbuffer software buffer and hardware DMA buffer NvBuffer?
You may create a NvBuffer, call decodeToFd, and call NvBufferTransform() to copy decoded YUV to the created NvBuffer. In calling NvBufferTransform(), it utilizes hardware VIC engine to copy the buffers.