* OMAP3 previewer bayer pattern selection
@ 2012-04-30 10:23 jean-philippe francois
2012-05-02 11:15 ` Laurent Pinchart
0 siblings, 1 reply; 2+ messages in thread
From: jean-philippe francois @ 2012-04-30 10:23 UTC (permalink / raw)
To: linux-media, linux-omap
Hi,
I am trying to get a working preview from a CMOS
sensor with a CFA bayer pattern.
Does the CCDC_COLPTN register have any effect on
previewer CFA interpolation ?
>From my experience it does not. I can set BGGR or GRBG,
but the output is always the same. When doing raw capture,
I get nice image if I use a BGGR pattern for my software bayer
to rgb interpolation. When using previewer, the output looks like
BGGR interpreted as GRBG, ie blue and red are green, and green
turns into purple.
Looking at the driver code (mainline), there is nothing about bayer order
in the previewer code. Looking at the TRM, theres is also nothing in
the previewer
part about bayer order.
How are we supposed to debayer something different from GRBG ?
By modifying the cfa_coef_table table ?
Cropping at the previewer output to start on an odd line ?
Thank you for any pointer on this issue.
Jean-Philippe François
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: OMAP3 previewer bayer pattern selection
2012-04-30 10:23 OMAP3 previewer bayer pattern selection jean-philippe francois
@ 2012-05-02 11:15 ` Laurent Pinchart
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2012-05-02 11:15 UTC (permalink / raw)
To: jean-philippe francois; +Cc: linux-media, linux-omap
Hi Jean-Philippe,
On Monday 30 April 2012 12:23:27 jean-philippe francois wrote:
> Hi,
>
> I am trying to get a working preview from a CMOS sensor with a CFA bayer
> pattern.
>
> Does the CCDC_COLPTN register have any effect on previewer CFA interpolation
> ?
No it doesn't. The CCDC COLPTN register only affects CCDC operation.
> From my experience it does not. I can set BGGR or GRBG, but the output is
> always the same. When doing raw capture, I get nice image if I use a BGGR
> pattern for my software bayer to rgb interpolation. When using previewer,
> the output looks like BGGR interpreted as GRBG, ie blue and red are green,
> and green turns into purple.
>
> Looking at the driver code (mainline), there is nothing about bayer order
> in the previewer code. Looking at the TRM, theres is also nothing in the
> previewer part about bayer order.
>
> How are we supposed to debayer something different from GRBG ? By modifying
> the cfa_coef_table table ? Cropping at the previewer output to start on an
> odd line ?
Selecting the CFA pattern requires modifying several registers:
- PCR:CFA_FMT
0x0: Mode 0: conventional Bayer.
0x1: Mode 1: horizontal 2x downsample.
0x2: Mode 2: bypass CFA stage (RGB Foveon X3)
0x3: Mode 3: horizontal and vertical 2x downsample.
0x4: Mode 4: Super CCD Honeycom movie mode sensor.
0x5: Mode5: bypass CFA stage (RRRR GGGG BBBB Foveon X3).
The default value is Bayer, you won't need to change that.
- WBSEL
This register selects which white balance coefficient is applied to which
pixel. This needs to match the Bayer pattern.
- CFA table
That's where the bulk of the work will be. The CFA coefficients table needs to
be adjusted based on the Bayer pattern. Unfortunately the publicly available
TRM doesn't document how the table should be computed.
> Thank you for any pointer on this issue.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-02 11:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-30 10:23 OMAP3 previewer bayer pattern selection jean-philippe francois
2012-05-02 11:15 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).