From patchwork Tue Aug 16 19:17:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Rauch X-Patchwork-Id: 17141 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 F255BBE173 for ; Tue, 16 Aug 2022 19:17:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3305F61FC0; Tue, 16 Aug 2022 21:17:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1660677476; bh=tGmq9MkibjeNyPJAEhY26uS3UwTfXP6l6qOOido8UhE=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=zYTVe5668z8cG/AEM8+KZWa0T4FrYks003bGQOiTsXWxxBIAyUV9zMPGN4ANDp9ui fLEf7AZbRessg9jRzQ2oGunWBSNQHg2aBf23Qp2ZFIprLYasFXFUxlA7wQnfIWQh5l ExHP5gCJiWpElPoqiuMZB2y3DSXyGSmkIFxLCqH0iJe8eLdFaodEZQS9N5y+VcICgr KoungCpKCrllpXIXFLVffKGYpHcX8J4zxgaApJGTAOX6riLUh+ok2/QkgxTTQSo6GK 86P7ec7/MYWvBeCr4rTlkBPlyeliMn935wjER32hif8UuFa6BI+vtWNVQf2G6VcVQX BJ8ANrLK6xvgw== Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CBAB061FA9 for ; Tue, 16 Aug 2022 21:17:54 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=gmx.net header.i=@gmx.net header.b="MH65tijP"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1660677474; bh=tGmq9MkibjeNyPJAEhY26uS3UwTfXP6l6qOOido8UhE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=MH65tijPbJTRJ8TobQg+GWYSFw4cltVyfTamH46FVyjYNt84foUp3NW4XOlp5ksjy r6HHe49LoxK1Z9LjxC/2tUwrmvrTejIJBy8za83xe7uL43JwQdy9BDvlfUkfitZwB6 jUhTXouUsN7UX97mC1azgr3HAgChhTQmlS8SUYzs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from voyager ([88.152.184.103]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MKbg4-1o5Ffi11ki-00KywH; Tue, 16 Aug 2022 21:17:54 +0200 To: libcamera-devel@lists.libcamera.org Date: Tue, 16 Aug 2022 21:17:51 +0200 Message-Id: <20220816191752.109151-1-Rauch.Christian@gmx.de> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:UYC2JLnG/dIShBuVWNXGTuyHo6VYT6TocmYtQmnkqGALD9BP15C oW7HnoyPus3FlK4dPIhzhfRLj9CdawnNZheKvxIlce1aPhW9E9y972P/RSIRpoZm1U7sLmO ICd3a7I+MZ2V01sZNR39w2OZWezsZRvidEe/IH/3sUZTBbEO9OfIqf33glfsSqfNo3FYH5V HwVZgBLU1+gmjPbNdFRGw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:vOe9VeoU7sU=:YlEx9c6LP1CURqBIxk13QY /mRXPLOzBmODexshMHx/H8PPohVPrx9kCdgTvIp4gf0FseMym1+KUUs5hapaY4OKqww2yJXN1 2Q9sOlbSJSr5a/FPvJWXAx6cZWQJpHeYu6WCwGsW2eWs9p/QrQn4+tQZFSDehhNFAvC0A0z51 ybY/6AA/91RaslaatLSTngIhh5oS1ZKc4ybYGMXp0vq2JFnDsLFvDZtn/BwCZWReEBITfYooa kxhlmXGpDnGn7svynComXqcItE18ezqSpHhPokZsdTJ0kFwQMmfN3O3jp1uylti98+CvvWxqs DtE5CXIeeT74/qQUY1EmCjoRp/KfOen1tp6owiM0h4EytT2n4BvkzmYAhoEF4WD+BHth9glzP tztMaWexWIuIbprJURjARrJLlxeGZRABziTmfwGPqMucwqRxT6qIetm4+OCx/7utAp31GVLQ6 IXBLYxCeNmGCTQix/rniANynQ8x1wyC5yqyIm31Fts9x+t1XSMG84JDLQ/e1tMd2/yW7IigYP TIcFCTu4G8CvPo7mRxWjO3zzFo6Zf9x/68EvL+7IARONoEyhVhIzUFrijw6JmA7k4Ls2ETFQz 8x9k9HNT6oNVsDTo9BblICEAqCd459VGJb3ksX3FXVkOs3FqvcBjmvHiST0j7iFB1LVvzaQiu 8BDs1C7jxOUO5x8u7v4xuiYNFLWE1Vev1w4yL+4+dRpxFizwZaw68uAj744J4Xn30CGzQ3lI+ DT5Oxbk8/WsaeDOWpDPTow3Jp84vIHOvt2tycxUBeeIzQQN+AJbs8HMrRYWExEj5tsBXCdJuY vB2t1tEHS0Azs+iydFA2zyBjwmGoCGXTa3rLVjvHCKsFDF0OHtT4FOMQSh4mLfgq2LoYHk9TP idCgqlkuLNbBYMnNPCduEzKw7kzBsVOUuDuv7GUObIgZbS7eoHUYmWSohOApU2VjtJoZo38ey 3LkR63/wm32fe9cK+S22T/qffKHSLPc5UZtWbhPdW25E5uj+lofMtCB/lPPqZmrlo3OqWCChl uBtGjv2do1qCYB6ZwGECxmI1dGc7Il65T/ZlF6AicJiKLkm0OfofmOnfEe1FIYrW+u7ECldod 46vcUp95OIcAwbkoEePznV6tUqxmSc3iyyDyS+BAg3uFTf3jMgXQ/86PA== Subject: [libcamera-devel] [PATCH v2 0/1] libcamera: set ControlInfo for Span 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: Christian Rauch via libcamera-devel From: Christian Rauch Reply-To: Christian Rauch Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, I sent this a while ago before some control values were defined as fixed-sized Spans. My original motivation for making the min/max/def values the same size as the Span was that I would be able to determine the Span size online. This is not a requirement anymore, since I can obtain the Span size from its 'extent'. However, back then, there was also a discussion about the semantics of min/max values for vectors and matrices. I am sending this now again to ask if there is interest in having control value bounds of the same dimensionality as the Span itself. I envision that the min/max/def values could, per control value, either be scalar, meaning that the same min/max/def applies to all elements in the Span, or it could be a vector of the same dimensionality as the Span, meaning that the min/max/def is taken elementwise. I see a couple, of use cases for elementwise bounds. Example 1: The 'FrameDurationLimits' stores two elements, the minimum and maximum frame duration. In the current setting, both can range from 33333 to 120000 on the Raspberry Pi. This allows setting the minimum and maximum frame duration to the same value, effectively setting it fixed just like the 'FrameDuration'. It also allows for the maximum frame duration to be lower than the minimum frame duration, which does not make sense. Example 2: The 'ColourCorrectionMatrix' is a 3x3 matrix, linearly mapping (r,g,b) colour values. By default, this should be the identity matrix with the diagonal elements set to 1 and the rest to 0. Using a scalar to express min/max/def values for this matrix also does not make sense. What do you think about allowing vector types for min/max/def control values? In such a case, we could probably also make sure that the bounds have the same dimensionality as the Span via the extent. Best, Christian Rauch (1): libcamera: set ControlInfo for Span Controls src/ipa/ipu3/ipu3.cpp | 6 +++--- src/ipa/raspberrypi/raspberrypi.cpp | 14 +++++++++++--- test/serialization/ipa_data_serializer_test.cpp | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) --- 2.34.1