imx8mp can't convert RGB to YUV properly

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

imx8mp can't convert RGB to YUV properly

1,525 次查看
jemish_1990
Contributor V

Hi All,

We are making imx8mp based product. In this product we have usecase capture and preview video on LCD.

For imx8mp, If I run this command I am getting output as attached video (video_with_wrong_colors.mp4). I am also attaching image which format gstreamer take as input and what it displays.
gst-launch-1.0 -v v4l2src device=/dev/video3 ! glimagesink
 
Please note if I select BGR format I am able to capture video correctly with correct format. Attached video (captured_dump_file.mp4). I use the following command to capture and dump correct data.
v4l2-ctl --verbose --device /dev/video3 --stream-mmap --stream-to=frame.yuv --stream-count=60 --set-fmt-video=width=1280,height=720,pixelformat=BGR3 --stream-to=./frame.yuv
 
We are facing issue in displaying same data on LCD. Please provide if you have any suggestion regarding that.
 
If I try to display same BGR data on LCD using following command I am getting flashy video (flashy.mp4). Which doesn't looks good
gst-launch-1.0 -v v4l2src device=/dev/video3 ! video/x-raw, format=BGR ! videoconvert ! queue ! video/x-raw, format=BGR ! glimagesink
 
In addition to that I have tried many other commands but none of them help to preview it correctly. Please suggest if you have any suggestion regarding it. 
 
Thanks,
Jemish
0 项奖励
回复
3 回复数

1,491 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @jemish_1990 

I hope you are doing very well.

 

Could you please try to convert to RGB?

$ gst-launch-1.0 -v v4l2src device=/dev/video3 ! video/x-raw, format=BGR ! videoconvert ! video/x-raw, format=RGB ! glimagesink

Or if it does not work, wit RGBA:

$ gst-launch-1.0 -v v4l2src device=/dev/video3 ! video/x-raw, format=BGR ! videoconvert ! video/x-raw, format=RGBA ! glimagesink

 

Best regards,

Salas.

0 项奖励
回复

1,481 次查看
jemish_1990
Contributor V

Hi Salas,

 

Thanks for your answer. We tried these gstreamer commands but neither of them helped. Finally we had to modify ISP register configuration at kernel level. That swap the order of 'R' and 'B' bytes. Using that we are able to fix it.

We can close this thread. Thanks for your support.

Thanks,

Jemish

标记 (1)
0 项奖励
回复

1,521 次查看
jemish_1990
Contributor V

Hi All,

Just want to mentioned that we are using 6.6.36 kernel for our development.

Thanks,

Jemish

0 项奖励
回复