[{"id":30594,"web_url":"https://patchwork.libcamera.org/comment/30594/","msgid":"<172286585424.1687952.13120645421216327569@ping.linuxembedded.co.uk>","date":"2024-08-05T13:50:54","subject":"Re: [PATCH v1 5/6] libtuning: Add initial AWB module","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Stefan Klug (2024-08-05 13:05:06)\n> This AWB modules uses the awb function from Raspberry Pi to calculate\n> the needed white balance gains per colour temperature. It stores these\n> gains in the tuning file. Currently they are only used for the manual\n> colour temperature control. It is likely that they will be used with\n> more complex awb algorithms.\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n>  .../tuning/libtuning/modules/awb/__init__.py  |  6 +++\n>  utils/tuning/libtuning/modules/awb/awb.py     | 42 +++++++++++++++++++\n>  utils/tuning/libtuning/modules/awb/rkisp1.py  | 27 ++++++++++++\n>  3 files changed, 75 insertions(+)\n>  create mode 100644 utils/tuning/libtuning/modules/awb/__init__.py\n>  create mode 100644 utils/tuning/libtuning/modules/awb/awb.py\n>  create mode 100644 utils/tuning/libtuning/modules/awb/rkisp1.py\n> \n> diff --git a/utils/tuning/libtuning/modules/awb/__init__.py b/utils/tuning/libtuning/modules/awb/__init__.py\n> new file mode 100644\n> index 000000000000..2d67f10cfc4f\n> --- /dev/null\n> +++ b/utils/tuning/libtuning/modules/awb/__init__.py\n> @@ -0,0 +1,6 @@\n> +# SPDX-License-Identifier: GPL-2.0-or-later\n> +#\n> +# Copyright (C) 2024, Ideas On Board\n> +\n> +from libtuning.modules.awb.awb import AWB\n> +from libtuning.modules.awb.rkisp1 import AWBRkISP1\n> diff --git a/utils/tuning/libtuning/modules/awb/awb.py b/utils/tuning/libtuning/modules/awb/awb.py\n> new file mode 100644\n> index 000000000000..5680a44fd3e3\n> --- /dev/null\n> +++ b/utils/tuning/libtuning/modules/awb/awb.py\n> @@ -0,0 +1,42 @@\n> +# SPDX-License-Identifier: GPL-2.0-or-later\n> +#\n> +# Copyright (C) 2024, Ideas On Board\n> +\n> +import logging\n> +\n> +from ..module import Module\n> +\n> +from libtuning.ctt_awb import awb\n> +import numpy as np\n> +\n> +logger = logging.getLogger(__name__)\n> +\n> +\n> +class AWB(Module):\n> +    type = 'awb'\n> +    hr_name = 'AWB (Base)'\n> +    out_name = 'GenericAWB'\n> +\n> +    def __init__(self, *,\n> +                 debug: list):\n> +        super().__init__()\n> +\n> +        self.debug = debug\n> +\n> +    def do_calculation(self, images):\n> +        logger.info('Starting AWB calculation')\n> +\n> +        imgs = [img for img in images if img.macbeth is not None]\n> +\n> +        gains, _, _ = awb(imgs, None, None, False)\n> +        gains = np.array(gains)\n> +        gains = gains.reshape(-1, 3)\n> +\n> +        res = []\n> +        for v in gains:\n> +            res.append({\n> +                'ct': int(v[0]),\n> +                'gains': [float(1.0 / v[1]), float(1.0 / v[2])]\n> +            })\n> +\n> +        return res\n> diff --git a/utils/tuning/libtuning/modules/awb/rkisp1.py b/utils/tuning/libtuning/modules/awb/rkisp1.py\n> new file mode 100644\n> index 000000000000..e3ddeb50c9a1\n> --- /dev/null\n> +++ b/utils/tuning/libtuning/modules/awb/rkisp1.py\n> @@ -0,0 +1,27 @@\n> +# SPDX-License-Identifier: GPL-2.0-or-later\n> +#\n> +# Copyright (C) 2024, Ideas On Board\n> +#\n> +# AWB module for tuning rkisp1\n\nI think I'm not familiar enough yet with how we're handling platform\nspecific details here.\n\nIs there anything in this that is RkISP1 specific? Or will it be ?\nIt feels like these are generic so far...\n\n> +\n> +from .awb import AWB\n> +\n> +import libtuning as lt\n> +\n> +\n> +class AWBRkISP1(AWB):\n> +    hr_name = 'AWB (RkISP1)'\n> +    out_name = 'Awb'\n> +\n> +    def __init__(self, **kwargs):\n> +        super().__init__(**kwargs)\n> +\n> +    def validate_config(self, config: dict) -> bool:\n> +        return True\n> +\n> +    def process(self, config: dict, images: list, outputs: dict) -> dict:\n> +        output = {}\n> +\n> +        output['gains'] = self.do_calculation(images)\n> +\n> +        return output\n> -- \n> 2.43.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 D41A4BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  5 Aug 2024 13:50:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1A8196337E;\n\tMon,  5 Aug 2024 15:50:59 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BAABA63369\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Aug 2024 15:50:57 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 330CB18D;\n\tMon,  5 Aug 2024 15:50:06 +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=\"awXn9T6i\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1722865806;\n\tbh=vBd3FN03+OmsFyWSyVqy+Ic3Aswh/s/Q+CGC2QxzYmE=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=awXn9T6iiJwjywPj5qvBjvJTN/BaGW1RonIx/zEcY0cAgWvrSX8SrggcwmM5hiPCq\n\tbEMmN0i8utpEuk0tgnmvQWfwHO+TN38uXaPEn4zbSR2UL4ilJ5bVUSfK0zI2FBk9p1\n\t3WyyVlsxJsP4JGQSWK0/02Vb9Yt4MyKs5s4r1wB0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240805120522.1613342-6-stefan.klug@ideasonboard.com>","References":"<20240805120522.1613342-1-stefan.klug@ideasonboard.com>\n\t<20240805120522.1613342-6-stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH v1 5/6] libtuning: Add initial AWB module","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"David Plowman <david.plowman@raspberrypi.com>,\n\tStefan Klug <stefan.klug@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 05 Aug 2024 14:50:54 +0100","Message-ID":"<172286585424.1687952.13120645421216327569@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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":30609,"web_url":"https://patchwork.libcamera.org/comment/30609/","msgid":"<xep45pmf3ewgx67yhdozwbkp4n6x32bjm6hpejaznsgusqh34v@j4mrz6g5f3ra>","date":"2024-08-06T06:53:40","subject":"Re: [PATCH v1 5/6] libtuning: Add initial AWB module","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the review. \n\nOn Mon, Aug 05, 2024 at 02:50:54PM +0100, Kieran Bingham wrote:\n> Quoting Stefan Klug (2024-08-05 13:05:06)\n> > This AWB modules uses the awb function from Raspberry Pi to calculate\n> > the needed white balance gains per colour temperature. It stores these\n> > gains in the tuning file. Currently they are only used for the manual\n> > colour temperature control. It is likely that they will be used with\n> > more complex awb algorithms.\n> > \n> > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> > ---\n> >  .../tuning/libtuning/modules/awb/__init__.py  |  6 +++\n> >  utils/tuning/libtuning/modules/awb/awb.py     | 42 +++++++++++++++++++\n> >  utils/tuning/libtuning/modules/awb/rkisp1.py  | 27 ++++++++++++\n> >  3 files changed, 75 insertions(+)\n> >  create mode 100644 utils/tuning/libtuning/modules/awb/__init__.py\n> >  create mode 100644 utils/tuning/libtuning/modules/awb/awb.py\n> >  create mode 100644 utils/tuning/libtuning/modules/awb/rkisp1.py\n> > \n> > diff --git a/utils/tuning/libtuning/modules/awb/__init__.py b/utils/tuning/libtuning/modules/awb/__init__.py\n> > new file mode 100644\n> > index 000000000000..2d67f10cfc4f\n> > --- /dev/null\n> > +++ b/utils/tuning/libtuning/modules/awb/__init__.py\n> > @@ -0,0 +1,6 @@\n> > +# SPDX-License-Identifier: GPL-2.0-or-later\n> > +#\n> > +# Copyright (C) 2024, Ideas On Board\n> > +\n> > +from libtuning.modules.awb.awb import AWB\n> > +from libtuning.modules.awb.rkisp1 import AWBRkISP1\n> > diff --git a/utils/tuning/libtuning/modules/awb/awb.py b/utils/tuning/libtuning/modules/awb/awb.py\n> > new file mode 100644\n> > index 000000000000..5680a44fd3e3\n> > --- /dev/null\n> > +++ b/utils/tuning/libtuning/modules/awb/awb.py\n> > @@ -0,0 +1,42 @@\n> > +# SPDX-License-Identifier: GPL-2.0-or-later\n> > +#\n> > +# Copyright (C) 2024, Ideas On Board\n> > +\n> > +import logging\n> > +\n> > +from ..module import Module\n> > +\n> > +from libtuning.ctt_awb import awb\n> > +import numpy as np\n> > +\n> > +logger = logging.getLogger(__name__)\n> > +\n> > +\n> > +class AWB(Module):\n> > +    type = 'awb'\n> > +    hr_name = 'AWB (Base)'\n> > +    out_name = 'GenericAWB'\n> > +\n> > +    def __init__(self, *,\n> > +                 debug: list):\n> > +        super().__init__()\n> > +\n> > +        self.debug = debug\n> > +\n> > +    def do_calculation(self, images):\n> > +        logger.info('Starting AWB calculation')\n> > +\n> > +        imgs = [img for img in images if img.macbeth is not None]\n> > +\n> > +        gains, _, _ = awb(imgs, None, None, False)\n> > +        gains = np.array(gains)\n> > +        gains = gains.reshape(-1, 3)\n> > +\n> > +        res = []\n> > +        for v in gains:\n> > +            res.append({\n> > +                'ct': int(v[0]),\n> > +                'gains': [float(1.0 / v[1]), float(1.0 / v[2])]\n> > +            })\n> > +\n> > +        return res\n> > diff --git a/utils/tuning/libtuning/modules/awb/rkisp1.py b/utils/tuning/libtuning/modules/awb/rkisp1.py\n> > new file mode 100644\n> > index 000000000000..e3ddeb50c9a1\n> > --- /dev/null\n> > +++ b/utils/tuning/libtuning/modules/awb/rkisp1.py\n> > @@ -0,0 +1,27 @@\n> > +# SPDX-License-Identifier: GPL-2.0-or-later\n> > +#\n> > +# Copyright (C) 2024, Ideas On Board\n> > +#\n> > +# AWB module for tuning rkisp1\n> \n> I think I'm not familiar enough yet with how we're handling platform\n> specific details here.\n> \n> Is there anything in this that is RkISP1 specific? Or will it be ?\n> It feels like these are generic so far... \n\nValid point. At the moment I just follow the structure that was there\nbefore. On the other hand we do not yet know exactly where we end up\n(The Raspberry Pi awb section looks quite different from this one.) So\nmaybe there is also a benefit in keeping it separate for now and to see\nwhich parts settle on a common denominator.\n\nI can merge it into one class if you like that more. Maybe Paul has an\nopinion on that.\n\nBest regards,\nStefan\n\n> > +\n> > +from .awb import AWB\n> > +\n> > +import libtuning as lt\n> > +\n> > +\n> > +class AWBRkISP1(AWB):\n> > +    hr_name = 'AWB (RkISP1)'\n> > +    out_name = 'Awb'\n> > +\n> > +    def __init__(self, **kwargs):\n> > +        super().__init__(**kwargs)\n> > +\n> > +    def validate_config(self, config: dict) -> bool:\n> > +        return True\n> > +\n> > +    def process(self, config: dict, images: list, outputs: dict) -> dict:\n> > +        output = {}\n> > +\n> > +        output['gains'] = self.do_calculation(images)\n> > +\n> > +        return output\n> > -- \n> > 2.43.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 3DA95C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  6 Aug 2024 06:53:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 55F3963394;\n\tTue,  6 Aug 2024 08:53: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 A969C63369\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  6 Aug 2024 08:53:43 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:7a68:2b6f:8265:aa72])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 93D072C5;\n\tTue,  6 Aug 2024 08:52:51 +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=\"pdtoqV1E\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1722927171;\n\tbh=DWheP5ZVAfcORUETLxq0mSOSmfzv8f50CVgZcJMUj1E=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=pdtoqV1EB647TYi8Ka/ztTEKOqh2R/MtDu72S4L/wcfZcoNyw+L2JryqKDATDHYWd\n\txzD9VaQLLRiI0PbpHBea4Ohns4PAP0yqwV2NV59aayGffrmiU7vIyFs7AbrQvNa+FY\n\tIq65K6dIfjhb4MB+f8IaBBGqbJXXB3zKnXDiIvGs=","Date":"Tue, 6 Aug 2024 08:53:40 +0200","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, \n\tDavid Plowman <david.plowman@raspberrypi.com>","Subject":"Re: [PATCH v1 5/6] libtuning: Add initial AWB module","Message-ID":"<xep45pmf3ewgx67yhdozwbkp4n6x32bjm6hpejaznsgusqh34v@j4mrz6g5f3ra>","References":"<20240805120522.1613342-1-stefan.klug@ideasonboard.com>\n\t<20240805120522.1613342-6-stefan.klug@ideasonboard.com>\n\t<172286585424.1687952.13120645421216327569@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<172286585424.1687952.13120645421216327569@ping.linuxembedded.co.uk>","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":30621,"web_url":"https://patchwork.libcamera.org/comment/30621/","msgid":"<172293461611.1687952.5954433980529746146@ping.linuxembedded.co.uk>","date":"2024-08-06T08:56:56","subject":"Re: [PATCH v1 5/6] libtuning: Add initial AWB module","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Stefan Klug (2024-08-06 07:53:40)\n> Hi Kieran,\n> \n> Thank you for the review. \n> \n> On Mon, Aug 05, 2024 at 02:50:54PM +0100, Kieran Bingham wrote:\n> > Quoting Stefan Klug (2024-08-05 13:05:06)\n> > > This AWB modules uses the awb function from Raspberry Pi to calculate\n> > > the needed white balance gains per colour temperature. It stores these\n> > > gains in the tuning file. Currently they are only used for the manual\n> > > colour temperature control. It is likely that they will be used with\n> > > more complex awb algorithms.\n> > > \n> > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> > > ---\n> > >  .../tuning/libtuning/modules/awb/__init__.py  |  6 +++\n> > >  utils/tuning/libtuning/modules/awb/awb.py     | 42 +++++++++++++++++++\n> > >  utils/tuning/libtuning/modules/awb/rkisp1.py  | 27 ++++++++++++\n> > >  3 files changed, 75 insertions(+)\n> > >  create mode 100644 utils/tuning/libtuning/modules/awb/__init__.py\n> > >  create mode 100644 utils/tuning/libtuning/modules/awb/awb.py\n> > >  create mode 100644 utils/tuning/libtuning/modules/awb/rkisp1.py\n> > > \n> > > diff --git a/utils/tuning/libtuning/modules/awb/__init__.py b/utils/tuning/libtuning/modules/awb/__init__.py\n> > > new file mode 100644\n> > > index 000000000000..2d67f10cfc4f\n> > > --- /dev/null\n> > > +++ b/utils/tuning/libtuning/modules/awb/__init__.py\n> > > @@ -0,0 +1,6 @@\n> > > +# SPDX-License-Identifier: GPL-2.0-or-later\n> > > +#\n> > > +# Copyright (C) 2024, Ideas On Board\n> > > +\n> > > +from libtuning.modules.awb.awb import AWB\n> > > +from libtuning.modules.awb.rkisp1 import AWBRkISP1\n> > > diff --git a/utils/tuning/libtuning/modules/awb/awb.py b/utils/tuning/libtuning/modules/awb/awb.py\n> > > new file mode 100644\n> > > index 000000000000..5680a44fd3e3\n> > > --- /dev/null\n> > > +++ b/utils/tuning/libtuning/modules/awb/awb.py\n> > > @@ -0,0 +1,42 @@\n> > > +# SPDX-License-Identifier: GPL-2.0-or-later\n> > > +#\n> > > +# Copyright (C) 2024, Ideas On Board\n> > > +\n> > > +import logging\n> > > +\n> > > +from ..module import Module\n> > > +\n> > > +from libtuning.ctt_awb import awb\n> > > +import numpy as np\n> > > +\n> > > +logger = logging.getLogger(__name__)\n> > > +\n> > > +\n> > > +class AWB(Module):\n> > > +    type = 'awb'\n> > > +    hr_name = 'AWB (Base)'\n> > > +    out_name = 'GenericAWB'\n> > > +\n> > > +    def __init__(self, *,\n> > > +                 debug: list):\n> > > +        super().__init__()\n> > > +\n> > > +        self.debug = debug\n> > > +\n> > > +    def do_calculation(self, images):\n> > > +        logger.info('Starting AWB calculation')\n> > > +\n> > > +        imgs = [img for img in images if img.macbeth is not None]\n> > > +\n> > > +        gains, _, _ = awb(imgs, None, None, False)\n> > > +        gains = np.array(gains)\n> > > +        gains = gains.reshape(-1, 3)\n> > > +\n> > > +        res = []\n> > > +        for v in gains:\n> > > +            res.append({\n> > > +                'ct': int(v[0]),\n> > > +                'gains': [float(1.0 / v[1]), float(1.0 / v[2])]\n> > > +            })\n> > > +\n> > > +        return res\n> > > diff --git a/utils/tuning/libtuning/modules/awb/rkisp1.py b/utils/tuning/libtuning/modules/awb/rkisp1.py\n> > > new file mode 100644\n> > > index 000000000000..e3ddeb50c9a1\n> > > --- /dev/null\n> > > +++ b/utils/tuning/libtuning/modules/awb/rkisp1.py\n> > > @@ -0,0 +1,27 @@\n> > > +# SPDX-License-Identifier: GPL-2.0-or-later\n> > > +#\n> > > +# Copyright (C) 2024, Ideas On Board\n> > > +#\n> > > +# AWB module for tuning rkisp1\n> > \n> > I think I'm not familiar enough yet with how we're handling platform\n> > specific details here.\n> > \n> > Is there anything in this that is RkISP1 specific? Or will it be ?\n> > It feels like these are generic so far... \n> \n> Valid point. At the moment I just follow the structure that was there\n> before. On the other hand we do not yet know exactly where we end up\n> (The Raspberry Pi awb section looks quite different from this one.) So\n> maybe there is also a benefit in keeping it separate for now and to see\n> which parts settle on a common denominator.\n> \n> I can merge it into one class if you like that more. Maybe Paul has an\n> opinion on that.\n\nI'll leave that to your discretion ... as long as we're considering\nthings!\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> \n> Best regards,\n> Stefan\n> \n> > > +\n> > > +from .awb import AWB\n> > > +\n> > > +import libtuning as lt\n> > > +\n> > > +\n> > > +class AWBRkISP1(AWB):\n> > > +    hr_name = 'AWB (RkISP1)'\n> > > +    out_name = 'Awb'\n> > > +\n> > > +    def __init__(self, **kwargs):\n> > > +        super().__init__(**kwargs)\n> > > +\n> > > +    def validate_config(self, config: dict) -> bool:\n> > > +        return True\n> > > +\n> > > +    def process(self, config: dict, images: list, outputs: dict) -> dict:\n> > > +        output = {}\n> > > +\n> > > +        output['gains'] = self.do_calculation(images)\n> > > +\n> > > +        return output\n> > > -- \n> > > 2.43.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 24661C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  6 Aug 2024 08:57:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B3B98633B1;\n\tTue,  6 Aug 2024 10:57:00 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 148996337E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  6 Aug 2024 10:56:59 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 25EB84CD;\n\tTue,  6 Aug 2024 10:56:07 +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=\"KQpze9UV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1722934567;\n\tbh=HuUsZM9FqnClDknt/ogdPD9EGI/nUToahNxn7R6odqI=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=KQpze9UVTHQDC8hmpqvzbhUSyPWWK9Doz2L+dRsZjDB2hP2zeK6+ZAfCz+NVCDz33\n\t/Efo7YNCOH2zP9QQGxI25tIoE2nbV1oN1e3utiPTNNgRNl+13aJ5RfVVsSxFO2X4po\n\tC2/TrvEgLlXuD6k6QDxWq1m5ief2TSai8E2XUMSo=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<xep45pmf3ewgx67yhdozwbkp4n6x32bjm6hpejaznsgusqh34v@j4mrz6g5f3ra>","References":"<20240805120522.1613342-1-stefan.klug@ideasonboard.com>\n\t<20240805120522.1613342-6-stefan.klug@ideasonboard.com>\n\t<172286585424.1687952.13120645421216327569@ping.linuxembedded.co.uk>\n\t<xep45pmf3ewgx67yhdozwbkp4n6x32bjm6hpejaznsgusqh34v@j4mrz6g5f3ra>","Subject":"Re: [PATCH v1 5/6] libtuning: Add initial AWB module","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tDavid Plowman <david.plowman@raspberrypi.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Date":"Tue, 06 Aug 2024 09:56:56 +0100","Message-ID":"<172293461611.1687952.5954433980529746146@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>"}}]