From patchwork Mon Aug 26 15:22:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 21017 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 7421AC32D5 for ; Mon, 26 Aug 2024 15:22:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 076176341F; Mon, 26 Aug 2024 17:22:51 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="kkhgAput"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B9BB663421 for ; Mon, 26 Aug 2024 17:22:48 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:58b7:f3d:c9d4:defa]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 74181480; Mon, 26 Aug 2024 17:21:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1724685702; bh=pGM8kPhrhD0ndwxqtoZupK9hT5l70hRKV3008QELl2g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kkhgAputIdVrG/gRxBr+dGVdXJAbDDA/1p80n+/y3CPzAxL/y8xDr71gK2qw0Z+fU 5xsfNaTRgQR+tvqtw1UyFVmTtk82kXT/Gp7A7X/XKT7eaKUUyiLa3GXQVJjkNcFrk9 j7UYn0pxwqbOUfSKAJhyfXDXvroUdfF17BoTThZc= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v1 7/8] ipa: rkisp1: Add sensor info to context Date: Mon, 26 Aug 2024 17:22:05 +0200 Message-ID: <20240826152224.362773-8-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240826152224.362773-1-stefan.klug@ideasonboard.com> References: <20240826152224.362773-1-stefan.klug@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" For the LSC algorithm to dynamically calculate the LSC tables based on the sensor size and the crop rectangle it needs access to that data. Provide access to it by adding the sensorInfo object to the context. Signed-off-by: Stefan Klug --- src/ipa/rkisp1/ipa_context.h | 2 ++ src/ipa/rkisp1/rkisp1.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h index 061efc0c578e..18c294798524 100644 --- a/src/ipa/rkisp1/ipa_context.h +++ b/src/ipa/rkisp1/ipa_context.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -178,6 +179,7 @@ struct IPAFrameContext : public FrameContext { struct IPAContext { const IPAHwSettings *hw; + IPACameraSensorInfo sensorInfo; IPASessionConfiguration configuration; IPAActiveState activeState; diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 23e0826cc335..c671629956c7 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -111,7 +111,7 @@ const ControlInfoMap::Map rkisp1Controls{ } /* namespace */ IPARkISP1::IPARkISP1() - : context_({ {}, {}, {}, { kMaxFrameContexts }, {}, {} }) + : context_({ {}, {}, {}, {}, { kMaxFrameContexts }, {}, {} }) { } @@ -143,6 +143,8 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision, LOG(IPARkISP1, Debug) << "Hardware revision is " << hwRevision; + context_.sensorInfo = sensorInfo; + context_.camHelper = CameraSensorHelperFactoryBase::create(settings.sensorModel); if (!context_.camHelper) { LOG(IPARkISP1, Error)