[libcamera-devel,v9,2/4] libcamera: controls: Define size of array controls as a shape vector
diff mbox series

Message ID 20220704233217.54769-3-Rauch.Christian@gmx.de
State New
Headers show
Series
  • generate and use fixed-sized Span Control types
Related show

Commit Message

Christian Rauch July 4, 2022, 11:32 p.m. UTC
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.

Signed-off-by: Christian Rauch <Rauch.Christian@gmx.de>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/libcamera/control_ids.yaml  | 4 ++--
 src/libcamera/property_ids.yaml | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

--
2.34.1

Patch
diff mbox series

diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
index ecab3ae9..5fa168c6 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
@@ -525,7 +525,7 @@  controls:
         the window where the focal distance for the objects shown in that part
         of the image are closest to the camera.

-      size: [n]
+      size: []

   - AfTrigger:
       type: int32_t
diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml
index 11b7ebdc..a87485d7 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