Patch Detail
Show a patch.
GET /api/patches/3926/?format=api
{ "id": 3926, "url": "https://patchwork.libcamera.org/api/patches/3926/?format=api", "web_url": "https://patchwork.libcamera.org/patch/3926/", "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": "<20200604153122.18074-1-jacopo@jmondi.org>", "date": "2020-06-04T15:31:22", "name": "[libcamera-devel,v6] libcamera: properties: Define pixel array properties", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "9bad7a739bcb0fdee03c061f5d3e6ca5b22eaaca", "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/3926/mbox/", "series": [ { "id": 953, "url": "https://patchwork.libcamera.org/api/series/953/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=953", "date": "2020-06-04T15:31:22", "name": "[libcamera-devel,v6] libcamera: properties: Define pixel array properties", "version": 6, "mbox": "https://patchwork.libcamera.org/series/953/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/3926/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/3926/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 21243603C8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 4 Jun 2020 17:28:09 +0200 (CEST)", "from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id AA3B5E0007;\n\tThu, 4 Jun 2020 15:28:06 +0000 (UTC)" ], "X-Originating-IP": "2.224.242.101", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Jacopo Mondi <jacopo@jmondi.org>, ricardo.ribalda@gmail.com,\n\tsakari.ailus@iki.fi, figa@chromium.org", "Date": "Thu, 4 Jun 2020 17:31:22 +0200", "Message-Id": "<20200604153122.18074-1-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.26.2", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v6] 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>", "X-List-Received-Date": "Thu, 04 Jun 2020 15:28:09 -0000" }, "content": "Add definition of pixel array related properties.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/property_ids.yaml | 263 ++++++++++++++++++++++++++++++++\n 1 file changed, 263 insertions(+)\n\n--\n2.26.2", "diff": "diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml\nindex ce627fa042ba..762d60881568 100644\n--- a/src/libcamera/property_ids.yaml\n+++ b/src/libcamera/property_ids.yaml\n@@ -386,4 +386,267 @@ 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\n+ of a single pixel unit, including its active and non-active parts.\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+ - PixelArrayPhysicalSize:\n+ type: Size\n+ description: |\n+ The camera sensor full pixel array size, in nanometers.\n+\n+ The PixelArrayPhysicalSize property reports the physical dimensions\n+ (width x height) of the full pixel array matrix, including readable\n+ and non-readable pixels.\n+\n+ \\todo Rename this property to PhysicalSize once we will have property\n+ categories (i.e. Properties::PixelArray::PhysicalSize)\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 optically black\n+ pixels used for calibration, pixels which are not considered valid for\n+ capture and active pixels valid for image capture.\n+\n+ The property describes a rectangle whose top-left corner is placed\n+ in position (0, 0) and whose vertical and horizontal sizes are defined\n+ by the Size element transported by the property.\n+\n+ The property describes the maximum size of the raw data produced by\n+ the sensor, which might not correspond to the physical size of the\n+ sensor pixel array matrix, as some portions of the physical pixel\n+ array matrix are not accessible and cannot be transmitted out.\n+\n+ For example, a pixel array matrix assembled as follow\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+ composed by two lines of non-readable pixels (x) followed by N lines of\n+ readable data (D) surrounded by two columns of non-readable pixels on\n+ each side, only the readable portion is transmitted to the receiving\n+ side, defining the sizes of the largest possible buffer of raw data\n+ that can be presented to applications.\n+\n+ PixelArraySize[0]\n+ /----------------------------------------------/\n+ +----------------------------------------------+ /\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| | PixelArraySize[1]\n+ ... ... ... ... ...\n+ ... ... ... ... ...\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n+ |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n+ +----------------------------------------------+ /\n+\n+ All other rectangles that describes portions of the pixel array, such as\n+ the optical black pixels rectangles and active pixel areas are defined\n+ relatively to the rectangle described by this property.\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: [1 x n]\n+ description: |\n+ The raw data buffer regions which contains optical black pixels\n+ considered valid for calibration purposes.\n+\n+ The PixelArrayOpticalBlackRectangles describes (possibly multiple)\n+ rectangular areas of the raw data buffer, where optical black pixels are\n+ located and could be accessed for calibration and black level\n+ correction.\n+\n+ This property describes the position and size of optically black pixel\n+ rectangles relatively to their position in the raw data buffer as stored\n+ in memory, which might differ from their actual physical location in the\n+ pixel array matrix.\n+\n+ It is important to note, in facts, that camera sensor might\n+ automatically re-order, shuffle or skip portions of their pixels array\n+ matrix when transmitting data to the receiver.\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+ blank shielding placed on top of optical black pixels.\n+\n+ PixelArraySize[0]\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[1]\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 optically 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 + },\n+ { x1, y3, 2, y4 - y3 + 1 },\n+ { x2, y3, 2, y4 - y3 + 1 },\n+ };\n+\n+ If the sensor, when required to output the full pixel array matrix,\n+ automatically skip the invalid lines and columns, producing the\n+ following data buffer, when captured to memory\n+\n+ PixelArraySize[0]\n+ /----------------------------------------------/\n+ x1\n+ +--------------------------------------------o-+ /\n+ |OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO| |\n+ |OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO| |\n+ |OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO| |\n+ |OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO| |\n+ y1 oOOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOO| |\n+ |OOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOO| |\n+ |OOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOO| | PixelArraySize[1]\n+ ... ... ... ... ... |\n+ ... ... ... ... ... |\n+ |OOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOO| |\n+ |OOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOO| |\n+ +----------------------------------------------+ /\n+\n+ 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: [1 x 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+ Each rectangle is defined relatively to the PixelArraySize rectangle,\n+ with its top-left corner defined by its horizontal and vertical\n+ distances from the PixelArraySize rectangle top-left corner, placed in\n+ position (0, 0).\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.\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[0]\n+ /----------------/\n+ x1 x2\n+ (0,0)-> +-o------------o-+ /\n+ y1 o +------------+ | |\n+ | |////////////| | |\n+ | |////////////| | | PixelArraySize[1]\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[0]\n+ /------------------/\n+ x1 x2 x3 x4\n+ (0,0)-> +o---o------o---o+ /\n+ y1 o +------+ | |\n+ | |//////| | |\n+ y2 o+---+------+---+| |\n+ ||///|//////|///|| | PixelArraySize[1]\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+ \\todo Rename this property to ActiveAreas once we will have property\n+ categories (i.e. Properties::PixelArray::ActiveAreas)\n+\n ...\n", "prefixes": [ "libcamera-devel", "v6" ] }