From patchwork Tue Mar 8 09:15:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 15433 X-Patchwork-Delegate: umang.jain@ideasonboard.com 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 1526BBF415 for ; Tue, 8 Mar 2022 09:15:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C7A626118D; Tue, 8 Mar 2022 10:15:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1646730936; bh=M9PmQ2YtILsBpoEt+K2LHsNLnfIj8YSeQ142ZN9DJHc=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=AuEj51MR+IpY85S8wvQYa1rRgwxqiEPXgaK8o7KJXcmwc+fcF97enzIMftuo/IEC/ S4dd0P9yTEqwAWSC7+wlH5LsByo+ZQb7z9MkFmHtgj1HEokDv5KEYlUTIWVmSnSlct biSIeTPX7u0Sn8/xsqFBVtnSlElsXDjTltX3ZIougcwkCkHq2o155TFNjs8RdtW+97 Lmw4P3kC6DlRRDN4LKwk4jDkruP0viu5kD5skjAwpsjNN/IjuAcc3znYFgSAgxRohC z2bIGEshqzctZL2GEFhHN3NEIgThp5yGY0E9V4G0avviIh5LW2l9Ah1KMehEsiDzwK bgz/A7imDe9Ew== 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 3F58C604E9 for ; Tue, 8 Mar 2022 10:15:34 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="baGe7POk"; dkim-atps=neutral Received: from perceval.ideasonboard.com (unknown [103.251.226.72]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4AD28488; Tue, 8 Mar 2022 10:15:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1646730934; bh=M9PmQ2YtILsBpoEt+K2LHsNLnfIj8YSeQ142ZN9DJHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=baGe7POkuARZgv0RxNK4cd4qiT7zHE+lQiFg45DoaUqOvdM37D3EsiH5dsxT8U10g mkDUp5Dwg4+CicMPLj4cbrHEQE4VNlQNFxG5EkS02OO/eMXJeOa/RG0pJxrLFOAM4u d9DBejgRdtgvXlAvSxs8YysNwvduEAyos1tZN1Wc= To: libcamera-devel@lists.libcamera.org Date: Tue, 8 Mar 2022 14:45:19 +0530 Message-Id: <20220308091520.34607-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220308091520.34607-1-umang.jain@ideasonboard.com> References: <20220308091520.34607-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] ipa: rkisp1: Drop private exposure and gain limits 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: , X-Patchwork-Original-From: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The private members of exposure and gain limits can be dropped from IPARkISP1 since they are not used class-wide and can be easily replaced by local counter-parts. In case they are required to be widely available, these should then sit in IPASessionConfiguration. Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart Reviewed-by: Paul Elder --- src/ipa/rkisp1/rkisp1.cpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 2d79f15f..129afddd 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -69,10 +69,6 @@ private: /* Camera sensor controls. */ bool autoExposure_; - uint32_t minExposure_; - uint32_t maxExposure_; - uint32_t minGain_; - uint32_t maxGain_; /* revision-specific data */ rkisp1_cif_isp_version hwRevision_; @@ -166,15 +162,15 @@ int IPARkISP1::configure([[maybe_unused]] const IPACameraSensorInfo &info, autoExposure_ = true; - minExposure_ = itExp->second.min().get(); - maxExposure_ = itExp->second.max().get(); + int32_t minExposure = itExp->second.min().get(); + int32_t maxExposure = itExp->second.max().get(); - minGain_ = itGain->second.min().get(); - maxGain_ = itGain->second.max().get(); + int32_t minGain = itGain->second.min().get(); + int32_t maxGain = itGain->second.max().get(); LOG(IPARkISP1, Info) - << "Exposure: " << minExposure_ << "-" << maxExposure_ - << " Gain: " << minGain_ << "-" << maxGain_; + << "Exposure: " << minExposure << "-" << maxExposure + << " Gain: " << minGain << "-" << maxGain; /* Clean context at configuration */ context_ = {}; @@ -191,10 +187,10 @@ int IPARkISP1::configure([[maybe_unused]] const IPACameraSensorInfo &info, * * \todo take VBLANK into account for maximum shutter speed */ - context_.configuration.agc.minShutterSpeed = minExposure_ * context_.configuration.sensor.lineDuration; - context_.configuration.agc.maxShutterSpeed = maxExposure_ * context_.configuration.sensor.lineDuration; - context_.configuration.agc.minAnalogueGain = camHelper_->gain(minGain_); - context_.configuration.agc.maxAnalogueGain = camHelper_->gain(maxGain_); + context_.configuration.agc.minShutterSpeed = minExposure * context_.configuration.sensor.lineDuration; + context_.configuration.agc.maxShutterSpeed = maxExposure * context_.configuration.sensor.lineDuration; + context_.configuration.agc.minAnalogueGain = camHelper_->gain(minGain); + context_.configuration.agc.maxAnalogueGain = camHelper_->gain(maxGain); for (auto const &algo : algorithms_) { int ret = algo->configure(context_, info);