[libcamera-devel] [PATCH v3 1/4] libcamera: controls: Define size of array controls as a shape vector
paul.elder at ideasonboard.com
paul.elder at ideasonboard.com
Wed Apr 20 04:07:55 CEST 2022
Hi Christian,
On Fri, Apr 08, 2022 at 02:42:28AM +0100, Christian Rauch via libcamera-devel wrote:
> This follows the convention in other Tensor APIs. Since all tensors are
> represented as a Span with a single dimension, values provided in 'size'
> are interpreted as fixed-size Spans, while an empty array ("[]") will be
> interpreted as variable-sized Span.
I see, so you can just chain comma-separated values to add more
dimensions, neat.
So if you have a variable-length array of objects of size 3 then you'll
have [3,] ? I suppose it's not that bad.
>
> Signed-off-by: Christian Rauch <Rauch.Christian at gmx.de>
By the way, you have a Reviewed-by tag from Jacopo on v1.
Paul
> ---
> src/libcamera/control_ids.yaml | 2 +-
> src/libcamera/property_ids.yaml | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
> index 9d4638ae..c3f593a1 100644
> --- a/src/libcamera/control_ids.yaml
> +++ b/src/libcamera/control_ids.yaml
> @@ -291,7 +291,7 @@ controls:
> transformation. The 3x3 matrix is stored in conventional reading
> order in an array of 9 floating point values.
>
> - size: [3x3]
> + size: [3,3]
>
> - ScalerCrop:
> type: Rectangle
> diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml
> index 12ecbce5..47c350ed 100644
> --- a/src/libcamera/property_ids.yaml
> +++ b/src/libcamera/property_ids.yaml
> @@ -497,7 +497,7 @@ controls:
>
> - PixelArrayOpticalBlackRectangles:
> type: Rectangle
> - size: [n]
> + size: []
> description: |
> The pixel array region(s) which contain optical black pixels
> considered valid for calibration purposes.
> @@ -592,7 +592,7 @@ controls:
>
> - PixelArrayActiveAreas:
> type: Rectangle
> - size: [n]
> + size: []
> description: |
> The PixelArrayActiveAreas property defines the (possibly multiple and
> overlapping) portions of the camera sensor readable pixel matrix
> --
> 2.25.1
>
More information about the libcamera-devel
mailing list