[{"id":16044,"web_url":"https://patchwork.libcamera.org/comment/16044/","msgid":"<YGKb3CVCGE7xKmsN@pendragon.ideasonboard.com>","date":"2021-03-30T03:32:44","subject":"Re: [libcamera-devel] [PATCH v3 3/5] ipa: ipu3: Use a local\n\tparameter object and prepare for 3A algorithms","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jean-Michel,\n\nThank you for the patch.\n\nOn Mon, Mar 29, 2021 at 09:18:24PM +0200, Jean-Michel Hautbois wrote:\n> The IPA will locally modify the parameters before they are passed down\n> to the imgU. Use a local parameter object to give a reference to those\n\ns/imgU/ImgU/\n\n> algorithms.\n> \n> AGC algorithm calculates a brightness level at min and max\n\n\"The AGC algoritm will calculate ...\" as there's no AGC yet in this\ncommit.\n\n> exposure/gains.\n\n\"exposure and gain\"\n\nIf you want to start a new paragraph, you need to insert a blank line.\nOtherwise (and I think that's the right option in this case), you\nshouldn't break in the middle of a line.\n\n> Starting at the minimum value for both of them shortens the time to\n> converge (as the first frames will already have the correct level).\n> \n> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> ---\n>  src/ipa/ipu3/ipu3.cpp    | 11 +++++++++--\n>  src/ipa/ipu3/meson.build |  6 +++++-\n>  2 files changed, 14 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> index 34a907f2..07dbc24a 100644\n> --- a/src/ipa/ipu3/ipu3.cpp\n> +++ b/src/ipa/ipu3/ipu3.cpp\n> @@ -61,6 +61,9 @@ private:\n>  \tuint32_t gain_;\n>  \tuint32_t minGain_;\n>  \tuint32_t maxGain_;\n> +\n> +\t/* Local parameter storage */\n> +\tipu3_uapi_params params_;\n\nAs this isn't used in this patch, you can move it to 4/5. Don't forget\nto update the subject line to remove the first part.\n\n>  };\n>  \n>  int IPAIPU3::start()\n> @@ -92,11 +95,15 @@ void IPAIPU3::configure(const std::map<uint32_t, ControlInfoMap> &entityControls\n>  \n>  \tminExposure_ = std::max(itExp->second.min().get<int32_t>(), 1);\n>  \tmaxExposure_ = itExp->second.max().get<int32_t>();\n> -\texposure_ = maxExposure_;\n> +\texposure_ = minExposure_;\n>  \n>  \tminGain_ = std::max(itGain->second.min().get<int32_t>(), 1);\n>  \tmaxGain_ = itGain->second.max().get<int32_t>();\n> -\tgain_ = maxGain_;\n> +\tgain_ = minGain_;\n> +\n> +\tparams_ = {};\n> +\n> +\tsetControls(0);\n>  }\n>  \n>  void IPAIPU3::mapBuffers(const std::vector<IPABuffer> &buffers)\n> diff --git a/src/ipa/ipu3/meson.build b/src/ipa/ipu3/meson.build\n> index a241f617..52d98c8e 100644\n> --- a/src/ipa/ipu3/meson.build\n> +++ b/src/ipa/ipu3/meson.build\n> @@ -2,8 +2,12 @@\n>  \n>  ipa_name = 'ipa_ipu3'\n>  \n> +ipu3_ipa_sources = files([\n> +  'ipu3.cpp',\n\n4 spaces.\n\n> +])\n> +\n>  mod = shared_module(ipa_name,\n> -                    ['ipu3.cpp', libcamera_generated_ipa_headers],\n> +                    [ipu3_ipa_sources, libcamera_generated_ipa_headers],\n>                      name_prefix : '',\n>                      include_directories : [ipa_includes, libipa_includes],\n>                      dependencies : libcamera_dep,\n\nChanges in this file aren'trelated to the commit message though. You can\nmove them to 4/5.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>","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 5E376C32F0\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Mar 2021 03:33:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9E7B668782;\n\tTue, 30 Mar 2021 05:33:30 +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 54C2A602D7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Mar 2021 05:33:29 +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 D316C292;\n\tTue, 30 Mar 2021 05:33:28 +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=\"PWkYHiEm\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1617075209;\n\tbh=A5JgxqrDrpBs2Q1BnZdXJ1a6Kz4k2sAjjuBJ3kdS74k=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=PWkYHiEm9b2qxGoQJFFz3ey3/Xwin6mX+cFTB7B37EkbusnRJVGmFt3LJR4GegMj0\n\tzBCQaJ84LvIYvAAHVVWzn3QOlLm3/3WIXDvbnqQWg7UBhufo7kpnOktiNUuz06pDcA\n\t/Ks8QacVONgk8sPt4tn+bn9knPD79QJyLTh652wY=","Date":"Tue, 30 Mar 2021 06:32:44 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<YGKb3CVCGE7xKmsN@pendragon.ideasonboard.com>","References":"<20210329191826.77817-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20210329191826.77817-4-jeanmichel.hautbois@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210329191826.77817-4-jeanmichel.hautbois@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v3 3/5] ipa: ipu3: Use a local\n\tparameter object and prepare for 3A algorithms","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","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]