Initialize NvBuffer from CPU memory array

Hi all,
I’m trying to initialize a NvBuffer starting from a memory buffer containing a YUV image.

I found this post ( but I’m new to this topic and I need further information about how to copy data from memory to the NvBuffer and how to call NvBufferMemSyncForDevice.

Could you point me to a more complete example or can you tell me where I can find an exhaustive documentation about this?

Thank you very much,

Please check the option ‘-c Enable demonstration of CPU processing’ in 10_camera_recording.