Message ID | BANLkTikCgTWA92P2Qw4hqyvmQFRZm7+Aog@mail.gmail.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-path: <mchehab@pedra> Envelope-to: mchehab@pedra Delivery-date: Sat, 04 Jun 2011 06:36:53 -0300 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from <mchehab@pedra>) id 1QSnHo-0000Ct-Og for mchehab@pedra; Sat, 04 Jun 2011 06:36:53 -0300 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for <mchehab@localhost> (single-drop); Sat, 04 Jun 2011 06:36:52 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QSlLU-0006QJ-3h; Sat, 04 Jun 2011 07:32:32 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752474Ab1FDHiN (ORCPT <rfc822; kmpark@infradead.org> + 1 other); Sat, 4 Jun 2011 03:38:13 -0400 Received: from mail-px0-f179.google.com ([209.85.212.179]:62305 "EHLO mail-px0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751790Ab1FDHiM convert rfc822-to-8bit (ORCPT <rfc822; linux-media@vger.kernel.org>); Sat, 4 Jun 2011 03:38:12 -0400 Received: by pxi2 with SMTP id 2so1678350pxi.10 for <linux-media@vger.kernel.org>; Sat, 04 Jun 2011 00:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=ga79jneZsnS+iIQXBjqd0w9hWxRt5xzUYKutkcTGwsI=; b=OFzQDgmKvBzKkIgc5aKR6Eks3+/5FiHHT6xkj8m5w5oB0mG1bdEN0NawEnJgbRSk9D MBOP5Rhn/vJ0eygKKCh8Lo4FvU3ZC8ZXIf/w0H+lM6ENiY9jvwpP/tPlAyqTeJYi5aXq nSylFjZDr3mVjApk11RvOdOviCsBqmF3bn0nA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=japdb96FtuEZV4TTe/fP9a0ogx/ckIELUzWwQylLrdSnGfimTPZeQavFURQhW5agnh DcuNWXnB7SfhlBW1sAmqGemofulJPQwMi3tTtesUN0Qktwls5eHoNfi15kxux4wN0snO 0EwcYWLifZr2TptvFokEmdrQtGzqd5MLv8g3c= MIME-Version: 1.0 Received: by 10.68.28.106 with SMTP id a10mr1133112pbh.401.1307173092099; Sat, 04 Jun 2011 00:38:12 -0700 (PDT) Received: by 10.68.63.194 with HTTP; Sat, 4 Jun 2011 00:38:12 -0700 (PDT) Date: Sat, 4 Jun 2011 04:38:12 -0300 Message-ID: <BANLkTikCgTWA92P2Qw4hqyvmQFRZm7+Aog@mail.gmail.com> Subject: [PATCH] Increase max exposure value to 255 from 26. From: =?ISO-8859-1?Q?Marco_Diego_Aur=E9lio_Mesquita?= <marcodiegomesquita@gmail.com> To: linux-media@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org Sender: <mchehab@pedra> |
Commit Message
Marco Diego Aurélio Mesquita
June 4, 2011, 7:38 a.m. UTC
The inline patch increases maximum exposure value from 26 to 255. It
has been tested and works well. Without the patch the captured image
is too dark and can't be improved too much.
Please CC answers as I'm not subscribed to the list.
Signed-off-by: Marco Diego Aurélio Mesquita <marcodiegomesquita@gmail.com>
---
drivers/media/video/gspca/pac207.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Comments
Hi, Interesting. I'll go and test this with my 6 or so pac207 cameras, but first I need to wait till this evening as atm it is too light to test high exposure settings :) Regards, Hans On 06/04/2011 09:38 AM, Marco Diego Aurélio Mesquita wrote: > The inline patch increases maximum exposure value from 26 to 255. It > has been tested and works well. Without the patch the captured image > is too dark and can't be improved too much. > > Please CC answers as I'm not subscribed to the list. > > > Signed-off-by: Marco Diego Aurélio Mesquita<marcodiegomesquita@gmail.com> > --- > drivers/media/video/gspca/pac207.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/media/video/gspca/pac207.c > b/drivers/media/video/gspca/pac207.c > index 892b454..6a2fb26 100644 > --- a/drivers/media/video/gspca/pac207.c > +++ b/drivers/media/video/gspca/pac207.c > @@ -39,7 +39,7 @@ MODULE_LICENSE("GPL"); > #define PAC207_BRIGHTNESS_DEFAULT 46 > > #define PAC207_EXPOSURE_MIN 3 > -#define PAC207_EXPOSURE_MAX 26 > +#define PAC207_EXPOSURE_MAX 255 > #define PAC207_EXPOSURE_DEFAULT 5 /* power on default: 3 */ > #define PAC207_EXPOSURE_KNEE 8 /* 4 = 30 fps, 11 = 8, 15 = 6 */ > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
I think there maybe some different versions of the chip. Whenever I get a webcam with a pac207, it has the problem described here: http://ubuntuforums.org/archive/index.php/t-1553690.html 2011/6/4 Hans de Goede <hdegoede@redhat.com>: > Hi, > > Interesting. I'll go and test this with my 6 or so pac207 cameras, > but first I need to wait till this evening as atm it is too > light to test high exposure settings :) > > Regards, > > Hans > > > On 06/04/2011 09:38 AM, Marco Diego Aurélio Mesquita wrote: >> >> The inline patch increases maximum exposure value from 26 to 255. It >> has been tested and works well. Without the patch the captured image >> is too dark and can't be improved too much. >> >> Please CC answers as I'm not subscribed to the list. >> >> >> Signed-off-by: Marco Diego Aurélio Mesquita<marcodiegomesquita@gmail.com> >> --- >> drivers/media/video/gspca/pac207.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/media/video/gspca/pac207.c >> b/drivers/media/video/gspca/pac207.c >> index 892b454..6a2fb26 100644 >> --- a/drivers/media/video/gspca/pac207.c >> +++ b/drivers/media/video/gspca/pac207.c >> @@ -39,7 +39,7 @@ MODULE_LICENSE("GPL"); >> #define PAC207_BRIGHTNESS_DEFAULT 46 >> >> #define PAC207_EXPOSURE_MIN 3 >> -#define PAC207_EXPOSURE_MAX 26 >> +#define PAC207_EXPOSURE_MAX 255 >> #define PAC207_EXPOSURE_DEFAULT 5 /* power on default: 3 */ >> #define PAC207_EXPOSURE_KNEE 8 /* 4 = 30 fps, 11 = 8, 15 = 6 */ >> > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, Thanks for the patch, I've taken a look at this, and the way the pac207's exposure control works is it sets the fps according to the formula of: 90 / exposure reg value. So the old max setting gave you a max exposure time of 90 / 26 = 3.46 fps or 288.9 milliseconds. 3.46 fps already is quite slow for a webcam, but I agree that under low light conditions higher exposure settings are necessary. However setting a max value of 255 would mean the camera would run at 0.35 fps, which would mean 3 seconds between frames likely triggering timeouts in various applications, or if a frame gets damaged and dropped, 6 seconds, triggering a timeout condition inside the gspca core. Thinking more about this I think that a max exposure setting of 1 second is a sane value, so I've prepared a patch and send a pull request for this to Mauro which changes the max exposure setting to 90. I've also included some tweaks to the knee values for the auto exposure knee algorithm used, to make auto exposure work better under various circumstances. Regards, Hans On 06/04/2011 09:38 AM, Marco Diego Aurélio Mesquita wrote: > The inline patch increases maximum exposure value from 26 to 255. It > has been tested and works well. Without the patch the captured image > is too dark and can't be improved too much. > > Please CC answers as I'm not subscribed to the list. > > > Signed-off-by: Marco Diego Aurélio Mesquita<marcodiegomesquita@gmail.com> > --- > drivers/media/video/gspca/pac207.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/media/video/gspca/pac207.c > b/drivers/media/video/gspca/pac207.c > index 892b454..6a2fb26 100644 > --- a/drivers/media/video/gspca/pac207.c > +++ b/drivers/media/video/gspca/pac207.c > @@ -39,7 +39,7 @@ MODULE_LICENSE("GPL"); > #define PAC207_BRIGHTNESS_DEFAULT 46 > > #define PAC207_EXPOSURE_MIN 3 > -#define PAC207_EXPOSURE_MAX 26 > +#define PAC207_EXPOSURE_MAX 255 > #define PAC207_EXPOSURE_DEFAULT 5 /* power on default: 3 */ > #define PAC207_EXPOSURE_KNEE 8 /* 4 = 30 fps, 11 = 8, 15 = 6 */ > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/video/gspca/pac207.c index 892b454..6a2fb26 100644 --- a/drivers/media/video/gspca/pac207.c +++ b/drivers/media/video/gspca/pac207.c @@ -39,7 +39,7 @@ MODULE_LICENSE("GPL"); #define PAC207_BRIGHTNESS_DEFAULT 46 #define PAC207_EXPOSURE_MIN 3 -#define PAC207_EXPOSURE_MAX 26 +#define PAC207_EXPOSURE_MAX 255 #define PAC207_EXPOSURE_DEFAULT 5 /* power on default: 3 */ #define PAC207_EXPOSURE_KNEE 8 /* 4 = 30 fps, 11 = 8, 15 = 6 */