Show a patch.

GET /api/patches/10548/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 10548,
    "url": "https://patchwork.libcamera.org/api/patches/10548/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/10548/",
    "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": "<20201202135354.264212-2-jacopo@jmondi.org>",
    "date": "2020-12-02T13:53:51",
    "name": "[libcamera-devel,v2,1/4] libcamera: camera_sensor: Adjust CameraSensorInfo::analogCrop",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "22dc9a785947807529fe5762d649721ced9c4cfb",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": {
        "id": 15,
        "url": "https://patchwork.libcamera.org/api/users/15/?format=api",
        "username": "jmondi",
        "first_name": "Jacopo",
        "last_name": "Mondi",
        "email": "jacopo@jmondi.org"
    },
    "mbox": "https://patchwork.libcamera.org/patch/10548/mbox/",
    "series": [
        {
            "id": 1501,
            "url": "https://patchwork.libcamera.org/api/series/1501/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1501",
            "date": "2020-12-02T13:53:50",
            "name": "libcamera: Collect pixel array properties",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/1501/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/10548/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/10548/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 36CD8BE176\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  2 Dec 2020 13:54:00 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D03A1635AC;\n\tWed,  2 Dec 2020 14:53:58 +0100 (CET)",
            "from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 78129634A2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  2 Dec 2020 14:53:57 +0100 (CET)",
            "from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 3522420003\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  2 Dec 2020 13:53:57 +0000 (UTC)"
        ],
        "X-Originating-IP": "93.34.118.233",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed,  2 Dec 2020 14:53:51 +0100",
        "Message-Id": "<20201202135354.264212-2-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.29.1",
        "In-Reply-To": "<20201202135354.264212-1-jacopo@jmondi.org>",
        "References": "<20201202135354.264212-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v2 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=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "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\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\n---\nThis patch depends on kernel patch:\n\"media: i2c: imx219: Selection compliance fixes\":\n\nRPi downstream: https://github.com/raspberrypi/linux/pull/3983\nLinux mainline (should land in v5.11)\nhttps://patchwork.linuxtv.org/project/linux-media/patch/20200805105721.15445-5-jacopo@jmondi.org/\n---\n src/libcamera/camera_sensor.cpp | 10 ++++++++++\n 1 file changed, 10 insertions(+)\n\n--\n2.29.1",
    "diff": "diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex 935de528c496..c5fa89143ac8 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -527,6 +527,16 @@ int CameraSensor::sensorInfo(CameraSensorInfo *info) const\n \t\treturn ret;\n \t}\n\n+\t/*\n+\t * CameraSensorInfo::analogCrop::x and CameraSensorInfo::analogCrop::y\n+\t * are defined relatively to the active pixel area, while V4L2's\n+\t * TGT_CROP target is defined in respect to the full pixel array.\n+\t *\n+\t * Compensate it by 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 \tret = subdev_->getFormat(pad_, &format);\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "1/4"
    ]
}