From patchwork Tue Dec 7 22:45:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 15073 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 05D86C3259 for ; Tue, 7 Dec 2021 22:45:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9D7E760890; Tue, 7 Dec 2021 23:45:38 +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="gk4WY0qt"; 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 9E3A860890 for ; Tue, 7 Dec 2021 23:45:33 +0100 (CET) Received: by mail-wr1-x436.google.com with SMTP id o13so687745wrs.12 for ; Tue, 07 Dec 2021 14:45:33 -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=MoUOTTwrvQhKd1EX+dNibtVZY1zAHBq/9uhUx2s5dnE=; b=gk4WY0qt3nT9UMKGtwDke85QXpHIjTSe1cDfi2E3270V64cAsp0HnJCuatLzZ75mrj +r7k7Hp7DgTbcvDPRcl/5GLLfLnjzY9SuDxQh+LOFVOcAqXJR7JUzm0nsgydU/DXh4qX F1fEZKKxTzCZTuhr8m2Ot7bfP6kU/cPlmn3cbvV+S8Oy8Wkb7/Y2MypUCuCrgQYHoj9z 8l3XsWGAPnc553kAwZUAKBQZEu4PFDF/GMGO97+JvoJMfVqCaTYGzk5Q6xopxBfiaXEZ FovGp9GOgEWmSm8yRRBDFOQFtIGB+U2Er6loH/PxGBGIGt8WN7dSn8xBqBBTmmyxDCtS 7WyQ== 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=MoUOTTwrvQhKd1EX+dNibtVZY1zAHBq/9uhUx2s5dnE=; b=HlOSy10iKAHTMc9NyxyewjvJ/nEn6/mcqusdH1ObQRM05/vyAEVdUyuM6WS56rtP+e QSEyScmT2lAcuUE/bXPxO03tIOQLoD3yA42aKvL+m9UJoHNoXGpnmN2o03Dftrq+hwbr CWhD0sQlVVq4yQPHuVayFT7/m1+nWBrm7DjOTmpxJC6qy4INUMERQN7iyzaiUmuwQKhF giRuxkvy9/THRPffgf+9SkCisfLFI6qWe7LxPlQFYXGmdbNy3CZUZhRHKYQcLhHHj2We CNYCWF55O7Q2d0OSF+SWXWKQSC2/q1VtXMEJAOZDaL4kEMRr+5rn/oAeKBqWc4p4G3eQ L1GQ== X-Gm-Message-State: AOAM5300emIbs1zDGVGkNYIyvYTtJTFvaBZxNf+enf7p+4CylF99EGQ+ iJQpQLvCOscGAGDLn2JQYpinqOZLJmQ= X-Google-Smtp-Source: ABdhPJz1ZNmMllYqrtNvZz4ZQotNp2p1s0rza6RgBZ3Ka+oc5vqkPeagk0uMG8sisMps5V/G36mi3w== X-Received: by 2002:adf:dbcb:: with SMTP id e11mr52683403wrj.575.1638917133458; Tue, 07 Dec 2021 14:45:33 -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 y12sm980332wrn.73.2021.12.07.14.45.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Dec 2021 14:45:33 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Tue, 7 Dec 2021 22:45:10 +0000 Message-Id: <20211207224512.753979-8-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211207224512.753979-1-djrscally@gmail.com> References: <20211207224512.753979-1-djrscally@gmail.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 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. Signed-off-by: Daniel Scally Reviewed-by: Laurent Pinchart --- 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 3828650d..fe2bc3af 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -161,7 +161,7 @@ private: std::map buffers_; - ControlInfoMap ctrls_; + ControlInfoMap sensorCtrls_; ControlInfoMap lensCtrls_; IPACameraSensorInfo sensorInfo_; @@ -429,22 +429,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; } @@ -467,10 +467,10 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo, lineDuration_ = sensorInfo_.lineLength * 1.0s / sensorInfo_.pixelRate; /* 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); @@ -669,7 +669,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;