[{"id":21024,"web_url":"https://patchwork.libcamera.org/comment/21024/","msgid":"<163732047454.1089182.5151581038119864295@Monstersaurus>","date":"2021-11-19T11:14:34","subject":"Re: [libcamera-devel] [PATCH 2/2] libipa: Correct IMX219 in\n\tCameraSensorHelper","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Jean-Michel Hautbois (2021-11-19 10:25:59)\n> The equation is badly reported in the CameraSensorHelper, as m1 and c0\n> are inverted. Correct it to have a proper gain calculation.\n> \n\nI feel like this would be easier to spot if this was all constructed\nfrom a single table. But perhaps that's not as extensible in the future,\nwhich is why we've got the individual constructors.\n\nAnyway, this update matches more closely to the IMX258 now, so it looks\nbetter from that comparative perspective at least...\n\nI can't really add more value than that and I don't know what to check\nspecifically on the datasheets so\n\nAcked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> ---\n>  src/ipa/libipa/camera_sensor_helper.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> index 67cf6913..5e22f9c3 100644\n> --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> @@ -292,7 +292,7 @@ class CameraSensorHelperImx219 : public CameraSensorHelper\n>  public:\n>         CameraSensorHelperImx219()\n>         {\n> -               analogueGainConstants_ = { AnalogueGainLinear, 0, -1, 256, 256 };\n> +               analogueGainConstants_ = { AnalogueGainLinear, 0, 256, -1, 256 };\n>         }\n>  };\n>  REGISTER_CAMERA_SENSOR_HELPER(\"imx219\", CameraSensorHelperImx219)\n> -- \n> 2.32.0\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 87422BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 19 Nov 2021 11:14:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4422260233;\n\tFri, 19 Nov 2021 12:14:38 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9CA4B600B5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 19 Nov 2021 12:14:36 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5D5EB1974;\n\tFri, 19 Nov 2021 12:14:36 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"aQPwRT1p\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1637320476;\n\tbh=tV9LLElT1TlNsuumrLOjN5AVvrY+eEz4kAkcvkmB+a4=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=aQPwRT1pwguznyFcLbbK7VrO3yG43JBGLooiWunjuR9C+WGb9OArFBdOx+yCxhoFA\n\tKfFiQGwEHFukJl69CdE6TXf+3ybHmvhKWDo/BunfBmugDNNdaGxG7r4PD8tOjvJFOs\n\t1DeY771Jt08++ZDkc4A1k4+KQlCs1fDqZhugmyY0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20211119102559.56522-3-jeanmichel.hautbois@ideasonboard.com>","References":"<20211119102559.56522-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20211119102559.56522-3-jeanmichel.hautbois@ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 19 Nov 2021 11:14:34 +0000","Message-ID":"<163732047454.1089182.5151581038119864295@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH 2/2] libipa: Correct IMX219 in\n\tCameraSensorHelper","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":21036,"web_url":"https://patchwork.libcamera.org/comment/21036/","msgid":"<YZebD0pjWLv6FTTD@pendragon.ideasonboard.com>","date":"2021-11-19T12:39:43","subject":"Re: [libcamera-devel] [PATCH 2/2] libipa: Correct IMX219 in\n\tCameraSensorHelper","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Nov 19, 2021 at 11:14:34AM +0000, Kieran Bingham wrote:\n> Quoting Jean-Michel Hautbois (2021-11-19 10:25:59)\n> > The equation is badly reported in the CameraSensorHelper, as m1 and c0\n> > are inverted. Correct it to have a proper gain calculation.\n> > \n> \n> I feel like this would be easier to spot if this was all constructed\n> from a single table. But perhaps that's not as extensible in the future,\n> which is why we've got the individual constructors.\n\nAgreed, there's a bit of room for improvements in the syntax.\n\n> Anyway, this update matches more closely to the IMX258 now, so it looks\n> better from that comparative perspective at least...\n> \n> I can't really add more value than that and I don't know what to check\n> specifically on the datasheets so\n\nRegisters 0x008c to 0x0093: m0 = 0x0000, c0 = 0x0100, m1 = 0xffff,\nc1 = 0x0100.\n\n> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> > Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> > ---\n> >  src/ipa/libipa/camera_sensor_helper.cpp | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > \n> > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> > index 67cf6913..5e22f9c3 100644\n> > --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> > +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> > @@ -292,7 +292,7 @@ class CameraSensorHelperImx219 : public CameraSensorHelper\n> >  public:\n> >         CameraSensorHelperImx219()\n> >         {\n> > -               analogueGainConstants_ = { AnalogueGainLinear, 0, -1, 256, 256 };\n> > +               analogueGainConstants_ = { AnalogueGainLinear, 0, 256, -1, 256 };\n> >         }\n> >  };\n> >  REGISTER_CAMERA_SENSOR_HELPER(\"imx219\", CameraSensorHelperImx219)","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 2B4C2BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 19 Nov 2021 12:40:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8A42460371;\n\tFri, 19 Nov 2021 13:40:07 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EE819600B5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 19 Nov 2021 13:40:05 +0100 (CET)","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 635BB1959;\n\tFri, 19 Nov 2021 13:40:05 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"eiYrzpsV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1637325605;\n\tbh=QfihLxNCmrA9zMZKAZ5EN681YFr4/1rRHSuYMqXAD44=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=eiYrzpsVoWMnc++WqaXvS3heCpPh5zZcGgX/CNgh8U0CdMFsKTEOmVrrwI8nVaXnt\n\tntTwQbPhtFOCypq/Cwbg1FoQciTO00Xqn/ppAl72DsLlyQzHMgrXCHSZN2k5gkP38I\n\t929rEC5Keqg97kqi/3C+BvvXgQPvbQN5SqVnlCmk=","Date":"Fri, 19 Nov 2021 14:39:43 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YZebD0pjWLv6FTTD@pendragon.ideasonboard.com>","References":"<20211119102559.56522-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20211119102559.56522-3-jeanmichel.hautbois@ideasonboard.com>\n\t<163732047454.1089182.5151581038119864295@Monstersaurus>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<163732047454.1089182.5151581038119864295@Monstersaurus>","Subject":"Re: [libcamera-devel] [PATCH 2/2] libipa: Correct IMX219 in\n\tCameraSensorHelper","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]