Hello All:
After reading the 3.2.14.1.2. Importing memory objects : https://docs.nvidia.com/drive/drive_os_5.1.6.1L/nvvib_docs/index.html#page/DRIVE_OS_Linux_SDK_Development_Guide/Graphics/nvsci_nvscibuf.html#wwconnect_header
The the thing is : attached the NvBuffer region directly to the cuda Space.
If the VIC has already convert the image format from YUV422 to RGB888 in the NvBuffer region,can we use cuda access the region without any copy functions?
Here is my code:
int main()
{
NvBufferCreateEx(&dma_fd, &input_params);
cudaExternalMemoryHandleDesc desc = {};
desc.type = cudaExternalMemoryHandleTypeOpaqueFd;
desc.handle.fd = dma_fd; //from the NvBuffer returned fd
desc.size = 1920*1080*2; //make the space length
desc.flags |= cudaExternalMemoryDedicated;
cudaImportExternalMemory(&extMem, &desc);
return 0;
}
The code is failed at runtime on XAVIER AGX. Could NvBuffer for cuda process?
thanks
edward