Conversion of YUV420p to RGB

Is there a routine on TX1 analogous to OpenCV’s “cvtColor(yuvbuf, RGB, COLOR_YUV420p2RGB)” ? I am looking for faster(maybe hardware accelarator which could do this) and more reliable method to convert YUV420p to RGB as openCV’s method is inconsistent.

cvtColor randomly returns either BGR or RGB which ideally should not happen.

PS: I am operating at 60FPS

MMAPI has a sample that uses cuda to do YUV to RGB conversion. (v4l2cuda)
Also a plane conversion sample using VIC. (00_video_decode and 07_video_convert)

In additional to @WayneWWW,

Because VIC supports RGBA and BGRx formats but does not support BGR, we do RGBA -> BGR via CUDA. The sample is tegra_multimedia_api\samples\backend

thanks WayneWWW and DaneLLL.

According to this post v4l2 will not work with TegraISP. I will try the plane conversion sample using VIC as per your suggestion. I hope that will work with bayer sensor camera(IMX274)?

You can refer to for using nvcamerasrc and nvvidcon for isp and conversion respectively.

You may also refer to