From patchwork Tue Dec 15 10:16:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 10668 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 01B61BD80A for ; Tue, 15 Dec 2020 10:16:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 790FB61589; Tue, 15 Dec 2020 11:16:39 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Y7233wkR"; dkim-atps=neutral Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 71908600FD for ; Tue, 15 Dec 2020 11:16:37 +0100 (CET) Received: by mail-wm1-x32f.google.com with SMTP id k10so16357479wmi.3 for ; Tue, 15 Dec 2020 02:16:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XHIjF8pTtfTR+I7MO5gyDSmE2jrPjHp9CjV3PgFMXLI=; b=Y7233wkRql+LteRTsV2/HK0cVcSaf6svl+bZsmH5izAgXA3KABOsaquaZgycoO0wDA TzCm+SRQoqIVCDIgxjQtFuvPCxIT/yMzMhXjWdwhzSRaDTj8a9joevpdEmH+433WZbjH stjvMd8jc7GEtUyPyaaL3NNc0Awtan9Xd1XAJOWdjS2pWkSME1iQ3olZunM/E2d9l826 PgNJK8ZPGkFo9rHPmS96WmKYQzj8Uw7RoSuYJ2Ts2VTMgLyarup3siMaUdT6wCKyrAKG k+jz7uzGL+Wiw7W7EEXVyehWNhAIYc9pA+V0v9zPOKlH7I/b51+TIkMS0vJFr/AoCVK9 Cizg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XHIjF8pTtfTR+I7MO5gyDSmE2jrPjHp9CjV3PgFMXLI=; b=KH+bnXwtR1AOTabMZpyqbIK73EGFXQmD9yqvKxxiPtsM+bMt4BR7jjdISnlC9gd9Wc vEQHf5GLeA57+zJvHHGUEdqshYutdz4Jc8LN+ttlwtUvXutGjk1SzbvAo/jitD62Zkh3 qEt6CJNr3zqyr51Xz9O59RZ5cNxF+b28zVg9eaMGyBQfo290MJXnDW6Lu2qwtXOVF9ru cCDnhEq1TqBecazPAdeEkwSi4hM41Tr6tta+7M2QxL0UOmOit1W3OSUK4NWh0m/ERTjy y6sPq8/LN63VSG6+HbSx+FGFaaUsPabOha90eeaDJIPCHkWPpsOx7xTGp+QhaBD7ufQ6 Y0SA== X-Gm-Message-State: AOAM532E6Leez9zE0Ccx3bFOmb05w5M8TV9Ex1ca+H9ifgftMqAZwaCk 7521mcCM0AQB5p62cJBUvJCviFMTyw7Njg== X-Google-Smtp-Source: ABdhPJxo8llnC1fcTKHQh/q75I0pGlTvMKCSi6yybgnEPhA0d+BFH+zEQMRDXvY2irsn7cWuCVOOuw== X-Received: by 2002:a7b:c385:: with SMTP id s5mr31815276wmj.170.1608027396674; Tue, 15 Dec 2020 02:16:36 -0800 (PST) Received: from localhost.localdomain ([2a00:1098:3142:14:a00:27ff:fe4d:f6a2]) by smtp.gmail.com with ESMTPSA id s63sm39801117wms.18.2020.12.15.02.16.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 02:16:36 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Tue, 15 Dec 2020 10:16:32 +0000 Message-Id: <20201215101633.21546-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] ipa: raspberrypi: Rename unicamCtrls_ to sensorCtrls_ 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" These specific controls are part of the sensor device, so rename them appropriately. Signed-off-by: Naushir Patuck Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/ipa/raspberrypi/raspberrypi.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index a7439bad..5f2e07fd 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -113,7 +113,7 @@ private: std::map buffers_; - ControlInfoMap unicamCtrls_; + ControlInfoMap sensorCtrls_; ControlInfoMap ispCtrls_; ControlList libcameraMetadata_; @@ -177,7 +177,7 @@ int IPARPi::start(const IPAOperationData &data, IPAOperationData *result) /* SwitchMode may supply updated exposure/gain values to use. */ metadata.Get("agc.status", agcStatus); if (agcStatus.shutter_time != 0.0 && agcStatus.analogue_gain != 0.0) { - ControlList ctrls(unicamCtrls_); + ControlList ctrls(sensorCtrls_); applyAGC(&agcStatus, ctrls); result->controls.emplace_back(ctrls); result->operation |= RPi::IPA_CONFIG_SENSOR; @@ -287,7 +287,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo, result->operation = 0; - unicamCtrls_ = entityControls.at(0); + sensorCtrls_ = entityControls.at(0); ispCtrls_ = entityControls.at(1); /* Setup a metadata ControlList to output metadata. */ @@ -364,7 +364,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo, controllerInit_ = true; /* Supply initial values for gain and exposure. */ - ControlList ctrls(unicamCtrls_); + ControlList ctrls(sensorCtrls_); AgcStatus agcStatus; agcStatus.shutter_time = DefaultExposureTime; agcStatus.analogue_gain = DefaultAnalogueGain; @@ -879,7 +879,7 @@ void IPARPi::processStats(unsigned int bufferId) struct AgcStatus agcStatus; if (rpiMetadata_.Get("agc.status", agcStatus) == 0) { - ControlList ctrls(unicamCtrls_); + ControlList ctrls(sensorCtrls_); applyAGC(&agcStatus, ctrls); IPAOperationData op; @@ -917,12 +917,12 @@ void IPARPi::applyAGC(const struct AgcStatus *agcStatus, ControlList &ctrls) int32_t gainCode = helper_->GainCode(agcStatus->analogue_gain); int32_t exposureLines = helper_->ExposureLines(agcStatus->shutter_time); - if (unicamCtrls_.find(V4L2_CID_ANALOGUE_GAIN) == unicamCtrls_.end()) { + if (sensorCtrls_.find(V4L2_CID_ANALOGUE_GAIN) == sensorCtrls_.end()) { LOG(IPARPI, Error) << "Can't find analogue gain control"; return; } - if (unicamCtrls_.find(V4L2_CID_EXPOSURE) == unicamCtrls_.end()) { + if (sensorCtrls_.find(V4L2_CID_EXPOSURE) == sensorCtrls_.end()) { LOG(IPARPI, Error) << "Can't find exposure control"; return; }