libv4l: Fix a bug in sw autogain for cams whose exposure minimum != 0
authorHans de Goede <hdegoede@redhat.com>
Sun, 11 Oct 2009 08:15:57 +0000 (10:15 +0200)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 24 Feb 2010 00:44:39 +0000 (21:44 -0300)
Priority: normal

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
lib/libv4lconvert/processing/autogain.c

index 375d411..abe5159 100644 (file)
@@ -65,6 +65,7 @@ static int autogain_calculate_lookup_tables(
   /* If we have a fine grained exposure control only avoid the last 10 steps */
   if (exposure_low > 10)
     exposure_low = 10;
+  exposure_low += expoctrl.minimum;
 
   ctrl.id = V4L2_CID_GAIN;
   gainctrl.id = V4L2_CID_GAIN;