diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-04-27 11:32:24 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-07 16:11:48 -0300 |
commit | a648e310df9ff088d949befc8d1306264d970826 (patch) | |
tree | 264031cb8ec47aad286d35dd9f2d758993d3bc33 /drivers/media/video/gspca/autogain_functions.h | |
parent | 4fd466a13008823648cf2ec6f06a03d90e6412ab (diff) |
[media] gspca/autogain_functions.h: Allow users to declare what they want
Allow users of gspca/autogain_functions.h to declare which of the autogain
algoritms they are going to use. This allows us to remove the hacks from
drivers which don't use coarse_grained_expo_autogain.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/autogain_functions.h')
-rw-r--r-- | drivers/media/video/gspca/autogain_functions.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/autogain_functions.h b/drivers/media/video/gspca/autogain_functions.h index 46777eee678..d625eafe63e 100644 --- a/drivers/media/video/gspca/autogain_functions.h +++ b/drivers/media/video/gspca/autogain_functions.h @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#ifdef WANT_REGULAR_AUTOGAIN /* auto gain and exposure algorithm based on the knee algorithm described here: http://ytse.tricolour.net/docs/LowLightOptimization.html @@ -91,7 +92,9 @@ static inline int auto_gain_n_exposure( gain, exposure); return retval; } +#endif +#ifdef WANT_COARSE_EXPO_AUTOGAIN /* Autogain + exposure algorithm for cameras with a coarse exposure control (usually this means we can only control the clockdiv to change exposure) As changing the clockdiv so that the fps drops from 30 to 15 fps for @@ -103,7 +106,7 @@ static inline int auto_gain_n_exposure( which leads to oscilating as one exposure step is huge. Note this assumes that the sd struct for the cam in question has - exp_too_high_cnt and exp_too_high_cnt int members for use by this function. + exp_too_low_cnt and exp_too_high_cnt int members for use by this function. Returns 0 if no changes were made, 1 if the gain and or exposure settings where changed. */ @@ -177,3 +180,4 @@ static inline int coarse_grained_expo_autogain( gain, exposure); return retval; } +#endif |