From patchwork Mon Feb 7 13:59:36 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: 15336 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 EDB58BDCBF for ; Mon, 7 Feb 2022 13:59:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8CC4161085; Mon, 7 Feb 2022 14:59:45 +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="ryD17Quu"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9F3CE6106C for ; Mon, 7 Feb 2022 14:59:42 +0100 (CET) Received: from tatooine.ideasonboard.com (unknown [IPv6:2a01:e0a:169:7140:f807:d5e7:1307:1df2]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 41FE2A50; Mon, 7 Feb 2022 14:59:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1644242382; bh=ZDm9VKGFF43duA1wbbFF797P0YbVhnM4JL6qJmSB5V4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ryD17QuuxSnmZCJuH9v4IK+l8yz709V2iqFPg0ogOcSbLcBBC4ITItbJvA0ubAkdv +EoO4NUiBbzf4d+ZudfQtPcuOapqj2sKGqit4JquIFNF9TAiOVX0QLmaqgJ9S9IwCk oaimPtoxbmR7QDRwXlZgWlyBtHEUzgSeJnzW89Uo= From: Jean-Michel Hautbois To: libcamera-devel@lists.libcamera.org Date: Mon, 7 Feb 2022 14:59:36 +0100 Message-Id: <20220207135937.221226-3-jeanmichel.hautbois@ideasonboard.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220207135937.221226-1-jeanmichel.hautbois@ideasonboard.com> References: <20220207135937.221226-1-jeanmichel.hautbois@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/3] 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;