From patchwork Wed Aug 10 00:29:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 17065 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 05420C327D for ; Wed, 10 Aug 2022 00:29:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B068E63336; Wed, 10 Aug 2022 02:29:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1660091365; bh=vgKidD4dUHJiE6MqADbTQ7+5nNK3eHGDYxq/2y8tFCE=; 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=YlXbE1+ZTVY59rfrMxqS964uOwzkZ6pDaJKdMuuwB2OSyZX04mGRlhlaIY4Tq4Gi9 I9QQF+EVGnxmsEp3aXfnB/DYquN++QZPo2LmV/yKdduc2kWhPtZG1EAZs7UrJKIQvh RxP61Heq/p5QRq656BUNshvr4eRK+/2OxbZWs0RIQzx8l/QDYaQQgwCnLImQL6r3Et bG7bs1dz3YIrD3U8HqSss4mME6vsDwAimspXrPEk3ort+MRPC5rcx3fyt71qzd7OMM RQw0075p47SFBVJJtxXKPoHz+HcVu/cKx7Yv7x1Wj1Dzh6biTc6xhaMxKuBsPjwjCD p1LdHX3ZUW8uQ== 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 EB44763334 for ; Wed, 10 Aug 2022 02:29:23 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="RY3hfScy"; 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 66FD7481; Wed, 10 Aug 2022 02:29:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1660091363; bh=vgKidD4dUHJiE6MqADbTQ7+5nNK3eHGDYxq/2y8tFCE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RY3hfScy00EGPq4JFJ2S8S1GuQ8vXsLhXpeU5mKW2S3ygMuYB5JdQAd2EYbDL3Epx ii74LGWXSYcY2olytDN5BOPrG3XB11Tl/fPnG+0968rNbO5UGFnp+PdGcdyIleXSFG e1xaSl0hD5Q02ARp9reCIXq0HfWqr8+CcT8kFywY= To: libcamera-devel@lists.libcamera.org Date: Wed, 10 Aug 2022 03:29:06 +0300 Message-Id: <20220810002906.5406-5-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220810002906.5406-1-laurent.pinchart@ideasonboard.com> References: <20220810002906.5406-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 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 --- 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 69c73f8c780a..6befdd71433d 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -567,19 +567,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) { @@ -884,7 +883,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; } @@ -1168,8 +1167,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.