On Tue, 2010-03-02 at 18:23 -0300, Mauro Carvalho Chehab wrote: > Devin Heitmueller wrote: > > On Tue, Mar 2, 2010 at 3:28 PM, Hans Verkuil <hverkuil@xxxxxxxxx> wrote: > > > I had some extended discussion with Mauro on this yesterday on > > #linuxtv, and he is now in favor of introducing a standard user > === > > control for chroma gain, as opposed to doing a private control at all. > > To be clear: I was never against ;) > > It is worthy to summarize the discussions we have and the rationale to > create another control for it. > > I've checked the datasheets of some chipsets, and the chroma gain is > different than the saturation control: the gain control (chroma or luma) > are applied at the analog input (or analog input samples) before the color > decoding, while the saturation is applied to the U/V output levels (some > datasheets call it as U/V output gain Yes, that is correct. > - causing some mess on the interpretation > of this value). AFAICT, the effect of chroma gain is not really different from a saturation control that scales both the U & V components by the same factor. _ A color vector A can be expressed as _ _ _ A = YW + C _ Where YW is a white vector that has a luminance component of magnitude Y. _ C is the chrominace vector in a constant luuminance plane. Its phase is the hue, and its magnitude is the saturation. _ Adjusting the magnitude of C in the analog domain will change the saturation. _ _ Adjusting C's U & V components will adjust only the magnitude of C, if U & V are adjusted by the same scale factor. (You can tweak both the hue and saturation by adjusting U & V by different scale factors.) > The API spec patch should clearly state that Saturation is for the U/V output > level, while gain is for the analog input gain. That makes sense. Since we're thinking about what to name controls, I will note the CX25843, doesn't quite fit the current discussion of an analog "chroma gain" independent from "luma gain": 1. the CX25843 has at least 3 front end gains well before U/V separation: a +12 dB analog boost a analog coarse gain (controlled by an AGC), a digital fine gain (also has an AGC). The +12 dB analog boost can be applied separately for Y, C, Pb and/or Pr, but the other analog and digital gains cannot. They will be applied to all video signal inputs the same. 2. the CX25843 U and V saturation scale factors can be set independently, if desired. Regards, Andy -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html