[{"id":29199,"web_url":"https://patchwork.libcamera.org/comment/29199/","msgid":"<20240412074753.mfrcvo7k6zpnxcl7@macbook-air.speedport.ip>","date":"2024-04-12T07:47:53","subject":"Re: [PATCH 2/5] utils: tuning: rkisp1: Add skeletal AGC to the\n\trkisp1 tuning script","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Hi Paul,\n\nthanks for the patch.\nLooks good to me.\n\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> \n\nCheers,\nStefan\n\nOn Fri, Apr 05, 2024 at 11:53:32PM +0900, Paul Elder wrote:\n> Add the skeletal AGC module to the rkisp1 tuning script. For now it just\n> spits out hardcoded values.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>  utils/tuning/rkisp1.py | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/utils/tuning/rkisp1.py b/utils/tuning/rkisp1.py\n> index 1cea6ddb..d42646de 100755\n> --- a/utils/tuning/rkisp1.py\n> +++ b/utils/tuning/rkisp1.py\n> @@ -11,6 +11,7 @@ import libtuning as lt\n>  from libtuning.parsers import YamlParser\n>  from libtuning.generators import YamlOutput\n>  from libtuning.modules.lsc import LSCRkISP1\n> +from libtuning.modules.agc import AGCRkISP1\n>  \n>  tuner = lt.Tuner('RkISP1')\n>  tuner.add(LSCRkISP1(\n> @@ -32,9 +33,10 @@ tuner.add(LSCRkISP1(\n>            # values.  This can also be a custom function.\n>            smoothing_function=lt.smoothing.MedianBlur(3),\n>            ))\n> +tuner.add(AGCRkISP1(debug=[lt.Debug.Plot], hw_rev='V10'))\n>  tuner.set_input_parser(YamlParser())\n>  tuner.set_output_formatter(YamlOutput())\n> -tuner.set_output_order([LSCRkISP1])\n> +tuner.set_output_order([AGCRkISP1, LSCRkISP1])\n>  \n>  if __name__ == '__main__':\n>      sys.exit(tuner.run(sys.argv))\n> -- \n> 2.39.2\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 387EEC3213\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Apr 2024 07:48:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2A3436333E;\n\tFri, 12 Apr 2024 09:48: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 DA39F6333B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Apr 2024 09:47:57 +0200 (CEST)","from ideasonboard.com\n\t(p200300e0774af4635726ec48835ba9d7.dip0.t-ipconnect.de\n\t[IPv6:2003:e0:774a:f463:5726:ec48:835b:a9d7])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4FC728E1;\n\tFri, 12 Apr 2024 09:47:14 +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=\"H2DYBTQo\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1712908034;\n\tbh=fbQGziTzOLFlhm6GR7qr5h9fzVL/lK0PasPpeMQWx3w=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=H2DYBTQoaW+p0rrtR9k8rlrsJnq5QIQ8tlF0REyKrFPzIPPmHwhbpwP30V1zdd8KR\n\tsRsBSJhHxMP2bI6YowqANCZOJhbqF8ZaSCjKAkQRHjxuzC3eD3xBOpKKy1nNu4J13J\n\tIAJM8Has8VVI7zuB4nbLAgIGNWUlQzmM245lvzIo=","Date":"Fri, 12 Apr 2024 09:47:53 +0200","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 2/5] utils: tuning: rkisp1: Add skeletal AGC to the\n\trkisp1 tuning script","Message-ID":"<20240412074753.mfrcvo7k6zpnxcl7@macbook-air.speedport.ip>","References":"<20240405145335.3010479-1-paul.elder@ideasonboard.com>\n\t<20240405145335.3010479-3-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240405145335.3010479-3-paul.elder@ideasonboard.com>","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":29208,"web_url":"https://patchwork.libcamera.org/comment/29208/","msgid":"<171291267604.887138.17516524144731526137@ping.linuxembedded.co.uk>","date":"2024-04-12T09:04:36","subject":"Re: [PATCH 2/5] utils: tuning: rkisp1: Add skeletal AGC to the\n\trkisp1 tuning script","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Stefan Klug (2024-04-12 08:47:53)\n> Hi Paul,\n> \n> thanks for the patch.\n> Looks good to me.\n> \n> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> \n> \n> Cheers,\n> Stefan\n> \n> On Fri, Apr 05, 2024 at 11:53:32PM +0900, Paul Elder wrote:\n> > Add the skeletal AGC module to the rkisp1 tuning script. For now it just\n> > spits out hardcoded values.\n> > \n> > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > ---\n> >  utils/tuning/rkisp1.py | 4 +++-\n> >  1 file changed, 3 insertions(+), 1 deletion(-)\n> > \n> > diff --git a/utils/tuning/rkisp1.py b/utils/tuning/rkisp1.py\n> > index 1cea6ddb..d42646de 100755\n> > --- a/utils/tuning/rkisp1.py\n> > +++ b/utils/tuning/rkisp1.py\n> > @@ -11,6 +11,7 @@ import libtuning as lt\n> >  from libtuning.parsers import YamlParser\n> >  from libtuning.generators import YamlOutput\n> >  from libtuning.modules.lsc import LSCRkISP1\n> > +from libtuning.modules.agc import AGCRkISP1\n> >  \n> >  tuner = lt.Tuner('RkISP1')\n> >  tuner.add(LSCRkISP1(\n> > @@ -32,9 +33,10 @@ tuner.add(LSCRkISP1(\n> >            # values.  This can also be a custom function.\n> >            smoothing_function=lt.smoothing.MedianBlur(3),\n> >            ))\n> > +tuner.add(AGCRkISP1(debug=[lt.Debug.Plot], hw_rev='V10'))\n\nAre the AGC tuning parameters expected to differ between hw_revs ?\n\n> >  tuner.set_input_parser(YamlParser())\n> >  tuner.set_output_formatter(YamlOutput())\n> > -tuner.set_output_order([LSCRkISP1])\n> > +tuner.set_output_order([AGCRkISP1, LSCRkISP1])\n> >  \n> >  if __name__ == '__main__':\n> >      sys.exit(tuner.run(sys.argv))\n> > -- \n> > 2.39.2\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 B5A94BE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Apr 2024 09:04:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D4D9B63352;\n\tFri, 12 Apr 2024 11:04:40 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5A0AA6333B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Apr 2024 11:04:39 +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 B87FAA68;\n\tFri, 12 Apr 2024 11:03:55 +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=\"fai/qBHL\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1712912635;\n\tbh=KONAeHeRFUHAiH3Dclh3j4NyKRXaDABJW8go2xEBMjs=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=fai/qBHLucu2M1t9wz+/HkE8KRF7Q4V3A6u0+z2b0+e8CZVJXrMryo3JK1sbg0YwT\n\tVCiBT4KCK5V3qSq1FRrbAX5DArHR3IwZUY4kliY90Xgc4for5xEG+Oys3I4KguoA17\n\tdtWG7cF4YF1W112AcW4yzO83OZgGDsa2/CtxJXfM=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240412074753.mfrcvo7k6zpnxcl7@macbook-air.speedport.ip>","References":"<20240405145335.3010479-1-paul.elder@ideasonboard.com>\n\t<20240405145335.3010479-3-paul.elder@ideasonboard.com>\n\t<20240412074753.mfrcvo7k6zpnxcl7@macbook-air.speedport.ip>","Subject":"Re: [PATCH 2/5] utils: tuning: rkisp1: Add skeletal AGC to the\n\trkisp1 tuning script","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","To":"Paul Elder <paul.elder@ideasonboard.com>,\n\tStefan Klug <stefan.klug@ideasonboard.com>","Date":"Fri, 12 Apr 2024 10:04:36 +0100","Message-ID":"<171291267604.887138.17516524144731526137@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":29209,"web_url":"https://patchwork.libcamera.org/comment/29209/","msgid":"<171291289206.887138.16125041428705012473@ping.linuxembedded.co.uk>","date":"2024-04-12T09:08:12","subject":"Re: [PATCH 2/5] utils: tuning: rkisp1: Add skeletal AGC to the\n\trkisp1 tuning script","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Kieran Bingham (2024-04-12 10:04:36)\n> Quoting Stefan Klug (2024-04-12 08:47:53)\n> > Hi Paul,\n> > \n> > thanks for the patch.\n> > Looks good to me.\n> > \n> > Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> \n> > \n> > Cheers,\n> > Stefan\n> > \n> > On Fri, Apr 05, 2024 at 11:53:32PM +0900, Paul Elder wrote:\n> > > Add the skeletal AGC module to the rkisp1 tuning script. For now it just\n> > > spits out hardcoded values.\n> > > \n> > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > > ---\n> > >  utils/tuning/rkisp1.py | 4 +++-\n> > >  1 file changed, 3 insertions(+), 1 deletion(-)\n> > > \n> > > diff --git a/utils/tuning/rkisp1.py b/utils/tuning/rkisp1.py\n> > > index 1cea6ddb..d42646de 100755\n> > > --- a/utils/tuning/rkisp1.py\n> > > +++ b/utils/tuning/rkisp1.py\n> > > @@ -11,6 +11,7 @@ import libtuning as lt\n> > >  from libtuning.parsers import YamlParser\n> > >  from libtuning.generators import YamlOutput\n> > >  from libtuning.modules.lsc import LSCRkISP1\n> > > +from libtuning.modules.agc import AGCRkISP1\n> > >  \n> > >  tuner = lt.Tuner('RkISP1')\n> > >  tuner.add(LSCRkISP1(\n> > > @@ -32,9 +33,10 @@ tuner.add(LSCRkISP1(\n> > >            # values.  This can also be a custom function.\n> > >            smoothing_function=lt.smoothing.MedianBlur(3),\n> > >            ))\n> > > +tuner.add(AGCRkISP1(debug=[lt.Debug.Plot], hw_rev='V10'))\n> \n> Are the AGC tuning parameters expected to differ between hw_revs ?\n\nAha, yes I see it probably is. So doesn't that mean we'll need to\ndistinguish between these when loading the files?\n\nI.e. - the tuning files will have to be rkisp1 version specfiic in the\nfile name that gets loaded. That could lead to quite a bit of tuning\nfile duplication ;-(\n\nOr otherwise, the tuning process should write both AGC configurations to\nthe same file, and then the IPA would load and only read the one it is\ninterested in, without having to duplicate all of the LSC etc.\n\n--\nKieran\n\n\n> \n> > >  tuner.set_input_parser(YamlParser())\n> > >  tuner.set_output_formatter(YamlOutput())\n> > > -tuner.set_output_order([LSCRkISP1])\n> > > +tuner.set_output_order([AGCRkISP1, LSCRkISP1])\n> > >  \n> > >  if __name__ == '__main__':\n> > >      sys.exit(tuner.run(sys.argv))\n> > > -- \n> > > 2.39.2\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 DF01BC3213\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Apr 2024 09:08:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C87836335E;\n\tFri, 12 Apr 2024 11:08:15 +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 161566333E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Apr 2024 11:08:15 +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 77077A68;\n\tFri, 12 Apr 2024 11:07:31 +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=\"lEMQYiLU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1712912851;\n\tbh=9zQ6YPME+yadxLtWd/UcqYoxpwwszT/Qk8AoJSAYsiI=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=lEMQYiLU5Po2hF7v1Kk1j2xtRDoJ0CAzm0owbidJTwPwdMNXvStnFndM2U0HUMRe/\n\tuw39tyXg/8DWpTOD2lbcFkcni6D2jSpuUVUtr834s/m7aQ3szDKOg486dsCh0lYFmp\n\t4ruH6W3V1+eXpHYNfLdGMjolXXxdnbppEqSOwp1U=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<171291267604.887138.17516524144731526137@ping.linuxembedded.co.uk>","References":"<20240405145335.3010479-1-paul.elder@ideasonboard.com>\n\t<20240405145335.3010479-3-paul.elder@ideasonboard.com>\n\t<20240412074753.mfrcvo7k6zpnxcl7@macbook-air.speedport.ip>\n\t<171291267604.887138.17516524144731526137@ping.linuxembedded.co.uk>","Subject":"Re: [PATCH 2/5] utils: tuning: rkisp1: Add skeletal AGC to the\n\trkisp1 tuning script","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","To":"Paul Elder <paul.elder@ideasonboard.com>,\n\tStefan Klug <stefan.klug@ideasonboard.com>","Date":"Fri, 12 Apr 2024 10:08:12 +0100","Message-ID":"<171291289206.887138.16125041428705012473@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>"}}]