Can't save RGB format from NvBufSurface

jetson orin nx
JetPack 5.1.1[L4t 35.3.1]

hi
I made modifications based on “/var/src/jetson_maultimedia.api/samples/02-video_dec_CUDA” and saved it after NvBufSurf:: NvTransform, but the program crashed

I want to directly give the RGB data of transform to Tensor, but in OpenCV
Crash during stored procedure. If it is the default nv12, it can work normally. The crash occurs in “cv:: imwrite (outName, out_mat);”

change 1


changg 2

We look forward to your reply,thank you

Hi,
24-bit RGB/BGR format is not supported on Jetson platforms. Please convert to RGBA. You may refer to this patch:
How to create OpenCV cv::Mat from NvBuffer in Jetpack 5.1 - #8 by DaveYYY

Thank you for your reply. After modification, it can work normally.

I have a new issue when referring to the sample. In the “resChange” function of “/var/src/jetson_maultimedia-api/samples/04-video_dec_rt/video_dec_rt_main. cpp”, there is a resolution modification event that calls this function, but does not release the previous resource. For example, “ctr ->dstd_dma_fd=new int [min_dec_capture_fuffers]” does not delete the pointer of the first entry when entering the second entry

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.