Em Sun, 05 Jul 2009 21:25:09 +0200 Erik Andrén <erik.and...@gmail.com> escreveu:
> > > Mauro Carvalho Chehab wrote: > > Em Sat, 4 Jul 2009 21:58:31 +0200 > > Erik Andrén <erik.and...@gmail.com> escreveu: > > > >> 08/24: gspca - m5602-ov7660: Create blue gain control > >> http://linuxtv.org/hg/~eandren/v4l-dvb?cmd=changeset;node=5675978999c5 > >> > >> 09/24: gspca - m5602-ov7660: Add red gain control > >> http://linuxtv.org/hg/~eandren/v4l-dvb?cmd=changeset;node=802e9a025e93 > > > > +#define RED_BALANCE_IDX 3 > > + { > > + { > > + .id = V4L2_CID_RED_BALANCE, > > + .type = V4L2_CTRL_TYPE_INTEGER, > > + .name = "red balance", > > + .minimum = 0x00, > > + .maximum = 0x7f, > > + .step = 0x1, > > + .default_value = OV7660_DEFAULT_RED_GAIN, > > + .flags = V4L2_CTRL_FLAG_SLIDER > > + }, > > + .set = ov7660_set_red_gain, > > + .get = ov7660_get_red_gain > > + }, > > }; > > x > > Hmm... as far as I understand, "Red Balance" and "Red gain" are different > > ways > > to see the same measure. Unfortunately, the V4L2 API is not clear about > > those > > controls. > > > > According with the spec, we have: > > > > V4L2_CID_CONTRAST integer Picture contrast or luma gain. > > V4L2_CID_SATURATION integer Picture color saturation or chroma gain. > > V4L2_CID_HUE integer Hue or color balance. > > V4L2_CID_RED_BALANCE integer Red chroma balance. > > V4L2_CID_BLUE_BALANCE integer Blue chroma balance. > > V4L2_CID_GAIN integer Gain control. > > > > From what I'm understanding from the term "balance", it should be a shift > > over > > the gain control (so, 0 means normal colors, like on HUE balance). > > > > So, in order to convert from a RED GAIN into a RED BALANCE, we need to > > calculate it as a function of the V4L2_CID_GAIN or V4L2_CID_SATURATION. > > Positive values should mean more gain than the other colors, while negative > > values would mean the opposite. > > Is such a function defined somewhere? Do you have an example > implementing it? No, I don't have. We should better analize it, since drivers are doing different things with the gains. > I've done the same thing in the m5602 ov9650 sensor cod Cheers, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html