[{"id":22746,"web_url":"https://patchwork.libcamera.org/comment/22746/","msgid":"<Yl78AASsfXnda5rY@pendragon.ideasonboard.com>","date":"2022-04-19T20:44:25","subject":"Re: [libcamera-devel] [PATCH v3 1/4] libcamera: controls: Define\n\tsize of array controls as a shape vector","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Christian,\n\nThank you for the patch.\n\nOn Fri, Apr 08, 2022 at 02:42:28AM +0100, Christian Rauch via libcamera-devel wrote:\n> This follows the convention in other Tensor APIs. Since all tensors are\n> represented as a Span with a single dimension, values provided in 'size'\n> are interpreted as fixed-size Spans, while an empty array (\"[]\") will be\n> interpreted as variable-sized Span.\n\nI like this, but it causes a compilation failure:\n\nIn file included from ../../src/libcamera/camera_sensor.cpp:8:\nIn file included from ../../include/libcamera/internal/camera_sensor.h:17:\nIn file included from include/libcamera/control_ids.h:15:\n../../include/libcamera/controls.h:402:8: error: no matching member function for call to 'set'\n                val->set<T>(Span<const typename std::remove_cv_t<V>>{ value.begin(), value.size() });\n                ~~~~~^~~~~~\n../../src/libcamera/camera_sensor.cpp:421:14: note: in instantiation of function template specialization 'libcamera::ControlList::set<libcamera::Rectangle, libcamera::Rectangle>' requested here\n        properties_.set(properties::PixelArrayActiveAreas, { activeArea_ });\n                    ^\n../../include/libcamera/controls.h:177:7: note: candidate function template not viable: no known conversion from 'Span<const typename std::remove_cv_t<Rectangle>>' (aka 'Span<const libcamera::Rectangle>') to 'const libcamera::Rectangle' for 1st argument\n        void set(const T &value)\n             ^\n../../include/libcamera/controls.h:189:7: note: candidate template ignored: requirement 'details::is_span<libcamera::Rectangle>::value || std::is_same<std::string, libcamera::Rectangle>::value' was not satisfied [with T = libcamera::Rectangle]\n        void set(const T &value)\n             ^\n1 error generated.\n\nI think you'll have to update the gen-controls.py script in the same\npatch to take the change into account. Patch 2/4 can then move to\nfixed-extent spans.\n\n> Signed-off-by: Christian Rauch <Rauch.Christian@gmx.de>\n> ---\n>  src/libcamera/control_ids.yaml  | 2 +-\n>  src/libcamera/property_ids.yaml | 4 ++--\n>  2 files changed, 3 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> index 9d4638ae..c3f593a1 100644\n> --- a/src/libcamera/control_ids.yaml\n> +++ b/src/libcamera/control_ids.yaml\n> @@ -291,7 +291,7 @@ controls:\n>          transformation. The 3x3 matrix is stored in conventional reading\n>          order in an array of 9 floating point values.\n> \n> -      size: [3x3]\n> +      size: [3,3]\n> \n>    - ScalerCrop:\n>        type: Rectangle\n> diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml\n> index 12ecbce5..47c350ed 100644\n> --- a/src/libcamera/property_ids.yaml\n> +++ b/src/libcamera/property_ids.yaml\n> @@ -497,7 +497,7 @@ controls:\n> \n>    - PixelArrayOpticalBlackRectangles:\n>        type: Rectangle\n> -      size: [n]\n> +      size: []\n>        description: |\n>          The pixel array region(s) which contain optical black pixels\n>          considered valid for calibration purposes.\n> @@ -592,7 +592,7 @@ controls:\n> \n>    - PixelArrayActiveAreas:\n>        type: Rectangle\n> -      size: [n]\n> +      size: []\n>        description: |\n>          The PixelArrayActiveAreas property defines the (possibly multiple and\n>          overlapping) portions of the camera sensor readable pixel matrix","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 09595C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 Apr 2022 20:44:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7A71065646;\n\tTue, 19 Apr 2022 22:44:26 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E3654604B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Apr 2022 22:44:24 +0200 (CEST)","from pendragon.ideasonboard.com (85-76-5-145-nat.elisa-mobile.fi\n\t[85.76.5.145])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 98A8525B;\n\tTue, 19 Apr 2022 22:44:23 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1650401066;\n\tbh=4BkOBGlmcU7qrs7epid6ylwBCbeqO3C5co5M7SQzPdU=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=YMECOP7M92ytNH5Q8Ag+MlQVAa5viSlSHyXmCxs5q90Jyueoexf17kjwKxry9TbIo\n\tdT5okG+/aRGnL8B+ET3ZNmVLR9Eqdp3glJlOli7VlYUK7TnP3f+SKbXkuNa2ufvUMe\n\tNUpC7qMjC+wL1iOz8cpCXyqwxK8S013JUU29DQOKBbyMuMivQcJiNrhnrF5wLUq1kL\n\tTkOE/b3YHbW2QZuJSLZezA3qEKWLiHmr+yHpBAQeSlSKmbz1FZYmpY/10jywVcultn\n\tzWkRUwonaByuRHal3g3E4VeBFhPgxhbeQ9v0+bPQqeVoueNF0MIni0rUTmDRhycQ2r\n\tdFEWWfMgfOYCA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1650401064;\n\tbh=4BkOBGlmcU7qrs7epid6ylwBCbeqO3C5co5M7SQzPdU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=CqPmzQJ5Bh6CD2Ted0aLBxE0sNU/mN3a7MdSGwOvSa6QUPWcEKSd1stHYErqVz2Tg\n\tPPJlLR1q3IwWjLge1O/J6TbRgKuzHM5Q2UtycoG6d+5DslBSyD1YG+eh5+gxXeZDQ8\n\tWjad5grHkmWuypl3sGAPR7k1po0XN2DAmpOqomxw="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"CqPmzQJ5\"; dkim-atps=neutral","Date":"Tue, 19 Apr 2022 23:44:25 +0300","To":"Christian Rauch <Rauch.Christian@gmx.de>","Message-ID":"<Yl78AASsfXnda5rY@pendragon.ideasonboard.com>","References":"<20220408014231.231083-1-Rauch.Christian@gmx.de>\n\t<20220408014231.231083-2-Rauch.Christian@gmx.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220408014231.231083-2-Rauch.Christian@gmx.de>","Subject":"Re: [libcamera-devel] [PATCH v3 1/4] libcamera: controls: Define\n\tsize of array controls as a shape vector","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22754,"web_url":"https://patchwork.libcamera.org/comment/22754/","msgid":"<20220420020755.GZ3237525@pyrite.rasen.tech>","date":"2022-04-20T02:07:55","subject":"Re: [libcamera-devel] [PATCH v3 1/4] libcamera: controls: Define\n\tsize of array controls as a shape vector","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/people/97/","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"content":"Hi Christian,\n\nOn Fri, Apr 08, 2022 at 02:42:28AM +0100, Christian Rauch via libcamera-devel wrote:\n> This follows the convention in other Tensor APIs. Since all tensors are\n> represented as a Span with a single dimension, values provided in 'size'\n> are interpreted as fixed-size Spans, while an empty array (\"[]\") will be\n> interpreted as variable-sized Span.\n\nI see, so you can just chain comma-separated values to add more\ndimensions, neat.\n\nSo if you have a variable-length array of objects of size 3 then you'll\nhave [3,] ? I suppose it's not that bad.\n\n> \n> Signed-off-by: Christian Rauch <Rauch.Christian@gmx.de>\n\nBy the way, you have a Reviewed-by tag from Jacopo on v1.\n\n\nPaul\n\n> ---\n>  src/libcamera/control_ids.yaml  | 2 +-\n>  src/libcamera/property_ids.yaml | 4 ++--\n>  2 files changed, 3 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> index 9d4638ae..c3f593a1 100644\n> --- a/src/libcamera/control_ids.yaml\n> +++ b/src/libcamera/control_ids.yaml\n> @@ -291,7 +291,7 @@ controls:\n>          transformation. The 3x3 matrix is stored in conventional reading\n>          order in an array of 9 floating point values.\n> \n> -      size: [3x3]\n> +      size: [3,3]\n> \n>    - ScalerCrop:\n>        type: Rectangle\n> diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml\n> index 12ecbce5..47c350ed 100644\n> --- a/src/libcamera/property_ids.yaml\n> +++ b/src/libcamera/property_ids.yaml\n> @@ -497,7 +497,7 @@ controls:\n> \n>    - PixelArrayOpticalBlackRectangles:\n>        type: Rectangle\n> -      size: [n]\n> +      size: []\n>        description: |\n>          The pixel array region(s) which contain optical black pixels\n>          considered valid for calibration purposes.\n> @@ -592,7 +592,7 @@ controls:\n> \n>    - PixelArrayActiveAreas:\n>        type: Rectangle\n> -      size: [n]\n> +      size: []\n>        description: |\n>          The PixelArrayActiveAreas property defines the (possibly multiple and\n>          overlapping) portions of the camera sensor readable pixel matrix\n> --\n> 2.25.1\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3A940C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 20 Apr 2022 02:08:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6B3E365642;\n\tWed, 20 Apr 2022 04:08:06 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9DA236563F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Apr 2022 04:08:04 +0200 (CEST)","from pyrite.rasen.tech (softbank114048062035.bbtec.net\n\t[114.48.62.35])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 047AC25B;\n\tWed, 20 Apr 2022 04:08:02 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1650420486;\n\tbh=h5xRrclELMmIJ+TG1xWLtz7vY14rrwP4nvKniCxCgRU=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=14DnGsmVnJ4sQozVVp/livW5dzvcXN4v/QjB6E8lKwYQ6Vp1N3ZBk1s4ilkTpqJui\n\tV2UglIsl68s04j1cQnn7zyPxenElaHUNC5bfi3HPsa9lS1aee43ZX8nUHKtMYM5pSK\n\tVeNrmqVAC7ohHBGmH98w/wzPjuq1/qYJj3c7QJPLYPc8yIDwgE3AaQ7dnyktP42m5o\n\tZTpCQEwHWZaDWbIkZ9v4YKVt5kINo/q3reh1ST8d4Cm8OP3/7JAY70f5sRYc+8p8GJ\n\tQeDqYr4pimCyYG71EYiYi/AhJbEPxWIZfH2GoLqPIUSUiLe1OnHGpivUK1PO+VLLau\n\tFx17OY6J4vMCA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1650420484;\n\tbh=h5xRrclELMmIJ+TG1xWLtz7vY14rrwP4nvKniCxCgRU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=mEmOhxxjVMccvWm6ZaZm5y87hP5rhUHM+sqZldpz+XS9gqcptBOXYdX88CM3a5bnZ\n\tOqZWu7OyuKJZw4Kq8ludFEhnTf18XrpVvPGA7NqNFk01758ifiYzrx1mfqiw3w3fi/\n\tcV0yJzEarAD3an2fzY/bOumZE1KtSqaT468BlXOY="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"mEmOhxxj\"; dkim-atps=neutral","Date":"Wed, 20 Apr 2022 11:07:55 +0900","To":"Christian Rauch <Rauch.Christian@gmx.de>","Message-ID":"<20220420020755.GZ3237525@pyrite.rasen.tech>","References":"<20220408014231.231083-1-Rauch.Christian@gmx.de>\n\t<20220408014231.231083-2-Rauch.Christian@gmx.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20220408014231.231083-2-Rauch.Christian@gmx.de>","Subject":"Re: [libcamera-devel] [PATCH v3 1/4] libcamera: controls: Define\n\tsize of array controls as a shape vector","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"paul.elder@ideasonboard.com","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22792,"web_url":"https://patchwork.libcamera.org/comment/22792/","msgid":"<03a24104-9bf1-bdd3-2f42-8c90715d3242@gmx.de>","date":"2022-04-25T23:50:17","subject":"Re: [libcamera-devel] [PATCH v3 1/4] libcamera: controls: Define\n\tsize of array controls as a shape vector","submitter":{"id":111,"url":"https://patchwork.libcamera.org/api/people/111/","name":"Christian Rauch","email":"Rauch.Christian@gmx.de"},"content":"Hi Paul,\n\nAm 20.04.22 um 03:07 schrieb paul.elder@ideasonboard.com:\n> Hi Christian,\n>\n> On Fri, Apr 08, 2022 at 02:42:28AM +0100, Christian Rauch via libcamera-devel wrote:\n>> This follows the convention in other Tensor APIs. Since all tensors are\n>> represented as a Span with a single dimension, values provided in 'size'\n>> are interpreted as fixed-size Spans, while an empty array (\"[]\") will be\n>> interpreted as variable-sized Span.\n>\n> I see, so you can just chain comma-separated values to add more\n> dimensions, neat.\n>\n> So if you have a variable-length array of objects of size 3 then you'll\n> have [3,] ? I suppose it's not that bad.\n\nSpans are 1-dimensional for now and all documented dimensions are\n\"flattened\". Having multiple dimensions is really only useful for\ndocumentation purposes.\nOnce multidimensional Spans or tensors are supported, their\ndimensionality definition could be implemented that way. E.g. \"[3,,]\"\ncould be interpreted as a tensor with fixed-size first dimension and\nvariable-sized second and third dimension.\n>\n>>\n>> Signed-off-by: Christian Rauch <Rauch.Christian@gmx.de>\n>\n> By the way, you have a Reviewed-by tag from Jacopo on v1.\n\nI am afraid, I don't know how these things work. Do I just copy & paste\nthis into my commit message or do I have to \"import\" this reviewed\ncommit into my branch again?\n\nBest,\nChristian\n>\n>\n> Paul\n>\n>> ---\n>>  src/libcamera/control_ids.yaml  | 2 +-\n>>  src/libcamera/property_ids.yaml | 4 ++--\n>>  2 files changed, 3 insertions(+), 3 deletions(-)\n>>\n>> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n>> index 9d4638ae..c3f593a1 100644\n>> --- a/src/libcamera/control_ids.yaml\n>> +++ b/src/libcamera/control_ids.yaml\n>> @@ -291,7 +291,7 @@ controls:\n>>          transformation. The 3x3 matrix is stored in conventional reading\n>>          order in an array of 9 floating point values.\n>>\n>> -      size: [3x3]\n>> +      size: [3,3]\n>>\n>>    - ScalerCrop:\n>>        type: Rectangle\n>> diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml\n>> index 12ecbce5..47c350ed 100644\n>> --- a/src/libcamera/property_ids.yaml\n>> +++ b/src/libcamera/property_ids.yaml\n>> @@ -497,7 +497,7 @@ controls:\n>>\n>>    - PixelArrayOpticalBlackRectangles:\n>>        type: Rectangle\n>> -      size: [n]\n>> +      size: []\n>>        description: |\n>>          The pixel array region(s) which contain optical black pixels\n>>          considered valid for calibration purposes.\n>> @@ -592,7 +592,7 @@ controls:\n>>\n>>    - PixelArrayActiveAreas:\n>>        type: Rectangle\n>> -      size: [n]\n>> +      size: []\n>>        description: |\n>>          The PixelArrayActiveAreas property defines the (possibly multiple and\n>>          overlapping) portions of the camera sensor readable pixel matrix\n>> --\n>> 2.25.1\n>>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6C484C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 25 Apr 2022 23:50:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 94B6F6563A;\n\tTue, 26 Apr 2022 01:50:20 +0200 (CEST)","from mout.gmx.net (mout.gmx.net [212.227.15.15])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 80B33604AD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Apr 2022 01:50:18 +0200 (CEST)","from [192.168.1.209] ([92.10.251.63]) by mail.gmx.net (mrgmx004\n\t[212.227.17.190]) with ESMTPSA (Nemesis) id 1MDQeK-1nYebf40ww-00AYfa\n\tfor\n\t<libcamera-devel@lists.libcamera.org>; Tue, 26 Apr 2022 01:50:18 +0200"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1650930620;\n\tbh=a2n4l6yR6NebwXqS1Andprt4ay0lGSO6D06LP7wnE/4=;\n\th=Date:Cc:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=k/i4FHD8cxhtVY01MX8j+WgvRXbJKhD5OadH6NSBc+SPTlp89rm78kLyhzb1D9qxf\n\tUr6U1TcVCENgxGi4ESBEHU5s3yn12Xiih0CZCdgrAqgrC0A4ANiHwDnp4Gx0xP+LJb\n\tMMHta9FiKVI72p3rwBjIacLjpuH8Ct0Egtw8Qp+qENo1JHZtadzuXKQ2fkIPP773MS\n\t1Nj7nRXPqWho4ALgLcxFT8cZXOddMMUExQknhrmLrbtrAOSuKqLtGb9GkKyVw89hKb\n\t6xKLwMIcx3hl/kKN/7I78RBEGv4RqxCK2rUsH7aUTs8DQTHBwokwcBa3QVazX/967t\n\taFpOfCHClEGxg==","v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;\n\ts=badeba3b8450; t=1650930618;\n\tbh=a2n4l6yR6NebwXqS1Andprt4ay0lGSO6D06LP7wnE/4=;\n\th=X-UI-Sender-Class:Date:Subject:Cc:References:From:In-Reply-To;\n\tb=Km/McefWGB5JM9nur0TAzqoigPavqYbLqzwGWHWelYHAll37D8De3trlaZJNrHio3\n\t+8WGco+HND2mG+mozmi30pxdHO5EgzmMUdIRjdXqIQw9dj6cI/FH+Jk6E4bdD0SQog\n\t/9D7mTBzzsb+d4febE6y7yERvAeDB2R/2P5vJBdY="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=gmx.net header.i=@gmx.net\n\theader.b=\"Km/McefW\"; dkim-atps=neutral","X-UI-Sender-Class":"01bb95c1-4bf8-414a-932a-4f6e2808ef9c","Message-ID":"<03a24104-9bf1-bdd3-2f42-8c90715d3242@gmx.de>","Date":"Tue, 26 Apr 2022 00:50:17 +0100","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.8.0","Content-Language":"en-CA","Cc":"libcamera-devel@lists.libcamera.org","References":"<20220408014231.231083-1-Rauch.Christian@gmx.de>\n\t<20220408014231.231083-2-Rauch.Christian@gmx.de>\n\t<20220420020755.GZ3237525@pyrite.rasen.tech>","In-Reply-To":"<20220420020755.GZ3237525@pyrite.rasen.tech>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"quoted-printable","X-Provags-ID":"V03:K1:V8nFuGDvPSZaLB0v9tbK7xI/AFg3TzJDG+pHRD6wiEllNbwgAKO\n\t37z/FKgnKDHpr4Jow4V+Z2rk40l/gh8MwdWghWT24IMKfBSDzVPG4VkVlIJqcEsKzDcu+s5\n\taTN9J+rbqQjdM8DX5aQ1+dsQehRMyy22h8gitDC4lyvhA8TXqTIa/MmRbbVDZCTetXehgHP\n\tP5s+b9Ra96S23+UZdNGJg==","X-Spam-Flag":"NO","X-UI-Out-Filterresults":"notjunk:1; V03:K0:kDte420kmzM=:wOVlv5TScFrITy08G5GUyZ\n\tD3Y8Gwci3wlLNzZxTbdZu4wY7bCwnqLq7DECKGRPy37cxa4Fr6aghb5h2rOcfgnzdEaim53r4\n\t65O0DiZfYLWqLOCUuFFg0QaAj4ljMAn/8rkFIFC/vj+u0lmyBJ+7jylBYQ79jJ+BL4cSK4PXm\n\tRdnTqO7YFKYIBVLUzZTexVuIO4TDot2tFtMa6mfKnP34izxlEVFl5G/NYYBB/0dcnuKMfYk0+\n\tPtrk/0r/Pd2LvrnNKTDa1XJF2YnY1FG5lq02tpmAK1sBycEXGSmr/PAgOpiUNk46+ehOAQV7i\n\t/M2elGARiCuId/fvcXWoS59EsxM9tO9E5Wlosr8yuEAMzUIGG+4uhZbFkTlQLC2JzNfb1SXnr\n\tq01GfIIpun3FK58UbTSJhgekwj0CzrbmhAaVzmCmQMa1p/4vDq+PZ9QTcnIHMPi49vMW1Y/OR\n\t8ktfx5iiLFsGg5EhTLdP4BnKd5W51+Rl+kTOV1lgt1KoW8/CeONpnakQX/ZUaMANhvrhrA/u0\n\tJpy4V9Ghcj8/RUsai/8m6qNhSsyJAtTgMXL38vNXpdRZsJckiXhu84fnKu9EBPH6NwLnYFziN\n\tBhrUlPU2SgqG9G7O7E/KysQ8RW/N/gmGGhBOdn1szHtdUBE9uww+Ad8krm9bsPS/3FDdhAGoz\n\t6DDzixJ4lA6mZuu4jr7lFnI+U8PXnauHFaSItXIvyfHVVoG4P7muBPNa98blDGS5BOp0O2jK8\n\t0IHKJWe82Wxsa9ebT4EXJ30si+WFJCkDOA+K9kIS0rDEwE3Tgf+XqdIlKNU3RElldXQsmVYDk\n\tIgdsFRNgI6KSJzOXP8meqJZWZOA4R2ZjBImcXpFb6Y16ZqhYm98RJl7Zce21VvgaNsKMsGNU8\n\tfFY5dmEmO+CwZkoitMrueAelM5c/oaG7DGevkiNP37Qw7nv5ZpoEptIxipzdP6XpNtUc8vxqt\n\tH82LjpxPo64w5j1ZuC5ezXhfFE+LLicft/0crEjNAiCX68V380Up8FkQHu69Iz8IdbjywhXGG\n\t4DCw68Z35D8nP+cW21hF3eF3CZNVlq1n60mGa+jdfVCcruDK5uuF+O/nc1DLSON55+ci1/6nk\n\ttOgW4KcIWnlIUA=","Subject":"Re: [libcamera-devel] [PATCH v3 1/4] libcamera: controls: Define\n\tsize of array controls as a shape vector","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Christian Rauch via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Christian Rauch <Rauch.Christian@gmx.de>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22797,"web_url":"https://patchwork.libcamera.org/comment/22797/","msgid":"<20220426144608.yfyeu6i6rih7hz2m@uno.localdomain>","date":"2022-04-26T14:46:08","subject":"Re: [libcamera-devel] [PATCH v3 1/4] libcamera: controls: Define\n\tsize of array controls as a shape vector","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Christian\n\nOn Tue, Apr 26, 2022 at 12:50:17AM +0100, Christian Rauch via libcamera-devel wrote:\n> Hi Paul,\n>\n> Am 20.04.22 um 03:07 schrieb paul.elder@ideasonboard.com:\n> > Hi Christian,\n> >\n> > On Fri, Apr 08, 2022 at 02:42:28AM +0100, Christian Rauch via libcamera-devel wrote:\n> >> This follows the convention in other Tensor APIs. Since all tensors are\n> >> represented as a Span with a single dimension, values provided in 'size'\n> >> are interpreted as fixed-size Spans, while an empty array (\"[]\") will be\n> >> interpreted as variable-sized Span.\n> >\n> > I see, so you can just chain comma-separated values to add more\n> > dimensions, neat.\n> >\n> > So if you have a variable-length array of objects of size 3 then you'll\n> > have [3,] ? I suppose it's not that bad.\n>\n> Spans are 1-dimensional for now and all documented dimensions are\n> \"flattened\". Having multiple dimensions is really only useful for\n> documentation purposes.\n> Once multidimensional Spans or tensors are supported, their\n> dimensionality definition could be implemented that way. E.g. \"[3,,]\"\n> could be interpreted as a tensor with fixed-size first dimension and\n> variable-sized second and third dimension.\n> >\n> >>\n> >> Signed-off-by: Christian Rauch <Rauch.Christian@gmx.de>\n> >\n> > By the way, you have a Reviewed-by tag from Jacopo on v1.\n>\n> I am afraid, I don't know how these things work. Do I just copy & paste\n> this into my commit message or do I have to \"import\" this reviewed\n> commit into my branch again?\n>\n\nYes, just copy and paste tags you have received in the new version of\nthe patch file.\n\nIf changes between versions are considerable, you might decide to drop\nthe tags.\n\nThanks\n   j\n\n> Best,\n> Christian\n> >\n> >\n> > Paul\n> >\n> >> ---\n> >>  src/libcamera/control_ids.yaml  | 2 +-\n> >>  src/libcamera/property_ids.yaml | 4 ++--\n> >>  2 files changed, 3 insertions(+), 3 deletions(-)\n> >>\n> >> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> >> index 9d4638ae..c3f593a1 100644\n> >> --- a/src/libcamera/control_ids.yaml\n> >> +++ b/src/libcamera/control_ids.yaml\n> >> @@ -291,7 +291,7 @@ controls:\n> >>          transformation. The 3x3 matrix is stored in conventional reading\n> >>          order in an array of 9 floating point values.\n> >>\n> >> -      size: [3x3]\n> >> +      size: [3,3]\n> >>\n> >>    - ScalerCrop:\n> >>        type: Rectangle\n> >> diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml\n> >> index 12ecbce5..47c350ed 100644\n> >> --- a/src/libcamera/property_ids.yaml\n> >> +++ b/src/libcamera/property_ids.yaml\n> >> @@ -497,7 +497,7 @@ controls:\n> >>\n> >>    - PixelArrayOpticalBlackRectangles:\n> >>        type: Rectangle\n> >> -      size: [n]\n> >> +      size: []\n> >>        description: |\n> >>          The pixel array region(s) which contain optical black pixels\n> >>          considered valid for calibration purposes.\n> >> @@ -592,7 +592,7 @@ controls:\n> >>\n> >>    - PixelArrayActiveAreas:\n> >>        type: Rectangle\n> >> -      size: [n]\n> >> +      size: []\n> >>        description: |\n> >>          The PixelArrayActiveAreas property defines the (possibly multiple and\n> >>          overlapping) portions of the camera sensor readable pixel matrix\n> >> --\n> >> 2.25.1\n> >>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 21C9CC3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 26 Apr 2022 14:46:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7994F65642;\n\tTue, 26 Apr 2022 16:46:12 +0200 (CEST)","from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::221])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0ACC060431\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Apr 2022 16:46:11 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 8602E240019;\n\tTue, 26 Apr 2022 14:46:10 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1650984372;\n\tbh=9s2Ezn3SCEbHn+7uWt/GN3ZcnnWTKdEVuy26MtSZfZQ=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=QxfxSLPSf0y8JslWYvwrDdbcpE92Zo8smDmalleX8mVd4cFdmg+/BbJ2EIt8MLwZL\n\t8mnORFU5PsL0BNDzVhHRH6uZIN8+rFLDn3mUgtatweeIRC2+/g8EDxJTBqgxNcd4rs\n\tRUYfkQ08XGTtESN6t9HjgoC3X9/On0N0cQz8qswVyiwIV4F7Xli0lEU0mwGSwfkq1C\n\t8BDVhVUSx5gXCMMo//mBUcDOKfUQVHGr37sHWk0KWQolcAagNV29HS+uaAgpXplJtC\n\tRvLv0L8IOhKxwW2akcOt4Ql0j6XKi+v/rz75uLPgFG7vE7MHBRtJCzU7DJmtvmZgoW\n\tuwAwv1AfLWJRg==","Date":"Tue, 26 Apr 2022 16:46:08 +0200","To":"Christian Rauch <Rauch.Christian@gmx.de>","Message-ID":"<20220426144608.yfyeu6i6rih7hz2m@uno.localdomain>","References":"<20220408014231.231083-1-Rauch.Christian@gmx.de>\n\t<20220408014231.231083-2-Rauch.Christian@gmx.de>\n\t<20220420020755.GZ3237525@pyrite.rasen.tech>\n\t<03a24104-9bf1-bdd3-2f42-8c90715d3242@gmx.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<03a24104-9bf1-bdd3-2f42-8c90715d3242@gmx.de>","Subject":"Re: [libcamera-devel] [PATCH v3 1/4] libcamera: controls: Define\n\tsize of array controls as a shape vector","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]