Patch Detail
Show a patch.
GET /api/1.1/patches/1817/?format=api
{ "id": 1817, "url": "https://patchwork.libcamera.org/api/1.1/patches/1817/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1817/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20190817105937.29353-6-jacopo@jmondi.org>", "date": "2019-08-17T10:59:37", "name": "[libcamera-devel,5/5] libcamera: camera_sensor: Retrieve sensor sizes", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "6ab70770cd836a6a3aaba4db9ea6b6e75bf9e29c", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/1817/mbox/", "series": [ { "id": 462, "url": "https://patchwork.libcamera.org/api/1.1/series/462/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=462", "date": "2019-08-17T10:59:32", "name": "libcamera: camera_sensor: Collect camera location and sizes", "version": 1, "mbox": "https://patchwork.libcamera.org/series/462/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1817/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1817/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 66C4661917\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 17 Aug 2019 12:58:19 +0200 (CEST)", "from uno.homenet.telecomitalia.it\n\t(host64-130-dynamic.5-87-r.retail.telecomitalia.it [87.5.130.64])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay5-d.mail.gandi.net (Postfix) with ESMTPSA id D9D311C0002;\n\tSat, 17 Aug 2019 10:58:18 +0000 (UTC)" ], "X-Originating-IP": "87.5.130.64", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sat, 17 Aug 2019 12:59:37 +0200", "Message-Id": "<20190817105937.29353-6-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.22.0", "In-Reply-To": "<20190817105937.29353-1-jacopo@jmondi.org>", "References": "<20190817105937.29353-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 5/5] libcamera: camera_sensor: Retrieve\n\tsensor sizes", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.23", "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": "Sat, 17 Aug 2019 10:58:19 -0000" }, "content": "Retrieve the camera sensor pixel array sizes and the active pixel sizes\nusing the V4L2 selection APIs.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/camera_sensor.cpp | 13 +++++++++++++\n src/libcamera/include/camera_sensor.h | 2 ++\n 2 files changed, 15 insertions(+)", "diff": "diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex 2703d10c719e..e6b01c242328 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -114,6 +114,19 @@ int CameraSensor::init()\n \t\treturn -EINVAL;\n \t}\n \n+\t/* Retrieve and store the sensor pixel array and active area sizes. */\n+\tret = subdev_->getCropBounds(0, &activeAreaSize_);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tRectangle rect = {};\n+\tret = subdev_->getNativeSize(0, &rect);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tpixelArraySize_.width = rect.w;\n+\tpixelArraySize_.height = rect.h;\n+\n \t/* Enumerate and cache media bus codes and sizes. */\n \tconst ImageFormats formats = subdev_->formats(0);\n \tif (formats.isEmpty()) {\ndiff --git a/src/libcamera/include/camera_sensor.h b/src/libcamera/include/camera_sensor.h\nindex a237a1684605..f6b184bf2838 100644\n--- a/src/libcamera/include/camera_sensor.h\n+++ b/src/libcamera/include/camera_sensor.h\n@@ -58,6 +58,8 @@ private:\n \tstd::vector<Size> sizes_;\n \n \tCameraLocation location_;\n+\tSize pixelArraySize_;\n+\tRectangle activeAreaSize_;\n };\n \n } /* namespace libcamera */\n", "prefixes": [ "libcamera-devel", "5/5" ] }