From patchwork Thu Oct 6 23:07:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 17559 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 0278CBD16B for ; Thu, 6 Oct 2022 23:08:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A7A9C62D15; Fri, 7 Oct 2022 01:08:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1665097682; bh=wPRX9qYEUtVsq1h35g13Cuk4X6YvkP3ZOA1nlRHv5sI=; 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=N75PBoz24Ox6x/oXaBaAIblDOMpssRhXxM8POhbic8hsBjmrM0Dlb9W7aOQ24x3np QwdIqOXcqytHKTx74dO803jf7H4CBe4yXEYFzU2dQeDyWpIA/2JArNlNFwsy506/Kw QMpvXCeBThMh56e9gVszKkSylIP2sxIpbQeQPdzAtnC5SW2YUU4sdk1R8zGHvKD6IY vgKiCh1Kdbcxz11qdSFqXaJDU0nYNIhjJo7qmGwjm4hhet5jbn97sSyqvRjG88CH7y qMlZB4grO9YXZtLPAECo2cmWNGd5Z+zbmWKbAkd8sGV0VVTFQeuoOQvFhnKpMpyD23 DLCYSw0BNclrg== 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 2AE2562D12 for ; Fri, 7 Oct 2022 01:08:01 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="BbvTtrnv"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A51B16D6; Fri, 7 Oct 2022 01:08:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1665097680; bh=wPRX9qYEUtVsq1h35g13Cuk4X6YvkP3ZOA1nlRHv5sI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BbvTtrnvkvtpvJy5D6TUbnTTkAdc3ICL8HQT8nRhQIf/CAMAcsrYrVwnL/xFW3JvD u26BwyLUhOo9eLQI0/SgZ/9aiMo/Y5U6dh/kbEUOJ8FuFXhzoE9nmbxlHD4EMbOeNg R5Fp0OIM2OrVlUOPkmAWlQ/dOaDTIgAkadq3hIa0= To: libcamera-devel@lists.libcamera.org Date: Fri, 7 Oct 2022 02:07:47 +0300 Message-Id: <20221006230747.11688-5-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221006230747.11688-1-laurent.pinchart@ideasonboard.com> References: <20221006230747.11688-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 4/4] ipa: raspberrypi: Remove unneeded Span casts 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: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Commit 09c1b081baa2 ("libcamera: controls: Generate and use fixed-sized Span types") added explicit Span casts for fixed extent spans that were required due to the ControlList::set() function that takes an std::initializer_list not being able to infer a control size from template arguments. This has now been fixed, so the casts are not needed anymore. Drop them. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Christian Rauch Reviewed-by: Umang Jain --- src/ipa/raspberrypi/raspberrypi.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index 8d731435764e..14b06a4feae6 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -566,19 +566,18 @@ void IPARPi::reportMetadata() AwbStatus *awbStatus = rpiMetadata_.getLocked("awb.status"); if (awbStatus) { - libcameraMetadata_.set(controls::ColourGains, - Span({ static_cast(awbStatus->gainR), - static_cast(awbStatus->gainB) })); + libcameraMetadata_.set(controls::ColourGains, { static_cast(awbStatus->gainR), + static_cast(awbStatus->gainB) }); libcameraMetadata_.set(controls::ColourTemperature, awbStatus->temperatureK); } BlackLevelStatus *blackLevelStatus = rpiMetadata_.getLocked("black_level.status"); if (blackLevelStatus) libcameraMetadata_.set(controls::SensorBlackLevels, - Span({ static_cast(blackLevelStatus->blackLevelR), - static_cast(blackLevelStatus->blackLevelG), - static_cast(blackLevelStatus->blackLevelG), - static_cast(blackLevelStatus->blackLevelB) })); + { static_cast(blackLevelStatus->blackLevelR), + static_cast(blackLevelStatus->blackLevelG), + static_cast(blackLevelStatus->blackLevelG), + static_cast(blackLevelStatus->blackLevelB) }); FocusStatus *focusStatus = rpiMetadata_.getLocked("focus.status"); if (focusStatus && focusStatus->num == 12) { @@ -883,7 +882,7 @@ void IPARPi::queueRequest(const ControlList &controls) if (gains[0] != 0.0f && gains[1] != 0.0f) /* A gain of 0.0f will switch back to auto mode. */ libcameraMetadata_.set(controls::ColourGains, - Span({ gains[0], gains[1] })); + { gains[0], gains[1] }); break; } @@ -1167,8 +1166,8 @@ void IPARPi::applyFrameDurations(Duration minFrameDuration, Duration maxFrameDur /* Return the validated limits via metadata. */ libcameraMetadata_.set(controls::FrameDurationLimits, - Span({ static_cast(minFrameDuration_.get()), - static_cast(maxFrameDuration_.get()) })); + { static_cast(minFrameDuration_.get()), + static_cast(maxFrameDuration_.get()) }); /* * Calculate the maximum exposure time possible for the AGC to use.