From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, sadegh abbasi <sadegh612000@yahoo.co.uk>
Subject: Re: [PATCH v2 6/6] staging: media: omap4iss: ipipe: Expose the RGB2RGB blending matrix
Date: Wed, 28 Jan 2015 14:18:20 +0200 [thread overview]
Message-ID: <109421334.Lm3XXHQ8EE@avalon> (raw)
In-Reply-To: <54C8B976.3090908@xs4all.nl>
Hi Hans,
Thank you for the review.
On Wednesday 28 January 2015 11:27:02 Hans Verkuil wrote:
> On 01/28/15 10:17, Laurent Pinchart wrote:
> > Expose the module as two controls, one for the 3x3 multiplier matrix and
> > one for the 3x1 offset vector.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >
> > drivers/staging/media/omap4iss/iss_ipipe.c | 129 +++++++++++++++++++++++-
> > drivers/staging/media/omap4iss/iss_ipipe.h | 17 ++++
> > 2 files changed, 144 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/media/omap4iss/iss_ipipe.c
> > b/drivers/staging/media/omap4iss/iss_ipipe.c index 73b165e..624c5d2
> > 100644
> > --- a/drivers/staging/media/omap4iss/iss_ipipe.c
> > +++ b/drivers/staging/media/omap4iss/iss_ipipe.c
> > @@ -119,6 +119,105 @@ static void ipipe_configure(struct iss_ipipe_device
> > *ipipe)>
> > }
> >
> > /* ----------------------------------------------------------------------
> > + * V4L2 controls
> > + */
> > +
> > +#define OMAP4ISS_IPIPE_CID_BASE (V4L2_CID_USER_BASE | 0xf000)
>
> Private control ranges should be reserved in uapi/linux/v4l2-controls.h.
>
> See e.g. V4L2_CID_USER_SAA7134_BASE.
My bad, I'll fix that.
> > +#define OMAP4ISS_IPIPE_CID_RGB2RGB_MULT (OMAP4ISS_IPIPE_CID_BASE +
0)
> > +#define OMAP4ISS_IPIPE_CID_RGB2RGB_OFFSET (OMAP4ISS_IPIPE_CID_BASE +
1)
>
> Can you give some information how the values are interpreted? That should
> be documented anyway, but I would like to see how this compares to the
> adv drivers. This is something that we might want to make available as
> standard controls. I will have to think about that a bit more.
Sure.
http://www.ti.com/lit/pdf/swpu235, section 8.3.3.4.6, page 1863.
/ \ / \ / \ / \
| R_out | | gain_RR gain_GR gain_BR | | R_in | | offset_R |
| G_out | = | gain_RG gain_GG gain_BG | x | G_in | + | offset_G |
| B_out | | gain_RB gain_GB gain_BB | | B_in | | offset_B |
\ / \ / \ / \ /
The two controls correspond to the multiplication matrix and offset vector.
Coefficients are stored in 16 bits each and expressed as S3.8 (-4 to +3.996)
for the gains and S11 (-1024 to 1023) for the offsets.
Note that the ISS IPIPE has two RGB to RGB blending matrices as shown on
figure 8-132, page 1859. This patch implements support for the first one only.
We should probably consider how to expose the second one as well.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2015-01-28 20:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-28 9:17 [PATCH v2 0/6] omap4iss: Add RGB2RGB blending matrix support Laurent Pinchart
2015-01-28 9:17 ` [PATCH v2 1/6] v4l2-ctrls: Add new S8, S16 and S32 compound control types Laurent Pinchart
2015-01-28 10:19 ` Hans Verkuil
[not found] ` <532636346.4083310.1436543123211.JavaMail.yahoo@mail.yahoo.com>
2015-07-12 22:18 ` Laurent Pinchart
2015-07-13 8:12 ` Hans Verkuil
2015-01-28 9:17 ` [PATCH v2 2/6] v4l2-ctrls: Don't initialize array tail when setting a control Laurent Pinchart
2015-01-28 9:17 ` [PATCH v2 3/6] v4l2-ctrls: Make the control type init op initialize the whole control Laurent Pinchart
2015-01-28 10:20 ` Hans Verkuil
2015-01-28 9:17 ` [PATCH v2 4/6] v4l2-ctrls: Export the standard control type operations Laurent Pinchart
2015-01-28 9:17 ` [PATCH v2 5/6] staging: media: omap4iss: Cleanup media entities after unregistration Laurent Pinchart
2015-01-28 9:17 ` [PATCH v2 6/6] staging: media: omap4iss: ipipe: Expose the RGB2RGB blending matrix Laurent Pinchart
2015-01-28 10:27 ` Hans Verkuil
2015-01-28 12:18 ` Laurent Pinchart [this message]
2015-06-14 10:30 ` Laurent Pinchart
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=109421334.Lm3XXHQ8EE@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=sadegh612000@yahoo.co.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox