[{"id":20194,"web_url":"https://patchwork.libcamera.org/comment/20194/","msgid":"<163420718265.3829429.17614047246662400008@Monstersaurus>","date":"2021-10-14T10:26:22","subject":"Re: [libcamera-devel] [PATCH 02/13] ipa: ipu3: set frameContext\n\tbefore controls","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-10-13 16:41:14)\n\nMissing some context here. Is this correct? If not put something that's\na bit more correct please ;-)\n\n\"\"\"\nThe AGC frame context needs to be initialised correctly for the first\niteration.\n\nSet the gain and exposure appropriately to the current values known to\nthe IPA.\n\"\"\"\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> ---\n>  src/ipa/ipu3/ipu3.cpp | 3 +++\n>  1 file changed, 3 insertions(+)\n> \n> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> index 6d9bbf39..e54fbab5 100644\n> --- a/src/ipa/ipu3/ipu3.cpp\n> +++ b/src/ipa/ipu3/ipu3.cpp\n> @@ -415,6 +415,9 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo)\n>                         return ret;\n>         }\n>  \n> +       context_.frameContext.agc.gain = camHelper_->gain(gain_);\n> +       context_.frameContext.agc.exposure = exposure_;\n> +\n>         return 0;\n>  }\n>  \n> -- \n> 2.30.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 E8393BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 Oct 2021 10:26:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 65E6A68F4F;\n\tThu, 14 Oct 2021 12:26:26 +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 72B9668541\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Oct 2021 12:26:25 +0200 (CEST)","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 0CB112F3;\n\tThu, 14 Oct 2021 12:26:25 +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=\"eY0FzJVl\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634207185;\n\tbh=przzwfX5jI5MAt8bLmMqR9YTuGhkFFL8zXsFAZEmrHA=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=eY0FzJVlgTzzygDSFNFnap0MYn5jTLclalf4/h5ZmkxCJIWzBo3gfBD8np8Ggd1Vs\n\tkzD7FnXLEl/ZOL/2Xa26KehjJnNykVBOn7VS42yFXKr6Y9hrlq5xJ0A/nS5+/TDA1/\n\t6ZsR64BftNyRSuhD69xrdceKSR2R1c3pzLNQG/A4=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20211013154125.133419-3-jeanmichel.hautbois@ideasonboard.com>","References":"<20211013154125.133419-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20211013154125.133419-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":"Thu, 14 Oct 2021 11:26:22 +0100","Message-ID":"<163420718265.3829429.17614047246662400008@Monstersaurus>","User-Agent":"alot/0.9.1","Subject":"Re: [libcamera-devel] [PATCH 02/13] ipa: ipu3: set frameContext\n\tbefore controls","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":20212,"web_url":"https://patchwork.libcamera.org/comment/20212/","msgid":"<YWiokQxnijac2s4E@pendragon.ideasonboard.com>","date":"2021-10-14T22:00:49","subject":"Re: [libcamera-devel] [PATCH 02/13] ipa: ipu3: set frameContext\n\tbefore controls","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, Oct 14, 2021 at 11:26:22AM +0100, Kieran Bingham wrote:\n> Quoting Jean-Michel Hautbois (2021-10-13 16:41:14)\n> \n> Missing some context here. Is this correct? If not put something that's\n> a bit more correct please ;-)\n> \n> \"\"\"\n> The AGC frame context needs to be initialised correctly for the first\n> iteration.\n> \n> Set the gain and exposure appropriately to the current values known to\n> the IPA.\n> \"\"\"\n> \n> \n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> > Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> > ---\n> >  src/ipa/ipu3/ipu3.cpp | 3 +++\n> >  1 file changed, 3 insertions(+)\n> > \n> > diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> > index 6d9bbf39..e54fbab5 100644\n> > --- a/src/ipa/ipu3/ipu3.cpp\n> > +++ b/src/ipa/ipu3/ipu3.cpp\n> > @@ -415,6 +415,9 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo)\n> >                         return ret;\n> >         }\n> >  \n> > +       context_.frameContext.agc.gain = camHelper_->gain(gain_);\n> > +       context_.frameContext.agc.exposure = exposure_;\n\nWhy is this special, why don't we set the rest of the context here, or,\npossibly better, set this in the AGC algorithm ? The exposure_ and gain_\nmembers of IPU3IPA seem a bit out of place. Maybe they're removed later\nin this series ?\n\n> > +\n> >         return 0;\n> >  }\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 158C6C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 Oct 2021 22:01:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4FFCC68F4F;\n\tFri, 15 Oct 2021 00:01:07 +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 479BF60501\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Oct 2021 00:01:05 +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 9A54EB91;\n\tFri, 15 Oct 2021 00:01:04 +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=\"j3igRdoL\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634248864;\n\tbh=b5JAsrx2zjNX94g4uK9OsBRhkGlNtjtv3JSpnHJLTtM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=j3igRdoLkjPJ4uqu8P4T1YhAHcCwgFR8WRDORtvywCjGm5P5Km+jbRj0azOVd1d5Y\n\t99PPHIzFotbw8WhSIQp3IAu1jUcvqUr5tc7aWzddRbkUXG7W8WiBGxAQTb4lIZsA4A\n\tlhgcELna04Od/WXAWpHl6EYEjI3wKfQidgcuME2Q=","Date":"Fri, 15 Oct 2021 01:00:49 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YWiokQxnijac2s4E@pendragon.ideasonboard.com>","References":"<20211013154125.133419-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20211013154125.133419-3-jeanmichel.hautbois@ideasonboard.com>\n\t<163420718265.3829429.17614047246662400008@Monstersaurus>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<163420718265.3829429.17614047246662400008@Monstersaurus>","Subject":"Re: [libcamera-devel] [PATCH 02/13] ipa: ipu3: set frameContext\n\tbefore controls","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>"}},{"id":20230,"web_url":"https://patchwork.libcamera.org/comment/20230/","msgid":"<3c250083-9281-9a37-7bb8-72d901fd5848@ideasonboard.com>","date":"2021-10-15T05:41:11","subject":"Re: [libcamera-devel] [PATCH 02/13] ipa: ipu3: set frameContext\n\tbefore controls","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"content":"Hi Kieran, Laurent,\n\nOn 15/10/2021 00:00, Laurent Pinchart wrote:\n> On Thu, Oct 14, 2021 at 11:26:22AM +0100, Kieran Bingham wrote:\n>> Quoting Jean-Michel Hautbois (2021-10-13 16:41:14)\n>>\n>> Missing some context here. Is this correct? If not put something that's\n>> a bit more correct please ;-)\n>>\n>> \"\"\"\n>> The AGC frame context needs to be initialised correctly for the first\n>> iteration.\n>>\n>> Set the gain and exposure appropriately to the current values known to\n>> the IPA.\n>> \"\"\"\n>>\n\nOh my, I missed this commit message, sorry :-(.\n\n>>\n>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>\n>>> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n>>> ---\n>>>  src/ipa/ipu3/ipu3.cpp | 3 +++\n>>>  1 file changed, 3 insertions(+)\n>>>\n>>> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n>>> index 6d9bbf39..e54fbab5 100644\n>>> --- a/src/ipa/ipu3/ipu3.cpp\n>>> +++ b/src/ipa/ipu3/ipu3.cpp\n>>> @@ -415,6 +415,9 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo)\n>>>                         return ret;\n>>>         }\n>>>  \n>>> +       context_.frameContext.agc.gain = camHelper_->gain(gain_);\n>>> +       context_.frameContext.agc.exposure = exposure_;\n> \n> Why is this special, why don't we set the rest of the context here, or,\n> possibly better, set this in the AGC algorithm ? The exposure_ and gain_\n> members of IPU3IPA seem a bit out of place. Maybe they're removed later\n> in this series ?\n> \n\nIndeed, they should move to AGC, and later we will not pass exposure and\ngain this way, but with a duration value and a double to represent the\nshutter speed and the analogue gain. I wanted it in the series but did\nnot come to something satisfying yet.\n\n>>> +\n>>>         return 0;\n>>>  }\n>>>  \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 83B43C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Oct 2021 05:41:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0FEE668F50;\n\tFri, 15 Oct 2021 07:41: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 8CD6F60239\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Oct 2021 07:41:13 +0200 (CEST)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:ae2a:a11b:484b:c825])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 16C452E3;\n\tFri, 15 Oct 2021 07:41:13 +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=\"M4i1VMhc\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634276473;\n\tbh=SawN+xYs179wL8HGOYGQsX3Q8I5E+mWZYTyJE40M9ik=;\n\th=Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=M4i1VMhcyb7A1v557IvhMZNbAZEFwTxwwmFpjkWTP6B6CmlghFHIGDltdf0bB3CgC\n\tABjyRMAP3oncXuoSuOU23pZQEUN4D8rE4nCjZaRsuA2MHqn/sqFuelEs08rmmswU2w\n\t0Y8d50QveMDg9lz9dczA9Ug0uRef0b683v1evXzw=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","References":"<20211013154125.133419-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20211013154125.133419-3-jeanmichel.hautbois@ideasonboard.com>\n\t<163420718265.3829429.17614047246662400008@Monstersaurus>\n\t<YWiokQxnijac2s4E@pendragon.ideasonboard.com>","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<3c250083-9281-9a37-7bb8-72d901fd5848@ideasonboard.com>","Date":"Fri, 15 Oct 2021 07:41:11 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.13.0","MIME-Version":"1.0","In-Reply-To":"<YWiokQxnijac2s4E@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 02/13] ipa: ipu3: set frameContext\n\tbefore controls","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>"}}]