llittle/big edian with v4l2 format

Jacob Chen jacobchen110 at gmail.com
Mon Jun 26 06:04:43 UTC 2017


Hi all,


I'm writing a v4l2-m2m driver for a 2d grapphic acceleration unit in an arm
soc and I use gstreamer v4l2transform as userspace for test.

When i test it with below pipeline, i get a wrong picture.

gst-launch-1.0 -v videotestsrc ! "video/x-raw,format=BGRA,
width=1920,height=1080,framerate=30/1" ! \ v4l2video0convert
output-io-mode=dmabuf capture-io-mode=dmabuf ! \ "video/x-raw,format=NV12,
width=640,height=720,framerate=30/1, pixel-aspect-ratio=8/9" ! kmssink


After studys, i think the problem is gstreamer always use big endian for
color.


It seems in kmssink, the format will be converted according to endian.
https://github.com/GStreamer/gst-plugins-bad/blob/d373c4478be2f9887032f2e18501aa80e41f097b/sys/kms/gstkmsutils.c#L45


Shoud v4l2 pulgin do it too? So when i use "BGRA",  vl42 pulgin should
convert to ARGB v4l2 format.
https://github.com/GStreamer/gst-plugins-good/blob/master/sys/v4l2/gstv4l2object.c#L1621
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170626/d603ed4c/attachment.html>


More information about the gstreamer-devel mailing list