From patchwork Mon Jan 31 22:33:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 15313 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 294D4BF415 for ; Mon, 31 Jan 2022 22:33:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D43CC609FA; Mon, 31 Jan 2022 23:33:51 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="EeLoXCdX"; dkim-atps=neutral Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2F39C609F1 for ; Mon, 31 Jan 2022 23:33:48 +0100 (CET) Received: by mail-wr1-x436.google.com with SMTP id c23so28257136wrb.5 for ; Mon, 31 Jan 2022 14:33:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=a0eL5HQHRoXB9E/Y6c0MyKFED1EQZfQMYgzFLROVJnM=; b=EeLoXCdXuUjKR++R3tcaGkO4LSaF83wJkKPFYgzoZaEQwAZVIHpjh3SULybCm3ByJz kB8ApqJxVtdZTAmGt/OgHzFqx3a2ilJO57b4wvfFfAuLDzdrkuEowYLAkDnsbEHERu4R BWKS1G/38I0kCUf6QSBS4U941aHe5byujLAO1QjooqIu1OXrfUB2eC4r7mHr0vCAXI4E 3xCghQq3P7XW3VevixmhrwV8M/hxfmHcwsFH6sPCXI23TExlvtOzPZoBuxF518N1Tv4w oTv9unqpQzlGhfG4KJMWB+wBXIhrBnZEv/ZUtKVKdbCJNOGPuF6iYy0z34sABqzb/cnA tg8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=a0eL5HQHRoXB9E/Y6c0MyKFED1EQZfQMYgzFLROVJnM=; b=T/c672u3CHXaUjg/mqaxwjVuF5NUAN/C65Nllv00T11+4heUweY9jEP02d1woZTbNg eVpr7Fn3ePTCqRSQ5k32GxS6zq2FzobCH1ZYGcXwNQSBg7E2nJburDkylPDc6PNWj4GT mJlDyn7duFppqlToiZcx7SBRiQzE9knagyikV9sADNTabz99fItvkAQH8yGdci35Qr+T wvNB3/HogpqfwWszD+V/m0+hwWe2Ygx+A2HPOaSw2xcSCt80SamZAf4sIBXJcREyP1yh WNz31SOBEHTelpLSQtBa54q2ZsQ+yTO+pTX6FiNiST69oDQQ4I80gri7J+z3jcnazPEV g/KQ== X-Gm-Message-State: AOAM530aomsZ4odZil6LbbTtpj2+crSqMpIYmrUrXOojbct6xYhiBxQg OEGHXjpOc3ru8TbBW4PAP8YhglM9i9o= X-Google-Smtp-Source: ABdhPJyPLYvdq2eDIWp15pxmuu5Q5yJyjvjCIQLTuxE9pkmDrh3VyCl3goXmWQJNXg/TUzqroW3r3Q== X-Received: by 2002:adf:d849:: with SMTP id k9mr18722791wrl.366.1643668427962; Mon, 31 Jan 2022 14:33:47 -0800 (PST) Received: from localhost.localdomain (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net. [86.13.91.161]) by smtp.gmail.com with ESMTPSA id q2sm6986740wrw.14.2022.01.31.14.33.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 14:33:47 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Mon, 31 Jan 2022 22:33:28 +0000 Message-Id: <20220131223330.61563-8-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220131223330.61563-1-djrscally@gmail.com> References: <20220131223330.61563-1-djrscally@gmail.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 7/9] libcamera: ipa: Rename ctrls_ member 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" Now that we have added lens controls, rename the existiing member of the class to clarify that it relates to the sensor's controls. Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Scally --- Changes since v4: - None Changes in v3: - New patch src/ipa/ipu3/ipu3.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index 008f93a7..e539d875 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -162,7 +162,7 @@ private: std::map buffers_; - ControlInfoMap ctrls_; + ControlInfoMap sensorCtrls_; ControlInfoMap lensCtrls_; IPACameraSensorInfo sensorInfo_; @@ -457,22 +457,22 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo, * Compute the sensor V4L2 controls to be used by the algorithms and * to be set on the sensor. */ - ctrls_ = configInfo.sensorControls; + sensorCtrls_ = configInfo.sensorControls; - const auto itExp = ctrls_.find(V4L2_CID_EXPOSURE); - if (itExp == ctrls_.end()) { + const auto itExp = sensorCtrls_.find(V4L2_CID_EXPOSURE); + if (itExp == sensorCtrls_.end()) { LOG(IPAIPU3, Error) << "Can't find exposure control"; return -EINVAL; } - const auto itGain = ctrls_.find(V4L2_CID_ANALOGUE_GAIN); - if (itGain == ctrls_.end()) { + const auto itGain = sensorCtrls_.find(V4L2_CID_ANALOGUE_GAIN); + if (itGain == sensorCtrls_.end()) { LOG(IPAIPU3, Error) << "Can't find gain control"; return -EINVAL; } - const auto itVBlank = ctrls_.find(V4L2_CID_VBLANK); - if (itVBlank == ctrls_.end()) { + const auto itVBlank = sensorCtrls_.find(V4L2_CID_VBLANK); + if (itVBlank == sensorCtrls_.end()) { LOG(IPAIPU3, Error) << "Can't find VBLANK control"; return -EINVAL; } @@ -497,10 +497,10 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo, initAfGrid(configInfo.bdsOutputSize); /* Update the camera controls using the new sensor settings. */ - updateControls(sensorInfo_, ctrls_, ipaControls); + updateControls(sensorInfo_, sensorCtrls_, ipaControls); /* Update the IPASessionConfiguration using the sensor settings. */ - updateSessionConfiguration(ctrls_); + updateSessionConfiguration(sensorCtrls_); for (auto const &algo : algorithms_) { int ret = algo->configure(context_, configInfo); @@ -699,7 +699,7 @@ void IPAIPU3::setControls(unsigned int frame) exposure_ = context_.frameContext.agc.exposure; gain_ = camHelper_->gainCode(context_.frameContext.agc.gain); - ControlList ctrls(ctrls_); + ControlList ctrls(sensorCtrls_); ctrls.set(V4L2_CID_EXPOSURE, static_cast(exposure_)); ctrls.set(V4L2_CID_ANALOGUE_GAIN, static_cast(gain_)); op.sensorControls = ctrls;