[{"id":24448,"web_url":"https://patchwork.libcamera.org/comment/24448/","msgid":"<165999948537.2190824.14951940778353669299@Monstersaurus>","date":"2022-08-08T22:58:05","subject":"Re: [libcamera-devel] [RFC PATCH 3/4] ipa: ipu3: Register algorithms","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart via libcamera-devel (2022-08-02 11:09:54)\n> To prepare for dynamic instantiation of algorithms from the tuning file,\n> register the algorithms with the Module class.\n\nI do like this dynamic registration.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/ipa/ipu3/algorithms/af.cpp           | 2 ++\n>  src/ipa/ipu3/algorithms/agc.cpp          | 2 ++\n>  src/ipa/ipu3/algorithms/awb.cpp          | 2 ++\n>  src/ipa/ipu3/algorithms/blc.cpp          | 2 ++\n>  src/ipa/ipu3/algorithms/tone_mapping.cpp | 2 ++\n>  5 files changed, 10 insertions(+)\n> \n> diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp\n> index d07521a090ac..4835a0345931 100644\n> --- a/src/ipa/ipu3/algorithms/af.cpp\n> +++ b/src/ipa/ipu3/algorithms/af.cpp\n> @@ -450,6 +450,8 @@ void Af::process(IPAContext &context, [[maybe_unused]] IPAFrameContext *frameCon\n>         }\n>  }\n>  \n> +REGISTER_IPA_ALGORITHM(Af, \"Af\")\n> +\n>  } /* namespace ipa::ipu3::algorithms */\n>  \n>  } /* namespace libcamera */\n> diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp\n> index 5bc64ae52214..ed4809d98007 100644\n> --- a/src/ipa/ipu3/algorithms/agc.cpp\n> +++ b/src/ipa/ipu3/algorithms/agc.cpp\n> @@ -363,6 +363,8 @@ void Agc::process(IPAContext &context, [[maybe_unused]] IPAFrameContext *frameCo\n>         frameCount_++;\n>  }\n>  \n> +REGISTER_IPA_ALGORITHM(Agc, \"Agc\")\n> +\n>  } /* namespace ipa::ipu3::algorithms */\n>  \n>  } /* namespace libcamera */\n> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\n> index 704267222a31..b658ee546b87 100644\n> --- a/src/ipa/ipu3/algorithms/awb.cpp\n> +++ b/src/ipa/ipu3/algorithms/awb.cpp\n> @@ -483,6 +483,8 @@ void Awb::prepare(IPAContext &context, ipu3_uapi_params *params)\n>         params->use.acc_ccm = 1;\n>  }\n>  \n> +REGISTER_IPA_ALGORITHM(Awb, \"Awb\")\n> +\n>  } /* namespace ipa::ipu3::algorithms */\n>  \n>  } /* namespace libcamera */\n> diff --git a/src/ipa/ipu3/algorithms/blc.cpp b/src/ipa/ipu3/algorithms/blc.cpp\n> index 78ab7bff549f..c561aa858b96 100644\n> --- a/src/ipa/ipu3/algorithms/blc.cpp\n> +++ b/src/ipa/ipu3/algorithms/blc.cpp\n> @@ -62,6 +62,8 @@ void BlackLevelCorrection::prepare([[maybe_unused]] IPAContext &context,\n>         params->use.obgrid_param = 1;\n>  }\n>  \n> +REGISTER_IPA_ALGORITHM(BlackLevelCorrection, \"BlackLevelCorrection\")\n> +\n>  } /* namespace ipa::ipu3::algorithms */\n>  \n>  } /* namespace libcamera */\n> diff --git a/src/ipa/ipu3/algorithms/tone_mapping.cpp b/src/ipa/ipu3/algorithms/tone_mapping.cpp\n> index f86e79b24a67..49a5558b6faa 100644\n> --- a/src/ipa/ipu3/algorithms/tone_mapping.cpp\n> +++ b/src/ipa/ipu3/algorithms/tone_mapping.cpp\n> @@ -105,6 +105,8 @@ void ToneMapping::process(IPAContext &context, [[maybe_unused]] IPAFrameContext\n>         context.activeState.toneMapping.gamma = gamma_;\n>  }\n>  \n> +REGISTER_IPA_ALGORITHM(ToneMapping, \"ToneMapping\")\n> +\n>  } /* namespace ipa::ipu3::algorithms */\n>  \n>  } /* namespace libcamera */\n> -- \n> Regards,\n> \n> Laurent Pinchart\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 2A5ECBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  8 Aug 2022 22:58:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DACE46332B;\n\tTue,  9 Aug 2022 00:58:09 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 54C36600EA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Aug 2022 00:58:08 +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 0AEF1481;\n\tTue,  9 Aug 2022 00:58:07 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659999489;\n\tbh=sGOoP+4AvyLwqWnlKM7UQ8PFqXFXhHggPQjD2QWveKs=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=X5qfEKB0MNuo4B4gcbzSqDBfLZFrqYrWc1mS+2LTb5kk/brK47SZdsD1TlQBbF5fh\n\ttjsIr0Y1ZtqXL8vvEmwHTIxjA8uxr8cSABpaoXzmRl2IBIvO7MNsG3nc2d3s0z/KxJ\n\tY/ND/7qSW0mWQGrEksWv2Nu+utd3C70ttxAZiNvEXpmuqzdk5PlfM/Jcxoha9e5crH\n\t4uNzJU7PEmYAZC7GU6CcRSqbV1I5/Q3k2q5y9KJ7AdC9KdPdzZh1Du/PIPV/IDMAf8\n\tdq2nUNleAeOSwRwXV4N4L/w8lR2tOTdcbJn18IrLGIp6N7Hu8Nj5TAPoWNwIrOavyT\n\t/F49QMiEH5osA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1659999488;\n\tbh=sGOoP+4AvyLwqWnlKM7UQ8PFqXFXhHggPQjD2QWveKs=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=hSb6hWui16Ll7a6Zy29ocjOGEM+0hUnrHLN+u6Kd7WSJVDX72iHzcbFE8DEestXCn\n\tuniFRh5ekV4664lH+wQtryZwjMSpkIS+zE3MT31S6ILBPnwYVH1dp+Qj5xt0BXEfMF\n\t7Dc7z6F+wtxldk0uy6ZTUNzCi5NNI28Q3F3Y0NbY="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"hSb6hWui\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20220802100955.1546-4-laurent.pinchart@ideasonboard.com>","References":"<20220802100955.1546-1-laurent.pinchart@ideasonboard.com>\n\t<20220802100955.1546-4-laurent.pinchart@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 08 Aug 2022 23:58:05 +0100","Message-ID":"<165999948537.2190824.14951940778353669299@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [RFC PATCH 3/4] ipa: ipu3: Register 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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]