From patchwork Thu Aug 11 15:02:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 17081 X-Patchwork-Delegate: jacopo@jmondi.org 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 3EDD2BE173 for ; Thu, 11 Aug 2022 15:02:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F11086333C; Thu, 11 Aug 2022 17:02:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1660230163; bh=hOZPkh2xuR9o9pecJHmkjnSBInfMf4EmLkB0U2PWgc4=; 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=NKIrdhG4NOGelB5O+1IxKt5pYlrHah546zXfvcQRU3m2AjPuvtF7br3n9CXW3rja7 LJBOKEAHR7tuBeAVFLbMtOtHVGRv6stH+RRnH/+ktu14kWQf4YfIPsgLA5D70L40jZ GhWqvRAewaY1SshgyiKPuCwrFbeheFfSJy9dnO7fqx57+M85S0M/qlh5yok33fWy/G tHoK1H2TMoj1xwtdWcaW/e9+9AjjO8HXr7G10I96fGoZQ6Zrh+Z+p4xpvf9BncITjQ RNJ55XYcPZ1yt+hl0EONXPc58gpcTuUQ2FwJ1bkaGtcIk3e9tBiZ49LNfHdspdDpej mVdf4YqgEoMGA== Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D91CB63330 for ; Thu, 11 Aug 2022 17:02:39 +0200 (CEST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id E70151BF205; Thu, 11 Aug 2022 15:02:38 +0000 (UTC) To: libcamera-devel@lists.libcamera.org Date: Thu, 11 Aug 2022 17:02:18 +0200 Message-Id: <20220811150219.62066-6-jacopo@jmondi.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220811150219.62066-1-jacopo@jmondi.org> References: <20220811150219.62066-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 5/6] ipa: rkisp1: Remove AE-related controls 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: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The RkISP1 IPA registers the AeEnabled control as available but does not handle it yet and returns the AeLocked control in the prepareMetadata() function with a value currently hard-coded to 0. Remove the AEGC-related controls as they currently have no purpose and both AeLocked and AeEnable will be removed in the next patch. A proper handling of the AEGC algorithm will have to be implemented using the newly introduced AEGC controls. Signed-off-by: Jacopo Mondi Reviewed-by: Paul Elder --- src/ipa/rkisp1/rkisp1.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 17d42d38eb45..dac3a43f803d 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -64,7 +64,6 @@ protected: private: void setControls(unsigned int frame); - void prepareMetadata(unsigned int frame, unsigned int aeState); std::map buffers_; std::map mappedBuffers_; @@ -91,7 +90,6 @@ namespace { /* List of controls handled by the RkISP1 IPA */ const ControlInfoMap::Map rkisp1Controls{ - { &controls::AeEnable, ControlInfo(false, true) }, { &controls::Brightness, ControlInfo(-1.0f, 0.993f) }, { &controls::Contrast, ControlInfo(0.0f, 1.993f) }, { &controls::Saturation, ControlInfo(0.0f, 1.993f) }, @@ -321,14 +319,15 @@ void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId context_.frameContext.sensor.gain = camHelper_->gain(sensorControls.get(V4L2_CID_ANALOGUE_GAIN).get()); - unsigned int aeState = 0; - for (auto const &algo : algorithms()) algo->process(context_, nullptr, stats); setControls(frame); - prepareMetadata(frame, aeState); + /* \todo: prepare metadata. */ + + ControlList ctrls(controls::controls); + metadataReady.emit(frame, ctrls); } void IPARkISP1::setControls(unsigned int frame) @@ -343,16 +342,6 @@ void IPARkISP1::setControls(unsigned int frame) setSensorControls.emit(frame, ctrls); } -void IPARkISP1::prepareMetadata(unsigned int frame, unsigned int aeState) -{ - ControlList ctrls(controls::controls); - - if (aeState) - ctrls.set(controls::AeLocked, aeState == 2); - - metadataReady.emit(frame, ctrls); -} - } /* namespace ipa::rkisp1 */ /*