I use jetson-multimedia-api sample 06_jpeg_decode , make some changes
I make three thread, one thread use normal jepg_decode and video converter
other two threads use cudamalloc and cudafree gpu memory frequently, three threads are independent
when I decode some jpeg images , the video converter mapeed the fd error ! Abort
nvbuf_utils: dmabuf_fd 1169 mapped entry NOT found
libv4l2_nvvidconv (0):(1939) (ERROR) : Can not get HW buffer from FD… Exiting…
command lines: ./jpeg_decode num_files 1 …/…/data/Picture/nvidia-logo.jpg 1.yuv
We would suggest call NvBufferTransform() instead of using NvVideoConverter. Once you get decoded fd in decodeToFd(), please copy the buffer to another NvBuffer by calling NvBufferTransform(). We have reference code of MJPEG decoding in 12_camera_v4l2_cuda and please take a look.
Jpeg decodeToFd can fetch the jpeg pix_format , I use NvVideoConverter to transform YUV444 YUV422 YUV420 to NV12 ， NvBufferTransform Can’t finish the work ?
NvBufferTransform() can do the conversion. Both NvBufferTransform() and NvVideoConverter use same hardware converter(VIC engine). Please give it a try.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.