Korvin schrieb:
On Thursday 05 February 2009 03:16:52 Brian Johnson wrote:
I think the issue with the mt9v112 has to do with the fact that that
sensor has an active window of only 640x480 pixels where as the sensor
on your camera has an active array of 1280x1024 pixels try mosifing
the register writes for regissters 1-4 to adjust the size of the
window inparticulare you can likely get rid of the black area by
modifiering registers 1 and 2 whcih are the x and y start postions for
your window registers 3 and 4 give it the wifth and height.

Right! Modifying 1 & 2 registers I removed the black spaces.

Tell me please, what width&height we're dealing with? Is it an order to sensor to read only windowed part of it's matrix? Or an order to stream the video data at this resolution? When I set 3&4 at max res of 1280x1024 the framerate decreases to the half (and this is described in specs), but again, I see only part of the image comparing to the M setup.

So I want to get the image from the whole res of sensor and then stream in in VGA :)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---


That is possible.

You will of course need to make the sensor ouput 1280x960 and then use the bridge (sn9c20x) to sclae the image down.

The attached patch contains what you need. Everything that contains "i2c" has to be rewritten (just one short section in resolution setting).

We decided(?) to drop SXGA because I failed to achieve a SXGA-stream via USB 2.0 . There doesn't seem to be enough bandwidth. Downscaling is of course possible but I don't really see the point since we'd still only get VGA and an even lower framrate.

GWater
From 73319cda0d4821b4b059d1517ab556bcddee188e Mon Sep 17 00:00:00 2001
From: Josua Grawitter <[email protected]>
Date: Sun, 25 Jan 2009 14:54:07 +0100
Subject: [PATCH] SXGA testing

Signed-off-by: Josua Grawitter <[email protected]>
---
 sn9c20x-bridge.c |   10 +++++++++-
 sn9c20x-dev.c    |    8 +++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/sn9c20x-bridge.c b/sn9c20x-bridge.c
index fc89ece..c772e65 100644
--- a/sn9c20x-bridge.c
+++ b/sn9c20x-bridge.c
@@ -691,7 +691,7 @@ int sn9c20x_set_resolution(struct usb_sn9c20x *dev,
        int width, int height)
 {
        int ret;
-       __u8 scale;
+       __u8 scale, buf;
        __u8 window[6];
        __u8 clrwindow[5];
        struct sn9c20x_video_mode *mode;
@@ -719,6 +719,14 @@ int sn9c20x_set_resolution(struct usb_sn9c20x *dev,
        window[4] = mode->window[2] >> 4;
        window[5] = mode->window[3] >> 3;
 
+       if (mode->window[2] == 1280) {
+               /* FIXME: This is SOI968 specific - look up SXGA settings
+                * for other sensors in datasheets */
+               sn9c20x_read_i2c_data(dev, 1, 0x12, &buf);
+               buf &= ~0x40;
+               sn9c20x_write_i2c_data(dev, 1, 0x12, &buf);
+       }
+
        usb_sn9c20x_control_write(dev, 0x10fb, clrwindow, 5);
        usb_sn9c20x_control_write(dev, 0x1180, window, 6);
        usb_sn9c20x_control_write(dev, SN9C20X_SCALE, &scale, 1);
diff --git a/sn9c20x-dev.c b/sn9c20x-dev.c
index 2287d4f..0b82ab9 100644
--- a/sn9c20x-dev.c
+++ b/sn9c20x-dev.c
@@ -70,11 +70,17 @@ struct sn9c20x_video_mode sn9c20x_modes[SN9C20X_N_MODES] = {
                .scale = SN9C20X_NO_SCALE,
                .window = {145, 96, 704, 576}
        },
-       {
+/*     {
                .width = 640,
                .height = 480,
                .scale = SN9C20X_NO_SCALE,
                .window = {0, 0, 640, 480}
+       }, */
+       {
+               .width = 640,
+               .height = 480,
+               .scale = SN9C20X_1_2_SCALE,
+               .window = {0, 0, 1280, 960}
        },
 };
 
-- 
1.6.0.6

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to