Patch Detail
Show a patch.
GET /api/patches/9082/?format=api
{ "id": 9082, "url": "https://patchwork.libcamera.org/api/patches/9082/?format=api", "web_url": "https://patchwork.libcamera.org/patch/9082/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20200731085246.34878-1-jacopo@jmondi.org>", "date": "2020-07-31T08:52:46", "name": "[libcamera-devel,v7] libcamera: properties: Define pixel array properties", "commit_ref": "6042ded8e7ffb7c2d3bf02cfb5fd25f255abdfa3", "pull_url": null, "state": "accepted", "archived": false, "hash": "0708516406332eb894bf80a514308a27058def16", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/9082/mbox/", "series": [ { "id": 1166, "url": "https://patchwork.libcamera.org/api/series/1166/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1166", "date": "2020-07-31T08:52:46", "name": "[libcamera-devel,v7] libcamera: properties: Define pixel array properties", "version": 7, "mbox": "https://patchwork.libcamera.org/series/1166/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/9082/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/9082/checks/", "tags": {}, "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 44FDDBD878\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 31 Jul 2020 08:49:35 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CDE4061988;\n\tFri, 31 Jul 2020 10:49:34 +0200 (CEST)", "from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net\n\t[217.70.183.199])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6988860395\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 31 Jul 2020 10:49:33 +0200 (CEST)", "from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 7A5A5FF807;\n\tFri, 31 Jul 2020 08:49:30 +0000 (UTC)" ], "X-Originating-IP": "93.34.118.233", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 31 Jul 2020 10:52:46 +0200", "Message-Id": "<20200731085246.34878-1-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.27.0", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v7] libcamera: properties: Define pixel\n\tarray 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>", "Cc": "Ricardo Ribalda <ricardo@ribalda.com>, sakari.ailus@iki.fi,\n\tricardo.ribalda@gmail.com", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Add definition of pixel array related properties.\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Ricardo Ribalda <ricardo@ribalda.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/property_ids.yaml | 254 ++++++++++++++++++++++++++++++++\n 1 file changed, 254 insertions(+)\n\n--\n2.27.0", "diff": "diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml\nindex ce627fa042ba..35423b94c4ab 100644\n--- a/src/libcamera/property_ids.yaml\n+++ b/src/libcamera/property_ids.yaml\n@@ -386,4 +386,258 @@ controls:\n | |\n | |\n +--------------------+\n+\n+ - UnitCellSize:\n+ type: Size\n+ description: |\n+ The pixel unit cell physical size, in nanometers.\n+\n+ The UnitCellSize properties defines the horizontal and vertical sizes of\n+ a single pixel unit, including its active and non-active parts. In\n+ other words, it expresses the horizontal and vertical distance between\n+ the top-left corners of adjacent pixels.\n+\n+ The property can be used to calculate the physical size of the sensor's\n+ pixel array area and for calibration purposes.\n+\n+ - PixelArraySize:\n+ type: Size\n+ description: |\n+ The camera sensor pixel array readable area vertical and horizontal\n+ sizes, in pixels.\n+\n+ The PixelArraySize property defines the size in pixel units of the\n+ readable part of full pixel array matrix, including optical black\n+ pixels used for calibration, pixels which are not considered valid for\n+ capture and active pixels containing valid image data.\n+\n+ The property describes the maximum size of the raw data captured by the\n+ camera, which might not correspond to the physical size of the sensor\n+ pixel array matrix, as some portions of the physical pixel array matrix\n+ are not accessible and cannot be transmitted out.\n+\n+ For example, let's consider a pixel array matrix assembled as follows\n+\n+ +--------------------------------------------------+\n+ |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n+ |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n+ ... ... ... ... ...\n+\n+ ... ... ... ... ...\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n+ |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n+ |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n+ +--------------------------------------------------+\n+\n+ starting with two lines of non-readable pixels (x), followed by N lines\n+ of readable data (D) surrounded by two columns of non-readable pixels on\n+ each side, and ending with two more lines of non-readable pixels. Only\n+ the readable portion is transmitted to the receiving side, defining the\n+ sizes of the largest possible buffer of raw data that can be presented\n+ to applications.\n+\n+ PixelArraySize.width\n+ /----------------------------------------------/\n+ +----------------------------------------------+ /\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| | PixelArraySize.height\n+ ... ... ... ... ...\n+ ... ... ... ... ...\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n+ +----------------------------------------------+ /\n+\n+ This defines a rectangle whose top-left corner is placed in position (0,\n+ 0) and whose vertical and horizontal sizes are defined by this property.\n+ All other rectangles that describe portions of the pixel array, such as\n+ the optical black pixels rectangles and active pixel areas, are defined\n+ relatively to this rectangle.\n+\n+ All the coordinates are expressed relative to the default sensor readout\n+ direction, without any transformation (such as horizontal and vertical\n+ flipping) applied. When mapping them to the raw pixel buffer,\n+ applications shall take any configured transformation into account.\n+\n+ \\todo Rename this property to Size once we will have property\n+ categories (i.e. Properties::PixelArray::Size)\n+\n+ - PixelArrayOpticalBlackRectangles:\n+ type: Rectangle\n+ size: [n]\n+ description: |\n+ The pixel array region(s) which contain optical black pixels\n+ considered valid for calibration purposes.\n+\n+ This property describes the position and size of optical black pixel\n+ regions in the raw data buffer as stored in memory, which might differ\n+ from their actual physical location in the pixel array matrix.\n+\n+ It is important to note, in fact, that camera sensors might\n+ automatically reorder or skip portions of their pixels array matrix when\n+ transmitting data to the receiver. For instance, a sensor may merge the\n+ top and bottom optical black rectangles into a single rectangle,\n+ transmitted at the beginning of the frame.\n+\n+ The pixel array contains several areas with different purposes,\n+ interleaved by lines and columns which are said not to be valid for\n+ capturing purposes. Invalid lines and columns are defined as invalid as\n+ they could be positioned too close to the chip margins or to the optical\n+ black shielding placed on top of optical black pixels.\n+\n+ PixelArraySize.width\n+ /----------------------------------------------/\n+ x1 x2\n+ +--o---------------------------------------o---+ /\n+ |IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII| |\n+ |IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII| |\n+ y1 oIIOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOII| |\n+ |IIOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOII| |\n+ |IIOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOII| |\n+ y2 oIIOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOII| |\n+ |IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII| |\n+ |IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII| |\n+ y3 |IIOOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOOII| |\n+ |IIOOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOOII| | PixelArraySize.height\n+ |IIOOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOOII| |\n+ ... ... ... ... ...\n+ ... ... ... ... ...\n+ y4 |IIOOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOOII| |\n+ |IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII| |\n+ |IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII| |\n+ +----------------------------------------------+ /\n+\n+ The readable pixel array matrix is composed by\n+ 2 invalid lines (I)\n+ 4 lines of valid optical black pixels (O)\n+ 2 invalid lines (I)\n+ n lines of valid pixel data (P)\n+ 2 invalid lines (I)\n+\n+ And the position of the optical black pixel rectangles is defined by\n+\n+ PixelArrayOpticalBlackRectangles = {\n+ { x1, y1, x2 - x1 + 1, y2 - y1 + 1 },\n+ { x1, y3, 2, y4 - y3 + 1 },\n+ { x2, y3, 2, y4 - y3 + 1 },\n+ };\n+\n+ If the camera, when capturing the full pixel array matrix, automatically\n+ skips the invalid lines and columns, producing the following data\n+ buffer, when captured to memory\n+\n+ PixelArraySize.width\n+ /----------------------------------------------/\n+ x1\n+ +--------------------------------------------o-+ /\n+ |OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO| |\n+ |OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO| |\n+ |OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO| |\n+ |OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO| |\n+ y1 oOOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOO| |\n+ |OOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOO| |\n+ |OOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOO| | PixelArraySize.height\n+ ... ... ... ... ... |\n+ ... ... ... ... ... |\n+ |OOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOO| |\n+ |OOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOO| |\n+ +----------------------------------------------+ /\n+\n+ then the invalid lines and columns should not be reported as part of the\n+ PixelArraySize property in first place.\n+\n+ In this case, the position of the black pixel rectangles will be\n+\n+ PixelArrayOpticalBlackRectangles = {\n+ { 0, 0, y1 + 1, PixelArraySize[0] },\n+ { 0, y1, 2, PixelArraySize[1] - y1 + 1 },\n+ { x1, y1, 2, PixelArraySize[1] - y1 + 1 },\n+ };\n+\n+ \\todo Rename this property to Size once we will have property\n+ categories (i.e. Properties::PixelArray::OpticalBlackRectangles)\n+\n+ - PixelArrayActiveAreas:\n+ type: Rectangle\n+ size: [n]\n+ description: |\n+ The PixelArrayActiveAreas property defines the (possibly multiple and\n+ overlapping) portions of the camera sensor readable pixel matrix\n+ which are considered valid for image acquisition purposes.\n+\n+ This property describes an arbitrary number of overlapping rectangles,\n+ with each rectangle representing the maximum image size that the camera\n+ sensor can produce for a particular aspect ratio. They are defined\n+ relatively to the PixelArraySize rectangle.\n+\n+ When multiple rectangles are reported, they shall be ordered from the\n+ tallest to the shortest.\n+\n+ Example 1\n+ A camera sensor which only produces images in the 4:3 image resolution\n+ will report a single PixelArrayActiveAreas rectangle, from which all\n+ other image formats are obtained by either cropping the field-of-view\n+ and/or applying pixel sub-sampling techniques such as pixel skipping or\n+ binning.\n+\n+ PixelArraySize.width\n+ /----------------/\n+ x1 x2\n+ (0,0)-> +-o------------o-+ /\n+ y1 o +------------+ | |\n+ | |////////////| | |\n+ | |////////////| | | PixelArraySize.height\n+ | |////////////| | |\n+ y2 o +------------+ | |\n+ +----------------+ /\n+\n+ The property reports a single rectangle\n+\n+ PixelArrayActiveAreas = (x1, y1, x2 - x1 + 1, y2 - y1 + 1)\n+\n+ Example 2\n+ A camera sensor which can produce images in different native\n+ resolutions will report several overlapping rectangles, one for each\n+ natively supported resolution.\n+\n+ PixelArraySize.width\n+ /------------------/\n+ x1 x2 x3 x4\n+ (0,0)-> +o---o------o---o+ /\n+ y1 o +------+ | |\n+ | |//////| | |\n+ y2 o+---+------+---+| |\n+ ||///|//////|///|| | PixelArraySize.height\n+ y3 o+---+------+---+| |\n+ | |//////| | |\n+ y4 o +------+ | |\n+ +----+------+----+ /\n+\n+ The property reports two rectangles\n+\n+ PixelArrayActiveAreas = ((x2, y1, x3 - x2 + 1, y4 - y1 + 1),\n+ (x1, y2, x4 - x1 + 1, y3 - y2 + 1))\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+ Multiple rectangles shall only be reported when the sensor can't capture\n+ the pixels in the corner regions. If all the pixels in the (x1,y1) -\n+ (x4,y4) area can be captured, the PixelArrayActiveAreas property shall\n+ contains the single rectangle (x1,y1) - (x4,y4).\n+\n+ \\todo Rename this property to ActiveAreas once we will have property\n+ categories (i.e. Properties::PixelArray::ActiveAreas)\n+\n ...\n", "prefixes": [ "libcamera-devel", "v7" ] }