[{"id":4150,"web_url":"https://patchwork.libcamera.org/comment/4150/","msgid":"<e9de8848-2f6e-da17-c6b3-56888981477d@ideasonboard.com>","date":"2020-03-20T15:45:02","subject":"Re: [libcamera-devel] [PATCH v2 6/6] libcamera: controls: Add\n\tcontrols to report back frame metadata","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Naush,\n\nOn 09/03/2020 12:33, Naushir Patuck wrote:\n> Add controls to report the current frame's exposure and gain, and an\n> estimate of the current lux level from the AE algorithm.\n> \n> Add controls to report the red and blue colour gains, and an estimate of\n> the colour temperature from the AWB algorithm.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  src/libcamera/control_ids.yaml | 28 ++++++++++++++++++++++++++++\n>  1 file changed, 28 insertions(+)\n> \n> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> index 3d1b058f..ee93975e 100644\n> --- a/src/libcamera/control_ids.yaml\n> +++ b/src/libcamera/control_ids.yaml\n> @@ -138,6 +138,22 @@ controls:\n>  \n>          \\sa ManualExposure\n>  \n> +  - CurrentExposure:\n> +      type: int32_t\n> +      description: Report the exposure time in micro-seconds of this frame.\n> +\n> +        \\sa CurrentAnalogueGain\n> +\n> +  - CurrentAnalogueGain:\n> +      type: float\n> +      description: Report the analogue gain parameter for the current frame.\n> +\n> +        \\sa CurrentExposure\n> +\n> +  - CurrentLux:\n> +      type: float\n> +      description: Report an estimate of the current lux level.\n> +\n>    - AwbEnable:\n>        type: bool\n>        description: |\n> @@ -190,6 +206,18 @@ controls:\n>          in that order.\n>        size: [2]\n>  \n> +  - CurrentWbGains:\n> +      type: float\n> +      description: |\n> +        Report the current gain AWB gain values for the Red and Blue colour\n> +        channels, in that order.\n> +      size: [2]\n> +\n> +  - CurrentTemperature:\n> +      type: float\n> +      description:  |\n> +        Report the current estimate of the colour temperature for this frame.\n\nDo we need to explicitly define the scale/units of the temperature?\n(Presumably people would assume kelvins, but perhaps people could\nmisinterpret this somehow if we're not explicit)\n\n> +\n>    - Brightness:\n>        type: int32_t\n>        description: |\n>","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["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 31F3C60416\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Mar 2020 16:45:06 +0100 (CET)","from [192.168.0.20]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A61D5504;\n\tFri, 20 Mar 2020 16:45:05 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1584719105;\n\tbh=ryVvoEiCG+NsNrgkad9vYVVb0J+Ifl8DlnglkA8LaUY=;\n\th=Reply-To:Subject:To:References:From:Date:In-Reply-To:From;\n\tb=cvEgHs1jB43izI2f7AqVqHHPFoo8jXxkN8nY2WneICd7Y20/ciFCJ5XTY+BX84vlK\n\tkLQmXUFjna7VWTNkuJ5rhYWnl4ug7koJOsk2Od8xW/AvacYyVFt7A5BQhRHFf75X1f\n\tr4Vm8D4k6JrHDIauhf5maolYeCNksMnrH20nmuks=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20200309123319.630-1-naush@raspberrypi.com>\n\t<20200309123319.630-7-naush@raspberrypi.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\t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\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<e9de8848-2f6e-da17-c6b3-56888981477d@ideasonboard.com>","Date":"Fri, 20 Mar 2020 15:45:02 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.9.1","MIME-Version":"1.0","In-Reply-To":"<20200309123319.630-7-naush@raspberrypi.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v2 6/6] libcamera: controls: Add\n\tcontrols to report back frame metadata","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>","X-List-Received-Date":"Fri, 20 Mar 2020 15:45:06 -0000"}},{"id":4153,"web_url":"https://patchwork.libcamera.org/comment/4153/","msgid":"<CAHW6GYJDcNU9rU+Md+k3r-5xbkFNbrgutJTYES0-rcnCW9kVRA@mail.gmail.com>","date":"2020-03-20T16:25:49","subject":"Re: [libcamera-devel] [PATCH v2 6/6] libcamera: controls: Add\n\tcontrols to report back frame metadata","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Yes, we return the colour temperature in Kelvin. But you're right, and\nI think there's a general point here. How is code going to get less\nplatform specific if we don't define what all these numbers mean, by\nwhich I mean both the controls that you set and the values that may\nget reported back?\n\nDavid\n\nOn Fri, 20 Mar 2020 at 15:45, Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> Hi Naush,\n>\n> On 09/03/2020 12:33, Naushir Patuck wrote:\n> > Add controls to report the current frame's exposure and gain, and an\n> > estimate of the current lux level from the AE algorithm.\n> >\n> > Add controls to report the red and blue colour gains, and an estimate of\n> > the colour temperature from the AWB algorithm.\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >  src/libcamera/control_ids.yaml | 28 ++++++++++++++++++++++++++++\n> >  1 file changed, 28 insertions(+)\n> >\n> > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> > index 3d1b058f..ee93975e 100644\n> > --- a/src/libcamera/control_ids.yaml\n> > +++ b/src/libcamera/control_ids.yaml\n> > @@ -138,6 +138,22 @@ controls:\n> >\n> >          \\sa ManualExposure\n> >\n> > +  - CurrentExposure:\n> > +      type: int32_t\n> > +      description: Report the exposure time in micro-seconds of this frame.\n> > +\n> > +        \\sa CurrentAnalogueGain\n> > +\n> > +  - CurrentAnalogueGain:\n> > +      type: float\n> > +      description: Report the analogue gain parameter for the current frame.\n> > +\n> > +        \\sa CurrentExposure\n> > +\n> > +  - CurrentLux:\n> > +      type: float\n> > +      description: Report an estimate of the current lux level.\n> > +\n> >    - AwbEnable:\n> >        type: bool\n> >        description: |\n> > @@ -190,6 +206,18 @@ controls:\n> >          in that order.\n> >        size: [2]\n> >\n> > +  - CurrentWbGains:\n> > +      type: float\n> > +      description: |\n> > +        Report the current gain AWB gain values for the Red and Blue colour\n> > +        channels, in that order.\n> > +      size: [2]\n> > +\n> > +  - CurrentTemperature:\n> > +      type: float\n> > +      description:  |\n> > +        Report the current estimate of the colour temperature for this frame.\n>\n> Do we need to explicitly define the scale/units of the temperature?\n> (Presumably people would assume kelvins, but perhaps people could\n> misinterpret this somehow if we're not explicit)\n>\n> > +\n> >    - Brightness:\n> >        type: int32_t\n> >        description: |\n> >\n>\n> --\n> Regards\n> --\n> Kieran\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<david.plowman@raspberrypi.com>","Received":["from mail-oi1-x244.google.com (mail-oi1-x244.google.com\n\t[IPv6:2607:f8b0:4864:20::244])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2BC8A60416\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Mar 2020 17:26:02 +0100 (CET)","by mail-oi1-x244.google.com with SMTP id k18so7125201oib.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Mar 2020 09:26:02 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=kRB6rxNqKAgmoR8dw0/It961WJ1HzZ6lCvWlZZQ0E5k=;\n\tb=LmrTDLytwIX4b7R+Hjx4XKcWtMN1b4oQSynMuhfKzKyS0SBnNqp+OLUvIU9/d4xsJj\n\t1/315YGDVue6hp/K43vExgVkFEFBuDXpgrZf+/I9hm+MuEHK/EWWD1mEbACtErtln+id\n\tnqX3mVXT/mxeAXedYWL/u0VVZH4XwA2MdSb5RO6TLYd9+Gyz8hn+gO70xZ3YUNAEljnO\n\t4oua/jSNUWqTWk9eU4fTQmM/kk6TCNxAQM5OfupZyiHqWI5hDepRuWQsKY8LJq0uiPkc\n\tiAGoSpeoEYKmsX8ZDafjG3uKy+7Jp46Xg/kFaojALM11VEDOVt8/bH0BD6JgVft0C+w6\n\tRDuQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=kRB6rxNqKAgmoR8dw0/It961WJ1HzZ6lCvWlZZQ0E5k=;\n\tb=Pant2rMca4rgPaaYCVWCuIc5kLMDOh6xem889+ivepAK7u52yr8/k2kyN6NhOqDGOC\n\t0ruUfN5dXAipAQV+V4jBKEVNj9TLcyvhvXXFXfZXHvabVBYIAFrgKWSl47farW8PU3FK\n\t26KVAN/+yp5oI+6+pRDSaOibnFjb14IltYgmAGHQO12kbNmxoVbR0rfiRqD5Sc7/9WWB\n\tBK/BPzH6YUfcLe0ErdxD9suZxT8ksVa/y0brlJZM1odOVuiSQpyglf94FODjYIAmTGL0\n\t5ZEwWtKrjFOrofjE1T1CZ2JL8ciwp0KO24+8fBix/+t9oGC1LOhzIigfoFBhnb9KVyw5\n\tLpAw==","X-Gm-Message-State":"ANhLgQ25ZzldxLDrxk+murmqjKwVGqpFEpsrpk6yiYKNZin8IoKEXhKt\n\tXnvwLjG/sPRspThIaI4dc2nrhvj2mmgWUW9DozvQbg==","X-Google-Smtp-Source":"ADFU+vs295/nJpYCw/QZBVd64IblzulT1D95Oxhpm6z4RuxyQjO89gW5KD3EqPiBI7v3/LEROADdx4yLhFzVAOM9IT0=","X-Received":"by 2002:a05:6808:b2d:: with SMTP id\n\tt13mr7469817oij.107.1584721560748; \n\tFri, 20 Mar 2020 09:26:00 -0700 (PDT)","MIME-Version":"1.0","References":"<20200309123319.630-1-naush@raspberrypi.com>\n\t<20200309123319.630-7-naush@raspberrypi.com>\n\t<e9de8848-2f6e-da17-c6b3-56888981477d@ideasonboard.com>","In-Reply-To":"<e9de8848-2f6e-da17-c6b3-56888981477d@ideasonboard.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Fri, 20 Mar 2020 16:25:49 +0000","Message-ID":"<CAHW6GYJDcNU9rU+Md+k3r-5xbkFNbrgutJTYES0-rcnCW9kVRA@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v2 6/6] libcamera: controls: Add\n\tcontrols to report back frame metadata","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>","X-List-Received-Date":"Fri, 20 Mar 2020 16:26:02 -0000"}},{"id":4316,"web_url":"https://patchwork.libcamera.org/comment/4316/","msgid":"<20200326163434.GW20581@pendragon.ideasonboard.com>","date":"2020-03-26T16:34:34","subject":"Re: [libcamera-devel] [PATCH v2 6/6] libcamera: controls: Add\n\tcontrols to report back frame metadata","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hello,\n\nOn Fri, Mar 20, 2020 at 04:25:49PM +0000, David Plowman wrote:\n> Yes, we return the colour temperature in Kelvin. But you're right, and\n> I think there's a general point here. How is code going to get less\n> platform specific if we don't define what all these numbers mean, by\n> which I mean both the controls that you set and the values that may\n> get reported back?\n\nI think defining the units and ranges is the best approach when\npossible. Controls with custom units should be an exception. For ranges,\nthey could certainly be platform specific for some controls, but that's\nless of an issue if the units are well-defined.\n\n> On Fri, 20 Mar 2020 at 15:45, Kieran Bingham wrote:\n> > On 09/03/2020 12:33, Naushir Patuck wrote:\n> > > Add controls to report the current frame's exposure and gain, and an\n> > > estimate of the current lux level from the AE algorithm.\n> > >\n> > > Add controls to report the red and blue colour gains, and an estimate of\n> > > the colour temperature from the AWB algorithm.\n> > >\n> > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > ---\n> > >  src/libcamera/control_ids.yaml | 28 ++++++++++++++++++++++++++++\n> > >  1 file changed, 28 insertions(+)\n> > >\n> > > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> > > index 3d1b058f..ee93975e 100644\n> > > --- a/src/libcamera/control_ids.yaml\n> > > +++ b/src/libcamera/control_ids.yaml\n> > > @@ -138,6 +138,22 @@ controls:\n> > >\n> > >          \\sa ManualExposure\n> > >\n> > > +  - CurrentExposure:\n> > > +      type: int32_t\n> > > +      description: Report the exposure time in micro-seconds of this frame.\n> > > +\n> > > +        \\sa CurrentAnalogueGain\n> > > +\n\nI don't think we need a separate control for this. We have\nManualExposure already (which I think we'll rename to ExposureTime), and\nyou can use it in metadata. It's best to use the same control for the\nrequest control and metadata when they relate to the same value.\n\n> > > +  - CurrentAnalogueGain:\n> > > +      type: float\n> > > +      description: Report the analogue gain parameter for the current frame.\n> > > +\n> > > +        \\sa CurrentExposure\n\nDoes this one correspond to any of the other controls ?\n\n> > > +\n> > > +  - CurrentLux:\n> > > +      type: float\n> > > +      description: Report an estimate of the current lux level.\n\nI don't think we need the 'Current' prefix. Reporting a control in the\nrequest metadata implies it's the current value.\n\n> > > +\n> > >    - AwbEnable:\n> > >        type: bool\n> > >        description: |\n> > > @@ -190,6 +206,18 @@ controls:\n> > >          in that order.\n> > >        size: [2]\n> > >\n> > > +  - CurrentWbGains:\n> > > +      type: float\n> > > +      description: |\n> > > +        Report the current gain AWB gain values for the Red and Blue colour\n> > > +        channels, in that order.\n> > > +      size: [2]\n\nFor this one we already have a control.\n\n> > > +\n> > > +  - CurrentTemperature:\n> > > +      type: float\n> > > +      description:  |\n> > > +        Report the current estimate of the colour temperature for this frame.\n> >\n> > Do we need to explicitly define the scale/units of the temperature?\n> > (Presumably people would assume kelvins, but perhaps people could\n> > misinterpret this somehow if we're not explicit)\n\nAnd here we can drop the Current prefix too. I'd call it\nColorTemperature (or ColourTemperature ?) though, to avoid confusion\nwith the temperature of the camera sensor that we may decide to report\nlater on.\n\n> >\n> > > +\n> > >    - Brightness:\n> > >        type: int32_t\n> > >        description: |","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["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 AFEAD60412\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Mar 2020 17:34:38 +0100 (CET)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 10A0A2DC;\n\tThu, 26 Mar 2020 17:34:37 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"HeKL5A2a\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1585240478;\n\tbh=YWKRN1cUdP4bagsNLDCaknfjg9GGZ4SZxRkC6xycjPE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=HeKL5A2aAuZScYcELpqbG1gY6rgVK+9/F4G92mugyCA81xw1Wszjwhup+ulgiF0ct\n\tED/+fI0rbghwHT2qJOx5Hg8V0vSy7v5AmNTgYxJqlbCth1TZmP/KssO8Ga/K31w4Af\n\tj081fmD4dhphmsTt56xmoSVeVoP1kYo7j/JdGdoo=","Date":"Thu, 26 Mar 2020 18:34:34 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Message-ID":"<20200326163434.GW20581@pendragon.ideasonboard.com>","References":"<20200309123319.630-1-naush@raspberrypi.com>\n\t<20200309123319.630-7-naush@raspberrypi.com>\n\t<e9de8848-2f6e-da17-c6b3-56888981477d@ideasonboard.com>\n\t<CAHW6GYJDcNU9rU+Md+k3r-5xbkFNbrgutJTYES0-rcnCW9kVRA@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAHW6GYJDcNU9rU+Md+k3r-5xbkFNbrgutJTYES0-rcnCW9kVRA@mail.gmail.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 6/6] libcamera: controls: Add\n\tcontrols to report back frame metadata","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>","X-List-Received-Date":"Thu, 26 Mar 2020 16:34:38 -0000"}},{"id":4336,"web_url":"https://patchwork.libcamera.org/comment/4336/","msgid":"<CAEmqJPrj6jY9D7NgQq7tVSe6DLWHwf0QJS6go9HhKNNWYHmtCA@mail.gmail.com>","date":"2020-03-27T10:59:56","subject":"Re: [libcamera-devel] [PATCH v2 6/6] libcamera: controls: Add\n\tcontrols to report back frame metadata","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Laurent,\n\nOn Thu, 26 Mar 2020 at 16:34, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hello,\n>\n> On Fri, Mar 20, 2020 at 04:25:49PM +0000, David Plowman wrote:\n> > Yes, we return the colour temperature in Kelvin. But you're right, and\n> > I think there's a general point here. How is code going to get less\n> > platform specific if we don't define what all these numbers mean, by\n> > which I mean both the controls that you set and the values that may\n> > get reported back?\n>\n> I think defining the units and ranges is the best approach when\n> possible. Controls with custom units should be an exception. For ranges,\n> they could certainly be platform specific for some controls, but that's\n> less of an issue if the units are well-defined.\n>\n> > On Fri, 20 Mar 2020 at 15:45, Kieran Bingham wrote:\n> > > On 09/03/2020 12:33, Naushir Patuck wrote:\n> > > > Add controls to report the current frame's exposure and gain, and an\n> > > > estimate of the current lux level from the AE algorithm.\n> > > >\n> > > > Add controls to report the red and blue colour gains, and an estimate of\n> > > > the colour temperature from the AWB algorithm.\n> > > >\n> > > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > ---\n> > > >  src/libcamera/control_ids.yaml | 28 ++++++++++++++++++++++++++++\n> > > >  1 file changed, 28 insertions(+)\n> > > >\n> > > > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> > > > index 3d1b058f..ee93975e 100644\n> > > > --- a/src/libcamera/control_ids.yaml\n> > > > +++ b/src/libcamera/control_ids.yaml\n> > > > @@ -138,6 +138,22 @@ controls:\n> > > >\n> > > >          \\sa ManualExposure\n> > > >\n> > > > +  - CurrentExposure:\n> > > > +      type: int32_t\n> > > > +      description: Report the exposure time in micro-seconds of this frame.\n> > > > +\n> > > > +        \\sa CurrentAnalogueGain\n> > > > +\n>\n> I don't think we need a separate control for this. We have\n> ManualExposure already (which I think we'll rename to ExposureTime), and\n> you can use it in metadata. It's best to use the same control for the\n> request control and metadata when they relate to the same value.\n>\n\nThat seems like a good option.  We can rename ManualExposure to\nExposureTime and reuse for the return metadata.\n\n> > > > +  - CurrentAnalogueGain:\n> > > > +      type: float\n> > > > +      description: Report the analogue gain parameter for the current frame.\n> > > > +\n> > > > +        \\sa CurrentExposure\n>\n> Does this one correspond to any of the other controls ?\n\nCurrentAnalogueGain has the corresponding control ManualGain (which we\nare having a separate discussion about) so we should be able to reuse\nthat control.\n\n>\n> > > > +\n> > > > +  - CurrentLux:\n> > > > +      type: float\n> > > > +      description: Report an estimate of the current lux level.\n>\n> I don't think we need the 'Current' prefix. Reporting a control in the\n> request metadata implies it's the current value.\n\nWill remove the Current prefix.\n\n>\n> > > > +\n> > > >    - AwbEnable:\n> > > >        type: bool\n> > > >        description: |\n> > > > @@ -190,6 +206,18 @@ controls:\n> > > >          in that order.\n> > > >        size: [2]\n> > > >\n> > > > +  - CurrentWbGains:\n> > > > +      type: float\n> > > > +      description: |\n> > > > +        Report the current gain AWB gain values for the Red and Blue colour\n> > > > +        channels, in that order.\n> > > > +      size: [2]\n>\n> For this one we already have a control.\n>\n> > > > +\n> > > > +  - CurrentTemperature:\n> > > > +      type: float\n> > > > +      description:  |\n> > > > +        Report the current estimate of the colour temperature for this frame.\n> > >\n> > > Do we need to explicitly define the scale/units of the temperature?\n> > > (Presumably people would assume kelvins, but perhaps people could\n> > > misinterpret this somehow if we're not explicit)\n>\n> And here we can drop the Current prefix too. I'd call it\n> ColorTemperature (or ColourTemperature ?) though, to avoid confusion\n> with the temperature of the camera sensor that we may decide to report\n> later on.\n\nWill do.\n\n> > >\n> > > > +\n> > > >    - Brightness:\n> > > >        type: int32_t\n> > > >        description: |\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel\n\nRegards,\nNaush","headers":{"Return-Path":"<naush@raspberrypi.com>","Received":["from mail-lj1-x244.google.com (mail-lj1-x244.google.com\n\t[IPv6:2a00:1450:4864:20::244])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BD5BF605D3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2020 12:00:15 +0100 (CET)","by mail-lj1-x244.google.com with SMTP id k21so9737840ljh.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2020 04:00:15 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"W30CxlXn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=p+CU7ljBfo+mj25+LV0NJY05C7V3cLB5Z2GfVkBBGK4=;\n\tb=W30CxlXnyLI2iyr2Xgz4Zb3KTpuGN9q6dQBmHarJtHacTDoIfjZcsUT0ZorsVwNKNn\n\tUS+6kh3B+SaACZIXZsMqZzdg6oFSRGMUso0fGUHmmoobj56rZPGj05Zn5md9C+dQa/d3\n\tkgQQQoZ+o7CpjXBojMH4BhpLRbmUIOsZcRXJx0RZjqxsXAIB9IsF/c5DpCVcfGS/yLBO\n\tEIxxNvjoSi9hxwm0v3rKSpeou/q23W5dvxV3jrdUZIvdh+7wYEQGWJHajjdaqZBg2KRe\n\tUcGdUMeFhcOzR29ezt6CXvJSoEhQTQI5X+w9vdPTnfzXpmt9dSI18t9eLRM5r7wiv9ZD\n\tgNCA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=p+CU7ljBfo+mj25+LV0NJY05C7V3cLB5Z2GfVkBBGK4=;\n\tb=r1bZjdD0LPGMgsI7Am89es8bHGs+82D6CFjsC2Jw5q/WvFhgRmyDjNGrc1V5/We35v\n\tqerjLkim7cIfUjnVHg1Koa+Ogq2ZI6Gx6gtHgeF3a7ZttfdjfazPxObyxrAfqBltxfcf\n\ttAEDh6F0GmhdTmmVIgggquJMoLyg40YkZfNeqqsqeadntT+5bnSkX7m9HJXCGACk4rQu\n\tE1yHyBRIvafD0wGJ0xV58b4n1Q8tuUEiExDIYg3qtPJIuWNMnTVAyknr2a9Dja5jIQf6\n\twhqntqB7r0iz18VENa6j1wtZ9pxC52axCyCgDVvdDu+XrJDUBqOZPuPxsxrc36DUObFQ\n\tld7Q==","X-Gm-Message-State":"AGi0PuaIeMNb1we7Eru21IP+pWeNO2Eq6GmciO4bRAQObD7orl2YsZX2\n\tmRWSR2BPx/Y9dYMMG0rbjtTGsjlSZ7BX9MFz5rUwUqFrCPN4SQ==","X-Google-Smtp-Source":"ADFU+vvym32UUJoua9PHuzPj/c7hbXjS7kK5X15QD33InWp4+4Zss4tNiJBjjQiGd2MrFEIsz4Qr9dBwTI5nzWBRisE=","X-Received":"by 2002:a2e:b801:: with SMTP id u1mr7973509ljo.84.1585306815033; \n\tFri, 27 Mar 2020 04:00:15 -0700 (PDT)","MIME-Version":"1.0","References":"<20200309123319.630-1-naush@raspberrypi.com>\n\t<20200309123319.630-7-naush@raspberrypi.com>\n\t<e9de8848-2f6e-da17-c6b3-56888981477d@ideasonboard.com>\n\t<CAHW6GYJDcNU9rU+Md+k3r-5xbkFNbrgutJTYES0-rcnCW9kVRA@mail.gmail.com>\n\t<20200326163434.GW20581@pendragon.ideasonboard.com>","In-Reply-To":"<20200326163434.GW20581@pendragon.ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Fri, 27 Mar 2020 10:59:56 +0000","Message-ID":"<CAEmqJPrj6jY9D7NgQq7tVSe6DLWHwf0QJS6go9HhKNNWYHmtCA@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"David Plowman <david.plowman@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v2 6/6] libcamera: controls: Add\n\tcontrols to report back frame metadata","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>","X-List-Received-Date":"Fri, 27 Mar 2020 11:00:16 -0000"}},{"id":4338,"web_url":"https://patchwork.libcamera.org/comment/4338/","msgid":"<20200327110416.GF5040@pendragon.ideasonboard.com>","date":"2020-03-27T11:04:16","subject":"Re: [libcamera-devel] [PATCH v2 6/6] libcamera: controls: Add\n\tcontrols to report back frame metadata","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nOn Fri, Mar 27, 2020 at 10:59:56AM +0000, Naushir Patuck wrote:\n> On Thu, 26 Mar 2020 at 16:34, Laurent Pinchart wrote:\n> > On Fri, Mar 20, 2020 at 04:25:49PM +0000, David Plowman wrote:\n> > > Yes, we return the colour temperature in Kelvin. But you're right, and\n> > > I think there's a general point here. How is code going to get less\n> > > platform specific if we don't define what all these numbers mean, by\n> > > which I mean both the controls that you set and the values that may\n> > > get reported back?\n> >\n> > I think defining the units and ranges is the best approach when\n> > possible. Controls with custom units should be an exception. For ranges,\n> > they could certainly be platform specific for some controls, but that's\n> > less of an issue if the units are well-defined.\n> >\n> > > On Fri, 20 Mar 2020 at 15:45, Kieran Bingham wrote:\n> > > > On 09/03/2020 12:33, Naushir Patuck wrote:\n> > > > > Add controls to report the current frame's exposure and gain, and an\n> > > > > estimate of the current lux level from the AE algorithm.\n> > > > >\n> > > > > Add controls to report the red and blue colour gains, and an estimate of\n> > > > > the colour temperature from the AWB algorithm.\n> > > > >\n> > > > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > > ---\n> > > > >  src/libcamera/control_ids.yaml | 28 ++++++++++++++++++++++++++++\n> > > > >  1 file changed, 28 insertions(+)\n> > > > >\n> > > > > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> > > > > index 3d1b058f..ee93975e 100644\n> > > > > --- a/src/libcamera/control_ids.yaml\n> > > > > +++ b/src/libcamera/control_ids.yaml\n> > > > > @@ -138,6 +138,22 @@ controls:\n> > > > >\n> > > > >          \\sa ManualExposure\n> > > > >\n> > > > > +  - CurrentExposure:\n> > > > > +      type: int32_t\n> > > > > +      description: Report the exposure time in micro-seconds of this frame.\n> > > > > +\n> > > > > +        \\sa CurrentAnalogueGain\n> > > > > +\n> >\n> > I don't think we need a separate control for this. We have\n> > ManualExposure already (which I think we'll rename to ExposureTime), and\n> > you can use it in metadata. It's best to use the same control for the\n> > request control and metadata when they relate to the same value.\n> \n> That seems like a good option.  We can rename ManualExposure to\n> ExposureTime and reuse for the return metadata.\n> \n> > > > > +  - CurrentAnalogueGain:\n> > > > > +      type: float\n> > > > > +      description: Report the analogue gain parameter for the current frame.\n> > > > > +\n> > > > > +        \\sa CurrentExposure\n> >\n> > Does this one correspond to any of the other controls ?\n> \n> CurrentAnalogueGain has the corresponding control ManualGain (which we\n> are having a separate discussion about) so we should be able to reuse\n> that control.\n\nShould we then rename ManualGain to AnalogGain ?\n\n> > > > > +\n> > > > > +  - CurrentLux:\n> > > > > +      type: float\n> > > > > +      description: Report an estimate of the current lux level.\n> >\n> > I don't think we need the 'Current' prefix. Reporting a control in the\n> > request metadata implies it's the current value.\n> \n> Will remove the Current prefix.\n> \n> > > > > +\n> > > > >    - AwbEnable:\n> > > > >        type: bool\n> > > > >        description: |\n> > > > > @@ -190,6 +206,18 @@ controls:\n> > > > >          in that order.\n> > > > >        size: [2]\n> > > > >\n> > > > > +  - CurrentWbGains:\n> > > > > +      type: float\n> > > > > +      description: |\n> > > > > +        Report the current gain AWB gain values for the Red and Blue colour\n> > > > > +        channels, in that order.\n> > > > > +      size: [2]\n> >\n> > For this one we already have a control.\n> >\n> > > > > +\n> > > > > +  - CurrentTemperature:\n> > > > > +      type: float\n> > > > > +      description:  |\n> > > > > +        Report the current estimate of the colour temperature for this frame.\n> > > >\n> > > > Do we need to explicitly define the scale/units of the temperature?\n> > > > (Presumably people would assume kelvins, but perhaps people could\n> > > > misinterpret this somehow if we're not explicit)\n> >\n> > And here we can drop the Current prefix too. I'd call it\n> > ColorTemperature (or ColourTemperature ?) though, to avoid confusion\n> > with the temperature of the camera sensor that we may decide to report\n> > later on.\n> \n> Will do.\n> \n> > > >\n> > > > > +\n> > > > >    - Brightness:\n> > > > >        type: int32_t\n> > > > >        description: |","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["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 83DF4605D3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2020 12:04:20 +0100 (CET)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0A0562DC;\n\tFri, 27 Mar 2020 12:04:19 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"iIsYhvZt\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1585307060;\n\tbh=7gL2GnbyKkiMD0RVOZfNM0lEY4h+G3WOcwbWbqt0Ja8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=iIsYhvZtPWeyhmX8dmc+pqGWYbZhyLMdQSiZjQbLGsv1b0uHP7P/WNoAdvHGGHP+9\n\tlexCxZw3eiywt3nAzOHNhZzqJo+l4cab7RT8PuUgFvmALFSLmbhxnODlKWujFFoK5m\n\tcmc/Get1tJsM0fO5PiOHC6zUGjG0FZ6Z4XxKFjT0=","Date":"Fri, 27 Mar 2020 13:04:16 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"David Plowman <david.plowman@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Message-ID":"<20200327110416.GF5040@pendragon.ideasonboard.com>","References":"<20200309123319.630-1-naush@raspberrypi.com>\n\t<20200309123319.630-7-naush@raspberrypi.com>\n\t<e9de8848-2f6e-da17-c6b3-56888981477d@ideasonboard.com>\n\t<CAHW6GYJDcNU9rU+Md+k3r-5xbkFNbrgutJTYES0-rcnCW9kVRA@mail.gmail.com>\n\t<20200326163434.GW20581@pendragon.ideasonboard.com>\n\t<CAEmqJPrj6jY9D7NgQq7tVSe6DLWHwf0QJS6go9HhKNNWYHmtCA@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPrj6jY9D7NgQq7tVSe6DLWHwf0QJS6go9HhKNNWYHmtCA@mail.gmail.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 6/6] libcamera: controls: Add\n\tcontrols to report back frame metadata","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>","X-List-Received-Date":"Fri, 27 Mar 2020 11:04:20 -0000"}},{"id":4339,"web_url":"https://patchwork.libcamera.org/comment/4339/","msgid":"<CAEmqJPrrcwKQm2AexGA0t1Z1ryU907yTNGQU0KCLpYppqh6+hA@mail.gmail.com>","date":"2020-03-27T11:23:37","subject":"Re: [libcamera-devel] [PATCH v2 6/6] libcamera: controls: Add\n\tcontrols to report back frame metadata","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"HI Laurent,\n\nOn Fri, 27 Mar 2020 at 11:04, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi Naush,\n>\n> On Fri, Mar 27, 2020 at 10:59:56AM +0000, Naushir Patuck wrote:\n> > On Thu, 26 Mar 2020 at 16:34, Laurent Pinchart wrote:\n> > > On Fri, Mar 20, 2020 at 04:25:49PM +0000, David Plowman wrote:\n> > > > Yes, we return the colour temperature in Kelvin. But you're right, and\n> > > > I think there's a general point here. How is code going to get less\n> > > > platform specific if we don't define what all these numbers mean, by\n> > > > which I mean both the controls that you set and the values that may\n> > > > get reported back?\n> > >\n> > > I think defining the units and ranges is the best approach when\n> > > possible. Controls with custom units should be an exception. For ranges,\n> > > they could certainly be platform specific for some controls, but that's\n> > > less of an issue if the units are well-defined.\n> > >\n> > > > On Fri, 20 Mar 2020 at 15:45, Kieran Bingham wrote:\n> > > > > On 09/03/2020 12:33, Naushir Patuck wrote:\n> > > > > > Add controls to report the current frame's exposure and gain, and an\n> > > > > > estimate of the current lux level from the AE algorithm.\n> > > > > >\n> > > > > > Add controls to report the red and blue colour gains, and an estimate of\n> > > > > > the colour temperature from the AWB algorithm.\n> > > > > >\n> > > > > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > > > ---\n> > > > > >  src/libcamera/control_ids.yaml | 28 ++++++++++++++++++++++++++++\n> > > > > >  1 file changed, 28 insertions(+)\n> > > > > >\n> > > > > > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> > > > > > index 3d1b058f..ee93975e 100644\n> > > > > > --- a/src/libcamera/control_ids.yaml\n> > > > > > +++ b/src/libcamera/control_ids.yaml\n> > > > > > @@ -138,6 +138,22 @@ controls:\n> > > > > >\n> > > > > >          \\sa ManualExposure\n> > > > > >\n> > > > > > +  - CurrentExposure:\n> > > > > > +      type: int32_t\n> > > > > > +      description: Report the exposure time in micro-seconds of this frame.\n> > > > > > +\n> > > > > > +        \\sa CurrentAnalogueGain\n> > > > > > +\n> > >\n> > > I don't think we need a separate control for this. We have\n> > > ManualExposure already (which I think we'll rename to ExposureTime), and\n> > > you can use it in metadata. It's best to use the same control for the\n> > > request control and metadata when they relate to the same value.\n> >\n> > That seems like a good option.  We can rename ManualExposure to\n> > ExposureTime and reuse for the return metadata.\n> >\n> > > > > > +  - CurrentAnalogueGain:\n> > > > > > +      type: float\n> > > > > > +      description: Report the analogue gain parameter for the current frame.\n> > > > > > +\n> > > > > > +        \\sa CurrentExposure\n> > >\n> > > Does this one correspond to any of the other controls ?\n> >\n> > CurrentAnalogueGain has the corresponding control ManualGain (which we\n> > are having a separate discussion about) so we should be able to reuse\n> > that control.\n>\n> Should we then rename ManualGain to AnalogGain ?\n>\n\nYes, that's certainly a better name.\n\n> > > > > > +\n> > > > > > +  - CurrentLux:\n> > > > > > +      type: float\n> > > > > > +      description: Report an estimate of the current lux level.\n> > >\n> > > I don't think we need the 'Current' prefix. Reporting a control in the\n> > > request metadata implies it's the current value.\n> >\n> > Will remove the Current prefix.\n> >\n> > > > > > +\n> > > > > >    - AwbEnable:\n> > > > > >        type: bool\n> > > > > >        description: |\n> > > > > > @@ -190,6 +206,18 @@ controls:\n> > > > > >          in that order.\n> > > > > >        size: [2]\n> > > > > >\n> > > > > > +  - CurrentWbGains:\n> > > > > > +      type: float\n> > > > > > +      description: |\n> > > > > > +        Report the current gain AWB gain values for the Red and Blue colour\n> > > > > > +        channels, in that order.\n> > > > > > +      size: [2]\n> > >\n> > > For this one we already have a control.\n> > >\n> > > > > > +\n> > > > > > +  - CurrentTemperature:\n> > > > > > +      type: float\n> > > > > > +      description:  |\n> > > > > > +        Report the current estimate of the colour temperature for this frame.\n> > > > >\n> > > > > Do we need to explicitly define the scale/units of the temperature?\n> > > > > (Presumably people would assume kelvins, but perhaps people could\n> > > > > misinterpret this somehow if we're not explicit)\n> > >\n> > > And here we can drop the Current prefix too. I'd call it\n> > > ColorTemperature (or ColourTemperature ?) though, to avoid confusion\n> > > with the temperature of the camera sensor that we may decide to report\n> > > later on.\n> >\n> > Will do.\n> >\n> > > > >\n> > > > > > +\n> > > > > >    - Brightness:\n> > > > > >        type: int32_t\n> > > > > >        description: |\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","headers":{"Return-Path":"<naush@raspberrypi.com>","Received":["from mail-lj1-x242.google.com (mail-lj1-x242.google.com\n\t[IPv6:2a00:1450:4864:20::242])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3C1E46040E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2020 12:23:57 +0100 (CET)","by mail-lj1-x242.google.com with SMTP id t17so9777030ljc.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2020 04:23:57 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"s8bvIiEk\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=lf4B6bek/4Ib4Cv7U4EGHrlmBpBn9vEumcTVDhF0gLc=;\n\tb=s8bvIiEkC0YF57tx0+0j4MWMoMl2qUZxhaindg2YexRZoG6KQaDF4WBiHYX5o6sBoo\n\tIOH4FVzBvLdCsqOkeYoMUmxc4hZjCK+uaoWcjv5wD3EVob3/umxqZu3TMh8Xneuj++eH\n\t8UNgjGfK3tIH1QjjOZdOwl85jpm9s1f7hqIwehkq6NFWOhYset1epfSbPWibciphrdj5\n\tSjZZ9s3GV8ZtwIKtdDv9wkGOraRDE5drE06pS2hBkajqbI3YxAjeInypkMsDPnNnLm+S\n\tJNYLU3Amqc2YflKIVaJURfZWOPRLovV5WET8QVYP3wmPThxUc2ElYXXnGkgVrw6R2SmI\n\tzMWQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=lf4B6bek/4Ib4Cv7U4EGHrlmBpBn9vEumcTVDhF0gLc=;\n\tb=Jogky+fzD2KOAB/m0RjWM6I7GA9LR1Yx82vcLraWvIvPjnU4C5usEWyKcKXvHKiEce\n\tuNCNcURfYd2yyHvxmqaY+HxPWVLXmpAgcoehn7+tZJrSr7i44/WMkdD06UOTqnf1wekg\n\tJiX8sW3q49HccHy7doOWx7lHBZwTut74lM+wBHAPPC58ApbQYjqnxEDY78aDsaHx+TDY\n\tF8LFNZinelM+CEz51bie+2hiQzaLSr3GAtCjGeEJIhO8qk/bq3d9SuozdU7uzU7b9ulV\n\tj+jb8PqFWEfsbE1fERMjOR/uKOFDOw+4y/7+/1nm34j44BwW1i6y/YbeyLOSIlUEagrw\n\t+dtg==","X-Gm-Message-State":"ANhLgQ1PnRYdf5GzJYeGwcUaMYJIt13J5er5W5dPQQl1mgb+4RjS1Uik\n\tK4oD5RxiVsPmXhvVYmpsyJxE1SeOYNmSJfSAFkuKig==","X-Google-Smtp-Source":"APiQypI5L7IXygpmSrCOsheqTAlwapncaMzCuII/zXx8FmPLKF6V8Ac6nm+8Od1MwIi9umAKx5mulUPNGBQkiO3vBBs=","X-Received":"by 2002:a2e:6c03:: with SMTP id h3mr8575891ljc.8.1585308236564; \n\tFri, 27 Mar 2020 04:23:56 -0700 (PDT)","MIME-Version":"1.0","References":"<20200309123319.630-1-naush@raspberrypi.com>\n\t<20200309123319.630-7-naush@raspberrypi.com>\n\t<e9de8848-2f6e-da17-c6b3-56888981477d@ideasonboard.com>\n\t<CAHW6GYJDcNU9rU+Md+k3r-5xbkFNbrgutJTYES0-rcnCW9kVRA@mail.gmail.com>\n\t<20200326163434.GW20581@pendragon.ideasonboard.com>\n\t<CAEmqJPrj6jY9D7NgQq7tVSe6DLWHwf0QJS6go9HhKNNWYHmtCA@mail.gmail.com>\n\t<20200327110416.GF5040@pendragon.ideasonboard.com>","In-Reply-To":"<20200327110416.GF5040@pendragon.ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Fri, 27 Mar 2020 11:23:37 +0000","Message-ID":"<CAEmqJPrrcwKQm2AexGA0t1Z1ryU907yTNGQU0KCLpYppqh6+hA@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"David Plowman <david.plowman@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v2 6/6] libcamera: controls: Add\n\tcontrols to report back frame metadata","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>","X-List-Received-Date":"Fri, 27 Mar 2020 11:23:57 -0000"}}]