Another register can also change the pixel order.

0X108 - OUTPUT FORMAT CONTROL (R/W)
Default     0x0080
Description This register specifies the output timing and format in
conjunction with R58:1 or R155:1 (depending upon the context).
Bits 15:10  Reserved for future expansion.
Bit 9       Flip Bayer columns in processed Bayer output mode.
            “0”—the column order is green, red and blue, green.
            “1”—the column order is red, green and green, blue.
Bit 8       Flip Bayer row in processed Bayer output mode.
            “0”—the first row contains green and red; the second row
contains blue and green.
            “1”—the first row contains blue and green; the second row
contains green and red.
Bit 7       Controls the values used for the protection bits in Rec.
ITU-R BT.656 codes.
            “0”—use 0's for the protection bits.
            “1”—use the correct values.
Bit 5       Multiplexes Y (in YCbCr mode) or green (in RGB mode)
channel on all channels (monochrome).
            “1”— Forces Y/G onto all channels.
Bit 4       Disables Cab color output channel (Cb=128) in YCbCr mode
and disables the Blue color output channel
            (B=0) in RGB mode.
            “1”—Forces Cab to 128 or B to 0.
Bit 3       Disables Y color output channel (Y=128) in YCbCr and
disables the Green color output channel (G=0) in RGB
            mode.
            “1”—Forces Y to 128 or G to 0.
Bit 2       Disables Cr color output channel (Cr=128) in YCbCr mode
and disables the Red color output channel (R=0)
            in RGB mode.
            “1”—Forces Cr to 128 or R to 0.
Bit 1       Toggles the assumptions about Bayer vertical CFA shift.
            “0”—Row containing red comes first.
            “1”—Row containing blue comes first.
Bit 0       Toggles the assumptions about Bayer horizontal CFA shift.
            “0”—Green comes first.
            “1”—Red or blue comes first.


On Feb 7, 1:55 am, Brian Johnson <[email protected]> wrote:
> 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:


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

Reply via email to