[{"id":33194,"web_url":"https://patchwork.libcamera.org/comment/33194/","msgid":"<20250127070743.GG17899@pendragon.ideasonboard.com>","date":"2025-01-27T07:07:43","subject":"Re: [PATCH v3 4/6] ipa: simple: Report black levels in metadata","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Milan,\n\nThank you for the patch.\n\nOn Mon, Jan 13, 2025 at 02:34:03PM +0100, Milan Zamazal wrote:\n> From: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> Provide the determined black level values in the metadata\n> to add to the completed requests.\n\nReflow to 72 columns.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> ---\n>  src/ipa/simple/algorithms/blc.cpp | 9 ++++++++-\n>  1 file changed, 8 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/ipa/simple/algorithms/blc.cpp b/src/ipa/simple/algorithms/blc.cpp\n> index 1d7d370b..d5759f92 100644\n> --- a/src/ipa/simple/algorithms/blc.cpp\n> +++ b/src/ipa/simple/algorithms/blc.cpp\n> @@ -11,6 +11,8 @@\n>  \n>  #include <libcamera/base/log.h>\n>  \n> +#include \"control_ids.h\"\n> +\n>  namespace libcamera {\n>  \n>  namespace ipa::soft::algorithms {\n> @@ -49,8 +51,13 @@ void BlackLevel::process(IPAContext &context,\n>  \t\t\t [[maybe_unused]] const uint32_t frame,\n>  \t\t\t IPAFrameContext &frameContext,\n>  \t\t\t const SwIspStats *stats,\n> -\t\t\t [[maybe_unused]] ControlList &metadata)\n> +\t\t\t ControlList &metadata)\n>  {\n> +\t/* Assign each of the R G G B channels as the same black level. */\n> +\tconst int32_t blackLevel = context.activeState.blc.level * 256;\n> +\tconst int32_t blackLevels[] = { blackLevel, blackLevel, blackLevel, blackLevel };\n> +\tmetadata.set(controls::SensorBlackLevels, blackLevels);\n> +\n>  \tif (context.configuration.black.level.has_value())\n>  \t\treturn;\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 67080BEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jan 2025 07:07:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 785EC6855E;\n\tMon, 27 Jan 2025 08:07:55 +0100 (CET)","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 2182D68557\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jan 2025 08:07:54 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7ECA178D;\n\tMon, 27 Jan 2025 08:06:47 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"P2T740OO\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1737961607;\n\tbh=bq7yOrvDrpv5C7Tllzri+BVZkK0ArwKwcV/GVP4c6Uk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=P2T740OOoeWETU8V7QeRqvIEKWLbyRMbrbF3HXbS+dhzNY+8S2KOZXFJGCE074DGI\n\tCh8O1mSUy922l2EDyBVXKT/gcaGidZm+XWVGvmL8HlO7fkpO3j0jKbW+wdX7tlU5rG\n\t1uV4+rtlBFF/UGF9wIc8+Ksuan9fRB0hCeRtVTPk=","Date":"Mon, 27 Jan 2025 09:07:43 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org, Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<pobrn@protonmail.com>","Subject":"Re: [PATCH v3 4/6] ipa: simple: Report black levels in metadata","Message-ID":"<20250127070743.GG17899@pendragon.ideasonboard.com>","References":"<20250113133405.12167-1-mzamazal@redhat.com>\n\t<20250113133405.12167-5-mzamazal@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250113133405.12167-5-mzamazal@redhat.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>"}}]