Show a patch.

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

{
    "id": 18967,
    "url": "https://patchwork.libcamera.org/api/patches/18967/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18967/",
    "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": "<20230901150215.11585-5-jacopo.mondi@ideasonboard.com>",
    "date": "2023-09-01T15:02:07",
    "name": "[libcamera-devel,v5,04/12] libcamera: properties: Make 'Rotation' the mounting rotation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "5a6b72d0f853d0d1abb0ddff88c46d929a0fc426",
    "submitter": {
        "id": 143,
        "url": "https://patchwork.libcamera.org/api/people/143/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo.mondi@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/18967/mbox/",
    "series": [
        {
            "id": 4010,
            "url": "https://patchwork.libcamera.org/api/series/4010/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4010",
            "date": "2023-09-01T15:02:03",
            "name": "libcamera: Replace CameraConfiguration::transform",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/4010/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18967/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18967/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 DFD78BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  1 Sep 2023 15:02:50 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 82E92628E6;\n\tFri,  1 Sep 2023 17:02:50 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A2D99627E0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  1 Sep 2023 17:02:49 +0200 (CEST)",
            "from uno.LocalDomain (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C096B1288;\n\tFri,  1 Sep 2023 17:01:23 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1693580570;\n\tbh=xDK91yoWnPn+8AhlpzdW8lSc0qCCbfllNaIxij+HUQg=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=OBCPfQMeFV7NfgBVR59DYnlheI1y7+J+9HrGcFOZdK52K2BOm2Y3SeU/kn35F4xsc\n\tTcII7vNIzC+Hcjc+FdFr5whiQwsSBrkoucOQXcmu5mr3N9uoXSU0T9Sx8xDvmNE6GM\n\tBPk7QO1DASlFCfaDrR7VO26TLSS51i71FsZb+9anzWcHHWFhq403uR1bv3cRSgj256\n\tg2c4oL2rXtcVotoX1GQs8i1rreJ9pXsIvxvfIT43pMi8DzNGfNILXTN0xr1GT+Q7JI\n\tVPT3v4o7INTD7aBZ0XrHAxka7INYSMvf55vKY0OPveVX7tVCu9nJ2o9P2gS4GWnXZ1\n\t/VuUoNt4DysYQ==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1693580485;\n\tbh=xDK91yoWnPn+8AhlpzdW8lSc0qCCbfllNaIxij+HUQg=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=B6Tc4rD6N1g8Rb3V+n63jXfFM1UcJS/ZPjX3l8ol4++LeIbUtQlq1+8ZUwg565mvj\n\t1nNFS1MBNrza01q84UTLLTYzbflxCgh/+7B/WVUOEAyA4WbVWOgH7hq/UvJmDE3Yhw\n\tJnhQ3O6vaXbfQOOkCmZqinn+X5fWQ6jm6TJkf/8Q="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"B6Tc4rD6\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri,  1 Sep 2023 17:02:07 +0200",
        "Message-Id": "<20230901150215.11585-5-jacopo.mondi@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.40.1",
        "In-Reply-To": "<20230901150215.11585-1-jacopo.mondi@ideasonboard.com>",
        "References": "<20230901150215.11585-1-jacopo.mondi@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v5 04/12] libcamera: properties: Make\n\t'Rotation' the mounting rotation",
        "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>",
        "From": "Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Specify in the documentation that properties::Rotation specifies the\nmounting rotation of the camera module. This avoids confusion with the\nimage orientation which is instead expressed by\nCameraConfiguration::orientation.\n\nFor this reason, do not compensate the Rotation property when\ninitializing the CameraSensor class but report the value of\nV4L2_CID_CAMERA_SENSOR_ROTATION or 0 if the control is not available.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/libcamera/camera_sensor.cpp | 11 +----------\n src/libcamera/property_ids.yaml |  8 ++++----\n 2 files changed, 5 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex 9a033459742f..3ba364c44a40 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -476,20 +476,11 @@ int CameraSensor::initProperties()\n \t\t\trotationTransform_ = Transform::Identity;\n \t\t}\n \n-\t\t/*\n-\t\t * Adjust property::Rotation as validateTransform() compensates\n-\t\t * for the mounting rotation. However, as a camera sensor can\n-\t\t * only compensate rotations by applying H/VFlips, only rotation\n-\t\t * of 180 degrees are automatically compensated. The other valid\n-\t\t * rotations (Rot90 and Rot270) require transposition, which the\n-\t\t * camera sensor cannot perform, so leave them untouched.\n-\t\t */\n-\t\tif (propertyValue == 180 && supportFlips_)\n-\t\t\tpropertyValue = 0;\n \t\tproperties_.set(properties::Rotation, propertyValue);\n \t} else {\n \t\tLOG(CameraSensor, Warning)\n \t\t\t<< \"Rotation control not available, default to 0 degrees\";\n+\t\tproperties_.set(properties::Rotation, propertyValue);\n \t\trotationTransform_ = Transform::Identity;\n \t}\n \ndiff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml\nindex 5bddafc29364..fb53081c1bd2 100644\n--- a/src/libcamera/property_ids.yaml\n+++ b/src/libcamera/property_ids.yaml\n@@ -29,10 +29,10 @@ controls:\n   - Rotation:\n       type: int32_t\n       description: |\n-        The camera rotation is expressed as the angular difference in degrees\n-        between two reference systems, one relative to the camera module, and\n-        one defined on the external world scene to be captured when projected\n-        on the image sensor pixel array.\n+        The camera physical mounting rotation, expressed as the angular\n+        difference in degrees between two reference systems, one relative to the\n+        camera module, and one defined on the external world scene to be\n+        captured when projected on the image sensor pixel array.\n \n         A camera sensor has a 2-dimensional reference system 'Rc' defined by\n         its pixel array read-out order. The origin is set to the first pixel\n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "04/12"
    ]
}