From 51949cfaadebd8e341fed1e85eca683dd40195d2 Mon Sep 17 00:00:00 2001 From: "hans@rhel5-devel.localdomain" Date: Mon, 25 May 2009 15:25:15 +0200 Subject: libv4l: add software autogain / exposure From: Hans de Goede Add software autogain / exposure, for camera's which have gain and exposure controls but do not contain the ability to calculate the average lumination in hardware (which is needed to do this in the kernel). This patch enables this for the spca561 rev12a, but it should be usefull for other cameras too. Priority: normal Signed-off-by: Hans de Goede --- v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c') diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c index afb0c854c..58d77e5ef 100644 --- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c +++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c @@ -127,6 +127,9 @@ struct v4lconvert_data *v4lconvert_create(int fd) data->flags |= V4LCONVERT_IS_UVC; else if (!strcmp((char *)cap.driver, "sn9c20x")) data->flags |= V4LCONVERT_IS_SN9C20X; + + if ((cap.capabilities & 0xff) & ~V4L2_CAP_VIDEO_CAPTURE) + always_needs_conversion = 0; } data->control = v4lcontrol_create(fd, always_needs_conversion); @@ -136,7 +139,7 @@ struct v4lconvert_data *v4lconvert_create(int fd) } data->control_flags = v4lcontrol_get_flags(data->control); - data->processing = v4lprocessing_create(data->control); + data->processing = v4lprocessing_create(fd, data->control); if (!data->processing) { v4lcontrol_destroy(data->control); free(data); -- cgit v1.2.3