[{"id":28196,"web_url":"https://patchwork.libcamera.org/comment/28196/","msgid":"<170116710867.630990.2597267643368729517@ping.linuxembedded.co.uk>","date":"2023-11-28T10:25:08","subject":"Re: [libcamera-devel] [PATCH v2 1/2] libcamera: controls: Update\n\tthe ColourTemperature control to be writable","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting David Plowman via libcamera-devel (2023-11-23 13:09:04)\n> Implementations are allowed to expose this as a settable control so\n> that applications can demand a specific colour temperature. The\n> description is updated to this effect.\n> \n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> ---\n>  src/libcamera/control_ids.yaml | 8 +++++---\n>  1 file changed, 5 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> index c3232abf..8fbcc5f6 100644\n> --- a/src/libcamera/control_ids.yaml\n> +++ b/src/libcamera/control_ids.yaml\n> @@ -312,9 +312,11 @@ controls:\n>  \n>    - ColourTemperature:\n>        type: int32_t\n> -      description: Report the current estimate of the colour temperature, in\n> -        kelvin, for this frame. The ColourTemperature control can only be\n> -        returned in metadata.\n> +      description: |\n> +        Report the current estimate of the colour temperature, in kelvin, for\n> +        this frame. An implementation may also allow this control to be set so\n> +        as to disable the AWB algorithm whilst setting the colour gains to the\n> +        correct fixed ones for this colour temperature.\n\nThis certainly frames it as a mostly metadata control rather than a\ncontrol-control. So I think that's fine as that's possibly the\nexpectation for the most part.\n\nI have in mind to do some documentation udpates in the near future so I\nwonder if I should look through all the controls and normalise how we\npresent the descriptions if they are read-only or settable or only\nif supported by the pipeline handler...\n\nBut I don't object to this for now so:\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n>  \n>    - Saturation:\n>        type: float\n> -- \n> 2.39.2\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C6378BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 28 Nov 2023 10:25:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C89E5629C3;\n\tTue, 28 Nov 2023 11:25:12 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7824B629BC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 Nov 2023 11:25:11 +0100 (CET)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 43FF8BB2;\n\tTue, 28 Nov 2023 11:24:36 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1701167112;\n\tbh=88pvutuPGwBT0AHjni41Lgd19QzO+QVly1P9iB/rQhs=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=gU3GHIqGqElV6PglOYXayzHQOZYLyO2gXNH/Cz253GN5bMCBi/MC6cXxJLvgBeABz\n\t4VP2WIhPiYpHHaH5QxdctAmz9KbN9IKOj3EhhgDmSYnkYSG/detmHcIb9V12UQ08xo\n\tC+QsK3wYXa3Lmi8vQbJEJHUJ4p210eLZkLIRFXeEgrDrQ+umKYXSib1SeLN21V9nfs\n\t6Lh6oM6DReU0rlbOt6NHlPKkvubJhL92B0eRQTuAeY6RWDJJvlE6PFq9MoKOsSA3Ov\n\tF25z79TwvgIJq0pciHvy0h7L1hv2SUW63bSQ9AAuQPqPehNuskJhgKtk/rWmY59n4D\n\t2KWA0t4zk1WHw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1701167076;\n\tbh=88pvutuPGwBT0AHjni41Lgd19QzO+QVly1P9iB/rQhs=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=t4OJGQKXAgjKoM2Mo1jfv49Qq63PcJ7eBuY4T0ZlO9+h5S/5kT9mTShNH1qpmVJp5\n\tcilDpWNEbSHNRII3ZegWFiV48ILCxit0z4VJjdzv69JqfcDKk19tXAjkpY/c+2xYyI\n\tdhbkHKErfL3pMN2bVVbJ2FsvHKj4yomR+++4FcFo="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"t4OJGQKX\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20231123130905.103934-1-david.plowman@raspberrypi.com>","References":"<20231123130905.103934-1-david.plowman@raspberrypi.com>","To":"David Plowman <david.plowman@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 28 Nov 2023 10:25:08 +0000","Message-ID":"<170116710867.630990.2597267643368729517@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v2 1/2] libcamera: controls: Update\n\tthe ColourTemperature control to be writable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28241,"web_url":"https://patchwork.libcamera.org/comment/28241/","msgid":"<170173206806.1978740.16193703845886293444@ping.linuxembedded.co.uk>","date":"2023-12-04T23:21:08","subject":"Re: [libcamera-devel] [PATCH v2 1/2] libcamera: controls: Update\n\tthe ColourTemperature control to be writable","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi David,\n\nSorry - Coming back to this one as there are things that aren't clear\nenough to merge it yet.\n\nQuoting Kieran Bingham (2023-11-28 10:25:08)\n> Quoting David Plowman via libcamera-devel (2023-11-23 13:09:04)\n> > Implementations are allowed to expose this as a settable control so\n> > that applications can demand a specific colour temperature. The\n> > description is updated to this effect.\n> > \n> > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> > ---\n> >  src/libcamera/control_ids.yaml | 8 +++++---\n> >  1 file changed, 5 insertions(+), 3 deletions(-)\n> > \n> > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> > index c3232abf..8fbcc5f6 100644\n> > --- a/src/libcamera/control_ids.yaml\n> > +++ b/src/libcamera/control_ids.yaml\n> > @@ -312,9 +312,11 @@ controls:\n> >  \n> >    - ColourTemperature:\n> >        type: int32_t\n> > -      description: Report the current estimate of the colour temperature, in\n> > -        kelvin, for this frame. The ColourTemperature control can only be\n> > -        returned in metadata.\n> > +      description: |\n> > +        Report the current estimate of the colour temperature, in kelvin, for\n> > +        this frame. An implementation may also allow this control to be set so\n> > +        as to disable the AWB algorithm whilst setting the colour gains to the\n> > +        correct fixed ones for this colour temperature.\n> \n> This certainly frames it as a mostly metadata control rather than a\n> control-control. So I think that's fine as that's possibly the\n> expectation for the most part.\n> \n> I have in mind to do some documentation udpates in the near future so I\n> wonder if I should look through all the controls and normalise how we\n> present the descriptions if they are read-only or settable or only\n> if supported by the pipeline handler...\n> \n> But I don't object to this for now so:\n\nHow does this ColourTemperature relate to the AwbMode ? Which one takes\nprecedence if set? (I assume based on the current text that this one\noverrides any setting of an AwbMode).\n\nWhat happens to ColourGains control if this is set? Does it override\nthose too?  Or do they take precedence? Or is this just a helper to be\nable to set ColourGains based on the tuning?\n\nDoes this control end up being an equivalent internal implementation\ndetail of setting the AwbModes, i.e. perhaps is setting AwbCloudy the\nsame as setting:\n\n  { ColourTemperature, 6000 },\n\nor perhaps setting AwbIncandescent would be:\n\n  { ColourTemperature, 2700 },\n\nAnd does such usage override the need/requirement to have an AwbCustom\nmode (which currently looks quite ill defined?\n\nIf the user sets ColourTemperature, will there still be anything that\ncan measure the ColourTemperature, and would return perhaps the\n'measured' ColourTemperature back in the metadata? or would it always\nreturn what the user 'Set' it to ?\n\n--\nKieran\n\n\n> \n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> >  \n> >    - Saturation:\n> >        type: float\n> > -- \n> > 2.39.2\n> >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D20AFC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  4 Dec 2023 23:21:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 402C4629BD;\n\tTue,  5 Dec 2023 00:21:13 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A0AFE61DA1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  5 Dec 2023 00:21:11 +0100 (CET)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E6822552;\n\tTue,  5 Dec 2023 00:20:31 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1701732073;\n\tbh=vLmGLaD0saunV12frhtyDXyRxTazcDoI++/kj95HpaE=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=lgB0h+01uvwB7V/igzn5yiuWL9AP+KokqyoYgLN00JId5lCjtQf8K77Fkumc3a230\n\tj0Vq4qIlJq4d+/ptRUcUOw4OGehqYbmFaC6uwIB4DzpUX3L7FvMd1GMW9eUbUeOOT6\n\tKjFmYUK95WGQ8jxs3sYg7ZJm5s9n29lOrpcgiPpKleZ+E7SDUDzoTjnKITtX611Q8x\n\tIS2I2qfZCgE4qVhGvfqDxGpqvU4OJBEydvzzHh4KhRcPRlLNG3ca6EPX1dbAHFrQJE\n\t22eqz5K+TczBK/D3IY9cOhaPrwHTWnZY47flDYF0TPAxtBns4iLxnlS33NAXZsQDp9\n\tp368pszzpjCrA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1701732032;\n\tbh=vLmGLaD0saunV12frhtyDXyRxTazcDoI++/kj95HpaE=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=gg/nBJLAhPQU9GtUKrPxAW4yV6jEhmkzGFohu113MJjRXipw85IaSVXxwyZjCo1UP\n\tapFiuzjBLukuTLkqmxUJYeHmaHNjbp6QSY/r0g2waSWfALwBycSUBaheJtewgRyhS0\n\t3fmvUc9it1fwZ4HVDqwLYnmK8AZld5Xe5NCyt3VE="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"gg/nBJLA\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<170116710867.630990.2597267643368729517@ping.linuxembedded.co.uk>","References":"<20231123130905.103934-1-david.plowman@raspberrypi.com>\n\t<170116710867.630990.2597267643368729517@ping.linuxembedded.co.uk>","To":"David Plowman <david.plowman@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 04 Dec 2023 23:21:08 +0000","Message-ID":"<170173206806.1978740.16193703845886293444@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v2 1/2] libcamera: controls: Update\n\tthe ColourTemperature control to be writable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28242,"web_url":"https://patchwork.libcamera.org/comment/28242/","msgid":"<CAHW6GYJE7U5xOh8u+=yd+kKn-ZkHJu_SktgvPoQt9m2NxqBgsw@mail.gmail.com>","date":"2023-12-05T09:00:54","subject":"Re: [libcamera-devel] [PATCH v2 1/2] libcamera: controls: Update\n\tthe ColourTemperature control to be writable","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Kieran\n\nIn our implementation setting a fixed colour temperature is just like\nsetting fixed colour gains. The AWB is \"disabled\" at that point, and\nyou don't get any feedback as to what it thinks the colour temperature\nreally is (as AWB is not doing a search any more). Setting a fixed\ncolour temperature overrides any fixed colour gains, and also vice\nversa, because they basically do the same thing (i.e. set fixed colour\ngains).\n\nOn the Pi, the AwbMode is a bit different because it still does a\nsearch, but over a restricted range. I could imagine that other\nplatforms do it more like \"setting a fixed colour temperature\",\nthough.\n\nDo you think some of these points need further explanation?\n\nDavid\n\nOn Mon, 4 Dec 2023 at 23:21, Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> Hi David,\n>\n> Sorry - Coming back to this one as there are things that aren't clear\n> enough to merge it yet.\n>\n> Quoting Kieran Bingham (2023-11-28 10:25:08)\n> > Quoting David Plowman via libcamera-devel (2023-11-23 13:09:04)\n> > > Implementations are allowed to expose this as a settable control so\n> > > that applications can demand a specific colour temperature. The\n> > > description is updated to this effect.\n> > >\n> > > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> > > ---\n> > >  src/libcamera/control_ids.yaml | 8 +++++---\n> > >  1 file changed, 5 insertions(+), 3 deletions(-)\n> > >\n> > > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> > > index c3232abf..8fbcc5f6 100644\n> > > --- a/src/libcamera/control_ids.yaml\n> > > +++ b/src/libcamera/control_ids.yaml\n> > > @@ -312,9 +312,11 @@ controls:\n> > >\n> > >    - ColourTemperature:\n> > >        type: int32_t\n> > > -      description: Report the current estimate of the colour temperature, in\n> > > -        kelvin, for this frame. The ColourTemperature control can only be\n> > > -        returned in metadata.\n> > > +      description: |\n> > > +        Report the current estimate of the colour temperature, in kelvin, for\n> > > +        this frame. An implementation may also allow this control to be set so\n> > > +        as to disable the AWB algorithm whilst setting the colour gains to the\n> > > +        correct fixed ones for this colour temperature.\n> >\n> > This certainly frames it as a mostly metadata control rather than a\n> > control-control. So I think that's fine as that's possibly the\n> > expectation for the most part.\n> >\n> > I have in mind to do some documentation udpates in the near future so I\n> > wonder if I should look through all the controls and normalise how we\n> > present the descriptions if they are read-only or settable or only\n> > if supported by the pipeline handler...\n> >\n> > But I don't object to this for now so:\n>\n> How does this ColourTemperature relate to the AwbMode ? Which one takes\n> precedence if set? (I assume based on the current text that this one\n> overrides any setting of an AwbMode).\n>\n> What happens to ColourGains control if this is set? Does it override\n> those too?  Or do they take precedence? Or is this just a helper to be\n> able to set ColourGains based on the tuning?\n>\n> Does this control end up being an equivalent internal implementation\n> detail of setting the AwbModes, i.e. perhaps is setting AwbCloudy the\n> same as setting:\n>\n>   { ColourTemperature, 6000 },\n>\n> or perhaps setting AwbIncandescent would be:\n>\n>   { ColourTemperature, 2700 },\n>\n> And does such usage override the need/requirement to have an AwbCustom\n> mode (which currently looks quite ill defined?\n>\n> If the user sets ColourTemperature, will there still be anything that\n> can measure the ColourTemperature, and would return perhaps the\n> 'measured' ColourTemperature back in the metadata? or would it always\n> return what the user 'Set' it to ?\n>\n> --\n> Kieran\n>\n>\n> >\n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >\n> > >\n> > >    - Saturation:\n> > >        type: float\n> > > --\n> > > 2.39.2\n> > >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 47C13C3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  5 Dec 2023 09:01:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 68EB0629E1;\n\tTue,  5 Dec 2023 10:01:09 +0100 (CET)","from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com\n\t[IPv6:2607:f8b0:4864:20::1134])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 529F661D9E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  5 Dec 2023 10:01:07 +0100 (CET)","by mail-yw1-x1134.google.com with SMTP id\n\t00721157ae682-5d33574f64eso59081197b3.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 05 Dec 2023 01:01:07 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1701766869;\n\tbh=ttBrjs6R9pIFn46d7DD6ttgWvT/mAOO4lcjjHOtJlpw=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=v6K/YD/3Q1xchCNT/oOXzuUhXbbopllVjTsTmB9jHBrTXq8LND4OGUGkoLs4XJBeV\n\tM1WRphnY8Cl3JyWVHlv9mOM1rc26w5glHLbfyLF1bjjt73fjFLKVW/3ly3aC5Dub5X\n\tGOBk6eVreLArtG/Nyt1gcMX+0oC/TWTuQsP4bL6pgzFbs83St9rWhAaxUxREsStSWy\n\t9P2KDk6XL1aGRVRsVtmGFMMmQSTlNCJH5aZMkNdljw2XzpL5EdXJ390+ItYWZ66fdG\n\tbwVllF/WwEh//5wCr9klTk7IfM3g6xo3NIxNNIdjDKvL/zCf4JPsCH/i08Yroj4SFF\n\tDl6ikb0XKkV4g==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1701766866; x=1702371666;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=YOgqxFXDDjeyuxv5jWcmO1RSARxrfQc/vpxcwQH2xVw=;\n\tb=iQNfJ0qG1k3hjxFlDGF++3xBGdAoHKVklQ9hqAnBwgPmQB9/WdmEOX+bCxPz0b83LF\n\tXOzGLdCJuKnoj16RAntnynSfF6xDP7KhO8t0ycRIErx8eSSr7kLyvHJSff0564JkmlCr\n\tzyVtFeSW4zNVYXn6aVR+ldF3C0voR5YqOlHduZmro4AuCTk83BQa/bGxUZXzi07WLiWp\n\tuTkIk707JUmo83l+6IvgT0gY6NzYFSEKLlwl6TFe+ThKpBJSMMT8Zh5DiAnDQNb7H9ta\n\tu068AsJMQdiEZFtn7LQO+rzj+TYqSv2x44PKnTxYxTiJlLaytemOIPvErqBi5UtETaeu\n\tfLDA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"iQNfJ0qG\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1701766866; x=1702371666;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=YOgqxFXDDjeyuxv5jWcmO1RSARxrfQc/vpxcwQH2xVw=;\n\tb=vJ21O9lQwSpslCBt4njOsJW7PlaZgJqyyEvcW2Kn3z9pDMZR1LwD0CZke41qj6L9LB\n\tqwS5E9cwvVWO3SbdrEuwMyl6Ho0wsgKjHShjhEkY0H0LyEh7IyQr7btpMGwFd5OMXLAa\n\tLPT/XU12XKtW6nj44Kx5OLZ9uX6VfUSSgZ0zWM+LHDfuregPpk2uchiCTOHQFIAjw/cJ\n\ts2g5uCBaj4yJqXdLdXlekXLLv7NCWhJmEFL8kw38Sa735y5qi3qMj3um+aXh3eXFANEQ\n\tvqdJITVOCTPgFDkmeq5X3jE+9kTvtV/W5OxPMCKQt6bIS4jjEl+P7J4tgfdV9A+TpmNm\n\tG3Tw==","X-Gm-Message-State":"AOJu0Yxt7euPF5N3FzZJ+zTqtQ4wsUfGlHvHaxlF9BPrVI4Md0bq1hHH\n\tKuiUucGBZ5RxUi4wWSo2oBEoSUzDOQNpUsf3QjIpeQ==","X-Google-Smtp-Source":"AGHT+IFRE0ySCPCgT3UBleI6wrww8iHQo7ZqBj6FiibicuH/wSjiuUFFIpe6rCLQPEvIzipOmiLt2REEPTr4USZbCWU=","X-Received":"by 2002:a81:b665:0:b0:5d6:c70f:7798 with SMTP id\n\th37-20020a81b665000000b005d6c70f7798mr5068836ywk.35.1701766865943;\n\tTue, 05 Dec 2023 01:01:05 -0800 (PST)","MIME-Version":"1.0","References":"<20231123130905.103934-1-david.plowman@raspberrypi.com>\n\t<170116710867.630990.2597267643368729517@ping.linuxembedded.co.uk>\n\t<170173206806.1978740.16193703845886293444@ping.linuxembedded.co.uk>","In-Reply-To":"<170173206806.1978740.16193703845886293444@ping.linuxembedded.co.uk>","Date":"Tue, 5 Dec 2023 09:00:54 +0000","Message-ID":"<CAHW6GYJE7U5xOh8u+=yd+kKn-ZkHJu_SktgvPoQt9m2NxqBgsw@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v2 1/2] libcamera: controls: Update\n\tthe ColourTemperature control to be writable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"David Plowman <david.plowman@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28490,"web_url":"https://patchwork.libcamera.org/comment/28490/","msgid":"<170557155634.3044059.7296505835205010472@ping.linuxembedded.co.uk>","date":"2024-01-18T09:52:36","subject":"Re: [libcamera-devel] [PATCH v2 1/2] libcamera: controls: Update\n\tthe ColourTemperature control to be writable","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi David,\n\nQuoting David Plowman (2023-12-05 09:00:54)\n> Hi Kieran\n> \n> In our implementation setting a fixed colour temperature is just like\n> setting fixed colour gains. The AWB is \"disabled\" at that point, and\n> you don't get any feedback as to what it thinks the colour temperature\n> really is (as AWB is not doing a search any more). Setting a fixed\n> colour temperature overrides any fixed colour gains, and also vice\n> versa, because they basically do the same thing (i.e. set fixed colour\n> gains).\n> \n> On the Pi, the AwbMode is a bit different because it still does a\n> search, but over a restricted range. I could imagine that other\n> platforms do it more like \"setting a fixed colour temperature\",\n> though.\n> \n> Do you think some of these points need further explanation?\n\nYes certainly, I think we need to clarify that to make sure the\nrelationship between the controls isn't ambiguous, and tell users what\nto expect.\n\nParticularly when one control impacts another. So the declaration of\n\"Setting a fixed colour temperature overrides fixed ColourGains\" is\nessential.\n\nAnd likely then the ColourGains text needs to be updated to reflect that\ncondition too.\n\nAny controls which have a relationship, should also reference each other\nwith the \\sa tag.\n\nI expect it would be 'invalid' to set AwbMode, ColourGains, and\nColourTemperature all at the same time. If someone did so, what should\nhappen? Would one take precedence? Would you report a failure? What\nshould we document to make it clear on expectaions to the user?\n\n\nIf you think there are 'groups' of controls that need to be docuemnted\ntogether, rather than repeat the same documentation in each control we\ncould also add specific control 'topics' to Doxygen to have a more descriptive\noverview of the relationships between controls.\n\nBased on Dan's latest Doxygen updates, we could have a targetted control\npage and add these topics to a page such as src/libcamera/controls.dox.\n\n\n--\nKieran\n\n\n\n> David\n> \n> On Mon, 4 Dec 2023 at 23:21, Kieran Bingham\n> <kieran.bingham@ideasonboard.com> wrote:\n> >\n> > Hi David,\n> >\n> > Sorry - Coming back to this one as there are things that aren't clear\n> > enough to merge it yet.\n> >\n> > Quoting Kieran Bingham (2023-11-28 10:25:08)\n> > > Quoting David Plowman via libcamera-devel (2023-11-23 13:09:04)\n> > > > Implementations are allowed to expose this as a settable control so\n> > > > that applications can demand a specific colour temperature. The\n> > > > description is updated to this effect.\n> > > >\n> > > > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> > > > ---\n> > > >  src/libcamera/control_ids.yaml | 8 +++++---\n> > > >  1 file changed, 5 insertions(+), 3 deletions(-)\n> > > >\n> > > > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> > > > index c3232abf..8fbcc5f6 100644\n> > > > --- a/src/libcamera/control_ids.yaml\n> > > > +++ b/src/libcamera/control_ids.yaml\n> > > > @@ -312,9 +312,11 @@ controls:\n> > > >\n> > > >    - ColourTemperature:\n> > > >        type: int32_t\n> > > > -      description: Report the current estimate of the colour temperature, in\n> > > > -        kelvin, for this frame. The ColourTemperature control can only be\n> > > > -        returned in metadata.\n> > > > +      description: |\n> > > > +        Report the current estimate of the colour temperature, in kelvin, for\n> > > > +        this frame. An implementation may also allow this control to be set so\n> > > > +        as to disable the AWB algorithm whilst setting the colour gains to the\n> > > > +        correct fixed ones for this colour temperature.\n> > >\n> > > This certainly frames it as a mostly metadata control rather than a\n> > > control-control. So I think that's fine as that's possibly the\n> > > expectation for the most part.\n> > >\n> > > I have in mind to do some documentation udpates in the near future so I\n> > > wonder if I should look through all the controls and normalise how we\n> > > present the descriptions if they are read-only or settable or only\n> > > if supported by the pipeline handler...\n> > >\n> > > But I don't object to this for now so:\n> >\n> > How does this ColourTemperature relate to the AwbMode ? Which one takes\n> > precedence if set? (I assume based on the current text that this one\n> > overrides any setting of an AwbMode).\n> >\n> > What happens to ColourGains control if this is set? Does it override\n> > those too?  Or do they take precedence? Or is this just a helper to be\n> > able to set ColourGains based on the tuning?\n> >\n> > Does this control end up being an equivalent internal implementation\n> > detail of setting the AwbModes, i.e. perhaps is setting AwbCloudy the\n> > same as setting:\n> >\n> >   { ColourTemperature, 6000 },\n> >\n> > or perhaps setting AwbIncandescent would be:\n> >\n> >   { ColourTemperature, 2700 },\n> >\n> > And does such usage override the need/requirement to have an AwbCustom\n> > mode (which currently looks quite ill defined?\n> >\n> > If the user sets ColourTemperature, will there still be anything that\n> > can measure the ColourTemperature, and would return perhaps the\n> > 'measured' ColourTemperature back in the metadata? or would it always\n> > return what the user 'Set' it to ?\n> >\n> > --\n> > Kieran\n> >\n> >\n> > >\n> > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > >\n> > > >\n> > > >    - Saturation:\n> > > >        type: float\n> > > > --\n> > > > 2.39.2\n> > > >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id DFB5CC323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Jan 2024 09:52:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 442C8628B7;\n\tThu, 18 Jan 2024 10:52:41 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 99D9061D48\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Jan 2024 10:52:39 +0100 (CET)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5A322735;\n\tThu, 18 Jan 2024 10:51:29 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1705571561;\n\tbh=TQCBG55caYiF6L1LpjWP35suFVdUgkp6IY5VIyqsJcY=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=psCjDt7yuse69K6CEIFOfGJTG8VDq+Bj+tDR6T3xxu3V7q087q+bM4x9QTj9BHp55\n\tFlcTs5avgnkuEBM1URHuVdfaIjokWJKtdJojDaa4kLr9D/ZNp18Ju/rGfPB1B9Hw3+\n\tOqKomx+bOT65QCIN8g5pf2xHpzII5Z1MNeL4wPdkKZJ4giJO9g/pmYVMQ3IWoB2C9r\n\tIxHd86Q0SrUYZuPDcDXrzj+bxVn14EyaDp3OabpQmVU9PtvtX95WmQGX6f0YsH6p+h\n\tRhBekIzc8uPVVfCyMdYhhFyh4TInCpxhYyP9BCNaPYtP+vU0+8szNAu0tzaAc0pjbu\n\tEC/KHL3FXzCFQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1705571489;\n\tbh=TQCBG55caYiF6L1LpjWP35suFVdUgkp6IY5VIyqsJcY=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=EUxfhyKzzAghNCUx5oDk3qHPWHZ4nqJ+a6s4jgp7eRA5OLKYvjVlqA51+3znisFMT\n\tpgE2VT0N1BlxDQDxrVd7DkLJiOcMWWMLshLcOoe62sLT+AsHn+QWDahanCvYPtbblr\n\tXV1HhIBJvqIvrX0yjcVvT0hHc03lrQ61J0w1JpOo="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"EUxfhyKz\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<CAHW6GYJE7U5xOh8u+=yd+kKn-ZkHJu_SktgvPoQt9m2NxqBgsw@mail.gmail.com>","References":"<20231123130905.103934-1-david.plowman@raspberrypi.com>\n\t<170116710867.630990.2597267643368729517@ping.linuxembedded.co.uk>\n\t<170173206806.1978740.16193703845886293444@ping.linuxembedded.co.uk>\n\t<CAHW6GYJE7U5xOh8u+=yd+kKn-ZkHJu_SktgvPoQt9m2NxqBgsw@mail.gmail.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Date":"Thu, 18 Jan 2024 09:52:36 +0000","Message-ID":"<170557155634.3044059.7296505835205010472@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v2 1/2] libcamera: controls: Update\n\tthe ColourTemperature control to be writable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]