I am using an i.MX6 SABRESD running fsl-linux distribution, with a custom camera input and streaming video input using gstreamer.
The camera output format is YUYV (YYYYYYYY UUUUUUUU YYYYYYYY VVVVVVVV, YUY2) and I am outputting 1920x1080p HMDI via 32bpp framebuffer.
Using the command
gst-launch-1.0 imxv4l2src device=/dev/video0 num-buffers=-1 ! 'video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)15/1' ! imxv4l2sink
gives okay quality video, but gradual changes in color result in errors in the color space conversion, shown as blocks of color where there should be a gradual change, as shown below.
I was able to modify a color space conversion example to correctly change the format of still images using "YUYV" as the color format.
My question is this;
Is gstreamer using the same color space converter as the example code (ie. the IPU) and if not, is there a way to make it do so, or to bypass gstreamer's csc and use the IPU instead?
Hi Ciaran
please try procedures given in sect.7.3.15 Video conversion
attached Linux Guide and use nxp bsps described on
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor, thank you for that info.
It appears that YUY2 isn't supported by imxvideoconvert_ipu. I've been able to change the camera format to UYVY (which is listed under "gst-inspect-1.0 imxvideoconvert_ipu" and switched to using videotestsrc to rule out any bad signals coming from the camera as the issue. My command is;
gst-launch-1.0 -v videotestsrc ! video/x-raw,format=RGB,width=800,height=600 ! imxvideoconvert_ipu ! pngenc ! filesink location=format_tests/test_rgb.png
resulting in the image on the left. Changing to "format=UYVY" results in the image on the right. There is a notable difference in color, particularly on the bottom-left bars.
Is there a simple explanation for this erroneous conversion?