From patchwork Thu Mar 3 23:49:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 15414 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 A4162BE08A for ; Thu, 3 Mar 2022 23:50:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4B9FB6116E; Fri, 4 Mar 2022 00:50:23 +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="hElCWrVd"; dkim-atps=neutral Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9318261184 for ; Fri, 4 Mar 2022 00:50:17 +0100 (CET) Received: by mail-wm1-x333.google.com with SMTP id m42-20020a05600c3b2a00b00382ab337e14so5072104wms.3 for ; Thu, 03 Mar 2022 15:50:17 -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=ddSe0HKy7Vddk2WXwI75i30bm3UafMYEjd1HK05iugs=; b=hElCWrVdQCzC1j9oFf7jSRC5rRqt+ttTCiGHHbMCaEcSibtDRYnTnWshQsJY/tVNSo qrbwyraLQHvZNqn+DpTuQbT4W+wGTwAd5jexcOMeJoOAAkuFV7nWfTWMD4Tg9GKuVID4 EYGvH/BIQPVVmbwR/eEiCCTeFmAIpXOgwaxNOl91YwD3v/fw5coREjQ/VPn8dgVk+zpB Dt/hveFPQCi5Q6DFQTBg+40fzroWpcun0PmmsR0cOmx02KWpZljGY/zGEei3V6tpbU3V MztpitE0tvBmWvnnr6ChLzKdNnDibYrNs/C0B/RJLqSf/TykxFrnFgD9RGup7cmZbM++ W9EQ== 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=ddSe0HKy7Vddk2WXwI75i30bm3UafMYEjd1HK05iugs=; b=epNu+OX1Ho5SvjLcmhK7yCOEqK9SuzE5ZolEomQXSMmbr57wDSnxkyd1545bqJB08o 1BS+Bs1Ek/t3XV5NP3bQoIlz/I/X/OOFPHFxjqm4bx9CuwVyIuH7ocPQUaHT8GCfnIV7 yI6WNVxlw3SOr7PqN7AUCvJV05oc1DmpSl887GgGxlVflFTPdttPc8n0o23IK9w23q98 BLgbyYw+ZxUQI9QN8PCBJfcPHWoJq0YzPwK3wA7TwgWn51vmAaR2oPeSH1SSYA/8G1y/ L1k03i3TgOpngExNi5h1Po5CkSP6nUpiuBV/CKXw7KdXq9gGffTzdCKL59cBqY9tZb2P lIcw== X-Gm-Message-State: AOAM533CI7OSqC0hRVsUhhaOIyZu3WGjRXjfZ+wwA9oNJkXePjPFNDEj P3vFv0QX6Oxiz1RCb8OkTcs8wU4n5ada1g== X-Google-Smtp-Source: ABdhPJxgXXS9SyNDkqikeu185KnyxK3L4mOXDVL29jCIAa2kM6sZwPK83dNigq7uU2mj4DwmNYppQg== X-Received: by 2002:a05:600c:1d13:b0:389:7a40:56e2 with SMTP id l19-20020a05600c1d1300b003897a4056e2mr695216wms.69.1646351417317; Thu, 03 Mar 2022 15:50:17 -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 y4-20020adff144000000b001f022290737sm3079779wro.6.2022.03.03.15.50.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 15:50:17 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Thu, 3 Mar 2022 23:49:54 +0000 Message-Id: <20220303234956.1463551-8-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220303234956.1463551-1-djrscally@gmail.com> References: <20220303234956.1463551-1-djrscally@gmail.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 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 Reviewed-by: Jean-Michel Hautbois --- Changes in v5: - None 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;