All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Nicolas Dufresne <nicolas@ndufresne.ca>, linux-media@vger.kernel.org
Cc: Hans Verkuil <hans.verkuil@cisco.com>,
	Steve Longerbeam <slongerbeam@gmail.com>,
	kernel@pengutronix.de
Subject: Re: [PATCH v5] media: imx: add mem2mem device
Date: Tue, 08 Jan 2019 16:30:28 +0100	[thread overview]
Message-ID: <1546961428.5406.4.camel@pengutronix.de> (raw)
In-Reply-To: <4acdd5bd4af28f33ae60d4ac244292e71dd9780d.camel@ndufresne.ca>

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").

> # 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

  reply	other threads:[~2019-01-08 15:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-03 11:48 [PATCH v5] media: imx: add mem2mem device Philipp Zabel
2018-12-03 15:21 ` Hans Verkuil
2018-12-05  1:20   ` Steve Longerbeam
2018-12-05 18:50     ` Hans Verkuil
2018-12-05 23:13       ` Steve Longerbeam
2018-12-06 12:32         ` Hans Verkuil
2018-12-06 22:57           ` Steve Longerbeam
2019-01-08 16:02       ` Philipp Zabel
2019-01-08 16:00     ` Philipp Zabel
2019-01-08 15:59   ` Philipp Zabel
2019-01-07 22:36 ` Nicolas Dufresne
2019-01-08 15:30   ` Philipp Zabel [this message]
2019-01-08 17:47     ` Nicolas Dufresne
2019-01-14 21:17     ` Nicolas Dufresne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1546961428.5406.4.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=hans.verkuil@cisco.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-media@vger.kernel.org \
    --cc=nicolas@ndufresne.ca \
    --cc=slongerbeam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.