[{"id":17936,"web_url":"https://patchwork.libcamera.org/comment/17936/","msgid":"<432311d7-73be-3592-1c1e-5b1fd879de1b@ideasonboard.com>","date":"2021-06-30T11:26:19","subject":"Re: [libcamera-devel] [PATCH] libipa: Add CameraSensorHelper for\n\tOV13858","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"content":"Hi Kieran,\n\nThanks for the patch.\n\nOn 30/06/2021 13:21, Kieran Bingham wrote:\n> Extend the CameraSensorHelper factory with support for an\n> OV13858 sensor as found in the Soraka Chromebook.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  src/ipa/libipa/camera_sensor_helper.cpp | 14 ++++++++++++++\n>  1 file changed, 14 insertions(+)\n> \n> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> index 23335ed66b02..8e95b8b10102 100644\n> --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> @@ -313,6 +313,20 @@ public:\n>  };\n>  REGISTER_CAMERA_SENSOR_HELPER(\"ov5693\", CameraSensorHelperOv5693)\n>  \n> +/**\n> + * \\class CameraSensorHelperOv13858\n> + * \\brief Create and give helpers for the ov13858 sensor\n> + */\n\nAs proposed by Laurent, I have a patch which (among other things)\nremoves the Doxygen comments for the sub-classes as it is not really\nneeded: https://patchwork.libcamera.org/patch/12736/\n\n> +class CameraSensorHelperOv13858 : public CameraSensorHelper\n> +{\n> +public:\n> +\tCameraSensorHelperOv13858()\n> +\t{\n> +\t\tanalogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 256 };\n\nThis is based on minimum, maximum and step value, as you don't have the\ndatasheet...\nThat's something we should be thinking about: how to be sure of the\nvalues when we don't have the datasheet.\nA tuning code which would set the gains from min to max and compare the\nraw pixel values from one gain to another to deduce a linear (or not)\nrelationship ?\n\n> +\t}\n> +};\n> +REGISTER_CAMERA_SENSOR_HELPER(\"ov13858\", CameraSensorHelperOv13858)\n> +\n>  } /* namespace ipa */\n>  \n>  } /* namespace libcamera */\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 EFB92C321F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 30 Jun 2021 11:26:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4421A684E7;\n\tWed, 30 Jun 2021 13:26:24 +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 EC7AC6028E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 30 Jun 2021 13:26:22 +0200 (CEST)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:8a62:dd5b:bda6:3683])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 817153F2;\n\tWed, 30 Jun 2021 13:26:22 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Mha8RScQ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1625052382;\n\tbh=v6gMvwe2KQ3eqDqiZ2VfBqQRH+mOkIf9OJUiWy+u1No=;\n\th=Subject:To:References:From:Date:In-Reply-To:From;\n\tb=Mha8RScQOVT9xQh0bjvN5HUP4yMFudrWlnmSF0h9kZJ11kRIHZDiwL9BXO/SXaRJ1\n\tBOFgALpf0UG7HeSyx/h2HvazdvvCQmPCUnQnoKMNqWtL+Op+52F9cdUafENCGx4i8e\n\tmV9bIoCPzgp6clH/t8JHG6yPVV3VzdKVrRURP5r4=","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","References":"<20210630112126.2263641-1-kieran.bingham@ideasonboard.com>","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<432311d7-73be-3592-1c1e-5b1fd879de1b@ideasonboard.com>","Date":"Wed, 30 Jun 2021 13:26:19 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<20210630112126.2263641-1-kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] libipa: Add CameraSensorHelper for\n\tOV13858","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":17937,"web_url":"https://patchwork.libcamera.org/comment/17937/","msgid":"<CAPY8ntCoBmAQ8Tf_GfzLauajPw5xkm3V3eWCr4Dyr1_qkqyhWw@mail.gmail.com>","date":"2021-06-30T12:57:12","subject":"Re: [libcamera-devel] [PATCH] libipa: Add CameraSensorHelper for\n\tOV13858","submitter":{"id":27,"url":"https://patchwork.libcamera.org/api/people/27/","name":"Dave Stevenson","email":"dave.stevenson@raspberrypi.com"},"content":"On Wed, 30 Jun 2021 at 12:26, Jean-Michel Hautbois\n<jeanmichel.hautbois@ideasonboard.com> wrote:\n>\n> Hi Kieran,\n>\n> Thanks for the patch.\n>\n> On 30/06/2021 13:21, Kieran Bingham wrote:\n> > Extend the CameraSensorHelper factory with support for an\n> > OV13858 sensor as found in the Soraka Chromebook.\n> >\n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > ---\n> >  src/ipa/libipa/camera_sensor_helper.cpp | 14 ++++++++++++++\n> >  1 file changed, 14 insertions(+)\n> >\n> > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> > index 23335ed66b02..8e95b8b10102 100644\n> > --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> > +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> > @@ -313,6 +313,20 @@ public:\n> >  };\n> >  REGISTER_CAMERA_SENSOR_HELPER(\"ov5693\", CameraSensorHelperOv5693)\n> >\n> > +/**\n> > + * \\class CameraSensorHelperOv13858\n> > + * \\brief Create and give helpers for the ov13858 sensor\n> > + */\n>\n> As proposed by Laurent, I have a patch which (among other things)\n> removes the Doxygen comments for the sub-classes as it is not really\n> needed: https://patchwork.libcamera.org/patch/12736/\n>\n> > +class CameraSensorHelperOv13858 : public CameraSensorHelper\n> > +{\n> > +public:\n> > +     CameraSensorHelperOv13858()\n> > +     {\n> > +             analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 256 };\n>\n> This is based on minimum, maximum and step value, as you don't have the\n> datasheet...\n\nOV13850 appears to be a very similar 10bit 4224x3136 sensor, and there\nis a datasheet online at\nhttp://download.t-firefly.com/product/RK3288/Docs/Peripherals/OV13850%20datasheet/Sensor_OV13850-G04A_OmniVision_SpecificationV1.pdf\n\nIt matches the driver with analogue gain being registers 0x3508/9, and\nconfirms that the \"Low 4 bits are fraction bits which are not\nsupported and should always be 0\".\nIt's making some assumptions, but seems a reasonable match.\n\n Dave\n\n> That's something we should be thinking about: how to be sure of the\n> values when we don't have the datasheet.\n> A tuning code which would set the gains from min to max and compare the\n> raw pixel values from one gain to another to deduce a linear (or not)\n> relationship ?\n>\n> > +     }\n> > +};\n> > +REGISTER_CAMERA_SENSOR_HELPER(\"ov13858\", CameraSensorHelperOv13858)\n> > +\n> >  } /* namespace ipa */\n> >\n> >  } /* namespace libcamera */\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 4234BC321F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 30 Jun 2021 12:57:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8D850684E7;\n\tWed, 30 Jun 2021 14:57:30 +0200 (CEST)","from mail-wr1-x432.google.com (mail-wr1-x432.google.com\n\t[IPv6:2a00:1450:4864:20::432])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D77066029E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 30 Jun 2021 14:57:28 +0200 (CEST)","by mail-wr1-x432.google.com with SMTP id u8so3506947wrq.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 30 Jun 2021 05:57:28 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"RNgevTRf\"; 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=sArQki/Pa+7g0zE9iRQpErJIyoFlOIbVNxt48KmdRqQ=;\n\tb=RNgevTRf6jbWGcOxqd0DCljC+MFw465wqnf+uJ3E5zyo9szEZYLz2NPg87vj82e9gg\n\tmYeG9NS/DB8IMFYAlnlxDhaK5IPJenv6K/DaSF9XMO/ss1yuCzdp397Xsr+mn3oPd8KF\n\tSYXuOdf8kxdKj8XA1VtOAw+hY5h6QfEieAHQxTTyxJ9ioUV2YW0zLtJ082jkQlxf91uD\n\tS+Cu5y2K4Hjm0c6G/GfMtoUkQVhycZ1746QA1p4TR4wHJFJ67ttr0ksBWgnhoHElOx2a\n\te2/pU5ko2QTvYZ9hPCDPVDMjtUHtoysSiH4faOX0CjAd49EdX1vb3cWoYUAZf3UatVqS\n\t0Wjg==","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=sArQki/Pa+7g0zE9iRQpErJIyoFlOIbVNxt48KmdRqQ=;\n\tb=lCBg5JpNedUkdJmFKuvOSjCTDYlfm24hbgKAPJb4sMy5Zu99upzeZvkzxLBdQwdd4/\n\tn2BH60lhWNqTUwuHU74Aed6lbq9iWvWFVK+CyciyhamE0mjPrB0hZynqicYJR/jwXRnt\n\t0qiJBsPdTv6X5IDP8ZD5XE4lwlmAgsLHbDHgLwoV04HI6smZCFbH0xUpnEjD8XYGnjOx\n\tvGM2jKxsKmupws2faK/Fq9wFhs54uvIkFcGq9vA6cI/m2erNJHdww/qlV+90v9xZ/6qu\n\tDPJbJIRk4y4vtLa3bWeAqur557ofEDrPh/dUe1dB9y+0UxWZPB7GqU/lN7KKylW6FCeC\n\tiHlQ==","X-Gm-Message-State":"AOAM530SbTyE7CSdoYemfB6AFu7EnjRBaQQD1W3lTF9w7CSQ1nvIxGEg\n\tYTw6Zvx1PxRGjXCKlGOVpIhd9JYE4zBABl3i+kgNnA==","X-Google-Smtp-Source":"ABdhPJziSpK46at3RyxIFI01JwVrYqz6XOesqouGhzfb5Dl5VG/2Sk35SX6iCBo2JRvD/pzqtx0JS28aHLXfQOfFFGg=","X-Received":"by 2002:a5d:548a:: with SMTP id\n\th10mr4345328wrv.273.1625057848446; \n\tWed, 30 Jun 2021 05:57:28 -0700 (PDT)","MIME-Version":"1.0","References":"<20210630112126.2263641-1-kieran.bingham@ideasonboard.com>\n\t<432311d7-73be-3592-1c1e-5b1fd879de1b@ideasonboard.com>","In-Reply-To":"<432311d7-73be-3592-1c1e-5b1fd879de1b@ideasonboard.com>","From":"Dave Stevenson <dave.stevenson@raspberrypi.com>","Date":"Wed, 30 Jun 2021 13:57:12 +0100","Message-ID":"<CAPY8ntCoBmAQ8Tf_GfzLauajPw5xkm3V3eWCr4Dyr1_qkqyhWw@mail.gmail.com>","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] libipa: Add CameraSensorHelper for\n\tOV13858","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17938,"web_url":"https://patchwork.libcamera.org/comment/17938/","msgid":"<YNxr3cT47leLZLLW@pendragon.ideasonboard.com>","date":"2021-06-30T13:04:29","subject":"Re: [libcamera-devel] [PATCH] libipa: Add CameraSensorHelper for\n\tOV13858","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Dave,\n\nOn Wed, Jun 30, 2021 at 01:57:12PM +0100, Dave Stevenson wrote:\n> On Wed, 30 Jun 2021 at 12:26, Jean-Michel Hautbois wrote:\n> > On 30/06/2021 13:21, Kieran Bingham wrote:\n> > > Extend the CameraSensorHelper factory with support for an\n> > > OV13858 sensor as found in the Soraka Chromebook.\n> > >\n> > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > > ---\n> > >  src/ipa/libipa/camera_sensor_helper.cpp | 14 ++++++++++++++\n> > >  1 file changed, 14 insertions(+)\n> > >\n> > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> > > index 23335ed66b02..8e95b8b10102 100644\n> > > --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> > > +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> > > @@ -313,6 +313,20 @@ public:\n> > >  };\n> > >  REGISTER_CAMERA_SENSOR_HELPER(\"ov5693\", CameraSensorHelperOv5693)\n> > >\n> > > +/**\n> > > + * \\class CameraSensorHelperOv13858\n> > > + * \\brief Create and give helpers for the ov13858 sensor\n> > > + */\n> >\n> > As proposed by Laurent, I have a patch which (among other things)\n> > removes the Doxygen comments for the sub-classes as it is not really\n> > needed: https://patchwork.libcamera.org/patch/12736/\n> >\n> > > +class CameraSensorHelperOv13858 : public CameraSensorHelper\n> > > +{\n> > > +public:\n> > > +     CameraSensorHelperOv13858()\n> > > +     {\n> > > +             analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 256 };\n> >\n> > This is based on minimum, maximum and step value, as you don't have the\n> > datasheet...\n> \n> OV13850 appears to be a very similar 10bit 4224x3136 sensor, and there\n> is a datasheet online at\n> http://download.t-firefly.com/product/RK3288/Docs/Peripherals/OV13850%20datasheet/Sensor_OV13850-G04A_OmniVision_SpecificationV1.pdf\n> \n> It matches the driver with analogue gain being registers 0x3508/9, and\n\nDoes it ? The OV13850 datasheet lists register 0x3509 as a control\nregister, and the manual gain is set in 0x3504/0x3505 or 0x350a/0x350b.\nIt's probably similar though.\n\n> confirms that the \"Low 4 bits are fraction bits which are not\n> supported and should always be 0\".\n> It's making some assumptions, but seems a reasonable match.\n> \n> > That's something we should be thinking about: how to be sure of the\n> > values when we don't have the datasheet.\n> > A tuning code which would set the gains from min to max and compare the\n> > raw pixel values from one gain to another to deduce a linear (or not)\n> > relationship ?\n> >\n> > > +     }\n> > > +};\n> > > +REGISTER_CAMERA_SENSOR_HELPER(\"ov13858\", CameraSensorHelperOv13858)\n> > > +\n> > >  } /* namespace ipa */\n> > >\n> > >  } /* namespace libcamera */\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 ADF90C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 30 Jun 2021 13:05:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 74A7F684EA;\n\tWed, 30 Jun 2021 15:05:09 +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 DC627684D1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 30 Jun 2021 15:05:07 +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 5F6422A3;\n\tWed, 30 Jun 2021 15:05:07 +0200 (CEST)"],"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=\"fLOuW1b4\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1625058307;\n\tbh=ApWDvLoNH4Adm/YLsfviBb0nfNOQ61gxa8NJUPViTFM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=fLOuW1b4JPtxHDVq2UCimAfS1fJB2MX+OMQQwMs2ofPPa8OFLLjlbRpBjYnMyal1o\n\tWfE/BL8mhxoa4h4zUIjC/lxrYkvio2hpYI8EaOHO2U6iE5hK8Kfy/PBOkvt0C5FNeo\n\txUczm9pNjVBFU9lQG9EFuqHqZgKzND/oIAbIeJq4=","Date":"Wed, 30 Jun 2021 16:04:29 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Dave Stevenson <dave.stevenson@raspberrypi.com>","Message-ID":"<YNxr3cT47leLZLLW@pendragon.ideasonboard.com>","References":"<20210630112126.2263641-1-kieran.bingham@ideasonboard.com>\n\t<432311d7-73be-3592-1c1e-5b1fd879de1b@ideasonboard.com>\n\t<CAPY8ntCoBmAQ8Tf_GfzLauajPw5xkm3V3eWCr4Dyr1_qkqyhWw@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAPY8ntCoBmAQ8Tf_GfzLauajPw5xkm3V3eWCr4Dyr1_qkqyhWw@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH] libipa: Add CameraSensorHelper for\n\tOV13858","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17939,"web_url":"https://patchwork.libcamera.org/comment/17939/","msgid":"<CAPY8ntB=mRfkK6xRiFw_CU2RbhYyUNd--4rW5UfXe94VuGeMRw@mail.gmail.com>","date":"2021-06-30T13:26:27","subject":"Re: [libcamera-devel] [PATCH] libipa: Add CameraSensorHelper for\n\tOV13858","submitter":{"id":27,"url":"https://patchwork.libcamera.org/api/people/27/","name":"Dave Stevenson","email":"dave.stevenson@raspberrypi.com"},"content":"Hi Laurent\n\nOn Wed, 30 Jun 2021 at 14:05, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi Dave,\n>\n> On Wed, Jun 30, 2021 at 01:57:12PM +0100, Dave Stevenson wrote:\n> > On Wed, 30 Jun 2021 at 12:26, Jean-Michel Hautbois wrote:\n> > > On 30/06/2021 13:21, Kieran Bingham wrote:\n> > > > Extend the CameraSensorHelper factory with support for an\n> > > > OV13858 sensor as found in the Soraka Chromebook.\n> > > >\n> > > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > > > ---\n> > > >  src/ipa/libipa/camera_sensor_helper.cpp | 14 ++++++++++++++\n> > > >  1 file changed, 14 insertions(+)\n> > > >\n> > > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> > > > index 23335ed66b02..8e95b8b10102 100644\n> > > > --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> > > > +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> > > > @@ -313,6 +313,20 @@ public:\n> > > >  };\n> > > >  REGISTER_CAMERA_SENSOR_HELPER(\"ov5693\", CameraSensorHelperOv5693)\n> > > >\n> > > > +/**\n> > > > + * \\class CameraSensorHelperOv13858\n> > > > + * \\brief Create and give helpers for the ov13858 sensor\n> > > > + */\n> > >\n> > > As proposed by Laurent, I have a patch which (among other things)\n> > > removes the Doxygen comments for the sub-classes as it is not really\n> > > needed: https://patchwork.libcamera.org/patch/12736/\n> > >\n> > > > +class CameraSensorHelperOv13858 : public CameraSensorHelper\n> > > > +{\n> > > > +public:\n> > > > +     CameraSensorHelperOv13858()\n> > > > +     {\n> > > > +             analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 256 };\n> > >\n> > > This is based on minimum, maximum and step value, as you don't have the\n> > > datasheet...\n> >\n> > OV13850 appears to be a very similar 10bit 4224x3136 sensor, and there\n> > is a datasheet online at\n> > http://download.t-firefly.com/product/RK3288/Docs/Peripherals/OV13850%20datasheet/Sensor_OV13850-G04A_OmniVision_SpecificationV1.pdf\n> >\n> > It matches the driver with analogue gain being registers 0x3508/9, and\n>\n> Does it ? The OV13850 datasheet lists register 0x3509 as a control\n> register, and the manual gain is set in 0x3504/0x3505 or 0x350a/0x350b.\n> It's probably similar though.\n\nDoh, that's me going cross-eyed! I'd misread exposure for gain in\nabout 3 places.\nSorry for the noise.\n\n  Dave\n\n> > confirms that the \"Low 4 bits are fraction bits which are not\n> > supported and should always be 0\".\n> > It's making some assumptions, but seems a reasonable match.\n> >\n> > > That's something we should be thinking about: how to be sure of the\n> > > values when we don't have the datasheet.\n> > > A tuning code which would set the gains from min to max and compare the\n> > > raw pixel values from one gain to another to deduce a linear (or not)\n> > > relationship ?\n> > >\n> > > > +     }\n> > > > +};\n> > > > +REGISTER_CAMERA_SENSOR_HELPER(\"ov13858\", CameraSensorHelperOv13858)\n> > > > +\n> > > >  } /* namespace ipa */\n> > > >\n> > > >  } /* namespace libcamera */\n> > > >\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 8A0A0C321F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 30 Jun 2021 13:26:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1148A684E7;\n\tWed, 30 Jun 2021 15:26:45 +0200 (CEST)","from mail-wr1-x433.google.com (mail-wr1-x433.google.com\n\t[IPv6:2a00:1450:4864:20::433])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C26436029E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 30 Jun 2021 15:26:43 +0200 (CEST)","by mail-wr1-x433.google.com with SMTP id u6so3640431wrs.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 30 Jun 2021 06:26:43 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"o5X/bqU6\"; 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=DLT5o2ikHhUCP+jtQ74L8kA1jkjFORh8lZ85/UTYbvI=;\n\tb=o5X/bqU6ELqqeAOqobifWzZ14F6iPT75MxMYvA+nDVHsvZTbFStw25AQPkvhp3Mgco\n\tww6Kv3MUeTq0GQaqu/MHo+211ZnQh6jzUoh/qLc37ihRs02Pl9FrLmDeAF0ub7qu35S8\n\t5Gduf7f/9RxchvNNvT9v0L1qAlFBGt3+ep6h58/oeaWPI72JhCa02mTJXoFM8IQB5WUX\n\tyNwPVZXZ8ZMj/Hjfsad9NNVWalOW1rM8TxpSi+MNesiIREbek4Itwo3/REMyHeKF36Kg\n\tdSDDSpCm0s/o+lL/1tZsxoKROEJrv6Cbx2mHze/8BlUrNceqmHDs7zcpP3kui5NjBZjC\n\tEFTQ==","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=DLT5o2ikHhUCP+jtQ74L8kA1jkjFORh8lZ85/UTYbvI=;\n\tb=D15vdPPmmvkYQ0HHnp+ekbZMR4tKp4nBTSQLHFjY2bVgIP6wFPDUHOpWekQ7WAHa+U\n\to9IVK8pySzEvEfRGDI1zmzU5537CjK2IjTDqWu3uFDQaNiqNcgZ9RcMbYXOp6ss5KsHv\n\tri+PiD4QX13XBimV2Ta0+XgOv575dc1QXrgof93kFSyxMNgsmCLl+zNZYDl5EqzvB/iz\n\tOaeR0rfJ6qQ+j6+NtwnBCo61zmyl0uhz3ZUEMHl+cDQ0F4hPsfn5vrOUuio4fgFlc+dj\n\t1/GGa1mgnTxVyrFcgRlZqaE6J4L57CCsmCfXWQmvMMQKaB5ohU/p8s+noheFYa/XBgf2\n\tVe0Q==","X-Gm-Message-State":"AOAM530N+XNcHmeMvo1O80Wt3OxBlPY8sRyuC5TdYdvRaXgiBIhNnoHH\n\tEdBQQzNDeYL4xVAzuDpHm2xpDcC2NsYuQvmnV3II7g==","X-Google-Smtp-Source":"ABdhPJyYM1wtft6j6F+B68MeAHYl5KIlTGL/L8Ku7//3L8iW2RBk3IgdrsunrkSBr8bKiVh0Y0kLsBEx4jh3UpDua+c=","X-Received":"by 2002:a5d:6547:: with SMTP id z7mr11233801wrv.27.1625059603489;\n\tWed, 30 Jun 2021 06:26:43 -0700 (PDT)","MIME-Version":"1.0","References":"<20210630112126.2263641-1-kieran.bingham@ideasonboard.com>\n\t<432311d7-73be-3592-1c1e-5b1fd879de1b@ideasonboard.com>\n\t<CAPY8ntCoBmAQ8Tf_GfzLauajPw5xkm3V3eWCr4Dyr1_qkqyhWw@mail.gmail.com>\n\t<YNxr3cT47leLZLLW@pendragon.ideasonboard.com>","In-Reply-To":"<YNxr3cT47leLZLLW@pendragon.ideasonboard.com>","From":"Dave Stevenson <dave.stevenson@raspberrypi.com>","Date":"Wed, 30 Jun 2021 14:26:27 +0100","Message-ID":"<CAPY8ntB=mRfkK6xRiFw_CU2RbhYyUNd--4rW5UfXe94VuGeMRw@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] libipa: Add CameraSensorHelper for\n\tOV13858","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17940,"web_url":"https://patchwork.libcamera.org/comment/17940/","msgid":"<69ce5da0-fc4a-613c-47a6-ab235d362de1@ideasonboard.com>","date":"2021-06-30T13:29:26","subject":"Re: [libcamera-devel] [PATCH] libipa: Add CameraSensorHelper for\n\tOV13858","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi JM,\n\nOn 30/06/2021 12:26, Jean-Michel Hautbois wrote:\n> Hi Kieran,\n> \n> Thanks for the patch.\n> \n> On 30/06/2021 13:21, Kieran Bingham wrote:\n>> Extend the CameraSensorHelper factory with support for an\n>> OV13858 sensor as found in the Soraka Chromebook.\n>>\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> ---\n>>  src/ipa/libipa/camera_sensor_helper.cpp | 14 ++++++++++++++\n>>  1 file changed, 14 insertions(+)\n>>\n>> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n>> index 23335ed66b02..8e95b8b10102 100644\n>> --- a/src/ipa/libipa/camera_sensor_helper.cpp\n>> +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n>> @@ -313,6 +313,20 @@ public:\n>>  };\n>>  REGISTER_CAMERA_SENSOR_HELPER(\"ov5693\", CameraSensorHelperOv5693)\n>>  \n>> +/**\n>> + * \\class CameraSensorHelperOv13858\n>> + * \\brief Create and give helpers for the ov13858 sensor\n>> + */\n> \n> As proposed by Laurent, I have a patch which (among other things)\n> removes the Doxygen comments for the sub-classes as it is not really\n> needed: https://patchwork.libcamera.org/patch/12736/\n\nYes, these comments should be removed indeed.\n\n\n>> +class CameraSensorHelperOv13858 : public CameraSensorHelper\n>> +{\n>> +public:\n>> +\tCameraSensorHelperOv13858()\n>> +\t{\n>> +\t\tanalogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 256 };\n> \n> This is based on minimum, maximum and step value, as you don't have the\n> datasheet...\n> That's something we should be thinking about: how to be sure of the\n> values when we don't have the datasheet.\n> A tuning code which would set the gains from min to max and compare the\n> raw pixel values from one gain to another to deduce a linear (or not)\n> relationship ?\n> \n\nDefinitely interesting ideas for future sensors, fortunately it sounds\nlike we can try to match this up against a 'close' data sheet - or try\nto find out if we can confirm the correct details somehow.\n\n--\nKieran\n\n\n>> +\t}\n>> +};\n>> +REGISTER_CAMERA_SENSOR_HELPER(\"ov13858\", CameraSensorHelperOv13858)\n>> +\n>>  } /* namespace ipa */\n>>  \n>>  } /* namespace libcamera */\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 5CB21C321F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 30 Jun 2021 13:29:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B7073684E7;\n\tWed, 30 Jun 2021 15:29:31 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 622926029E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 30 Jun 2021 15:29:30 +0200 (CEST)","from [192.168.0.20]\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 DD7882A3;\n\tWed, 30 Jun 2021 15:29:29 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"bklgHj8K\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1625059770;\n\tbh=sXi9QFi0tejndNPGWDmYNGZxCFHnwphKbwsMj78H0BU=;\n\th=From:To:References:Subject:Date:In-Reply-To:From;\n\tb=bklgHj8KFDs6enYSlyWq3ycUz8cIdQe38bTFJADbzB0IDiEsbXBCGKFdHx2SUfWf5\n\tE0nw2xR+um4kx2TYpsF+Ou2f6+rNTdsutkxfecdRYsh0J85s1skBaQryRNLxTc7Dq+\n\tGzCHP0RZ8pkutZ6byK0W0yiBtmyReY6s+XtCn/7k=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","References":"<20210630112126.2263641-1-kieran.bingham@ideasonboard.com>\n\t<432311d7-73be-3592-1c1e-5b1fd879de1b@ideasonboard.com>","Message-ID":"<69ce5da0-fc4a-613c-47a6-ab235d362de1@ideasonboard.com>","Date":"Wed, 30 Jun 2021 14:29:26 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<432311d7-73be-3592-1c1e-5b1fd879de1b@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] libipa: Add CameraSensorHelper for\n\tOV13858","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>"}}]