From patchwork Thu Feb 24 15:11:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Michel Hautbois X-Patchwork-Id: 15386 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 21AB9C3261 for ; Thu, 24 Feb 2022 15:11:24 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 372196115A; Thu, 24 Feb 2022 16:11:22 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="JGHgLBVl"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 31C5761145 for ; Thu, 24 Feb 2022 16:11:19 +0100 (CET) Received: from tatooine.ideasonboard.com (unknown [IPv6:2a01:e0a:169:7140:ce74:6df2:4b76:b230]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CBAD8E70; Thu, 24 Feb 2022 16:11:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1645715478; bh=ZDm9VKGFF43duA1wbbFF797P0YbVhnM4JL6qJmSB5V4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JGHgLBVlKc56jczH70m/LK/PVmqbKCwDbtTVzZ9LgcJNRv292RvkDMvVhTjRVo2uT bq9Han9051zvG6B9vLR+szdi8soj2tkO5D/5Da9WRCiD2VFufYQvvBP0t8RMa548XL s+9Iwp7FuaorHqnF5ADzrSWx5PgD/JXYaCZ3sNxo= From: Jean-Michel Hautbois To: libcamera-devel@lists.libcamera.org Date: Thu, 24 Feb 2022 16:11:11 +0100 Message-Id: <20220224151113.109858-3-jeanmichel.hautbois@ideasonboard.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220224151113.109858-1-jeanmichel.hautbois@ideasonboard.com> References: <20220224151113.109858-1-jeanmichel.hautbois@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 2/4] ipa: ipu3: Shorten exposure and gain lines 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" When the effective sensor values are stored during the EventStatReady event, the lines are long. Fix it. Signed-off-by: Jean-Michel Hautbois Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/ipa/ipu3/ipu3.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index 3d307708..c0c29416 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -547,8 +547,11 @@ void IPAIPU3::processEvent(const IPU3Event &event) const ipu3_uapi_stats_3a *stats = reinterpret_cast(mem.data()); - context_.frameContext.sensor.exposure = event.sensorControls.get(V4L2_CID_EXPOSURE).get(); - context_.frameContext.sensor.gain = camHelper_->gain(event.sensorControls.get(V4L2_CID_ANALOGUE_GAIN).get()); + int32_t exposure = event.sensorControls.get(V4L2_CID_EXPOSURE).get(); + int32_t gain = event.sensorControls.get(V4L2_CID_ANALOGUE_GAIN).get(); + + context_.frameContext.sensor.exposure = exposure; + context_.frameContext.sensor.gain = camHelper_->gain(gain); parseStatistics(event.frame, event.frameTimestamp, stats); break;