[{"id":4404,"web_url":"https://patchwork.libcamera.org/comment/4404/","msgid":"<20200407225440.GW1716317@oden.dyn.berto.se>","date":"2020-04-07T22:54:40","subject":"Re: [libcamera-devel] [PATCH v4 1/6] libcamera: properties: Define\n\tpixel array properties","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Jacopo,\n\nThanks for your great effort in defining properties!\n\nOn 2020-03-26 15:59:22 +0100, Jacopo Mondi wrote:\n> Add definition of pixel array related properties.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/property_ids.yaml | 155 ++++++++++++++++++++++++++++++++\n>  1 file changed, 155 insertions(+)\n> \n> diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml\n> index ce627fa042ba..ea9d363fdef8 100644\n> --- a/src/libcamera/property_ids.yaml\n> +++ b/src/libcamera/property_ids.yaml\n> @@ -386,4 +386,159 @@ controls:\n>                                |                    |\n>                                |                    |\n>                                +--------------------+\n> +\n> +  - PixelArraySize:\n> +      type: float\n> +      size: [2]\n> +      description: |\n> +        The physical sizes of the pixel array (width and height), in\n> +        millimeters.\n> +\n> +  - PixelArray:\n> +      type: int32_t\n> +      size: [2]\n> +      description: |\n> +        The camera sensor pixel array vertical and horizontal sizes, in pixels.\n> +\n> +        The property describes a rectangle with its top-left corner in position\n> +        (0, 0) and width and height described by the first and second values\n> +        of this property.\n> +\n> +        The PixelArray property defines the rectangle that includes all possible\n> +        rectangles defined by the ActiveAreas property, and describes the full\n> +        pixel array, including non-active pixels, black level calibration\n> +        pixels etc.\n> +\n> +  - ActiveAreas:\n> +      type: int32_t\n> +      size: [4 x n]\n> +      description: |\n> +        The camera sensor active pixel area rectangles, represented as\n> +        rectangles contained in the one described by the PixelArrays property.\n\ns/PixelArrays/PixelArray/\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> +\n> +        This property describes an arbitrary number of overlapping rectangles,\n> +        representing the active pixel portions of the camera sensor pixel array.\n> +\n> +        Each rectangle is defined by its displacement from pixel (0, 0) of\n> +        the rectangle described by the PixelArray property, a width and an\n> +        height.\n> +\n> +        Each rectangle described by this property represents the maximum image\n> +        size that the camera module can produce for a given image resolution.\n> +\n> +        Example 1.\n> +        A sensor which only produces images in the 4:3 image resolution will\n> +        report a single ActiveArea rectangle, from which all other image formats\n> +        are obtained by either cropping the field-of-view and/or applying pixel\n> +        sub-sampling techniques such as pixel skipping or binning.\n> +\n> +                        PixelArray(0)\n> +                    /-----------------/\n> +                      x1          x2\n> +            (0,0)-> +-o------------o-+  /\n> +                 y1 o +------------+ |  |\n> +                    | |////////////| |  |\n> +                    | |////////////| |  | PixelArray(1)\n> +                    | |////////////| |  |\n> +                 y2 o +------------+ |  |\n> +                    +----------------+  /\n> +\n> +        The property reports a single rectangle\n> +\n> +                 ActiveArea = (x1, y1, (x2 - x1), (y2 - y1))\n> +\n> +        Example 2\n> +        A camera sensor which can produce images in different native\n> +        resolutions, will report several overlapping rectangle, one for each\n> +        natively supported resolution, ordered from the tallest to the shortest\n> +        one.\n> +\n> +                        PixelArray(0)\n> +                    /-----------------/\n> +                     x1  x2    x3  x4\n> +            (0,0)-> +o---o------o---o+  /\n> +                 y1 |    +------+    |  |\n> +                    |    |//////|    |  |\n> +                 y2 o+---+------+---+|  |\n> +                    ||///|//////|///||  | PixelArray(1)\n> +                 y3 o+---+------+---+|  |\n> +                    |    |//////|    |  |\n> +                 y4 |    +------+    |  |\n> +                    +----+------+----+  /\n> +\n> +        The property reports two rectangles\n> +\n> +                PixelArray = ( (x2, y1, (x3 - x2), (y4 - 1),\n> +                               (x1, y2, (x4 - x1), (y3 - y2))\n> +\n> +        The first rectangle describes the maximum field-of-view of all image\n> +        formats in the 4:3 resolutions, while the second one describes the\n> +        maximum field of view for all image formats in the 16:9 resolutions.\n> +\n> +  - BayerFilterArrangement:\n> +      type: int32_t\n> +      description: |\n> +        The pixel array color filter displacement.\n> +\n> +        This property describes the arrangement and readout sequence of the\n> +        three RGB color components of the sensor's Bayer Color Filter Array\n> +        (CFA).\n> +\n> +        Color filters are usually displaced in line-alternating fashion on the\n> +        sensor pixel array. In example, one line might be composed of Red-Green\n> +        while the successive is composed of Blue-Green color information.\n> +\n> +        The value of this property represents the arrangement of color filters\n> +        in the top-left 2x2 pixel square.\n> +\n> +        For example, for a sensor with the following color filter displacement\n> +\n> +                 (0, 0)               (max-col)\n> +           +---+    +--------------...---+\n> +           |B|G|<---|B|G|B|G|B|G|B|...B|G|\n> +           |G|R|<---|G|R|G|R|G|R|G|...G|R|\n> +           +---+    |B|G|B|G|B|G|B|...B|G|\n> +                    ...                  ..\n> +                    ...                  ..\n> +                    |G|R|G|R|G|R|G|...G|R|\n> +                    |B|G|B|G|B|G|B|...B|G|   (max-lines)\n> +                    +--------------...---+\n> +\n> +        The filter arrangement is represented by the BGGR value, which\n> +        correspond to the pixel readout sequence in line interleaved mode.\n> +\n> +      enum:\n> +        - name: BayerFilterRGGB\n> +          value: 0\n> +          description: |\n> +            Color filter array displacement is Red-Green/Green-Blue\n> +\n> +        - name: BayerFilterGRBG\n> +          value: 1\n> +          description: |\n> +            Color filter array displacement is Green-Red/Blue-Green\n> +\n> +        - name: BayerFilterGBRG\n> +          value: 2\n> +          description: |\n> +            Color filter array displacement is Green-Blue/Red-Green\n> +\n> +        - name: BayerFilterBGGR\n> +          value: 3\n> +          description: |\n> +            Color filter array displacement is Blue-Green/Green-Red\n> +\n> +        - name: BayerFilterNonStandard\n> +          value: 4\n> +          description: |\n> +            The pixel array color filter does not use the standard Bayer RGB\n> +            color model\n> +\n> +  - ISOSensitivityRange:\n> +      type: int32_t\n> +      size: [2]\n> +      description: |\n> +        The range of supported ISO sensitivities, as documented by the\n> +        ISO 12232:2006 (or later) standard.\n> +\n>  ...\n> -- \n> 2.25.1\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lj1-x242.google.com (mail-lj1-x242.google.com\n\t[IPv6:2a00:1450:4864:20::242])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EC5E2600F3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Apr 2020 00:54:41 +0200 (CEST)","by mail-lj1-x242.google.com with SMTP id r24so5589084ljd.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 07 Apr 2020 15:54:41 -0700 (PDT)","from localhost (h-200-138.A463.priv.bahnhof.se. [176.10.200.138])\n\tby smtp.gmail.com with ESMTPSA id\n\t133sm12395775ljj.91.2020.04.07.15.54.40\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 07 Apr 2020 15:54:40 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com header.b=\"NWlqAjaI\"; \n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=Mtu6wnhrBebzlkd0Clms/dXCX/Q68a19vzfzb06gmfM=;\n\tb=NWlqAjaILFfe6a39KVrcncvyn9SmZW7DchCamlqe2nyS5+U/TmX6r427skASXoIZri\n\t2zdYoWug+CasY5+a178FoC1TOTcGvJ1OF0I0wbqSR9kggw5KvCCXC6oKc5XwWJyme667\n\tdQrvC2EuRoDOjvqgK7zlfvzADmue2M012apGqRAjtgsWlvU6YKiOy0eWvZ0xhnoDcZXf\n\tF+0iSbB+xMKAMIQisvMX7fLiGZUZWyO6OiUDVUJRi+o5XhMmmalESkdzY+CbJ6yJVlez\n\tfejhqoJjui0i+x2TSMuumyr8nqGAbmBtxBT9K3QB7jX2JuaIDUIYLpgaDeIQh3dFY0cU\n\tSJzw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=Mtu6wnhrBebzlkd0Clms/dXCX/Q68a19vzfzb06gmfM=;\n\tb=fDi621wClj6EMlmeK1P6JCbaHijeJSxalgPzICkjeW13IaJXyBkbob6dh/FI6nbctK\n\tWZmNz3b2tALdyp/Ky0AgkLFc9zkngzK2PJyuXsryBKnWzqjNDbf6E8/XYy3YIfmlzL1c\n\t0u53Em8uVuwf1+wEKyrWK8+ge/JbgNGQ7rcJvZHKAXWk/rtI8AHURbvE2Pz93QLxNO5R\n\t21tu340sv2Wz3k4E6eQEOM1XPRi3BlAvAYHPIxR5OxQ0eQQibgFqUJVazTSVJtKkKXg6\n\tC3OdZqWVDXmetWdrmA4XbdEDwUZz4uOZAsYZrERAax85IOSgknK62lm5EJbwcx2uesyP\n\tXafw==","X-Gm-Message-State":"AGi0PuYTSlIltlid0onQhMzzjr0hEDgqOoWV6r6hYX0T8CSpfU2kiFdk\n\tpqDDg9dFISfyTsoij/LtNZvUYA==","X-Google-Smtp-Source":"APiQypIveYcud8BHloeRQjeyvpdMSMi1mv99drGHCYHRD4vKQ9hANlAlsHyYABpsd727g5ZNP9+0AQ==","X-Received":"by 2002:a2e:3e1a:: with SMTP id l26mr2971953lja.15.1586300081208;\n\tTue, 07 Apr 2020 15:54:41 -0700 (PDT)","Date":"Wed, 8 Apr 2020 00:54:40 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200407225440.GW1716317@oden.dyn.berto.se>","References":"<20200326145927.324919-1-jacopo@jmondi.org>\n\t<20200326145927.324919-2-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20200326145927.324919-2-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH v4 1/6] libcamera: properties: Define\n\tpixel array properties","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>","X-List-Received-Date":"Tue, 07 Apr 2020 22:54:42 -0000"}}]