Invalid argument after calling gpuConvertYUYVtoRGB_kernel in 18_v4l2_camera_cuda_rgb

HI, I am using Jetson Orin Nx 8G with Jetpack 5.1.2 to test convert USB camera YUYV frame to RGB format. The application is Jetson_multimeida_api/samples/18_v4l2_camera_cuda_rgb.

I checked the return from cuda function gpuConvertYUYVtoRGB_kernel like:

cudaError_t ret = cudaGetLastError();
if ( ret != cudaSuccess){
printf(“%s \n”,cudaGetErrorString(ret));
when the command I used was like “./v4l2_camera_cuda_rgb -d /dev/video2 -f YUYV -o out.ppm -s 1920x1080 -m”, the “invalid argument” has been reported. But if I choose user pointer with zero copy “-u -z”, the function return cudaSuccess.

Can someone figure it out? thanks

Please try the sample and see if you can capture frames successfully:


It is the other sample for capturing frame data through v4l2. Would like to make sure this works first.

And please ensure the samples are installed through SDKManager or sudo apt-get install command. We have seen issues that version of the samples does not match release version. In the condition, header files may be mismatched and trigger some issues.

Thanks DaneLLL, yes, 12_v4l2_camera_cuda is able to capture frame and render. I installed samples through SDKManager.

What I want to test is to convert YUYV to RGB via cuda. But the cuda function --gpuConvertYUYVtoRGB_kernel return error like “invalid argument” if I choose memory copy mode while it work properly if the mode is user pointer. So I think it would be something wrong happened in pinned memory shared with CPU and GPU.

So could you have a look at?Thanks

Looks like the issue occurs when -m is set. We will check if this mode can be supported.

I really appreciate if you could figure it out. Looking forward further feedback