Re: [PATCH v5] media: imx: add mem2mem device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le mardi 08 janvier 2019 à 16:30 +0100, Philipp Zabel a écrit :
> Hi Nicolas,
> 
> On Mon, 2019-01-07 at 17:36 -0500, Nicolas Dufresne wrote:
> > Le lundi 03 décembre 2018 à 12:48 +0100, Philipp Zabel a écrit :
> > > Add a single imx-media mem2mem video device that uses the IPU IC PP
> > > (image converter post processing) task for scaling and colorspace
> > > conversion.
> > > On i.MX6Q/DL SoCs with two IPUs currently only the first IPU is used.
> > > 
> > > The hardware only supports writing to destination buffers up to
> > > 1024x1024 pixels in a single pass, arbitrary sizes can be achieved
> > > by rendering multiple tiles per frame.
> > 
> > While testing this driver, I found that the color conversion from YUYV
> > to BGR32 is broken.
> 
> Thank you for testing, do you mean V4L2_PIX_FMT_RGB32?
> 
> V4L2_PIX_FMT_BGR32 is still contained in the ipu_rgb_formats array in
> imx-media-utils, but happens to be never returned by enum_fmt since that
> already stops at the bayer formats.
> 
> >  Our test showed that the output of the m2m driver
> > is in fact RGBX/8888, a format that does not yet exist in V4L2
> > interface but that is supported by the imx-drm driver. This was tested
> > with GStreamer (master of gst-plugins-good), though some changes to
> > gst-plugins-bad is needed to add the missing format to kmssink. Let me
> > know if you need this to produce or not.
> > 
> > # To demonstrate (with patched gst-plugins-bad https://paste.fedoraproject.org/paste/rs-CbEq7coL4XSKrnWpEDw)
> > gst-launch-1.0 videotestsrc ! video/x-raw,format=YUY2 ! v4l2convert ! video/x-raw,format=xRGB ! kmssink
> 
> Is this with an old kernel? Since c525350f6ed0 ("media: imx: use well
> defined 32-bit RGB pixel format") that command line should make this
> select V4L2_PIX_FMT_XRGB32 ("BX24").

My testing is done with a slightly older kernel yes, but my colleagues
do reproduce on something more up to date. I should be updating the
test kernel soon, just need to find the time. As the pixel format
produced does not exist in v4l2 headers, the problem should still be
present for you on the most recent kernels.

Ideally I should produce a manual test of all conversion combination
(like I did for Exynos FIMC). This is fairly easy with GStreamer, I
just need to find the time slot to do so. Though, I thought this was
was rather important as the capture often produce YUYV and RGB can be
useful.

> 
> > # Software fix for the color format produced
> > gst-launch-1.0 videotestsrc ! video/x-raw,format=YUY2 ! v4l2convert ! video/x-raw,format=xRGB ! capssetter replace=0 caps="video/x-raw,format=RGBx" ! kmssink -v
> > 
> > Also, BGR32 is deprecated and should not be used, this is mapped by 
> > imx_media_enum_format() which I believe is already upstream. If that
> > is, this bug is just inherited from that helper.
> 
> regards
> Philipp




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux