Show a patch.

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

{
    "id": 20513,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/20513/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20513/",
    "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": "<20240703135000.242227-7-stefan.klug@ideasonboard.com>",
    "date": "2024-07-03T13:49:54",
    "name": "[v3,6/6] ipa: rkisp1: Move ov4689 and ov5640 black levels into sensor helpers",
    "commit_ref": "196abb8d1d6e0fe9d190315e72a85eb12d16a554",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "1614bc9038a409c078150bedd1ac2745bafafc1b",
    "submitter": {
        "id": 184,
        "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api",
        "name": "Stefan Klug",
        "email": "stefan.klug@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/20513/mbox/",
    "series": [
        {
            "id": 4436,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4436/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4436",
            "date": "2024-07-03T13:49:48",
            "name": "ipa: Add black level to camera sensor helpers",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/4436/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20513/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20513/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 A3B90BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  3 Jul 2024 13:50:26 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EFC6963334;\n\tWed,  3 Jul 2024 15:50:25 +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 E808D62C96\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Jul 2024 15:50:22 +0200 (CEST)",
            "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:9263:c199:9587:576])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CA3C56D6;\n\tWed,  3 Jul 2024 15:49:54 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"cHrmybGD\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1720014594;\n\tbh=Cr0An1Q//TfybVUxkoTtx3xp4rKuO3uPiB8KbIFCzY4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=cHrmybGDGzkSy6uH8+G7VGUPbHNjtnZ8YLQNvT88wpbp96Et53v1Y28cTLQrXdV3e\n\tezbbYLovgxtSieiCfdnt53KiFpr9twiYkEIpw+ZfpqK7ZEuTkP7twcmlIXyatNu9e1\n\tGaM2xoYzWCko08pJs0zvAgVVf1qgqt5pw3WY7teQ=",
        "From": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Subject": "[PATCH v3 6/6] ipa: rkisp1: Move ov4689 and ov5640 black levels into\n\tsensor helpers",
        "Date": "Wed,  3 Jul 2024 15:49:54 +0200",
        "Message-ID": "<20240703135000.242227-7-stefan.klug@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20240703135000.242227-1-stefan.klug@ideasonboard.com>",
        "References": "<20240703135000.242227-1-stefan.klug@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Move black levels for tuning files that contained a BLC block into\nthe camera sensor helpers.\n\nov4689.yaml had 66@12bit while the datasheet states 64@12bit. Use the\nvalue from the datasheet (scaled to 16bit).\n\nov5640.yaml had 256@12bit while the datasheet states 16@10bit. Looking\nat the commit message the 256 most likely stems from the imx219 tuning\nfile and 16@10bit is the same as the 64@12bit from the ov4689. This\nseems more likely and is therefore used.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/libipa/camera_sensor_helper.cpp | 4 ++++\n src/ipa/rkisp1/data/ov4689.yaml         | 4 ----\n src/ipa/rkisp1/data/ov5640.yaml         | 4 ----\n 3 files changed, 4 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\nindex 82c795eac71b..a1339c83c4cb 100644\n--- a/src/ipa/libipa/camera_sensor_helper.cpp\n+++ b/src/ipa/libipa/camera_sensor_helper.cpp\n@@ -553,6 +553,8 @@ class CameraSensorHelperOv4689 : public CameraSensorHelper\n public:\n \tCameraSensorHelperOv4689()\n \t{\n+\t\t/* From datasheet: 0x40 at 12bits. */\n+\t\tblackLevel_ = 1024;\n \t\tgainType_ = AnalogueGainLinear;\n \t\tgainConstants_.linear = { 1, 0, 0, 128 };\n \t}\n@@ -564,6 +566,8 @@ class CameraSensorHelperOv5640 : public CameraSensorHelper\n public:\n \tCameraSensorHelperOv5640()\n \t{\n+\t\t/* From datasheet: 0x10 at 10bits. */\n+\t\tblackLevel_ = 1024;\n \t\tgainType_ = AnalogueGainLinear;\n \t\tgainConstants_.linear = { 1, 0, 0, 16 };\n \t}\ndiff --git a/src/ipa/rkisp1/data/ov4689.yaml b/src/ipa/rkisp1/data/ov4689.yaml\nindex 2068684cafcd..609012967e02 100644\n--- a/src/ipa/rkisp1/data/ov4689.yaml\n+++ b/src/ipa/rkisp1/data/ov4689.yaml\n@@ -6,8 +6,4 @@ algorithms:\n   - Agc:\n   - Awb:\n   - BlackLevelCorrection:\n-      R:  66\n-      Gr: 66\n-      Gb: 66\n-      B:  66\n ...\ndiff --git a/src/ipa/rkisp1/data/ov5640.yaml b/src/ipa/rkisp1/data/ov5640.yaml\nindex 897b83cb435b..4b21d412e44e 100644\n--- a/src/ipa/rkisp1/data/ov5640.yaml\n+++ b/src/ipa/rkisp1/data/ov5640.yaml\n@@ -6,10 +6,6 @@ algorithms:\n   - Agc:\n   - Awb:\n   - BlackLevelCorrection:\n-      R:  256\n-      Gr: 256\n-      Gb: 256\n-      B:  256\n   - ColorProcessing:\n   - GammaSensorLinearization:\n       x-intervals: [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]\n",
    "prefixes": [
        "v3",
        "6/6"
    ]
}