The issue i'm pretty sure has to do with the fact there are several
different bayer formats depending on the ordering of the red, green,
and blue pixels, the bridge used in these webcams expects to get BGGR
order so when it gets  different order the the colors will appear
incorrect.

One thing you can try is in the micron.c file find the initialization
array for the mt9m111 sensor and then modify the lines that write
values to registers 0x01 and 0x02, these lines say VSTART and HSTART
above them respectively. They control the row and column that the
sensor starts its reading from so adjusting them should effect your
image colors. I would start by I'm attaching a patch that increments
the starting row by one but from the reports i've seen so far i don't
think it gets the colors quite right either.

On Fri, Feb 6, 2009 at 12:19 PM, Daniel Holth <[email protected]> wrote:
>
> Another satisfied Clique Hue HD Woot customer.
>
> [ 8882.648100] sn9c20x: SN9C20X USB 2.0 Webcam - 0C45:6282 plugged-in.
> [ 8882.732115] sn9c20x: Detected MT9M111 Sensor.
> [ 8882.733493] sn9c20x: Webcam device 0C45:6282 is now controlling
> video device /dev/video4
> [ 8882.748614] sn9c20x: Using yuv420 output format
>
> I get the trippy green/red output (can see myself fine if focused)
> others have posted pics of. Is that because it is showing me an
> undecoded bayer pattern?
>
> Should I apply a patch on this list that hasn't made it into the git
> repo yet?
>
> Thanks,
>
> - Daniel
> >
>

--~--~---------~--~----~------------~-------~--~----~
Lets make microdia webcams plug'n play, (currently plug'n pray)
To post to this group, send email to [email protected]
Visit us online https://groups.google.com/group/microdia
-~----------~----~----~----~------~----~------~--~---

From 3c015e96e5fe5f1042c89a87444d7caed9b9aa6e Mon Sep 17 00:00:00 2001
From: Brian Johnson <[email protected]>
Date: Mon, 12 Jan 2009 00:02:00 -0500
Subject: [PATCH] Start mt9m111 sensor readout 1 row later

Signed-off-by: Brian Johnson <[email protected]>
---
 micron.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/micron.c b/micron.c
index d9394bb..61013d6 100644
--- a/micron.c
+++ b/micron.c
@@ -300,7 +300,7 @@ struct sn9c20x_i2c_regs mt9m111_init[] = {
 	/* The following set the resoutiona and window size.
 	 * It's a bit more than SXGA.
 	 * VSTART */
-	{0x01, 0x000e},
+	{0x01, 0x000f},
 	/* HSTART */
 	{0x02, 0x0014},
 	/* VSIZE */
@@ -326,6 +326,7 @@ struct sn9c20x_i2c_regs mt9m111_init[] = {
 	{0x2d, 0x0188},
 	/* Green 2 gain */
 	{0x2e, 0x0188},
+	{0x0d, 0x0008},
 	/* Blanking (again?) */
 	{0x0a, 0x0001},
 	{0x06, 0x0029},
-- 
1.5.6.3

Reply via email to