[{"id":22488,"web_url":"https://patchwork.libcamera.org/comment/22488/","msgid":"<20220328135218.az7d7aitj7xmusx3@uno.localdomain>","date":"2022-03-28T13:52:18","subject":"Re: [libcamera-devel] [PATCH 3/4] libipa: camera_sensor_helper: Add\n\tIMX290 helper","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Mon, Mar 28, 2022 at 03:03:35PM +0300, Laurent Pinchart via libcamera-devel wrote:\n> The IMX290 is a Sony sensor that expresses its gain in 0.3dB units. It\n> thus maps to the exponential gain model.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/ipa/libipa/camera_sensor_helper.cpp | 31 +++++++++++++++++++++++++\n>  1 file changed, 31 insertions(+)\n>\n> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> index 7bb999e19102..136b9f6bc3c5 100644\n> --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> @@ -332,6 +332,26 @@ std::vector<CameraSensorHelperFactory *> &CameraSensorHelperFactory::factories()\n>\n>  #ifndef __DOXYGEN__\n>\n> +/*\n> + * Helper function to compute the m parameter of the exponential gain model\n> + * when the gain code is expressed in dB.\n> + */\n> +static constexpr double expGainDb(double step)\n> +{\n> +\tconstexpr double log2_10 = 3.321928094887362;\n> +\n> +\t/*\n> +\t * The gain code is expressed in step * dB (e.g. in 0.1 dB steps):\n> +\t *\n> +\t * G_code = G_dB/step = 20/step*log10(G_linear)\n\nWhy was I expecting\n                                10/step*log10(G_linear)\n\nAs my understanding is that\n\n                G_db = 10*log10(G_linear) ?\n\n(nit: isn't it more readable with spaces between operands ?)\n\nThanks\n   j\n\n> +\t *\n> +\t * Inverting the formula, we get\n> +\t *\n> +\t * G_linear = 10^(step/20*G_code) = 2^(log2(10)*step/20*G_code)\n> +\t */\n> +\treturn log2_10 * step / 20;\n> +}\n> +\n>  class CameraSensorHelperImx219 : public CameraSensorHelper\n>  {\n>  public:\n> @@ -354,6 +374,17 @@ public:\n>  };\n>  REGISTER_CAMERA_SENSOR_HELPER(\"imx258\", CameraSensorHelperImx258)\n>\n> +class CameraSensorHelperImx290 : public CameraSensorHelper\n> +{\n> +public:\n> +\tCameraSensorHelperImx290()\n> +\t{\n> +\t\tgainType_ = AnalogueGainExponential;\n> +\t\tgainConstants_.exp = { 1.0, expGainDb(0.3) };\n> +\t}\n> +};\n> +REGISTER_CAMERA_SENSOR_HELPER(\"imx290\", CameraSensorHelperImx290)\n> +\n>  class CameraSensorHelperOv2740 : public CameraSensorHelper\n>  {\n>  public:\n> --\n> Regards,\n>\n> Laurent Pinchart\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 535B3C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Mar 2022 13:52:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B8644601F5;\n\tMon, 28 Mar 2022 15:52:21 +0200 (CEST)","from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3978E60135\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Mar 2022 15:52:20 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id C6F7220001D;\n\tMon, 28 Mar 2022 13:52:19 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648475541;\n\tbh=dLy5OfxOZuKfCADUY2H0ZWF/9SQENBPSL/HnYei2w7I=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=vuDrIB7bkZYmieZVqChMLDZVL1HniO+zZEurm81691XLquPnTxj9vQPnIJvXt48/y\n\tgTAI06kPtHyio7Ro7DeN3DDiNPiHXiu5wOrv7dtoPafF8XB+SsxTX+XrR9zjp2o29S\n\taOPttQyK/DC08S4rUTt7eBKmsYfh5kOQDwQzV0KWfDXqsCjmKQPWGjATnuyWvTSQcs\n\tqFe2fAAgtcVYD+G7UUN3tcMzDYOahXdECLQTanvQiopZ+p1As+5Q1EVwu0ZYxNWKex\n\tCYUb/AEP5xs0hGeuOlcgIrPf1ZK0cO6JCjE7AaxCc8c1y0nf64x0b0Bjku4/tK1Z7n\n\tm93aEGMe6ZqBQ==","Date":"Mon, 28 Mar 2022 15:52:18 +0200","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220328135218.az7d7aitj7xmusx3@uno.localdomain>","References":"<20220328120336.10834-1-laurent.pinchart@ideasonboard.com>\n\t<20220328120336.10834-4-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220328120336.10834-4-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 3/4] libipa: camera_sensor_helper: Add\n\tIMX290 helper","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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22490,"web_url":"https://patchwork.libcamera.org/comment/22490/","msgid":"<YkHf0wMS2ZelMILC@pendragon.ideasonboard.com>","date":"2022-03-28T16:18:27","subject":"Re: [libcamera-devel] [PATCH 3/4] libipa: camera_sensor_helper: Add\n\tIMX290 helper","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Mon, Mar 28, 2022 at 03:52:18PM +0200, Jacopo Mondi wrote:\n> On Mon, Mar 28, 2022 at 03:03:35PM +0300, Laurent Pinchart via libcamera-devel wrote:\n> > The IMX290 is a Sony sensor that expresses its gain in 0.3dB units. It\n> > thus maps to the exponential gain model.\n> >\n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  src/ipa/libipa/camera_sensor_helper.cpp | 31 +++++++++++++++++++++++++\n> >  1 file changed, 31 insertions(+)\n> >\n> > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> > index 7bb999e19102..136b9f6bc3c5 100644\n> > --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> > +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> > @@ -332,6 +332,26 @@ std::vector<CameraSensorHelperFactory *> &CameraSensorHelperFactory::factories()\n> >\n> >  #ifndef __DOXYGEN__\n> >\n> > +/*\n> > + * Helper function to compute the m parameter of the exponential gain model\n> > + * when the gain code is expressed in dB.\n> > + */\n> > +static constexpr double expGainDb(double step)\n> > +{\n> > +\tconstexpr double log2_10 = 3.321928094887362;\n> > +\n> > +\t/*\n> > +\t * The gain code is expressed in step * dB (e.g. in 0.1 dB steps):\n> > +\t *\n> > +\t * G_code = G_dB/step = 20/step*log10(G_linear)\n> \n> Why was I expecting\n>                                 10/step*log10(G_linear)\n> \n> As my understanding is that\n> \n>                 G_db = 10*log10(G_linear) ?\n\nThe joys of dB as a power ratio or an amplitude ratio :-) Here the\nlinear gain is an amplitude gain, so G_dB = 20*log10(G_linear). Quoting\nhttps://en.wikipedia.org/wiki/Decibel,\n\n\"Two principal types of scaling of the decibel are in common use. When\nexpressing a power ratio, it is defined as ten times the logarithm in\nbase 10.[5] That is, a change in power by a factor of 10 corresponds to\na 10 dB change in level. When expressing root-power quantities, a change\nin amplitude by a factor of 10 corresponds to a 20 dB change in level.\nThe decibel scales differ by a factor of two, so that the related power\nand root-power levels change by the same value in linear systems, where\npower is proportional to the square of amplitude.\"\n\nA 20dB increment will multiple the amplitude by 10 and the power by 100.\n\n> (nit: isn't it more readable with spaces between operands ?)\n\nI can add spaces. The line below may get long though:\n\n\t * G_linear = 10 ^ (step / 20 * G_code) = 2 ^ (log2(10) * step / 20 * G_code)\n\nWhat do you prefer ? I can also switch to Latex notation:\n\n\t * G_{linear} = 10^{frac{step*G_{code}}{20}} = 2^{log_{2}(10) * frac{step*G_{code}}{20}}\n\nbut that's likely not better :-)\n\n> > +\t *\n> > +\t * Inverting the formula, we get\n> > +\t *\n> > +\t * G_linear = 10^(step/20*G_code) = 2^(log2(10)*step/20*G_code)\n> > +\t */\n> > +\treturn log2_10 * step / 20;\n> > +}\n> > +\n> >  class CameraSensorHelperImx219 : public CameraSensorHelper\n> >  {\n> >  public:\n> > @@ -354,6 +374,17 @@ public:\n> >  };\n> >  REGISTER_CAMERA_SENSOR_HELPER(\"imx258\", CameraSensorHelperImx258)\n> >\n> > +class CameraSensorHelperImx290 : public CameraSensorHelper\n> > +{\n> > +public:\n> > +\tCameraSensorHelperImx290()\n> > +\t{\n> > +\t\tgainType_ = AnalogueGainExponential;\n> > +\t\tgainConstants_.exp = { 1.0, expGainDb(0.3) };\n> > +\t}\n> > +};\n> > +REGISTER_CAMERA_SENSOR_HELPER(\"imx290\", CameraSensorHelperImx290)\n> > +\n> >  class CameraSensorHelperOv2740 : public CameraSensorHelper\n> >  {\n> >  public:","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 4C00BC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Mar 2022 16:18:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B37A165631;\n\tMon, 28 Mar 2022 18:18:30 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9E2D860135\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Mar 2022 18:18:29 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 035872F7;\n\tMon, 28 Mar 2022 18:18:28 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648484310;\n\tbh=wx1Il5d0UhtNtLtICgOTSQ+hJb597PmmI/McJhL0XR0=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=wLKIrp+kOjE22P7LgaNC2/+lAxl9dfLQEA91Uh0uzDw3SG0DbSnAT8lgtJmFB1kFl\n\t7Ger4ysYcXf5xZZwgyzI5prSGFD1xlEw2h0kVjnX0orpAz2S8Y+ms8votrfVAhhh+t\n\tmDLFsIS6l78HTyTZ0hW36Gi1PGJbJ80u7ZOSKMdkPmrjSHPHEork6xgroPdgD/6YZa\n\t6kk/v3rAeOMrwjEzb7P+IfPQC60hYqh04QLkmQCla+s0LxXjqU/MYG5UrLVujDwuRI\n\tvjk3l+k+2/fdx0UVzeGEQHCNz46/1w/5jOTnaLG3Ehxg/nURIbnrAyBnBQSIPe85EW\n\t6MpddVcAvdqcA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648484309;\n\tbh=wx1Il5d0UhtNtLtICgOTSQ+hJb597PmmI/McJhL0XR0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=VI8f4naWtfx+sbxr8kKm5uDLgDCLzoevz+/085InsPqIQSP02DGFIybwRxAsCvtGB\n\ta8yQNFHAZbpiSLwhnFO3CKso0P0pUCUJM4L622xFIs30dhBa5vCtZG5n3wcubVex0q\n\tALUPsGgHpnasRvl+8UTmaoaPpbHbA9GjOQdHTHJ4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"VI8f4naW\"; dkim-atps=neutral","Date":"Mon, 28 Mar 2022 19:18:27 +0300","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YkHf0wMS2ZelMILC@pendragon.ideasonboard.com>","References":"<20220328120336.10834-1-laurent.pinchart@ideasonboard.com>\n\t<20220328120336.10834-4-laurent.pinchart@ideasonboard.com>\n\t<20220328135218.az7d7aitj7xmusx3@uno.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220328135218.az7d7aitj7xmusx3@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH 3/4] libipa: camera_sensor_helper: Add\n\tIMX290 helper","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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@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>"}},{"id":22492,"web_url":"https://patchwork.libcamera.org/comment/22492/","msgid":"<20220328162820.qek4s4gbdqhaujjp@uno.localdomain>","date":"2022-03-28T16:28:20","subject":"Re: [libcamera-devel] [PATCH 3/4] libipa: camera_sensor_helper: Add\n\tIMX290 helper","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent\n\nOn Mon, Mar 28, 2022 at 07:18:27PM +0300, Laurent Pinchart wrote:\n> Hi Jacopo,\n>\n> On Mon, Mar 28, 2022 at 03:52:18PM +0200, Jacopo Mondi wrote:\n> > On Mon, Mar 28, 2022 at 03:03:35PM +0300, Laurent Pinchart via libcamera-devel wrote:\n> > > The IMX290 is a Sony sensor that expresses its gain in 0.3dB units. It\n> > > thus maps to the exponential gain model.\n> > >\n> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > ---\n> > >  src/ipa/libipa/camera_sensor_helper.cpp | 31 +++++++++++++++++++++++++\n> > >  1 file changed, 31 insertions(+)\n> > >\n> > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> > > index 7bb999e19102..136b9f6bc3c5 100644\n> > > --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> > > +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> > > @@ -332,6 +332,26 @@ std::vector<CameraSensorHelperFactory *> &CameraSensorHelperFactory::factories()\n> > >\n> > >  #ifndef __DOXYGEN__\n> > >\n> > > +/*\n> > > + * Helper function to compute the m parameter of the exponential gain model\n> > > + * when the gain code is expressed in dB.\n> > > + */\n> > > +static constexpr double expGainDb(double step)\n> > > +{\n> > > +\tconstexpr double log2_10 = 3.321928094887362;\n> > > +\n> > > +\t/*\n> > > +\t * The gain code is expressed in step * dB (e.g. in 0.1 dB steps):\n> > > +\t *\n> > > +\t * G_code = G_dB/step = 20/step*log10(G_linear)\n> >\n> > Why was I expecting\n> >                                 10/step*log10(G_linear)\n> >\n> > As my understanding is that\n> >\n> >                 G_db = 10*log10(G_linear) ?\n>\n> The joys of dB as a power ratio or an amplitude ratio :-) Here the\n> linear gain is an amplitude gain, so G_dB = 20*log10(G_linear). Quoting\n> https://en.wikipedia.org/wiki/Decibel,\n>\n> \"Two principal types of scaling of the decibel are in common use. When\n> expressing a power ratio, it is defined as ten times the logarithm in\n> base 10.[5] That is, a change in power by a factor of 10 corresponds to\n> a 10 dB change in level. When expressing root-power quantities, a change\n> in amplitude by a factor of 10 corresponds to a 20 dB change in level.\n> The decibel scales differ by a factor of two, so that the related power\n> and root-power levels change by the same value in linear systems, where\n> power is proportional to the square of amplitude.\"\n>\n> A 20dB increment will multiple the amplitude by 10 and the power by 100.\n>\n\nThanks, I was missing that part!\n\n> > (nit: isn't it more readable with spaces between operands ?)\n>\n> I can add spaces. The line below may get long though:\n>\n> \t * G_linear = 10 ^ (step / 20 * G_code) = 2 ^ (log2(10) * step / 20 * G_code)\n>\n> What do you prefer ? I can also switch to Latex notation:\n>\n> \t * G_{linear} = 10^{frac{step*G_{code}}{20}} = 2^{log_{2}(10) * frac{step*G_{code}}{20}}\n>\n> but that's likely not better :-)\n\nLikely not, yeah :)\n\nIt gets a bit longer you're right. Whatever works\n\nThanks for the clarification\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n   j\n>\n> > > +\t *\n> > > +\t * Inverting the formula, we get\n> > > +\t *\n> > > +\t * G_linear = 10^(step/20*G_code) = 2^(log2(10)*step/20*G_code)\n> > > +\t */\n> > > +\treturn log2_10 * step / 20;\n> > > +}\n> > > +\n> > >  class CameraSensorHelperImx219 : public CameraSensorHelper\n> > >  {\n> > >  public:\n> > > @@ -354,6 +374,17 @@ public:\n> > >  };\n> > >  REGISTER_CAMERA_SENSOR_HELPER(\"imx258\", CameraSensorHelperImx258)\n> > >\n> > > +class CameraSensorHelperImx290 : public CameraSensorHelper\n> > > +{\n> > > +public:\n> > > +\tCameraSensorHelperImx290()\n> > > +\t{\n> > > +\t\tgainType_ = AnalogueGainExponential;\n> > > +\t\tgainConstants_.exp = { 1.0, expGainDb(0.3) };\n> > > +\t}\n> > > +};\n> > > +REGISTER_CAMERA_SENSOR_HELPER(\"imx290\", CameraSensorHelperImx290)\n> > > +\n> > >  class CameraSensorHelperOv2740 : public CameraSensorHelper\n> > >  {\n> > >  public:\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","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 77AE7C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Mar 2022 16:28:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2EA6B65631;\n\tMon, 28 Mar 2022 18:28:23 +0200 (CEST)","from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4DCA160135\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Mar 2022 18:28:22 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id D72AAFF803;\n\tMon, 28 Mar 2022 16:28:21 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648484903;\n\tbh=Rps8QaPe34WQJ0c1JGG0umBXSihzmdqnQh/tFA67dhM=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=zZqRslMdne1WC5kSp0tlah0N2zLWB8iagrM1dsfKmnRIEVkzZ4aiggCWjNAadYv2F\n\toa7H1prRzQuvhaXK4X4MCGi8iAfdCmau35xr0Vm6vUvLjFbtYs5Zkjo2NjTaOtdpiN\n\tMLAV3RawrEYmacGDuH6RF6GfRRTx7VKiH3Vck03qUt+LUv//ZbnZ48DUXhbysG1BZv\n\tPHELXXJvrUTjliQVZp/kPuC1uvLFWYXewqPnuYzU+3v6nSWBrqsePTWWtYL/BU2RNz\n\tKyOJKiyy3u9PLW1H3Yf6DM3MKANoCC8wIKtTAH1XxWQIGUIvFelPh71OdEbD7LJG/g\n\tO1lqgAE/e+kZg==","Date":"Mon, 28 Mar 2022 18:28:20 +0200","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220328162820.qek4s4gbdqhaujjp@uno.localdomain>","References":"<20220328120336.10834-1-laurent.pinchart@ideasonboard.com>\n\t<20220328120336.10834-4-laurent.pinchart@ideasonboard.com>\n\t<20220328135218.az7d7aitj7xmusx3@uno.localdomain>\n\t<YkHf0wMS2ZelMILC@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<YkHf0wMS2ZelMILC@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 3/4] libipa: camera_sensor_helper: Add\n\tIMX290 helper","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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22527,"web_url":"https://patchwork.libcamera.org/comment/22527/","msgid":"<20220330085003.GD3237525@pyrite.rasen.tech>","date":"2022-03-30T08:50:03","subject":"Re: [libcamera-devel] [PATCH 3/4] libipa: camera_sensor_helper: Add\n\tIMX290 helper","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/people/97/","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"content":"Hi Laurent,\n\nOn Mon, Mar 28, 2022 at 03:03:35PM +0300, Laurent Pinchart via libcamera-devel wrote:\n> The IMX290 is a Sony sensor that expresses its gain in 0.3dB units. It\n> thus maps to the exponential gain model.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/ipa/libipa/camera_sensor_helper.cpp | 31 +++++++++++++++++++++++++\n>  1 file changed, 31 insertions(+)\n> \n> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> index 7bb999e19102..136b9f6bc3c5 100644\n> --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> @@ -332,6 +332,26 @@ std::vector<CameraSensorHelperFactory *> &CameraSensorHelperFactory::factories()\n>  \n>  #ifndef __DOXYGEN__\n>  \n> +/*\n> + * Helper function to compute the m parameter of the exponential gain model\n> + * when the gain code is expressed in dB.\n> + */\n> +static constexpr double expGainDb(double step)\n> +{\n> +\tconstexpr double log2_10 = 3.321928094887362;\n> +\n> +\t/*\n> +\t * The gain code is expressed in step * dB (e.g. in 0.1 dB steps):\n> +\t *\n> +\t * G_code = G_dB/step = 20/step*log10(G_linear)\n> +\t *\n> +\t * Inverting the formula, we get\n> +\t *\n> +\t * G_linear = 10^(step/20*G_code) = 2^(log2(10)*step/20*G_code)\n> +\t */\n> +\treturn log2_10 * step / 20;\n> +}\n> +\n\nWould this be better in a separate patch?\n\n>  class CameraSensorHelperImx219 : public CameraSensorHelper\n>  {\n>  public:\n> @@ -354,6 +374,17 @@ public:\n>  };\n>  REGISTER_CAMERA_SENSOR_HELPER(\"imx258\", CameraSensorHelperImx258)\n>  \n> +class CameraSensorHelperImx290 : public CameraSensorHelper\n> +{\n> +public:\n> +\tCameraSensorHelperImx290()\n> +\t{\n> +\t\tgainType_ = AnalogueGainExponential;\n> +\t\tgainConstants_.exp = { 1.0, expGainDb(0.3) };\n> +\t}\n> +};\n> +REGISTER_CAMERA_SENSOR_HELPER(\"imx290\", CameraSensorHelperImx290)\n> +\n>  class CameraSensorHelperOv2740 : public CameraSensorHelper\n>  {\n>  public:\n> -- \n\nThe rest looks good.\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>","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 D4378C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 30 Mar 2022 08:50:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CF7F965635;\n\tWed, 30 Mar 2022 10:50:12 +0200 (CEST)","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 2120B60397\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 30 Mar 2022 10:50:11 +0200 (CEST)","from pyrite.rasen.tech (h175-177-042-148.catv02.itscom.jp\n\t[175.177.42.148])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id ABEBB59D;\n\tWed, 30 Mar 2022 10:50:09 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648630212;\n\tbh=WbSWpfGKPEgrrU0wLv0ANgICNIQB25OdDwsy1OoEH9c=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=dyCABbOgRw5Mcdw3aNT3VoHsihnsSeJ/gPcAvHgK2ibqlP+0pKKdKfRm9VFn3CB/9\n\tlIFTtvOST2cbi4+JiqLBQ3KPU9rlhgsT6DrBahqvNLVPezskabGYq4PTJWGGLGIWuP\n\tVjXqG54qLN5FPdnZL+QRGShMjxaPcD/6bVMhdap+1hO+KmZcBQODbys6XXx5vmUkFK\n\tuiUc7ruCbva9FBkFjCnXInxjpLGxDL9aNCxmRP7/iPZz1QE0lyvHK9ek4Y4bg7YlmG\n\tkPWDggJKqkNgAOcWOEyKvAbauImx2kL3iCDzzYABeO5c7IUwbeRkuWoWSmHbrj3BRQ\n\t++ohE+LED86Ew==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648630210;\n\tbh=WbSWpfGKPEgrrU0wLv0ANgICNIQB25OdDwsy1OoEH9c=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Evn64XWrM4OwqoKW0CPtVRGir3NydWZsJ7uby/F6MW4mcC6NO3hNKWgwqtEnYaIbi\n\tpQkAVdKl71zla/q3j5x9daUbrbZEHgCNaqBLAG5NIja45gbMbhhCsJ0h4yam+oKUAe\n\tiOg7i0enRSMo4vTcBjmUP7b2AWCARY69oedmSuA8="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Evn64XWr\"; dkim-atps=neutral","Date":"Wed, 30 Mar 2022 17:50:03 +0900","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220330085003.GD3237525@pyrite.rasen.tech>","References":"<20220328120336.10834-1-laurent.pinchart@ideasonboard.com>\n\t<20220328120336.10834-4-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20220328120336.10834-4-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 3/4] libipa: camera_sensor_helper: Add\n\tIMX290 helper","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":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"paul.elder@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>"}},{"id":22528,"web_url":"https://patchwork.libcamera.org/comment/22528/","msgid":"<2af83051-c614-7239-8339-50bef9b89763@ideasonboard.com>","date":"2022-03-30T09:04:34","subject":"Re: [libcamera-devel] [PATCH 3/4] libipa: camera_sensor_helper: Add\n\tIMX290 helper","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hello,\n\nOn 3/28/22 17:33, Laurent Pinchart via libcamera-devel wrote:\n> The IMX290 is a Sony sensor that expresses its gain in 0.3dB units. It\n> thus maps to the exponential gain model.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n> ---\n>   src/ipa/libipa/camera_sensor_helper.cpp | 31 +++++++++++++++++++++++++\n>   1 file changed, 31 insertions(+)\n>\n> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> index 7bb999e19102..136b9f6bc3c5 100644\n> --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> @@ -332,6 +332,26 @@ std::vector<CameraSensorHelperFactory *> &CameraSensorHelperFactory::factories()\n>   \n>   #ifndef __DOXYGEN__\n>   \n> +/*\n> + * Helper function to compute the m parameter of the exponential gain model\n> + * when the gain code is expressed in dB.\n> + */\n> +static constexpr double expGainDb(double step)\n> +{\n> +\tconstexpr double log2_10 = 3.321928094887362;\n> +\n> +\t/*\n> +\t * The gain code is expressed in step * dB (e.g. in 0.1 dB steps):\n> +\t *\n> +\t * G_code = G_dB/step = 20/step*log10(G_linear)\n> +\t *\n> +\t * Inverting the formula, we get\n> +\t *\n> +\t * G_linear = 10^(step/20*G_code) = 2^(log2(10)*step/20*G_code)\n> +\t */\n> +\treturn log2_10 * step / 20;\n> +}\n> +\n>   class CameraSensorHelperImx219 : public CameraSensorHelper\n>   {\n>   public:\n> @@ -354,6 +374,17 @@ public:\n>   };\n>   REGISTER_CAMERA_SENSOR_HELPER(\"imx258\", CameraSensorHelperImx258)\n>   \n> +class CameraSensorHelperImx290 : public CameraSensorHelper\n> +{\n> +public:\n> +\tCameraSensorHelperImx290()\n> +\t{\n> +\t\tgainType_ = AnalogueGainExponential;\n> +\t\tgainConstants_.exp = { 1.0, expGainDb(0.3) };\n> +\t}\n> +};\n> +REGISTER_CAMERA_SENSOR_HELPER(\"imx290\", CameraSensorHelperImx290)\n> +\n>   class CameraSensorHelperOv2740 : public CameraSensorHelper\n>   {\n>   public:","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 0B046C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 30 Mar 2022 09:04:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5850D65634;\n\tWed, 30 Mar 2022 11:04:45 +0200 (CEST)","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 1D62760397\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 30 Mar 2022 11:04:44 +0200 (CEST)","from [192.168.1.105] (unknown [103.74.73.208])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A189459D;\n\tWed, 30 Mar 2022 11:04:41 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648631085;\n\tbh=A9EY9dYdFbfDAm95sFJ7YAhBShLCWKjTTD65c8XBMDg=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=nPrpM8B3l/WJSqbOrCDvZyQszWw89MWpKJJS1BqczrZBeTAZ4MDLeNCQfEwQeimwq\n\tgV7bWuGu+q43V7g+h9A07fEzmuad7slspFaI11gVNlCkOiTSJpRioP7E39b8r6WizB\n\tU1NFeec43BeyIuF40r9Z1g6hfSWLMayDOVRB61u7aND8v6wWBIKfjL6GYY58eFpqQx\n\tiC/CyXudCBUNa37sWL+B2YQ4yAqeb7l1DiprQFE5/6xGaAs46Mo4wpnfpbfteTQYPB\n\tDmBkV/5lTmFoViIFJscn1dlKSdGpiL5gbdrG6DPFfDoG8wr7zU58Yi7q2F1SHdIGSo\n\teV4S0FqrA5bKw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648631083;\n\tbh=A9EY9dYdFbfDAm95sFJ7YAhBShLCWKjTTD65c8XBMDg=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=F4g3WUIDs9xpIHJ79bUVXmap+A4ICvjhS96EmkeovxHcJv3EjdCKKemHCCajYU44N\n\tRmHAGcIPdxAsW+5NKkPXUEyV3AWfjEhPqJOmiryFNq68x0w4VQlmUeHSqI98l92JW2\n\tQMlDxF7ihkSzXy7ePOjwPepZFUOp3n52mmXNt6pc="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"F4g3WUID\"; dkim-atps=neutral","Message-ID":"<2af83051-c614-7239-8339-50bef9b89763@ideasonboard.com>","Date":"Wed, 30 Mar 2022 14:34:34 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.4.1","Content-Language":"en-US","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20220328120336.10834-1-laurent.pinchart@ideasonboard.com>\n\t<20220328120336.10834-4-laurent.pinchart@ideasonboard.com>","In-Reply-To":"<20220328120336.10834-4-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 3/4] libipa: camera_sensor_helper: Add\n\tIMX290 helper","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":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22545,"web_url":"https://patchwork.libcamera.org/comment/22545/","msgid":"<YkbmfMSZhfHUTBq4@pendragon.ideasonboard.com>","date":"2022-04-01T11:48:12","subject":"Re: [libcamera-devel] [PATCH 3/4] libipa: camera_sensor_helper: Add\n\tIMX290 helper","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nOn Wed, Mar 30, 2022 at 05:50:03PM +0900, paul.elder@ideasonboard.com wrote:\n> On Mon, Mar 28, 2022 at 03:03:35PM +0300, Laurent Pinchart via libcamera-devel wrote:\n> > The IMX290 is a Sony sensor that expresses its gain in 0.3dB units. It\n> > thus maps to the exponential gain model.\n> > \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  src/ipa/libipa/camera_sensor_helper.cpp | 31 +++++++++++++++++++++++++\n> >  1 file changed, 31 insertions(+)\n> > \n> > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> > index 7bb999e19102..136b9f6bc3c5 100644\n> > --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> > +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> > @@ -332,6 +332,26 @@ std::vector<CameraSensorHelperFactory *> &CameraSensorHelperFactory::factories()\n> >  \n> >  #ifndef __DOXYGEN__\n> >  \n> > +/*\n> > + * Helper function to compute the m parameter of the exponential gain model\n> > + * when the gain code is expressed in dB.\n> > + */\n> > +static constexpr double expGainDb(double step)\n> > +{\n> > +\tconstexpr double log2_10 = 3.321928094887362;\n> > +\n> > +\t/*\n> > +\t * The gain code is expressed in step * dB (e.g. in 0.1 dB steps):\n> > +\t *\n> > +\t * G_code = G_dB/step = 20/step*log10(G_linear)\n> > +\t *\n> > +\t * Inverting the formula, we get\n> > +\t *\n> > +\t * G_linear = 10^(step/20*G_code) = 2^(log2(10)*step/20*G_code)\n> > +\t */\n> > +\treturn log2_10 * step / 20;\n> > +}\n> > +\n> \n> Would this be better in a separate patch?\n\nI've thought about it, but the compiler then warns that the function is\nunused. It could be worked around by adding a [[maybe_unused]] and then\ndropping it in the next patch, but I didn't think it was worth it.\n\n> >  class CameraSensorHelperImx219 : public CameraSensorHelper\n> >  {\n> >  public:\n> > @@ -354,6 +374,17 @@ public:\n> >  };\n> >  REGISTER_CAMERA_SENSOR_HELPER(\"imx258\", CameraSensorHelperImx258)\n> >  \n> > +class CameraSensorHelperImx290 : public CameraSensorHelper\n> > +{\n> > +public:\n> > +\tCameraSensorHelperImx290()\n> > +\t{\n> > +\t\tgainType_ = AnalogueGainExponential;\n> > +\t\tgainConstants_.exp = { 1.0, expGainDb(0.3) };\n> > +\t}\n> > +};\n> > +REGISTER_CAMERA_SENSOR_HELPER(\"imx290\", CameraSensorHelperImx290)\n> > +\n> >  class CameraSensorHelperOv2740 : public CameraSensorHelper\n> >  {\n> >  public:\n> > -- \n> \n> The rest looks good.\n> \n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>","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 64601C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  1 Apr 2022 11:48:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0BE1165636;\n\tFri,  1 Apr 2022 13:48:17 +0200 (CEST)","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 E8CAD65636\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  1 Apr 2022 13:48:14 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 517D9486;\n\tFri,  1 Apr 2022 13:48:14 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648813697;\n\tbh=a4Nidds9qCXtTIuC/vaU2BNGqd5GVf/YbdQ+4v20FAE=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=mBJ1ePHW7RzdcBZ9LnS9Jn6FjGzblvJuI81GK8RkWwNz034Ks5WfsmBmsllyCr6Fk\n\tina6ZGVMxPB7mOrdaCfGFCP3dbCNgbEPzEWi78YaGbR0QYH2ism6ZIMg3fgZA1IcsH\n\tjcNWzAT6fiJ7K0VsccKp2Oz6jY9yacFtkdRsItnpH5wp5gtFY3BBu0BU/fjNOVZlD+\n\tdxfuCsQGoyLzBJ7z7wziX/p6Ey9FyRBhBprRRRCF2rtQetOkG4t6GHkDbTeFjdlyuu\n\tt9jdZGNwCXXKk/ZSrIzdGUKMt53uK8gZoUqNSSf/EWc55FvE+TORQBFxeepTYxEphZ\n\trfauTMFhqK+nw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648813694;\n\tbh=a4Nidds9qCXtTIuC/vaU2BNGqd5GVf/YbdQ+4v20FAE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=KbgGrLHYfgltoyrkxdeazd1rBi1u6nkSFB35LT58ryGO/X8/Ub33sCWuPwrilf6sF\n\tCzvova/wOU+hy9HLic3l6kymwGGhMEfg5a5iLRaDNjib/t5Tbobya0LzeUHamrWOJX\n\tfqACKBom8odZu68dpaxIohliOsOZ2c50RbO7AN/c="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"KbgGrLHY\"; dkim-atps=neutral","Date":"Fri, 1 Apr 2022 14:48:12 +0300","To":"paul.elder@ideasonboard.com","Message-ID":"<YkbmfMSZhfHUTBq4@pendragon.ideasonboard.com>","References":"<20220328120336.10834-1-laurent.pinchart@ideasonboard.com>\n\t<20220328120336.10834-4-laurent.pinchart@ideasonboard.com>\n\t<20220330085003.GD3237525@pyrite.rasen.tech>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220330085003.GD3237525@pyrite.rasen.tech>","Subject":"Re: [libcamera-devel] [PATCH 3/4] libipa: camera_sensor_helper: Add\n\tIMX290 helper","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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@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>"}}]