Patch Detail
Show a patch.
GET /api/1.1/patches/10388/?format=api
{ "id": 10388, "url": "https://patchwork.libcamera.org/api/1.1/patches/10388/?format=api", "web_url": "https://patchwork.libcamera.org/patch/10388/", "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": "<20201106154947.261132-2-jacopo@jmondi.org>", "date": "2020-11-06T15:49:44", "name": "[libcamera-devel,1/4] libcamera: camera_sensor: Adjust CameraSensorInfo::analogCrop", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "3d85b9dd4bbd7f070ae58a6520c8cea7eacaf0b9", "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/10388/mbox/", "series": [ { "id": 1449, "url": "https://patchwork.libcamera.org/api/1.1/series/1449/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1449", "date": "2020-11-06T15:49:43", "name": "libcamera: Collect pixel array properties", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1449/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/10388/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/10388/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 01DE1BDB89\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 6 Nov 2020 15:49:56 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8373262D77;\n\tFri, 6 Nov 2020 16:49:54 +0100 (CET)", "from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0F8DF622AA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 6 Nov 2020 16:49:53 +0100 (CET)", "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay2-d.mail.gandi.net (Postfix) with ESMTPSA id C7FDE40009\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 6 Nov 2020 15:49:52 +0000 (UTC)" ], "X-Originating-IP": "2.224.242.101", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 6 Nov 2020 16:49:44 +0100", "Message-Id": "<20201106154947.261132-2-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.29.1", "In-Reply-To": "<20201106154947.261132-1-jacopo@jmondi.org>", "References": "<20201106154947.261132-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH 1/4] libcamera: camera_sensor: Adjust\n\tCameraSensorInfo::analogCrop", "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>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The CameraSensorInfo::analogCrop top-left corner is defined relatively\nto the sensor active area.\n\nThe analogCrop rectangle is constucted by retrieving the V4L2\nselection target V4L2_SEL_TGT_CROP which is instead defined relatively\nto the whole sensor's pixel array size.\n\nAdjust the the analogCrop rectangle subtracting from its top-left corner\nthe active area distance from the full pixel array.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\n---\nThis patch depends on the upstreaming of\n\"media: i2c: imx219: Selection compliance fixes\" in mainline Linux\n---\n src/libcamera/camera_sensor.cpp | 9 +++++++++\n 1 file changed, 9 insertions(+)", "diff": "diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex 935de528c496..2af0b0a8db52 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -526,6 +526,15 @@ int CameraSensor::sensorInfo(CameraSensorInfo *info) const\n \t\t\t<< \"the camera sensor does not report the crop rectangle\";\n \t\treturn ret;\n \t}\n+\t/*\n+\t * CameraSensorInfo::analogCrop::x and CameraSensorInfo::analogCrop::y\n+\t * are defined in respect to the active pixel area, while V4L2's\n+\t * TGT_CROP target is defined in respect to the native pixel array.\n+\t *\n+\t * Compensate it subtracting the active areas offset.\n+\t */\n+\tinfo->analogCrop.x -= rect.x;\n+\tinfo->analogCrop.y -= rect.y;\n \n \t/* The bit depth and image size depend on the currently applied format. */\n \tV4L2SubdeviceFormat format{};\n", "prefixes": [ "libcamera-devel", "1/4" ] }